From 2c8f8f32fd54e071ea3799911e22e8db9beb03ee Mon Sep 17 00:00:00 2001 From: CityFun <31820853+zhengkunwang223@users.noreply.github.com> Date: Tue, 7 Apr 2026 15:31:32 +0800 Subject: [PATCH] feat: Add default external port access to application settings. (#12426) --- core/app/dto/setting.go | 3 +- core/app/service/setting.go | 10 +- core/cmd/server/docs/docs.go | 3334 ++++++++++++----- core/cmd/server/docs/swagger.json | 3332 +++++++++++----- core/init/migration/migrate.go | 1 + core/init/migration/migrations/init.go | 20 + frontend/src/api/interface/app.ts | 1 + frontend/src/lang/modules/en.ts | 1 + frontend/src/lang/modules/es-es.ts | 1 + frontend/src/lang/modules/ja.ts | 1 + frontend/src/lang/modules/ko.ts | 1 + frontend/src/lang/modules/ms.ts | 1 + frontend/src/lang/modules/pt-br.ts | 1 + frontend/src/lang/modules/ru.ts | 1 + frontend/src/lang/modules/tr.ts | 1 + frontend/src/lang/modules/zh-Hant.ts | 1 + frontend/src/lang/modules/zh.ts | 1 + .../src/views/app-store/detail/form/index.vue | 15 + .../src/views/app-store/setting/index.vue | 10 + 19 files changed, 5051 insertions(+), 1685 deletions(-) diff --git a/core/app/dto/setting.go b/core/app/dto/setting.go index 8b1e79099..2e185c5c1 100644 --- a/core/app/dto/setting.go +++ b/core/app/dto/setting.go @@ -238,13 +238,14 @@ type TerminalInfo struct { } type AppstoreUpdate struct { - Scope string `json:"scope" validate:"required,oneof=UninstallDeleteImage UpgradeBackup UninstallDeleteBackup"` + Scope string `json:"scope" validate:"required,oneof=UninstallDeleteImage UpgradeBackup UninstallDeleteBackup InstallAllowPort"` Status string `json:"status" validate:"required,oneof=Disable Enable"` } type AppstoreConfig struct { UninstallDeleteImage string `json:"uninstallDeleteImage"` UpgradeBackup string `json:"upgradeBackup"` UninstallDeleteBackup string `json:"uninstallDeleteBackup"` + InstallAllowPort string `json:"installAllowPort"` } type LoginSetting struct { diff --git a/core/app/service/setting.go b/core/app/service/setting.go index 8c5c156cf..873f7f960 100644 --- a/core/app/service/setting.go +++ b/core/app/service/setting.go @@ -719,15 +719,19 @@ func (u *SettingService) GetAppstoreConfig() (*dto.AppstoreConfig, error) { res := &dto.AppstoreConfig{} res.UninstallDeleteImage, _ = settingRepo.GetValueByKey("UninstallDeleteImage") if res.UninstallDeleteImage == "" { - res.UninstallDeleteImage = "False" + res.UninstallDeleteImage = constant.StatusDisable } res.UpgradeBackup, _ = settingRepo.GetValueByKey("UpgradeBackup") if res.UpgradeBackup == "" { - res.UpgradeBackup = "False" + res.UpgradeBackup = constant.StatusDisable } res.UninstallDeleteBackup, _ = settingRepo.GetValueByKey("UninstallDeleteBackup") if res.UninstallDeleteBackup == "" { - res.UninstallDeleteBackup = "False" + res.UninstallDeleteBackup = constant.StatusDisable + } + res.InstallAllowPort, _ = settingRepo.GetValueByKey("InstallAllowPort") + if res.InstallAllowPort == "" { + res.InstallAllowPort = constant.StatusDisable } return res, nil } diff --git a/core/cmd/server/docs/docs.go b/core/cmd/server/docs/docs.go index 09ac51ce8..c69f3d9ea 100644 --- a/core/cmd/server/docs/docs.go +++ b/core/cmd/server/docs/docs.go @@ -126,6 +126,152 @@ const docTemplate = `{ ] } }, + "/ai/agents/accounts/models": { + "post": { + "consumes": [ + "application/json" + ], + "parameters": [ + { + "description": "request", + "in": "body", + "name": "request", + "required": true, + "schema": { + "$ref": "#/definitions/dto.AgentAccountModelReq" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "items": { + "$ref": "#/definitions/dto.AgentAccountModel" + }, + "type": "array" + } + } + }, + "security": [ + { + "ApiKeyAuth": [] + }, + { + "Timestamp": [] + } + ], + "summary": "List Agent account models", + "tags": [ + "AI" + ] + } + }, + "/ai/agents/accounts/models/create": { + "post": { + "consumes": [ + "application/json" + ], + "parameters": [ + { + "description": "request", + "in": "body", + "name": "request", + "required": true, + "schema": { + "$ref": "#/definitions/dto.AgentAccountModelCreateReq" + } + } + ], + "responses": { + "200": { + "description": "OK" + } + }, + "security": [ + { + "ApiKeyAuth": [] + }, + { + "Timestamp": [] + } + ], + "summary": "Create Agent account model", + "tags": [ + "AI" + ] + } + }, + "/ai/agents/accounts/models/delete": { + "post": { + "consumes": [ + "application/json" + ], + "parameters": [ + { + "description": "request", + "in": "body", + "name": "request", + "required": true, + "schema": { + "$ref": "#/definitions/dto.AgentAccountModelDeleteReq" + } + } + ], + "responses": { + "200": { + "description": "OK" + } + }, + "security": [ + { + "ApiKeyAuth": [] + }, + { + "Timestamp": [] + } + ], + "summary": "Delete Agent account model", + "tags": [ + "AI" + ] + } + }, + "/ai/agents/accounts/models/update": { + "post": { + "consumes": [ + "application/json" + ], + "parameters": [ + { + "description": "request", + "in": "body", + "name": "request", + "required": true, + "schema": { + "$ref": "#/definitions/dto.AgentAccountModelUpdateReq" + } + } + ], + "responses": { + "200": { + "description": "OK" + } + }, + "security": [ + { + "ApiKeyAuth": [] + }, + { + "Timestamp": [] + } + ], + "summary": "Update Agent account model", + "tags": [ + "AI" + ] + } + }, "/ai/agents/accounts/search": { "post": { "consumes": [ @@ -234,7 +380,7 @@ const docTemplate = `{ ] } }, - "/ai/agents/browser/get": { + "/ai/agents/agent/bind": { "post": { "consumes": [ "application/json" @@ -246,45 +392,7 @@ const docTemplate = `{ "name": "request", "required": true, "schema": { - "$ref": "#/definitions/dto.AgentBrowserConfigReq" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/dto.AgentBrowserConfig" - } - } - }, - "security": [ - { - "ApiKeyAuth": [] - }, - { - "Timestamp": [] - } - ], - "summary": "Get Agent Browser config", - "tags": [ - "AI" - ] - } - }, - "/ai/agents/browser/update": { - "post": { - "consumes": [ - "application/json" - ], - "parameters": [ - { - "description": "request", - "in": "body", - "name": "request", - "required": true, - "schema": { - "$ref": "#/definitions/dto.AgentBrowserConfigUpdateReq" + "$ref": "#/definitions/dto.AgentRoleBindReq" } } ], @@ -301,7 +409,346 @@ const docTemplate = `{ "Timestamp": [] } ], - "summary": "Update Agent Browser config", + "summary": "Bind Agent role channel", + "tags": [ + "AI" + ] + } + }, + "/ai/agents/agent/channels": { + "post": { + "consumes": [ + "application/json" + ], + "parameters": [ + { + "description": "request", + "in": "body", + "name": "request", + "required": true, + "schema": { + "$ref": "#/definitions/dto.AgentRoleChannelsReq" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "items": { + "$ref": "#/definitions/dto.AgentRoleChannelItem" + }, + "type": "array" + } + } + }, + "security": [ + { + "ApiKeyAuth": [] + }, + { + "Timestamp": [] + } + ], + "summary": "Get Agent role channels from config file", + "tags": [ + "AI" + ] + } + }, + "/ai/agents/agent/create": { + "post": { + "consumes": [ + "application/json" + ], + "parameters": [ + { + "description": "request", + "in": "body", + "name": "request", + "required": true, + "schema": { + "$ref": "#/definitions/dto.AgentRoleCreateReq" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/dto.AgentRoleCreateResp" + } + } + }, + "security": [ + { + "ApiKeyAuth": [] + }, + { + "Timestamp": [] + } + ], + "summary": "Create Agent role", + "tags": [ + "AI" + ] + } + }, + "/ai/agents/agent/delete": { + "post": { + "consumes": [ + "application/json" + ], + "parameters": [ + { + "description": "request", + "in": "body", + "name": "request", + "required": true, + "schema": { + "$ref": "#/definitions/dto.AgentRoleDeleteReq" + } + } + ], + "responses": { + "200": { + "description": "OK" + } + }, + "security": [ + { + "ApiKeyAuth": [] + }, + { + "Timestamp": [] + } + ], + "summary": "Delete Agent role", + "tags": [ + "AI" + ] + } + }, + "/ai/agents/agent/list": { + "post": { + "consumes": [ + "application/json" + ], + "parameters": [ + { + "description": "request", + "in": "body", + "name": "request", + "required": true, + "schema": { + "$ref": "#/definitions/dto.AgentConfiguredAgentsReq" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "items": { + "$ref": "#/definitions/dto.AgentConfiguredAgentItem" + }, + "type": "array" + } + } + }, + "security": [ + { + "ApiKeyAuth": [] + }, + { + "Timestamp": [] + } + ], + "summary": "Get configured Agent roles from config file", + "tags": [ + "AI" + ] + } + }, + "/ai/agents/agent/md/list": { + "post": { + "consumes": [ + "application/json" + ], + "parameters": [ + { + "description": "request", + "in": "body", + "name": "request", + "required": true, + "schema": { + "$ref": "#/definitions/dto.AgentRoleMarkdownFilesReq" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "items": { + "$ref": "#/definitions/dto.AgentRoleMarkdownFileItem" + }, + "type": "array" + } + } + }, + "security": [ + { + "ApiKeyAuth": [] + }, + { + "Timestamp": [] + } + ], + "summary": "Get Agent role markdown files", + "tags": [ + "AI" + ] + } + }, + "/ai/agents/agent/md/update": { + "post": { + "consumes": [ + "application/json" + ], + "parameters": [ + { + "description": "request", + "in": "body", + "name": "request", + "required": true, + "schema": { + "$ref": "#/definitions/dto.AgentRoleMarkdownFilesUpdateReq" + } + } + ], + "responses": { + "200": { + "description": "OK" + } + }, + "security": [ + { + "ApiKeyAuth": [] + }, + { + "Timestamp": [] + } + ], + "summary": "Update Agent role markdown file", + "tags": [ + "AI" + ] + } + }, + "/ai/agents/agent/unbind": { + "post": { + "consumes": [ + "application/json" + ], + "parameters": [ + { + "description": "request", + "in": "body", + "name": "request", + "required": true, + "schema": { + "$ref": "#/definitions/dto.AgentRoleBindReq" + } + } + ], + "responses": { + "200": { + "description": "OK" + } + }, + "security": [ + { + "ApiKeyAuth": [] + }, + { + "Timestamp": [] + } + ], + "summary": "Unbind Agent role channel", + "tags": [ + "AI" + ] + } + }, + "/ai/agents/channel/dingtalk/get": { + "post": { + "consumes": [ + "application/json" + ], + "parameters": [ + { + "description": "request", + "in": "body", + "name": "request", + "required": true, + "schema": { + "$ref": "#/definitions/dto.AgentIDReq" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/dto.AgentDingTalkConfig" + } + } + }, + "security": [ + { + "ApiKeyAuth": [] + }, + { + "Timestamp": [] + } + ], + "summary": "Get Agent DingTalk channel config", + "tags": [ + "AI" + ] + } + }, + "/ai/agents/channel/dingtalk/update": { + "post": { + "consumes": [ + "application/json" + ], + "parameters": [ + { + "description": "request", + "in": "body", + "name": "request", + "required": true, + "schema": { + "$ref": "#/definitions/dto.AgentDingTalkConfigUpdateReq" + } + } + ], + "responses": { + "200": { + "description": "OK" + } + }, + "security": [ + { + "ApiKeyAuth": [] + }, + { + "Timestamp": [] + } + ], + "summary": "Update Agent DingTalk channel config", "tags": [ "AI" ] @@ -319,7 +766,7 @@ const docTemplate = `{ "name": "request", "required": true, "schema": { - "$ref": "#/definitions/dto.AgentDiscordConfigReq" + "$ref": "#/definitions/dto.AgentIDReq" } } ], @@ -380,41 +827,6 @@ const docTemplate = `{ ] } }, - "/ai/agents/channel/feishu/approve": { - "post": { - "consumes": [ - "application/json" - ], - "parameters": [ - { - "description": "request", - "in": "body", - "name": "request", - "required": true, - "schema": { - "$ref": "#/definitions/dto.AgentFeishuPairingApproveReq" - } - } - ], - "responses": { - "200": { - "description": "OK" - } - }, - "security": [ - { - "ApiKeyAuth": [] - }, - { - "Timestamp": [] - } - ], - "summary": "Approve Agent Feishu pairing code", - "tags": [ - "AI" - ] - } - }, "/ai/agents/channel/feishu/get": { "post": { "consumes": [ @@ -535,7 +947,7 @@ const docTemplate = `{ "name": "request", "required": true, "schema": { - "$ref": "#/definitions/dto.AgentQQBotConfigReq" + "$ref": "#/definitions/dto.AgentIDReq" } } ], @@ -669,6 +1081,187 @@ const docTemplate = `{ ] } }, + "/ai/agents/channel/wecom/get": { + "post": { + "consumes": [ + "application/json" + ], + "parameters": [ + { + "description": "request", + "in": "body", + "name": "request", + "required": true, + "schema": { + "$ref": "#/definitions/dto.AgentIDReq" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/dto.AgentWecomConfig" + } + } + }, + "security": [ + { + "ApiKeyAuth": [] + }, + { + "Timestamp": [] + } + ], + "summary": "Get Agent QQ Bot channel config", + "tags": [ + "AI" + ] + } + }, + "/ai/agents/channel/wecom/update": { + "post": { + "consumes": [ + "application/json" + ], + "parameters": [ + { + "description": "request", + "in": "body", + "name": "request", + "required": true, + "schema": { + "$ref": "#/definitions/dto.AgentWecomConfigUpdateReq" + } + } + ], + "responses": { + "200": { + "description": "OK" + } + }, + "security": [ + { + "ApiKeyAuth": [] + }, + { + "Timestamp": [] + } + ], + "summary": "Update Agent WeCom channel config", + "tags": [ + "AI" + ] + } + }, + "/ai/agents/channel/weixin/login": { + "post": { + "consumes": [ + "application/json" + ], + "parameters": [ + { + "description": "request", + "in": "body", + "name": "request", + "required": true, + "schema": { + "$ref": "#/definitions/dto.AgentWeixinLoginReq" + } + } + ], + "responses": { + "200": { + "description": "OK" + } + }, + "security": [ + { + "ApiKeyAuth": [] + }, + { + "Timestamp": [] + } + ], + "summary": "Login Agent Weixin channel", + "tags": [ + "AI" + ] + } + }, + "/ai/agents/config-file/get": { + "post": { + "consumes": [ + "application/json" + ], + "parameters": [ + { + "description": "request", + "in": "body", + "name": "request", + "required": true, + "schema": { + "$ref": "#/definitions/dto.AgentConfigFileReq" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/dto.AgentConfigFile" + } + } + }, + "security": [ + { + "ApiKeyAuth": [] + }, + { + "Timestamp": [] + } + ], + "summary": "Get Agent config file", + "tags": [ + "AI" + ] + } + }, + "/ai/agents/config-file/update": { + "post": { + "consumes": [ + "application/json" + ], + "parameters": [ + { + "description": "request", + "in": "body", + "name": "request", + "required": true, + "schema": { + "$ref": "#/definitions/dto.AgentConfigFileUpdateReq" + } + } + ], + "responses": { + "200": { + "description": "OK" + } + }, + "security": [ + { + "ApiKeyAuth": [] + }, + { + "Timestamp": [] + } + ], + "summary": "Update Agent config file", + "tags": [ + "AI" + ] + } + }, "/ai/agents/delete": { "post": { "consumes": [ @@ -704,6 +1297,44 @@ const docTemplate = `{ ] } }, + "/ai/agents/model/get": { + "post": { + "consumes": [ + "application/json" + ], + "parameters": [ + { + "description": "request", + "in": "body", + "name": "request", + "required": true, + "schema": { + "$ref": "#/definitions/dto.AgentIDReq" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/dto.AgentModelConfig" + } + } + }, + "security": [ + { + "ApiKeyAuth": [] + }, + { + "Timestamp": [] + } + ], + "summary": "Get Agent model config", + "tags": [ + "AI" + ] + } + }, "/ai/agents/model/update": { "post": { "consumes": [ @@ -751,7 +1382,7 @@ const docTemplate = `{ "name": "request", "required": true, "schema": { - "$ref": "#/definitions/dto.AgentOtherConfigReq" + "$ref": "#/definitions/dto.AgentIDReq" } } ], @@ -812,6 +1443,44 @@ const docTemplate = `{ ] } }, + "/ai/agents/overview": { + "post": { + "consumes": [ + "application/json" + ], + "parameters": [ + { + "description": "request", + "in": "body", + "name": "request", + "required": true, + "schema": { + "$ref": "#/definitions/dto.AgentOverviewReq" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/dto.AgentOverview" + } + } + }, + "security": [ + { + "ApiKeyAuth": [] + }, + { + "Timestamp": [] + } + ], + "summary": "Get Agent overview", + "tags": [ + "AI" + ] + } + }, "/ai/agents/plugin/check": { "post": { "consumes": [ @@ -885,6 +1554,76 @@ const docTemplate = `{ ] } }, + "/ai/agents/plugin/uninstall": { + "post": { + "consumes": [ + "application/json" + ], + "parameters": [ + { + "description": "request", + "in": "body", + "name": "request", + "required": true, + "schema": { + "$ref": "#/definitions/dto.AgentPluginUninstallReq" + } + } + ], + "responses": { + "200": { + "description": "OK" + } + }, + "security": [ + { + "ApiKeyAuth": [] + }, + { + "Timestamp": [] + } + ], + "summary": "Uninstall Agent plugin", + "tags": [ + "AI" + ] + } + }, + "/ai/agents/plugin/upgrade": { + "post": { + "consumes": [ + "application/json" + ], + "parameters": [ + { + "description": "request", + "in": "body", + "name": "request", + "required": true, + "schema": { + "$ref": "#/definitions/dto.AgentPluginUpgradeReq" + } + } + ], + "responses": { + "200": { + "description": "OK" + } + }, + "security": [ + { + "ApiKeyAuth": [] + }, + { + "Timestamp": [] + } + ], + "summary": "Upgrade Agent plugin", + "tags": [ + "AI" + ] + } + }, "/ai/agents/providers": { "get": { "responses": { @@ -912,6 +1651,41 @@ const docTemplate = `{ ] } }, + "/ai/agents/remark": { + "post": { + "consumes": [ + "application/json" + ], + "parameters": [ + { + "description": "request", + "in": "body", + "name": "request", + "required": true, + "schema": { + "$ref": "#/definitions/dto.AgentRemarkUpdateReq" + } + } + ], + "responses": { + "200": { + "description": "OK" + } + }, + "security": [ + { + "ApiKeyAuth": [] + }, + { + "Timestamp": [] + } + ], + "summary": "Update Agent remark", + "tags": [ + "AI" + ] + } + }, "/ai/agents/search": { "post": { "consumes": [ @@ -950,6 +1724,231 @@ const docTemplate = `{ ] } }, + "/ai/agents/security/get": { + "post": { + "consumes": [ + "application/json" + ], + "parameters": [ + { + "description": "request", + "in": "body", + "name": "request", + "required": true, + "schema": { + "$ref": "#/definitions/dto.AgentIDReq" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/dto.AgentSecurityConfig" + } + } + }, + "security": [ + { + "ApiKeyAuth": [] + }, + { + "Timestamp": [] + } + ], + "summary": "Get Agent Security config", + "tags": [ + "AI" + ] + } + }, + "/ai/agents/security/update": { + "post": { + "consumes": [ + "application/json" + ], + "parameters": [ + { + "description": "request", + "in": "body", + "name": "request", + "required": true, + "schema": { + "$ref": "#/definitions/dto.AgentSecurityConfigUpdateReq" + } + } + ], + "responses": { + "200": { + "description": "OK" + } + }, + "security": [ + { + "ApiKeyAuth": [] + }, + { + "Timestamp": [] + } + ], + "summary": "Update Agent Security config", + "tags": [ + "AI" + ] + } + }, + "/ai/agents/skills/install": { + "post": { + "consumes": [ + "application/json" + ], + "parameters": [ + { + "description": "request", + "in": "body", + "name": "request", + "required": true, + "schema": { + "$ref": "#/definitions/dto.AgentSkillInstallReq" + } + } + ], + "responses": { + "200": { + "description": "OK" + } + }, + "security": [ + { + "ApiKeyAuth": [] + }, + { + "Timestamp": [] + } + ], + "summary": "Install Agent skill", + "tags": [ + "AI" + ] + } + }, + "/ai/agents/skills/list": { + "post": { + "consumes": [ + "application/json" + ], + "parameters": [ + { + "description": "request", + "in": "body", + "name": "request", + "required": true, + "schema": { + "$ref": "#/definitions/dto.AgentIDReq" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "items": { + "$ref": "#/definitions/dto.AgentSkillItem" + }, + "type": "array" + } + } + }, + "security": [ + { + "ApiKeyAuth": [] + }, + { + "Timestamp": [] + } + ], + "summary": "List Agent skills", + "tags": [ + "AI" + ] + } + }, + "/ai/agents/skills/search": { + "post": { + "consumes": [ + "application/json" + ], + "parameters": [ + { + "description": "request", + "in": "body", + "name": "request", + "required": true, + "schema": { + "$ref": "#/definitions/dto.AgentSkillSearchReq" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "items": { + "$ref": "#/definitions/dto.AgentSkillSearchItem" + }, + "type": "array" + } + } + }, + "security": [ + { + "ApiKeyAuth": [] + }, + { + "Timestamp": [] + } + ], + "summary": "Search Agent skills", + "tags": [ + "AI" + ] + } + }, + "/ai/agents/skills/update": { + "post": { + "consumes": [ + "application/json" + ], + "parameters": [ + { + "description": "request", + "in": "body", + "name": "request", + "required": true, + "schema": { + "$ref": "#/definitions/dto.AgentSkillUpdateReq" + } + } + ], + "responses": { + "200": { + "description": "OK" + } + }, + "security": [ + { + "ApiKeyAuth": [] + }, + { + "Timestamp": [] + } + ], + "summary": "Update Agent skill status", + "tags": [ + "AI" + ] + } + }, "/ai/agents/token/reset": { "post": { "consumes": [ @@ -985,6 +1984,41 @@ const docTemplate = `{ ] } }, + "/ai/agents/website/bind": { + "post": { + "consumes": [ + "application/json" + ], + "parameters": [ + { + "description": "request", + "in": "body", + "name": "request", + "required": true, + "schema": { + "$ref": "#/definitions/dto.AgentWebsiteBindReq" + } + } + ], + "responses": { + "200": { + "description": "OK" + } + }, + "security": [ + { + "ApiKeyAuth": [] + }, + { + "Timestamp": [] + } + ], + "summary": "Bind Agent website", + "tags": [ + "AI" + ] + } + }, "/ai/domain/bind": { "post": { "consumes": [ @@ -4311,7 +5345,17 @@ const docTemplate = `{ "summary": "Delete container file", "tags": [ "Container" - ] + ], + "x-panel-log": { + "BeforeFunctions": [], + "bodyKeys": [ + "containerID", + "paths" + ], + "formatEN": "Delete files [paths] in container [containerID]", + "formatZH": "删除容器 [containerID] 文件 [paths]", + "paramKeys": [] + } } }, "/containers/files/download": { @@ -4319,6 +5363,17 @@ const docTemplate = `{ "consumes": [ "application/json" ], + "parameters": [ + { + "description": "request", + "in": "body", + "name": "request", + "required": true, + "schema": { + "$ref": "#/definitions/dto.ContainerFileReq" + } + } + ], "responses": {}, "security": [ { @@ -4331,7 +5386,17 @@ const docTemplate = `{ "summary": "Download container file", "tags": [ "Container" - ] + ], + "x-panel-log": { + "BeforeFunctions": [], + "bodyKeys": [ + "containerID", + "path" + ], + "formatEN": "Download file [path] from container [containerID]", + "formatZH": "下载容器 [containerID] 文件 [path]", + "paramKeys": [] + } } }, "/containers/files/search": { @@ -4457,7 +5522,17 @@ const docTemplate = `{ "summary": "Upload container file", "tags": [ "Container" - ] + ], + "x-panel-log": { + "BeforeFunctions": [], + "bodyKeys": [ + "containerID", + "path" + ], + "formatEN": "Upload file to [path] in container [containerID]", + "formatZH": "容器 [containerID] 上传文件到 [path]", + "paramKeys": [] + } } }, "/containers/image": { @@ -7348,400 +8423,6 @@ const docTemplate = `{ } } }, - "/core/hosts": { - "post": { - "consumes": [ - "application/json" - ], - "parameters": [ - { - "description": "request", - "in": "body", - "name": "request", - "required": true, - "schema": { - "$ref": "#/definitions/dto.HostOperate" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/dto.HostInfo" - } - } - }, - "security": [ - { - "ApiKeyAuth": [] - }, - { - "Timestamp": [] - } - ], - "summary": "Create host", - "tags": [ - "Host" - ], - "x-panel-log": { - "BeforeFunctions": [], - "bodyKeys": [ - "name", - "addr" - ], - "formatEN": "create host [name][addr]", - "formatZH": "创建主机 [name][addr]", - "paramKeys": [] - } - } - }, - "/core/hosts/del": { - "post": { - "consumes": [ - "application/json" - ], - "parameters": [ - { - "description": "request", - "in": "body", - "name": "request", - "required": true, - "schema": { - "$ref": "#/definitions/dto.OperateByIDs" - } - } - ], - "responses": { - "200": { - "description": "OK" - } - }, - "security": [ - { - "ApiKeyAuth": [] - }, - { - "Timestamp": [] - } - ], - "summary": "Delete host", - "tags": [ - "Host" - ], - "x-panel-log": { - "BeforeFunctions": [ - { - "db": "hosts", - "input_column": "id", - "input_value": "ids", - "isList": true, - "output_column": "addr", - "output_value": "addrs" - } - ], - "bodyKeys": [ - "ids" - ], - "formatEN": "delete host [addrs]", - "formatZH": "删除主机 [addrs]", - "paramKeys": [] - } - } - }, - "/core/hosts/info": { - "post": { - "consumes": [ - "application/json" - ], - "parameters": [ - { - "description": "request", - "in": "body", - "name": "request", - "required": true, - "schema": { - "$ref": "#/definitions/dto.OperateByID" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/dto.HostInfo" - } - } - }, - "security": [ - { - "ApiKeyAuth": [] - }, - { - "Timestamp": [] - } - ], - "summary": "Get host info", - "tags": [ - "Host" - ] - } - }, - "/core/hosts/search": { - "post": { - "consumes": [ - "application/json" - ], - "parameters": [ - { - "description": "request", - "in": "body", - "name": "request", - "required": true, - "schema": { - "$ref": "#/definitions/dto.SearchPageWithGroup" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/dto.PageResult" - } - } - }, - "security": [ - { - "ApiKeyAuth": [] - }, - { - "Timestamp": [] - } - ], - "summary": "Page host", - "tags": [ - "Host" - ] - } - }, - "/core/hosts/test/byid/:id": { - "post": { - "consumes": [ - "application/json" - ], - "parameters": [ - { - "description": "request", - "in": "path", - "name": "id", - "required": true, - "type": "integer" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "type": "boolean" - } - } - }, - "security": [ - { - "ApiKeyAuth": [] - }, - { - "Timestamp": [] - } - ], - "summary": "Test host conn by host id", - "tags": [ - "Host" - ] - } - }, - "/core/hosts/test/byinfo": { - "post": { - "consumes": [ - "application/json" - ], - "parameters": [ - { - "description": "request", - "in": "body", - "name": "request", - "required": true, - "schema": { - "$ref": "#/definitions/dto.HostConnTest" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "type": "boolean" - } - } - }, - "security": [ - { - "ApiKeyAuth": [] - }, - { - "Timestamp": [] - } - ], - "summary": "Test host conn by info", - "tags": [ - "Host" - ] - } - }, - "/core/hosts/tree": { - "post": { - "consumes": [ - "application/json" - ], - "parameters": [ - { - "description": "request", - "in": "body", - "name": "request", - "required": true, - "schema": { - "$ref": "#/definitions/dto.SearchForTree" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "items": { - "$ref": "#/definitions/dto.HostTree" - }, - "type": "array" - } - } - }, - "security": [ - { - "ApiKeyAuth": [] - }, - { - "Timestamp": [] - } - ], - "summary": "Load host tree", - "tags": [ - "Host" - ] - } - }, - "/core/hosts/update": { - "post": { - "consumes": [ - "application/json" - ], - "parameters": [ - { - "description": "request", - "in": "body", - "name": "request", - "required": true, - "schema": { - "$ref": "#/definitions/dto.HostOperate" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/dto.HostInfo" - } - } - }, - "security": [ - { - "ApiKeyAuth": [] - }, - { - "Timestamp": [] - } - ], - "summary": "Update host", - "tags": [ - "Host" - ], - "x-panel-log": { - "BeforeFunctions": [], - "bodyKeys": [ - "name", - "addr" - ], - "formatEN": "update host [name][addr]", - "formatZH": "更新主机信息 [name][addr]", - "paramKeys": [] - } - } - }, - "/core/hosts/update/group": { - "post": { - "consumes": [ - "application/json" - ], - "parameters": [ - { - "description": "request", - "in": "body", - "name": "request", - "required": true, - "schema": { - "$ref": "#/definitions/dto.ChangeHostGroup" - } - } - ], - "responses": { - "200": { - "description": "OK" - } - }, - "security": [ - { - "ApiKeyAuth": [] - }, - { - "Timestamp": [] - } - ], - "summary": "Update host group", - "tags": [ - "Host" - ], - "x-panel-log": { - "BeforeFunctions": [ - { - "db": "hosts", - "input_column": "id", - "input_value": "id", - "isList": false, - "output_column": "addr", - "output_value": "addr" - } - ], - "bodyKeys": [ - "id", - "group" - ], - "formatEN": "change host [addr] group =\u003e [group]", - "formatZH": "切换主机[addr]分组 =\u003e [group]", - "paramKeys": [] - } - } - }, "/core/logs/clean": { "post": { "consumes": [ @@ -13622,6 +14303,50 @@ const docTemplate = `{ } } }, + "/files/wget/stop": { + "post": { + "consumes": [ + "application/json" + ], + "parameters": [ + { + "description": "request", + "in": "body", + "name": "request", + "required": true, + "schema": { + "$ref": "#/definitions/request.FileProcessReq" + } + } + ], + "responses": { + "200": { + "description": "OK" + } + }, + "security": [ + { + "ApiKeyAuth": [] + }, + { + "Timestamp": [] + } + ], + "summary": "Stop wget file download", + "tags": [ + "File" + ], + "x-panel-log": { + "BeforeFunctions": [], + "bodyKeys": [ + "key" + ], + "formatEN": "Stop wget task [key]", + "formatZH": "停止下载任务 [key]", + "paramKeys": [] + } + } + }, "/groups": { "post": { "consumes": [ @@ -15024,7 +15749,7 @@ const docTemplate = `{ "name": "request", "required": true, "schema": { - "$ref": "#/definitions/dto.SSHConf" + "$ref": "#/definitions/dto.SSHConfUpdate" } } ], @@ -23534,14 +24259,11 @@ const docTemplate = `{ "baseURL": { "type": "string" }, - "contextWindow": { - "type": "integer" - }, - "maxTokens": { - "type": "integer" - }, - "model": { - "type": "string" + "models": { + "items": { + "$ref": "#/definitions/dto.AgentAccountModel" + }, + "type": "array" }, "name": { "type": "string" @@ -23558,6 +24280,7 @@ const docTemplate = `{ }, "required": [ "apiKey", + "apiType", "name", "provider" ], @@ -23574,6 +24297,91 @@ const docTemplate = `{ ], "type": "object" }, + "dto.AgentAccountModel": { + "properties": { + "contextWindow": { + "type": "integer" + }, + "id": { + "type": "string" + }, + "input": { + "items": { + "type": "string" + }, + "type": "array" + }, + "maxTokens": { + "type": "integer" + }, + "name": { + "type": "string" + }, + "reasoning": { + "type": "boolean" + }, + "recordId": { + "type": "integer" + } + }, + "type": "object" + }, + "dto.AgentAccountModelCreateReq": { + "properties": { + "accountId": { + "type": "integer" + }, + "model": { + "$ref": "#/definitions/dto.AgentAccountModel" + } + }, + "required": [ + "accountId", + "model" + ], + "type": "object" + }, + "dto.AgentAccountModelDeleteReq": { + "properties": { + "accountId": { + "type": "integer" + }, + "recordId": { + "type": "integer" + } + }, + "required": [ + "accountId", + "recordId" + ], + "type": "object" + }, + "dto.AgentAccountModelReq": { + "properties": { + "accountId": { + "type": "integer" + } + }, + "required": [ + "accountId" + ], + "type": "object" + }, + "dto.AgentAccountModelUpdateReq": { + "properties": { + "accountId": { + "type": "integer" + }, + "model": { + "$ref": "#/definitions/dto.AgentAccountModel" + } + }, + "required": [ + "accountId", + "model" + ], + "type": "object" + }, "dto.AgentAccountSearch": { "properties": { "name": { @@ -23606,18 +24414,9 @@ const docTemplate = `{ "baseURL": { "type": "string" }, - "contextWindow": { - "type": "integer" - }, "id": { "type": "integer" }, - "maxTokens": { - "type": "integer" - }, - "model": { - "type": "string" - }, "name": { "type": "string" }, @@ -23633,6 +24432,7 @@ const docTemplate = `{ }, "required": [ "apiKey", + "apiType", "id", "name" ], @@ -23656,63 +24456,11 @@ const docTemplate = `{ ], "type": "object" }, - "dto.AgentBrowserConfig": { - "properties": { - "defaultProfile": { - "type": "string" - }, - "enabled": { - "type": "boolean" - }, - "executablePath": { - "type": "string" - }, - "headless": { - "type": "boolean" - }, - "noSandbox": { - "type": "boolean" - } - }, - "type": "object" - }, - "dto.AgentBrowserConfigReq": { - "properties": { - "agentId": { - "type": "integer" - } - }, - "required": [ - "agentId" - ], - "type": "object" - }, - "dto.AgentBrowserConfigUpdateReq": { - "properties": { - "agentId": { - "type": "integer" - }, - "defaultProfile": { - "type": "string" - }, - "enabled": { - "type": "boolean" - }, - "headless": { - "type": "boolean" - }, - "noSandbox": { - "type": "boolean" - } - }, - "required": [ - "agentId", - "defaultProfile" - ], - "type": "object" - }, "dto.AgentChannelPairingApproveReq": { "properties": { + "accountId": { + "type": "string" + }, "agentId": { "type": "integer" }, @@ -23723,7 +24471,8 @@ const docTemplate = `{ "enum": [ "feishu", "telegram", - "discord" + "discord", + "wecom" ], "type": "string" } @@ -23735,6 +24484,77 @@ const docTemplate = `{ ], "type": "object" }, + "dto.AgentConfigFile": { + "properties": { + "content": { + "type": "string" + } + }, + "type": "object" + }, + "dto.AgentConfigFileReq": { + "properties": { + "agentId": { + "type": "integer" + } + }, + "required": [ + "agentId" + ], + "type": "object" + }, + "dto.AgentConfigFileUpdateReq": { + "properties": { + "agentId": { + "type": "integer" + }, + "content": { + "type": "string" + } + }, + "required": [ + "agentId", + "content" + ], + "type": "object" + }, + "dto.AgentConfiguredAgentItem": { + "properties": { + "agentDir": { + "type": "string" + }, + "bindings": { + "items": { + "$ref": "#/definitions/dto.AgentRoleBinding" + }, + "type": "array" + }, + "id": { + "type": "string" + }, + "model": { + "type": "string" + }, + "name": { + "type": "string" + }, + "workspace": { + "type": "string" + } + }, + "type": "object" + }, + "dto.AgentConfiguredAgentsReq": { + "properties": { + "agentId": { + "type": "integer" + } + }, + "required": [ + "agentId" + ], + "type": "object" + }, "dto.AgentCreateReq": { "properties": { "accountId": { @@ -23744,32 +24564,30 @@ const docTemplate = `{ "type": "boolean" }, "agentType": { + "enum": [ + "openclaw", + "copaw" + ], "type": "string" }, "allowPort": { "type": "boolean" }, - "apiKey": { - "type": "string" - }, - "apiType": { - "type": "string" + "allowedOrigins": { + "items": { + "type": "string" + }, + "type": "array" }, "appVersion": { "type": "string" }, - "baseURL": { - "type": "string" - }, "bridgePort": { "type": "integer" }, "containerName": { "type": "string" }, - "contextWindow": { - "type": "integer" - }, "cpuQuota": { "type": "number" }, @@ -23779,9 +24597,6 @@ const docTemplate = `{ "editCompose": { "type": "boolean" }, - "maxTokens": { - "type": "integer" - }, "memoryLimit": { "type": "number" }, @@ -23794,12 +24609,12 @@ const docTemplate = `{ "name": { "type": "string" }, - "provider": { - "type": "string" - }, "pullImage": { "type": "boolean" }, + "remark": { + "type": "string" + }, "restartPolicy": { "type": "string" }, @@ -23817,6 +24632,7 @@ const docTemplate = `{ } }, "required": [ + "agentType", "appVersion", "name", "webUIPort" @@ -23840,8 +24656,182 @@ const docTemplate = `{ ], "type": "object" }, + "dto.AgentDingTalkBot": { + "properties": { + "accountId": { + "type": "string" + }, + "clientId": { + "type": "string" + }, + "clientSecret": { + "type": "string" + }, + "enabled": { + "type": "boolean" + }, + "isDefault": { + "type": "boolean" + }, + "name": { + "type": "string" + } + }, + "type": "object" + }, + "dto.AgentDingTalkConfig": { + "properties": { + "ackText": { + "type": "string" + }, + "allowFrom": { + "items": { + "type": "string" + }, + "type": "array" + }, + "asyncMode": { + "type": "boolean" + }, + "bots": { + "items": { + "$ref": "#/definitions/dto.AgentDingTalkBot" + }, + "type": "array" + }, + "dmPolicy": { + "type": "string" + }, + "enabled": { + "type": "boolean" + }, + "groupAllowFrom": { + "items": { + "type": "string" + }, + "type": "array" + }, + "groupPolicy": { + "type": "string" + }, + "groupSessionScope": { + "type": "string" + }, + "installed": { + "type": "boolean" + }, + "separateSessionByConversation": { + "type": "boolean" + }, + "sharedMemoryAcrossConversations": { + "type": "boolean" + } + }, + "type": "object" + }, + "dto.AgentDingTalkConfigUpdateReq": { + "properties": { + "ackText": { + "type": "string" + }, + "agentId": { + "type": "integer" + }, + "allowFrom": { + "items": { + "type": "string" + }, + "type": "array" + }, + "asyncMode": { + "type": "boolean" + }, + "bots": { + "items": { + "$ref": "#/definitions/dto.AgentDingTalkBot" + }, + "minItems": 1, + "type": "array" + }, + "dmPolicy": { + "enum": [ + "allowlist", + "open", + "disabled" + ], + "type": "string" + }, + "enabled": { + "type": "boolean" + }, + "groupAllowFrom": { + "items": { + "type": "string" + }, + "type": "array" + }, + "groupPolicy": { + "enum": [ + "open", + "allowlist", + "disabled" + ], + "type": "string" + }, + "groupSessionScope": { + "enum": [ + "group", + "group_sender" + ], + "type": "string" + }, + "separateSessionByConversation": { + "type": "boolean" + }, + "sharedMemoryAcrossConversations": { + "type": "boolean" + } + }, + "required": [ + "agentId", + "bots", + "dmPolicy", + "groupPolicy", + "groupSessionScope" + ], + "type": "object" + }, + "dto.AgentDiscordBot": { + "properties": { + "accountId": { + "type": "string" + }, + "enabled": { + "type": "boolean" + }, + "isDefault": { + "type": "boolean" + }, + "name": { + "type": "string" + }, + "token": { + "type": "string" + } + }, + "type": "object" + }, "dto.AgentDiscordConfig": { "properties": { + "bots": { + "items": { + "$ref": "#/definitions/dto.AgentDiscordBot" + }, + "type": "array" + }, + "defaultAccount": { + "type": "string" + }, "dmPolicy": { "type": "string" }, @@ -23853,29 +24843,25 @@ const docTemplate = `{ }, "proxy": { "type": "string" - }, - "token": { - "type": "string" } }, "type": "object" }, - "dto.AgentDiscordConfigReq": { - "properties": { - "agentId": { - "type": "integer" - } - }, - "required": [ - "agentId" - ], - "type": "object" - }, "dto.AgentDiscordConfigUpdateReq": { "properties": { "agentId": { "type": "integer" }, + "bots": { + "items": { + "$ref": "#/definitions/dto.AgentDiscordBot" + }, + "minItems": 1, + "type": "array" + }, + "defaultAccount": { + "type": "string" + }, "dmPolicy": { "type": "string" }, @@ -23892,35 +24878,83 @@ const docTemplate = `{ }, "proxy": { "type": "string" - }, - "token": { - "type": "string" } }, "required": [ "agentId", + "bots", + "defaultAccount", "dmPolicy", - "groupPolicy", - "token" + "groupPolicy" ], "type": "object" }, - "dto.AgentFeishuConfig": { + "dto.AgentFeishuBot": { "properties": { + "accountId": { + "type": "string" + }, + "allowFrom": { + "items": { + "type": "string" + }, + "type": "array" + }, "appId": { "type": "string" }, "appSecret": { "type": "string" }, - "botName": { - "type": "string" - }, "dmPolicy": { "type": "string" }, "enabled": { "type": "boolean" + }, + "isDefault": { + "type": "boolean" + }, + "name": { + "type": "string" + } + }, + "type": "object" + }, + "dto.AgentFeishuConfig": { + "properties": { + "bots": { + "items": { + "$ref": "#/definitions/dto.AgentFeishuBot" + }, + "type": "array" + }, + "enabled": { + "type": "boolean" + }, + "groupAllowFrom": { + "items": { + "type": "string" + }, + "type": "array" + }, + "groupPolicy": { + "type": "string" + }, + "installed": { + "type": "boolean" + }, + "replyMode": { + "type": "string" + }, + "requireMention": { + "type": "string" + }, + "streaming": { + "type": "boolean" + }, + "threadSession": { + "type": "boolean" } }, "type": "object" @@ -23941,43 +24975,65 @@ const docTemplate = `{ "agentId": { "type": "integer" }, - "appId": { - "type": "string" - }, - "appSecret": { - "type": "string" - }, - "botName": { - "type": "string" - }, - "dmPolicy": { - "type": "string" + "bots": { + "items": { + "$ref": "#/definitions/dto.AgentFeishuBot" + }, + "minItems": 1, + "type": "array" }, "enabled": { "type": "boolean" + }, + "groupAllowFrom": { + "items": { + "type": "string" + }, + "type": "array" + }, + "groupPolicy": { + "enum": [ + "open", + "allowlist", + "disabled" + ], + "type": "string" + }, + "replyMode": { + "type": "string" + }, + "requireMention": { + "enum": [ + "true", + "false", + "open" + ], + "type": "string" + }, + "streaming": { + "type": "boolean" + }, + "threadSession": { + "type": "boolean" } }, "required": [ "agentId", - "appId", - "appSecret", - "botName", - "dmPolicy" + "bots", + "groupPolicy", + "replyMode", + "requireMention" ], "type": "object" }, - "dto.AgentFeishuPairingApproveReq": { + "dto.AgentIDReq": { "properties": { "agentId": { "type": "integer" - }, - "pairingCode": { - "type": "string" } }, "required": [ - "agentId", - "pairingCode" + "agentId" ], "type": "object" }, @@ -24043,6 +25099,9 @@ const docTemplate = `{ "providerName": { "type": "string" }, + "remark": { + "type": "string" + }, "status": { "type": "string" }, @@ -24054,6 +25113,32 @@ const docTemplate = `{ }, "webUIPort": { "type": "integer" + }, + "websiteId": { + "type": "integer" + }, + "websitePrimaryDomain": { + "type": "string" + }, + "websiteProtocol": { + "type": "string" + } + }, + "type": "object" + }, + "dto.AgentModelConfig": { + "properties": { + "accountId": { + "type": "integer" + }, + "fallbacks": { + "items": { + "type": "string" + }, + "type": "array" + }, + "model": { + "type": "string" } }, "type": "object" @@ -24066,6 +25151,12 @@ const docTemplate = `{ "agentId": { "type": "integer" }, + "fallbacks": { + "items": { + "type": "string" + }, + "type": "array" + }, "model": { "type": "string" } @@ -24079,13 +25170,49 @@ const docTemplate = `{ }, "dto.AgentOtherConfig": { "properties": { + "browserEnabled": { + "type": "boolean" + }, + "npmRegistry": { + "type": "string" + }, "userTimezone": { "type": "string" } }, "type": "object" }, - "dto.AgentOtherConfigReq": { + "dto.AgentOtherConfigUpdateReq": { + "properties": { + "agentId": { + "type": "integer" + }, + "browserEnabled": { + "type": "boolean" + }, + "npmRegistry": { + "type": "string" + }, + "userTimezone": { + "type": "string" + } + }, + "required": [ + "agentId", + "npmRegistry", + "userTimezone" + ], + "type": "object" + }, + "dto.AgentOverview": { + "properties": { + "snapshot": { + "$ref": "#/definitions/dto.AgentOverviewSnapshot" + } + }, + "type": "object" + }, + "dto.AgentOverviewReq": { "properties": { "agentId": { "type": "integer" @@ -24096,19 +25223,30 @@ const docTemplate = `{ ], "type": "object" }, - "dto.AgentOtherConfigUpdateReq": { + "dto.AgentOverviewSnapshot": { "properties": { - "agentId": { + "appVersion": { + "type": "string" + }, + "channelCount": { "type": "integer" }, - "userTimezone": { + "containerStatus": { "type": "string" + }, + "defaultModel": { + "type": "string" + }, + "jobCount": { + "type": "integer" + }, + "sessionCount": { + "type": "integer" + }, + "skillCount": { + "type": "integer" } }, - "required": [ - "agentId", - "userTimezone" - ], "type": "object" }, "dto.AgentPluginCheckReq": { @@ -24116,9 +25254,16 @@ const docTemplate = `{ "agentId": { "type": "integer" }, + "checkLatest": { + "type": "boolean" + }, "type": { "enum": [ - "qqbot" + "feishu", + "qqbot", + "wecom", + "dingtalk", + "weixin" ], "type": "string" } @@ -24139,7 +25284,11 @@ const docTemplate = `{ }, "type": { "enum": [ - "qqbot" + "feishu", + "qqbot", + "wecom", + "dingtalk", + "weixin" ], "type": "string" } @@ -24153,19 +25302,112 @@ const docTemplate = `{ }, "dto.AgentPluginStatus": { "properties": { + "currentVersion": { + "type": "string" + }, "installed": { "type": "boolean" + }, + "latestVersion": { + "type": "string" + }, + "upgradable": { + "type": "boolean" + } + }, + "type": "object" + }, + "dto.AgentPluginUninstallReq": { + "properties": { + "agentId": { + "type": "integer" + }, + "taskID": { + "type": "string" + }, + "type": { + "enum": [ + "feishu", + "qqbot", + "wecom", + "dingtalk", + "weixin" + ], + "type": "string" + } + }, + "required": [ + "agentId", + "taskID", + "type" + ], + "type": "object" + }, + "dto.AgentPluginUpgradeReq": { + "properties": { + "agentId": { + "type": "integer" + }, + "taskID": { + "type": "string" + }, + "type": { + "enum": [ + "feishu", + "qqbot", + "wecom", + "dingtalk", + "weixin" + ], + "type": "string" + } + }, + "required": [ + "agentId", + "taskID", + "type" + ], + "type": "object" + }, + "dto.AgentQQBotBot": { + "properties": { + "accountId": { + "type": "string" + }, + "allowFrom": { + "items": { + "type": "string" + }, + "type": "array" + }, + "appId": { + "type": "string" + }, + "clientSecret": { + "type": "string" + }, + "enabled": { + "type": "boolean" + }, + "isDefault": { + "type": "boolean" + }, + "name": { + "type": "string" + }, + "systemPrompt": { + "type": "string" } }, "type": "object" }, "dto.AgentQQBotConfig": { "properties": { - "appId": { - "type": "string" - }, - "clientSecret": { - "type": "string" + "bots": { + "items": { + "$ref": "#/definitions/dto.AgentQQBotBot" + }, + "type": "array" }, "enabled": { "type": "boolean" @@ -24176,7 +25418,96 @@ const docTemplate = `{ }, "type": "object" }, - "dto.AgentQQBotConfigReq": { + "dto.AgentQQBotConfigUpdateReq": { + "properties": { + "agentId": { + "type": "integer" + }, + "bots": { + "items": { + "$ref": "#/definitions/dto.AgentQQBotBot" + }, + "minItems": 1, + "type": "array" + }, + "enabled": { + "type": "boolean" + } + }, + "required": [ + "agentId", + "bots" + ], + "type": "object" + }, + "dto.AgentRemarkUpdateReq": { + "properties": { + "id": { + "type": "integer" + }, + "remark": { + "type": "string" + } + }, + "required": [ + "id" + ], + "type": "object" + }, + "dto.AgentRoleBindReq": { + "properties": { + "accountId": { + "type": "string" + }, + "agentId": { + "type": "integer" + }, + "channel": { + "type": "string" + }, + "id": { + "type": "string" + } + }, + "required": [ + "agentId", + "channel", + "id" + ], + "type": "object" + }, + "dto.AgentRoleBinding": { + "properties": { + "accountId": { + "type": "string" + }, + "channel": { + "type": "string" + } + }, + "required": [ + "channel" + ], + "type": "object" + }, + "dto.AgentRoleChannelItem": { + "properties": { + "accountIds": { + "items": { + "type": "string" + }, + "type": "array" + }, + "bound": { + "type": "boolean" + }, + "name": { + "type": "string" + } + }, + "type": "object" + }, + "dto.AgentRoleChannelsReq": { "properties": { "agentId": { "type": "integer" @@ -24187,30 +25518,277 @@ const docTemplate = `{ ], "type": "object" }, - "dto.AgentQQBotConfigUpdateReq": { + "dto.AgentRoleCreateReq": { "properties": { "agentId": { "type": "integer" }, - "appId": { + "bindings": { + "items": { + "$ref": "#/definitions/dto.AgentRoleBinding" + }, + "type": "array" + }, + "model": { "type": "string" }, - "clientSecret": { + "name": { "type": "string" - }, - "enabled": { - "type": "boolean" } }, "required": [ "agentId", - "appId", - "clientSecret" + "name" ], "type": "object" }, - "dto.AgentTelegramConfig": { + "dto.AgentRoleCreateResp": { "properties": { + "output": { + "type": "string" + } + }, + "type": "object" + }, + "dto.AgentRoleDeleteReq": { + "properties": { + "agentId": { + "type": "integer" + }, + "id": { + "type": "string" + } + }, + "required": [ + "agentId", + "id" + ], + "type": "object" + }, + "dto.AgentRoleMarkdownFileItem": { + "properties": { + "content": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "type": "object" + }, + "dto.AgentRoleMarkdownFileUpdateItem": { + "properties": { + "content": { + "type": "string" + }, + "name": { + "enum": [ + "AGENTS.md", + "SOUL.md", + "USER.md", + "IDENTITY.md", + "TOOLS.md", + "HEARTBEAT.md", + "BOOT.md", + "BOOTSTRAP.md" + ], + "type": "string" + } + }, + "required": [ + "name" + ], + "type": "object" + }, + "dto.AgentRoleMarkdownFilesReq": { + "properties": { + "agentId": { + "type": "integer" + }, + "workspace": { + "type": "string" + } + }, + "required": [ + "agentId", + "workspace" + ], + "type": "object" + }, + "dto.AgentRoleMarkdownFilesUpdateReq": { + "properties": { + "agentId": { + "type": "integer" + }, + "files": { + "items": { + "$ref": "#/definitions/dto.AgentRoleMarkdownFileUpdateItem" + }, + "type": "array" + }, + "restart": { + "type": "boolean" + }, + "workspace": { + "type": "string" + } + }, + "required": [ + "agentId", + "files", + "workspace" + ], + "type": "object" + }, + "dto.AgentSecurityConfig": { + "properties": { + "allowedOrigins": { + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "dto.AgentSecurityConfigUpdateReq": { + "properties": { + "agentId": { + "type": "integer" + }, + "allowedOrigins": { + "items": { + "type": "string" + }, + "type": "array" + } + }, + "required": [ + "agentId" + ], + "type": "object" + }, + "dto.AgentSkillInstallReq": { + "properties": { + "agentId": { + "type": "integer" + }, + "slug": { + "type": "string" + }, + "source": { + "enum": [ + "clawhub-global", + "clawhub-cn", + "skillhub" + ], + "type": "string" + }, + "taskID": { + "type": "string" + } + }, + "required": [ + "agentId", + "slug", + "source", + "taskID" + ], + "type": "object" + }, + "dto.AgentSkillItem": { + "properties": { + "bundled": { + "type": "boolean" + }, + "description": { + "type": "string" + }, + "disabled": { + "type": "boolean" + }, + "name": { + "type": "string" + }, + "source": { + "type": "string" + } + }, + "type": "object" + }, + "dto.AgentSkillSearchItem": { + "properties": { + "description": { + "type": "string" + }, + "name": { + "type": "string" + }, + "score": { + "type": "string" + }, + "slug": { + "type": "string" + }, + "source": { + "type": "string" + }, + "summary": { + "type": "string" + }, + "version": { + "type": "string" + } + }, + "type": "object" + }, + "dto.AgentSkillSearchReq": { + "properties": { + "agentId": { + "type": "integer" + }, + "keyword": { + "type": "string" + }, + "source": { + "enum": [ + "clawhub-global", + "clawhub-cn", + "skillhub" + ], + "type": "string" + } + }, + "required": [ + "agentId", + "keyword", + "source" + ], + "type": "object" + }, + "dto.AgentSkillUpdateReq": { + "properties": { + "agentId": { + "type": "integer" + }, + "enabled": { + "type": "boolean" + }, + "name": { + "type": "string" + } + }, + "required": [ + "agentId", + "name" + ], + "type": "object" + }, + "dto.AgentTelegramBot": { + "properties": { + "accountId": { + "type": "string" + }, "botToken": { "type": "string" }, @@ -24220,8 +25798,58 @@ const docTemplate = `{ "enabled": { "type": "boolean" }, + "groupPolicy": { + "type": "string" + }, + "isDefault": { + "type": "boolean" + }, + "name": { + "type": "string" + }, + "streaming": { + "type": "string" + } + }, + "type": "object" + }, + "dto.AgentTelegramConfig": { + "properties": { + "allowFrom": { + "items": { + "type": "string" + }, + "type": "array" + }, + "bots": { + "items": { + "$ref": "#/definitions/dto.AgentTelegramBot" + }, + "type": "array" + }, + "defaultAccount": { + "type": "string" + }, + "dmPolicy": { + "type": "string" + }, + "enabled": { + "type": "boolean" + }, + "groupAllowFrom": { + "items": { + "type": "string" + }, + "type": "array" + }, + "groupPolicy": { + "type": "string" + }, "proxy": { "type": "string" + }, + "streaming": { + "type": "string" } }, "type": "object" @@ -24242,23 +25870,68 @@ const docTemplate = `{ "agentId": { "type": "integer" }, - "botToken": { + "allowFrom": { + "items": { + "type": "string" + }, + "type": "array" + }, + "bots": { + "items": { + "$ref": "#/definitions/dto.AgentTelegramBot" + }, + "minItems": 1, + "type": "array" + }, + "defaultAccount": { "type": "string" }, "dmPolicy": { + "enum": [ + "pairing", + "open", + "allowlist", + "disabled" + ], "type": "string" }, "enabled": { "type": "boolean" }, + "groupAllowFrom": { + "items": { + "type": "string" + }, + "type": "array" + }, + "groupPolicy": { + "enum": [ + "open", + "allowlist", + "disabled" + ], + "type": "string" + }, "proxy": { "type": "string" + }, + "streaming": { + "enum": [ + "off", + "partial", + "block", + "progress" + ], + "type": "string" } }, "required": [ "agentId", - "botToken", - "dmPolicy" + "bots", + "defaultAccount", + "dmPolicy", + "groupPolicy", + "streaming" ], "type": "object" }, @@ -24273,6 +25946,124 @@ const docTemplate = `{ ], "type": "object" }, + "dto.AgentWebsiteBindReq": { + "properties": { + "agentId": { + "type": "integer" + }, + "websiteId": { + "type": "integer" + } + }, + "required": [ + "agentId", + "websiteId" + ], + "type": "object" + }, + "dto.AgentWecomConfig": { + "properties": { + "allowFrom": { + "items": { + "type": "string" + }, + "type": "array" + }, + "botId": { + "type": "string" + }, + "dmPolicy": { + "type": "string" + }, + "enabled": { + "type": "boolean" + }, + "groupAllowFrom": { + "items": { + "type": "string" + }, + "type": "array" + }, + "groupPolicy": { + "type": "string" + }, + "installed": { + "type": "boolean" + }, + "secret": { + "type": "string" + } + }, + "type": "object" + }, + "dto.AgentWecomConfigUpdateReq": { + "properties": { + "agentId": { + "type": "integer" + }, + "allowFrom": { + "items": { + "type": "string" + }, + "type": "array" + }, + "botId": { + "type": "string" + }, + "dmPolicy": { + "enum": [ + "pairing", + "open", + "allowlist", + "disabled" + ], + "type": "string" + }, + "enabled": { + "type": "boolean" + }, + "groupAllowFrom": { + "items": { + "type": "string" + }, + "type": "array" + }, + "groupPolicy": { + "enum": [ + "open", + "allowlist", + "disabled" + ], + "type": "string" + }, + "secret": { + "type": "string" + } + }, + "required": [ + "agentId", + "botId", + "dmPolicy", + "groupPolicy", + "secret" + ], + "type": "object" + }, + "dto.AgentWeixinLoginReq": { + "properties": { + "agentId": { + "type": "integer" + }, + "taskID": { + "type": "string" + } + }, + "required": [ + "agentId", + "taskID" + ], + "type": "object" + }, "dto.ApiInterfaceConfig": { "properties": { "apiInterfaceStatus": { @@ -24513,6 +26304,9 @@ const docTemplate = `{ }, "dto.AppstoreConfig": { "properties": { + "installAllowPort": { + "type": "string" + }, "uninstallDeleteBackup": { "type": "string" }, @@ -24531,7 +26325,8 @@ const docTemplate = `{ "enum": [ "UninstallDeleteImage", "UpgradeBackup", - "UninstallDeleteBackup" + "UninstallDeleteBackup", + "InstallAllowPort" ], "type": "string" }, @@ -24781,21 +26576,6 @@ const docTemplate = `{ ], "type": "object" }, - "dto.ChangeHostGroup": { - "properties": { - "groupID": { - "type": "integer" - }, - "id": { - "type": "integer" - } - }, - "required": [ - "groupID", - "id" - ], - "type": "object" - }, "dto.ChangePasswd": { "properties": { "passwd": { @@ -25072,6 +26852,9 @@ const docTemplate = `{ }, "dto.CleanTree": { "properties": { + "canDelete": { + "type": "boolean" + }, "children": { "items": { "$ref": "#/definitions/dto.CleanTree" @@ -25192,6 +26975,9 @@ const docTemplate = `{ "secret": { "type": "string" }, + "stopBefore": { + "type": "boolean" + }, "taskID": { "type": "string" }, @@ -25205,7 +26991,9 @@ const docTemplate = `{ "postgresql", "mysql-cluster", "postgresql-cluster", - "redis-cluster" + "redis-cluster", + "container", + "compose" ], "type": "string" } @@ -25275,7 +27063,9 @@ const docTemplate = `{ "postgresql", "mysql-cluster", "postgresql-cluster", - "redis-cluster" + "redis-cluster", + "container", + "compose" ], "type": "string" } @@ -26366,6 +28156,9 @@ const docTemplate = `{ }, "dto.DashboardBase": { "properties": { + "agentNumber": { + "type": "integer" + }, "appInstalledNumber": { "type": "integer" }, @@ -27469,43 +29262,6 @@ const docTemplate = `{ ], "type": "object" }, - "dto.HostConnTest": { - "properties": { - "addr": { - "type": "string" - }, - "authMode": { - "enum": [ - "password", - "key" - ], - "type": "string" - }, - "passPhrase": { - "type": "string" - }, - "password": { - "type": "string" - }, - "port": { - "maximum": 65535, - "minimum": 1, - "type": "integer" - }, - "privateKey": { - "type": "string" - }, - "user": { - "type": "string" - } - }, - "required": [ - "addr", - "port", - "user" - ], - "type": "object" - }, "dto.HostHelper": { "properties": { "host": { @@ -27517,122 +29273,6 @@ const docTemplate = `{ }, "type": "object" }, - "dto.HostInfo": { - "properties": { - "addr": { - "type": "string" - }, - "authMode": { - "type": "string" - }, - "createdAt": { - "type": "string" - }, - "description": { - "type": "string" - }, - "groupBelong": { - "type": "string" - }, - "groupID": { - "type": "integer" - }, - "id": { - "type": "integer" - }, - "name": { - "type": "string" - }, - "passPhrase": { - "type": "string" - }, - "password": { - "type": "string" - }, - "port": { - "type": "integer" - }, - "privateKey": { - "type": "string" - }, - "rememberPassword": { - "type": "boolean" - }, - "user": { - "type": "string" - } - }, - "type": "object" - }, - "dto.HostOperate": { - "properties": { - "addr": { - "type": "string" - }, - "authMode": { - "enum": [ - "password", - "key" - ], - "type": "string" - }, - "description": { - "type": "string" - }, - "groupID": { - "type": "integer" - }, - "id": { - "type": "integer" - }, - "name": { - "type": "string" - }, - "passPhrase": { - "type": "string" - }, - "password": { - "type": "string" - }, - "port": { - "maximum": 65535, - "minimum": 1, - "type": "integer" - }, - "privateKey": { - "type": "string" - }, - "rememberPassword": { - "type": "boolean" - }, - "user": { - "type": "string" - } - }, - "required": [ - "addr", - "port", - "user" - ], - "type": "object" - }, - "dto.HostTree": { - "properties": { - "children": { - "items": { - "$ref": "#/definitions/dto.TreeChild" - }, - "type": "array" - }, - "id": { - "type": "integer" - }, - "label": { - "type": "string" - } - }, - "type": "object" - }, "dto.ImageBuild": { "properties": { "args": { @@ -28105,17 +29745,13 @@ const docTemplate = `{ "code": { "type": "string" }, - "name": { - "type": "string" - }, - "password": { + "sessionId": { "type": "string" } }, "required": [ "code", - "name", - "password" + "sessionId" ], "type": "object" }, @@ -29673,11 +31309,26 @@ const docTemplate = `{ }, "dto.ProviderModelInfo": { "properties": { + "contextWindow": { + "type": "integer" + }, "id": { "type": "string" }, + "input": { + "items": { + "type": "string" + }, + "type": "array" + }, + "maxTokens": { + "type": "integer" + }, "name": { "type": "string" + }, + "reasoning": { + "type": "boolean" } }, "type": "object" @@ -30064,12 +31715,21 @@ const docTemplate = `{ ], "type": "object" }, - "dto.SSHConf": { + "dto.SSHConfUpdate": { "properties": { - "file": { + "key": { + "type": "string" + }, + "path": { + "type": "string" + }, + "value": { "type": "string" } }, + "required": [ + "key" + ], "type": "object" }, "dto.SSHConnData": { @@ -30168,9 +31828,6 @@ const docTemplate = `{ }, "newValue": { "type": "string" - }, - "oldValue": { - "type": "string" } }, "required": [ @@ -30355,14 +32012,6 @@ const docTemplate = `{ ], "type": "object" }, - "dto.SearchForTree": { - "properties": { - "info": { - "type": "string" - } - }, - "type": "object" - }, "dto.SearchLgLogWithPage": { "properties": { "ip": { @@ -30931,17 +32580,6 @@ const docTemplate = `{ }, "type": "object" }, - "dto.TreeChild": { - "properties": { - "id": { - "type": "integer" - }, - "label": { - "type": "string" - } - }, - "type": "object" - }, "dto.UpdateByFile": { "properties": { "file": { @@ -31056,6 +32694,9 @@ const docTemplate = `{ }, "dto.UserLoginInfo": { "properties": { + "mfaSession": { + "type": "string" + }, "mfaStatus": { "type": "string" }, @@ -32866,6 +34507,14 @@ const docTemplate = `{ ], "type": "object" }, + "request.FileProcessReq": { + "properties": { + "key": { + "type": "string" + } + }, + "type": "object" + }, "request.FileReadByLineReq": { "properties": { "ID": { @@ -35183,6 +36832,9 @@ const docTemplate = `{ }, "sni": { "type": "boolean" + }, + "sslVerify": { + "type": "boolean" } }, "required": [ @@ -37617,4 +39269,4 @@ var SwaggerInfo = &swag.Spec{ func init() { swag.Register(SwaggerInfo.InstanceName(), SwaggerInfo) -} \ No newline at end of file +} diff --git a/core/cmd/server/docs/swagger.json b/core/cmd/server/docs/swagger.json index 03a3f54d8..2548c5e0d 100644 --- a/core/cmd/server/docs/swagger.json +++ b/core/cmd/server/docs/swagger.json @@ -122,6 +122,152 @@ ] } }, + "/ai/agents/accounts/models": { + "post": { + "consumes": [ + "application/json" + ], + "parameters": [ + { + "description": "request", + "in": "body", + "name": "request", + "required": true, + "schema": { + "$ref": "#/definitions/dto.AgentAccountModelReq" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "items": { + "$ref": "#/definitions/dto.AgentAccountModel" + }, + "type": "array" + } + } + }, + "security": [ + { + "ApiKeyAuth": [] + }, + { + "Timestamp": [] + } + ], + "summary": "List Agent account models", + "tags": [ + "AI" + ] + } + }, + "/ai/agents/accounts/models/create": { + "post": { + "consumes": [ + "application/json" + ], + "parameters": [ + { + "description": "request", + "in": "body", + "name": "request", + "required": true, + "schema": { + "$ref": "#/definitions/dto.AgentAccountModelCreateReq" + } + } + ], + "responses": { + "200": { + "description": "OK" + } + }, + "security": [ + { + "ApiKeyAuth": [] + }, + { + "Timestamp": [] + } + ], + "summary": "Create Agent account model", + "tags": [ + "AI" + ] + } + }, + "/ai/agents/accounts/models/delete": { + "post": { + "consumes": [ + "application/json" + ], + "parameters": [ + { + "description": "request", + "in": "body", + "name": "request", + "required": true, + "schema": { + "$ref": "#/definitions/dto.AgentAccountModelDeleteReq" + } + } + ], + "responses": { + "200": { + "description": "OK" + } + }, + "security": [ + { + "ApiKeyAuth": [] + }, + { + "Timestamp": [] + } + ], + "summary": "Delete Agent account model", + "tags": [ + "AI" + ] + } + }, + "/ai/agents/accounts/models/update": { + "post": { + "consumes": [ + "application/json" + ], + "parameters": [ + { + "description": "request", + "in": "body", + "name": "request", + "required": true, + "schema": { + "$ref": "#/definitions/dto.AgentAccountModelUpdateReq" + } + } + ], + "responses": { + "200": { + "description": "OK" + } + }, + "security": [ + { + "ApiKeyAuth": [] + }, + { + "Timestamp": [] + } + ], + "summary": "Update Agent account model", + "tags": [ + "AI" + ] + } + }, "/ai/agents/accounts/search": { "post": { "consumes": [ @@ -230,7 +376,7 @@ ] } }, - "/ai/agents/browser/get": { + "/ai/agents/agent/bind": { "post": { "consumes": [ "application/json" @@ -242,45 +388,7 @@ "name": "request", "required": true, "schema": { - "$ref": "#/definitions/dto.AgentBrowserConfigReq" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/dto.AgentBrowserConfig" - } - } - }, - "security": [ - { - "ApiKeyAuth": [] - }, - { - "Timestamp": [] - } - ], - "summary": "Get Agent Browser config", - "tags": [ - "AI" - ] - } - }, - "/ai/agents/browser/update": { - "post": { - "consumes": [ - "application/json" - ], - "parameters": [ - { - "description": "request", - "in": "body", - "name": "request", - "required": true, - "schema": { - "$ref": "#/definitions/dto.AgentBrowserConfigUpdateReq" + "$ref": "#/definitions/dto.AgentRoleBindReq" } } ], @@ -297,7 +405,346 @@ "Timestamp": [] } ], - "summary": "Update Agent Browser config", + "summary": "Bind Agent role channel", + "tags": [ + "AI" + ] + } + }, + "/ai/agents/agent/channels": { + "post": { + "consumes": [ + "application/json" + ], + "parameters": [ + { + "description": "request", + "in": "body", + "name": "request", + "required": true, + "schema": { + "$ref": "#/definitions/dto.AgentRoleChannelsReq" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "items": { + "$ref": "#/definitions/dto.AgentRoleChannelItem" + }, + "type": "array" + } + } + }, + "security": [ + { + "ApiKeyAuth": [] + }, + { + "Timestamp": [] + } + ], + "summary": "Get Agent role channels from config file", + "tags": [ + "AI" + ] + } + }, + "/ai/agents/agent/create": { + "post": { + "consumes": [ + "application/json" + ], + "parameters": [ + { + "description": "request", + "in": "body", + "name": "request", + "required": true, + "schema": { + "$ref": "#/definitions/dto.AgentRoleCreateReq" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/dto.AgentRoleCreateResp" + } + } + }, + "security": [ + { + "ApiKeyAuth": [] + }, + { + "Timestamp": [] + } + ], + "summary": "Create Agent role", + "tags": [ + "AI" + ] + } + }, + "/ai/agents/agent/delete": { + "post": { + "consumes": [ + "application/json" + ], + "parameters": [ + { + "description": "request", + "in": "body", + "name": "request", + "required": true, + "schema": { + "$ref": "#/definitions/dto.AgentRoleDeleteReq" + } + } + ], + "responses": { + "200": { + "description": "OK" + } + }, + "security": [ + { + "ApiKeyAuth": [] + }, + { + "Timestamp": [] + } + ], + "summary": "Delete Agent role", + "tags": [ + "AI" + ] + } + }, + "/ai/agents/agent/list": { + "post": { + "consumes": [ + "application/json" + ], + "parameters": [ + { + "description": "request", + "in": "body", + "name": "request", + "required": true, + "schema": { + "$ref": "#/definitions/dto.AgentConfiguredAgentsReq" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "items": { + "$ref": "#/definitions/dto.AgentConfiguredAgentItem" + }, + "type": "array" + } + } + }, + "security": [ + { + "ApiKeyAuth": [] + }, + { + "Timestamp": [] + } + ], + "summary": "Get configured Agent roles from config file", + "tags": [ + "AI" + ] + } + }, + "/ai/agents/agent/md/list": { + "post": { + "consumes": [ + "application/json" + ], + "parameters": [ + { + "description": "request", + "in": "body", + "name": "request", + "required": true, + "schema": { + "$ref": "#/definitions/dto.AgentRoleMarkdownFilesReq" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "items": { + "$ref": "#/definitions/dto.AgentRoleMarkdownFileItem" + }, + "type": "array" + } + } + }, + "security": [ + { + "ApiKeyAuth": [] + }, + { + "Timestamp": [] + } + ], + "summary": "Get Agent role markdown files", + "tags": [ + "AI" + ] + } + }, + "/ai/agents/agent/md/update": { + "post": { + "consumes": [ + "application/json" + ], + "parameters": [ + { + "description": "request", + "in": "body", + "name": "request", + "required": true, + "schema": { + "$ref": "#/definitions/dto.AgentRoleMarkdownFilesUpdateReq" + } + } + ], + "responses": { + "200": { + "description": "OK" + } + }, + "security": [ + { + "ApiKeyAuth": [] + }, + { + "Timestamp": [] + } + ], + "summary": "Update Agent role markdown file", + "tags": [ + "AI" + ] + } + }, + "/ai/agents/agent/unbind": { + "post": { + "consumes": [ + "application/json" + ], + "parameters": [ + { + "description": "request", + "in": "body", + "name": "request", + "required": true, + "schema": { + "$ref": "#/definitions/dto.AgentRoleBindReq" + } + } + ], + "responses": { + "200": { + "description": "OK" + } + }, + "security": [ + { + "ApiKeyAuth": [] + }, + { + "Timestamp": [] + } + ], + "summary": "Unbind Agent role channel", + "tags": [ + "AI" + ] + } + }, + "/ai/agents/channel/dingtalk/get": { + "post": { + "consumes": [ + "application/json" + ], + "parameters": [ + { + "description": "request", + "in": "body", + "name": "request", + "required": true, + "schema": { + "$ref": "#/definitions/dto.AgentIDReq" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/dto.AgentDingTalkConfig" + } + } + }, + "security": [ + { + "ApiKeyAuth": [] + }, + { + "Timestamp": [] + } + ], + "summary": "Get Agent DingTalk channel config", + "tags": [ + "AI" + ] + } + }, + "/ai/agents/channel/dingtalk/update": { + "post": { + "consumes": [ + "application/json" + ], + "parameters": [ + { + "description": "request", + "in": "body", + "name": "request", + "required": true, + "schema": { + "$ref": "#/definitions/dto.AgentDingTalkConfigUpdateReq" + } + } + ], + "responses": { + "200": { + "description": "OK" + } + }, + "security": [ + { + "ApiKeyAuth": [] + }, + { + "Timestamp": [] + } + ], + "summary": "Update Agent DingTalk channel config", "tags": [ "AI" ] @@ -315,7 +762,7 @@ "name": "request", "required": true, "schema": { - "$ref": "#/definitions/dto.AgentDiscordConfigReq" + "$ref": "#/definitions/dto.AgentIDReq" } } ], @@ -376,41 +823,6 @@ ] } }, - "/ai/agents/channel/feishu/approve": { - "post": { - "consumes": [ - "application/json" - ], - "parameters": [ - { - "description": "request", - "in": "body", - "name": "request", - "required": true, - "schema": { - "$ref": "#/definitions/dto.AgentFeishuPairingApproveReq" - } - } - ], - "responses": { - "200": { - "description": "OK" - } - }, - "security": [ - { - "ApiKeyAuth": [] - }, - { - "Timestamp": [] - } - ], - "summary": "Approve Agent Feishu pairing code", - "tags": [ - "AI" - ] - } - }, "/ai/agents/channel/feishu/get": { "post": { "consumes": [ @@ -531,7 +943,7 @@ "name": "request", "required": true, "schema": { - "$ref": "#/definitions/dto.AgentQQBotConfigReq" + "$ref": "#/definitions/dto.AgentIDReq" } } ], @@ -665,6 +1077,187 @@ ] } }, + "/ai/agents/channel/wecom/get": { + "post": { + "consumes": [ + "application/json" + ], + "parameters": [ + { + "description": "request", + "in": "body", + "name": "request", + "required": true, + "schema": { + "$ref": "#/definitions/dto.AgentIDReq" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/dto.AgentWecomConfig" + } + } + }, + "security": [ + { + "ApiKeyAuth": [] + }, + { + "Timestamp": [] + } + ], + "summary": "Get Agent QQ Bot channel config", + "tags": [ + "AI" + ] + } + }, + "/ai/agents/channel/wecom/update": { + "post": { + "consumes": [ + "application/json" + ], + "parameters": [ + { + "description": "request", + "in": "body", + "name": "request", + "required": true, + "schema": { + "$ref": "#/definitions/dto.AgentWecomConfigUpdateReq" + } + } + ], + "responses": { + "200": { + "description": "OK" + } + }, + "security": [ + { + "ApiKeyAuth": [] + }, + { + "Timestamp": [] + } + ], + "summary": "Update Agent WeCom channel config", + "tags": [ + "AI" + ] + } + }, + "/ai/agents/channel/weixin/login": { + "post": { + "consumes": [ + "application/json" + ], + "parameters": [ + { + "description": "request", + "in": "body", + "name": "request", + "required": true, + "schema": { + "$ref": "#/definitions/dto.AgentWeixinLoginReq" + } + } + ], + "responses": { + "200": { + "description": "OK" + } + }, + "security": [ + { + "ApiKeyAuth": [] + }, + { + "Timestamp": [] + } + ], + "summary": "Login Agent Weixin channel", + "tags": [ + "AI" + ] + } + }, + "/ai/agents/config-file/get": { + "post": { + "consumes": [ + "application/json" + ], + "parameters": [ + { + "description": "request", + "in": "body", + "name": "request", + "required": true, + "schema": { + "$ref": "#/definitions/dto.AgentConfigFileReq" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/dto.AgentConfigFile" + } + } + }, + "security": [ + { + "ApiKeyAuth": [] + }, + { + "Timestamp": [] + } + ], + "summary": "Get Agent config file", + "tags": [ + "AI" + ] + } + }, + "/ai/agents/config-file/update": { + "post": { + "consumes": [ + "application/json" + ], + "parameters": [ + { + "description": "request", + "in": "body", + "name": "request", + "required": true, + "schema": { + "$ref": "#/definitions/dto.AgentConfigFileUpdateReq" + } + } + ], + "responses": { + "200": { + "description": "OK" + } + }, + "security": [ + { + "ApiKeyAuth": [] + }, + { + "Timestamp": [] + } + ], + "summary": "Update Agent config file", + "tags": [ + "AI" + ] + } + }, "/ai/agents/delete": { "post": { "consumes": [ @@ -700,6 +1293,44 @@ ] } }, + "/ai/agents/model/get": { + "post": { + "consumes": [ + "application/json" + ], + "parameters": [ + { + "description": "request", + "in": "body", + "name": "request", + "required": true, + "schema": { + "$ref": "#/definitions/dto.AgentIDReq" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/dto.AgentModelConfig" + } + } + }, + "security": [ + { + "ApiKeyAuth": [] + }, + { + "Timestamp": [] + } + ], + "summary": "Get Agent model config", + "tags": [ + "AI" + ] + } + }, "/ai/agents/model/update": { "post": { "consumes": [ @@ -747,7 +1378,7 @@ "name": "request", "required": true, "schema": { - "$ref": "#/definitions/dto.AgentOtherConfigReq" + "$ref": "#/definitions/dto.AgentIDReq" } } ], @@ -808,6 +1439,44 @@ ] } }, + "/ai/agents/overview": { + "post": { + "consumes": [ + "application/json" + ], + "parameters": [ + { + "description": "request", + "in": "body", + "name": "request", + "required": true, + "schema": { + "$ref": "#/definitions/dto.AgentOverviewReq" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/dto.AgentOverview" + } + } + }, + "security": [ + { + "ApiKeyAuth": [] + }, + { + "Timestamp": [] + } + ], + "summary": "Get Agent overview", + "tags": [ + "AI" + ] + } + }, "/ai/agents/plugin/check": { "post": { "consumes": [ @@ -881,6 +1550,76 @@ ] } }, + "/ai/agents/plugin/uninstall": { + "post": { + "consumes": [ + "application/json" + ], + "parameters": [ + { + "description": "request", + "in": "body", + "name": "request", + "required": true, + "schema": { + "$ref": "#/definitions/dto.AgentPluginUninstallReq" + } + } + ], + "responses": { + "200": { + "description": "OK" + } + }, + "security": [ + { + "ApiKeyAuth": [] + }, + { + "Timestamp": [] + } + ], + "summary": "Uninstall Agent plugin", + "tags": [ + "AI" + ] + } + }, + "/ai/agents/plugin/upgrade": { + "post": { + "consumes": [ + "application/json" + ], + "parameters": [ + { + "description": "request", + "in": "body", + "name": "request", + "required": true, + "schema": { + "$ref": "#/definitions/dto.AgentPluginUpgradeReq" + } + } + ], + "responses": { + "200": { + "description": "OK" + } + }, + "security": [ + { + "ApiKeyAuth": [] + }, + { + "Timestamp": [] + } + ], + "summary": "Upgrade Agent plugin", + "tags": [ + "AI" + ] + } + }, "/ai/agents/providers": { "get": { "responses": { @@ -908,6 +1647,41 @@ ] } }, + "/ai/agents/remark": { + "post": { + "consumes": [ + "application/json" + ], + "parameters": [ + { + "description": "request", + "in": "body", + "name": "request", + "required": true, + "schema": { + "$ref": "#/definitions/dto.AgentRemarkUpdateReq" + } + } + ], + "responses": { + "200": { + "description": "OK" + } + }, + "security": [ + { + "ApiKeyAuth": [] + }, + { + "Timestamp": [] + } + ], + "summary": "Update Agent remark", + "tags": [ + "AI" + ] + } + }, "/ai/agents/search": { "post": { "consumes": [ @@ -946,6 +1720,231 @@ ] } }, + "/ai/agents/security/get": { + "post": { + "consumes": [ + "application/json" + ], + "parameters": [ + { + "description": "request", + "in": "body", + "name": "request", + "required": true, + "schema": { + "$ref": "#/definitions/dto.AgentIDReq" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/dto.AgentSecurityConfig" + } + } + }, + "security": [ + { + "ApiKeyAuth": [] + }, + { + "Timestamp": [] + } + ], + "summary": "Get Agent Security config", + "tags": [ + "AI" + ] + } + }, + "/ai/agents/security/update": { + "post": { + "consumes": [ + "application/json" + ], + "parameters": [ + { + "description": "request", + "in": "body", + "name": "request", + "required": true, + "schema": { + "$ref": "#/definitions/dto.AgentSecurityConfigUpdateReq" + } + } + ], + "responses": { + "200": { + "description": "OK" + } + }, + "security": [ + { + "ApiKeyAuth": [] + }, + { + "Timestamp": [] + } + ], + "summary": "Update Agent Security config", + "tags": [ + "AI" + ] + } + }, + "/ai/agents/skills/install": { + "post": { + "consumes": [ + "application/json" + ], + "parameters": [ + { + "description": "request", + "in": "body", + "name": "request", + "required": true, + "schema": { + "$ref": "#/definitions/dto.AgentSkillInstallReq" + } + } + ], + "responses": { + "200": { + "description": "OK" + } + }, + "security": [ + { + "ApiKeyAuth": [] + }, + { + "Timestamp": [] + } + ], + "summary": "Install Agent skill", + "tags": [ + "AI" + ] + } + }, + "/ai/agents/skills/list": { + "post": { + "consumes": [ + "application/json" + ], + "parameters": [ + { + "description": "request", + "in": "body", + "name": "request", + "required": true, + "schema": { + "$ref": "#/definitions/dto.AgentIDReq" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "items": { + "$ref": "#/definitions/dto.AgentSkillItem" + }, + "type": "array" + } + } + }, + "security": [ + { + "ApiKeyAuth": [] + }, + { + "Timestamp": [] + } + ], + "summary": "List Agent skills", + "tags": [ + "AI" + ] + } + }, + "/ai/agents/skills/search": { + "post": { + "consumes": [ + "application/json" + ], + "parameters": [ + { + "description": "request", + "in": "body", + "name": "request", + "required": true, + "schema": { + "$ref": "#/definitions/dto.AgentSkillSearchReq" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "items": { + "$ref": "#/definitions/dto.AgentSkillSearchItem" + }, + "type": "array" + } + } + }, + "security": [ + { + "ApiKeyAuth": [] + }, + { + "Timestamp": [] + } + ], + "summary": "Search Agent skills", + "tags": [ + "AI" + ] + } + }, + "/ai/agents/skills/update": { + "post": { + "consumes": [ + "application/json" + ], + "parameters": [ + { + "description": "request", + "in": "body", + "name": "request", + "required": true, + "schema": { + "$ref": "#/definitions/dto.AgentSkillUpdateReq" + } + } + ], + "responses": { + "200": { + "description": "OK" + } + }, + "security": [ + { + "ApiKeyAuth": [] + }, + { + "Timestamp": [] + } + ], + "summary": "Update Agent skill status", + "tags": [ + "AI" + ] + } + }, "/ai/agents/token/reset": { "post": { "consumes": [ @@ -981,6 +1980,41 @@ ] } }, + "/ai/agents/website/bind": { + "post": { + "consumes": [ + "application/json" + ], + "parameters": [ + { + "description": "request", + "in": "body", + "name": "request", + "required": true, + "schema": { + "$ref": "#/definitions/dto.AgentWebsiteBindReq" + } + } + ], + "responses": { + "200": { + "description": "OK" + } + }, + "security": [ + { + "ApiKeyAuth": [] + }, + { + "Timestamp": [] + } + ], + "summary": "Bind Agent website", + "tags": [ + "AI" + ] + } + }, "/ai/domain/bind": { "post": { "consumes": [ @@ -4307,7 +5341,17 @@ "summary": "Delete container file", "tags": [ "Container" - ] + ], + "x-panel-log": { + "BeforeFunctions": [], + "bodyKeys": [ + "containerID", + "paths" + ], + "formatEN": "Delete files [paths] in container [containerID]", + "formatZH": "删除容器 [containerID] 文件 [paths]", + "paramKeys": [] + } } }, "/containers/files/download": { @@ -4315,6 +5359,17 @@ "consumes": [ "application/json" ], + "parameters": [ + { + "description": "request", + "in": "body", + "name": "request", + "required": true, + "schema": { + "$ref": "#/definitions/dto.ContainerFileReq" + } + } + ], "responses": {}, "security": [ { @@ -4327,7 +5382,17 @@ "summary": "Download container file", "tags": [ "Container" - ] + ], + "x-panel-log": { + "BeforeFunctions": [], + "bodyKeys": [ + "containerID", + "path" + ], + "formatEN": "Download file [path] from container [containerID]", + "formatZH": "下载容器 [containerID] 文件 [path]", + "paramKeys": [] + } } }, "/containers/files/search": { @@ -4453,7 +5518,17 @@ "summary": "Upload container file", "tags": [ "Container" - ] + ], + "x-panel-log": { + "BeforeFunctions": [], + "bodyKeys": [ + "containerID", + "path" + ], + "formatEN": "Upload file to [path] in container [containerID]", + "formatZH": "容器 [containerID] 上传文件到 [path]", + "paramKeys": [] + } } }, "/containers/image": { @@ -7344,400 +8419,6 @@ } } }, - "/core/hosts": { - "post": { - "consumes": [ - "application/json" - ], - "parameters": [ - { - "description": "request", - "in": "body", - "name": "request", - "required": true, - "schema": { - "$ref": "#/definitions/dto.HostOperate" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/dto.HostInfo" - } - } - }, - "security": [ - { - "ApiKeyAuth": [] - }, - { - "Timestamp": [] - } - ], - "summary": "Create host", - "tags": [ - "Host" - ], - "x-panel-log": { - "BeforeFunctions": [], - "bodyKeys": [ - "name", - "addr" - ], - "formatEN": "create host [name][addr]", - "formatZH": "创建主机 [name][addr]", - "paramKeys": [] - } - } - }, - "/core/hosts/del": { - "post": { - "consumes": [ - "application/json" - ], - "parameters": [ - { - "description": "request", - "in": "body", - "name": "request", - "required": true, - "schema": { - "$ref": "#/definitions/dto.OperateByIDs" - } - } - ], - "responses": { - "200": { - "description": "OK" - } - }, - "security": [ - { - "ApiKeyAuth": [] - }, - { - "Timestamp": [] - } - ], - "summary": "Delete host", - "tags": [ - "Host" - ], - "x-panel-log": { - "BeforeFunctions": [ - { - "db": "hosts", - "input_column": "id", - "input_value": "ids", - "isList": true, - "output_column": "addr", - "output_value": "addrs" - } - ], - "bodyKeys": [ - "ids" - ], - "formatEN": "delete host [addrs]", - "formatZH": "删除主机 [addrs]", - "paramKeys": [] - } - } - }, - "/core/hosts/info": { - "post": { - "consumes": [ - "application/json" - ], - "parameters": [ - { - "description": "request", - "in": "body", - "name": "request", - "required": true, - "schema": { - "$ref": "#/definitions/dto.OperateByID" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/dto.HostInfo" - } - } - }, - "security": [ - { - "ApiKeyAuth": [] - }, - { - "Timestamp": [] - } - ], - "summary": "Get host info", - "tags": [ - "Host" - ] - } - }, - "/core/hosts/search": { - "post": { - "consumes": [ - "application/json" - ], - "parameters": [ - { - "description": "request", - "in": "body", - "name": "request", - "required": true, - "schema": { - "$ref": "#/definitions/dto.SearchPageWithGroup" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/dto.PageResult" - } - } - }, - "security": [ - { - "ApiKeyAuth": [] - }, - { - "Timestamp": [] - } - ], - "summary": "Page host", - "tags": [ - "Host" - ] - } - }, - "/core/hosts/test/byid/:id": { - "post": { - "consumes": [ - "application/json" - ], - "parameters": [ - { - "description": "request", - "in": "path", - "name": "id", - "required": true, - "type": "integer" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "type": "boolean" - } - } - }, - "security": [ - { - "ApiKeyAuth": [] - }, - { - "Timestamp": [] - } - ], - "summary": "Test host conn by host id", - "tags": [ - "Host" - ] - } - }, - "/core/hosts/test/byinfo": { - "post": { - "consumes": [ - "application/json" - ], - "parameters": [ - { - "description": "request", - "in": "body", - "name": "request", - "required": true, - "schema": { - "$ref": "#/definitions/dto.HostConnTest" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "type": "boolean" - } - } - }, - "security": [ - { - "ApiKeyAuth": [] - }, - { - "Timestamp": [] - } - ], - "summary": "Test host conn by info", - "tags": [ - "Host" - ] - } - }, - "/core/hosts/tree": { - "post": { - "consumes": [ - "application/json" - ], - "parameters": [ - { - "description": "request", - "in": "body", - "name": "request", - "required": true, - "schema": { - "$ref": "#/definitions/dto.SearchForTree" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "items": { - "$ref": "#/definitions/dto.HostTree" - }, - "type": "array" - } - } - }, - "security": [ - { - "ApiKeyAuth": [] - }, - { - "Timestamp": [] - } - ], - "summary": "Load host tree", - "tags": [ - "Host" - ] - } - }, - "/core/hosts/update": { - "post": { - "consumes": [ - "application/json" - ], - "parameters": [ - { - "description": "request", - "in": "body", - "name": "request", - "required": true, - "schema": { - "$ref": "#/definitions/dto.HostOperate" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/dto.HostInfo" - } - } - }, - "security": [ - { - "ApiKeyAuth": [] - }, - { - "Timestamp": [] - } - ], - "summary": "Update host", - "tags": [ - "Host" - ], - "x-panel-log": { - "BeforeFunctions": [], - "bodyKeys": [ - "name", - "addr" - ], - "formatEN": "update host [name][addr]", - "formatZH": "更新主机信息 [name][addr]", - "paramKeys": [] - } - } - }, - "/core/hosts/update/group": { - "post": { - "consumes": [ - "application/json" - ], - "parameters": [ - { - "description": "request", - "in": "body", - "name": "request", - "required": true, - "schema": { - "$ref": "#/definitions/dto.ChangeHostGroup" - } - } - ], - "responses": { - "200": { - "description": "OK" - } - }, - "security": [ - { - "ApiKeyAuth": [] - }, - { - "Timestamp": [] - } - ], - "summary": "Update host group", - "tags": [ - "Host" - ], - "x-panel-log": { - "BeforeFunctions": [ - { - "db": "hosts", - "input_column": "id", - "input_value": "id", - "isList": false, - "output_column": "addr", - "output_value": "addr" - } - ], - "bodyKeys": [ - "id", - "group" - ], - "formatEN": "change host [addr] group =\u003e [group]", - "formatZH": "切换主机[addr]分组 =\u003e [group]", - "paramKeys": [] - } - } - }, "/core/logs/clean": { "post": { "consumes": [ @@ -13618,6 +14299,50 @@ } } }, + "/files/wget/stop": { + "post": { + "consumes": [ + "application/json" + ], + "parameters": [ + { + "description": "request", + "in": "body", + "name": "request", + "required": true, + "schema": { + "$ref": "#/definitions/request.FileProcessReq" + } + } + ], + "responses": { + "200": { + "description": "OK" + } + }, + "security": [ + { + "ApiKeyAuth": [] + }, + { + "Timestamp": [] + } + ], + "summary": "Stop wget file download", + "tags": [ + "File" + ], + "x-panel-log": { + "BeforeFunctions": [], + "bodyKeys": [ + "key" + ], + "formatEN": "Stop wget task [key]", + "formatZH": "停止下载任务 [key]", + "paramKeys": [] + } + } + }, "/groups": { "post": { "consumes": [ @@ -15020,7 +15745,7 @@ "name": "request", "required": true, "schema": { - "$ref": "#/definitions/dto.SSHConf" + "$ref": "#/definitions/dto.SSHConfUpdate" } } ], @@ -23530,14 +24255,11 @@ "baseURL": { "type": "string" }, - "contextWindow": { - "type": "integer" - }, - "maxTokens": { - "type": "integer" - }, - "model": { - "type": "string" + "models": { + "items": { + "$ref": "#/definitions/dto.AgentAccountModel" + }, + "type": "array" }, "name": { "type": "string" @@ -23554,6 +24276,7 @@ }, "required": [ "apiKey", + "apiType", "name", "provider" ], @@ -23570,6 +24293,91 @@ ], "type": "object" }, + "dto.AgentAccountModel": { + "properties": { + "contextWindow": { + "type": "integer" + }, + "id": { + "type": "string" + }, + "input": { + "items": { + "type": "string" + }, + "type": "array" + }, + "maxTokens": { + "type": "integer" + }, + "name": { + "type": "string" + }, + "reasoning": { + "type": "boolean" + }, + "recordId": { + "type": "integer" + } + }, + "type": "object" + }, + "dto.AgentAccountModelCreateReq": { + "properties": { + "accountId": { + "type": "integer" + }, + "model": { + "$ref": "#/definitions/dto.AgentAccountModel" + } + }, + "required": [ + "accountId", + "model" + ], + "type": "object" + }, + "dto.AgentAccountModelDeleteReq": { + "properties": { + "accountId": { + "type": "integer" + }, + "recordId": { + "type": "integer" + } + }, + "required": [ + "accountId", + "recordId" + ], + "type": "object" + }, + "dto.AgentAccountModelReq": { + "properties": { + "accountId": { + "type": "integer" + } + }, + "required": [ + "accountId" + ], + "type": "object" + }, + "dto.AgentAccountModelUpdateReq": { + "properties": { + "accountId": { + "type": "integer" + }, + "model": { + "$ref": "#/definitions/dto.AgentAccountModel" + } + }, + "required": [ + "accountId", + "model" + ], + "type": "object" + }, "dto.AgentAccountSearch": { "properties": { "name": { @@ -23602,18 +24410,9 @@ "baseURL": { "type": "string" }, - "contextWindow": { - "type": "integer" - }, "id": { "type": "integer" }, - "maxTokens": { - "type": "integer" - }, - "model": { - "type": "string" - }, "name": { "type": "string" }, @@ -23629,6 +24428,7 @@ }, "required": [ "apiKey", + "apiType", "id", "name" ], @@ -23652,63 +24452,11 @@ ], "type": "object" }, - "dto.AgentBrowserConfig": { - "properties": { - "defaultProfile": { - "type": "string" - }, - "enabled": { - "type": "boolean" - }, - "executablePath": { - "type": "string" - }, - "headless": { - "type": "boolean" - }, - "noSandbox": { - "type": "boolean" - } - }, - "type": "object" - }, - "dto.AgentBrowserConfigReq": { - "properties": { - "agentId": { - "type": "integer" - } - }, - "required": [ - "agentId" - ], - "type": "object" - }, - "dto.AgentBrowserConfigUpdateReq": { - "properties": { - "agentId": { - "type": "integer" - }, - "defaultProfile": { - "type": "string" - }, - "enabled": { - "type": "boolean" - }, - "headless": { - "type": "boolean" - }, - "noSandbox": { - "type": "boolean" - } - }, - "required": [ - "agentId", - "defaultProfile" - ], - "type": "object" - }, "dto.AgentChannelPairingApproveReq": { "properties": { + "accountId": { + "type": "string" + }, "agentId": { "type": "integer" }, @@ -23719,7 +24467,8 @@ "enum": [ "feishu", "telegram", - "discord" + "discord", + "wecom" ], "type": "string" } @@ -23731,6 +24480,77 @@ ], "type": "object" }, + "dto.AgentConfigFile": { + "properties": { + "content": { + "type": "string" + } + }, + "type": "object" + }, + "dto.AgentConfigFileReq": { + "properties": { + "agentId": { + "type": "integer" + } + }, + "required": [ + "agentId" + ], + "type": "object" + }, + "dto.AgentConfigFileUpdateReq": { + "properties": { + "agentId": { + "type": "integer" + }, + "content": { + "type": "string" + } + }, + "required": [ + "agentId", + "content" + ], + "type": "object" + }, + "dto.AgentConfiguredAgentItem": { + "properties": { + "agentDir": { + "type": "string" + }, + "bindings": { + "items": { + "$ref": "#/definitions/dto.AgentRoleBinding" + }, + "type": "array" + }, + "id": { + "type": "string" + }, + "model": { + "type": "string" + }, + "name": { + "type": "string" + }, + "workspace": { + "type": "string" + } + }, + "type": "object" + }, + "dto.AgentConfiguredAgentsReq": { + "properties": { + "agentId": { + "type": "integer" + } + }, + "required": [ + "agentId" + ], + "type": "object" + }, "dto.AgentCreateReq": { "properties": { "accountId": { @@ -23740,32 +24560,30 @@ "type": "boolean" }, "agentType": { + "enum": [ + "openclaw", + "copaw" + ], "type": "string" }, "allowPort": { "type": "boolean" }, - "apiKey": { - "type": "string" - }, - "apiType": { - "type": "string" + "allowedOrigins": { + "items": { + "type": "string" + }, + "type": "array" }, "appVersion": { "type": "string" }, - "baseURL": { - "type": "string" - }, "bridgePort": { "type": "integer" }, "containerName": { "type": "string" }, - "contextWindow": { - "type": "integer" - }, "cpuQuota": { "type": "number" }, @@ -23775,9 +24593,6 @@ "editCompose": { "type": "boolean" }, - "maxTokens": { - "type": "integer" - }, "memoryLimit": { "type": "number" }, @@ -23790,12 +24605,12 @@ "name": { "type": "string" }, - "provider": { - "type": "string" - }, "pullImage": { "type": "boolean" }, + "remark": { + "type": "string" + }, "restartPolicy": { "type": "string" }, @@ -23813,6 +24628,7 @@ } }, "required": [ + "agentType", "appVersion", "name", "webUIPort" @@ -23836,8 +24652,182 @@ ], "type": "object" }, + "dto.AgentDingTalkBot": { + "properties": { + "accountId": { + "type": "string" + }, + "clientId": { + "type": "string" + }, + "clientSecret": { + "type": "string" + }, + "enabled": { + "type": "boolean" + }, + "isDefault": { + "type": "boolean" + }, + "name": { + "type": "string" + } + }, + "type": "object" + }, + "dto.AgentDingTalkConfig": { + "properties": { + "ackText": { + "type": "string" + }, + "allowFrom": { + "items": { + "type": "string" + }, + "type": "array" + }, + "asyncMode": { + "type": "boolean" + }, + "bots": { + "items": { + "$ref": "#/definitions/dto.AgentDingTalkBot" + }, + "type": "array" + }, + "dmPolicy": { + "type": "string" + }, + "enabled": { + "type": "boolean" + }, + "groupAllowFrom": { + "items": { + "type": "string" + }, + "type": "array" + }, + "groupPolicy": { + "type": "string" + }, + "groupSessionScope": { + "type": "string" + }, + "installed": { + "type": "boolean" + }, + "separateSessionByConversation": { + "type": "boolean" + }, + "sharedMemoryAcrossConversations": { + "type": "boolean" + } + }, + "type": "object" + }, + "dto.AgentDingTalkConfigUpdateReq": { + "properties": { + "ackText": { + "type": "string" + }, + "agentId": { + "type": "integer" + }, + "allowFrom": { + "items": { + "type": "string" + }, + "type": "array" + }, + "asyncMode": { + "type": "boolean" + }, + "bots": { + "items": { + "$ref": "#/definitions/dto.AgentDingTalkBot" + }, + "minItems": 1, + "type": "array" + }, + "dmPolicy": { + "enum": [ + "allowlist", + "open", + "disabled" + ], + "type": "string" + }, + "enabled": { + "type": "boolean" + }, + "groupAllowFrom": { + "items": { + "type": "string" + }, + "type": "array" + }, + "groupPolicy": { + "enum": [ + "open", + "allowlist", + "disabled" + ], + "type": "string" + }, + "groupSessionScope": { + "enum": [ + "group", + "group_sender" + ], + "type": "string" + }, + "separateSessionByConversation": { + "type": "boolean" + }, + "sharedMemoryAcrossConversations": { + "type": "boolean" + } + }, + "required": [ + "agentId", + "bots", + "dmPolicy", + "groupPolicy", + "groupSessionScope" + ], + "type": "object" + }, + "dto.AgentDiscordBot": { + "properties": { + "accountId": { + "type": "string" + }, + "enabled": { + "type": "boolean" + }, + "isDefault": { + "type": "boolean" + }, + "name": { + "type": "string" + }, + "token": { + "type": "string" + } + }, + "type": "object" + }, "dto.AgentDiscordConfig": { "properties": { + "bots": { + "items": { + "$ref": "#/definitions/dto.AgentDiscordBot" + }, + "type": "array" + }, + "defaultAccount": { + "type": "string" + }, "dmPolicy": { "type": "string" }, @@ -23849,29 +24839,25 @@ }, "proxy": { "type": "string" - }, - "token": { - "type": "string" } }, "type": "object" }, - "dto.AgentDiscordConfigReq": { - "properties": { - "agentId": { - "type": "integer" - } - }, - "required": [ - "agentId" - ], - "type": "object" - }, "dto.AgentDiscordConfigUpdateReq": { "properties": { "agentId": { "type": "integer" }, + "bots": { + "items": { + "$ref": "#/definitions/dto.AgentDiscordBot" + }, + "minItems": 1, + "type": "array" + }, + "defaultAccount": { + "type": "string" + }, "dmPolicy": { "type": "string" }, @@ -23888,35 +24874,83 @@ }, "proxy": { "type": "string" - }, - "token": { - "type": "string" } }, "required": [ "agentId", + "bots", + "defaultAccount", "dmPolicy", - "groupPolicy", - "token" + "groupPolicy" ], "type": "object" }, - "dto.AgentFeishuConfig": { + "dto.AgentFeishuBot": { "properties": { + "accountId": { + "type": "string" + }, + "allowFrom": { + "items": { + "type": "string" + }, + "type": "array" + }, "appId": { "type": "string" }, "appSecret": { "type": "string" }, - "botName": { - "type": "string" - }, "dmPolicy": { "type": "string" }, "enabled": { "type": "boolean" + }, + "isDefault": { + "type": "boolean" + }, + "name": { + "type": "string" + } + }, + "type": "object" + }, + "dto.AgentFeishuConfig": { + "properties": { + "bots": { + "items": { + "$ref": "#/definitions/dto.AgentFeishuBot" + }, + "type": "array" + }, + "enabled": { + "type": "boolean" + }, + "groupAllowFrom": { + "items": { + "type": "string" + }, + "type": "array" + }, + "groupPolicy": { + "type": "string" + }, + "installed": { + "type": "boolean" + }, + "replyMode": { + "type": "string" + }, + "requireMention": { + "type": "string" + }, + "streaming": { + "type": "boolean" + }, + "threadSession": { + "type": "boolean" } }, "type": "object" @@ -23937,43 +24971,65 @@ "agentId": { "type": "integer" }, - "appId": { - "type": "string" - }, - "appSecret": { - "type": "string" - }, - "botName": { - "type": "string" - }, - "dmPolicy": { - "type": "string" + "bots": { + "items": { + "$ref": "#/definitions/dto.AgentFeishuBot" + }, + "minItems": 1, + "type": "array" }, "enabled": { "type": "boolean" + }, + "groupAllowFrom": { + "items": { + "type": "string" + }, + "type": "array" + }, + "groupPolicy": { + "enum": [ + "open", + "allowlist", + "disabled" + ], + "type": "string" + }, + "replyMode": { + "type": "string" + }, + "requireMention": { + "enum": [ + "true", + "false", + "open" + ], + "type": "string" + }, + "streaming": { + "type": "boolean" + }, + "threadSession": { + "type": "boolean" } }, "required": [ "agentId", - "appId", - "appSecret", - "botName", - "dmPolicy" + "bots", + "groupPolicy", + "replyMode", + "requireMention" ], "type": "object" }, - "dto.AgentFeishuPairingApproveReq": { + "dto.AgentIDReq": { "properties": { "agentId": { "type": "integer" - }, - "pairingCode": { - "type": "string" } }, "required": [ - "agentId", - "pairingCode" + "agentId" ], "type": "object" }, @@ -24039,6 +25095,9 @@ "providerName": { "type": "string" }, + "remark": { + "type": "string" + }, "status": { "type": "string" }, @@ -24050,6 +25109,32 @@ }, "webUIPort": { "type": "integer" + }, + "websiteId": { + "type": "integer" + }, + "websitePrimaryDomain": { + "type": "string" + }, + "websiteProtocol": { + "type": "string" + } + }, + "type": "object" + }, + "dto.AgentModelConfig": { + "properties": { + "accountId": { + "type": "integer" + }, + "fallbacks": { + "items": { + "type": "string" + }, + "type": "array" + }, + "model": { + "type": "string" } }, "type": "object" @@ -24062,6 +25147,12 @@ "agentId": { "type": "integer" }, + "fallbacks": { + "items": { + "type": "string" + }, + "type": "array" + }, "model": { "type": "string" } @@ -24075,13 +25166,49 @@ }, "dto.AgentOtherConfig": { "properties": { + "browserEnabled": { + "type": "boolean" + }, + "npmRegistry": { + "type": "string" + }, "userTimezone": { "type": "string" } }, "type": "object" }, - "dto.AgentOtherConfigReq": { + "dto.AgentOtherConfigUpdateReq": { + "properties": { + "agentId": { + "type": "integer" + }, + "browserEnabled": { + "type": "boolean" + }, + "npmRegistry": { + "type": "string" + }, + "userTimezone": { + "type": "string" + } + }, + "required": [ + "agentId", + "npmRegistry", + "userTimezone" + ], + "type": "object" + }, + "dto.AgentOverview": { + "properties": { + "snapshot": { + "$ref": "#/definitions/dto.AgentOverviewSnapshot" + } + }, + "type": "object" + }, + "dto.AgentOverviewReq": { "properties": { "agentId": { "type": "integer" @@ -24092,19 +25219,30 @@ ], "type": "object" }, - "dto.AgentOtherConfigUpdateReq": { + "dto.AgentOverviewSnapshot": { "properties": { - "agentId": { + "appVersion": { + "type": "string" + }, + "channelCount": { "type": "integer" }, - "userTimezone": { + "containerStatus": { "type": "string" + }, + "defaultModel": { + "type": "string" + }, + "jobCount": { + "type": "integer" + }, + "sessionCount": { + "type": "integer" + }, + "skillCount": { + "type": "integer" } }, - "required": [ - "agentId", - "userTimezone" - ], "type": "object" }, "dto.AgentPluginCheckReq": { @@ -24112,9 +25250,16 @@ "agentId": { "type": "integer" }, + "checkLatest": { + "type": "boolean" + }, "type": { "enum": [ - "qqbot" + "feishu", + "qqbot", + "wecom", + "dingtalk", + "weixin" ], "type": "string" } @@ -24135,7 +25280,11 @@ }, "type": { "enum": [ - "qqbot" + "feishu", + "qqbot", + "wecom", + "dingtalk", + "weixin" ], "type": "string" } @@ -24149,19 +25298,112 @@ }, "dto.AgentPluginStatus": { "properties": { + "currentVersion": { + "type": "string" + }, "installed": { "type": "boolean" + }, + "latestVersion": { + "type": "string" + }, + "upgradable": { + "type": "boolean" + } + }, + "type": "object" + }, + "dto.AgentPluginUninstallReq": { + "properties": { + "agentId": { + "type": "integer" + }, + "taskID": { + "type": "string" + }, + "type": { + "enum": [ + "feishu", + "qqbot", + "wecom", + "dingtalk", + "weixin" + ], + "type": "string" + } + }, + "required": [ + "agentId", + "taskID", + "type" + ], + "type": "object" + }, + "dto.AgentPluginUpgradeReq": { + "properties": { + "agentId": { + "type": "integer" + }, + "taskID": { + "type": "string" + }, + "type": { + "enum": [ + "feishu", + "qqbot", + "wecom", + "dingtalk", + "weixin" + ], + "type": "string" + } + }, + "required": [ + "agentId", + "taskID", + "type" + ], + "type": "object" + }, + "dto.AgentQQBotBot": { + "properties": { + "accountId": { + "type": "string" + }, + "allowFrom": { + "items": { + "type": "string" + }, + "type": "array" + }, + "appId": { + "type": "string" + }, + "clientSecret": { + "type": "string" + }, + "enabled": { + "type": "boolean" + }, + "isDefault": { + "type": "boolean" + }, + "name": { + "type": "string" + }, + "systemPrompt": { + "type": "string" } }, "type": "object" }, "dto.AgentQQBotConfig": { "properties": { - "appId": { - "type": "string" - }, - "clientSecret": { - "type": "string" + "bots": { + "items": { + "$ref": "#/definitions/dto.AgentQQBotBot" + }, + "type": "array" }, "enabled": { "type": "boolean" @@ -24172,7 +25414,96 @@ }, "type": "object" }, - "dto.AgentQQBotConfigReq": { + "dto.AgentQQBotConfigUpdateReq": { + "properties": { + "agentId": { + "type": "integer" + }, + "bots": { + "items": { + "$ref": "#/definitions/dto.AgentQQBotBot" + }, + "minItems": 1, + "type": "array" + }, + "enabled": { + "type": "boolean" + } + }, + "required": [ + "agentId", + "bots" + ], + "type": "object" + }, + "dto.AgentRemarkUpdateReq": { + "properties": { + "id": { + "type": "integer" + }, + "remark": { + "type": "string" + } + }, + "required": [ + "id" + ], + "type": "object" + }, + "dto.AgentRoleBindReq": { + "properties": { + "accountId": { + "type": "string" + }, + "agentId": { + "type": "integer" + }, + "channel": { + "type": "string" + }, + "id": { + "type": "string" + } + }, + "required": [ + "agentId", + "channel", + "id" + ], + "type": "object" + }, + "dto.AgentRoleBinding": { + "properties": { + "accountId": { + "type": "string" + }, + "channel": { + "type": "string" + } + }, + "required": [ + "channel" + ], + "type": "object" + }, + "dto.AgentRoleChannelItem": { + "properties": { + "accountIds": { + "items": { + "type": "string" + }, + "type": "array" + }, + "bound": { + "type": "boolean" + }, + "name": { + "type": "string" + } + }, + "type": "object" + }, + "dto.AgentRoleChannelsReq": { "properties": { "agentId": { "type": "integer" @@ -24183,30 +25514,277 @@ ], "type": "object" }, - "dto.AgentQQBotConfigUpdateReq": { + "dto.AgentRoleCreateReq": { "properties": { "agentId": { "type": "integer" }, - "appId": { + "bindings": { + "items": { + "$ref": "#/definitions/dto.AgentRoleBinding" + }, + "type": "array" + }, + "model": { "type": "string" }, - "clientSecret": { + "name": { "type": "string" - }, - "enabled": { - "type": "boolean" } }, "required": [ "agentId", - "appId", - "clientSecret" + "name" ], "type": "object" }, - "dto.AgentTelegramConfig": { + "dto.AgentRoleCreateResp": { "properties": { + "output": { + "type": "string" + } + }, + "type": "object" + }, + "dto.AgentRoleDeleteReq": { + "properties": { + "agentId": { + "type": "integer" + }, + "id": { + "type": "string" + } + }, + "required": [ + "agentId", + "id" + ], + "type": "object" + }, + "dto.AgentRoleMarkdownFileItem": { + "properties": { + "content": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "type": "object" + }, + "dto.AgentRoleMarkdownFileUpdateItem": { + "properties": { + "content": { + "type": "string" + }, + "name": { + "enum": [ + "AGENTS.md", + "SOUL.md", + "USER.md", + "IDENTITY.md", + "TOOLS.md", + "HEARTBEAT.md", + "BOOT.md", + "BOOTSTRAP.md" + ], + "type": "string" + } + }, + "required": [ + "name" + ], + "type": "object" + }, + "dto.AgentRoleMarkdownFilesReq": { + "properties": { + "agentId": { + "type": "integer" + }, + "workspace": { + "type": "string" + } + }, + "required": [ + "agentId", + "workspace" + ], + "type": "object" + }, + "dto.AgentRoleMarkdownFilesUpdateReq": { + "properties": { + "agentId": { + "type": "integer" + }, + "files": { + "items": { + "$ref": "#/definitions/dto.AgentRoleMarkdownFileUpdateItem" + }, + "type": "array" + }, + "restart": { + "type": "boolean" + }, + "workspace": { + "type": "string" + } + }, + "required": [ + "agentId", + "files", + "workspace" + ], + "type": "object" + }, + "dto.AgentSecurityConfig": { + "properties": { + "allowedOrigins": { + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "dto.AgentSecurityConfigUpdateReq": { + "properties": { + "agentId": { + "type": "integer" + }, + "allowedOrigins": { + "items": { + "type": "string" + }, + "type": "array" + } + }, + "required": [ + "agentId" + ], + "type": "object" + }, + "dto.AgentSkillInstallReq": { + "properties": { + "agentId": { + "type": "integer" + }, + "slug": { + "type": "string" + }, + "source": { + "enum": [ + "clawhub-global", + "clawhub-cn", + "skillhub" + ], + "type": "string" + }, + "taskID": { + "type": "string" + } + }, + "required": [ + "agentId", + "slug", + "source", + "taskID" + ], + "type": "object" + }, + "dto.AgentSkillItem": { + "properties": { + "bundled": { + "type": "boolean" + }, + "description": { + "type": "string" + }, + "disabled": { + "type": "boolean" + }, + "name": { + "type": "string" + }, + "source": { + "type": "string" + } + }, + "type": "object" + }, + "dto.AgentSkillSearchItem": { + "properties": { + "description": { + "type": "string" + }, + "name": { + "type": "string" + }, + "score": { + "type": "string" + }, + "slug": { + "type": "string" + }, + "source": { + "type": "string" + }, + "summary": { + "type": "string" + }, + "version": { + "type": "string" + } + }, + "type": "object" + }, + "dto.AgentSkillSearchReq": { + "properties": { + "agentId": { + "type": "integer" + }, + "keyword": { + "type": "string" + }, + "source": { + "enum": [ + "clawhub-global", + "clawhub-cn", + "skillhub" + ], + "type": "string" + } + }, + "required": [ + "agentId", + "keyword", + "source" + ], + "type": "object" + }, + "dto.AgentSkillUpdateReq": { + "properties": { + "agentId": { + "type": "integer" + }, + "enabled": { + "type": "boolean" + }, + "name": { + "type": "string" + } + }, + "required": [ + "agentId", + "name" + ], + "type": "object" + }, + "dto.AgentTelegramBot": { + "properties": { + "accountId": { + "type": "string" + }, "botToken": { "type": "string" }, @@ -24216,8 +25794,58 @@ "enabled": { "type": "boolean" }, + "groupPolicy": { + "type": "string" + }, + "isDefault": { + "type": "boolean" + }, + "name": { + "type": "string" + }, + "streaming": { + "type": "string" + } + }, + "type": "object" + }, + "dto.AgentTelegramConfig": { + "properties": { + "allowFrom": { + "items": { + "type": "string" + }, + "type": "array" + }, + "bots": { + "items": { + "$ref": "#/definitions/dto.AgentTelegramBot" + }, + "type": "array" + }, + "defaultAccount": { + "type": "string" + }, + "dmPolicy": { + "type": "string" + }, + "enabled": { + "type": "boolean" + }, + "groupAllowFrom": { + "items": { + "type": "string" + }, + "type": "array" + }, + "groupPolicy": { + "type": "string" + }, "proxy": { "type": "string" + }, + "streaming": { + "type": "string" } }, "type": "object" @@ -24238,23 +25866,68 @@ "agentId": { "type": "integer" }, - "botToken": { + "allowFrom": { + "items": { + "type": "string" + }, + "type": "array" + }, + "bots": { + "items": { + "$ref": "#/definitions/dto.AgentTelegramBot" + }, + "minItems": 1, + "type": "array" + }, + "defaultAccount": { "type": "string" }, "dmPolicy": { + "enum": [ + "pairing", + "open", + "allowlist", + "disabled" + ], "type": "string" }, "enabled": { "type": "boolean" }, + "groupAllowFrom": { + "items": { + "type": "string" + }, + "type": "array" + }, + "groupPolicy": { + "enum": [ + "open", + "allowlist", + "disabled" + ], + "type": "string" + }, "proxy": { "type": "string" + }, + "streaming": { + "enum": [ + "off", + "partial", + "block", + "progress" + ], + "type": "string" } }, "required": [ "agentId", - "botToken", - "dmPolicy" + "bots", + "defaultAccount", + "dmPolicy", + "groupPolicy", + "streaming" ], "type": "object" }, @@ -24269,6 +25942,124 @@ ], "type": "object" }, + "dto.AgentWebsiteBindReq": { + "properties": { + "agentId": { + "type": "integer" + }, + "websiteId": { + "type": "integer" + } + }, + "required": [ + "agentId", + "websiteId" + ], + "type": "object" + }, + "dto.AgentWecomConfig": { + "properties": { + "allowFrom": { + "items": { + "type": "string" + }, + "type": "array" + }, + "botId": { + "type": "string" + }, + "dmPolicy": { + "type": "string" + }, + "enabled": { + "type": "boolean" + }, + "groupAllowFrom": { + "items": { + "type": "string" + }, + "type": "array" + }, + "groupPolicy": { + "type": "string" + }, + "installed": { + "type": "boolean" + }, + "secret": { + "type": "string" + } + }, + "type": "object" + }, + "dto.AgentWecomConfigUpdateReq": { + "properties": { + "agentId": { + "type": "integer" + }, + "allowFrom": { + "items": { + "type": "string" + }, + "type": "array" + }, + "botId": { + "type": "string" + }, + "dmPolicy": { + "enum": [ + "pairing", + "open", + "allowlist", + "disabled" + ], + "type": "string" + }, + "enabled": { + "type": "boolean" + }, + "groupAllowFrom": { + "items": { + "type": "string" + }, + "type": "array" + }, + "groupPolicy": { + "enum": [ + "open", + "allowlist", + "disabled" + ], + "type": "string" + }, + "secret": { + "type": "string" + } + }, + "required": [ + "agentId", + "botId", + "dmPolicy", + "groupPolicy", + "secret" + ], + "type": "object" + }, + "dto.AgentWeixinLoginReq": { + "properties": { + "agentId": { + "type": "integer" + }, + "taskID": { + "type": "string" + } + }, + "required": [ + "agentId", + "taskID" + ], + "type": "object" + }, "dto.ApiInterfaceConfig": { "properties": { "apiInterfaceStatus": { @@ -24509,6 +26300,9 @@ }, "dto.AppstoreConfig": { "properties": { + "installAllowPort": { + "type": "string" + }, "uninstallDeleteBackup": { "type": "string" }, @@ -24527,7 +26321,8 @@ "enum": [ "UninstallDeleteImage", "UpgradeBackup", - "UninstallDeleteBackup" + "UninstallDeleteBackup", + "InstallAllowPort" ], "type": "string" }, @@ -24777,21 +26572,6 @@ ], "type": "object" }, - "dto.ChangeHostGroup": { - "properties": { - "groupID": { - "type": "integer" - }, - "id": { - "type": "integer" - } - }, - "required": [ - "groupID", - "id" - ], - "type": "object" - }, "dto.ChangePasswd": { "properties": { "passwd": { @@ -25068,6 +26848,9 @@ }, "dto.CleanTree": { "properties": { + "canDelete": { + "type": "boolean" + }, "children": { "items": { "$ref": "#/definitions/dto.CleanTree" @@ -25188,6 +26971,9 @@ "secret": { "type": "string" }, + "stopBefore": { + "type": "boolean" + }, "taskID": { "type": "string" }, @@ -25201,7 +26987,9 @@ "postgresql", "mysql-cluster", "postgresql-cluster", - "redis-cluster" + "redis-cluster", + "container", + "compose" ], "type": "string" } @@ -25271,7 +27059,9 @@ "postgresql", "mysql-cluster", "postgresql-cluster", - "redis-cluster" + "redis-cluster", + "container", + "compose" ], "type": "string" } @@ -26362,6 +28152,9 @@ }, "dto.DashboardBase": { "properties": { + "agentNumber": { + "type": "integer" + }, "appInstalledNumber": { "type": "integer" }, @@ -27465,43 +29258,6 @@ ], "type": "object" }, - "dto.HostConnTest": { - "properties": { - "addr": { - "type": "string" - }, - "authMode": { - "enum": [ - "password", - "key" - ], - "type": "string" - }, - "passPhrase": { - "type": "string" - }, - "password": { - "type": "string" - }, - "port": { - "maximum": 65535, - "minimum": 1, - "type": "integer" - }, - "privateKey": { - "type": "string" - }, - "user": { - "type": "string" - } - }, - "required": [ - "addr", - "port", - "user" - ], - "type": "object" - }, "dto.HostHelper": { "properties": { "host": { @@ -27513,122 +29269,6 @@ }, "type": "object" }, - "dto.HostInfo": { - "properties": { - "addr": { - "type": "string" - }, - "authMode": { - "type": "string" - }, - "createdAt": { - "type": "string" - }, - "description": { - "type": "string" - }, - "groupBelong": { - "type": "string" - }, - "groupID": { - "type": "integer" - }, - "id": { - "type": "integer" - }, - "name": { - "type": "string" - }, - "passPhrase": { - "type": "string" - }, - "password": { - "type": "string" - }, - "port": { - "type": "integer" - }, - "privateKey": { - "type": "string" - }, - "rememberPassword": { - "type": "boolean" - }, - "user": { - "type": "string" - } - }, - "type": "object" - }, - "dto.HostOperate": { - "properties": { - "addr": { - "type": "string" - }, - "authMode": { - "enum": [ - "password", - "key" - ], - "type": "string" - }, - "description": { - "type": "string" - }, - "groupID": { - "type": "integer" - }, - "id": { - "type": "integer" - }, - "name": { - "type": "string" - }, - "passPhrase": { - "type": "string" - }, - "password": { - "type": "string" - }, - "port": { - "maximum": 65535, - "minimum": 1, - "type": "integer" - }, - "privateKey": { - "type": "string" - }, - "rememberPassword": { - "type": "boolean" - }, - "user": { - "type": "string" - } - }, - "required": [ - "addr", - "port", - "user" - ], - "type": "object" - }, - "dto.HostTree": { - "properties": { - "children": { - "items": { - "$ref": "#/definitions/dto.TreeChild" - }, - "type": "array" - }, - "id": { - "type": "integer" - }, - "label": { - "type": "string" - } - }, - "type": "object" - }, "dto.ImageBuild": { "properties": { "args": { @@ -28101,17 +29741,13 @@ "code": { "type": "string" }, - "name": { - "type": "string" - }, - "password": { + "sessionId": { "type": "string" } }, "required": [ "code", - "name", - "password" + "sessionId" ], "type": "object" }, @@ -29669,11 +31305,26 @@ }, "dto.ProviderModelInfo": { "properties": { + "contextWindow": { + "type": "integer" + }, "id": { "type": "string" }, + "input": { + "items": { + "type": "string" + }, + "type": "array" + }, + "maxTokens": { + "type": "integer" + }, "name": { "type": "string" + }, + "reasoning": { + "type": "boolean" } }, "type": "object" @@ -30060,12 +31711,21 @@ ], "type": "object" }, - "dto.SSHConf": { + "dto.SSHConfUpdate": { "properties": { - "file": { + "key": { + "type": "string" + }, + "path": { + "type": "string" + }, + "value": { "type": "string" } }, + "required": [ + "key" + ], "type": "object" }, "dto.SSHConnData": { @@ -30164,9 +31824,6 @@ }, "newValue": { "type": "string" - }, - "oldValue": { - "type": "string" } }, "required": [ @@ -30351,14 +32008,6 @@ ], "type": "object" }, - "dto.SearchForTree": { - "properties": { - "info": { - "type": "string" - } - }, - "type": "object" - }, "dto.SearchLgLogWithPage": { "properties": { "ip": { @@ -30927,17 +32576,6 @@ }, "type": "object" }, - "dto.TreeChild": { - "properties": { - "id": { - "type": "integer" - }, - "label": { - "type": "string" - } - }, - "type": "object" - }, "dto.UpdateByFile": { "properties": { "file": { @@ -31052,6 +32690,9 @@ }, "dto.UserLoginInfo": { "properties": { + "mfaSession": { + "type": "string" + }, "mfaStatus": { "type": "string" }, @@ -32862,6 +34503,14 @@ ], "type": "object" }, + "request.FileProcessReq": { + "properties": { + "key": { + "type": "string" + } + }, + "type": "object" + }, "request.FileReadByLineReq": { "properties": { "ID": { @@ -35179,6 +36828,9 @@ }, "sni": { "type": "boolean" + }, + "sslVerify": { + "type": "boolean" } }, "required": [ diff --git a/core/init/migration/migrate.go b/core/init/migration/migrate.go index fb86ff55d..10f444628 100644 --- a/core/init/migration/migrate.go +++ b/core/init/migration/migrate.go @@ -37,6 +37,7 @@ func Init() { migrations.UpdateAiAgentsHideMenuTitle, migrations.UpdateAiModelMenuStructure, migrations.AddDocSourceSetting, + migrations.AddAppStoreInstallAllowPortSetting, }) if err := m.Migrate(); err != nil { global.LOG.Error(err) diff --git a/core/init/migration/migrations/init.go b/core/init/migration/migrations/init.go index ee5173738..6cf65ad8f 100644 --- a/core/init/migration/migrations/init.go +++ b/core/init/migration/migrations/init.go @@ -193,6 +193,9 @@ var InitSetting = &gormigrate.Migration{ if err := tx.Create(&model.Setting{Key: "UninstallDeleteBackup", Value: constant.StatusDisable}).Error; err != nil { return err } + if err := tx.Create(&model.Setting{Key: "InstallAllowPort", Value: constant.StatusDisable}).Error; err != nil { + return err + } return nil }, } @@ -854,6 +857,23 @@ var AddDocSourceSetting = &gormigrate.Migration{ }, } +var AddAppStoreInstallAllowPortSetting = &gormigrate.Migration{ + ID: "20260407-add-app-store-install-allow-port-setting", + Migrate: func(tx *gorm.DB) error { + var setting model.Setting + if err := tx.Where("key = ?", "InstallAllowPort").First(&setting).Error; err != nil { + if errors.Is(err, gorm.ErrRecordNotFound) { + return tx.Create(&model.Setting{Key: "InstallAllowPort", Value: constant.StatusDisable}).Error + } + return err + } + if setting.Value == "" { + return tx.Model(&model.Setting{}).Where("key = ?", "InstallAllowPort").Update("value", constant.StatusDisable).Error + } + return nil + }, +} + var UpdateAiLocalModelMenuTitle = &gormigrate.Migration{ ID: "20260307-update-ai-local-model-menu-title", Migrate: func(tx *gorm.DB) error { diff --git a/frontend/src/api/interface/app.ts b/frontend/src/api/interface/app.ts index 855f97abc..f856e5235 100644 --- a/frontend/src/api/interface/app.ts +++ b/frontend/src/api/interface/app.ts @@ -344,6 +344,7 @@ export namespace App { uninstallDeleteImage: string; uninstallDeleteBackup: string; upgradeBackup: string; + installAllowPort: string; } export interface AppStoreConfigUpdate { diff --git a/frontend/src/lang/modules/en.ts b/frontend/src/lang/modules/en.ts index 19e152c98..c52983f09 100644 --- a/frontend/src/lang/modules/en.ts +++ b/frontend/src/lang/modules/en.ts @@ -2665,6 +2665,7 @@ const message = { uninstallDeleteBackup: 'Uninstall App - Delete Backup', uninstallDeleteImage: 'Uninstall App - Delete Image', upgradeBackup: 'Backup App Before Upgrade', + installAllowPort: 'Open external port access by default when installing apps', noAppHelper: 'No application detected, go to the task center to view the app store sync log', isEdirWarn: 'Detected modification to docker-compose.yml file, please check the comparison', }, diff --git a/frontend/src/lang/modules/es-es.ts b/frontend/src/lang/modules/es-es.ts index 89bc1b4da..5a1ed5273 100644 --- a/frontend/src/lang/modules/es-es.ts +++ b/frontend/src/lang/modules/es-es.ts @@ -2645,6 +2645,7 @@ const message = { uninstallDeleteBackup: 'Desinstalar - Eliminar respaldo', uninstallDeleteImage: 'Desinstalar - Eliminar imagen', upgradeBackup: 'Respaldar app antes de actualizar', + installAllowPort: 'Abrir el acceso externo al puerto por defecto al instalar apps', noAppHelper: 'No se detectó ninguna aplicación, por favor vaya al centro de tareas para ver el registro de sincronización de la tienda de aplicaciones', isEdirWarn: 'Se detectó modificación en el archivo docker-compose.yml, por favor revise la comparación', diff --git a/frontend/src/lang/modules/ja.ts b/frontend/src/lang/modules/ja.ts index 1d10f23be..f526d7ab9 100644 --- a/frontend/src/lang/modules/ja.ts +++ b/frontend/src/lang/modules/ja.ts @@ -2617,6 +2617,7 @@ const message = { uninstallDeleteBackup: 'アプリをアンインストール - バックアップを削除', uninstallDeleteImage: 'アプリをアンインストール - イメージを削除', upgradeBackup: 'アプリのアップグレード前にアプリをバックアップ', + installAllowPort: 'アプリインストール時に外部アクセスを既定で有効化', noAppHelper: 'アプリケーションが検出されませんでした。タスクセンターでアプリストアの同期ログを確認してください', isEdirWarn: 'docker-compose.yml ファイルが変更されたことを検出しました。比較を確認してください', }, diff --git a/frontend/src/lang/modules/ko.ts b/frontend/src/lang/modules/ko.ts index d0c3c9fb1..8f562a86c 100644 --- a/frontend/src/lang/modules/ko.ts +++ b/frontend/src/lang/modules/ko.ts @@ -2551,6 +2551,7 @@ const message = { uninstallDeleteBackup: '앱 제거 - 백업 삭제', uninstallDeleteImage: '앱 제거 - 이미지 삭제', upgradeBackup: '앱 업그레이드 전 앱 백업', + installAllowPort: '앱 설치 시 기본으로 외부 포트 접근 허용', noAppHelper: '애플리케이션이 감지되지 않았습니다. 작업 센터에서 앱 스토어 동기화 로그를 확인해 주세요', isEdirWarn: 'docker-compose.yml 파일이 수정된 것을 감지했습니다. 비교를 확인해 주세요', }, diff --git a/frontend/src/lang/modules/ms.ts b/frontend/src/lang/modules/ms.ts index a0db46dff..67b332851 100644 --- a/frontend/src/lang/modules/ms.ts +++ b/frontend/src/lang/modules/ms.ts @@ -2647,6 +2647,7 @@ const message = { uninstallDeleteBackup: 'Cop Terhapus Semasa Nyahpasang Aplikasi', uninstallDeleteImage: 'Imej Terhapus Semasa Nyahpasang Aplikasi', upgradeBackup: 'Sandaran Aplikasi Sebelum Naik Taraf', + installAllowPort: 'Buka akses port luaran secara lalai semasa memasang aplikasi', noAppHelper: 'Tiada aplikasi dikesan, sila pergi ke pusat tugas untuk melihat log penyegerakan kedai aplikasi', isEdirWarn: 'Mengesan pengubahsuaian pada fail docker-compose.yml, sila semak perbandingan', }, diff --git a/frontend/src/lang/modules/pt-br.ts b/frontend/src/lang/modules/pt-br.ts index bc3747e45..77f0b8d19 100644 --- a/frontend/src/lang/modules/pt-br.ts +++ b/frontend/src/lang/modules/pt-br.ts @@ -2784,6 +2784,7 @@ const message = { uninstallDeleteBackup: 'Desinstalar Aplicativo - Excluir Backup', uninstallDeleteImage: 'Desinstalar Aplicativo - Excluir Imagem', upgradeBackup: 'Fazer Backup do Aplicativo Antes de Atualizar', + installAllowPort: 'Abrir acesso externo à porta por padrão ao instalar aplicativos', noAppHelper: 'Nenhuma aplicação detectada, por favor vá ao centro de tarefas para visualizar o log de sincronização da loja de aplicativos', isEdirWarn: 'Detectada modificação no arquivo docker-compose.yml, por favor verifique a comparação', diff --git a/frontend/src/lang/modules/ru.ts b/frontend/src/lang/modules/ru.ts index a36fea748..ec54728b4 100644 --- a/frontend/src/lang/modules/ru.ts +++ b/frontend/src/lang/modules/ru.ts @@ -2645,6 +2645,7 @@ const message = { uninstallDeleteBackup: 'Деинсталляция приложения - Удаление резервной копии', uninstallDeleteImage: 'Деинсталляция приложения - Удаление образа', upgradeBackup: 'Резервное копирование приложения перед обновлением', + installAllowPort: 'По умолчанию открывать внешний доступ к порту при установке приложения', noAppHelper: 'Приложения не обнаружены, пожалуйста, перейдите в центр задач для просмотра журнала синхронизации магазина приложений', isEdirWarn: 'Обнаружено изменение файла docker-compose.yml, пожалуйста, проверьте сравнение', diff --git a/frontend/src/lang/modules/tr.ts b/frontend/src/lang/modules/tr.ts index 0d55994e9..df0928ef8 100644 --- a/frontend/src/lang/modules/tr.ts +++ b/frontend/src/lang/modules/tr.ts @@ -2647,6 +2647,7 @@ const message = { uninstallDeleteBackup: 'Uygulamayı Kaldır - Yedeği Sil', uninstallDeleteImage: 'Uygulamayı Kaldır - Görüntüyü Sil', upgradeBackup: 'Yükseltmeden Önce Uygulamayı Yedekle', + installAllowPort: 'Uygulama kurulurken varsayılan olarak dış port erişimini aç', noAppHelper: 'Uygulama tespit edilmedi, lütfen uygulama mağazası senkronizasyon günlüğünü görüntülemek için görev merkezine gidin', isEdirWarn: 'docker-compose.yml dosyasında değişiklik tespit edildi, lütfen karşılaştırmayı kontrol edin', diff --git a/frontend/src/lang/modules/zh-Hant.ts b/frontend/src/lang/modules/zh-Hant.ts index dd496388e..95e5e38f5 100644 --- a/frontend/src/lang/modules/zh-Hant.ts +++ b/frontend/src/lang/modules/zh-Hant.ts @@ -2397,6 +2397,7 @@ const message = { uninstallDeleteBackup: '移除應用-刪除備份', uninstallDeleteImage: '移除應用-刪除映像', upgradeBackup: '應用升級前備份應用', + installAllowPort: '安裝應用預設開啟埠外部存取', noAppHelper: '未偵測到應用程式,請前往任務中心檢視應用商店同步日誌', isEdirWarn: '偵測到 docker-compose.yml 檔案被修改,請檢視對比', }, diff --git a/frontend/src/lang/modules/zh.ts b/frontend/src/lang/modules/zh.ts index aef3f51a5..54d8318a0 100644 --- a/frontend/src/lang/modules/zh.ts +++ b/frontend/src/lang/modules/zh.ts @@ -2463,6 +2463,7 @@ const message = { uninstallDeleteBackup: '卸载应用-删除备份', uninstallDeleteImage: '卸载应用-删除镜像', upgradeBackup: '应用升级前备份应用', + installAllowPort: '安装应用默认打开端口外部访问', noAppHelper: '未检测到应用,请前往任务中心查看应用商店同步日志', isEdirWarn: '检测到 docker-compose.yml 文件被修改,请查看对比', }, diff --git a/frontend/src/views/app-store/detail/form/index.vue b/frontend/src/views/app-store/detail/form/index.vue index 926fde7a7..b4bc8da1e 100644 --- a/frontend/src/views/app-store/detail/form/index.vue +++ b/frontend/src/views/app-store/detail/form/index.vue @@ -147,6 +147,7 @@