Open-source LLM knowledge platform: turn raw documents into a queryable RAG, an autonomous reasoning agent, and a self-maintaining Wiki.
Go agentagenticaichatbotdsh-pluginembeddingsevaluationgenerative-aigolangknowledge-basellmmulti-tenantollamaopenaiquestion-answeringragrerankingsemantic-searchvector-searchwiki
refactor(sandbox): remove token requirement for skill installation from source
wizardchen92fd75f54a82
diff --git a/client/README.md b/client/README.mdindex d832a35aa..cd9ac297f 100644--- a/client/README.md+++ b/client/README.md@@ -391,7 +391,7 @@ if err != nil {```goskillID, err := apiClient.InstallSandboxSkillFromSource(- context.Background(), sandboxConfigID, "@owner/slug", "")+ context.Background(), sandboxConfigID, "@owner/slug")if err != nil {// 处理错误}diff --git a/client/README_EN.md b/client/README_EN.mdindex 637006540..6c676018e 100644--- a/client/README_EN.md+++ b/client/README_EN.md@@ -204,7 +204,7 @@ if err != nil {```goskillID, err := apiClient.InstallSandboxSkillFromSource(- context.Background(), sandboxConfigID, "@owner/slug", "")+ context.Background(), sandboxConfigID, "@owner/slug")if err != nil {// Handle error}diff --git a/client/skill.go b/client/skill.goindex 2d180bdfc..d2f93e5a1 100644--- a/client/skill.go+++ b/client/skill.go@@ -53,17 +53,15 @@ func (c *Client) ListSkills(ctx context.Context, sandboxConfigID string) ([]Skil// InstallSandboxSkillFromSource installs a skill onto a sandbox config from a// ClawHub / SkillHub / skills.sh / GitHub / GitLab locator or a direct archive-// URL. The call is accepted asynchronously; follow progress on the skill ID.+// URL. The source must be readable anonymously. The call is accepted+// asynchronously; follow progress on the skill ID.func (c *Client) InstallSandboxSkillFromSource(- ctx context.Context, configID, source, token string,+ ctx context.Context, configID, source string,) (string, error) {if configID == "" {return "", fmt.Errorf("sandbox config ID is required")}body := map[string]string{"source": source}- if token != "" {- body["token"] = token- }path := "/api/v1/sandbox-configs/" + url.PathEscape(configID) + "/skills"resp, err := c.doRequest(ctx, http.MethodPost, path, body, nil)if err != nil {diff --git a/docs/agent-skills.md b/docs/agent-skills.mdindex 52e6722cd..8ba484bbc 100644--- a/docs/agent-skills.md+++ b/docs/agent-skills.md@@ -164,7 +164,7 @@ Docker、Local、CubeSandbox、E2B 均通过同一套空间配置 CRUD、连接- skills.sh、GitHub、GitLab 仓库或目录链接- 直接的 zip / `SKILL.md` URL-私有 SkillHub 可在同一次请求里带 Token,仅用于下载、不会落库。安装仍走原有镜像快照流程。+来源必须可匿名读取,服务端下载时不携带任何凭据;私有仓库请先导出 zip 再上传。安装仍走原有镜像快照流程。**有沙箱在跑时改不了身份字段。** 身份字段分两组,成因不同但后果都足够严重:diff --git a/docs/api/skill.md b/docs/api/skill.mdindex 3e172e341..8d83f4911 100644--- a/docs/api/skill.md+++ b/docs/api/skill.md@@ -75,7 +75,7 @@ curl --location 'http://localhost:8080/api/v1/sandbox-configs/{id}/skills' \- skills.sh / GitHub / GitLab 仓库或目录链接- 直接的 zip / `SKILL.md` URL-私有 SkillHub 可带 `token`,仅用于本次下载,服务端不保存。+来源必须可匿名读取:服务端不会为这次下载附带任何凭据,因此私有仓库/私有 registry 需要先自行导出 zip 再上传。```curlcurl --location 'http://localhost:8080/api/v1/sandbox-configs/{id}/skills' \diff --git a/docs/docs.go b/docs/docs.goindex de2725d19..e51e472be 100644--- a/docs/docs.go+++ b/docs/docs.go@@ -6122,6 +6122,66 @@ const docTemplate = `{}}},+ "/knowledge-search": {+ "post": {+ "security": [+ {+ "Bearer": []+ },+ {+ "ApiKeyAuth": []+ }+ ],+ "description": "在知识库中搜索(不使用LLM总结)",+ "consumes": [+ "application/json"+ ],+ "produces": [+ "application/json"+ ],+ "tags": [+ "问答"+ ],+ "summary": "知识搜索",+ "parameters": [+ {+ "description": "搜索请求",+ "name": "request",+ "in": "body",+ "required": true,+ "schema": {+ "$ref": "#/definitions/internal_handler_session.SearchKnowledgeRequest"+ }+ },+ {+ "enum": [+ "handle",+ "public"+ ],+ "type": "string",+ "default": "handle",+ "description": "文件引用形式,public 返回可加载直链",+ "name": "resource_urls",+ "in": "query"+ }+ ],+ "responses": {+ "200": {+ "description": "搜索结果",+ "schema": {+ "type": "object",+ "additionalProperties": true+ }+ },+ "400": {+ "description": "请求参数错误",+ "schema": {+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"+ }+ }+ }+ }+ },"/knowledge/batch": {"get": {"security": [@@ -6594,14 +6654,17 @@ const docTemplate = `{"in": "query"},{+ "minimum": 0,"type": "integer",- "description": "Offset for pagination",+ "description": "Offset for pagination (minimum 0)","name": "offset","in": "query"},{+ "maximum": 100,+ "minimum": 1,"type": "integer",- "description": "Limit for pagination (default 20)",+ "description": "Limit for pagination (default 20, maximum 100)","name": "limit","in": "query"},@@ -6751,7 +6814,7 @@ const docTemplate = `{"ApiKeyAuth": []}],- "description": "更新知识条目信息",+ "description": "部分更新知识条目(标题/描述/自定义元数据);未传字段保持不变,显式传空 description 可清空摘要","consumes": ["application/json"],@@ -6771,12 +6834,12 @@ const docTemplate = `{"required": true},{- "description": "知识信息",+ "description": "更新字段(均可选)","name": "request","in": "body","required": true,"schema": {- "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.Knowledge"+ "$ref": "#/definitions/internal_handler.UpdateKnowledgeRequest"}}],@@ -9051,30 +9114,24 @@ const docTemplate = `{}}},- "/messages/chat-history-stats": {- "get": {+ "/memory/consolidate": {+ "post": {"security": [{"Bearer": []- },- {- "ApiKeyAuth": []}],- "description": "获取聊天历史知识库的统计信息(已索引消息数、知识库大小等)",- "consumes": [- "application/json"- ],+ "description": "合并意思接近的条目、归档到期事项,不等待每日后台整理","produces": ["application/json"],"tags": [- "消息"+ "长期记忆"],- "summary": "获取聊天历史知识库统计",+ "summary": "立刻整理我的记忆","responses": {"200": {- "description": "统计信息",+ "description": "整理结果","schema": {"type": "object","additionalProperties": true@@ -9083,214 +9140,157 @@ const docTemplate = `{}}},- "/messages/search": {- "post": {+ "/memory/documents": {+ "get": {"security": [{"Bearer": []- },- {- "ApiKeyAuth": []}],- "description": "通过关键词和/或向量相似度搜索历史对话记录,支持关键词、向量、混合三种模式",- "consumes": [- "application/json"- ],+ "description": "返回当前用户回答里反复引用的文档,次数未达习惯门槛的不展示","produces": ["application/json"],"tags": [- "消息"+ "长期记忆"],- "summary": "搜索历史对话",+ "summary": "列出常用资料","parameters": [{- "description": "搜索请求",- "name": "request",- "in": "body",- "required": true,- "schema": {- "$ref": "#/definitions/internal_handler.SearchMessagesRequest"- }+ "type": "integer",+ "default": 50,+ "description": "每页条数",+ "name": "limit",+ "in": "query"+ },+ {+ "type": "integer",+ "description": "偏移量",+ "name": "offset",+ "in": "query"}],"responses": {"200": {- "description": "搜索结果",+ "description": "文档列表","schema": {"type": "object","additionalProperties": true}- },- "400": {- "description": "请求参数错误",- "schema": {- "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"- }}}}},- "/messages/{session_id}/load": {- "get": {+ "/memory/documents/{id}": {+ "delete": {"security": [{"Bearer": []- },- {- "ApiKeyAuth": []}],- "description": "加载会话的消息历史,支持分页和时间筛选",- "consumes": [- "application/json"- ],+ "description": "删除一条文档亲和度计数,之后检索不再因为这份文档而加权","produces": ["application/json"],"tags": [- "消息"+ "长期记忆"],- "summary": "加载消息历史",+ "summary": "停止用某份文档做个性化检索","parameters": [{"type": "string",- "description": "会话ID",- "name": "session_id",+ "description": "亲和度 ID",+ "name": "id","in": "path","required": true- },- {- "type": "integer",- "default": 20,- "description": "返回数量",- "name": "limit",- "in": "query"- },- {- "type": "string",- "description": "在此时间之前的消息(RFC3339Nano格式)",- "name": "before_time",- "in": "query"- },- {- "enum": [- "handle",- "public"- ],- "type": "string",- "default": "handle",- "description": "文件引用形式,public 返回可加载直链",- "name": "resource_urls",- "in": "query"}],"responses": {"200": {- "description": "消息列表",+ "description": "删除成功","schema": {"type": "object","additionalProperties": true}- },- "400": {- "description": "请求参数错误",- "schema": {- "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"- }}}}},- "/messages/{session_id}/{id}": {- "delete": {+ "/memory/export": {+ "get": {"security": [{"Bearer": []- },- {- "ApiKeyAuth": []}],- "description": "从会话中删除指定消息",- "consumes": [- "application/json"- ],+ "description": "以 JSON 导出当前用户的全部记忆","produces": ["application/json"],"tags": [- "消息"- ],- "summary": "删除消息",- "parameters": [- {- "type": "string",- "description": "会话ID",- "name": "session_id",- "in": "path",- "required": true- },- {- "type": "string",- "description": "消息ID",- "name": "id",- "in": "path",- "required": true- }+ "长期记忆"],+ "summary": "导出我的记忆","responses": {"200": {- "description": "删除成功",+ "description": "记忆导出","schema": {"type": "object","additionalProperties": true}- },- "500": {- "description": "服务器错误",- "schema": {- "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"- }}}}},- "/models": {+ "/memory/items": {"get": {"security": [{"Bearer": []- },- {- "ApiKeyAuth": []}],- "description": "获取当前空间的所有模型",- "consumes": [- "application/json"- ],+ "description": "分页返回当前用户的记忆条目,可按状态过滤","produces": ["application/json"],"tags": [- "模型管理"+ "长期记忆"+ ],+ "summary": "列出我的记忆",+ "parameters": [+ {+ "enum": [+ "active",+ "superseded",+ "archived",+ "pending"+ ],+ "type": "string",+ "description": "状态过滤",+ "name": "status",+ "in": "query"+ },+ {+ "type": "integer",+ "default": 50,+ "description": "每页条数",+ "name": "limit",+ "in": "query"+ },+ {+ "type": "integer",+ "description": "偏移量",+ "name": "offset",+ "in": "query"+ }],- "summary": "获取模型列表","responses": {"200": {- "description": "模型列表",+ "description": "记忆列表","schema": {"type": "object","additionalProperties": true}- },- "400": {- "description": "请求参数错误",- "schema": {- "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"- }}}},@@ -9298,12 +9298,9 @@ const docTemplate = `{"security": [{"Bearer": []- },- {- "ApiKeyAuth": []}],- "description": "创建新的模型配置",+ "description": "手动添加一条长期记忆","consumes": ["application/json"],@@ -9311,69 +9308,47 @@ const docTemplate = `{"application/json"],"tags": [- "模型管理"+ "长期记忆"],- "summary": "创建模型",+ "summary": "新增一条记忆","parameters": [{- "description": "模型信息",+ "description": "记忆内容","name": "request","in": "body","required": true,"schema": {- "$ref": "#/definitions/internal_handler.CreateModelRequest"+ "type": "object"}}],"responses": {- "201": {- "description": "创建的模型",+ "200": {+ "description": "新增的记忆","schema": {"type": "object","additionalProperties": true}- },- "400": {- "description": "请求参数错误",- "schema": {- "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"- }}}- }- },- "/models/providers": {- "get": {+ },+ "delete": {"security": [{"Bearer": []- },- {- "ApiKeyAuth": []}],- "description": "根据模型类型获取支持的厂商列表及配置信息",- "consumes": [- "application/json"- ],+ "description": "永久删除当前用户的全部记忆","produces": ["application/json"],"tags": [- "模型管理"- ],- "summary": "获取模型厂商列表",- "parameters": [- {- "type": "string",- "description": "模型类型 (chat, embedding, rerank, vllm)",- "name": "model_type",- "in": "query"- }+ "长期记忆"],+ "summary": "清空我的记忆","responses": {"200": {- "description": "厂商列表",+ "description": "清空成功","schema": {"type": "object","additionalProperties": true@@ -9382,67 +9357,70 @@ const docTemplate = `{}}},- "/models/weknoracloud/status": {- "get": {+ "/memory/items/{id}": {+ "put": {"security": [{"Bearer": []- },- {- "ApiKeyAuth": []}],- "description": "检查当前空间的 WeKnoraCloud 凭证是否完好;needs_reinit=true 表示需要重新保存",+ "description": "修改记忆内容与重要度,修改后该条记忆不会被后台抽取覆盖",+ "consumes": [+ "application/json"+ ],"produces": ["application/json"],"tags": [- "WeKnoraCloud"+ "长期记忆"],- "summary": "检查 WeKnoraCloud 凭证状态",- "responses": {- "200": {- "description": "凭证状态",+ "summary": "修改一条记忆",+ "parameters": [+ {+ "type": "string",+ "description": "记忆ID",+ "name": "id",+ "in": "path",+ "required": true+ },+ {+ "description": "记忆内容",+ "name": "request",+ "in": "body",+ "required": true,"schema": {- "type": "object",- "additionalProperties": true+ "type": "object"}- },- "500": {- "description": "服务器错误",+ }+ ],+ "responses": {+ "200": {+ "description": "更新后的记忆","schema": {"type": "object","additionalProperties": true}}}- }- },- "/models/{id}": {- "get": {+ },+ "delete": {"security": [{"Bearer": []- },- {- "ApiKeyAuth": []}],- "description": "根据ID获取模型详情",- "consumes": [- "application/json"- ],+ "description": "永久删除一条记忆","produces": ["application/json"],"tags": [- "模型管理"+ "长期记忆"],- "summary": "获取模型详情",+ "summary": "删除一条记忆","parameters": [{"type": "string",- "description": "模型ID",+ "description": "记忆ID","name": "id","in": "path","required": true@@ -9450,98 +9428,69 @@ const docTemplate = `{],"responses": {"200": {- "description": "模型详情",+ "description": "删除成功","schema": {"type": "object","additionalProperties": true}- },- "404": {- "description": "模型不存在",- "schema": {- "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"- }}}- },- "put": {+ }+ },+ "/memory/items/{id}/confirm": {+ "post": {"security": [{"Bearer": []- },- {- "ApiKeyAuth": []}],- "description": "更新模型配置信息",- "consumes": [- "application/json"- ],+ "description": "接受系统推断的记忆,使其开始生效","produces": ["application/json"],"tags": [- "模型管理"+ "长期记忆"],- "summary": "更新模型",+ "summary": "确认一条推断出的记忆","parameters": [{"type": "string",- "description": "模型ID",+ "description": "记忆 ID","name": "id","in": "path","required": true- },- {- "description": "更新信息",- "name": "request",- "in": "body",- "required": true,- "schema": {- "$ref": "#/definitions/internal_handler.UpdateModelRequest"- }}],"responses": {"200": {- "description": "更新后的模型",+ "description": "确认成功","schema": {"type": "object","additionalProperties": true}- },- "404": {- "description": "模型不存在",- "schema": {- "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"- }}}- },- "delete": {+ }+ },+ "/memory/items/{id}/reject": {+ "post": {"security": [{"Bearer": []- },- {- "ApiKeyAuth": []}],- "description": "删除指定的模型",- "consumes": [- "application/json"- ],+ "description": "拒绝系统推断的记忆,并记住这次拒绝","produces": ["application/json"],"tags": [- "模型管理"+ "长期记忆"],- "summary": "删除模型",+ "summary": "否决一条推断出的记忆","parameters": [{"type": "string",- "description": "模型ID",+ "description": "记忆 ID","name": "id","in": "path","required": true@@ -9549,52 +9498,47 @@ const docTemplate = `{],"responses": {"200": {- "description": "删除成功",+ "description": "否决成功","schema": {"type": "object","additionalProperties": true}- },- "404": {- "description": "模型不存在",- "schema": {- "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"- }}}}},- "/organizations": {+ "/memory/settings": {"get": {"security": [{"Bearer": []}],- "description": "获取当前空间所属的所有组织,并附带各空间内知识库/智能体数量",+ "description": "返回合并后的记忆开关状态(空间级 + 个人级)与记忆条数","produces": ["application/json"],"tags": [- "组织管理"+ "长期记忆"],- "summary": "获取我的组织列表",+ "summary": "获取我的记忆设置","responses": {"200": {- "description": "OK",+ "description": "记忆设置","schema": {- "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.ListOrganizationsResponse"+ "type": "object",+ "additionalProperties": true}}}},- "post": {+ "put": {"security": [{"Bearer": []}],- "description": "创建新的组织,创建者自动成为管理员",+ "description": "开启或关闭当前用户自己的长期记忆","consumes": ["application/json"],@@ -9602,304 +9546,305 @@ const docTemplate = `{"application/json"],"tags": [- "组织管理"+ "长期记忆"],- "summary": "创建组织",+ "summary": "更新我的记忆设置","parameters": [{- "description": "组织信息",+ "description": "设置","name": "request","in": "body","required": true,"schema": {- "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.CreateOrganizationRequest"+ "type": "object"}}],"responses": {- "201": {- "description": "Created",+ "200": {+ "description": "更新后的设置","schema": {"type": "object","additionalProperties": true}- },- "400": {- "description": "Bad Request",- "schema": {- "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"- }}}}},- "/organizations/join": {- "post": {+ "/memory/topics": {+ "get": {"security": [{"Bearer": []}],- "description": "使用邀请码加入组织",- "consumes": [- "application/json"- ],+ "description": "返回已计数、尚未提升为长期关注的主题,以及距离阈值还差几次","produces": ["application/json"],"tags": [- "组织管理"+ "长期记忆"],- "summary": "通过邀请码加入组织",+ "summary": "列出正在观察的主题","parameters": [{- "description": "邀请码",- "name": "request",- "in": "body",- "required": true,- "schema": {- "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.JoinOrganizationRequest"- }+ "type": "integer",+ "default": 50,+ "description": "每页条数",+ "name": "limit",+ "in": "query"+ },+ {+ "type": "integer",+ "description": "偏移量",+ "name": "offset",+ "in": "query"}],"responses": {"200": {- "description": "OK",+ "description": "主题列表","schema": {"type": "object","additionalProperties": true}- },- "404": {- "description": "Not Found",- "schema": {- "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"- }}}}},- "/organizations/join-by-id": {- "post": {+ "/memory/topics/{id}": {+ "delete": {"security": [{"Bearer": []}],- "description": "加入已开放可被搜索的空间,无需邀请码",- "consumes": [- "application/json"- ],+ "description": "删除尚未提升的主题计数,并记住这次拒绝,之后不会再自动记为长期关注","produces": ["application/json"],"tags": [- "组织管理"+ "长期记忆"],- "summary": "通过空间 ID 加入(可搜索空间)",+ "summary": "停止跟踪一个主题","parameters": [{- "description": "空间 ID",- "name": "request",- "in": "body",- "required": true,- "schema": {- "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.JoinByOrganizationIDRequest"- }+ "type": "string",+ "description": "主题 ID",+ "name": "id",+ "in": "path",+ "required": true}],"responses": {"200": {- "description": "OK",+ "description": "删除成功","schema": {"type": "object","additionalProperties": true}- },- "403": {- "description": "Forbidden",- "schema": {- "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"- }}}}},- "/organizations/join-request": {+ "/memory/topics/{id}/promote": {"post": {"security": [{"Bearer": []}],- "description": "对需要审核的组织提交加入申请",- "consumes": [- "application/json"- ],+ "description": "不等待剩余次数,把正在观察的主题提升为一条长期关注记忆","produces": ["application/json"],"tags": [- "组织管理"+ "长期记忆"],- "summary": "提交加入申请",+ "summary": "立即记为长期关注","parameters": [{- "description": "申请信息",- "name": "request",- "in": "body",- "required": true,- "schema": {- "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.SubmitJoinRequestRequest"- }+ "type": "string",+ "description": "主题 ID",+ "name": "id",+ "in": "path",+ "required": true}],"responses": {"200": {- "description": "OK",+ "description": "新增的记忆","schema": {"type": "object","additionalProperties": true}- },- "400": {- "description": "Bad Request",- "schema": {- "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"- }}}}},- "/organizations/preview/{code}": {+ "/messages/chat-history-stats": {"get": {"security": [{"Bearer": []+ },+ {+ "ApiKeyAuth": []}],- "description": "通过邀请码获取组织基本信息(不加入)",+ "description": "获取聊天历史知识库的统计信息(已索引消息数、知识库大小等)",+ "consumes": [+ "application/json"+ ],"produces": ["application/json"],"tags": [- "组织管理"- ],- "summary": "通过邀请码预览组织",- "parameters": [- {- "type": "string",- "description": "邀请码",- "name": "code",- "in": "path",- "required": true- }+ "消息"],+ "summary": "获取聊天历史知识库统计","responses": {"200": {- "description": "OK",+ "description": "统计信息","schema": {"type": "object","additionalProperties": true}- },- "404": {- "description": "Not Found",- "schema": {- "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"- }}}}},- "/organizations/search": {- "get": {+ "/messages/search": {+ "post": {"security": [{"Bearer": []+ },+ {+ "ApiKeyAuth": []}],- "description": "搜索已开放可被搜索的空间,用于发现并加入",+ "description": "通过关键词和/或向量相似度搜索历史对话记录,支持关键词、向量、混合三种模式",+ "consumes": [+ "application/json"+ ],"produces": ["application/json"],"tags": [- "组织管理"+ "消息"],- "summary": "搜索可加入的空间",+ "summary": "搜索历史对话","parameters": [{- "type": "string",- "description": "搜索关键词(空间名称或描述)",- "name": "q",- "in": "query"- },- {- "type": "integer",- "default": 20,- "description": "返回数量限制",- "name": "limit",- "in": "query"+ "description": "搜索请求",+ "name": "request",+ "in": "body",+ "required": true,+ "schema": {+ "$ref": "#/definitions/internal_handler.SearchMessagesRequest"+ }}],"responses": {"200": {- "description": "OK",+ "description": "搜索结果","schema": {"type": "object","additionalProperties": true}+ },+ "400": {+ "description": "请求参数错误",+ "schema": {+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"+ }}}}},- "/organizations/{id}": {+ "/messages/{session_id}/load": {"get": {"security": [{"Bearer": []+ },+ {+ "ApiKeyAuth": []}],- "description": "根据ID获取组织详情",+ "description": "加载会话的消息历史,支持分页和时间筛选",+ "consumes": [+ "application/json"+ ],"produces": ["application/json"],"tags": [- "组织管理"+ "消息"],- "summary": "获取组织详情",+ "summary": "加载消息历史","parameters": [{"type": "string",- "description": "组织ID",- "name": "id",+ "description": "会话ID",+ "name": "session_id","in": "path","required": true+ },+ {+ "type": "integer",+ "default": 20,+ "description": "返回数量",+ "name": "limit",+ "in": "query"+ },+ {+ "type": "string",+ "description": "在此时间之前的消息(RFC3339Nano格式)",+ "name": "before_time",+ "in": "query"+ },+ {+ "enum": [+ "handle",+ "public"+ ],+ "type": "string",+ "default": "handle",+ "description": "文件引用形式,public 返回可加载直链",+ "name": "resource_urls",+ "in": "query"}],"responses": {"200": {- "description": "OK",+ "description": "消息列表","schema": {"type": "object","additionalProperties": true}},- "404": {- "description": "Not Found",+ "400": {+ "description": "请求参数错误","schema": {"$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"}}}- },- "put": {+ }+ },+ "/messages/{session_id}/{id}": {+ "delete": {"security": [{"Bearer": []+ },+ {+ "ApiKeyAuth": []}],- "description": "更新组织信息(需要管理员权限)",+ "description": "从会话中删除指定消息","consumes": ["application/json"],@@ -9907,58 +9852,20 @@ const docTemplate = `{"application/json"],"tags": [- "组织管理"+ "消息"],- "summary": "更新组织",+ "summary": "删除消息","parameters": [{"type": "string",- "description": "组织ID",- "name": "id",+ "description": "会话ID",+ "name": "session_id","in": "path","required": true},- {- "description": "更新信息",- "name": "request",- "in": "body",- "required": true,- "schema": {- "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.UpdateOrganizationRequest"- }- }- ],- "responses": {- "200": {- "description": "OK",- "schema": {- "type": "object",- "additionalProperties": true- }- },- "403": {- "description": "Forbidden",- "schema": {- "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"- }- }- }- },- "delete": {- "security": [- {- "Bearer": []- }- ],- "description": "删除组织(仅组织创建者可操作)",- "tags": [- "组织管理"- ],- "summary": "删除组织",- "parameters": [{"type": "string",- "description": "组织ID",+ "description": "消息ID","name": "id","in": "path","required": true@@ -9966,14 +9873,14 @@ const docTemplate = `{],"responses": {"200": {- "description": "OK",+ "description": "删除成功","schema": {"type": "object","additionalProperties": true}},- "403": {- "description": "Forbidden",+ "500": {+ "description": "服务器错误","schema": {"$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"}@@ -9981,7 +9888,7 @@ const docTemplate = `{}}},- "/organizations/{id}/agent-shares": {+ "/models": {"get": {"security": [{@@ -9991,48 +9898,43 @@ const docTemplate = `{"ApiKeyAuth": []}],- "description": "返回所有被共享到指定组织的智能体(含我的有效权限)",+ "description": "获取当前空间的所有模型",+ "consumes": [+ "application/json"+ ],"produces": ["application/json"],"tags": [- "组织"- ],- "summary": "获取共享到本组织的智能体",- "parameters": [- {- "type": "string",- "description": "组织 ID",- "name": "id",- "in": "path",- "required": true- }+ "模型管理"],+ "summary": "获取模型列表","responses": {"200": {- "description": "智能体共享列表 + total",+ "description": "模型列表","schema": {"type": "object","additionalProperties": true}},- "403": {- "description": "非组织成员",+ "400": {+ "description": "请求参数错误","schema": {"$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"}}}- }- },- "/organizations/{id}/invite": {+ },"post": {"security": [{"Bearer": []+ },+ {+ "ApiKeyAuth": []}],- "description": "管理员直接添加用户为组织成员",+ "description": "创建新的模型配置","consumes": ["application/json"],@@ -10040,43 +9942,30 @@ const docTemplate = `{"application/json"],"tags": [- "组织管理"+ "模型管理"],- "summary": "邀请成员",+ "summary": "创建模型","parameters": [{- "type": "string",- "description": "组织ID",- "name": "id",- "in": "path",- "required": true- },- {- "description": "邀请信息",+ "description": "模型信息","name": "request","in": "body","required": true,"schema": {- "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.InviteMemberRequest"+ "$ref": "#/definitions/internal_handler.CreateModelRequest"}}],"responses": {- "200": {- "description": "OK",+ "201": {+ "description": "创建的模型","schema": {"type": "object","additionalProperties": true}},"400": {- "description": "Bad Request",- "schema": {- "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"- }- },- "403": {- "description": "Forbidden",+ "description": "请求参数错误","schema": {"$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"}@@ -10084,66 +9973,107 @@ const docTemplate = `{}}},- "/organizations/{id}/invite-code": {- "post": {+ "/models/providers": {+ "get": {"security": [{"Bearer": []+ },+ {+ "ApiKeyAuth": []}],- "description": "生成新的组织邀请码(需要管理员权限)",+ "description": "根据模型类型获取支持的厂商列表及配置信息",+ "consumes": [+ "application/json"+ ],"produces": ["application/json"],"tags": [- "组织管理"+ "模型管理"],- "summary": "生成邀请码",+ "summary": "获取模型厂商列表","parameters": [{"type": "string",- "description": "组织ID",- "name": "id",- "in": "path",- "required": true+ "description": "模型类型 (chat, embedding, rerank, vllm)",+ "name": "model_type",+ "in": "query"}],"responses": {"200": {- "description": "OK",+ "description": "厂商列表","schema": {"type": "object","additionalProperties": true}+ }+ }+ }+ },+ "/models/weknoracloud/status": {+ "get": {+ "security": [+ {+ "Bearer": []},- "403": {- "description": "Forbidden",+ {+ "ApiKeyAuth": []+ }+ ],+ "description": "检查当前空间的 WeKnoraCloud 凭证是否完好;needs_reinit=true 表示需要重新保存",+ "produces": [+ "application/json"+ ],+ "tags": [+ "WeKnoraCloud"+ ],+ "summary": "检查 WeKnoraCloud 凭证状态",+ "responses": {+ "200": {+ "description": "凭证状态","schema": {- "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"+ "type": "object",+ "additionalProperties": true+ }+ },+ "500": {+ "description": "服务器错误",+ "schema": {+ "type": "object",+ "additionalProperties": true}}}}},- "/organizations/{id}/join-requests": {+ "/models/{id}": {"get": {"security": [{"Bearer": []+ },+ {+ "ApiKeyAuth": []}],- "description": "获取组织的待审核加入申请(仅管理员)",+ "description": "根据ID获取模型详情",+ "consumes": [+ "application/json"+ ],"produces": ["application/json"],"tags": [- "组织管理"+ "模型管理"],- "summary": "获取待审核加入申请列表",+ "summary": "获取模型详情","parameters": [{"type": "string",- "description": "组织ID",+ "description": "模型ID","name": "id","in": "path","required": true@@ -10151,29 +10081,30 @@ const docTemplate = `{],"responses": {"200": {- "description": "OK",+ "description": "模型详情","schema": {"type": "object","additionalProperties": true}},- "403": {- "description": "Forbidden",+ "404": {+ "description": "模型不存在","schema": {"$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"}}}- }- },- "/organizations/{id}/join-requests/{request_id}/review": {+ },"put": {"security": [{"Bearer": []+ },+ {+ "ApiKeyAuth": []}],- "description": "通过或拒绝加入申请(仅管理员)",+ "description": "更新模型配置信息","consumes": ["application/json"],@@ -10181,67 +10112,67 @@ const docTemplate = `{"application/json"],"tags": [- "组织管理"+ "模型管理"],- "summary": "审核加入申请",+ "summary": "更新模型","parameters": [{"type": "string",- "description": "组织ID",+ "description": "模型ID","name": "id","in": "path","required": true},{- "type": "string",- "description": "申请ID",- "name": "request_id",- "in": "path",- "required": true- },- {- "description": "审核结果",+ "description": "更新信息","name": "request","in": "body","required": true,"schema": {- "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.ReviewJoinRequestRequest"+ "$ref": "#/definitions/internal_handler.UpdateModelRequest"}}],"responses": {"200": {- "description": "OK",+ "description": "更新后的模型","schema": {"type": "object","additionalProperties": true}},- "403": {- "description": "Forbidden",+ "404": {+ "description": "模型不存在","schema": {"$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"}}}- }- },- "/organizations/{id}/leave": {- "post": {+ },+ "delete": {"security": [{"Bearer": []+ },+ {+ "ApiKeyAuth": []}],- "description": "退出指定组织",+ "description": "删除指定的模型",+ "consumes": [+ "application/json"+ ],+ "produces": [+ "application/json"+ ],"tags": [- "组织管理"+ "模型管理"],- "summary": "退出组织",+ "summary": "删除模型","parameters": [{"type": "string",- "description": "组织ID",+ "description": "模型ID","name": "id","in": "path","required": true@@ -10249,14 +10180,14 @@ const docTemplate = `{],"responses": {"200": {- "description": "OK",+ "description": "删除成功","schema": {"type": "object","additionalProperties": true}},- "403": {- "description": "Forbidden",+ "404": {+ "description": "模型不存在","schema": {"$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"}@@ -10264,48 +10195,37 @@ const docTemplate = `{}}},- "/organizations/{id}/members": {+ "/organizations": {"get": {"security": [{"Bearer": []}],- "description": "获取组织的所有成员(按空间)",+ "description": "获取当前空间所属的所有组织,并附带各空间内知识库/智能体数量","produces": ["application/json"],"tags": ["组织管理"],- "summary": "获取组织成员列表",- "parameters": [- {- "type": "string",- "description": "组织ID",- "name": "id",- "in": "path",- "required": true- }- ],+ "summary": "获取我的组织列表","responses": {"200": {"description": "OK","schema": {- "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.ListMembersResponse"+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.ListOrganizationsResponse"}}}- }- },- "/organizations/{id}/members/{tenant_id}": {- "put": {+ },+ "post": {"security": [{"Bearer": []}],- "description": "更新组织成员(空间)的角色(需要管理员权限)",+ "description": "创建新的组织,创建者自动成为管理员","consumes": ["application/json"],@@ -10315,73 +10235,62 @@ const docTemplate = `{"tags": ["组织管理"],- "summary": "更新成员角色",+ "summary": "创建组织","parameters": [{- "type": "string",- "description": "组织ID",- "name": "id",- "in": "path",- "required": true- },- {- "type": "string",- "description": "成员空间ID",- "name": "tenant_id",- "in": "path",- "required": true- },- {- "description": "角色信息",+ "description": "组织信息","name": "request","in": "body","required": true,"schema": {- "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.UpdateMemberRoleRequest"+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.CreateOrganizationRequest"}}],"responses": {- "200": {- "description": "OK",+ "201": {+ "description": "Created","schema": {"type": "object","additionalProperties": true}},- "403": {- "description": "Forbidden",+ "400": {+ "description": "Bad Request","schema": {"$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"}}}- },- "delete": {+ }+ },+ "/organizations/join": {+ "post": {"security": [{"Bearer": []}],- "description": "从组织中移除成员空间(需要管理员权限)",+ "description": "使用邀请码加入组织",+ "consumes": [+ "application/json"+ ],+ "produces": [+ "application/json"+ ],"tags": ["组织管理"],- "summary": "移除成员",+ "summary": "通过邀请码加入组织","parameters": [{- "type": "string",- "description": "组织ID",- "name": "id",- "in": "path",- "required": true- },- {- "type": "string",- "description": "成员空间ID",- "name": "tenant_id",- "in": "path",- "required": true+ "description": "邀请码",+ "name": "request",+ "in": "body",+ "required": true,+ "schema": {+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.JoinOrganizationRequest"+ }}],"responses": {@@ -10392,8 +10301,8 @@ const docTemplate = `{"additionalProperties": true}},- "403": {- "description": "Forbidden",+ "404": {+ "description": "Not Found","schema": {"$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"}@@ -10401,14 +10310,14 @@ const docTemplate = `{}}},- "/organizations/{id}/request-upgrade": {+ "/organizations/join-by-id": {"post": {"security": [{"Bearer": []}],- "description": "现有成员申请更高权限",+ "description": "加入已开放可被搜索的空间,无需邀请码","consumes": ["application/json"],@@ -10418,22 +10327,15 @@ const docTemplate = `{"tags": ["组织管理"],- "summary": "申请权限升级",+ "summary": "通过空间 ID 加入(可搜索空间)","parameters": [{- "type": "string",- "description": "组织ID",- "name": "id",- "in": "path",- "required": true- },- {- "description": "申请信息",+ "description": "空间 ID","name": "request","in": "body","required": true,"schema": {- "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.RequestRoleUpgradeRequest"+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.JoinByOrganizationIDRequest"}}],@@ -10445,8 +10347,8 @@ const docTemplate = `{"additionalProperties": true}},- "400": {- "description": "Bad Request",+ "403": {+ "description": "Forbidden","schema": {"$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"}@@ -10454,42 +10356,74 @@ const docTemplate = `{}}},- "/organizations/{id}/search-tenants": {- "get": {+ "/organizations/join-request": {+ "post": {"security": [{"Bearer": []}],- "description": "按空间名搜索可邀请的空间(排除已加入的空间)用于邀请加入组织;按空间去重",+ "description": "对需要审核的组织提交加入申请",+ "consumes": [+ "application/json"+ ],"produces": ["application/json"],"tags": ["组织管理"],- "summary": "搜索可邀请的空间",+ "summary": "提交加入申请","parameters": [{- "type": "string",- "description": "组织ID",- "name": "id",- "in": "path",- "required": true- },- {- "type": "string",- "description": "搜索关键词(空间名)",- "name": "q",- "in": "query",- "required": true- },+ "description": "申请信息",+ "name": "request",+ "in": "body",+ "required": true,+ "schema": {+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.SubmitJoinRequestRequest"+ }+ }+ ],+ "responses": {+ "200": {+ "description": "OK",+ "schema": {+ "type": "object",+ "additionalProperties": true+ }+ },+ "400": {+ "description": "Bad Request",+ "schema": {+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"+ }+ }+ }+ }+ },+ "/organizations/preview/{code}": {+ "get": {+ "security": [{- "type": "integer",- "default": 10,- "description": "返回数量限制",- "name": "limit",- "in": "query"+ "Bearer": []+ }+ ],+ "description": "通过邀请码获取组织基本信息(不加入)",+ "produces": [+ "application/json"+ ],+ "tags": [+ "组织管理"+ ],+ "summary": "通过邀请码预览组织",+ "parameters": [+ {+ "type": "string",+ "description": "邀请码",+ "name": "code",+ "in": "path",+ "required": true}],"responses": {@@ -10500,8 +10434,8 @@ const docTemplate = `{"additionalProperties": true}},- "403": {- "description": "Forbidden",+ "404": {+ "description": "Not Found","schema": {"$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"}@@ -10509,27 +10443,62 @@ const docTemplate = `{}}},- "/organizations/{id}/search-users": {+ "/organizations/search": {"get": {- "deprecated": true,- "responses": {}+ "security": [+ {+ "Bearer": []+ }+ ],+ "description": "搜索已开放可被搜索的空间,用于发现并加入",+ "produces": [+ "application/json"+ ],+ "tags": [+ "组织管理"+ ],+ "summary": "搜索可加入的空间",+ "parameters": [+ {+ "type": "string",+ "description": "搜索关键词(空间名称或描述)",+ "name": "q",+ "in": "query"+ },+ {+ "type": "integer",+ "default": 20,+ "description": "返回数量限制",+ "name": "limit",+ "in": "query"+ }+ ],+ "responses": {+ "200": {+ "description": "OK",+ "schema": {+ "type": "object",+ "additionalProperties": true+ }+ }+ }}},- "/organizations/{id}/shared-agents": {+ "/organizations/{id}": {"get": {"security": [{"Bearer": []}],- "description": "获取指定空间下所有共享智能体,包含他人共享的与我共享的,用于列表页空间视角",+ "description": "根据ID获取组织详情","produces": ["application/json"],"tags": ["组织管理"],- "summary": "获取空间内全部智能体(含我共享的)",+ "summary": "获取组织详情","parameters": [{"type": "string",@@ -10546,25 +10515,77 @@ const docTemplate = `{"type": "object","additionalProperties": true}+ },+ "404": {+ "description": "Not Found",+ "schema": {+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"+ }}}- }- },- "/organizations/{id}/shared-knowledge-bases": {- "get": {+ },+ "put": {"security": [{"Bearer": []}],- "description": "获取指定空间下所有共享知识库,包含直接共享的与通过共享智能体可见的,用于列表页空间视角",+ "description": "更新组织信息(需要管理员权限)",+ "consumes": [+ "application/json"+ ],"produces": ["application/json"],"tags": ["组织管理"],- "summary": "获取空间内全部知识库(含我共享的、含智能体携带的)",+ "summary": "更新组织",+ "parameters": [+ {+ "type": "string",+ "description": "组织ID",+ "name": "id",+ "in": "path",+ "required": true+ },+ {+ "description": "更新信息",+ "name": "request",+ "in": "body",+ "required": true,+ "schema": {+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.UpdateOrganizationRequest"+ }+ }+ ],+ "responses": {+ "200": {+ "description": "OK",+ "schema": {+ "type": "object",+ "additionalProperties": true+ }+ },+ "403": {+ "description": "Forbidden",+ "schema": {+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"+ }+ }+ }+ },+ "delete": {+ "security": [+ {+ "Bearer": []+ }+ ],+ "description": "删除组织(仅组织创建者可操作)",+ "tags": [+ "组织管理"+ ],+ "summary": "删除组织","parameters": [{"type": "string",@@ -10581,25 +10602,78 @@ const docTemplate = `{"type": "object","additionalProperties": true}+ },+ "403": {+ "description": "Forbidden",+ "schema": {+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"+ }}}}},- "/organizations/{id}/shares": {+ "/organizations/{id}/agent-shares": {"get": {"security": [{"Bearer": []+ },+ {+ "ApiKeyAuth": []}],- "description": "获取共享到指定组织的所有知识库",+ "description": "返回所有被共享到指定组织的智能体(含我的有效权限)",+ "produces": [+ "application/json"+ ],+ "tags": [+ "组织"+ ],+ "summary": "获取共享到本组织的智能体",+ "parameters": [+ {+ "type": "string",+ "description": "组织 ID",+ "name": "id",+ "in": "path",+ "required": true+ }+ ],+ "responses": {+ "200": {+ "description": "智能体共享列表 + total",+ "schema": {+ "type": "object",+ "additionalProperties": true+ }+ },+ "403": {+ "description": "非组织成员",+ "schema": {+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"+ }+ }+ }+ }+ },+ "/organizations/{id}/invite": {+ "post": {+ "security": [+ {+ "Bearer": []+ }+ ],+ "description": "管理员直接添加用户为组织成员",+ "consumes": [+ "application/json"+ ],"produces": ["application/json"],"tags": ["组织管理"],- "summary": "获取组织的共享知识库列表",+ "summary": "邀请成员","parameters": [{"type": "string",@@ -10607,19 +10681,899 @@ const docTemplate = `{"name": "id","in": "path","required": true+ },+ {+ "description": "邀请信息",+ "name": "request",+ "in": "body",+ "required": true,+ "schema": {+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.InviteMemberRequest"+ }}],"responses": {"200": {"description": "OK","schema": {- "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.ListSharesResponse"+ "type": "object",+ "additionalProperties": true+ }+ },+ "400": {+ "description": "Bad Request",+ "schema": {+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"+ }+ },+ "403": {+ "description": "Forbidden",+ "schema": {+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"+ }+ }+ }+ }+ },+ "/organizations/{id}/invite-code": {+ "post": {+ "security": [+ {+ "Bearer": []+ }+ ],+ "description": "生成新的组织邀请码(需要管理员权限)",+ "produces": [+ "application/json"+ ],+ "tags": [+ "组织管理"+ ],+ "summary": "生成邀请码",+ "parameters": [+ {+ "type": "string",+ "description": "组织ID",+ "name": "id",+ "in": "path",+ "required": true+ }+ ],+ "responses": {+ "200": {+ "description": "OK",+ "schema": {+ "type": "object",+ "additionalProperties": true+ }+ },+ "403": {+ "description": "Forbidden",+ "schema": {+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"+ }+ }+ }+ }+ },+ "/organizations/{id}/join-requests": {+ "get": {+ "security": [+ {+ "Bearer": []+ }+ ],+ "description": "获取组织的待审核加入申请(仅管理员)",+ "produces": [+ "application/json"+ ],+ "tags": [+ "组织管理"+ ],+ "summary": "获取待审核加入申请列表",+ "parameters": [+ {+ "type": "string",+ "description": "组织ID",+ "name": "id",+ "in": "path",+ "required": true+ }+ ],+ "responses": {+ "200": {+ "description": "OK",+ "schema": {+ "type": "object",+ "additionalProperties": true+ }+ },+ "403": {+ "description": "Forbidden",+ "schema": {+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"+ }+ }+ }+ }+ },+ "/organizations/{id}/join-requests/{request_id}/review": {+ "put": {+ "security": [+ {+ "Bearer": []+ }+ ],+ "description": "通过或拒绝加入申请(仅管理员)",+ "consumes": [+ "application/json"+ ],+ "produces": [+ "application/json"+ ],+ "tags": [+ "组织管理"+ ],+ "summary": "审核加入申请",+ "parameters": [+ {+ "type": "string",+ "description": "组织ID",+ "name": "id",+ "in": "path",+ "required": true+ },+ {+ "type": "string",+ "description": "申请ID",+ "name": "request_id",+ "in": "path",+ "required": true+ },+ {+ "description": "审核结果",+ "name": "request",+ "in": "body",+ "required": true,+ "schema": {+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.ReviewJoinRequestRequest"+ }+ }+ ],+ "responses": {+ "200": {+ "description": "OK",+ "schema": {+ "type": "object",+ "additionalProperties": true+ }+ },+ "403": {+ "description": "Forbidden",+ "schema": {+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"+ }+ }+ }+ }+ },+ "/organizations/{id}/leave": {+ "post": {+ "security": [+ {+ "Bearer": []+ }+ ],+ "description": "退出指定组织",+ "tags": [+ "组织管理"+ ],+ "summary": "退出组织",+ "parameters": [+ {+ "type": "string",+ "description": "组织ID",+ "name": "id",+ "in": "path",+ "required": true+ }+ ],+ "responses": {+ "200": {+ "description": "OK",+ "schema": {+ "type": "object",+ "additionalProperties": true+ }+ },+ "403": {+ "description": "Forbidden",+ "schema": {+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"+ }+ }+ }+ }+ },+ "/organizations/{id}/members": {+ "get": {+ "security": [+ {+ "Bearer": []+ }+ ],+ "description": "获取组织的所有成员(按空间)",+ "produces": [+ "application/json"+ ],+ "tags": [+ "组织管理"+ ],+ "summary": "获取组织成员列表",+ "parameters": [+ {+ "type": "string",+ "description": "组织ID",+ "name": "id",+ "in": "path",+ "required": true+ }+ ],+ "responses": {+ "200": {+ "description": "OK",+ "schema": {+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.ListMembersResponse"+ }+ }+ }+ }+ },+ "/organizations/{id}/members/{tenant_id}": {+ "put": {+ "security": [+ {+ "Bearer": []+ }+ ],+ "description": "更新组织成员(空间)的角色(需要管理员权限)",+ "consumes": [+ "application/json"+ ],+ "produces": [+ "application/json"+ ],+ "tags": [+ "组织管理"+ ],+ "summary": "更新成员角色",+ "parameters": [+ {+ "type": "string",+ "description": "组织ID",+ "name": "id",+ "in": "path",+ "required": true+ },+ {+ "type": "string",+ "description": "成员空间ID",+ "name": "tenant_id",+ "in": "path",+ "required": true+ },+ {+ "description": "角色信息",+ "name": "request",+ "in": "body",+ "required": true,+ "schema": {+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.UpdateMemberRoleRequest"+ }+ }+ ],+ "responses": {+ "200": {+ "description": "OK",+ "schema": {+ "type": "object",+ "additionalProperties": true+ }+ },+ "403": {+ "description": "Forbidden",+ "schema": {+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"+ }+ }+ }+ },+ "delete": {+ "security": [+ {+ "Bearer": []+ }+ ],+ "description": "从组织中移除成员空间(需要管理员权限)",+ "tags": [+ "组织管理"+ ],+ "summary": "移除成员",+ "parameters": [+ {+ "type": "string",+ "description": "组织ID",+ "name": "id",+ "in": "path",+ "required": true+ },+ {+ "type": "string",+ "description": "成员空间ID",+ "name": "tenant_id",+ "in": "path",+ "required": true+ }+ ],+ "responses": {+ "200": {+ "description": "OK",+ "schema": {+ "type": "object",+ "additionalProperties": true+ }+ },+ "403": {+ "description": "Forbidden",+ "schema": {+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"+ }+ }+ }+ }+ },+ "/organizations/{id}/request-upgrade": {+ "post": {+ "security": [+ {+ "Bearer": []+ }+ ],+ "description": "现有成员申请更高权限",+ "consumes": [+ "application/json"+ ],+ "produces": [+ "application/json"+ ],+ "tags": [+ "组织管理"+ ],+ "summary": "申请权限升级",+ "parameters": [+ {+ "type": "string",+ "description": "组织ID",+ "name": "id",+ "in": "path",+ "required": true+ },+ {+ "description": "申请信息",+ "name": "request",+ "in": "body",+ "required": true,+ "schema": {+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.RequestRoleUpgradeRequest"+ }+ }+ ],+ "responses": {+ "200": {+ "description": "OK",+ "schema": {+ "type": "object",+ "additionalProperties": true+ }+ },+ "400": {+ "description": "Bad Request",+ "schema": {+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"+ }+ }+ }+ }+ },+ "/organizations/{id}/search-tenants": {+ "get": {+ "security": [+ {+ "Bearer": []+ }+ ],+ "description": "按空间名搜索可邀请的空间(排除已加入的空间)用于邀请加入组织;按空间去重",+ "produces": [+ "application/json"+ ],+ "tags": [+ "组织管理"+ ],+ "summary": "搜索可邀请的空间",+ "parameters": [+ {+ "type": "string",+ "description": "组织ID",+ "name": "id",+ "in": "path",+ "required": true+ },+ {+ "type": "string",+ "description": "搜索关键词(空间名)",+ "name": "q",+ "in": "query",+ "required": true+ },+ {+ "type": "integer",+ "default": 10,+ "description": "返回数量限制",+ "name": "limit",+ "in": "query"+ }+ ],+ "responses": {+ "200": {+ "description": "OK",+ "schema": {+ "type": "object",+ "additionalProperties": true+ }+ },+ "403": {+ "description": "Forbidden",+ "schema": {+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"+ }+ }+ }+ }+ },+ "/organizations/{id}/search-users": {+ "get": {+ "deprecated": true,+ "responses": {}+ }+ },+ "/organizations/{id}/shared-agents": {+ "get": {+ "security": [+ {+ "Bearer": []+ }+ ],+ "description": "获取指定空间下所有共享智能体,包含他人共享的与我共享的,用于列表页空间视角",+ "produces": [+ "application/json"+ ],+ "tags": [+ "组织管理"+ ],+ "summary": "获取空间内全部智能体(含我共享的)",+ "parameters": [+ {+ "type": "string",+ "description": "组织ID",+ "name": "id",+ "in": "path",+ "required": true+ }+ ],+ "responses": {+ "200": {+ "description": "OK",+ "schema": {+ "type": "object",+ "additionalProperties": true+ }+ }+ }+ }+ },+ "/organizations/{id}/shared-knowledge-bases": {+ "get": {+ "security": [+ {+ "Bearer": []+ }+ ],+ "description": "获取指定空间下所有共享知识库,包含直接共享的与通过共享智能体可见的,用于列表页空间视角",+ "produces": [+ "application/json"+ ],+ "tags": [+ "组织管理"+ ],+ "summary": "获取空间内全部知识库(含我共享的、含智能体携带的)",+ "parameters": [+ {+ "type": "string",+ "description": "组织ID",+ "name": "id",+ "in": "path",+ "required": true+ }+ ],+ "responses": {+ "200": {+ "description": "OK",+ "schema": {+ "type": "object",+ "additionalProperties": true+ }+ }+ }+ }+ },+ "/organizations/{id}/shares": {+ "get": {+ "security": [+ {+ "Bearer": []+ }+ ],+ "description": "获取共享到指定组织的所有知识库",+ "produces": [+ "application/json"+ ],+ "tags": [+ "组织管理"+ ],+ "summary": "获取组织的共享知识库列表",+ "parameters": [+ {+ "type": "string",+ "description": "组织ID",+ "name": "id",+ "in": "path",+ "required": true+ }+ ],+ "responses": {+ "200": {+ "description": "OK",+ "schema": {+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.ListSharesResponse"+ }+ }+ }+ }+ },+ "/sandbox-configs": {+ "get": {+ "security": [+ {+ "Bearer": []+ },+ {+ "ApiKeyAuth": []+ }+ ],+ "description": "List workspace sandbox backend configs with credentials masked.",+ "produces": [+ "application/json"+ ],+ "tags": [+ "SandboxConfig"+ ],+ "summary": "List sandbox configs",+ "responses": {+ "200": {+ "description": "Sandbox configs and defaults",+ "schema": {+ "type": "object",+ "additionalProperties": true+ }+ },+ "401": {+ "description": "Unauthorized",+ "schema": {+ "type": "object",+ "additionalProperties": true+ }+ }+ }+ },+ "post": {+ "security": [+ {+ "Bearer": []+ },+ {+ "ApiKeyAuth": []+ }+ ],+ "description": "Create a named workspace sandbox backend config. Credentials are masked in the response.",+ "consumes": [+ "application/json"+ ],+ "produces": [+ "application/json"+ ],+ "tags": [+ "SandboxConfig"+ ],+ "summary": "Create sandbox config",+ "parameters": [+ {+ "description": "Sandbox backend config",+ "name": "request",+ "in": "body",+ "required": true,+ "schema": {+ "$ref": "#/definitions/internal_handler.sandboxConfigRequest"+ }+ }+ ],+ "responses": {+ "201": {+ "description": "Created sandbox config",+ "schema": {+ "type": "object",+ "additionalProperties": true+ }+ },+ "400": {+ "description": "Invalid request or validation failure",+ "schema": {+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"+ }+ },+ "401": {+ "description": "Unauthorized",+ "schema": {+ "type": "object",+ "additionalProperties": true+ }+ }+ }+ }+ },+ "/sandbox-configs/{id}": {+ "get": {+ "security": [+ {+ "Bearer": []+ },+ {+ "ApiKeyAuth": []+ }+ ],+ "description": "Retrieve a workspace sandbox backend config with credentials masked.",+ "produces": [+ "application/json"+ ],+ "tags": [+ "SandboxConfig"+ ],+ "summary": "Get sandbox config",+ "parameters": [+ {+ "type": "string",+ "description": "Sandbox config ID",+ "name": "id",+ "in": "path",+ "required": true+ }+ ],+ "responses": {+ "200": {+ "description": "Sandbox config",+ "schema": {+ "type": "object",+ "additionalProperties": true+ }+ },+ "401": {+ "description": "Unauthorized",+ "schema": {+ "type": "object",+ "additionalProperties": true+ }+ },+ "404": {+ "description": "Sandbox config not found",+ "schema": {+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"+ }+ }+ }+ },+ "put": {+ "security": [+ {+ "Bearer": []+ },+ {+ "ApiKeyAuth": []+ }+ ],+ "description": "Update a sandbox backend config. Identity-field changes are refused while the config owns live or paused sandboxes.",+ "consumes": [+ "application/json"+ ],+ "produces": [+ "application/json"+ ],+ "tags": [+ "SandboxConfig"+ ],+ "summary": "Update sandbox config",+ "parameters": [+ {+ "type": "string",+ "description": "Sandbox config ID",+ "name": "id",+ "in": "path",+ "required": true+ },+ {+ "description": "Updated sandbox config",+ "name": "request",+ "in": "body",+ "required": true,+ "schema": {+ "$ref": "#/definitions/internal_handler.sandboxConfigRequest"+ }+ }+ ],+ "responses": {+ "200": {+ "description": "Updated sandbox config",+ "schema": {+ "type": "object",+ "additionalProperties": true+ }+ },+ "400": {+ "description": "Invalid request or validation failure",+ "schema": {+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"+ }+ },+ "401": {+ "description": "Unauthorized",+ "schema": {+ "type": "object",+ "additionalProperties": true+ }+ },+ "404": {+ "description": "Sandbox config not found",+ "schema": {+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"+ }+ },+ "409": {+ "description": "Live sandboxes or unverifiable inventory",+ "schema": {+ "type": "object",+ "additionalProperties": true+ }+ },+ "423": {+ "description": "Sandbox config is being modified by another request",+ "schema": {+ "type": "object",+ "additionalProperties": true+ }+ }+ }+ },+ "delete": {+ "security": [+ {+ "Bearer": []+ },+ {+ "ApiKeyAuth": []+ }+ ],+ "description": "Soft-delete a sandbox backend config. force=true only overrides unverifiable provider inventory, never confirmed live sandboxes.",+ "produces": [+ "application/json"+ ],+ "tags": [+ "SandboxConfig"+ ],+ "summary": "Delete sandbox config",+ "parameters": [+ {+ "type": "string",+ "description": "Sandbox config ID",+ "name": "id",+ "in": "path",+ "required": true+ },+ {+ "type": "boolean",+ "description": "Force delete when inventory is unverifiable",+ "name": "force",+ "in": "query"+ }+ ],+ "responses": {+ "200": {+ "description": "Deletion success",+ "schema": {+ "type": "object",+ "additionalProperties": true+ }+ },+ "401": {+ "description": "Unauthorized",+ "schema": {+ "type": "object",+ "additionalProperties": true+ }+ },+ "409": {+ "description": "Live sandboxes or unverifiable inventory",+ "schema": {+ "type": "object",+ "additionalProperties": true+ }+ }+ }+ }+ },+ "/sandbox-configs/{id}/sandboxes": {+ "get": {+ "security": [+ {+ "Bearer": []+ },+ {+ "ApiKeyAuth": []+ }+ ],+ "description": "Return live/paused sandbox inventory and affected agent names for one config.",+ "produces": [+ "application/json"+ ],+ "tags": [+ "SandboxConfig"+ ],+ "summary": "Inspect sandbox config inventory",+ "parameters": [+ {+ "type": "string",+ "description": "Sandbox config ID",+ "name": "id",+ "in": "path",+ "required": true+ }+ ],+ "responses": {+ "200": {+ "description": "Sandbox inventory",+ "schema": {+ "type": "object",+ "additionalProperties": true+ }+ },+ "401": {+ "description": "Unauthorized",+ "schema": {+ "type": "object",+ "additionalProperties": true}}}}},- "/sandbox-configs": {+ "/sandbox-configs/{id}/skills": {"get": {"security": [{@@ -10629,17 +11583,26 @@ const docTemplate = `{"ApiKeyAuth": []}],- "description": "List workspace sandbox backend configs with credentials masked.",+ "description": "List the agent skills installed onto one sandbox config's image.","produces": ["application/json"],"tags": ["SandboxConfig"],- "summary": "List sandbox configs",+ "summary": "List installed skills",+ "parameters": [+ {+ "type": "string",+ "description": "Sandbox config ID",+ "name": "id",+ "in": "path",+ "required": true+ }+ ],"responses": {"200": {- "description": "Sandbox configs and defaults",+ "description": "Installed skills","schema": {"type": "object","additionalProperties": true@@ -10651,6 +11614,12 @@ const docTemplate = `{"type": "object","additionalProperties": true}+ },+ "404": {+ "description": "Sandbox config not found",+ "schema": {+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"+ }}}},@@ -10663,9 +11632,10 @@ const docTemplate = `{"ApiKeyAuth": []}],- "description": "Create a named workspace sandbox backend config. Credentials are masked in the response.",+ "description": "Install a skill onto this sandbox config's image. Send a zip\nas multipart form field \"file\", or JSON {\"source\":\"...\"} to\npull from ClawHub, SkillHub, skills.sh, GitHub, GitLab, or a\ndirect archive URL. The source must be readable anonymously.\nThe install boots a sandbox and runs for minutes, so the\nrequest is only accepted; follow it via the install-events\nstream.","consumes": [- "application/json"+ "application/json",+ "multipart/form-data"],"produces": ["application/json"@@ -10673,28 +11643,40 @@ const docTemplate = `{"tags": ["SandboxConfig"],- "summary": "Create sandbox config",+ "summary": "Install a skill","parameters": [{- "description": "Sandbox backend config",+ "type": "string",+ "description": "Sandbox config ID",+ "name": "id",+ "in": "path",+ "required": true+ },+ {+ "type": "file",+ "description": "Skill bundle (zip)",+ "name": "file",+ "in": "formData"+ },+ {+ "description": "Install from a registry, git host, or archive URL","name": "request","in": "body",- "required": true,"schema": {- "$ref": "#/definitions/internal_handler.sandboxConfigRequest"+ "$ref": "#/definitions/internal_handler.skillSourceRequest"}}],"responses": {- "201": {- "description": "Created sandbox config",+ "202": {+ "description": "Install accepted","schema": {"type": "object","additionalProperties": true}},"400": {- "description": "Invalid request or validation failure",+ "description": "Missing, oversized or invalid bundle or source","schema": {"$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"}@@ -10705,11 +11687,17 @@ const docTemplate = `{"type": "object","additionalProperties": true}+ },+ "404": {+ "description": "Sandbox config not found",+ "schema": {+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"+ }}}}},- "/sandbox-configs/{id}": {+ "/sandbox-configs/{id}/skills/{skillId}": {"get": {"security": [{@@ -10719,14 +11707,14 @@ const docTemplate = `{"ApiKeyAuth": []}],- "description": "Retrieve a workspace sandbox backend config with credentials masked.",+ "description": "Retrieve one installed skill of a sandbox config.","produces": ["application/json"],"tags": ["SandboxConfig"],- "summary": "Get sandbox config",+ "summary": "Get an installed skill","parameters": [{"type": "string",@@ -10734,11 +11722,18 @@ const docTemplate = `{"name": "id","in": "path","required": true+ },+ {+ "type": "string",+ "description": "Skill ID",+ "name": "skillId",+ "in": "path",+ "required": true}],"responses": {"200": {- "description": "Sandbox config",+ "description": "Installed skill","schema": {"type": "object","additionalProperties": true@@ -10752,14 +11747,14 @@ const docTemplate = `{}},"404": {- "description": "Sandbox config not found",+ "description": "Skill not found","schema": {"$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"}}}},- "put": {+ "delete": {"security": [{"Bearer": []@@ -10768,7 +11763,63 @@ const docTemplate = `{"ApiKeyAuth": []}],- "description": "Update a sandbox backend config. Identity-field changes are refused while the config owns live or paused sandboxes.",+ "description": "Remove a skill from the config's image. The removal rebuilds\nthe image and runs for minutes, so it is only accepted; follow\nit via the install-events stream.",+ "produces": [+ "application/json"+ ],+ "tags": [+ "SandboxConfig"+ ],+ "summary": "Remove an installed skill",+ "parameters": [+ {+ "type": "string",+ "description": "Sandbox config ID",+ "name": "id",+ "in": "path",+ "required": true+ },+ {+ "type": "string",+ "description": "Skill ID",+ "name": "skillId",+ "in": "path",+ "required": true+ }+ ],+ "responses": {+ "202": {+ "description": "Removal accepted",+ "schema": {+ "type": "object",+ "additionalProperties": true+ }+ },+ "401": {+ "description": "Unauthorized",+ "schema": {+ "type": "object",+ "additionalProperties": true+ }+ },+ "404": {+ "description": "Skill not found",+ "schema": {+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"+ }+ }+ }+ },+ "patch": {+ "security": [+ {+ "Bearer": []+ },+ {+ "ApiKeyAuth": []+ }+ ],+ "description": "Show or hide an installed skill. The files stay in the image either way; removal is a separate flow.","consumes": ["application/json"],@@ -10778,7 +11829,7 @@ const docTemplate = `{"tags": ["SandboxConfig"],- "summary": "Update sandbox config",+ "summary": "Update an installed skill","parameters": [{"type": "string",@@ -10788,25 +11839,32 @@ const docTemplate = `{"required": true},{- "description": "Updated sandbox config",+ "type": "string",+ "description": "Skill ID",+ "name": "skillId",+ "in": "path",+ "required": true+ },+ {+ "description": "Fields to update","name": "request","in": "body","required": true,"schema": {- "$ref": "#/definitions/internal_handler.sandboxConfigRequest"+ "$ref": "#/definitions/internal_handler.skillPatchRequest"}}],"responses": {"200": {- "description": "Updated sandbox config",+ "description": "Updated skill","schema": {"type": "object","additionalProperties": true}},"400": {- "description": "Invalid request or validation failure",+ "description": "Invalid request","schema": {"$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"}@@ -10819,28 +11877,16 @@ const docTemplate = `{}},"404": {- "description": "Sandbox config not found",+ "description": "Skill not found","schema": {"$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"}- },- "409": {- "description": "Live sandboxes or unverifiable inventory",- "schema": {- "type": "object",- "additionalProperties": true- }- },- "423": {- "description": "Sandbox config is being modified by another request",- "schema": {- "type": "object",- "additionalProperties": true- }}}- },- "delete": {+ }+ },+ "/sandbox-configs/{id}/skills/{skillId}/install-events": {+ "get": {"security": [{"Bearer": []@@ -10849,14 +11895,14 @@ const docTemplate = `{"ApiKeyAuth": []}],- "description": "Soft-delete a sandbox backend config. force=true only overrides unverifiable provider inventory, never confirmed live sandboxes.",+ "description": "Server-sent progress for one install or removal. The stream\nalways terminates: with the run's own terminal event, with one\nderived from the durable status, or with a \"detached\" frame\nwhen it stops following a run that is still going.","produces": [- "application/json"+ "text/event-stream"],"tags": ["SandboxConfig"],- "summary": "Delete sandbox config",+ "summary": "Follow an install or removal","parameters": [{"type": "string",@@ -10866,18 +11912,18 @@ const docTemplate = `{"required": true},{- "type": "boolean",- "description": "Force delete when inventory is unverifiable",- "name": "force",- "in": "query"+ "type": "string",+ "description": "Skill ID",+ "name": "skillId",+ "in": "path",+ "required": true}],"responses": {"200": {- "description": "Deletion success",+ "description": "SSE stream of progress events","schema": {- "type": "object",- "additionalProperties": true+ "type": "string"}},"401": {@@ -10887,17 +11933,16 @@ const docTemplate = `{"additionalProperties": true}},- "409": {- "description": "Live sandboxes or unverifiable inventory",+ "404": {+ "description": "Skill not found","schema": {- "type": "object",- "additionalProperties": true+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"}}}}},- "/sandbox-configs/{id}/sandboxes": {+ "/sandbox-configs/{id}/skills/{skillId}/transcript": {"get": {"security": [{@@ -10907,14 +11952,14 @@ const docTemplate = `{"ApiKeyAuth": []}],- "description": "Return live/paused sandbox inventory and affected agent names for one config.",+ "description": "Server-sent replay of everything the installer agent did — the\nprompt it was given, its thinking, the commands it ran and\ntheir output — followed live while the install is still\nrunning. Frames are the same shape the chat stream uses, so a\nconsole renders an install with the components it renders a\nchat turn with. 404 once the event log has expired; the\ndurable message history is the fallback.","produces": [- "application/json"+ "text/event-stream"],"tags": ["SandboxConfig"],- "summary": "Inspect sandbox config inventory",+ "summary": "Follow an install's agent transcript","parameters": [{"type": "string",@@ -10922,14 +11967,20 @@ const docTemplate = `{"name": "id","in": "path","required": true+ },+ {+ "type": "string",+ "description": "Skill ID",+ "name": "skillId",+ "in": "path",+ "required": true}],"responses": {"200": {- "description": "Sandbox inventory",+ "description": "SSE stream of transcript events","schema": {- "type": "object",- "additionalProperties": true+ "type": "string"}},"401": {@@ -10938,6 +11989,12 @@ const docTemplate = `{"type": "object","additionalProperties": true}+ },+ "404": {+ "description": "Skill or transcript not found",+ "schema": {+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"+ }}}}@@ -11173,66 +12230,6 @@ const docTemplate = `{}}},- "/knowledge-search": {- "post": {- "security": [- {- "Bearer": []- },- {- "ApiKeyAuth": []- }- ],- "description": "在知识库中搜索(不使用LLM总结)",- "consumes": [- "application/json"- ],- "produces": [- "application/json"- ],- "tags": [- "问答"- ],- "summary": "知识搜索",- "parameters": [- {- "description": "搜索请求",- "name": "request",- "in": "body",- "required": true,- "schema": {- "$ref": "#/definitions/internal_handler_session.SearchKnowledgeRequest"- }- },- {- "enum": [- "handle",- "public"- ],- "type": "string",- "default": "handle",- "description": "文件引用形式,public 返回可加载直链",- "name": "resource_urls",- "in": "query"- }- ],- "responses": {- "200": {- "description": "搜索结果",- "schema": {- "type": "object",- "additionalProperties": true- }- },- "400": {- "description": "请求参数错误",- "schema": {- "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"- }- }- }- }- },"/sessions/{id}": {"get": {"security": [@@ -11902,7 +12899,7 @@ const docTemplate = `{"ApiKeyAuth": []}],- "description": "获取所有预装的Agent Skills元数据",+ "description": "返回指定沙盒配置镜像内、智能体实际能调用的已安装技能(ready 且启用)。不传 sandbox_config_id 时列表为空。","consumes": ["application/json"],@@ -11912,19 +12909,21 @@ const docTemplate = `{"tags": ["Skills"],- "summary": "获取预装Skills列表",+ "summary": "获取当前沙盒配置上可执行的 Skills",+ "parameters": [+ {+ "type": "string",+ "description": "Sandbox config ID",+ "name": "sandbox_config_id",+ "in": "query"+ }+ ],"responses": {"200": {"description": "Skills列表","schema": {- "type": "object",- "additionalProperties": true- }- },- "500": {- "description": "服务器错误",- "schema": {- "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"+ "type": "object",+ "additionalProperties": true}}}@@ -13028,6 +14027,74 @@ const docTemplate = `{}}},+ "/system/admin/users/create": {+ "post": {+ "description": "Provision a new local user account (SystemAdmin only).\nWhen ` + "`" + `password` + "`" + ` is omitted or null, a cryptographically random\npassword is generated (OIDC-style crypto/rand + base64url)\nand returned once in the response body. Any provided value,\nincluding empty string, is policy-checked. Tenant provisioning\nfollows the shared auth.default_tenant_mode policy.",+ "consumes": [+ "application/json"+ ],+ "produces": [+ "application/json"+ ],+ "tags": [+ "System Admin"+ ],+ "summary": "Create a new user (SystemAdmin)",+ "parameters": [+ {+ "description": "User creation request",+ "name": "request",+ "in": "body",+ "required": true,+ "schema": {+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.AdminCreateUserRequest"+ }+ }+ ],+ "responses": {+ "200": {+ "description": "Identity already exists, returns the existing user",+ "schema": {+ "$ref": "#/definitions/internal_handler.CreateSystemUserResponse"+ }+ },+ "201": {+ "description": "User created successfully",+ "schema": {+ "$ref": "#/definitions/internal_handler.CreateSystemUserResponse"+ }+ },+ "400": {+ "description": "Invalid request or weak password",+ "schema": {+ "type": "object",+ "additionalProperties": true+ }+ },+ "403": {+ "description": "Forbidden: not a system admin",+ "schema": {+ "type": "object",+ "additionalProperties": true+ }+ },+ "409": {+ "description": "Email and username refer to conflicting identities",+ "schema": {+ "type": "object",+ "additionalProperties": true+ }+ },+ "500": {+ "description": "Internal error",+ "schema": {+ "type": "object",+ "additionalProperties": true+ }+ }+ }+ }+ },"/system/admin/users/reset-password": {"post": {"description": "Replace another user's local password and revoke all of their existing sessions (SystemAdmin only).\nA system administrator cannot reset their own password through this endpoint; self-service password change still requires the old password.",@@ -15713,6 +16780,26 @@ const docTemplate = `{}}},+ "github_com_Tencent_WeKnora_internal_types.AdminCreateUserRequest": {+ "type": "object",+ "required": [+ "email",+ "username"+ ],+ "properties": {+ "email": {+ "type": "string"+ },+ "password": {+ "type": "string"+ },+ "username": {+ "type": "string",+ "maxLength": 50,+ "minLength": 2+ }+ }+ },"github_com_Tencent_WeKnora_internal_types.AgentStep": {"type": "object","properties": {@@ -15775,6 +16862,7 @@ const docTemplate = `{"system.admin_promoted","system.admin_revoked","system.user_password_reset",+ "system.user_created","system.api_key_created","system.api_key_revoked","system.queue_task_retried",@@ -15838,6 +16926,7 @@ const docTemplate = `{"AuditActionSystemAdminPromoted","AuditActionSystemAdminRevoked","AuditActionSystemUserPasswordReset",+ "AuditActionSystemUserCreated","AuditActionSystemAPIKeyCreated","AuditActionSystemAPIKeyRevoked","AuditActionSystemQueueTaskRetried",@@ -16392,6 +17481,10 @@ const docTemplate = `{"type": "string"}},+ "memory_enabled": {+ "description": "Whether this agent may read the user's long-term memory. Nil inherits\nthe workspace setting; false opts a single agent out of memory even when\nthe workspace has it on. There is no \"on\" that overrides the workspace.",+ "type": "boolean"+ },"model_id": {"description": "===== Model Settings =====\nModel ID to use for conversations","type": "string"@@ -16617,8 +17710,44 @@ const docTemplate = `{"github_com_Tencent_WeKnora_internal_types.DockerSandboxConfig": {"type": "object","properties": {+ "cpu_limit": {+ "description": "CPULimit is the number of CPU cores one sandbox may use. 0 uses the\nbuilt-in default.",+ "type": "number"+ },+ "host": {+ "description": "Host is the daemon endpoint in DOCKER_HOST form. Empty means the local\nunix socket.",+ "type": "string"+ },+ "http_timeout_sec": {+ "description": "HTTPTimeoutSec bounds each Engine API call. 0 uses the built-in default.",+ "type": "integer"+ },+ "idle_ttl_seconds": {+ "description": "IdleTTLSeconds is how long a session container may go unused before it\nis reclaimed. The daemon has no idle timeout of its own, so this is what\nstops an abandoned session from pinning host memory indefinitely.",+ "type": "integer"+ },"image": {"type": "string"+ },+ "memory_limit_mb": {+ "description": "MemoryLimitMB caps one sandbox's memory. 0 uses the built-in default.",+ "type": "integer"+ },+ "network_mode": {+ "description": "NetworkMode is the Docker network sandboxes join: \"bridge\" (default) or\n\"none\" for no egress. Nothing else is accepted — host and container:\nmodes share another namespace outright, and a named network is usually\nthe deployment's own compose network, which would put the sandbox next\nto Postgres and Redis.",+ "type": "string"+ },+ "pids_limit": {+ "description": "PidsLimit caps how many processes one sandbox may run. 0 uses the\nbuilt-in default.",+ "type": "integer"+ },+ "runtime": {+ "description": "Runtime selects an alternative OCI runtime such as \"runsc\" (gVisor).\nEmpty uses the daemon default.",+ "type": "string"+ },+ "tls_cert_path": {+ "description": "TLSCertPath is a directory on the WeKnora host containing ca.pem,\ncert.pem and key.pem. Required when Host is a TCP endpoint.",+ "type": "string"}}},@@ -17078,228 +18207,87 @@ const docTemplate = `{}]},- "tenant_id": {- "description": "TenantID is the workspace to enrol as an org member. Preferred field.",- "type": "integer"- },- "user_id": {- "description": "UserID is retained for backward compatibility. When set without\nTenantID, the handler resolves the user's TenantID and uses this\nuser as the representative.",- "type": "string"- }- }- },- "github_com_Tencent_WeKnora_internal_types.JoinByOrganizationIDRequest": {- "type": "object",- "required": [- "organization_id"- ],- "properties": {- "message": {- "description": "Optional message for join request",- "type": "string",- "maxLength": 500- },- "organization_id": {- "type": "string"- },- "role": {- "description": "Optional: requested role (admin/editor/viewer); default viewer",- "allOf": [- {- "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.OrgMemberRole"- }- ]- }- }- },- "github_com_Tencent_WeKnora_internal_types.JoinOrganizationRequest": {- "type": "object",- "required": [- "invite_code"- ],- "properties": {- "invite_code": {- "type": "string",- "maxLength": 32,- "minLength": 8- }- }- },- "github_com_Tencent_WeKnora_internal_types.KBCloneTaskStatus": {- "type": "string",- "enum": [- "pending",- "processing",- "completed",- "failed"- ],- "x-enum-varnames": [- "KBCloneStatusPending",- "KBCloneStatusProcessing",- "KBCloneStatusCompleted",- "KBCloneStatusFailed"- ]- },- "github_com_Tencent_WeKnora_internal_types.KS3EngineConfig": {- "type": "object",- "properties": {- "access_key": {- "type": "string"- },- "bucket_name": {- "type": "string"- },- "endpoint": {- "type": "string"- },- "path_prefix": {- "type": "string"- },- "region": {- "type": "string"- },- "secret_key": {- "type": "string"- }- }- },- "github_com_Tencent_WeKnora_internal_types.Knowledge": {- "type": "object",- "properties": {- "channel": {- "description": "Channel indicates through which channel the knowledge was ingested (web, api, browser_extension, wechat, etc.)",- "type": "string"- },- "created_at": {- "description": "Creation time of the knowledge",- "type": "string"- },- "custom_metadata": {- "description": "CustomMetadata is user-authored descriptive metadata. It is deliberately\nseparate from Metadata, which contains internal ingestion state and IDs.",- "type": "array",- "items": {- "type": "integer"- }- },- "deleted_at": {- "description": "Deletion time of the knowledge",- "allOf": [- {- "$ref": "#/definitions/gorm.DeletedAt"- }- ]- },- "description": {- "description": "Description of the knowledge",- "type": "string"- },- "embedding_model_id": {- "description": "ID of the embedding model",- "type": "string"- },- "enable_status": {- "description": "Enable status of the knowledge",- "type": "string"- },- "error_message": {- "description": "Error message of the knowledge",- "type": "string"- },- "file_hash": {- "description": "File hash of the knowledge",- "type": "string"- },- "file_name": {- "description": "File name of the knowledge",- "type": "string"- },- "file_path": {- "description": "File path of the knowledge",- "type": "string"- },- "file_size": {- "description": "File size of the knowledge",- "type": "integer"- },- "file_type": {- "description": "File type of the knowledge",- "type": "string"- },- "folder_path": {- "description": "FolderPath is the canonical relative directory this entry belongs to\ninside the knowledge base, e.g. \"docs/spec\" for a folder upload of\n\"docs/spec/design.md\". Empty means the knowledge base root. It is a\ndisplay/navigation concern only: it never affects where the file is\nphysically stored (see FilePath).",- "type": "string"- },- "id": {- "description": "Unique identifier of the knowledge",- "type": "string"- },- "knowledge_base_id": {- "description": "ID of the knowledge base",- "type": "string"- },- "knowledge_base_name": {- "description": "Knowledge base name (not stored in database, populated on query)",- "type": "string"- },- "last_faq_import_result": {- "description": "Last FAQ import result (for FAQ type knowledge only)",- "type": "array",- "items": {- "type": "integer"- }- },- "metadata": {- "description": "Metadata of the knowledge",- "type": "array",- "items": {- "type": "integer"- }- },- "parse_status": {- "description": "Parse status of the knowledge",- "type": "string"- },- "pending_subtasks_count": {- "description": "PendingSubtasksCount is the outstanding enrichment subtask count\n(summary + question + graph chunks). Only meaningful while\nParseStatus == \"finalizing\"; defaults to 0 in any terminal state.",+ "tenant_id": {+ "description": "TenantID is the workspace to enrol as an org member. Preferred field.","type": "integer"},- "processed_at": {- "description": "Processed time of the knowledge",+ "user_id": {+ "description": "UserID is retained for backward compatibility. When set without\nTenantID, the handler resolves the user's TenantID and uses this\nuser as the representative.","type": "string"+ }+ }+ },+ "github_com_Tencent_WeKnora_internal_types.JoinByOrganizationIDRequest": {+ "type": "object",+ "required": [+ "organization_id"+ ],+ "properties": {+ "message": {+ "description": "Optional message for join request",+ "type": "string",+ "maxLength": 500},- "source": {- "description": "Source of the knowledge (e.g. URL address for url type, \"manual\" for manual type)",+ "organization_id": {"type": "string"},- "storage_size": {- "description": "Storage size of the knowledge",- "type": "integer"- },- "summary_status": {- "description": "Summary status for async summary generation",+ "role": {+ "description": "Optional: requested role (admin/editor/viewer); default viewer",+ "allOf": [+ {+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.OrgMemberRole"+ }+ ]+ }+ }+ },+ "github_com_Tencent_WeKnora_internal_types.JoinOrganizationRequest": {+ "type": "object",+ "required": [+ "invite_code"+ ],+ "properties": {+ "invite_code": {+ "type": "string",+ "maxLength": 32,+ "minLength": 8+ }+ }+ },+ "github_com_Tencent_WeKnora_internal_types.KBCloneTaskStatus": {+ "type": "string",+ "enum": [+ "pending",+ "processing",+ "completed",+ "failed"+ ],+ "x-enum-varnames": [+ "KBCloneStatusPending",+ "KBCloneStatusProcessing",+ "KBCloneStatusCompleted",+ "KBCloneStatusFailed"+ ]+ },+ "github_com_Tencent_WeKnora_internal_types.KS3EngineConfig": {+ "type": "object",+ "properties": {+ "access_key": {"type": "string"},- "tags": {- "description": "Tags holds the tags associated with this knowledge (populated on query, not persisted directly).",- "type": "array",- "items": {- "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.KnowledgeTag"- }+ "bucket_name": {+ "type": "string"},- "tenant_id": {- "description": "Workspace ID",- "type": "integer"+ "endpoint": {+ "type": "string"},- "title": {- "description": "Title of the knowledge",+ "path_prefix": {"type": "string"},- "type": {- "description": "Type of the knowledge",+ "region": {"type": "string"},- "updated_at": {- "description": "Last updated time of the knowledge",+ "secret_key": {"type": "string"}}@@ -17694,47 +18682,6 @@ const docTemplate = `{}}},- "github_com_Tencent_WeKnora_internal_types.KnowledgeTag": {- "type": "object",- "properties": {- "color": {- "description": "Optional display color",- "type": "string"- },- "created_at": {- "description": "Creation time",- "type": "string"- },- "id": {- "description": "Unique identifier of the tag (UUID)",- "type": "string"- },- "knowledge_base_id": {- "description": "Knowledge base ID that this tag belongs to",- "type": "string"- },- "name": {- "description": "Tag name, unique within the same knowledge base",- "type": "string"- },- "seq_id": {- "description": "SeqID is an auto-increment integer ID for external API usage",- "type": "integer"- },- "sort_order": {- "description": "Sort order within the same knowledge base",- "type": "integer"- },- "tenant_id": {- "description": "Workspace ID",- "type": "integer"- },- "updated_at": {- "description": "Last updated time",- "type": "string"- }- }- },"github_com_Tencent_WeKnora_internal_types.ListMembersResponse": {"type": "object","properties": {@@ -18118,6 +19065,55 @@ const docTemplate = `{}}},+ "github_com_Tencent_WeKnora_internal_types.MemoryConfig": {+ "type": "object",+ "properties": {+ "embedding_model_id": {+ "description": "EmbeddingModelID is the single model used to score memory against a\nquestion. It is pinned per workspace: knowledge bases each have their\nown embedding model, and grabbing whichever one happens to be listed\nfirst would mix incomparable vector spaces. Blank means semantic recall\nis off and matching stays lexical.",+ "type": "string"+ },+ "enabled": {+ "description": "Enabled defaults to false. Memory retains user statements across\nsessions, so a workspace admin has to turn it on deliberately.",+ "type": "boolean"+ },+ "extract_delay_seconds": {+ "description": "ExtractDelaySeconds is how long a finished turn waits before\ndistillation runs. Waiting lets one model call cover the several\nmessages a user usually sends in a row. 0 means the default.",+ "type": "integer"+ },+ "extract_instructions": {+ "description": "ExtractInstructions are workspace-specific rules appended to the\ndistillation prompt, for policies the product cannot guess (\"never record\ncustomer names\", \"always note the environment a question is about\").",+ "type": "string"+ },+ "extract_min_interval_seconds": {+ "description": "ExtractMinIntervalSeconds is the floor between two distillation runs for\nthe same person, and exists purely to bound cost. It never drops a turn:\na turn arriving inside the interval is queued and picked up by the next\nrun. 0 means the default.",+ "type": "integer"+ },+ "extract_model_id": {+ "description": "ExtractModelID is the model used by the background extraction task.\nEmpty means \"use the model the conversation itself used\", which is what\nthe settings UI promises, so the extraction task must never fail merely\nbecause this is blank.",+ "type": "string"+ },+ "interest_threshold": {+ "description": "InterestThreshold is how many separate conversations must touch a topic\nbefore it becomes a stored interest. 0 means the default. Setting it to 1\nrecords every topic on first sight, which is usually too noisy.",+ "type": "integer"+ },+ "max_items": {+ "description": "MaxItems caps active items per subject. 0 means DefaultMemoryMaxItems.",+ "type": "integer"+ },+ "retrieval_conditioning": {+ "description": "RetrievalConditioning lets memory shape retrieval — query rewriting and\nper-document ranking — rather than only being appended to the answer\nprompt. This is where memory earns its keep in a knowledge-base product.",+ "type": "boolean"+ },+ "vector_recall": {+ "description": "VectorRecall adds semantic similarity to memory recall. Nil means on\nwhen an embedding model is reachable.\n\nLexical matching alone cannot find a memory the user has re-worded, which\nis most of them: \"回答直接给结论\" and \"别铺垫那么多\" share no tokens. The\ncost is one embedding call per turn, bounded and degraded to lexical on\nfailure, so the feature never becomes a reason a chat is slow.",+ "type": "boolean"+ },+ "write_mode": {+ "description": "WriteMode is MemoryWriteExplicitOnly or MemoryWriteAuto.",+ "type": "string"+ }+ }+ },"github_com_Tencent_WeKnora_internal_types.MentionedItem": {"type": "object","properties": {@@ -18261,6 +19257,21 @@ const docTemplate = `{"updated_at": {"description": "Last update timestamp","type": "string"+ },+ "usage": {+ "description": "LLM token usage aggregated across every round of the turn that produced this\nassistant message. Persisted so history reads can attribute cost after the\nlive stream is gone; NULL (nil) for user messages and pre-feature rows.",+ "allOf": [+ {+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.TokenUsage"+ }+ ]+ },+ "used_memories": {+ "description": "UsedMemories records which long-term memories were injected into this\nanswer, so the chat UI can show them and let the user delete one on the\nspot. Persisted rather than only streamed so reopening a conversation\nstill explains what the answer saw.",+ "type": "array",+ "items": {+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.UsedMemory"+ }}}},@@ -18884,6 +19895,21 @@ const docTemplate = `{}}},+ "github_com_Tencent_WeKnora_internal_types.PromptCacheStatus": {+ "type": "string",+ "enum": [+ "unsupported",+ "unreported",+ "miss",+ "hit"+ ],+ "x-enum-varnames": [+ "PromptCacheStatusUnsupported",+ "PromptCacheStatusUnreported",+ "PromptCacheStatusMiss",+ "PromptCacheStatusHit"+ ]+ },"github_com_Tencent_WeKnora_internal_types.QuestionGenerationConfig": {"type": "object","properties": {@@ -19691,6 +20717,31 @@ const docTemplate = `{}}},+ "github_com_Tencent_WeKnora_internal_types.SkillImageConfig": {+ "type": "object",+ "properties": {+ "base_template_id": {+ "description": "BaseTemplateID is the template this chain was originally built from;\nthe rebuild path starts over from it.",+ "type": "string"+ },+ "built_at": {+ "description": "BuiltAt records when this generation was produced.",+ "type": "string"+ },+ "generation": {+ "description": "Generation increments on every successful install/remove, for naming\nand troubleshooting.",+ "type": "integer"+ },+ "owner_fingerprint": {+ "description": "OwnerFingerprint identifies the provider account that owns the snapshot.\nSnapshots are invisible across accounts, so a mismatch means \"fall back\nto the base template\" rather than \"fail\".",+ "type": "string"+ },+ "snapshot_id": {+ "description": "SnapshotID is the currently effective snapshot; empty = base template.",+ "type": "string"+ }+ }+ },"github_com_Tencent_WeKnora_internal_types.StarterSuggestionConfig": {"type": "object","properties": {@@ -20090,6 +21141,14 @@ const docTemplate = `{"description": "ID","type": "integer"},+ "memory_config": {+ "description": "Memory config: workspace switch for cross-session long-term memory",+ "allOf": [+ {+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.MemoryConfig"+ }+ ]+ },"name": {"description": "Name","type": "string"@@ -20198,6 +21257,18 @@ const docTemplate = `{"description": "SandboxType selects the sandbox backend. Named configs may use \"cube\",\n\"e2b\", \"docker\", or \"local\". \"disabled\" is reserved for the hidden\nworkspace policy row.","type": "string"},+ "skill_image": {+ "description": "SkillImage points at the snapshot that carries this config's installed\nskills. Empty means \"use the base template\". Written only by the skill\ninstall/remove path: MergeSandboxConfigForUpdate ignores client values\nso a settings-form save cannot wipe or plant the pointer.",+ "allOf": [+ {+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.SkillImageConfig"+ }+ ]+ },+ "skill_rollout": {+ "description": "SkillRollout decides whether sessions that already hold a sandbox of\nthis config rebuild after a skill install or removal. Empty and\nSkillRolloutNextTurn rebuild on the next chat turn. SkillRolloutNewSession\nleaves those sandboxes on the previous image; only sessions that start\nafterwards boot the new snapshot.",+ "type": "string"+ },"volume_mount": {"description": "VolumeMount configures an optional shared volume mounted into every\nsandbox created for this tenant. Currently used for tenant-installed\nskills, but the configuration itself is skill-agnostic and can serve\nany volume-mount use case (shared datasets, pre-installed toolchains,\netc.).","allOf": [@@ -20208,6 +21279,39 @@ const docTemplate = `{}}},+ "github_com_Tencent_WeKnora_internal_types.TokenUsage": {+ "type": "object",+ "properties": {+ "cache_miss_tokens": {+ "type": "integer"+ },+ "cache_read_tokens": {+ "type": "integer"+ },+ "cache_reported": {+ "type": "boolean"+ },+ "cache_status": {+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.PromptCacheStatus"+ },+ "cache_write_tokens": {+ "type": "integer"+ },+ "cached_tokens": {+ "description": "CachedTokens is the legacy alias for CacheReadTokens. It remains on the\nwire for compatibility with existing API consumers.",+ "type": "integer"+ },+ "completion_tokens": {+ "type": "integer"+ },+ "prompt_tokens": {+ "type": "integer"+ },+ "total_tokens": {+ "type": "integer"+ }+ }+ },"github_com_Tencent_WeKnora_internal_types.ToolCall": {"type": "object","properties": {@@ -20344,6 +21448,20 @@ const docTemplate = `{}}},+ "github_com_Tencent_WeKnora_internal_types.UsedMemory": {+ "type": "object",+ "properties": {+ "content": {+ "type": "string"+ },+ "id": {+ "type": "string"+ },+ "kind": {+ "type": "string"+ }+ }+ },"github_com_Tencent_WeKnora_internal_types.User": {"type": "object","properties": {@@ -20922,6 +22040,10 @@ const docTemplate = `{"description": "populated in ego mode","type": "integer"},+ "familiar_count": {+ "description": "FamiliarCount is how many returned nodes are lit up for this person.",+ "type": "integer"+ },"mode": {"type": "string"},@@ -20942,6 +22064,10 @@ const docTemplate = `{"github_com_Tencent_WeKnora_internal_types.WikiGraphNode": {"type": "object","properties": {+ "familiar": {+ "description": "Familiar is true when this page was built from a document this person\nkeeps citing in answers. It is a personal overlay, not a property of\nthe page: two people looking at the same wiki see different highlights.",+ "type": "boolean"+ },"link_count": {"description": "Number of inbound + outbound links","type": "integer"@@ -21535,6 +22661,18 @@ const docTemplate = `{}}},+ "internal_handler.CreateSystemUserResponse": {+ "type": "object",+ "properties": {+ "generated_password": {+ "description": "GeneratedPassword is the plaintext password when the server\nauto-generated one. Absent when the caller supplied the password.",+ "type": "string"+ },+ "user": {+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.UserInfo"+ }+ }+ },"internal_handler.DeleteTagRequest": {"type": "object","properties": {@@ -22760,6 +23898,23 @@ const docTemplate = `{}}},+ "internal_handler.UpdateKnowledgeRequest": {+ "type": "object",+ "properties": {+ "custom_metadata": {+ "type": "array",+ "items": {+ "type": "integer"+ }+ },+ "description": {+ "type": "string"+ },+ "title": {+ "type": "string"+ }+ }+ },"internal_handler.UpdateModelRequest": {"type": "object","properties": {@@ -23075,6 +24230,24 @@ const docTemplate = `{}}},+ "internal_handler.skillPatchRequest": {+ "type": "object",+ "properties": {+ "enabled": {+ "description": "Enabled is a pointer because its absence is a bad request rather than a\nrequest to disable the skill.",+ "type": "boolean"+ }+ }+ },+ "internal_handler.skillSourceRequest": {+ "type": "object",+ "properties": {+ "source": {+ "description": "Source is a ClawHub/SkillHub slug or page URL, a skills.sh / GitHub /\nGitLab locator, or a direct zip/SKILL.md URL. It must be readable\nanonymously: the fetch carries no credential of any kind.",+ "type": "string"+ }+ }+ },"internal_handler.storageBackendRequest": {"type": "object","required": [diff --git a/docs/swagger.json b/docs/swagger.jsonindex 7e83a153d..fd115ee36 100644--- a/docs/swagger.json+++ b/docs/swagger.json@@ -6115,6 +6115,66 @@}}},+ "/knowledge-search": {+ "post": {+ "security": [+ {+ "Bearer": []+ },+ {+ "ApiKeyAuth": []+ }+ ],+ "description": "在知识库中搜索(不使用LLM总结)",+ "consumes": [+ "application/json"+ ],+ "produces": [+ "application/json"+ ],+ "tags": [+ "问答"+ ],+ "summary": "知识搜索",+ "parameters": [+ {+ "description": "搜索请求",+ "name": "request",+ "in": "body",+ "required": true,+ "schema": {+ "$ref": "#/definitions/internal_handler_session.SearchKnowledgeRequest"+ }+ },+ {+ "enum": [+ "handle",+ "public"+ ],+ "type": "string",+ "default": "handle",+ "description": "文件引用形式,public 返回可加载直链",+ "name": "resource_urls",+ "in": "query"+ }+ ],+ "responses": {+ "200": {+ "description": "搜索结果",+ "schema": {+ "type": "object",+ "additionalProperties": true+ }+ },+ "400": {+ "description": "请求参数错误",+ "schema": {+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"+ }+ }+ }+ }+ },"/knowledge/batch": {"get": {"security": [@@ -6587,14 +6647,17 @@"in": "query"},{+ "minimum": 0,"type": "integer",- "description": "Offset for pagination",+ "description": "Offset for pagination (minimum 0)","name": "offset","in": "query"},{+ "maximum": 100,+ "minimum": 1,"type": "integer",- "description": "Limit for pagination (default 20)",+ "description": "Limit for pagination (default 20, maximum 100)","name": "limit","in": "query"},@@ -6744,7 +6807,7 @@"ApiKeyAuth": []}],- "description": "更新知识条目信息",+ "description": "部分更新知识条目(标题/描述/自定义元数据);未传字段保持不变,显式传空 description 可清空摘要","consumes": ["application/json"],@@ -6764,12 +6827,12 @@"required": true},{- "description": "知识信息",+ "description": "更新字段(均可选)","name": "request","in": "body","required": true,"schema": {- "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.Knowledge"+ "$ref": "#/definitions/internal_handler.UpdateKnowledgeRequest"}}],@@ -9044,30 +9107,24 @@}}},- "/messages/chat-history-stats": {- "get": {+ "/memory/consolidate": {+ "post": {"security": [{"Bearer": []- },- {- "ApiKeyAuth": []}],- "description": "获取聊天历史知识库的统计信息(已索引消息数、知识库大小等)",- "consumes": [- "application/json"- ],+ "description": "合并意思接近的条目、归档到期事项,不等待每日后台整理","produces": ["application/json"],"tags": [- "消息"+ "长期记忆"],- "summary": "获取聊天历史知识库统计",+ "summary": "立刻整理我的记忆","responses": {"200": {- "description": "统计信息",+ "description": "整理结果","schema": {"type": "object","additionalProperties": true@@ -9076,214 +9133,157 @@}}},- "/messages/search": {- "post": {+ "/memory/documents": {+ "get": {"security": [{"Bearer": []- },- {- "ApiKeyAuth": []}],- "description": "通过关键词和/或向量相似度搜索历史对话记录,支持关键词、向量、混合三种模式",- "consumes": [- "application/json"- ],+ "description": "返回当前用户回答里反复引用的文档,次数未达习惯门槛的不展示","produces": ["application/json"],"tags": [- "消息"+ "长期记忆"],- "summary": "搜索历史对话",+ "summary": "列出常用资料","parameters": [{- "description": "搜索请求",- "name": "request",- "in": "body",- "required": true,- "schema": {- "$ref": "#/definitions/internal_handler.SearchMessagesRequest"- }+ "type": "integer",+ "default": 50,+ "description": "每页条数",+ "name": "limit",+ "in": "query"+ },+ {+ "type": "integer",+ "description": "偏移量",+ "name": "offset",+ "in": "query"}],"responses": {"200": {- "description": "搜索结果",+ "description": "文档列表","schema": {"type": "object","additionalProperties": true}- },- "400": {- "description": "请求参数错误",- "schema": {- "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"- }}}}},- "/messages/{session_id}/load": {- "get": {+ "/memory/documents/{id}": {+ "delete": {"security": [{"Bearer": []- },- {- "ApiKeyAuth": []}],- "description": "加载会话的消息历史,支持分页和时间筛选",- "consumes": [- "application/json"- ],+ "description": "删除一条文档亲和度计数,之后检索不再因为这份文档而加权","produces": ["application/json"],"tags": [- "消息"+ "长期记忆"],- "summary": "加载消息历史",+ "summary": "停止用某份文档做个性化检索","parameters": [{"type": "string",- "description": "会话ID",- "name": "session_id",+ "description": "亲和度 ID",+ "name": "id","in": "path","required": true- },- {- "type": "integer",- "default": 20,- "description": "返回数量",- "name": "limit",- "in": "query"- },- {- "type": "string",- "description": "在此时间之前的消息(RFC3339Nano格式)",- "name": "before_time",- "in": "query"- },- {- "enum": [- "handle",- "public"- ],- "type": "string",- "default": "handle",- "description": "文件引用形式,public 返回可加载直链",- "name": "resource_urls",- "in": "query"}],"responses": {"200": {- "description": "消息列表",+ "description": "删除成功","schema": {"type": "object","additionalProperties": true}- },- "400": {- "description": "请求参数错误",- "schema": {- "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"- }}}}},- "/messages/{session_id}/{id}": {- "delete": {+ "/memory/export": {+ "get": {"security": [{"Bearer": []- },- {- "ApiKeyAuth": []}],- "description": "从会话中删除指定消息",- "consumes": [- "application/json"- ],+ "description": "以 JSON 导出当前用户的全部记忆","produces": ["application/json"],"tags": [- "消息"- ],- "summary": "删除消息",- "parameters": [- {- "type": "string",- "description": "会话ID",- "name": "session_id",- "in": "path",- "required": true- },- {- "type": "string",- "description": "消息ID",- "name": "id",- "in": "path",- "required": true- }+ "长期记忆"],+ "summary": "导出我的记忆","responses": {"200": {- "description": "删除成功",+ "description": "记忆导出","schema": {"type": "object","additionalProperties": true}- },- "500": {- "description": "服务器错误",- "schema": {- "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"- }}}}},- "/models": {+ "/memory/items": {"get": {"security": [{"Bearer": []- },- {- "ApiKeyAuth": []}],- "description": "获取当前空间的所有模型",- "consumes": [- "application/json"- ],+ "description": "分页返回当前用户的记忆条目,可按状态过滤","produces": ["application/json"],"tags": [- "模型管理"+ "长期记忆"+ ],+ "summary": "列出我的记忆",+ "parameters": [+ {+ "enum": [+ "active",+ "superseded",+ "archived",+ "pending"+ ],+ "type": "string",+ "description": "状态过滤",+ "name": "status",+ "in": "query"+ },+ {+ "type": "integer",+ "default": 50,+ "description": "每页条数",+ "name": "limit",+ "in": "query"+ },+ {+ "type": "integer",+ "description": "偏移量",+ "name": "offset",+ "in": "query"+ }],- "summary": "获取模型列表","responses": {"200": {- "description": "模型列表",+ "description": "记忆列表","schema": {"type": "object","additionalProperties": true}- },- "400": {- "description": "请求参数错误",- "schema": {- "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"- }}}},@@ -9291,12 +9291,9 @@"security": [{"Bearer": []- },- {- "ApiKeyAuth": []}],- "description": "创建新的模型配置",+ "description": "手动添加一条长期记忆","consumes": ["application/json"],@@ -9304,69 +9301,47 @@"application/json"],"tags": [- "模型管理"+ "长期记忆"],- "summary": "创建模型",+ "summary": "新增一条记忆","parameters": [{- "description": "模型信息",+ "description": "记忆内容","name": "request","in": "body","required": true,"schema": {- "$ref": "#/definitions/internal_handler.CreateModelRequest"+ "type": "object"}}],"responses": {- "201": {- "description": "创建的模型",+ "200": {+ "description": "新增的记忆","schema": {"type": "object","additionalProperties": true}- },- "400": {- "description": "请求参数错误",- "schema": {- "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"- }}}- }- },- "/models/providers": {- "get": {+ },+ "delete": {"security": [{"Bearer": []- },- {- "ApiKeyAuth": []}],- "description": "根据模型类型获取支持的厂商列表及配置信息",- "consumes": [- "application/json"- ],+ "description": "永久删除当前用户的全部记忆","produces": ["application/json"],"tags": [- "模型管理"- ],- "summary": "获取模型厂商列表",- "parameters": [- {- "type": "string",- "description": "模型类型 (chat, embedding, rerank, vllm)",- "name": "model_type",- "in": "query"- }+ "长期记忆"],+ "summary": "清空我的记忆","responses": {"200": {- "description": "厂商列表",+ "description": "清空成功","schema": {"type": "object","additionalProperties": true@@ -9375,67 +9350,70 @@}}},- "/models/weknoracloud/status": {- "get": {+ "/memory/items/{id}": {+ "put": {"security": [{"Bearer": []- },- {- "ApiKeyAuth": []}],- "description": "检查当前空间的 WeKnoraCloud 凭证是否完好;needs_reinit=true 表示需要重新保存",+ "description": "修改记忆内容与重要度,修改后该条记忆不会被后台抽取覆盖",+ "consumes": [+ "application/json"+ ],"produces": ["application/json"],"tags": [- "WeKnoraCloud"+ "长期记忆"],- "summary": "检查 WeKnoraCloud 凭证状态",- "responses": {- "200": {- "description": "凭证状态",+ "summary": "修改一条记忆",+ "parameters": [+ {+ "type": "string",+ "description": "记忆ID",+ "name": "id",+ "in": "path",+ "required": true+ },+ {+ "description": "记忆内容",+ "name": "request",+ "in": "body",+ "required": true,"schema": {- "type": "object",- "additionalProperties": true+ "type": "object"}- },- "500": {- "description": "服务器错误",+ }+ ],+ "responses": {+ "200": {+ "description": "更新后的记忆","schema": {"type": "object","additionalProperties": true}}}- }- },- "/models/{id}": {- "get": {+ },+ "delete": {"security": [{"Bearer": []- },- {- "ApiKeyAuth": []}],- "description": "根据ID获取模型详情",- "consumes": [- "application/json"- ],+ "description": "永久删除一条记忆","produces": ["application/json"],"tags": [- "模型管理"+ "长期记忆"],- "summary": "获取模型详情",+ "summary": "删除一条记忆","parameters": [{"type": "string",- "description": "模型ID",+ "description": "记忆ID","name": "id","in": "path","required": true@@ -9443,98 +9421,69 @@],"responses": {"200": {- "description": "模型详情",+ "description": "删除成功","schema": {"type": "object","additionalProperties": true}- },- "404": {- "description": "模型不存在",- "schema": {- "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"- }}}- },- "put": {+ }+ },+ "/memory/items/{id}/confirm": {+ "post": {"security": [{"Bearer": []- },- {- "ApiKeyAuth": []}],- "description": "更新模型配置信息",- "consumes": [- "application/json"- ],+ "description": "接受系统推断的记忆,使其开始生效","produces": ["application/json"],"tags": [- "模型管理"+ "长期记忆"],- "summary": "更新模型",+ "summary": "确认一条推断出的记忆","parameters": [{"type": "string",- "description": "模型ID",+ "description": "记忆 ID","name": "id","in": "path","required": true- },- {- "description": "更新信息",- "name": "request",- "in": "body",- "required": true,- "schema": {- "$ref": "#/definitions/internal_handler.UpdateModelRequest"- }}],"responses": {"200": {- "description": "更新后的模型",+ "description": "确认成功","schema": {"type": "object","additionalProperties": true}- },- "404": {- "description": "模型不存在",- "schema": {- "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"- }}}- },- "delete": {+ }+ },+ "/memory/items/{id}/reject": {+ "post": {"security": [{"Bearer": []- },- {- "ApiKeyAuth": []}],- "description": "删除指定的模型",- "consumes": [- "application/json"- ],+ "description": "拒绝系统推断的记忆,并记住这次拒绝","produces": ["application/json"],"tags": [- "模型管理"+ "长期记忆"],- "summary": "删除模型",+ "summary": "否决一条推断出的记忆","parameters": [{"type": "string",- "description": "模型ID",+ "description": "记忆 ID","name": "id","in": "path","required": true@@ -9542,52 +9491,47 @@],"responses": {"200": {- "description": "删除成功",+ "description": "否决成功","schema": {"type": "object","additionalProperties": true}- },- "404": {- "description": "模型不存在",- "schema": {- "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"- }}}}},- "/organizations": {+ "/memory/settings": {"get": {"security": [{"Bearer": []}],- "description": "获取当前空间所属的所有组织,并附带各空间内知识库/智能体数量",+ "description": "返回合并后的记忆开关状态(空间级 + 个人级)与记忆条数","produces": ["application/json"],"tags": [- "组织管理"+ "长期记忆"],- "summary": "获取我的组织列表",+ "summary": "获取我的记忆设置","responses": {"200": {- "description": "OK",+ "description": "记忆设置","schema": {- "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.ListOrganizationsResponse"+ "type": "object",+ "additionalProperties": true}}}},- "post": {+ "put": {"security": [{"Bearer": []}],- "description": "创建新的组织,创建者自动成为管理员",+ "description": "开启或关闭当前用户自己的长期记忆","consumes": ["application/json"],@@ -9595,304 +9539,305 @@"application/json"],"tags": [- "组织管理"+ "长期记忆"],- "summary": "创建组织",+ "summary": "更新我的记忆设置","parameters": [{- "description": "组织信息",+ "description": "设置","name": "request","in": "body","required": true,"schema": {- "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.CreateOrganizationRequest"+ "type": "object"}}],"responses": {- "201": {- "description": "Created",+ "200": {+ "description": "更新后的设置","schema": {"type": "object","additionalProperties": true}- },- "400": {- "description": "Bad Request",- "schema": {- "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"- }}}}},- "/organizations/join": {- "post": {+ "/memory/topics": {+ "get": {"security": [{"Bearer": []}],- "description": "使用邀请码加入组织",- "consumes": [- "application/json"- ],+ "description": "返回已计数、尚未提升为长期关注的主题,以及距离阈值还差几次","produces": ["application/json"],"tags": [- "组织管理"+ "长期记忆"],- "summary": "通过邀请码加入组织",+ "summary": "列出正在观察的主题","parameters": [{- "description": "邀请码",- "name": "request",- "in": "body",- "required": true,- "schema": {- "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.JoinOrganizationRequest"- }+ "type": "integer",+ "default": 50,+ "description": "每页条数",+ "name": "limit",+ "in": "query"+ },+ {+ "type": "integer",+ "description": "偏移量",+ "name": "offset",+ "in": "query"}],"responses": {"200": {- "description": "OK",+ "description": "主题列表","schema": {"type": "object","additionalProperties": true}- },- "404": {- "description": "Not Found",- "schema": {- "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"- }}}}},- "/organizations/join-by-id": {- "post": {+ "/memory/topics/{id}": {+ "delete": {"security": [{"Bearer": []}],- "description": "加入已开放可被搜索的空间,无需邀请码",- "consumes": [- "application/json"- ],+ "description": "删除尚未提升的主题计数,并记住这次拒绝,之后不会再自动记为长期关注","produces": ["application/json"],"tags": [- "组织管理"+ "长期记忆"],- "summary": "通过空间 ID 加入(可搜索空间)",+ "summary": "停止跟踪一个主题","parameters": [{- "description": "空间 ID",- "name": "request",- "in": "body",- "required": true,- "schema": {- "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.JoinByOrganizationIDRequest"- }+ "type": "string",+ "description": "主题 ID",+ "name": "id",+ "in": "path",+ "required": true}],"responses": {"200": {- "description": "OK",+ "description": "删除成功","schema": {"type": "object","additionalProperties": true}- },- "403": {- "description": "Forbidden",- "schema": {- "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"- }}}}},- "/organizations/join-request": {+ "/memory/topics/{id}/promote": {"post": {"security": [{"Bearer": []}],- "description": "对需要审核的组织提交加入申请",- "consumes": [- "application/json"- ],+ "description": "不等待剩余次数,把正在观察的主题提升为一条长期关注记忆","produces": ["application/json"],"tags": [- "组织管理"+ "长期记忆"],- "summary": "提交加入申请",+ "summary": "立即记为长期关注","parameters": [{- "description": "申请信息",- "name": "request",- "in": "body",- "required": true,- "schema": {- "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.SubmitJoinRequestRequest"- }+ "type": "string",+ "description": "主题 ID",+ "name": "id",+ "in": "path",+ "required": true}],"responses": {"200": {- "description": "OK",+ "description": "新增的记忆","schema": {"type": "object","additionalProperties": true}- },- "400": {- "description": "Bad Request",- "schema": {- "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"- }}}}},- "/organizations/preview/{code}": {+ "/messages/chat-history-stats": {"get": {"security": [{"Bearer": []+ },+ {+ "ApiKeyAuth": []}],- "description": "通过邀请码获取组织基本信息(不加入)",+ "description": "获取聊天历史知识库的统计信息(已索引消息数、知识库大小等)",+ "consumes": [+ "application/json"+ ],"produces": ["application/json"],"tags": [- "组织管理"- ],- "summary": "通过邀请码预览组织",- "parameters": [- {- "type": "string",- "description": "邀请码",- "name": "code",- "in": "path",- "required": true- }+ "消息"],+ "summary": "获取聊天历史知识库统计","responses": {"200": {- "description": "OK",+ "description": "统计信息","schema": {"type": "object","additionalProperties": true}- },- "404": {- "description": "Not Found",- "schema": {- "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"- }}}}},- "/organizations/search": {- "get": {+ "/messages/search": {+ "post": {"security": [{"Bearer": []+ },+ {+ "ApiKeyAuth": []}],- "description": "搜索已开放可被搜索的空间,用于发现并加入",+ "description": "通过关键词和/或向量相似度搜索历史对话记录,支持关键词、向量、混合三种模式",+ "consumes": [+ "application/json"+ ],"produces": ["application/json"],"tags": [- "组织管理"+ "消息"],- "summary": "搜索可加入的空间",+ "summary": "搜索历史对话","parameters": [{- "type": "string",- "description": "搜索关键词(空间名称或描述)",- "name": "q",- "in": "query"- },- {- "type": "integer",- "default": 20,- "description": "返回数量限制",- "name": "limit",- "in": "query"+ "description": "搜索请求",+ "name": "request",+ "in": "body",+ "required": true,+ "schema": {+ "$ref": "#/definitions/internal_handler.SearchMessagesRequest"+ }}],"responses": {"200": {- "description": "OK",+ "description": "搜索结果","schema": {"type": "object","additionalProperties": true}+ },+ "400": {+ "description": "请求参数错误",+ "schema": {+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"+ }}}}},- "/organizations/{id}": {+ "/messages/{session_id}/load": {"get": {"security": [{"Bearer": []+ },+ {+ "ApiKeyAuth": []}],- "description": "根据ID获取组织详情",+ "description": "加载会话的消息历史,支持分页和时间筛选",+ "consumes": [+ "application/json"+ ],"produces": ["application/json"],"tags": [- "组织管理"+ "消息"],- "summary": "获取组织详情",+ "summary": "加载消息历史","parameters": [{"type": "string",- "description": "组织ID",- "name": "id",+ "description": "会话ID",+ "name": "session_id","in": "path","required": true+ },+ {+ "type": "integer",+ "default": 20,+ "description": "返回数量",+ "name": "limit",+ "in": "query"+ },+ {+ "type": "string",+ "description": "在此时间之前的消息(RFC3339Nano格式)",+ "name": "before_time",+ "in": "query"+ },+ {+ "enum": [+ "handle",+ "public"+ ],+ "type": "string",+ "default": "handle",+ "description": "文件引用形式,public 返回可加载直链",+ "name": "resource_urls",+ "in": "query"}],"responses": {"200": {- "description": "OK",+ "description": "消息列表","schema": {"type": "object","additionalProperties": true}},- "404": {- "description": "Not Found",+ "400": {+ "description": "请求参数错误","schema": {"$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"}}}- },- "put": {+ }+ },+ "/messages/{session_id}/{id}": {+ "delete": {"security": [{"Bearer": []+ },+ {+ "ApiKeyAuth": []}],- "description": "更新组织信息(需要管理员权限)",+ "description": "从会话中删除指定消息","consumes": ["application/json"],@@ -9900,58 +9845,20 @@"application/json"],"tags": [- "组织管理"+ "消息"],- "summary": "更新组织",+ "summary": "删除消息","parameters": [{"type": "string",- "description": "组织ID",- "name": "id",+ "description": "会话ID",+ "name": "session_id","in": "path","required": true},- {- "description": "更新信息",- "name": "request",- "in": "body",- "required": true,- "schema": {- "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.UpdateOrganizationRequest"- }- }- ],- "responses": {- "200": {- "description": "OK",- "schema": {- "type": "object",- "additionalProperties": true- }- },- "403": {- "description": "Forbidden",- "schema": {- "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"- }- }- }- },- "delete": {- "security": [- {- "Bearer": []- }- ],- "description": "删除组织(仅组织创建者可操作)",- "tags": [- "组织管理"- ],- "summary": "删除组织",- "parameters": [{"type": "string",- "description": "组织ID",+ "description": "消息ID","name": "id","in": "path","required": true@@ -9959,14 +9866,14 @@],"responses": {"200": {- "description": "OK",+ "description": "删除成功","schema": {"type": "object","additionalProperties": true}},- "403": {- "description": "Forbidden",+ "500": {+ "description": "服务器错误","schema": {"$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"}@@ -9974,7 +9881,7 @@}}},- "/organizations/{id}/agent-shares": {+ "/models": {"get": {"security": [{@@ -9984,48 +9891,43 @@"ApiKeyAuth": []}],- "description": "返回所有被共享到指定组织的智能体(含我的有效权限)",+ "description": "获取当前空间的所有模型",+ "consumes": [+ "application/json"+ ],"produces": ["application/json"],"tags": [- "组织"- ],- "summary": "获取共享到本组织的智能体",- "parameters": [- {- "type": "string",- "description": "组织 ID",- "name": "id",- "in": "path",- "required": true- }+ "模型管理"],+ "summary": "获取模型列表","responses": {"200": {- "description": "智能体共享列表 + total",+ "description": "模型列表","schema": {"type": "object","additionalProperties": true}},- "403": {- "description": "非组织成员",+ "400": {+ "description": "请求参数错误","schema": {"$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"}}}- }- },- "/organizations/{id}/invite": {+ },"post": {"security": [{"Bearer": []+ },+ {+ "ApiKeyAuth": []}],- "description": "管理员直接添加用户为组织成员",+ "description": "创建新的模型配置","consumes": ["application/json"],@@ -10033,43 +9935,30 @@"application/json"],"tags": [- "组织管理"+ "模型管理"],- "summary": "邀请成员",+ "summary": "创建模型","parameters": [{- "type": "string",- "description": "组织ID",- "name": "id",- "in": "path",- "required": true- },- {- "description": "邀请信息",+ "description": "模型信息","name": "request","in": "body","required": true,"schema": {- "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.InviteMemberRequest"+ "$ref": "#/definitions/internal_handler.CreateModelRequest"}}],"responses": {- "200": {- "description": "OK",+ "201": {+ "description": "创建的模型","schema": {"type": "object","additionalProperties": true}},"400": {- "description": "Bad Request",- "schema": {- "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"- }- },- "403": {- "description": "Forbidden",+ "description": "请求参数错误","schema": {"$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"}@@ -10077,66 +9966,107 @@}}},- "/organizations/{id}/invite-code": {- "post": {+ "/models/providers": {+ "get": {"security": [{"Bearer": []+ },+ {+ "ApiKeyAuth": []}],- "description": "生成新的组织邀请码(需要管理员权限)",+ "description": "根据模型类型获取支持的厂商列表及配置信息",+ "consumes": [+ "application/json"+ ],"produces": ["application/json"],"tags": [- "组织管理"+ "模型管理"],- "summary": "生成邀请码",+ "summary": "获取模型厂商列表","parameters": [{"type": "string",- "description": "组织ID",- "name": "id",- "in": "path",- "required": true+ "description": "模型类型 (chat, embedding, rerank, vllm)",+ "name": "model_type",+ "in": "query"}],"responses": {"200": {- "description": "OK",+ "description": "厂商列表","schema": {"type": "object","additionalProperties": true}+ }+ }+ }+ },+ "/models/weknoracloud/status": {+ "get": {+ "security": [+ {+ "Bearer": []},- "403": {- "description": "Forbidden",+ {+ "ApiKeyAuth": []+ }+ ],+ "description": "检查当前空间的 WeKnoraCloud 凭证是否完好;needs_reinit=true 表示需要重新保存",+ "produces": [+ "application/json"+ ],+ "tags": [+ "WeKnoraCloud"+ ],+ "summary": "检查 WeKnoraCloud 凭证状态",+ "responses": {+ "200": {+ "description": "凭证状态","schema": {- "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"+ "type": "object",+ "additionalProperties": true+ }+ },+ "500": {+ "description": "服务器错误",+ "schema": {+ "type": "object",+ "additionalProperties": true}}}}},- "/organizations/{id}/join-requests": {+ "/models/{id}": {"get": {"security": [{"Bearer": []+ },+ {+ "ApiKeyAuth": []}],- "description": "获取组织的待审核加入申请(仅管理员)",+ "description": "根据ID获取模型详情",+ "consumes": [+ "application/json"+ ],"produces": ["application/json"],"tags": [- "组织管理"+ "模型管理"],- "summary": "获取待审核加入申请列表",+ "summary": "获取模型详情","parameters": [{"type": "string",- "description": "组织ID",+ "description": "模型ID","name": "id","in": "path","required": true@@ -10144,29 +10074,30 @@],"responses": {"200": {- "description": "OK",+ "description": "模型详情","schema": {"type": "object","additionalProperties": true}},- "403": {- "description": "Forbidden",+ "404": {+ "description": "模型不存在","schema": {"$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"}}}- }- },- "/organizations/{id}/join-requests/{request_id}/review": {+ },"put": {"security": [{"Bearer": []+ },+ {+ "ApiKeyAuth": []}],- "description": "通过或拒绝加入申请(仅管理员)",+ "description": "更新模型配置信息","consumes": ["application/json"],@@ -10174,67 +10105,67 @@"application/json"],"tags": [- "组织管理"+ "模型管理"],- "summary": "审核加入申请",+ "summary": "更新模型","parameters": [{"type": "string",- "description": "组织ID",+ "description": "模型ID","name": "id","in": "path","required": true},{- "type": "string",- "description": "申请ID",- "name": "request_id",- "in": "path",- "required": true- },- {- "description": "审核结果",+ "description": "更新信息","name": "request","in": "body","required": true,"schema": {- "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.ReviewJoinRequestRequest"+ "$ref": "#/definitions/internal_handler.UpdateModelRequest"}}],"responses": {"200": {- "description": "OK",+ "description": "更新后的模型","schema": {"type": "object","additionalProperties": true}},- "403": {- "description": "Forbidden",+ "404": {+ "description": "模型不存在","schema": {"$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"}}}- }- },- "/organizations/{id}/leave": {- "post": {+ },+ "delete": {"security": [{"Bearer": []+ },+ {+ "ApiKeyAuth": []}],- "description": "退出指定组织",+ "description": "删除指定的模型",+ "consumes": [+ "application/json"+ ],+ "produces": [+ "application/json"+ ],"tags": [- "组织管理"+ "模型管理"],- "summary": "退出组织",+ "summary": "删除模型","parameters": [{"type": "string",- "description": "组织ID",+ "description": "模型ID","name": "id","in": "path","required": true@@ -10242,14 +10173,14 @@],"responses": {"200": {- "description": "OK",+ "description": "删除成功","schema": {"type": "object","additionalProperties": true}},- "403": {- "description": "Forbidden",+ "404": {+ "description": "模型不存在","schema": {"$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"}@@ -10257,48 +10188,37 @@}}},- "/organizations/{id}/members": {+ "/organizations": {"get": {"security": [{"Bearer": []}],- "description": "获取组织的所有成员(按空间)",+ "description": "获取当前空间所属的所有组织,并附带各空间内知识库/智能体数量","produces": ["application/json"],"tags": ["组织管理"],- "summary": "获取组织成员列表",- "parameters": [- {- "type": "string",- "description": "组织ID",- "name": "id",- "in": "path",- "required": true- }- ],+ "summary": "获取我的组织列表","responses": {"200": {"description": "OK","schema": {- "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.ListMembersResponse"+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.ListOrganizationsResponse"}}}- }- },- "/organizations/{id}/members/{tenant_id}": {- "put": {+ },+ "post": {"security": [{"Bearer": []}],- "description": "更新组织成员(空间)的角色(需要管理员权限)",+ "description": "创建新的组织,创建者自动成为管理员","consumes": ["application/json"],@@ -10308,73 +10228,62 @@"tags": ["组织管理"],- "summary": "更新成员角色",+ "summary": "创建组织","parameters": [{- "type": "string",- "description": "组织ID",- "name": "id",- "in": "path",- "required": true- },- {- "type": "string",- "description": "成员空间ID",- "name": "tenant_id",- "in": "path",- "required": true- },- {- "description": "角色信息",+ "description": "组织信息","name": "request","in": "body","required": true,"schema": {- "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.UpdateMemberRoleRequest"+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.CreateOrganizationRequest"}}],"responses": {- "200": {- "description": "OK",+ "201": {+ "description": "Created","schema": {"type": "object","additionalProperties": true}},- "403": {- "description": "Forbidden",+ "400": {+ "description": "Bad Request","schema": {"$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"}}}- },- "delete": {+ }+ },+ "/organizations/join": {+ "post": {"security": [{"Bearer": []}],- "description": "从组织中移除成员空间(需要管理员权限)",+ "description": "使用邀请码加入组织",+ "consumes": [+ "application/json"+ ],+ "produces": [+ "application/json"+ ],"tags": ["组织管理"],- "summary": "移除成员",+ "summary": "通过邀请码加入组织","parameters": [{- "type": "string",- "description": "组织ID",- "name": "id",- "in": "path",- "required": true- },- {- "type": "string",- "description": "成员空间ID",- "name": "tenant_id",- "in": "path",- "required": true+ "description": "邀请码",+ "name": "request",+ "in": "body",+ "required": true,+ "schema": {+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.JoinOrganizationRequest"+ }}],"responses": {@@ -10385,8 +10294,8 @@"additionalProperties": true}},- "403": {- "description": "Forbidden",+ "404": {+ "description": "Not Found","schema": {"$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"}@@ -10394,14 +10303,14 @@}}},- "/organizations/{id}/request-upgrade": {+ "/organizations/join-by-id": {"post": {"security": [{"Bearer": []}],- "description": "现有成员申请更高权限",+ "description": "加入已开放可被搜索的空间,无需邀请码","consumes": ["application/json"],@@ -10411,22 +10320,15 @@"tags": ["组织管理"],- "summary": "申请权限升级",+ "summary": "通过空间 ID 加入(可搜索空间)","parameters": [{- "type": "string",- "description": "组织ID",- "name": "id",- "in": "path",- "required": true- },- {- "description": "申请信息",+ "description": "空间 ID","name": "request","in": "body","required": true,"schema": {- "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.RequestRoleUpgradeRequest"+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.JoinByOrganizationIDRequest"}}],@@ -10438,8 +10340,8 @@"additionalProperties": true}},- "400": {- "description": "Bad Request",+ "403": {+ "description": "Forbidden","schema": {"$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"}@@ -10447,42 +10349,74 @@}}},- "/organizations/{id}/search-tenants": {- "get": {+ "/organizations/join-request": {+ "post": {"security": [{"Bearer": []}],- "description": "按空间名搜索可邀请的空间(排除已加入的空间)用于邀请加入组织;按空间去重",+ "description": "对需要审核的组织提交加入申请",+ "consumes": [+ "application/json"+ ],"produces": ["application/json"],"tags": ["组织管理"],- "summary": "搜索可邀请的空间",+ "summary": "提交加入申请","parameters": [{- "type": "string",- "description": "组织ID",- "name": "id",- "in": "path",- "required": true- },- {- "type": "string",- "description": "搜索关键词(空间名)",- "name": "q",- "in": "query",- "required": true- },+ "description": "申请信息",+ "name": "request",+ "in": "body",+ "required": true,+ "schema": {+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.SubmitJoinRequestRequest"+ }+ }+ ],+ "responses": {+ "200": {+ "description": "OK",+ "schema": {+ "type": "object",+ "additionalProperties": true+ }+ },+ "400": {+ "description": "Bad Request",+ "schema": {+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"+ }+ }+ }+ }+ },+ "/organizations/preview/{code}": {+ "get": {+ "security": [{- "type": "integer",- "default": 10,- "description": "返回数量限制",- "name": "limit",- "in": "query"+ "Bearer": []+ }+ ],+ "description": "通过邀请码获取组织基本信息(不加入)",+ "produces": [+ "application/json"+ ],+ "tags": [+ "组织管理"+ ],+ "summary": "通过邀请码预览组织",+ "parameters": [+ {+ "type": "string",+ "description": "邀请码",+ "name": "code",+ "in": "path",+ "required": true}],"responses": {@@ -10493,8 +10427,8 @@"additionalProperties": true}},- "403": {- "description": "Forbidden",+ "404": {+ "description": "Not Found","schema": {"$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"}@@ -10502,27 +10436,62 @@}}},- "/organizations/{id}/search-users": {+ "/organizations/search": {"get": {- "deprecated": true,- "responses": {}+ "security": [+ {+ "Bearer": []+ }+ ],+ "description": "搜索已开放可被搜索的空间,用于发现并加入",+ "produces": [+ "application/json"+ ],+ "tags": [+ "组织管理"+ ],+ "summary": "搜索可加入的空间",+ "parameters": [+ {+ "type": "string",+ "description": "搜索关键词(空间名称或描述)",+ "name": "q",+ "in": "query"+ },+ {+ "type": "integer",+ "default": 20,+ "description": "返回数量限制",+ "name": "limit",+ "in": "query"+ }+ ],+ "responses": {+ "200": {+ "description": "OK",+ "schema": {+ "type": "object",+ "additionalProperties": true+ }+ }+ }}},- "/organizations/{id}/shared-agents": {+ "/organizations/{id}": {"get": {"security": [{"Bearer": []}],- "description": "获取指定空间下所有共享智能体,包含他人共享的与我共享的,用于列表页空间视角",+ "description": "根据ID获取组织详情","produces": ["application/json"],"tags": ["组织管理"],- "summary": "获取空间内全部智能体(含我共享的)",+ "summary": "获取组织详情","parameters": [{"type": "string",@@ -10539,25 +10508,77 @@"type": "object","additionalProperties": true}+ },+ "404": {+ "description": "Not Found",+ "schema": {+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"+ }}}- }- },- "/organizations/{id}/shared-knowledge-bases": {- "get": {+ },+ "put": {"security": [{"Bearer": []}],- "description": "获取指定空间下所有共享知识库,包含直接共享的与通过共享智能体可见的,用于列表页空间视角",+ "description": "更新组织信息(需要管理员权限)",+ "consumes": [+ "application/json"+ ],"produces": ["application/json"],"tags": ["组织管理"],- "summary": "获取空间内全部知识库(含我共享的、含智能体携带的)",+ "summary": "更新组织",+ "parameters": [+ {+ "type": "string",+ "description": "组织ID",+ "name": "id",+ "in": "path",+ "required": true+ },+ {+ "description": "更新信息",+ "name": "request",+ "in": "body",+ "required": true,+ "schema": {+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.UpdateOrganizationRequest"+ }+ }+ ],+ "responses": {+ "200": {+ "description": "OK",+ "schema": {+ "type": "object",+ "additionalProperties": true+ }+ },+ "403": {+ "description": "Forbidden",+ "schema": {+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"+ }+ }+ }+ },+ "delete": {+ "security": [+ {+ "Bearer": []+ }+ ],+ "description": "删除组织(仅组织创建者可操作)",+ "tags": [+ "组织管理"+ ],+ "summary": "删除组织","parameters": [{"type": "string",@@ -10574,25 +10595,78 @@"type": "object","additionalProperties": true}+ },+ "403": {+ "description": "Forbidden",+ "schema": {+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"+ }}}}},- "/organizations/{id}/shares": {+ "/organizations/{id}/agent-shares": {"get": {"security": [{"Bearer": []+ },+ {+ "ApiKeyAuth": []}],- "description": "获取共享到指定组织的所有知识库",+ "description": "返回所有被共享到指定组织的智能体(含我的有效权限)",+ "produces": [+ "application/json"+ ],+ "tags": [+ "组织"+ ],+ "summary": "获取共享到本组织的智能体",+ "parameters": [+ {+ "type": "string",+ "description": "组织 ID",+ "name": "id",+ "in": "path",+ "required": true+ }+ ],+ "responses": {+ "200": {+ "description": "智能体共享列表 + total",+ "schema": {+ "type": "object",+ "additionalProperties": true+ }+ },+ "403": {+ "description": "非组织成员",+ "schema": {+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"+ }+ }+ }+ }+ },+ "/organizations/{id}/invite": {+ "post": {+ "security": [+ {+ "Bearer": []+ }+ ],+ "description": "管理员直接添加用户为组织成员",+ "consumes": [+ "application/json"+ ],"produces": ["application/json"],"tags": ["组织管理"],- "summary": "获取组织的共享知识库列表",+ "summary": "邀请成员","parameters": [{"type": "string",@@ -10600,19 +10674,899 @@"name": "id","in": "path","required": true+ },+ {+ "description": "邀请信息",+ "name": "request",+ "in": "body",+ "required": true,+ "schema": {+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.InviteMemberRequest"+ }}],"responses": {"200": {"description": "OK","schema": {- "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.ListSharesResponse"+ "type": "object",+ "additionalProperties": true+ }+ },+ "400": {+ "description": "Bad Request",+ "schema": {+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"+ }+ },+ "403": {+ "description": "Forbidden",+ "schema": {+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"+ }+ }+ }+ }+ },+ "/organizations/{id}/invite-code": {+ "post": {+ "security": [+ {+ "Bearer": []+ }+ ],+ "description": "生成新的组织邀请码(需要管理员权限)",+ "produces": [+ "application/json"+ ],+ "tags": [+ "组织管理"+ ],+ "summary": "生成邀请码",+ "parameters": [+ {+ "type": "string",+ "description": "组织ID",+ "name": "id",+ "in": "path",+ "required": true+ }+ ],+ "responses": {+ "200": {+ "description": "OK",+ "schema": {+ "type": "object",+ "additionalProperties": true+ }+ },+ "403": {+ "description": "Forbidden",+ "schema": {+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"+ }+ }+ }+ }+ },+ "/organizations/{id}/join-requests": {+ "get": {+ "security": [+ {+ "Bearer": []+ }+ ],+ "description": "获取组织的待审核加入申请(仅管理员)",+ "produces": [+ "application/json"+ ],+ "tags": [+ "组织管理"+ ],+ "summary": "获取待审核加入申请列表",+ "parameters": [+ {+ "type": "string",+ "description": "组织ID",+ "name": "id",+ "in": "path",+ "required": true+ }+ ],+ "responses": {+ "200": {+ "description": "OK",+ "schema": {+ "type": "object",+ "additionalProperties": true+ }+ },+ "403": {+ "description": "Forbidden",+ "schema": {+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"+ }+ }+ }+ }+ },+ "/organizations/{id}/join-requests/{request_id}/review": {+ "put": {+ "security": [+ {+ "Bearer": []+ }+ ],+ "description": "通过或拒绝加入申请(仅管理员)",+ "consumes": [+ "application/json"+ ],+ "produces": [+ "application/json"+ ],+ "tags": [+ "组织管理"+ ],+ "summary": "审核加入申请",+ "parameters": [+ {+ "type": "string",+ "description": "组织ID",+ "name": "id",+ "in": "path",+ "required": true+ },+ {+ "type": "string",+ "description": "申请ID",+ "name": "request_id",+ "in": "path",+ "required": true+ },+ {+ "description": "审核结果",+ "name": "request",+ "in": "body",+ "required": true,+ "schema": {+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.ReviewJoinRequestRequest"+ }+ }+ ],+ "responses": {+ "200": {+ "description": "OK",+ "schema": {+ "type": "object",+ "additionalProperties": true+ }+ },+ "403": {+ "description": "Forbidden",+ "schema": {+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"+ }+ }+ }+ }+ },+ "/organizations/{id}/leave": {+ "post": {+ "security": [+ {+ "Bearer": []+ }+ ],+ "description": "退出指定组织",+ "tags": [+ "组织管理"+ ],+ "summary": "退出组织",+ "parameters": [+ {+ "type": "string",+ "description": "组织ID",+ "name": "id",+ "in": "path",+ "required": true+ }+ ],+ "responses": {+ "200": {+ "description": "OK",+ "schema": {+ "type": "object",+ "additionalProperties": true+ }+ },+ "403": {+ "description": "Forbidden",+ "schema": {+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"+ }+ }+ }+ }+ },+ "/organizations/{id}/members": {+ "get": {+ "security": [+ {+ "Bearer": []+ }+ ],+ "description": "获取组织的所有成员(按空间)",+ "produces": [+ "application/json"+ ],+ "tags": [+ "组织管理"+ ],+ "summary": "获取组织成员列表",+ "parameters": [+ {+ "type": "string",+ "description": "组织ID",+ "name": "id",+ "in": "path",+ "required": true+ }+ ],+ "responses": {+ "200": {+ "description": "OK",+ "schema": {+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.ListMembersResponse"+ }+ }+ }+ }+ },+ "/organizations/{id}/members/{tenant_id}": {+ "put": {+ "security": [+ {+ "Bearer": []+ }+ ],+ "description": "更新组织成员(空间)的角色(需要管理员权限)",+ "consumes": [+ "application/json"+ ],+ "produces": [+ "application/json"+ ],+ "tags": [+ "组织管理"+ ],+ "summary": "更新成员角色",+ "parameters": [+ {+ "type": "string",+ "description": "组织ID",+ "name": "id",+ "in": "path",+ "required": true+ },+ {+ "type": "string",+ "description": "成员空间ID",+ "name": "tenant_id",+ "in": "path",+ "required": true+ },+ {+ "description": "角色信息",+ "name": "request",+ "in": "body",+ "required": true,+ "schema": {+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.UpdateMemberRoleRequest"+ }+ }+ ],+ "responses": {+ "200": {+ "description": "OK",+ "schema": {+ "type": "object",+ "additionalProperties": true+ }+ },+ "403": {+ "description": "Forbidden",+ "schema": {+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"+ }+ }+ }+ },+ "delete": {+ "security": [+ {+ "Bearer": []+ }+ ],+ "description": "从组织中移除成员空间(需要管理员权限)",+ "tags": [+ "组织管理"+ ],+ "summary": "移除成员",+ "parameters": [+ {+ "type": "string",+ "description": "组织ID",+ "name": "id",+ "in": "path",+ "required": true+ },+ {+ "type": "string",+ "description": "成员空间ID",+ "name": "tenant_id",+ "in": "path",+ "required": true+ }+ ],+ "responses": {+ "200": {+ "description": "OK",+ "schema": {+ "type": "object",+ "additionalProperties": true+ }+ },+ "403": {+ "description": "Forbidden",+ "schema": {+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"+ }+ }+ }+ }+ },+ "/organizations/{id}/request-upgrade": {+ "post": {+ "security": [+ {+ "Bearer": []+ }+ ],+ "description": "现有成员申请更高权限",+ "consumes": [+ "application/json"+ ],+ "produces": [+ "application/json"+ ],+ "tags": [+ "组织管理"+ ],+ "summary": "申请权限升级",+ "parameters": [+ {+ "type": "string",+ "description": "组织ID",+ "name": "id",+ "in": "path",+ "required": true+ },+ {+ "description": "申请信息",+ "name": "request",+ "in": "body",+ "required": true,+ "schema": {+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.RequestRoleUpgradeRequest"+ }+ }+ ],+ "responses": {+ "200": {+ "description": "OK",+ "schema": {+ "type": "object",+ "additionalProperties": true+ }+ },+ "400": {+ "description": "Bad Request",+ "schema": {+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"+ }+ }+ }+ }+ },+ "/organizations/{id}/search-tenants": {+ "get": {+ "security": [+ {+ "Bearer": []+ }+ ],+ "description": "按空间名搜索可邀请的空间(排除已加入的空间)用于邀请加入组织;按空间去重",+ "produces": [+ "application/json"+ ],+ "tags": [+ "组织管理"+ ],+ "summary": "搜索可邀请的空间",+ "parameters": [+ {+ "type": "string",+ "description": "组织ID",+ "name": "id",+ "in": "path",+ "required": true+ },+ {+ "type": "string",+ "description": "搜索关键词(空间名)",+ "name": "q",+ "in": "query",+ "required": true+ },+ {+ "type": "integer",+ "default": 10,+ "description": "返回数量限制",+ "name": "limit",+ "in": "query"+ }+ ],+ "responses": {+ "200": {+ "description": "OK",+ "schema": {+ "type": "object",+ "additionalProperties": true+ }+ },+ "403": {+ "description": "Forbidden",+ "schema": {+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"+ }+ }+ }+ }+ },+ "/organizations/{id}/search-users": {+ "get": {+ "deprecated": true,+ "responses": {}+ }+ },+ "/organizations/{id}/shared-agents": {+ "get": {+ "security": [+ {+ "Bearer": []+ }+ ],+ "description": "获取指定空间下所有共享智能体,包含他人共享的与我共享的,用于列表页空间视角",+ "produces": [+ "application/json"+ ],+ "tags": [+ "组织管理"+ ],+ "summary": "获取空间内全部智能体(含我共享的)",+ "parameters": [+ {+ "type": "string",+ "description": "组织ID",+ "name": "id",+ "in": "path",+ "required": true+ }+ ],+ "responses": {+ "200": {+ "description": "OK",+ "schema": {+ "type": "object",+ "additionalProperties": true+ }+ }+ }+ }+ },+ "/organizations/{id}/shared-knowledge-bases": {+ "get": {+ "security": [+ {+ "Bearer": []+ }+ ],+ "description": "获取指定空间下所有共享知识库,包含直接共享的与通过共享智能体可见的,用于列表页空间视角",+ "produces": [+ "application/json"+ ],+ "tags": [+ "组织管理"+ ],+ "summary": "获取空间内全部知识库(含我共享的、含智能体携带的)",+ "parameters": [+ {+ "type": "string",+ "description": "组织ID",+ "name": "id",+ "in": "path",+ "required": true+ }+ ],+ "responses": {+ "200": {+ "description": "OK",+ "schema": {+ "type": "object",+ "additionalProperties": true+ }+ }+ }+ }+ },+ "/organizations/{id}/shares": {+ "get": {+ "security": [+ {+ "Bearer": []+ }+ ],+ "description": "获取共享到指定组织的所有知识库",+ "produces": [+ "application/json"+ ],+ "tags": [+ "组织管理"+ ],+ "summary": "获取组织的共享知识库列表",+ "parameters": [+ {+ "type": "string",+ "description": "组织ID",+ "name": "id",+ "in": "path",+ "required": true+ }+ ],+ "responses": {+ "200": {+ "description": "OK",+ "schema": {+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.ListSharesResponse"+ }+ }+ }+ }+ },+ "/sandbox-configs": {+ "get": {+ "security": [+ {+ "Bearer": []+ },+ {+ "ApiKeyAuth": []+ }+ ],+ "description": "List workspace sandbox backend configs with credentials masked.",+ "produces": [+ "application/json"+ ],+ "tags": [+ "SandboxConfig"+ ],+ "summary": "List sandbox configs",+ "responses": {+ "200": {+ "description": "Sandbox configs and defaults",+ "schema": {+ "type": "object",+ "additionalProperties": true+ }+ },+ "401": {+ "description": "Unauthorized",+ "schema": {+ "type": "object",+ "additionalProperties": true+ }+ }+ }+ },+ "post": {+ "security": [+ {+ "Bearer": []+ },+ {+ "ApiKeyAuth": []+ }+ ],+ "description": "Create a named workspace sandbox backend config. Credentials are masked in the response.",+ "consumes": [+ "application/json"+ ],+ "produces": [+ "application/json"+ ],+ "tags": [+ "SandboxConfig"+ ],+ "summary": "Create sandbox config",+ "parameters": [+ {+ "description": "Sandbox backend config",+ "name": "request",+ "in": "body",+ "required": true,+ "schema": {+ "$ref": "#/definitions/internal_handler.sandboxConfigRequest"+ }+ }+ ],+ "responses": {+ "201": {+ "description": "Created sandbox config",+ "schema": {+ "type": "object",+ "additionalProperties": true+ }+ },+ "400": {+ "description": "Invalid request or validation failure",+ "schema": {+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"+ }+ },+ "401": {+ "description": "Unauthorized",+ "schema": {+ "type": "object",+ "additionalProperties": true+ }+ }+ }+ }+ },+ "/sandbox-configs/{id}": {+ "get": {+ "security": [+ {+ "Bearer": []+ },+ {+ "ApiKeyAuth": []+ }+ ],+ "description": "Retrieve a workspace sandbox backend config with credentials masked.",+ "produces": [+ "application/json"+ ],+ "tags": [+ "SandboxConfig"+ ],+ "summary": "Get sandbox config",+ "parameters": [+ {+ "type": "string",+ "description": "Sandbox config ID",+ "name": "id",+ "in": "path",+ "required": true+ }+ ],+ "responses": {+ "200": {+ "description": "Sandbox config",+ "schema": {+ "type": "object",+ "additionalProperties": true+ }+ },+ "401": {+ "description": "Unauthorized",+ "schema": {+ "type": "object",+ "additionalProperties": true+ }+ },+ "404": {+ "description": "Sandbox config not found",+ "schema": {+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"+ }+ }+ }+ },+ "put": {+ "security": [+ {+ "Bearer": []+ },+ {+ "ApiKeyAuth": []+ }+ ],+ "description": "Update a sandbox backend config. Identity-field changes are refused while the config owns live or paused sandboxes.",+ "consumes": [+ "application/json"+ ],+ "produces": [+ "application/json"+ ],+ "tags": [+ "SandboxConfig"+ ],+ "summary": "Update sandbox config",+ "parameters": [+ {+ "type": "string",+ "description": "Sandbox config ID",+ "name": "id",+ "in": "path",+ "required": true+ },+ {+ "description": "Updated sandbox config",+ "name": "request",+ "in": "body",+ "required": true,+ "schema": {+ "$ref": "#/definitions/internal_handler.sandboxConfigRequest"+ }+ }+ ],+ "responses": {+ "200": {+ "description": "Updated sandbox config",+ "schema": {+ "type": "object",+ "additionalProperties": true+ }+ },+ "400": {+ "description": "Invalid request or validation failure",+ "schema": {+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"+ }+ },+ "401": {+ "description": "Unauthorized",+ "schema": {+ "type": "object",+ "additionalProperties": true+ }+ },+ "404": {+ "description": "Sandbox config not found",+ "schema": {+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"+ }+ },+ "409": {+ "description": "Live sandboxes or unverifiable inventory",+ "schema": {+ "type": "object",+ "additionalProperties": true+ }+ },+ "423": {+ "description": "Sandbox config is being modified by another request",+ "schema": {+ "type": "object",+ "additionalProperties": true+ }+ }+ }+ },+ "delete": {+ "security": [+ {+ "Bearer": []+ },+ {+ "ApiKeyAuth": []+ }+ ],+ "description": "Soft-delete a sandbox backend config. force=true only overrides unverifiable provider inventory, never confirmed live sandboxes.",+ "produces": [+ "application/json"+ ],+ "tags": [+ "SandboxConfig"+ ],+ "summary": "Delete sandbox config",+ "parameters": [+ {+ "type": "string",+ "description": "Sandbox config ID",+ "name": "id",+ "in": "path",+ "required": true+ },+ {+ "type": "boolean",+ "description": "Force delete when inventory is unverifiable",+ "name": "force",+ "in": "query"+ }+ ],+ "responses": {+ "200": {+ "description": "Deletion success",+ "schema": {+ "type": "object",+ "additionalProperties": true+ }+ },+ "401": {+ "description": "Unauthorized",+ "schema": {+ "type": "object",+ "additionalProperties": true+ }+ },+ "409": {+ "description": "Live sandboxes or unverifiable inventory",+ "schema": {+ "type": "object",+ "additionalProperties": true+ }+ }+ }+ }+ },+ "/sandbox-configs/{id}/sandboxes": {+ "get": {+ "security": [+ {+ "Bearer": []+ },+ {+ "ApiKeyAuth": []+ }+ ],+ "description": "Return live/paused sandbox inventory and affected agent names for one config.",+ "produces": [+ "application/json"+ ],+ "tags": [+ "SandboxConfig"+ ],+ "summary": "Inspect sandbox config inventory",+ "parameters": [+ {+ "type": "string",+ "description": "Sandbox config ID",+ "name": "id",+ "in": "path",+ "required": true+ }+ ],+ "responses": {+ "200": {+ "description": "Sandbox inventory",+ "schema": {+ "type": "object",+ "additionalProperties": true+ }+ },+ "401": {+ "description": "Unauthorized",+ "schema": {+ "type": "object",+ "additionalProperties": true}}}}},- "/sandbox-configs": {+ "/sandbox-configs/{id}/skills": {"get": {"security": [{@@ -10622,17 +11576,26 @@"ApiKeyAuth": []}],- "description": "List workspace sandbox backend configs with credentials masked.",+ "description": "List the agent skills installed onto one sandbox config's image.","produces": ["application/json"],"tags": ["SandboxConfig"],- "summary": "List sandbox configs",+ "summary": "List installed skills",+ "parameters": [+ {+ "type": "string",+ "description": "Sandbox config ID",+ "name": "id",+ "in": "path",+ "required": true+ }+ ],"responses": {"200": {- "description": "Sandbox configs and defaults",+ "description": "Installed skills","schema": {"type": "object","additionalProperties": true@@ -10644,6 +11607,12 @@"type": "object","additionalProperties": true}+ },+ "404": {+ "description": "Sandbox config not found",+ "schema": {+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"+ }}}},@@ -10656,9 +11625,10 @@"ApiKeyAuth": []}],- "description": "Create a named workspace sandbox backend config. Credentials are masked in the response.",+ "description": "Install a skill onto this sandbox config's image. Send a zip\nas multipart form field \"file\", or JSON {\"source\":\"...\"} to\npull from ClawHub, SkillHub, skills.sh, GitHub, GitLab, or a\ndirect archive URL. The source must be readable anonymously.\nThe install boots a sandbox and runs for minutes, so the\nrequest is only accepted; follow it via the install-events\nstream.","consumes": [- "application/json"+ "application/json",+ "multipart/form-data"],"produces": ["application/json"@@ -10666,28 +11636,40 @@"tags": ["SandboxConfig"],- "summary": "Create sandbox config",+ "summary": "Install a skill","parameters": [{- "description": "Sandbox backend config",+ "type": "string",+ "description": "Sandbox config ID",+ "name": "id",+ "in": "path",+ "required": true+ },+ {+ "type": "file",+ "description": "Skill bundle (zip)",+ "name": "file",+ "in": "formData"+ },+ {+ "description": "Install from a registry, git host, or archive URL","name": "request","in": "body",- "required": true,"schema": {- "$ref": "#/definitions/internal_handler.sandboxConfigRequest"+ "$ref": "#/definitions/internal_handler.skillSourceRequest"}}],"responses": {- "201": {- "description": "Created sandbox config",+ "202": {+ "description": "Install accepted","schema": {"type": "object","additionalProperties": true}},"400": {- "description": "Invalid request or validation failure",+ "description": "Missing, oversized or invalid bundle or source","schema": {"$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"}@@ -10698,11 +11680,17 @@"type": "object","additionalProperties": true}+ },+ "404": {+ "description": "Sandbox config not found",+ "schema": {+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"+ }}}}},- "/sandbox-configs/{id}": {+ "/sandbox-configs/{id}/skills/{skillId}": {"get": {"security": [{@@ -10712,14 +11700,14 @@"ApiKeyAuth": []}],- "description": "Retrieve a workspace sandbox backend config with credentials masked.",+ "description": "Retrieve one installed skill of a sandbox config.","produces": ["application/json"],"tags": ["SandboxConfig"],- "summary": "Get sandbox config",+ "summary": "Get an installed skill","parameters": [{"type": "string",@@ -10727,11 +11715,18 @@"name": "id","in": "path","required": true+ },+ {+ "type": "string",+ "description": "Skill ID",+ "name": "skillId",+ "in": "path",+ "required": true}],"responses": {"200": {- "description": "Sandbox config",+ "description": "Installed skill","schema": {"type": "object","additionalProperties": true@@ -10745,14 +11740,14 @@}},"404": {- "description": "Sandbox config not found",+ "description": "Skill not found","schema": {"$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"}}}},- "put": {+ "delete": {"security": [{"Bearer": []@@ -10761,7 +11756,63 @@"ApiKeyAuth": []}],- "description": "Update a sandbox backend config. Identity-field changes are refused while the config owns live or paused sandboxes.",+ "description": "Remove a skill from the config's image. The removal rebuilds\nthe image and runs for minutes, so it is only accepted; follow\nit via the install-events stream.",+ "produces": [+ "application/json"+ ],+ "tags": [+ "SandboxConfig"+ ],+ "summary": "Remove an installed skill",+ "parameters": [+ {+ "type": "string",+ "description": "Sandbox config ID",+ "name": "id",+ "in": "path",+ "required": true+ },+ {+ "type": "string",+ "description": "Skill ID",+ "name": "skillId",+ "in": "path",+ "required": true+ }+ ],+ "responses": {+ "202": {+ "description": "Removal accepted",+ "schema": {+ "type": "object",+ "additionalProperties": true+ }+ },+ "401": {+ "description": "Unauthorized",+ "schema": {+ "type": "object",+ "additionalProperties": true+ }+ },+ "404": {+ "description": "Skill not found",+ "schema": {+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"+ }+ }+ }+ },+ "patch": {+ "security": [+ {+ "Bearer": []+ },+ {+ "ApiKeyAuth": []+ }+ ],+ "description": "Show or hide an installed skill. The files stay in the image either way; removal is a separate flow.","consumes": ["application/json"],@@ -10771,7 +11822,7 @@"tags": ["SandboxConfig"],- "summary": "Update sandbox config",+ "summary": "Update an installed skill","parameters": [{"type": "string",@@ -10781,25 +11832,32 @@"required": true},{- "description": "Updated sandbox config",+ "type": "string",+ "description": "Skill ID",+ "name": "skillId",+ "in": "path",+ "required": true+ },+ {+ "description": "Fields to update","name": "request","in": "body","required": true,"schema": {- "$ref": "#/definitions/internal_handler.sandboxConfigRequest"+ "$ref": "#/definitions/internal_handler.skillPatchRequest"}}],"responses": {"200": {- "description": "Updated sandbox config",+ "description": "Updated skill","schema": {"type": "object","additionalProperties": true}},"400": {- "description": "Invalid request or validation failure",+ "description": "Invalid request","schema": {"$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"}@@ -10812,28 +11870,16 @@}},"404": {- "description": "Sandbox config not found",+ "description": "Skill not found","schema": {"$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"}- },- "409": {- "description": "Live sandboxes or unverifiable inventory",- "schema": {- "type": "object",- "additionalProperties": true- }- },- "423": {- "description": "Sandbox config is being modified by another request",- "schema": {- "type": "object",- "additionalProperties": true- }}}- },- "delete": {+ }+ },+ "/sandbox-configs/{id}/skills/{skillId}/install-events": {+ "get": {"security": [{"Bearer": []@@ -10842,14 +11888,14 @@"ApiKeyAuth": []}],- "description": "Soft-delete a sandbox backend config. force=true only overrides unverifiable provider inventory, never confirmed live sandboxes.",+ "description": "Server-sent progress for one install or removal. The stream\nalways terminates: with the run's own terminal event, with one\nderived from the durable status, or with a \"detached\" frame\nwhen it stops following a run that is still going.","produces": [- "application/json"+ "text/event-stream"],"tags": ["SandboxConfig"],- "summary": "Delete sandbox config",+ "summary": "Follow an install or removal","parameters": [{"type": "string",@@ -10859,18 +11905,18 @@"required": true},{- "type": "boolean",- "description": "Force delete when inventory is unverifiable",- "name": "force",- "in": "query"+ "type": "string",+ "description": "Skill ID",+ "name": "skillId",+ "in": "path",+ "required": true}],"responses": {"200": {- "description": "Deletion success",+ "description": "SSE stream of progress events","schema": {- "type": "object",- "additionalProperties": true+ "type": "string"}},"401": {@@ -10880,17 +11926,16 @@"additionalProperties": true}},- "409": {- "description": "Live sandboxes or unverifiable inventory",+ "404": {+ "description": "Skill not found","schema": {- "type": "object",- "additionalProperties": true+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"}}}}},- "/sandbox-configs/{id}/sandboxes": {+ "/sandbox-configs/{id}/skills/{skillId}/transcript": {"get": {"security": [{@@ -10900,14 +11945,14 @@"ApiKeyAuth": []}],- "description": "Return live/paused sandbox inventory and affected agent names for one config.",+ "description": "Server-sent replay of everything the installer agent did — the\nprompt it was given, its thinking, the commands it ran and\ntheir output — followed live while the install is still\nrunning. Frames are the same shape the chat stream uses, so a\nconsole renders an install with the components it renders a\nchat turn with. 404 once the event log has expired; the\ndurable message history is the fallback.","produces": [- "application/json"+ "text/event-stream"],"tags": ["SandboxConfig"],- "summary": "Inspect sandbox config inventory",+ "summary": "Follow an install's agent transcript","parameters": [{"type": "string",@@ -10915,14 +11960,20 @@"name": "id","in": "path","required": true+ },+ {+ "type": "string",+ "description": "Skill ID",+ "name": "skillId",+ "in": "path",+ "required": true}],"responses": {"200": {- "description": "Sandbox inventory",+ "description": "SSE stream of transcript events","schema": {- "type": "object",- "additionalProperties": true+ "type": "string"}},"401": {@@ -10931,6 +11982,12 @@"type": "object","additionalProperties": true}+ },+ "404": {+ "description": "Skill or transcript not found",+ "schema": {+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"+ }}}}@@ -11166,66 +12223,6 @@}}},- "/knowledge-search": {- "post": {- "security": [- {- "Bearer": []- },- {- "ApiKeyAuth": []- }- ],- "description": "在知识库中搜索(不使用LLM总结)",- "consumes": [- "application/json"- ],- "produces": [- "application/json"- ],- "tags": [- "问答"- ],- "summary": "知识搜索",- "parameters": [- {- "description": "搜索请求",- "name": "request",- "in": "body",- "required": true,- "schema": {- "$ref": "#/definitions/internal_handler_session.SearchKnowledgeRequest"- }- },- {- "enum": [- "handle",- "public"- ],- "type": "string",- "default": "handle",- "description": "文件引用形式,public 返回可加载直链",- "name": "resource_urls",- "in": "query"- }- ],- "responses": {- "200": {- "description": "搜索结果",- "schema": {- "type": "object",- "additionalProperties": true- }- },- "400": {- "description": "请求参数错误",- "schema": {- "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"- }- }- }- }- },"/sessions/{id}": {"get": {"security": [@@ -11895,7 +12892,7 @@"ApiKeyAuth": []}],- "description": "获取所有预装的Agent Skills元数据",+ "description": "返回指定沙盒配置镜像内、智能体实际能调用的已安装技能(ready 且启用)。不传 sandbox_config_id 时列表为空。","consumes": ["application/json"],@@ -11905,19 +12902,21 @@"tags": ["Skills"],- "summary": "获取预装Skills列表",+ "summary": "获取当前沙盒配置上可执行的 Skills",+ "parameters": [+ {+ "type": "string",+ "description": "Sandbox config ID",+ "name": "sandbox_config_id",+ "in": "query"+ }+ ],"responses": {"200": {"description": "Skills列表","schema": {- "type": "object",- "additionalProperties": true- }- },- "500": {- "description": "服务器错误",- "schema": {- "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"+ "type": "object",+ "additionalProperties": true}}}@@ -13021,6 +14020,74 @@}}},+ "/system/admin/users/create": {+ "post": {+ "description": "Provision a new local user account (SystemAdmin only).\nWhen `password` is omitted or null, a cryptographically random\npassword is generated (OIDC-style crypto/rand + base64url)\nand returned once in the response body. Any provided value,\nincluding empty string, is policy-checked. Tenant provisioning\nfollows the shared auth.default_tenant_mode policy.",+ "consumes": [+ "application/json"+ ],+ "produces": [+ "application/json"+ ],+ "tags": [+ "System Admin"+ ],+ "summary": "Create a new user (SystemAdmin)",+ "parameters": [+ {+ "description": "User creation request",+ "name": "request",+ "in": "body",+ "required": true,+ "schema": {+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.AdminCreateUserRequest"+ }+ }+ ],+ "responses": {+ "200": {+ "description": "Identity already exists, returns the existing user",+ "schema": {+ "$ref": "#/definitions/internal_handler.CreateSystemUserResponse"+ }+ },+ "201": {+ "description": "User created successfully",+ "schema": {+ "$ref": "#/definitions/internal_handler.CreateSystemUserResponse"+ }+ },+ "400": {+ "description": "Invalid request or weak password",+ "schema": {+ "type": "object",+ "additionalProperties": true+ }+ },+ "403": {+ "description": "Forbidden: not a system admin",+ "schema": {+ "type": "object",+ "additionalProperties": true+ }+ },+ "409": {+ "description": "Email and username refer to conflicting identities",+ "schema": {+ "type": "object",+ "additionalProperties": true+ }+ },+ "500": {+ "description": "Internal error",+ "schema": {+ "type": "object",+ "additionalProperties": true+ }+ }+ }+ }+ },"/system/admin/users/reset-password": {"post": {"description": "Replace another user's local password and revoke all of their existing sessions (SystemAdmin only).\nA system administrator cannot reset their own password through this endpoint; self-service password change still requires the old password.",@@ -15706,6 +16773,26 @@}}},+ "github_com_Tencent_WeKnora_internal_types.AdminCreateUserRequest": {+ "type": "object",+ "required": [+ "email",+ "username"+ ],+ "properties": {+ "email": {+ "type": "string"+ },+ "password": {+ "type": "string"+ },+ "username": {+ "type": "string",+ "maxLength": 50,+ "minLength": 2+ }+ }+ },"github_com_Tencent_WeKnora_internal_types.AgentStep": {"type": "object","properties": {@@ -15768,6 +16855,7 @@"system.admin_promoted","system.admin_revoked","system.user_password_reset",+ "system.user_created","system.api_key_created","system.api_key_revoked","system.queue_task_retried",@@ -15831,6 +16919,7 @@"AuditActionSystemAdminPromoted","AuditActionSystemAdminRevoked","AuditActionSystemUserPasswordReset",+ "AuditActionSystemUserCreated","AuditActionSystemAPIKeyCreated","AuditActionSystemAPIKeyRevoked","AuditActionSystemQueueTaskRetried",@@ -16385,6 +17474,10 @@"type": "string"}},+ "memory_enabled": {+ "description": "Whether this agent may read the user's long-term memory. Nil inherits\nthe workspace setting; false opts a single agent out of memory even when\nthe workspace has it on. There is no \"on\" that overrides the workspace.",+ "type": "boolean"+ },"model_id": {"description": "===== Model Settings =====\nModel ID to use for conversations","type": "string"@@ -16610,8 +17703,44 @@"github_com_Tencent_WeKnora_internal_types.DockerSandboxConfig": {"type": "object","properties": {+ "cpu_limit": {+ "description": "CPULimit is the number of CPU cores one sandbox may use. 0 uses the\nbuilt-in default.",+ "type": "number"+ },+ "host": {+ "description": "Host is the daemon endpoint in DOCKER_HOST form. Empty means the local\nunix socket.",+ "type": "string"+ },+ "http_timeout_sec": {+ "description": "HTTPTimeoutSec bounds each Engine API call. 0 uses the built-in default.",+ "type": "integer"+ },+ "idle_ttl_seconds": {+ "description": "IdleTTLSeconds is how long a session container may go unused before it\nis reclaimed. The daemon has no idle timeout of its own, so this is what\nstops an abandoned session from pinning host memory indefinitely.",+ "type": "integer"+ },"image": {"type": "string"+ },+ "memory_limit_mb": {+ "description": "MemoryLimitMB caps one sandbox's memory. 0 uses the built-in default.",+ "type": "integer"+ },+ "network_mode": {+ "description": "NetworkMode is the Docker network sandboxes join: \"bridge\" (default) or\n\"none\" for no egress. Nothing else is accepted — host and container:\nmodes share another namespace outright, and a named network is usually\nthe deployment's own compose network, which would put the sandbox next\nto Postgres and Redis.",+ "type": "string"+ },+ "pids_limit": {+ "description": "PidsLimit caps how many processes one sandbox may run. 0 uses the\nbuilt-in default.",+ "type": "integer"+ },+ "runtime": {+ "description": "Runtime selects an alternative OCI runtime such as \"runsc\" (gVisor).\nEmpty uses the daemon default.",+ "type": "string"+ },+ "tls_cert_path": {+ "description": "TLSCertPath is a directory on the WeKnora host containing ca.pem,\ncert.pem and key.pem. Required when Host is a TCP endpoint.",+ "type": "string"}}},@@ -17071,228 +18200,87 @@}]},- "tenant_id": {- "description": "TenantID is the workspace to enrol as an org member. Preferred field.",- "type": "integer"- },- "user_id": {- "description": "UserID is retained for backward compatibility. When set without\nTenantID, the handler resolves the user's TenantID and uses this\nuser as the representative.",- "type": "string"- }- }- },- "github_com_Tencent_WeKnora_internal_types.JoinByOrganizationIDRequest": {- "type": "object",- "required": [- "organization_id"- ],- "properties": {- "message": {- "description": "Optional message for join request",- "type": "string",- "maxLength": 500- },- "organization_id": {- "type": "string"- },- "role": {- "description": "Optional: requested role (admin/editor/viewer); default viewer",- "allOf": [- {- "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.OrgMemberRole"- }- ]- }- }- },- "github_com_Tencent_WeKnora_internal_types.JoinOrganizationRequest": {- "type": "object",- "required": [- "invite_code"- ],- "properties": {- "invite_code": {- "type": "string",- "maxLength": 32,- "minLength": 8- }- }- },- "github_com_Tencent_WeKnora_internal_types.KBCloneTaskStatus": {- "type": "string",- "enum": [- "pending",- "processing",- "completed",- "failed"- ],- "x-enum-varnames": [- "KBCloneStatusPending",- "KBCloneStatusProcessing",- "KBCloneStatusCompleted",- "KBCloneStatusFailed"- ]- },- "github_com_Tencent_WeKnora_internal_types.KS3EngineConfig": {- "type": "object",- "properties": {- "access_key": {- "type": "string"- },- "bucket_name": {- "type": "string"- },- "endpoint": {- "type": "string"- },- "path_prefix": {- "type": "string"- },- "region": {- "type": "string"- },- "secret_key": {- "type": "string"- }- }- },- "github_com_Tencent_WeKnora_internal_types.Knowledge": {- "type": "object",- "properties": {- "channel": {- "description": "Channel indicates through which channel the knowledge was ingested (web, api, browser_extension, wechat, etc.)",- "type": "string"- },- "created_at": {- "description": "Creation time of the knowledge",- "type": "string"- },- "custom_metadata": {- "description": "CustomMetadata is user-authored descriptive metadata. It is deliberately\nseparate from Metadata, which contains internal ingestion state and IDs.",- "type": "array",- "items": {- "type": "integer"- }- },- "deleted_at": {- "description": "Deletion time of the knowledge",- "allOf": [- {- "$ref": "#/definitions/gorm.DeletedAt"- }- ]- },- "description": {- "description": "Description of the knowledge",- "type": "string"- },- "embedding_model_id": {- "description": "ID of the embedding model",- "type": "string"- },- "enable_status": {- "description": "Enable status of the knowledge",- "type": "string"- },- "error_message": {- "description": "Error message of the knowledge",- "type": "string"- },- "file_hash": {- "description": "File hash of the knowledge",- "type": "string"- },- "file_name": {- "description": "File name of the knowledge",- "type": "string"- },- "file_path": {- "description": "File path of the knowledge",- "type": "string"- },- "file_size": {- "description": "File size of the knowledge",- "type": "integer"- },- "file_type": {- "description": "File type of the knowledge",- "type": "string"- },- "folder_path": {- "description": "FolderPath is the canonical relative directory this entry belongs to\ninside the knowledge base, e.g. \"docs/spec\" for a folder upload of\n\"docs/spec/design.md\". Empty means the knowledge base root. It is a\ndisplay/navigation concern only: it never affects where the file is\nphysically stored (see FilePath).",- "type": "string"- },- "id": {- "description": "Unique identifier of the knowledge",- "type": "string"- },- "knowledge_base_id": {- "description": "ID of the knowledge base",- "type": "string"- },- "knowledge_base_name": {- "description": "Knowledge base name (not stored in database, populated on query)",- "type": "string"- },- "last_faq_import_result": {- "description": "Last FAQ import result (for FAQ type knowledge only)",- "type": "array",- "items": {- "type": "integer"- }- },- "metadata": {- "description": "Metadata of the knowledge",- "type": "array",- "items": {- "type": "integer"- }- },- "parse_status": {- "description": "Parse status of the knowledge",- "type": "string"- },- "pending_subtasks_count": {- "description": "PendingSubtasksCount is the outstanding enrichment subtask count\n(summary + question + graph chunks). Only meaningful while\nParseStatus == \"finalizing\"; defaults to 0 in any terminal state.",+ "tenant_id": {+ "description": "TenantID is the workspace to enrol as an org member. Preferred field.","type": "integer"},- "processed_at": {- "description": "Processed time of the knowledge",+ "user_id": {+ "description": "UserID is retained for backward compatibility. When set without\nTenantID, the handler resolves the user's TenantID and uses this\nuser as the representative.","type": "string"+ }+ }+ },+ "github_com_Tencent_WeKnora_internal_types.JoinByOrganizationIDRequest": {+ "type": "object",+ "required": [+ "organization_id"+ ],+ "properties": {+ "message": {+ "description": "Optional message for join request",+ "type": "string",+ "maxLength": 500},- "source": {- "description": "Source of the knowledge (e.g. URL address for url type, \"manual\" for manual type)",+ "organization_id": {"type": "string"},- "storage_size": {- "description": "Storage size of the knowledge",- "type": "integer"- },- "summary_status": {- "description": "Summary status for async summary generation",+ "role": {+ "description": "Optional: requested role (admin/editor/viewer); default viewer",+ "allOf": [+ {+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.OrgMemberRole"+ }+ ]+ }+ }+ },+ "github_com_Tencent_WeKnora_internal_types.JoinOrganizationRequest": {+ "type": "object",+ "required": [+ "invite_code"+ ],+ "properties": {+ "invite_code": {+ "type": "string",+ "maxLength": 32,+ "minLength": 8+ }+ }+ },+ "github_com_Tencent_WeKnora_internal_types.KBCloneTaskStatus": {+ "type": "string",+ "enum": [+ "pending",+ "processing",+ "completed",+ "failed"+ ],+ "x-enum-varnames": [+ "KBCloneStatusPending",+ "KBCloneStatusProcessing",+ "KBCloneStatusCompleted",+ "KBCloneStatusFailed"+ ]+ },+ "github_com_Tencent_WeKnora_internal_types.KS3EngineConfig": {+ "type": "object",+ "properties": {+ "access_key": {"type": "string"},- "tags": {- "description": "Tags holds the tags associated with this knowledge (populated on query, not persisted directly).",- "type": "array",- "items": {- "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.KnowledgeTag"- }+ "bucket_name": {+ "type": "string"},- "tenant_id": {- "description": "Workspace ID",- "type": "integer"+ "endpoint": {+ "type": "string"},- "title": {- "description": "Title of the knowledge",+ "path_prefix": {"type": "string"},- "type": {- "description": "Type of the knowledge",+ "region": {"type": "string"},- "updated_at": {- "description": "Last updated time of the knowledge",+ "secret_key": {"type": "string"}}@@ -17687,47 +18675,6 @@}}},- "github_com_Tencent_WeKnora_internal_types.KnowledgeTag": {- "type": "object",- "properties": {- "color": {- "description": "Optional display color",- "type": "string"- },- "created_at": {- "description": "Creation time",- "type": "string"- },- "id": {- "description": "Unique identifier of the tag (UUID)",- "type": "string"- },- "knowledge_base_id": {- "description": "Knowledge base ID that this tag belongs to",- "type": "string"- },- "name": {- "description": "Tag name, unique within the same knowledge base",- "type": "string"- },- "seq_id": {- "description": "SeqID is an auto-increment integer ID for external API usage",- "type": "integer"- },- "sort_order": {- "description": "Sort order within the same knowledge base",- "type": "integer"- },- "tenant_id": {- "description": "Workspace ID",- "type": "integer"- },- "updated_at": {- "description": "Last updated time",- "type": "string"- }- }- },"github_com_Tencent_WeKnora_internal_types.ListMembersResponse": {"type": "object","properties": {@@ -18111,6 +19058,55 @@}}},+ "github_com_Tencent_WeKnora_internal_types.MemoryConfig": {+ "type": "object",+ "properties": {+ "embedding_model_id": {+ "description": "EmbeddingModelID is the single model used to score memory against a\nquestion. It is pinned per workspace: knowledge bases each have their\nown embedding model, and grabbing whichever one happens to be listed\nfirst would mix incomparable vector spaces. Blank means semantic recall\nis off and matching stays lexical.",+ "type": "string"+ },+ "enabled": {+ "description": "Enabled defaults to false. Memory retains user statements across\nsessions, so a workspace admin has to turn it on deliberately.",+ "type": "boolean"+ },+ "extract_delay_seconds": {+ "description": "ExtractDelaySeconds is how long a finished turn waits before\ndistillation runs. Waiting lets one model call cover the several\nmessages a user usually sends in a row. 0 means the default.",+ "type": "integer"+ },+ "extract_instructions": {+ "description": "ExtractInstructions are workspace-specific rules appended to the\ndistillation prompt, for policies the product cannot guess (\"never record\ncustomer names\", \"always note the environment a question is about\").",+ "type": "string"+ },+ "extract_min_interval_seconds": {+ "description": "ExtractMinIntervalSeconds is the floor between two distillation runs for\nthe same person, and exists purely to bound cost. It never drops a turn:\na turn arriving inside the interval is queued and picked up by the next\nrun. 0 means the default.",+ "type": "integer"+ },+ "extract_model_id": {+ "description": "ExtractModelID is the model used by the background extraction task.\nEmpty means \"use the model the conversation itself used\", which is what\nthe settings UI promises, so the extraction task must never fail merely\nbecause this is blank.",+ "type": "string"+ },+ "interest_threshold": {+ "description": "InterestThreshold is how many separate conversations must touch a topic\nbefore it becomes a stored interest. 0 means the default. Setting it to 1\nrecords every topic on first sight, which is usually too noisy.",+ "type": "integer"+ },+ "max_items": {+ "description": "MaxItems caps active items per subject. 0 means DefaultMemoryMaxItems.",+ "type": "integer"+ },+ "retrieval_conditioning": {+ "description": "RetrievalConditioning lets memory shape retrieval — query rewriting and\nper-document ranking — rather than only being appended to the answer\nprompt. This is where memory earns its keep in a knowledge-base product.",+ "type": "boolean"+ },+ "vector_recall": {+ "description": "VectorRecall adds semantic similarity to memory recall. Nil means on\nwhen an embedding model is reachable.\n\nLexical matching alone cannot find a memory the user has re-worded, which\nis most of them: \"回答直接给结论\" and \"别铺垫那么多\" share no tokens. The\ncost is one embedding call per turn, bounded and degraded to lexical on\nfailure, so the feature never becomes a reason a chat is slow.",+ "type": "boolean"+ },+ "write_mode": {+ "description": "WriteMode is MemoryWriteExplicitOnly or MemoryWriteAuto.",+ "type": "string"+ }+ }+ },"github_com_Tencent_WeKnora_internal_types.MentionedItem": {"type": "object","properties": {@@ -18254,6 +19250,21 @@"updated_at": {"description": "Last update timestamp","type": "string"+ },+ "usage": {+ "description": "LLM token usage aggregated across every round of the turn that produced this\nassistant message. Persisted so history reads can attribute cost after the\nlive stream is gone; NULL (nil) for user messages and pre-feature rows.",+ "allOf": [+ {+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.TokenUsage"+ }+ ]+ },+ "used_memories": {+ "description": "UsedMemories records which long-term memories were injected into this\nanswer, so the chat UI can show them and let the user delete one on the\nspot. Persisted rather than only streamed so reopening a conversation\nstill explains what the answer saw.",+ "type": "array",+ "items": {+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.UsedMemory"+ }}}},@@ -18877,6 +19888,21 @@}}},+ "github_com_Tencent_WeKnora_internal_types.PromptCacheStatus": {+ "type": "string",+ "enum": [+ "unsupported",+ "unreported",+ "miss",+ "hit"+ ],+ "x-enum-varnames": [+ "PromptCacheStatusUnsupported",+ "PromptCacheStatusUnreported",+ "PromptCacheStatusMiss",+ "PromptCacheStatusHit"+ ]+ },"github_com_Tencent_WeKnora_internal_types.QuestionGenerationConfig": {"type": "object","properties": {@@ -19684,6 +20710,31 @@}}},+ "github_com_Tencent_WeKnora_internal_types.SkillImageConfig": {+ "type": "object",+ "properties": {+ "base_template_id": {+ "description": "BaseTemplateID is the template this chain was originally built from;\nthe rebuild path starts over from it.",+ "type": "string"+ },+ "built_at": {+ "description": "BuiltAt records when this generation was produced.",+ "type": "string"+ },+ "generation": {+ "description": "Generation increments on every successful install/remove, for naming\nand troubleshooting.",+ "type": "integer"+ },+ "owner_fingerprint": {+ "description": "OwnerFingerprint identifies the provider account that owns the snapshot.\nSnapshots are invisible across accounts, so a mismatch means \"fall back\nto the base template\" rather than \"fail\".",+ "type": "string"+ },+ "snapshot_id": {+ "description": "SnapshotID is the currently effective snapshot; empty = base template.",+ "type": "string"+ }+ }+ },"github_com_Tencent_WeKnora_internal_types.StarterSuggestionConfig": {"type": "object","properties": {@@ -20083,6 +21134,14 @@"description": "ID","type": "integer"},+ "memory_config": {+ "description": "Memory config: workspace switch for cross-session long-term memory",+ "allOf": [+ {+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.MemoryConfig"+ }+ ]+ },"name": {"description": "Name","type": "string"@@ -20191,6 +21250,18 @@"description": "SandboxType selects the sandbox backend. Named configs may use \"cube\",\n\"e2b\", \"docker\", or \"local\". \"disabled\" is reserved for the hidden\nworkspace policy row.","type": "string"},+ "skill_image": {+ "description": "SkillImage points at the snapshot that carries this config's installed\nskills. Empty means \"use the base template\". Written only by the skill\ninstall/remove path: MergeSandboxConfigForUpdate ignores client values\nso a settings-form save cannot wipe or plant the pointer.",+ "allOf": [+ {+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.SkillImageConfig"+ }+ ]+ },+ "skill_rollout": {+ "description": "SkillRollout decides whether sessions that already hold a sandbox of\nthis config rebuild after a skill install or removal. Empty and\nSkillRolloutNextTurn rebuild on the next chat turn. SkillRolloutNewSession\nleaves those sandboxes on the previous image; only sessions that start\nafterwards boot the new snapshot.",+ "type": "string"+ },"volume_mount": {"description": "VolumeMount configures an optional shared volume mounted into every\nsandbox created for this tenant. Currently used for tenant-installed\nskills, but the configuration itself is skill-agnostic and can serve\nany volume-mount use case (shared datasets, pre-installed toolchains,\netc.).","allOf": [@@ -20201,6 +21272,39 @@}}},+ "github_com_Tencent_WeKnora_internal_types.TokenUsage": {+ "type": "object",+ "properties": {+ "cache_miss_tokens": {+ "type": "integer"+ },+ "cache_read_tokens": {+ "type": "integer"+ },+ "cache_reported": {+ "type": "boolean"+ },+ "cache_status": {+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.PromptCacheStatus"+ },+ "cache_write_tokens": {+ "type": "integer"+ },+ "cached_tokens": {+ "description": "CachedTokens is the legacy alias for CacheReadTokens. It remains on the\nwire for compatibility with existing API consumers.",+ "type": "integer"+ },+ "completion_tokens": {+ "type": "integer"+ },+ "prompt_tokens": {+ "type": "integer"+ },+ "total_tokens": {+ "type": "integer"+ }+ }+ },"github_com_Tencent_WeKnora_internal_types.ToolCall": {"type": "object","properties": {@@ -20337,6 +21441,20 @@}}},+ "github_com_Tencent_WeKnora_internal_types.UsedMemory": {+ "type": "object",+ "properties": {+ "content": {+ "type": "string"+ },+ "id": {+ "type": "string"+ },+ "kind": {+ "type": "string"+ }+ }+ },"github_com_Tencent_WeKnora_internal_types.User": {"type": "object","properties": {@@ -20915,6 +22033,10 @@"description": "populated in ego mode","type": "integer"},+ "familiar_count": {+ "description": "FamiliarCount is how many returned nodes are lit up for this person.",+ "type": "integer"+ },"mode": {"type": "string"},@@ -20935,6 +22057,10 @@"github_com_Tencent_WeKnora_internal_types.WikiGraphNode": {"type": "object","properties": {+ "familiar": {+ "description": "Familiar is true when this page was built from a document this person\nkeeps citing in answers. It is a personal overlay, not a property of\nthe page: two people looking at the same wiki see different highlights.",+ "type": "boolean"+ },"link_count": {"description": "Number of inbound + outbound links","type": "integer"@@ -21528,6 +22654,18 @@}}},+ "internal_handler.CreateSystemUserResponse": {+ "type": "object",+ "properties": {+ "generated_password": {+ "description": "GeneratedPassword is the plaintext password when the server\nauto-generated one. Absent when the caller supplied the password.",+ "type": "string"+ },+ "user": {+ "$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.UserInfo"+ }+ }+ },"internal_handler.DeleteTagRequest": {"type": "object","properties": {@@ -22753,6 +23891,23 @@}}},+ "internal_handler.UpdateKnowledgeRequest": {+ "type": "object",+ "properties": {+ "custom_metadata": {+ "type": "array",+ "items": {+ "type": "integer"+ }+ },+ "description": {+ "type": "string"+ },+ "title": {+ "type": "string"+ }+ }+ },"internal_handler.UpdateModelRequest": {"type": "object","properties": {@@ -23068,6 +24223,24 @@}}},+ "internal_handler.skillPatchRequest": {+ "type": "object",+ "properties": {+ "enabled": {+ "description": "Enabled is a pointer because its absence is a bad request rather than a\nrequest to disable the skill.",+ "type": "boolean"+ }+ }+ },+ "internal_handler.skillSourceRequest": {+ "type": "object",+ "properties": {+ "source": {+ "description": "Source is a ClawHub/SkillHub slug or page URL, a skills.sh / GitHub /\nGitLab locator, or a direct zip/SKILL.md URL. It must be readable\nanonymously: the fetch carries no credential of any kind.",+ "type": "string"+ }+ }+ },"internal_handler.storageBackendRequest": {"type": "object","required": [@@ -23411,4 +24584,4 @@"in": "header"}}-}+}\ No newline at end of filediff --git a/docs/swagger.yaml b/docs/swagger.yamlindex 6ed283086..d8e4f45b9 100644--- a/docs/swagger.yaml+++ b/docs/swagger.yaml@@ -240,6 +240,20 @@ definitions:model_id:type: stringtype: object+ github_com_Tencent_WeKnora_internal_types.AdminCreateUserRequest:+ properties:+ email:+ type: string+ password:+ type: string+ username:+ maxLength: 50+ minLength: 2+ type: string+ required:+ - username+ type: objectgithub_com_Tencent_WeKnora_internal_types.AgentStep:properties:iteration:@@ -294,6 +308,7 @@ definitions:- system.admin_promoted- system.admin_revoked- system.user_password_reset+ - system.user_created- system.api_key_created- system.api_key_revoked- system.queue_task_retried@@ -357,6 +372,7 @@ definitions:- AuditActionSystemAdminPromoted- AuditActionSystemAdminRevoked- AuditActionSystemUserPasswordReset+ - AuditActionSystemUserCreated- AuditActionSystemAPIKeyCreated- AuditActionSystemAPIKeyRevoked- AuditActionSystemQueueTaskRetried@@ -869,6 +885,12 @@ definitions:items:type: stringtype: array+ memory_enabled:+ description: |-+ Whether this agent may read the user's long-term memory. Nil inherits+ the workspace setting; false opts a single agent out of memory even when+ the workspace has it on. There is no "on" that overrides the workspace.+ type: booleanmodel_id:description: |-===== Model Settings =====@@ -1068,8 +1090,55 @@ definitions:type: objectgithub_com_Tencent_WeKnora_internal_types.DockerSandboxConfig:properties:+ cpu_limit:+ description: |-+ CPULimit is the number of CPU cores one sandbox may use. 0 uses the+ built-in default.+ type: number+ host:+ description: |-+ Host is the daemon endpoint in DOCKER_HOST form. Empty means the local+ unix socket.+ type: string+ http_timeout_sec:+ description: HTTPTimeoutSec bounds each Engine API call. 0 uses the built-in+ default.+ type: integer+ idle_ttl_seconds:+ description: |-+ IdleTTLSeconds is how long a session container may go unused before it+ is reclaimed. The daemon has no idle timeout of its own, so this is what+ stops an abandoned session from pinning host memory indefinitely.+ type: integerimage:type: string+ memory_limit_mb:+ description: MemoryLimitMB caps one sandbox's memory. 0 uses the built-in+ default.+ type: integer+ network_mode:+ description: |-+ NetworkMode is the Docker network sandboxes join: "bridge" (default) or+ "none" for no egress. Nothing else is accepted — host and container:+ modes share another namespace outright, and a named network is usually+ the deployment's own compose network, which would put the sandbox next+ to Postgres and Redis.+ type: string+ pids_limit:+ description: |-+ PidsLimit caps how many processes one sandbox may run. 0 uses the+ built-in default.+ type: integer+ runtime:+ description: |-+ Runtime selects an alternative OCI runtime such as "runsc" (gVisor).+ Empty uses the daemon default.+ type: string+ tls_cert_path:+ description: |-+ TLSCertPath is a directory on the WeKnora host containing ca.pem,+ cert.pem and key.pem. Required when Host is a TCP endpoint.+ type: stringtype: objectgithub_com_Tencent_WeKnora_internal_types.E2BSandboxConfig:properties:@@ -1464,121 +1533,6 @@ definitions:secret_key:type: stringtype: object- github_com_Tencent_WeKnora_internal_types.Knowledge:- properties:- channel:- description: Channel indicates through which channel the knowledge was ingested- (web, api, browser_extension, wechat, etc.)- type: string- created_at:- description: Creation time of the knowledge- type: string- custom_metadata:- description: |-- CustomMetadata is user-authored descriptive metadata. It is deliberately- separate from Metadata, which contains internal ingestion state and IDs.- items:- type: integer- type: array- deleted_at:- allOf:- - $ref: '#/definitions/gorm.DeletedAt'- description: Deletion time of the knowledge- description:- description: Description of the knowledge- type: string- embedding_model_id:- description: ID of the embedding model- type: string- enable_status:- description: Enable status of the knowledge- type: string- error_message:- description: Error message of the knowledge- type: string- file_hash:- description: File hash of the knowledge- type: string- file_name:- description: File name of the knowledge- type: string- file_path:- description: File path of the knowledge- type: string- file_size:- description: File size of the knowledge- type: integer- file_type:- description: File type of the knowledge- type: string- folder_path:- description: |-- FolderPath is the canonical relative directory this entry belongs to- inside the knowledge base, e.g. "docs/spec" for a folder upload of- "docs/spec/design.md". Empty means the knowledge base root. It is a- display/navigation concern only: it never affects where the file is- physically stored (see FilePath).- type: string- id:- description: Unique identifier of the knowledge- type: string- knowledge_base_id:- description: ID of the knowledge base- type: string- knowledge_base_name:- description: Knowledge base name (not stored in database, populated on query)- type: string- last_faq_import_result:- description: Last FAQ import result (for FAQ type knowledge only)- items:- type: integer- type: array- metadata:- description: Metadata of the knowledge- items:- type: integer- type: array- parse_status:- description: Parse status of the knowledge- type: string- pending_subtasks_count:- description: |-- PendingSubtasksCount is the outstanding enrichment subtask count- (summary + question + graph chunks). Only meaningful while- ParseStatus == "finalizing"; defaults to 0 in any terminal state.- type: integer- processed_at:- description: Processed time of the knowledge- type: string- source:- description: Source of the knowledge (e.g. URL address for url type, "manual"- for manual type)- type: string- storage_size:- description: Storage size of the knowledge- type: integer- summary_status:- description: Summary status for async summary generation- type: string- tags:- description: Tags holds the tags associated with this knowledge (populated- on query, not persisted directly).- items:- $ref: '#/definitions/github_com_Tencent_WeKnora_internal_types.KnowledgeTag'- type: array- tenant_id:- description: Workspace ID- type: integer- title:- description: Title of the knowledge- type: string- type:- description: Type of the knowledge- type: string- updated_at:- description: Last updated time of the knowledge- type: string- type: objectgithub_com_Tencent_WeKnora_internal_types.KnowledgeBase:properties:asr_config:@@ -1867,36 +1821,6 @@ definitions:vlm_config:$ref: '#/definitions/github_com_Tencent_WeKnora_internal_types.VLMConfig'type: object- github_com_Tencent_WeKnora_internal_types.KnowledgeTag:- properties:- color:- description: Optional display color- type: string- created_at:- description: Creation time- type: string- id:- description: Unique identifier of the tag (UUID)- type: string- knowledge_base_id:- description: Knowledge base ID that this tag belongs to- type: string- name:- description: Tag name, unique within the same knowledge base- type: string- seq_id:- description: SeqID is an auto-increment integer ID for external API usage- type: integer- sort_order:- description: Sort order within the same knowledge base- type: integer- tenant_id:- description: Workspace ID- type: integer- updated_at:- description: Last updated time- type: string- type: objectgithub_com_Tencent_WeKnora_internal_types.ListMembersResponse:properties:members:@@ -2182,6 +2106,76 @@ definitions:tenant_name:type: stringtype: object+ github_com_Tencent_WeKnora_internal_types.MemoryConfig:+ properties:+ embedding_model_id:+ description: |-+ EmbeddingModelID is the single model used to score memory against a+ question. It is pinned per workspace: knowledge bases each have their+ own embedding model, and grabbing whichever one happens to be listed+ first would mix incomparable vector spaces. Blank means semantic recall+ is off and matching stays lexical.+ type: string+ enabled:+ description: |-+ Enabled defaults to false. Memory retains user statements across+ sessions, so a workspace admin has to turn it on deliberately.+ type: boolean+ extract_delay_seconds:+ description: |-+ ExtractDelaySeconds is how long a finished turn waits before+ distillation runs. Waiting lets one model call cover the several+ messages a user usually sends in a row. 0 means the default.+ type: integer+ extract_instructions:+ description: |-+ ExtractInstructions are workspace-specific rules appended to the+ distillation prompt, for policies the product cannot guess ("never record+ customer names", "always note the environment a question is about").+ type: string+ extract_min_interval_seconds:+ description: |-+ ExtractMinIntervalSeconds is the floor between two distillation runs for+ the same person, and exists purely to bound cost. It never drops a turn:+ a turn arriving inside the interval is queued and picked up by the next+ run. 0 means the default.+ type: integer+ extract_model_id:+ description: |-+ ExtractModelID is the model used by the background extraction task.+ Empty means "use the model the conversation itself used", which is what+ the settings UI promises, so the extraction task must never fail merely+ because this is blank.+ type: string+ interest_threshold:+ description: |-+ InterestThreshold is how many separate conversations must touch a topic+ before it becomes a stored interest. 0 means the default. Setting it to 1+ records every topic on first sight, which is usually too noisy.+ type: integer+ max_items:+ description: MaxItems caps active items per subject. 0 means DefaultMemoryMaxItems.+ type: integer+ retrieval_conditioning:+ description: |-+ RetrievalConditioning lets memory shape retrieval — query rewriting and+ per-document ranking — rather than only being appended to the answer+ prompt. This is where memory earns its keep in a knowledge-base product.+ type: boolean+ vector_recall:+ description: |-+ VectorRecall adds semantic similarity to memory recall. Nil means on+ when an embedding model is reachable.++ Lexical matching alone cannot find a memory the user has re-worded, which+ is most of them: "回答直接给结论" and "别铺垫那么多" share no tokens. The+ cost is one embedding call per turn, bounded and degraded to lexical on+ failure, so the feature never becomes a reason a chat is slow.+ type: boolean+ write_mode:+ description: WriteMode is MemoryWriteExplicitOnly or MemoryWriteAuto.+ type: string+ type: objectgithub_com_Tencent_WeKnora_internal_types.MentionedItem:properties:id:@@ -2302,6 +2296,22 @@ definitions:updated_at:description: Last update timestamptype: string+ usage:+ allOf:+ - $ref: '#/definitions/github_com_Tencent_WeKnora_internal_types.TokenUsage'+ description: |-+ LLM token usage aggregated across every round of the turn that produced this+ assistant message. Persisted so history reads can attribute cost after the+ live stream is gone; NULL (nil) for user messages and pre-feature rows.+ used_memories:+ description: |-+ UsedMemories records which long-term memories were injected into this+ answer, so the chat UI can show them and let the user delete one on the+ spot. Persisted rather than only streamed so reopening a conversation+ still explains what the answer saw.+ items:+ $ref: '#/definitions/github_com_Tencent_WeKnora_internal_types.UsedMemory'+ type: arraytype: objectgithub_com_Tencent_WeKnora_internal_types.MessageArtifact:properties:@@ -2779,6 +2789,18 @@ definitions:nil preserves the parser default; an explicit false disables the mode.type: booleantype: object+ github_com_Tencent_WeKnora_internal_types.PromptCacheStatus:+ enum:+ - unsupported+ - unreported+ - miss+ - hit+ type: string+ x-enum-varnames:+ - PromptCacheStatusUnsupported+ - PromptCacheStatusUnreported+ - PromptCacheStatusMiss+ - PromptCacheStatusHitgithub_com_Tencent_WeKnora_internal_types.QuestionGenerationConfig:properties:custom_instructions:@@ -3394,6 +3416,32 @@ definitions:- organization_id- permissiontype: object+ github_com_Tencent_WeKnora_internal_types.SkillImageConfig:+ properties:+ base_template_id:+ description: |-+ BaseTemplateID is the template this chain was originally built from;+ the rebuild path starts over from it.+ type: string+ built_at:+ description: BuiltAt records when this generation was produced.+ type: string+ generation:+ description: |-+ Generation increments on every successful install/remove, for naming+ and troubleshooting.+ type: integer+ owner_fingerprint:+ description: |-+ OwnerFingerprint identifies the provider account that owns the snapshot.+ Snapshots are invisible across accounts, so a mismatch means "fall back+ to the base template" rather than "fail".+ type: string+ snapshot_id:+ description: SnapshotID is the currently effective snapshot; empty = base+ template.+ type: string+ type: objectgithub_com_Tencent_WeKnora_internal_types.StarterSuggestionConfig:properties:count:@@ -3690,6 +3738,11 @@ definitions:id:description: IDtype: integer+ memory_config:+ allOf:+ - $ref: '#/definitions/github_com_Tencent_WeKnora_internal_types.MemoryConfig'+ description: 'Memory config: workspace switch for cross-session long-term+ memory'name:description: Nametype: string@@ -3775,6 +3828,22 @@ definitions:"e2b", "docker", or "local". "disabled" is reserved for the hiddenworkspace policy row.type: string+ skill_image:+ allOf:+ - $ref: '#/definitions/github_com_Tencent_WeKnora_internal_types.SkillImageConfig'+ description: |-+ SkillImage points at the snapshot that carries this config's installed+ skills. Empty means "use the base template". Written only by the skill+ install/remove path: MergeSandboxConfigForUpdate ignores client values+ so a settings-form save cannot wipe or plant the pointer.+ skill_rollout:+ description: |-+ SkillRollout decides whether sessions that already hold a sandbox of+ this config rebuild after a skill install or removal. Empty and+ SkillRolloutNextTurn rebuild on the next chat turn. SkillRolloutNewSession+ leaves those sandboxes on the previous image; only sessions that start+ afterwards boot the new snapshot.+ type: stringvolume_mount:allOf:- $ref: '#/definitions/github_com_Tencent_WeKnora_internal_types.VolumeMountConfig'@@ -3785,6 +3854,30 @@ definitions:any volume-mount use case (shared datasets, pre-installed toolchains,etc.).type: object+ github_com_Tencent_WeKnora_internal_types.TokenUsage:+ properties:+ cache_miss_tokens:+ type: integer+ cache_read_tokens:+ type: integer+ cache_reported:+ type: boolean+ cache_status:+ $ref: '#/definitions/github_com_Tencent_WeKnora_internal_types.PromptCacheStatus'+ cache_write_tokens:+ type: integer+ cached_tokens:+ description: |-+ CachedTokens is the legacy alias for CacheReadTokens. It remains on the+ wire for compatibility with existing API consumers.+ type: integer+ completion_tokens:+ type: integer+ prompt_tokens:+ type: integer+ total_tokens:+ type: integer+ type: objectgithub_com_Tencent_WeKnora_internal_types.ToolCall:properties:args:@@ -3878,6 +3971,15 @@ definitions:required:- permissiontype: object+ github_com_Tencent_WeKnora_internal_types.UsedMemory:+ properties:+ content:+ type: string+ id:+ type: string+ kind:+ type: string+ type: objectgithub_com_Tencent_WeKnora_internal_types.User:properties:avatar:@@ -4350,6 +4452,10 @@ definitions:depth:description: populated in ego modetype: integer+ familiar_count:+ description: FamiliarCount is how many returned nodes are lit up for this+ person.+ type: integermode:type: stringreturned:@@ -4364,6 +4470,12 @@ definitions:type: objectgithub_com_Tencent_WeKnora_internal_types.WikiGraphNode:properties:+ familiar:+ description: |-+ Familiar is true when this page was built from a document this person+ keeps citing in answers. It is a personal overlay, not a property of+ the page: two people looking at the same wiki see different highlights.+ type: booleanlink_count:description: Number of inbound + outbound linkstype: integer@@ -4808,6 +4920,16 @@ definitions:- engine_type- nametype: object+ internal_handler.CreateSystemUserResponse:+ properties:+ generated_password:+ description: |-+ GeneratedPassword is the plaintext password when the server+ auto-generated one. Absent when the caller supplied the password.+ type: string+ user:+ $ref: '#/definitions/github_com_Tencent_WeKnora_internal_types.UserInfo'+ type: objectinternal_handler.DeleteTagRequest:properties:exclude_ids:@@ -5668,6 +5790,17 @@ definitions:required:- nametype: object+ internal_handler.UpdateKnowledgeRequest:+ properties:+ custom_metadata:+ items:+ type: integer+ type: array+ description:+ type: string+ title:+ type: string+ type: objectinternal_handler.UpdateModelRequest:properties:description:@@ -5878,6 +6011,23 @@ definitions:required:- nametype: object+ internal_handler.skillPatchRequest:+ properties:+ enabled:+ description: |-+ Enabled is a pointer because its absence is a bad request rather than a+ request to disable the skill.+ type: boolean+ type: object+ internal_handler.skillSourceRequest:+ properties:+ source:+ description: |-+ Source is a ClawHub/SkillHub slug or page URL, a skills.sh / GitHub /+ GitLab locator, or a direct zip/SKILL.md URL. It must be readable+ anonymously: the fetch carries no credential of any kind.+ type: string+ type: objectinternal_handler.storageBackendRequest:properties:config:@@ -10018,6 +10168,44 @@ paths:summary: 知识问答tags:- 问答+ /knowledge-search:+ post:+ consumes:+ - application/json+ description: 在知识库中搜索(不使用LLM总结)+ parameters:+ - description: 搜索请求+ in: body+ name: request+ required: true+ schema:+ $ref: '#/definitions/internal_handler_session.SearchKnowledgeRequest'+ - default: handle+ description: 文件引用形式,public 返回可加载直链+ enum:+ - handle+ - public+ in: query+ name: resource_urls+ type: string+ produces:+ - application/json+ responses:+ "200":+ description: 搜索结果+ schema:+ additionalProperties: true+ type: object+ "400":+ description: 请求参数错误+ schema:+ $ref: '#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError'+ security:+ - Bearer: []+ - ApiKeyAuth: []+ summary: 知识搜索+ tags:+ - 问答/knowledge/{id}:delete:consumes:@@ -10084,19 +10272,19 @@ paths:put:consumes:- application/json- description: 更新知识条目信息+ description: 部分更新知识条目(标题/描述/自定义元数据);未传字段保持不变,显式传空 description 可清空摘要parameters:- description: 知识IDin: pathname: idrequired: truetype: string- - description: 知识信息+ - description: 更新字段(均可选)in: bodyname: requestrequired: trueschema:- $ref: '#/definitions/github_com_Tencent_WeKnora_internal_types.Knowledge'+ $ref: '#/definitions/internal_handler.UpdateKnowledgeRequest'produces:- application/jsonresponses:@@ -10537,12 +10725,15 @@ paths:in: queryname: keywordtype: string- - description: Offset for pagination+ - description: Offset for pagination (minimum 0)in: query+ minimum: 0name: offsettype: integer- - description: Limit for pagination (default 20)+ - description: Limit for pagination (default 20, maximum 100)in: query+ maximum: 100+ minimum: 1name: limittype: integer- description: Comma-separated file extensions to filter (e.g., csv,xlsx)@@ -11894,10 +12085,369 @@ paths:summary: 获取我的待处理邀请数tags:- 我的邀请- /messages/{session_id}/{id}:- delete:- consumes:- - application/json+ /memory/consolidate:+ post:+ description: 合并意思接近的条目、归档到期事项,不等待每日后台整理+ produces:+ - application/json+ responses:+ "200":+ description: 整理结果+ schema:+ additionalProperties: true+ type: object+ security:+ - Bearer: []+ summary: 立刻整理我的记忆+ tags:+ - 长期记忆+ /memory/documents:+ get:+ description: 返回当前用户回答里反复引用的文档,次数未达习惯门槛的不展示+ parameters:+ - default: 50+ description: 每页条数+ in: query+ name: limit+ type: integer+ - description: 偏移量+ in: query+ name: offset+ type: integer+ produces:+ - application/json+ responses:+ "200":+ description: 文档列表+ schema:+ additionalProperties: true+ type: object+ security:+ - Bearer: []+ summary: 列出常用资料+ tags:+ - 长期记忆+ /memory/documents/{id}:+ delete:+ description: 删除一条文档亲和度计数,之后检索不再因为这份文档而加权+ parameters:+ - description: 亲和度 ID+ in: path+ name: id+ required: true+ type: string+ produces:+ - application/json+ responses:+ "200":+ description: 删除成功+ schema:+ additionalProperties: true+ type: object+ security:+ - Bearer: []+ summary: 停止用某份文档做个性化检索+ tags:+ - 长期记忆+ /memory/export:+ get:+ description: 以 JSON 导出当前用户的全部记忆+ produces:+ - application/json+ responses:+ "200":+ description: 记忆导出+ schema:+ additionalProperties: true+ type: object+ security:+ - Bearer: []+ summary: 导出我的记忆+ tags:+ - 长期记忆+ /memory/items:+ delete:+ description: 永久删除当前用户的全部记忆+ produces:+ - application/json+ responses:+ "200":+ description: 清空成功+ schema:+ additionalProperties: true+ type: object+ security:+ - Bearer: []+ summary: 清空我的记忆+ tags:+ - 长期记忆+ get:+ description: 分页返回当前用户的记忆条目,可按状态过滤+ parameters:+ - description: 状态过滤+ enum:+ - active+ - superseded+ - archived+ - pending+ in: query+ name: status+ type: string+ - default: 50+ description: 每页条数+ in: query+ name: limit+ type: integer+ - description: 偏移量+ in: query+ name: offset+ type: integer+ produces:+ - application/json+ responses:+ "200":+ description: 记忆列表+ schema:+ additionalProperties: true+ type: object+ security:+ - Bearer: []+ summary: 列出我的记忆+ tags:+ - 长期记忆+ post:+ consumes:+ - application/json+ description: 手动添加一条长期记忆+ parameters:+ - description: 记忆内容+ in: body+ name: request+ required: true+ schema:+ type: object+ produces:+ - application/json+ responses:+ "200":+ description: 新增的记忆+ schema:+ additionalProperties: true+ type: object+ security:+ - Bearer: []+ summary: 新增一条记忆+ tags:+ - 长期记忆+ /memory/items/{id}:+ delete:+ description: 永久删除一条记忆+ parameters:+ - description: 记忆ID+ in: path+ name: id+ required: true+ type: string+ produces:+ - application/json+ responses:+ "200":+ description: 删除成功+ schema:+ additionalProperties: true+ type: object+ security:+ - Bearer: []+ summary: 删除一条记忆+ tags:+ - 长期记忆+ put:+ consumes:+ - application/json+ description: 修改记忆内容与重要度,修改后该条记忆不会被后台抽取覆盖+ parameters:+ - description: 记忆ID+ in: path+ name: id+ required: true+ type: string+ - description: 记忆内容+ in: body+ name: request+ required: true+ schema:+ type: object+ produces:+ - application/json+ responses:+ "200":+ description: 更新后的记忆+ schema:+ additionalProperties: true+ type: object+ security:+ - Bearer: []+ summary: 修改一条记忆+ tags:+ - 长期记忆+ /memory/items/{id}/confirm:+ post:+ description: 接受系统推断的记忆,使其开始生效+ parameters:+ - description: 记忆 ID+ in: path+ name: id+ required: true+ type: string+ produces:+ - application/json+ responses:+ "200":+ description: 确认成功+ schema:+ additionalProperties: true+ type: object+ security:+ - Bearer: []+ summary: 确认一条推断出的记忆+ tags:+ - 长期记忆+ /memory/items/{id}/reject:+ post:+ description: 拒绝系统推断的记忆,并记住这次拒绝+ parameters:+ - description: 记忆 ID+ in: path+ name: id+ required: true+ type: string+ produces:+ - application/json+ responses:+ "200":+ description: 否决成功+ schema:+ additionalProperties: true+ type: object+ security:+ - Bearer: []+ summary: 否决一条推断出的记忆+ tags:+ - 长期记忆+ /memory/settings:+ get:+ description: 返回合并后的记忆开关状态(空间级 + 个人级)与记忆条数+ produces:+ - application/json+ responses:+ "200":+ description: 记忆设置+ schema:+ additionalProperties: true+ type: object+ security:+ - Bearer: []+ summary: 获取我的记忆设置+ tags:+ - 长期记忆+ put:+ consumes:+ - application/json+ description: 开启或关闭当前用户自己的长期记忆+ parameters:+ - description: 设置+ in: body+ name: request+ required: true+ schema:+ type: object+ produces:+ - application/json+ responses:+ "200":+ description: 更新后的设置+ schema:+ additionalProperties: true+ type: object+ security:+ - Bearer: []+ summary: 更新我的记忆设置+ tags:+ - 长期记忆+ /memory/topics:+ get:+ description: 返回已计数、尚未提升为长期关注的主题,以及距离阈值还差几次+ parameters:+ - default: 50+ description: 每页条数+ in: query+ name: limit+ type: integer+ - description: 偏移量+ in: query+ name: offset+ type: integer+ produces:+ - application/json+ responses:+ "200":+ description: 主题列表+ schema:+ additionalProperties: true+ type: object+ security:+ - Bearer: []+ summary: 列出正在观察的主题+ tags:+ - 长期记忆+ /memory/topics/{id}:+ delete:+ description: 删除尚未提升的主题计数,并记住这次拒绝,之后不会再自动记为长期关注+ parameters:+ - description: 主题 ID+ in: path+ name: id+ required: true+ type: string+ produces:+ - application/json+ responses:+ "200":+ description: 删除成功+ schema:+ additionalProperties: true+ type: object+ security:+ - Bearer: []+ summary: 停止跟踪一个主题+ tags:+ - 长期记忆+ /memory/topics/{id}/promote:+ post:+ description: 不等待剩余次数,把正在观察的主题提升为一条长期关注记忆+ parameters:+ - description: 主题 ID+ in: path+ name: id+ required: true+ type: string+ produces:+ - application/json+ responses:+ "200":+ description: 新增的记忆+ schema:+ additionalProperties: true+ type: object+ security:+ - Bearer: []+ summary: 立即记为长期关注+ tags:+ - 长期记忆+ /messages/{session_id}/{id}:+ delete:+ consumes:+ - application/jsondescription: 从会话中删除指定消息parameters:- description: 会话ID@@ -12849,48 +13399,263 @@ paths:additionalProperties: truetype: object"404":- description: Not Found+ description: Not Found+ schema:+ $ref: '#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError'+ security:+ - Bearer: []+ summary: 通过邀请码预览组织+ tags:+ - 组织管理+ /organizations/search:+ get:+ description: 搜索已开放可被搜索的空间,用于发现并加入+ parameters:+ - description: 搜索关键词(空间名称或描述)+ in: query+ name: q+ type: string+ - default: 20+ description: 返回数量限制+ in: query+ name: limit+ type: integer+ produces:+ - application/json+ responses:+ "200":+ description: OK+ schema:+ additionalProperties: true+ type: object+ security:+ - Bearer: []+ summary: 搜索可加入的空间+ tags:+ - 组织管理+ /sandbox-configs:+ get:+ description: List workspace sandbox backend configs with credentials masked.+ produces:+ - application/json+ responses:+ "200":+ description: Sandbox configs and defaults+ schema:+ additionalProperties: true+ type: object+ "401":+ description: Unauthorized+ schema:+ additionalProperties: true+ type: object+ security:+ - Bearer: []+ - ApiKeyAuth: []+ summary: List sandbox configs+ tags:+ - SandboxConfig+ post:+ consumes:+ - application/json+ description: Create a named workspace sandbox backend config. Credentials are+ masked in the response.+ parameters:+ - description: Sandbox backend config+ in: body+ name: request+ required: true+ schema:+ $ref: '#/definitions/internal_handler.sandboxConfigRequest'+ produces:+ - application/json+ responses:+ "201":+ description: Created sandbox config+ schema:+ additionalProperties: true+ type: object+ "400":+ description: Invalid request or validation failure+ schema:+ $ref: '#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError'+ "401":+ description: Unauthorized+ schema:+ additionalProperties: true+ type: object+ security:+ - Bearer: []+ - ApiKeyAuth: []+ summary: Create sandbox config+ tags:+ - SandboxConfig+ /sandbox-configs/{id}:+ delete:+ description: Soft-delete a sandbox backend config. force=true only overrides+ unverifiable provider inventory, never confirmed live sandboxes.+ parameters:+ - description: Sandbox config ID+ in: path+ name: id+ required: true+ type: string+ - description: Force delete when inventory is unverifiable+ in: query+ name: force+ type: boolean+ produces:+ - application/json+ responses:+ "200":+ description: Deletion success+ schema:+ additionalProperties: true+ type: object+ "401":+ description: Unauthorized+ schema:+ additionalProperties: true+ type: object+ "409":+ description: Live sandboxes or unverifiable inventory+ schema:+ additionalProperties: true+ type: object+ security:+ - Bearer: []+ - ApiKeyAuth: []+ summary: Delete sandbox config+ tags:+ - SandboxConfig+ get:+ description: Retrieve a workspace sandbox backend config with credentials masked.+ parameters:+ - description: Sandbox config ID+ in: path+ name: id+ required: true+ type: string+ produces:+ - application/json+ responses:+ "200":+ description: Sandbox config+ schema:+ additionalProperties: true+ type: object+ "401":+ description: Unauthorized+ schema:+ additionalProperties: true+ type: object+ "404":+ description: Sandbox config not found+ schema:+ $ref: '#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError'+ security:+ - Bearer: []+ - ApiKeyAuth: []+ summary: Get sandbox config+ tags:+ - SandboxConfig+ put:+ consumes:+ - application/json+ description: Update a sandbox backend config. Identity-field changes are refused+ while the config owns live or paused sandboxes.+ parameters:+ - description: Sandbox config ID+ in: path+ name: id+ required: true+ type: string+ - description: Updated sandbox config+ in: body+ name: request+ required: true+ schema:+ $ref: '#/definitions/internal_handler.sandboxConfigRequest'+ produces:+ - application/json+ responses:+ "200":+ description: Updated sandbox config+ schema:+ additionalProperties: true+ type: object+ "400":+ description: Invalid request or validation failure+ schema:+ $ref: '#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError'+ "401":+ description: Unauthorized+ schema:+ additionalProperties: true+ type: object+ "404":+ description: Sandbox config not foundschema:$ref: '#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError'+ "409":+ description: Live sandboxes or unverifiable inventory+ schema:+ additionalProperties: true+ type: object+ "423":+ description: Sandbox config is being modified by another request+ schema:+ additionalProperties: true+ type: objectsecurity:- Bearer: []- summary: 通过邀请码预览组织+ - ApiKeyAuth: []+ summary: Update sandbox configtags:- - 组织管理- /organizations/search:+ - SandboxConfig+ /sandbox-configs/{id}/sandboxes:get:- description: 搜索已开放可被搜索的空间,用于发现并加入+ description: Return live/paused sandbox inventory and affected agent names for+ one config.parameters:- - description: 搜索关键词(空间名称或描述)- in: query- name: q+ - description: Sandbox config ID+ in: path+ name: id+ required: truetype: string- - default: 20- description: 返回数量限制- in: query- name: limit- type: integerproduces:- application/jsonresponses:"200":- description: OK+ description: Sandbox inventory+ schema:+ additionalProperties: true+ type: object+ "401":+ description: Unauthorizedschema:additionalProperties: truetype: objectsecurity:- Bearer: []- summary: 搜索可加入的空间+ - ApiKeyAuth: []+ summary: Inspect sandbox config inventorytags:- - 组织管理- /sandbox-configs:+ - SandboxConfig+ /sandbox-configs/{id}/skills:get:- description: List workspace sandbox backend configs with credentials masked.+ description: List the agent skills installed onto one sandbox config's image.+ parameters:+ - description: Sandbox config ID+ in: path+ name: id+ required: true+ type: stringproduces:- application/jsonresponses:"200":- description: Sandbox configs and defaults+ description: Installed skillsschema:additionalProperties: truetype: object@@ -12899,34 +13664,53 @@ paths:schema:additionalProperties: truetype: object+ "404":+ description: Sandbox config not found+ schema:+ $ref: '#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError'security:- Bearer: []- ApiKeyAuth: []- summary: List sandbox configs+ summary: List installed skillstags:- SandboxConfigpost:consumes:- application/json- description: Create a named workspace sandbox backend config. Credentials are- masked in the response.+ - multipart/form-data+ description: |-+ Install a skill onto this sandbox config's image. Send a zip+ as multipart form field "file", or JSON {"source":"..."} to+ pull from ClawHub, SkillHub, skills.sh, GitHub, GitLab, or a+ direct archive URL. The source must be readable anonymously.+ The install boots a sandbox and runs for minutes, so the+ request is only accepted; follow it via the install-events+ stream.parameters:- - description: Sandbox backend config+ - description: Sandbox config ID+ in: path+ name: id+ required: true+ type: string+ - description: Skill bundle (zip)+ in: formData+ name: file+ type: file+ - description: Install from a registry, git host, or archive URLin: bodyname: request- required: trueschema:- $ref: '#/definitions/internal_handler.sandboxConfigRequest'+ $ref: '#/definitions/internal_handler.skillSourceRequest'produces:- application/jsonresponses:- "201":- description: Created sandbox config+ "202":+ description: Install acceptedschema:additionalProperties: truetype: object"400":- description: Invalid request or validation failure+ description: Missing, oversized or invalid bundle or sourceschema:$ref: '#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError'"401":@@ -12934,31 +13718,38 @@ paths:schema:additionalProperties: truetype: object+ "404":+ description: Sandbox config not found+ schema:+ $ref: '#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError'security:- Bearer: []- ApiKeyAuth: []- summary: Create sandbox config+ summary: Install a skilltags:- SandboxConfig- /sandbox-configs/{id}:+ /sandbox-configs/{id}/skills/{skillId}:delete:- description: Soft-delete a sandbox backend config. force=true only overrides- unverifiable provider inventory, never confirmed live sandboxes.+ description: |-+ Remove a skill from the config's image. The removal rebuilds+ the image and runs for minutes, so it is only accepted; follow+ it via the install-events stream.parameters:- description: Sandbox config IDin: pathname: idrequired: truetype: string- - description: Force delete when inventory is unverifiable- in: query- name: force- type: boolean+ - description: Skill ID+ in: path+ name: skillId+ required: true+ type: stringproduces:- application/jsonresponses:- "200":- description: Deletion success+ "202":+ description: Removal acceptedschema:additionalProperties: truetype: object@@ -12967,30 +13758,34 @@ paths:schema:additionalProperties: truetype: object- "409":- description: Live sandboxes or unverifiable inventory+ "404":+ description: Skill not foundschema:- additionalProperties: true- type: object+ $ref: '#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError'security:- Bearer: []- ApiKeyAuth: []- summary: Delete sandbox config+ summary: Remove an installed skilltags:- SandboxConfigget:- description: Retrieve a workspace sandbox backend config with credentials masked.+ description: Retrieve one installed skill of a sandbox config.parameters:- description: Sandbox config IDin: pathname: idrequired: truetype: string+ - description: Skill ID+ in: path+ name: skillId+ required: true+ type: stringproduces:- application/jsonresponses:"200":- description: Sandbox config+ description: Installed skillschema:additionalProperties: truetype: object@@ -13000,42 +13795,47 @@ paths:additionalProperties: truetype: object"404":- description: Sandbox config not found+ description: Skill not foundschema:$ref: '#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError'security:- Bearer: []- ApiKeyAuth: []- summary: Get sandbox config+ summary: Get an installed skilltags:- SandboxConfig- put:+ patch:consumes:- application/json- description: Update a sandbox backend config. Identity-field changes are refused- while the config owns live or paused sandboxes.+ description: Show or hide an installed skill. The files stay in the image either+ way; removal is a separate flow.parameters:- description: Sandbox config IDin: pathname: idrequired: truetype: string- - description: Updated sandbox config+ - description: Skill ID+ in: path+ name: skillId+ required: true+ type: string+ - description: Fields to updatein: bodyname: requestrequired: trueschema:- $ref: '#/definitions/internal_handler.sandboxConfigRequest'+ $ref: '#/definitions/internal_handler.skillPatchRequest'produces:- application/jsonresponses:"200":- description: Updated sandbox config+ description: Updated skillschema:additionalProperties: truetype: object"400":- description: Invalid request or validation failure+ description: Invalid requestschema:$ref: '#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError'"401":@@ -13044,52 +13844,96 @@ paths:additionalProperties: truetype: object"404":- description: Sandbox config not found+ description: Skill not foundschema:$ref: '#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError'- "409":- description: Live sandboxes or unverifiable inventory+ security:+ - Bearer: []+ - ApiKeyAuth: []+ summary: Update an installed skill+ tags:+ - SandboxConfig+ /sandbox-configs/{id}/skills/{skillId}/install-events:+ get:+ description: |-+ Server-sent progress for one install or removal. The stream+ always terminates: with the run's own terminal event, with one+ derived from the durable status, or with a "detached" frame+ when it stops following a run that is still going.+ parameters:+ - description: Sandbox config ID+ in: path+ name: id+ required: true+ type: string+ - description: Skill ID+ in: path+ name: skillId+ required: true+ type: string+ produces:+ - text/event-stream+ responses:+ "200":+ description: SSE stream of progress eventsschema:- additionalProperties: true- type: object- "423":- description: Sandbox config is being modified by another request+ type: string+ "401":+ description: Unauthorizedschema:additionalProperties: truetype: object+ "404":+ description: Skill not found+ schema:+ $ref: '#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError'security:- Bearer: []- ApiKeyAuth: []- summary: Update sandbox config+ summary: Follow an install or removaltags:- SandboxConfig- /sandbox-configs/{id}/sandboxes:+ /sandbox-configs/{id}/skills/{skillId}/transcript:get:- description: Return live/paused sandbox inventory and affected agent names for- one config.+ description: |-+ Server-sent replay of everything the installer agent did — the+ prompt it was given, its thinking, the commands it ran and+ their output — followed live while the install is still+ running. Frames are the same shape the chat stream uses, so a+ console renders an install with the components it renders a+ chat turn with. 404 once the event log has expired; the+ durable message history is the fallback.parameters:- description: Sandbox config IDin: pathname: idrequired: truetype: string+ - description: Skill ID+ in: path+ name: skillId+ required: true+ type: stringproduces:- - application/json+ - text/event-streamresponses:"200":- description: Sandbox inventory+ description: SSE stream of transcript eventsschema:- additionalProperties: true- type: object+ type: string"401":description: Unauthorizedschema:additionalProperties: truetype: object+ "404":+ description: Skill or transcript not found+ schema:+ $ref: '#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError'security:- Bearer: []- ApiKeyAuth: []- summary: Inspect sandbox config inventory+ summary: Follow an install's agent transcripttags:- SandboxConfig/sessions:@@ -13610,44 +14454,6 @@ paths:summary: 继续流式响应tags:- 问答- /knowledge-search:- post:- consumes:- - application/json- description: 在知识库中搜索(不使用LLM总结)- parameters:- - description: 搜索请求- in: body- name: request- required: true- schema:- $ref: '#/definitions/internal_handler_session.SearchKnowledgeRequest'- - default: handle- description: 文件引用形式,public 返回可加载直链- enum:- - handle- - public- in: query- name: resource_urls- type: string- produces:- - application/json- responses:- "200":- description: 搜索结果- schema:- additionalProperties: true- type: object- "400":- description: 请求参数错误- schema:- $ref: '#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError'- security:- - Bearer: []- - ApiKeyAuth: []- summary: 知识搜索- tags:- - 问答/shared-agents:get:description: 返回所有共享给当前用户所在组织的智能体@@ -13689,7 +14495,12 @@ paths:get:consumes:- application/json- description: 获取所有预装的Agent Skills元数据+ description: 返回指定沙盒配置镜像内、智能体实际能调用的已安装技能(ready 且启用)。不传 sandbox_config_id 时列表为空。+ parameters:+ - description: Sandbox config ID+ in: query+ name: sandbox_config_id+ type: stringproduces:- application/jsonresponses:@@ -13698,14 +14509,10 @@ paths:schema:additionalProperties: truetype: object- "500":- description: 服务器错误- schema:- $ref: '#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError'security:- Bearer: []- ApiKeyAuth: []- summary: 获取预装Skills列表+ summary: 获取当前沙盒配置上可执行的 Skillstags:- Skills/storage-backends:@@ -14469,6 +15276,58 @@ paths:summary: Apply the default storage quota to every existing workspacetags:- System Admin+ /system/admin/users/create:+ post:+ consumes:+ - application/json+ description: |-+ Provision a new local user account (SystemAdmin only).+ When `password` is omitted or null, a cryptographically random+ password is generated (OIDC-style crypto/rand + base64url)+ and returned once in the response body. Any provided value,+ including empty string, is policy-checked. Tenant provisioning+ follows the shared auth.default_tenant_mode policy.+ parameters:+ - description: User creation request+ in: body+ name: request+ required: true+ schema:+ $ref: '#/definitions/github_com_Tencent_WeKnora_internal_types.AdminCreateUserRequest'+ produces:+ - application/json+ responses:+ "200":+ description: Identity already exists, returns the existing user+ schema:+ $ref: '#/definitions/internal_handler.CreateSystemUserResponse'+ "201":+ description: User created successfully+ schema:+ $ref: '#/definitions/internal_handler.CreateSystemUserResponse'+ "400":+ description: Invalid request or weak password+ schema:+ additionalProperties: true+ type: object+ "403":+ description: 'Forbidden: not a system admin'+ schema:+ additionalProperties: true+ type: object+ "409":+ description: Email and username refer to conflicting identities+ schema:+ additionalProperties: true+ type: object+ "500":+ description: Internal error+ schema:+ additionalProperties: true+ type: object+ summary: Create a new user (SystemAdmin)+ tags:+ - System Admin/system/admin/users/reset-password:post:consumes:diff --git a/frontend/src/api/system/index.ts b/frontend/src/api/system/index.tsindex fd91c89c5..0a7d541eb 100644--- a/frontend/src/api/system/index.ts+++ b/frontend/src/api/system/index.ts@@ -1038,7 +1038,7 @@ export function uploadConfigSkill(export function installConfigSkillFromSource(configId: string,- payload: { source: string; token?: string },+ payload: { source: string },): Promise<{ data: { skill_id: string } }> {return post(`/api/v1/sandbox-configs/${configId}/skills`, payload, {timeout: 2 * 60 * 1000,diff --git a/frontend/src/components/SandboxSkillsPanel.vue b/frontend/src/components/SandboxSkillsPanel.vueindex 2a6a222c4..15ec24e46 100644--- a/frontend/src/components/SandboxSkillsPanel.vue+++ b/frontend/src/components/SandboxSkillsPanel.vue@@ -83,18 +83,6 @@</t-button></template></t-input-adornment>- <div v-if="showRegistryToken" class="skill-token-row">- <p class="skill-token-label">{{ $t('settings.sandbox.skillSourceTokenLabel') }}</p>- <t-input- v-model="sourceToken"- type="password"- size="small"- autocomplete="off"- :placeholder="$t('settings.sandbox.skillSourceTokenPlaceholder')"- :disabled="installBusy"- />- <p class="skill-token-hint">{{ $t('settings.sandbox.skillSourceTokenHint') }}</p>- </div><div class="skill-install-split"><span>{{ $t('settings.sandbox.skillInstallOr') }}</span></div>@@ -333,8 +321,6 @@ const uploading = ref(false)const installingFromSource = ref(false)const uploadPercent = ref(0)const sourceInput = ref('')-const sourceToken = ref('')-const forceRegistryToken = ref(false)const skills = ref<ConfigSkill[]>([])const skillImage = ref<SandboxSkillImage | null>(null)const togglingId = ref('')@@ -369,8 +355,6 @@ const uploadHint = computed(() =>: t('settings.sandbox.skillUploadHint'),)const installBusy = computed(() => uploading.value || installingFromSource.value)-const sourceNeedsRegistryToken = computed(() => looksLikePrivateSkillHub(sourceInput.value))-const showRegistryToken = computed(() => sourceNeedsRegistryToken.value || forceRegistryToken.value)const deleteHint = computed(() =>skillRollout.value === 'new_session'? t('settings.sandbox.skillDeleteHintNewSession')@@ -382,48 +366,6 @@ const runtimeTemplateId = computed(() => {})const hasSkillSnapshot = computed(() => Boolean(skillImage.value?.snapshot_id?.trim()))-const PUBLIC_SKILL_HOSTS = new Set([- 'github.com',- 'www.github.com',- 'codeload.github.com',- 'gitlab.com',- 'www.gitlab.com',- 'skills.sh',- 'www.skills.sh',- 'clawhub.ai',- 'www.clawhub.ai',- 'clawhub.com',- 'www.clawhub.com',- 'skillhub.cn',- 'www.skillhub.cn',- 'api.skillhub.cn',-])--function looksLikePrivateSkillHub(raw: string): boolean {- const input = raw.trim()- if (!input.includes('://')) return false- try {- const parsed = new URL(input)- if (parsed.protocol !== 'http:' && parsed.protocol !== 'https:') return false- return !PUBLIC_SKILL_HOSTS.has(parsed.hostname.toLowerCase())- } catch {- return false- }-}--function isRegistryAuthError(err: unknown): boolean {- const message = err && typeof err === 'object' && 'message' in err- ? String((err as { message?: unknown }).message)- : String(err ?? '')- return /\bHTTP 401\b/.test(message) || /\bHTTP 403\b/.test(message)-}--watch(sourceInput, (value) => {- if (!looksLikePrivateSkillHub(value)) {- forceRegistryToken.value = false- }-})-function readLastChatModelID(): string {try {return localStorage.getItem(LAST_CHAT_MODEL_KEY) || ''@@ -750,21 +692,14 @@ async function installFromSource() {installingFromSource.value = truetry {await persistInstallerModel(installerModelId.value)- const token = showRegistryToken.value ? sourceToken.value.trim() : ''- const res = await installConfigSkillFromSource(props.record.id, {- source,- ...(token ? { token } : {}),- })+ const res = await installConfigSkillFromSource(props.record.id, { source })MessagePlugin.success(t('settings.sandbox.skillUploadAccepted'))sourceInput.value = ''- sourceToken.value = ''- forceRegistryToken.value = falseconst skillId = res?.data?.skill_idawait loadSkills()await refreshImage()if (skillId) followProgress(skillId)} catch (e: any) {- if (isRegistryAuthError(e)) forceRegistryToken.value = trueMessagePlugin.error(e?.message || t('settings.sandbox.skillSourceFailed'))} finally {installingFromSource.value = false@@ -999,28 +934,6 @@ onUnmounted(() => {}}-.skill-token-row {- margin-top: 8px;- display: flex;- flex-direction: column;- align-items: stretch;- gap: 6px;-}--.skill-token-label {- margin: 0;- font-size: 12px;- line-height: 1.4;- color: var(--td-text-color-secondary);-}--.skill-token-hint {- margin: 0;- font-size: 12px;- line-height: 1.4;- color: var(--td-text-color-placeholder);-}-.skill-install-split {display: flex;align-items: center;diff --git a/frontend/src/i18n/locales/en-US.ts b/frontend/src/i18n/locales/en-US.tsindex e0d06f197..979541ea8 100755--- a/frontend/src/i18n/locales/en-US.ts+++ b/frontend/src/i18n/locales/en-US.ts@@ -1282,9 +1282,6 @@ export default {skillUploadHint: 'Install writes the skill onto the current image and takes a new snapshot. This can take several minutes. The current chat turn is not interrupted; open sessions rebuild their sandbox on the next turn, which clears the session workspace scratch.',skillUploadHintNewSession: 'Install writes the skill onto the current image and takes a new snapshot. This can take several minutes. Already-open sessions keep their current sandbox until they end; only newly started sessions pick up this install.',skillSourcePlaceholder: 'Paste a URL or {\'@\'}owner/slug',- skillSourceTokenLabel: 'Private SkillHub token',- skillSourceTokenPlaceholder: 'Optional',- skillSourceTokenHint: 'Only needed for a self-hosted or private SkillHub. Used for this download only, not stored.',skillSourceInstall: 'Install',skillInstallOr: 'or',skillSourceFailed: 'Failed to install the skill from the registry',diff --git a/frontend/src/i18n/locales/ko-KR.ts b/frontend/src/i18n/locales/ko-KR.tsindex 8fd6c1c18..d41013075 100755--- a/frontend/src/i18n/locales/ko-KR.ts+++ b/frontend/src/i18n/locales/ko-KR.ts@@ -5121,9 +5121,6 @@ export default {skillUploadHint: '설치하면 현재 이미지에 스킬을 쓰고 새 스냅샷을 만듭니다. 몇 분이 걸릴 수 있습니다. 현재 대화 턴은 중단되지 않으며, 이미 열린 세션은 다음 턴에서 새 이미지로 샌드박스를 다시 만들고 그때 세션 작업 공간 초안이 지워집니다.',skillUploadHintNewSession: '설치하면 현재 이미지에 스킬을 쓰고 새 스냅샷을 만듭니다. 몇 분이 걸릴 수 있습니다. 이미 열린 세션은 세션이 끝날 때까지 기존 샌드박스를 유지하며, 이번에 설치한 스킬은 새로 시작한 세션에만 적용됩니다.',skillSourcePlaceholder: 'URL 또는 {\'@\'}owner/slug 붙여넣기',- skillSourceTokenLabel: '비공개 SkillHub 토큰',- skillSourceTokenPlaceholder: '선택 사항',- skillSourceTokenHint: '자체 호스팅 또는 비공개 SkillHub에서만 필요합니다. 이번 다운로드에만 사용되며 저장되지 않습니다.',skillSourceInstall: '설치',skillInstallOr: '또는',skillSourceFailed: '레지스트리에서 스킬을 설치하지 못했습니다',diff --git a/frontend/src/i18n/locales/ru-RU.ts b/frontend/src/i18n/locales/ru-RU.tsindex 72927d2b3..2e6fe2c01 100755--- a/frontend/src/i18n/locales/ru-RU.ts+++ b/frontend/src/i18n/locales/ru-RU.ts@@ -5121,9 +5121,6 @@ export default {skillUploadHint: 'Установка записывает навык в текущий образ и создаёт новый снимок. Это может занять несколько минут. Текущий ход диалога не прерывается; открытые сессии пересоздадут песочницу при следующем сообщении, и тогда черновики рабочей области сессии будут очищены.',skillUploadHintNewSession: 'Установка записывает навык в текущий образ и создаёт новый снимок. Это может занять несколько минут. Уже открытые сессии продолжают использовать текущую песочницу до своего завершения; этот навык появится только у новых сессий.',skillSourcePlaceholder: 'Вставьте URL или {\'@\'}owner/slug',- skillSourceTokenLabel: 'Токен закрытого SkillHub',- skillSourceTokenPlaceholder: 'Необязательно',- skillSourceTokenHint: 'Нужен только для собственного или закрытого SkillHub. Используется только для этой загрузки и не сохраняется.',skillSourceInstall: 'Установить',skillInstallOr: 'или',skillSourceFailed: 'Не удалось установить навык из реестра',diff --git a/frontend/src/i18n/locales/zh-CN.ts b/frontend/src/i18n/locales/zh-CN.tsindex 2b4ee4d22..272b380cc 100755--- a/frontend/src/i18n/locales/zh-CN.ts+++ b/frontend/src/i18n/locales/zh-CN.ts@@ -5123,9 +5123,6 @@ export default {skillUploadHint: '安装会在当前镜像上生成新快照,可能需要数分钟。当前这一轮对话不会中断;下一轮提问时才会按新镜像重建沙箱,会话工作区草稿会在那时清空。',skillUploadHintNewSession: '安装会在当前镜像上生成新快照,可能需要数分钟。已打开的会话继续使用原沙箱,直到该会话结束;只有新打开的会话才会带上这次安装的技能。',skillSourcePlaceholder: '粘贴链接或 {\'@\'}owner/slug',- skillSourceTokenLabel: '私有 SkillHub 访问令牌',- skillSourceTokenPlaceholder: '可选',- skillSourceTokenHint: '只发给这个平台,不会保存。公开 ClawHub / GitHub 技能不用填。',skillSourceInstall: '安装',skillInstallOr: '或',skillSourceFailed: '从托管平台安装技能失败',diff --git a/internal/application/service/tenant_skill_source.go b/internal/application/service/tenant_skill_source.goindex 8d87c847b..710f4c1ea 100644--- a/internal/application/service/tenant_skill_source.go+++ b/internal/application/service/tenant_skill_source.go@@ -15,6 +15,7 @@ import ("sync""time"+ apperrors "github.com/Tencent/WeKnora/internal/errors"secutils "github.com/Tencent/WeKnora/internal/utils")@@ -71,10 +72,26 @@ type skillSourceHandoff struct {// InstallSkillFromSource resolves a ClawHub / SkillHub / skills.sh / git /// direct-zip locator to a skill bundle and runs the same install as an upload.+//+// Every fetch is anonymous. Private registries are deliberately out of scope:+// carrying a credential here would mean deciding, per hop, which of a+// registry's handoff targets may see it, and there is no private registry to+// validate that against yet.func (s *TenantSkillService) InstallSkillFromSource(- ctx context.Context, tenantID uint64, configID, source, token string,+ ctx context.Context, tenantID uint64, configID, source string,) (string, error) {- archive, err := fetchSkillArchive(ctx, source, token, s.sourceHTTP)+ // The config is authorized before the fetch, not by InstallSkill after it.+ // The source is a caller-supplied host, so an unknown config ID must not+ // be able to spend an outbound request and a body-sized download first.+ cfgEntity, err := s.configs.GetByID(ctx, tenantID, configID)+ if err != nil {+ return "", err+ }+ if cfgEntity == nil {+ return "", apperrors.NewNotFoundError("sandbox config not found")+ }++ archive, err := fetchSkillArchive(ctx, source, s.sourceHTTP)if err != nil {return "", err}@@ -93,17 +110,46 @@ func skillSourceHTTPClient(override *http.Client) *http.Client {return skillSourceHTTPDefault}-func fetchSkillArchive(ctx context.Context, source, token string, client *http.Client) ([]byte, error) {+func fetchSkillArchive(ctx context.Context, source string, client *http.Client) ([]byte, error) {parsed, err := parseSkillSource(source)if err != nil {return nil, err}httpClient := skillSourceHTTPClient(client)- body, contentType, err := fetchSkillSourceBytes(ctx, httpClient, parsed, token, 0)+ fetched, err := fetchSkillSourceBytes(ctx, httpClient, parsed, 0)if err != nil {- return nil, err+ // A bare "owner/slug" is both a GitHub repo and a registry slug, and+ // the paste usually came from the registry listing. Only the failure+ // of the first reading tells us which one it was.+ alt, ok := registrySlugFallback(source, parsed)+ if !ok {+ return nil, err+ }+ altFetched, altErr := fetchSkillSourceBytes(ctx, httpClient, alt, 0)+ if altErr != nil {+ return nil, err+ }+ fetched = altFetched}- return normalizeFetchedSkillArchive(body, contentType, parsed.Subdir)+ return normalizeFetchedSkillArchive(fetched.body, fetched.contentType, fetched.subdir)+}++// registrySlugFallback re-reads a shorthand that was taken for a GitHub repo as+// a registry slug. It applies only to a bare "owner/slug": anything carrying a+// ref, a subdirectory or a scheme said what it meant.+func registrySlugFallback(raw string, parsed parsedSkillSource) (parsedSkillSource, bool) {+ if parsed.Kind != skillSourceGitHub || parsed.Subdir != "" || parsed.Ref != "HEAD" {+ return parsedSkillSource{}, false+ }+ spec := strings.TrimRight(strings.TrimSpace(raw), "/")+ if spec == "" || strings.Contains(spec, "://") || strings.Contains(spec, "@") {+ return parsedSkillSource{}, false+ }+ alt, err := parseRegistrySlug(defaultSkillRegistryOrigin, spec)+ if err != nil {+ return parsedSkillSource{}, false+ }+ return alt, true}func parseSkillSource(raw string) (parsedSkillSource, error) {@@ -457,6 +503,17 @@ func splitPath(p string) []string {return out}+// escapePathSegments escapes a value that spans several path segments, such as+// a "refs/heads/main" ref or a GitLab "group/subgroup" owner, without turning+// its separators into %2F.+func escapePathSegments(p string) string {+ parts := strings.Split(p, "/")+ for i, part := range parts {+ parts[i] = url.PathEscape(part)+ }+ return strings.Join(parts, "/")+}+func isDirectArchivePath(p string) bool {lower := strings.ToLower(p)for _, ext := range []string{".zip", ".tgz", ".tar.gz", ".tar", ".md"} {@@ -494,71 +551,65 @@ func (s parsedSkillSource) fetchURL() (string, error) {ref = "HEAD"}return fmt.Sprintf("https://codeload.github.com/%s/%s/zip/%s",- s.Owner, s.Repo, ref), nil+ escapePathSegments(s.Owner), url.PathEscape(s.Repo), escapePathSegments(ref)), nilcase skillSourceGitLab:ref := s.Refif ref == "" {ref = "HEAD"}- return fmt.Sprintf("https://gitlab.com/%s/%s/-/archive/%s/%s-%s.zip",- s.Owner, s.Repo, ref, s.Repo, ref), nil+ return fmt.Sprintf("https://gitlab.com/%s/%s/-/archive/%s/%s.zip",+ escapePathSegments(s.Owner), url.PathEscape(s.Repo),+ escapePathSegments(ref), url.PathEscape(s.Repo+"-"+ref)), nildefault:return "", fmt.Errorf("%w: cannot resolve source", ErrSkillSourceInvalid)}}+// fetchedSkillSource is the archive a source resolved to, plus the skill root+// inside it. The subdir is carried out of the fetch rather than re-derived from+// the original locator: a registry handoff to a monorepo zip names the one+// skill it meant, and only the last hop knows it.+type fetchedSkillSource struct {+ body []byte+ contentType string+ subdir string+}+func fetchSkillSourceBytes(- ctx context.Context, client *http.Client, src parsedSkillSource, token string, hop int,-) ([]byte, string, error) {+ ctx context.Context, client *http.Client, src parsedSkillSource, hop int,+) (fetchedSkillSource, error) {if hop > skillSourceMaxHops {- return nil, "", fmt.Errorf("%w: too many source redirects", ErrSkillSourceInvalid)+ return fetchedSkillSource{}, fmt.Errorf("%w: too many source redirects", ErrSkillSourceInvalid)}target, err := src.fetchURL()if err != nil {- return nil, "", err+ return fetchedSkillSource{}, err}- body, contentType, err := getSkillURL(ctx, client, target, token, shouldSendSkillToken(src, token))+ body, contentType, err := getSkillURL(ctx, client, target)if err != nil {- return nil, "", err+ return fetchedSkillSource{}, err}+ fetched := fetchedSkillSource{body: body, contentType: contentType, subdir: src.Subdir}if isZipMagic(body) || looksLikeSkillMarkdown(body) {- return body, contentType, nil+ return fetched, nil}if !looksLikeJSON(contentType, body) {if isZipPayload(contentType, body) {- return body, contentType, nil+ return fetched, nil}- return nil, "", fmt.Errorf("%w: remote did not return a skill archive", ErrSkillSourceInvalid)+ return fetchedSkillSource{}, fmt.Errorf(+ "%w: remote did not return a skill archive", ErrSkillSourceInvalid)}var handoff skillSourceHandoffif err := json.Unmarshal(body, &handoff); err != nil {- return nil, "", fmt.Errorf("%w: remote JSON is not a skill archive", ErrSkillSourceInvalid)+ return fetchedSkillSource{}, fmt.Errorf(+ "%w: remote JSON is not a skill archive", ErrSkillSourceInvalid)}next, err := sourceFromHandoff(src, handoff)if err != nil {- return nil, "", err+ return fetchedSkillSource{}, err}- return fetchSkillSourceBytes(ctx, client, next, token, hop+1)-}--func shouldSendSkillToken(src parsedSkillSource, token string) bool {- if token == "" || src.Kind == skillSourceGitHub || src.Kind == skillSourceGitLab {- return false- }- target, err := src.fetchURL()- if err != nil {- return false- }- host := ""- if u, err := url.Parse(target); err == nil {- host = strings.ToLower(u.Hostname())- }- switch host {- case "github.com", "www.github.com", "codeload.github.com",- "gitlab.com", "www.gitlab.com", "skills.sh", "www.skills.sh":- return false- }- return src.Kind == skillSourceRegistry || src.Kind == skillSourceDirect+ return fetchSkillSourceBytes(ctx, client, next, hop+1)}func sourceFromHandoff(prev parsedSkillSource, handoff skillSourceHandoff) (parsedSkillSource, error) {@@ -576,9 +627,14 @@ func sourceFromHandoff(prev parsedSkillSource, handoff skillSourceHandoff) (pars}archiveURL = strings.TrimRight(prev.Registry, "/") + archiveURL}+ // A handoff that is not a parseable http(s) URL is refused rather than+ // passed through as a direct target: SSRF validation normalises a+ // scheme-less string by prepending https://, which would turn a malformed+ // response into a fetch of a host we never agreed to read.next, err := parseSkillSourceURL(archiveURL)if err != nil {- next = parsedSkillSource{Kind: skillSourceDirect, DirectURL: archiveURL}+ return parsedSkillSource{}, fmt.Errorf(+ "%w: registry archive URL is not usable: %v", ErrSkillSourceInvalid, err)}if next.Subdir == "" && strings.TrimSpace(handoff.Path) != "" {next.Subdir = strings.Trim(handoff.Path, "/")@@ -590,7 +646,7 @@ func sourceFromHandoff(prev parsedSkillSource, handoff skillSourceHandoff) (pars}func getSkillURL(- ctx context.Context, client *http.Client, rawURL, token string, sendToken bool,+ ctx context.Context, client *http.Client, rawURL string,) ([]byte, string, error) {if err := secutils.ValidateURLForSSRF(rawURL); err != nil {return nil, "", fmt.Errorf("%w: %s", ErrSkillSourceInvalid,@@ -602,9 +658,6 @@ func getSkillURL(}req.Header.Set("User-Agent", skillSourceUserAgent)req.Header.Set("Accept", "application/zip, application/octet-stream, application/json, text/plain;q=0.9, */*;q=0.8")- if sendToken && token != "" {- req.Header.Set("Authorization", "Bearer "+token)- }resp, err := client.Do(req)if err != nil {if errors.Is(err, secutils.ErrSSRFRedirectBlocked) {diff --git a/internal/application/service/tenant_skill_source_test.go b/internal/application/service/tenant_skill_source_test.goindex 2de17d6d6..932fa7e5d 100644--- a/internal/application/service/tenant_skill_source_test.go+++ b/internal/application/service/tenant_skill_source_test.go@@ -5,6 +5,7 @@ import ("net/http""net/http/httptest""strings"+ "sync""testing""github.com/Tencent/WeKnora/internal/utils"@@ -155,9 +156,7 @@ func TestSkillHubCNMapsToDownloadAPI(t *testing.T) {func TestFetchSkillArchiveFromRegistry(t *testing.T) {archive := zipBundle(t, map[string]string{"SKILL.md": validSkillMD})- var sawAuth stringserver := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {- sawAuth = r.Header.Get("Authorization")if r.URL.Path != "/api/v1/download" || r.URL.Query().Get("slug") != "owner/demo" {http.NotFound(w, r)return@@ -168,15 +167,128 @@ func TestFetchSkillArchiveFromRegistry(t *testing.T) {t.Cleanup(server.Close)allowLoopbackSkillFetch(t)- got, err := fetchSkillArchive(t.Context(), server.URL+"/owner/demo", "sk_test", server.Client())+ got, err := fetchSkillArchive(t.Context(), server.URL+"/owner/demo", server.Client())require.NoError(t, err)- require.Equal(t, "Bearer sk_test", sawAuth)bundle, err := ParseSkillBundle(got)require.NoError(t, err)require.Equal(t, "pdf-tools", bundle.Name)}+// Skill sources are read anonymously. Nothing in this flow holds a credential,+// so no hop may present one.+func TestFetchSkillArchiveSendsNoCredentials(t *testing.T) {+ archive := zipBundle(t, map[string]string{"SKILL.md": validSkillMD})++ var archiveAuth, registryAuth string+ var mu sync.Mutex+ server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {+ mu.Lock()+ defer mu.Unlock()+ switch r.URL.Path {+ case "/api/v1/download":+ registryAuth = r.Header.Get("Authorization")+ w.Header().Set("Content-Type", "application/json")+ _ = json.NewEncoder(w).Encode(skillSourceHandoff{+ ArchiveURL: "http://" + r.Host + "/skill.zip",+ })+ case "/skill.zip":+ archiveAuth = r.Header.Get("Authorization")+ w.Header().Set("Content-Type", "application/zip")+ _, _ = w.Write(archive)+ default:+ http.NotFound(w, r)+ }+ }))+ t.Cleanup(server.Close)+ allowLoopbackSkillFetch(t)++ _, err := fetchSkillArchive(t.Context(), server.URL+"/owner/demo", server.Client())+ require.NoError(t, err)+ require.Empty(t, registryAuth)+ require.Empty(t, archiveAuth)+}++// The handoff's path is what names one skill inside a monorepo zip; losing it+// makes a multi-skill repo either ambiguous or wrong.+func TestFetchSkillArchiveUsesHandoffPath(t *testing.T) {+ otherSkillMD := strings.Replace(validSkillMD, "name: pdf-tools", "name: csv-tools", 1)+ archive := zipBundle(t, map[string]string{+ "repo-main/README.md": "# repo",+ "repo-main/skills/pdf/SKILL.md": validSkillMD,+ "repo-main/skills/pdf/extract.py": "print('pdf')\n",+ "repo-main/skills/csv/SKILL.md": otherSkillMD,+ "repo-main/skills/csv/transform.py": "print('csv')\n",+ })+ server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {+ switch r.URL.Path {+ case "/api/v1/download":+ _ = json.NewEncoder(w).Encode(skillSourceHandoff{+ SourceRef: "public-github",+ ArchiveURL: "http://" + r.Host + "/archive.zip",+ Path: "skills/csv",+ })+ case "/archive.zip":+ w.Header().Set("Content-Type", "application/zip")+ _, _ = w.Write(archive)+ default:+ http.NotFound(w, r)+ }+ }))+ t.Cleanup(server.Close)+ allowLoopbackSkillFetch(t)++ got, err := fetchSkillArchive(t.Context(), server.URL+"/owner/demo", server.Client())+ require.NoError(t, err)+ bundle, err := ParseSkillBundle(got)+ require.NoError(t, err)+ require.Equal(t, "csv-tools", bundle.Name)+ require.Contains(t, bundle.Files, "transform.py")+ require.NotContains(t, bundle.Files, "extract.py")+}++// A malformed handoff is refused: SSRF validation normalises a scheme-less+// string by prepending https://, so passing it through would fetch a host the+// response never legally named.+func TestFetchSkillArchiveRejectsUnusableHandoffURL(t *testing.T) {+ server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, _ *http.Request) {+ w.Header().Set("Content-Type", "application/json")+ _ = json.NewEncoder(w).Encode(skillSourceHandoff{ArchiveURL: "evil.example.com/skill.zip"})+ }))+ t.Cleanup(server.Close)+ allowLoopbackSkillFetch(t)++ _, err := fetchSkillArchive(t.Context(), server.URL+"/owner/demo", server.Client())+ require.ErrorIs(t, err, ErrSkillSourceInvalid)+ require.ErrorContains(t, err, "archive URL is not usable")+}++// A bare "owner/slug" reads as a GitHub repo and as a registry slug. The+// registry is the fallback, but only for a shorthand that named nothing else.+func TestRegistrySlugFallback(t *testing.T) {+ bare := "clawhub_pskoett/self-improving-agent"+ parsed, err := parseSkillSource(bare)+ require.NoError(t, err)+ require.Equal(t, skillSourceGitHub, parsed.Kind)++ alt, ok := registrySlugFallback(bare, parsed)+ require.True(t, ok)+ require.Equal(t, skillSourceRegistry, alt.Kind)+ require.Equal(t, defaultSkillRegistryOrigin, alt.Registry)+ require.Equal(t, bare, alt.Slug)++ withSubdir := "vercel-labs/agent-skills@frontend-design"+ parsed, err = parseSkillSource(withSubdir)+ require.NoError(t, err)+ _, ok = registrySlugFallback(withSubdir, parsed)+ require.False(t, ok, "a shorthand that named a skill directory meant GitHub")++ parsed, err = parseSkillSource("https://github.com/vercel-labs/agent-skills")+ require.NoError(t, err)+ _, ok = registrySlugFallback("https://github.com/vercel-labs/agent-skills", parsed)+ require.False(t, ok, "an explicit GitHub URL is not a registry slug")+}+func TestFetchSkillArchiveFollowsGitHubHandoff(t *testing.T) {archive := zipBundle(t, map[string]string{"repo-main/README.md": "# repo",@@ -201,7 +313,7 @@ func TestFetchSkillArchiveFollowsGitHubHandoff(t *testing.T) {t.Cleanup(server.Close)allowLoopbackSkillFetch(t)- got, err := fetchSkillArchive(t.Context(), server.URL+"/owner/demo", "", server.Client())+ got, err := fetchSkillArchive(t.Context(), server.URL+"/owner/demo", server.Client())require.NoError(t, err)bundle, err := ParseSkillBundle(got)require.NoError(t, err)@@ -218,23 +330,13 @@ func TestFetchSkillArchiveFromSkillMarkdown(t *testing.T) {t.Cleanup(server.Close)allowLoopbackSkillFetch(t)- got, err := fetchSkillArchive(t.Context(), server.URL+"/SKILL.md", "", server.Client())+ got, err := fetchSkillArchive(t.Context(), server.URL+"/SKILL.md", server.Client())require.NoError(t, err)bundle, err := ParseSkillBundle(got)require.NoError(t, err)require.Equal(t, "pdf-tools", bundle.Name)}-func TestFetchSkillArchiveDoesNotSendTokenToGitHub(t *testing.T) {- src := parsedSkillSource{- Kind: skillSourceGitHub, Owner: "o", Repo: "r", Ref: "HEAD",- }- require.False(t, shouldSendSkillToken(src, "sk_secret"))- src.Kind = skillSourceRegistry- src.Registry = "https://skillhub.example.com"- require.True(t, shouldSendSkillToken(src, "sk_secret"))-}-func TestParseSkillBundleNestedRemoteArchive(t *testing.T) {data := zipBundle(t, map[string]string{"repo-abc/LICENSE": "MIT",@@ -267,7 +369,7 @@ func TestFetchSkillArchiveRejectsNonSkillHTML(t *testing.T) {t.Cleanup(server.Close)allowLoopbackSkillFetch(t)- _, err := fetchSkillArchive(t.Context(), server.URL+"/demo.zip", "", server.Client())+ _, err := fetchSkillArchive(t.Context(), server.URL+"/demo.zip", server.Client())require.ErrorIs(t, err, ErrSkillSourceInvalid)require.True(t, strings.Contains(err.Error(), "skill archive") ||strings.Contains(err.Error(), "zip skill bundle"))diff --git a/internal/handler/sandbox_skill.go b/internal/handler/sandbox_skill.goindex 989d54bb7..c69747d58 100644--- a/internal/handler/sandbox_skill.go+++ b/internal/handler/sandbox_skill.go@@ -49,7 +49,7 @@ type sandboxSkillService interface {) (*types.TenantSkillEntity, error)InstallSkill(ctx context.Context, tenantID uint64, configID string, archive []byte) (string, error)InstallSkillFromSource(- ctx context.Context, tenantID uint64, configID, source, token string,+ ctx context.Context, tenantID uint64, configID, source string,) (string, error)RemoveSkill(ctx context.Context, tenantID uint64, configID, skillID string) errorLastProgress(@@ -190,9 +190,10 @@ func (h *SandboxSkillHandler) Get(c *gin.Context) {// @Description Install a skill onto this sandbox config's image. Send a zip// @Description as multipart form field "file", or JSON {"source":"..."} to// @Description pull from ClawHub, SkillHub, skills.sh, GitHub, GitLab, or a-// @Description direct archive URL. The install boots a sandbox and runs for-// @Description minutes, so the request is only accepted; follow it via the-// @Description install-events stream.+// @Description direct archive URL. The source must be readable anonymously.+// @Description The install boots a sandbox and runs for minutes, so the+// @Description request is only accepted; follow it via the install-events+// @Description stream.// @Tags SandboxConfig// @Accept json// @Accept multipart/form-data@@ -258,11 +259,9 @@ func (h *SandboxSkillHandler) Upload(c *gin.Context) {type skillSourceRequest struct {// Source is a ClawHub/SkillHub slug or page URL, a skills.sh / GitHub /- // GitLab locator, or a direct zip/SKILL.md URL.+ // GitLab locator, or a direct zip/SKILL.md URL. It must be readable+ // anonymously: the fetch carries no credential of any kind.Source string `json:"source"`- // Token is an optional registry bearer token (private SkillHub). It is- // used only for that fetch and is never stored.- Token string `json:"token"`}func (h *SandboxSkillHandler) installFromSource(c *gin.Context) {@@ -283,7 +282,7 @@ func (h *SandboxSkillHandler) installFromSource(c *gin.Context) {}skillID, err := h.service.InstallSkillFromSource(- c.Request.Context(), sandboxConfigTenantID(c), c.Param("id"), source, req.Token,+ c.Request.Context(), sandboxConfigTenantID(c), c.Param("id"), source,)if err != nil {respondSkillServiceError(c, err)diff --git a/internal/handler/sandbox_skill_test.go b/internal/handler/sandbox_skill_test.goindex 73a917e67..e7c15e618 100644--- a/internal/handler/sandbox_skill_test.go+++ b/internal/handler/sandbox_skill_test.go@@ -38,7 +38,6 @@ type fakeSandboxSkillService struct {installID stringinstallErr errorinstallSource string- installToken stringsourceErr errorremoveErr error@@ -124,10 +123,10 @@ func (f *fakeSandboxSkillService) InstallSkill(}func (f *fakeSandboxSkillService) InstallSkillFromSource(- _ context.Context, tenantID uint64, configID, source, token string,+ _ context.Context, tenantID uint64, configID, source string,) (string, error) {f.installTenant, f.installConfig = tenantID, configID- f.installSource, f.installToken = source, token+ f.installSource = sourcereturn f.installID, f.sourceErr}@@ -281,7 +280,7 @@ func TestSandboxSkillInstallFromSourceAcceptedReturnsSkillID(t *testing.T) {svc := &fakeSandboxSkillService{installID: "skill-9"}router := newSkillTestRouter(NewSandboxSkillHandler(svc, nil))- body := `{"source":"@owner/demo","token":"sk_test"}`+ body := `{"source":"@owner/demo"}`req := httptest.NewRequest(http.MethodPost, "/sandbox-configs/cfg-a/skills",strings.NewReader(body))req.Header.Set("Content-Type", "application/json")@@ -292,7 +291,6 @@ func TestSandboxSkillInstallFromSourceAcceptedReturnsSkillID(t *testing.T) {require.Equal(t, testSkillTenantID, svc.installTenant)require.Equal(t, "cfg-a", svc.installConfig)require.Equal(t, "@owner/demo", svc.installSource)- require.Equal(t, "sk_test", svc.installToken)require.Nil(t, svc.installBytes, "a source install must not look like an upload")}diff --git a/internal/handler/skill_handler.go b/internal/handler/skill_handler.goindex 63888a89b..d27735500 100644--- a/internal/handler/skill_handler.go+++ b/internal/handler/skill_handler.go@@ -41,7 +41,6 @@ type SkillInfoResponse struct {// @Produce json// @Param sandbox_config_id query string false "Sandbox config ID"// @Success 200 {object} map[string]interface{} "Skills列表"-// @Failure 500 {object} errors.AppError "服务器错误"// @Security Bearer// @Security ApiKeyAuth// @Router /skills [get]