feat: 后端工具和 MCP 模块更新
- main.go: 更新工作空间目录,添加 MCP 模型迁移 - tool.go: 添加 description_cn 字段 - auth_service, tool_service: 优化 - 更新 Swagger 文档 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -128,8 +128,8 @@ func ensureAdminWorkspace() {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
// 创建子目录
|
// 创建子目录: skills(技能), scripts(脚本), sandbox(沙盒), files(文件), temp(临时)
|
||||||
for _, dir := range []string{"projects", "files", "temp"} {
|
for _, dir := range []string{"skills", "scripts", "sandbox", "files", "temp"} {
|
||||||
os.MkdirAll(filepath.Join(workspacePath, dir), 0755)
|
os.MkdirAll(filepath.Join(workspacePath, dir), 0755)
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -151,7 +151,7 @@ func main() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 3. 自动迁移表
|
// 3. 自动迁移表
|
||||||
db.AutoMigrate(&model.DatabaseInfo{}, &model.SubTableInfo{}, &model.ModelInfo{}, &model.KnowledgeBase{}, &model.KnowledgeDocument{}, &model.User{}, &model.Role{}, &model.Tool{})
|
db.AutoMigrate(&model.DatabaseInfo{}, &model.SubTableInfo{}, &model.ModelInfo{}, &model.KnowledgeBase{}, &model.KnowledgeDocument{}, &model.User{}, &model.Role{}, &model.Tool{}, &model.MCP{})
|
||||||
|
|
||||||
// 3.1 确保 users 和 roles 表存在(使用 SQL 强制创建)
|
// 3.1 确保 users 和 roles 表存在(使用 SQL 强制创建)
|
||||||
db.Exec(`
|
db.Exec(`
|
||||||
@@ -209,6 +209,22 @@ func main() {
|
|||||||
if !migrator.HasColumn(&model.Tool{}, "parameters") {
|
if !migrator.HasColumn(&model.Tool{}, "parameters") {
|
||||||
migrator.AddColumn(&model.Tool{}, "parameters")
|
migrator.AddColumn(&model.Tool{}, "parameters")
|
||||||
}
|
}
|
||||||
|
if !migrator.HasColumn(&model.Tool{}, "description_cn") {
|
||||||
|
migrator.AddColumn(&model.Tool{}, "description_cn")
|
||||||
|
}
|
||||||
|
// MCP 相关字段
|
||||||
|
if !migrator.HasColumn(&model.Tool{}, "transport") {
|
||||||
|
migrator.AddColumn(&model.Tool{}, "transport")
|
||||||
|
}
|
||||||
|
if !migrator.HasColumn(&model.Tool{}, "command") {
|
||||||
|
migrator.AddColumn(&model.Tool{}, "command")
|
||||||
|
}
|
||||||
|
if !migrator.HasColumn(&model.Tool{}, "args") {
|
||||||
|
migrator.AddColumn(&model.Tool{}, "args")
|
||||||
|
}
|
||||||
|
if !migrator.HasColumn(&model.Tool{}, "env") {
|
||||||
|
migrator.AddColumn(&model.Tool{}, "env")
|
||||||
|
}
|
||||||
|
|
||||||
log.Println("Database tables verified/created")
|
log.Println("Database tables verified/created")
|
||||||
|
|
||||||
@@ -219,6 +235,7 @@ func main() {
|
|||||||
knowledgeRepo := repository.NewKnowledgeRepository(db)
|
knowledgeRepo := repository.NewKnowledgeRepository(db)
|
||||||
userRepo := repository.NewUserRepository(db)
|
userRepo := repository.NewUserRepository(db)
|
||||||
toolRepo := repository.NewToolRepository(db)
|
toolRepo := repository.NewToolRepository(db)
|
||||||
|
mcpRepo := repository.NewMCPRepository(db)
|
||||||
|
|
||||||
// 4.1 初始化默认管理员用户
|
// 4.1 初始化默认管理员用户
|
||||||
initDefaultAdmin(userRepo)
|
initDefaultAdmin(userRepo)
|
||||||
@@ -235,6 +252,7 @@ func main() {
|
|||||||
knowledgeService := service.NewKnowledgeService(knowledgeRepo, modelRepo, uploadService, cfg.PythonServiceURL, cfg.AICoreServiceAddr, cfg.MarkdownLocalPath)
|
knowledgeService := service.NewKnowledgeService(knowledgeRepo, modelRepo, uploadService, cfg.PythonServiceURL, cfg.AICoreServiceAddr, cfg.MarkdownLocalPath)
|
||||||
authService := service.NewAuthService(cfg.JWTSecret, userRepo)
|
authService := service.NewAuthService(cfg.JWTSecret, userRepo)
|
||||||
toolService := service.NewToolService(toolRepo)
|
toolService := service.NewToolService(toolRepo)
|
||||||
|
mcpService := service.NewMCPService(mcpRepo)
|
||||||
|
|
||||||
// 4.2 初始化默认工具
|
// 4.2 初始化默认工具
|
||||||
if err := toolService.InitDefaultTools(); err != nil {
|
if err := toolService.InitDefaultTools(); err != nil {
|
||||||
@@ -252,6 +270,7 @@ func main() {
|
|||||||
knowledgeHandler := handler.NewKnowledgeHandler(knowledgeService)
|
knowledgeHandler := handler.NewKnowledgeHandler(knowledgeService)
|
||||||
authHandler := handler.NewAuthHandler(authService)
|
authHandler := handler.NewAuthHandler(authService)
|
||||||
toolHandler := handler.NewToolHandler(toolService)
|
toolHandler := handler.NewToolHandler(toolService)
|
||||||
|
mcpHandler := handler.NewMCPHandler(mcpService)
|
||||||
var uploadHandler *handler.UploadHandler
|
var uploadHandler *handler.UploadHandler
|
||||||
if uploadService != nil {
|
if uploadService != nil {
|
||||||
uploadHandler = handler.NewUploadHandler(uploadService, knowledgeRepo)
|
uploadHandler = handler.NewUploadHandler(uploadService, knowledgeRepo)
|
||||||
@@ -396,6 +415,16 @@ func main() {
|
|||||||
toolGroup.DELETE("/:id", toolHandler.Delete)
|
toolGroup.DELETE("/:id", toolHandler.Delete)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// MCP管理模块
|
||||||
|
mcpGroup := r.Group("/mcp")
|
||||||
|
{
|
||||||
|
mcpGroup.GET("/list", mcpHandler.List)
|
||||||
|
mcpGroup.GET("/:id", mcpHandler.GetByID)
|
||||||
|
mcpGroup.POST("/add", mcpHandler.Create)
|
||||||
|
mcpGroup.PUT("/:id", mcpHandler.Update)
|
||||||
|
mcpGroup.DELETE("/:id", mcpHandler.Delete)
|
||||||
|
}
|
||||||
|
|
||||||
// Swagger 文档
|
// Swagger 文档
|
||||||
r.GET("/swagger/*any", ginSwagger.WrapHandler(swaggerFiles.Handler))
|
r.GET("/swagger/*any", ginSwagger.WrapHandler(swaggerFiles.Handler))
|
||||||
|
|
||||||
|
|||||||
@@ -1166,6 +1166,177 @@ const docTemplate = `{
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"/mcp/add": {
|
||||||
|
"post": {
|
||||||
|
"description": "创建新的MCP工具配置",
|
||||||
|
"consumes": [
|
||||||
|
"application/json"
|
||||||
|
],
|
||||||
|
"produces": [
|
||||||
|
"application/json"
|
||||||
|
],
|
||||||
|
"tags": [
|
||||||
|
"MCP管理"
|
||||||
|
],
|
||||||
|
"summary": "创建MCP",
|
||||||
|
"parameters": [
|
||||||
|
{
|
||||||
|
"description": "MCP信息",
|
||||||
|
"name": "mcp",
|
||||||
|
"in": "body",
|
||||||
|
"required": true,
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/definitions/model.MCP"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"responses": {
|
||||||
|
"200": {
|
||||||
|
"description": "OK",
|
||||||
|
"schema": {
|
||||||
|
"type": "object",
|
||||||
|
"additionalProperties": true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"/mcp/list": {
|
||||||
|
"get": {
|
||||||
|
"description": "获取所有MCP工具配置",
|
||||||
|
"consumes": [
|
||||||
|
"application/json"
|
||||||
|
],
|
||||||
|
"produces": [
|
||||||
|
"application/json"
|
||||||
|
],
|
||||||
|
"tags": [
|
||||||
|
"MCP管理"
|
||||||
|
],
|
||||||
|
"summary": "获取MCP列表",
|
||||||
|
"parameters": [
|
||||||
|
{
|
||||||
|
"type": "string",
|
||||||
|
"description": "分类",
|
||||||
|
"name": "category",
|
||||||
|
"in": "query"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"responses": {
|
||||||
|
"200": {
|
||||||
|
"description": "OK",
|
||||||
|
"schema": {
|
||||||
|
"type": "object",
|
||||||
|
"additionalProperties": true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"/mcp/{id}": {
|
||||||
|
"get": {
|
||||||
|
"description": "根据ID获取MCP配置",
|
||||||
|
"consumes": [
|
||||||
|
"application/json"
|
||||||
|
],
|
||||||
|
"produces": [
|
||||||
|
"application/json"
|
||||||
|
],
|
||||||
|
"tags": [
|
||||||
|
"MCP管理"
|
||||||
|
],
|
||||||
|
"summary": "获取MCP详情",
|
||||||
|
"parameters": [
|
||||||
|
{
|
||||||
|
"type": "string",
|
||||||
|
"description": "MCP ID",
|
||||||
|
"name": "id",
|
||||||
|
"in": "path",
|
||||||
|
"required": true
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"responses": {
|
||||||
|
"200": {
|
||||||
|
"description": "OK",
|
||||||
|
"schema": {
|
||||||
|
"type": "object",
|
||||||
|
"additionalProperties": true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"put": {
|
||||||
|
"description": "更新MCP配置",
|
||||||
|
"consumes": [
|
||||||
|
"application/json"
|
||||||
|
],
|
||||||
|
"produces": [
|
||||||
|
"application/json"
|
||||||
|
],
|
||||||
|
"tags": [
|
||||||
|
"MCP管理"
|
||||||
|
],
|
||||||
|
"summary": "更新MCP",
|
||||||
|
"parameters": [
|
||||||
|
{
|
||||||
|
"type": "string",
|
||||||
|
"description": "MCP ID",
|
||||||
|
"name": "id",
|
||||||
|
"in": "path",
|
||||||
|
"required": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"description": "MCP信息",
|
||||||
|
"name": "mcp",
|
||||||
|
"in": "body",
|
||||||
|
"required": true,
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/definitions/model.MCP"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"responses": {
|
||||||
|
"200": {
|
||||||
|
"description": "OK",
|
||||||
|
"schema": {
|
||||||
|
"type": "object",
|
||||||
|
"additionalProperties": true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"delete": {
|
||||||
|
"description": "删除MCP配置",
|
||||||
|
"consumes": [
|
||||||
|
"application/json"
|
||||||
|
],
|
||||||
|
"produces": [
|
||||||
|
"application/json"
|
||||||
|
],
|
||||||
|
"tags": [
|
||||||
|
"MCP管理"
|
||||||
|
],
|
||||||
|
"summary": "删除MCP",
|
||||||
|
"parameters": [
|
||||||
|
{
|
||||||
|
"type": "string",
|
||||||
|
"description": "MCP ID",
|
||||||
|
"name": "id",
|
||||||
|
"in": "path",
|
||||||
|
"required": true
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"responses": {
|
||||||
|
"200": {
|
||||||
|
"description": "OK",
|
||||||
|
"schema": {
|
||||||
|
"type": "object",
|
||||||
|
"additionalProperties": true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
"/model/add": {
|
"/model/add": {
|
||||||
"post": {
|
"post": {
|
||||||
"description": "添加新的AI模型配置",
|
"description": "添加新的AI模型配置",
|
||||||
@@ -2007,6 +2178,292 @@ const docTemplate = `{
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"/tool/add": {
|
||||||
|
"post": {
|
||||||
|
"description": "创建新的工具",
|
||||||
|
"consumes": [
|
||||||
|
"application/json"
|
||||||
|
],
|
||||||
|
"produces": [
|
||||||
|
"application/json"
|
||||||
|
],
|
||||||
|
"tags": [
|
||||||
|
"工具管理"
|
||||||
|
],
|
||||||
|
"summary": "创建工具",
|
||||||
|
"parameters": [
|
||||||
|
{
|
||||||
|
"description": "工具信息",
|
||||||
|
"name": "tool",
|
||||||
|
"in": "body",
|
||||||
|
"required": true,
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/definitions/model.Tool"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"responses": {
|
||||||
|
"200": {
|
||||||
|
"description": "OK",
|
||||||
|
"schema": {
|
||||||
|
"type": "object",
|
||||||
|
"additionalProperties": true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"/tool/list": {
|
||||||
|
"get": {
|
||||||
|
"description": "获取所有工具列表,支持按分类和状态筛选",
|
||||||
|
"consumes": [
|
||||||
|
"application/json"
|
||||||
|
],
|
||||||
|
"produces": [
|
||||||
|
"application/json"
|
||||||
|
],
|
||||||
|
"tags": [
|
||||||
|
"工具管理"
|
||||||
|
],
|
||||||
|
"summary": "获取工具列表",
|
||||||
|
"parameters": [
|
||||||
|
{
|
||||||
|
"type": "string",
|
||||||
|
"description": "工具分类",
|
||||||
|
"name": "category",
|
||||||
|
"in": "query"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "string",
|
||||||
|
"description": "工具状态",
|
||||||
|
"name": "status",
|
||||||
|
"in": "query"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"responses": {
|
||||||
|
"200": {
|
||||||
|
"description": "OK",
|
||||||
|
"schema": {
|
||||||
|
"type": "object",
|
||||||
|
"additionalProperties": true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"/tool/sync": {
|
||||||
|
"get": {
|
||||||
|
"description": "从代码中的默认配置同步工具到数据库",
|
||||||
|
"consumes": [
|
||||||
|
"application/json"
|
||||||
|
],
|
||||||
|
"produces": [
|
||||||
|
"application/json"
|
||||||
|
],
|
||||||
|
"tags": [
|
||||||
|
"工具管理"
|
||||||
|
],
|
||||||
|
"summary": "手动同步工具",
|
||||||
|
"responses": {
|
||||||
|
"200": {
|
||||||
|
"description": "OK",
|
||||||
|
"schema": {
|
||||||
|
"type": "object",
|
||||||
|
"additionalProperties": true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"/tool/{id}": {
|
||||||
|
"get": {
|
||||||
|
"description": "根据ID获取工具详情",
|
||||||
|
"consumes": [
|
||||||
|
"application/json"
|
||||||
|
],
|
||||||
|
"produces": [
|
||||||
|
"application/json"
|
||||||
|
],
|
||||||
|
"tags": [
|
||||||
|
"工具管理"
|
||||||
|
],
|
||||||
|
"summary": "获取工具详情",
|
||||||
|
"parameters": [
|
||||||
|
{
|
||||||
|
"type": "string",
|
||||||
|
"description": "工具ID",
|
||||||
|
"name": "id",
|
||||||
|
"in": "path",
|
||||||
|
"required": true
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"responses": {
|
||||||
|
"200": {
|
||||||
|
"description": "OK",
|
||||||
|
"schema": {
|
||||||
|
"type": "object",
|
||||||
|
"additionalProperties": true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"put": {
|
||||||
|
"description": "更新工具信息",
|
||||||
|
"consumes": [
|
||||||
|
"application/json"
|
||||||
|
],
|
||||||
|
"produces": [
|
||||||
|
"application/json"
|
||||||
|
],
|
||||||
|
"tags": [
|
||||||
|
"工具管理"
|
||||||
|
],
|
||||||
|
"summary": "更新工具",
|
||||||
|
"parameters": [
|
||||||
|
{
|
||||||
|
"type": "string",
|
||||||
|
"description": "工具ID",
|
||||||
|
"name": "id",
|
||||||
|
"in": "path",
|
||||||
|
"required": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"description": "工具信息",
|
||||||
|
"name": "tool",
|
||||||
|
"in": "body",
|
||||||
|
"required": true,
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/definitions/model.Tool"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"responses": {
|
||||||
|
"200": {
|
||||||
|
"description": "OK",
|
||||||
|
"schema": {
|
||||||
|
"type": "object",
|
||||||
|
"additionalProperties": true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"delete": {
|
||||||
|
"description": "删除工具",
|
||||||
|
"consumes": [
|
||||||
|
"application/json"
|
||||||
|
],
|
||||||
|
"produces": [
|
||||||
|
"application/json"
|
||||||
|
],
|
||||||
|
"tags": [
|
||||||
|
"工具管理"
|
||||||
|
],
|
||||||
|
"summary": "删除工具",
|
||||||
|
"parameters": [
|
||||||
|
{
|
||||||
|
"type": "string",
|
||||||
|
"description": "工具ID",
|
||||||
|
"name": "id",
|
||||||
|
"in": "path",
|
||||||
|
"required": true
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"responses": {
|
||||||
|
"200": {
|
||||||
|
"description": "OK",
|
||||||
|
"schema": {
|
||||||
|
"type": "object",
|
||||||
|
"additionalProperties": true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"/user/list": {
|
||||||
|
"get": {
|
||||||
|
"security": [
|
||||||
|
{
|
||||||
|
"BearerAuth": []
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"description": "获取所有用户列表(需要管理员权限)",
|
||||||
|
"consumes": [
|
||||||
|
"application/json"
|
||||||
|
],
|
||||||
|
"produces": [
|
||||||
|
"application/json"
|
||||||
|
],
|
||||||
|
"tags": [
|
||||||
|
"用户管理"
|
||||||
|
],
|
||||||
|
"summary": "获取所有用户",
|
||||||
|
"responses": {
|
||||||
|
"200": {
|
||||||
|
"description": "OK",
|
||||||
|
"schema": {
|
||||||
|
"type": "object",
|
||||||
|
"additionalProperties": true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"401": {
|
||||||
|
"description": "Unauthorized",
|
||||||
|
"schema": {
|
||||||
|
"type": "object",
|
||||||
|
"additionalProperties": {
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"/user/{id}": {
|
||||||
|
"get": {
|
||||||
|
"security": [
|
||||||
|
{
|
||||||
|
"BearerAuth": []
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"description": "根据ID获取用户详情",
|
||||||
|
"consumes": [
|
||||||
|
"application/json"
|
||||||
|
],
|
||||||
|
"produces": [
|
||||||
|
"application/json"
|
||||||
|
],
|
||||||
|
"tags": [
|
||||||
|
"用户管理"
|
||||||
|
],
|
||||||
|
"summary": "获取用户详情",
|
||||||
|
"parameters": [
|
||||||
|
{
|
||||||
|
"type": "string",
|
||||||
|
"description": "用户ID",
|
||||||
|
"name": "id",
|
||||||
|
"in": "path",
|
||||||
|
"required": true
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"responses": {
|
||||||
|
"200": {
|
||||||
|
"description": "OK",
|
||||||
|
"schema": {
|
||||||
|
"type": "object",
|
||||||
|
"additionalProperties": true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"404": {
|
||||||
|
"description": "Not Found",
|
||||||
|
"schema": {
|
||||||
|
"type": "object",
|
||||||
|
"additionalProperties": {
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"definitions": {
|
"definitions": {
|
||||||
@@ -2363,6 +2820,54 @@ const docTemplate = `{
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"model.MCP": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"args": {
|
||||||
|
"description": "参数,JSON数组格式",
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"category": {
|
||||||
|
"description": "分类",
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"command": {
|
||||||
|
"description": "启动命令",
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"created_at": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"description": {
|
||||||
|
"description": "英文描述",
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"description_cn": {
|
||||||
|
"description": "中文描述",
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"env": {
|
||||||
|
"description": "环境变量,JSON对象格式",
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"id": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"name": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"status": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"transport": {
|
||||||
|
"description": "stdio, http, sse",
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"updated_at": {
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
"model.MemoryInfo": {
|
"model.MemoryInfo": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"properties": {
|
"properties": {
|
||||||
@@ -2772,6 +3277,67 @@ const docTemplate = `{
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"model.Tool": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"args": {
|
||||||
|
"description": "参数,JSON数组格式",
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"category": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"command": {
|
||||||
|
"description": "启动命令",
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"created_at": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"description": {
|
||||||
|
"description": "英文描述",
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"description_cn": {
|
||||||
|
"description": "中文描述",
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"env": {
|
||||||
|
"description": "环境变量,JSON对象格式",
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"id": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"name": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"parameters": {
|
||||||
|
"description": "JSON格式存储",
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"provider": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"require_approval": {
|
||||||
|
"type": "boolean"
|
||||||
|
},
|
||||||
|
"security_level": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"status": {
|
||||||
|
"description": "状态",
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"transport": {
|
||||||
|
"description": "MCP 特有字段",
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"updated_at": {
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
"model.UpdateDatabaseRequest": {
|
"model.UpdateDatabaseRequest": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"properties": {
|
"properties": {
|
||||||
|
|||||||
@@ -1155,6 +1155,177 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"/mcp/add": {
|
||||||
|
"post": {
|
||||||
|
"description": "创建新的MCP工具配置",
|
||||||
|
"consumes": [
|
||||||
|
"application/json"
|
||||||
|
],
|
||||||
|
"produces": [
|
||||||
|
"application/json"
|
||||||
|
],
|
||||||
|
"tags": [
|
||||||
|
"MCP管理"
|
||||||
|
],
|
||||||
|
"summary": "创建MCP",
|
||||||
|
"parameters": [
|
||||||
|
{
|
||||||
|
"description": "MCP信息",
|
||||||
|
"name": "mcp",
|
||||||
|
"in": "body",
|
||||||
|
"required": true,
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/definitions/model.MCP"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"responses": {
|
||||||
|
"200": {
|
||||||
|
"description": "OK",
|
||||||
|
"schema": {
|
||||||
|
"type": "object",
|
||||||
|
"additionalProperties": true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"/mcp/list": {
|
||||||
|
"get": {
|
||||||
|
"description": "获取所有MCP工具配置",
|
||||||
|
"consumes": [
|
||||||
|
"application/json"
|
||||||
|
],
|
||||||
|
"produces": [
|
||||||
|
"application/json"
|
||||||
|
],
|
||||||
|
"tags": [
|
||||||
|
"MCP管理"
|
||||||
|
],
|
||||||
|
"summary": "获取MCP列表",
|
||||||
|
"parameters": [
|
||||||
|
{
|
||||||
|
"type": "string",
|
||||||
|
"description": "分类",
|
||||||
|
"name": "category",
|
||||||
|
"in": "query"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"responses": {
|
||||||
|
"200": {
|
||||||
|
"description": "OK",
|
||||||
|
"schema": {
|
||||||
|
"type": "object",
|
||||||
|
"additionalProperties": true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"/mcp/{id}": {
|
||||||
|
"get": {
|
||||||
|
"description": "根据ID获取MCP配置",
|
||||||
|
"consumes": [
|
||||||
|
"application/json"
|
||||||
|
],
|
||||||
|
"produces": [
|
||||||
|
"application/json"
|
||||||
|
],
|
||||||
|
"tags": [
|
||||||
|
"MCP管理"
|
||||||
|
],
|
||||||
|
"summary": "获取MCP详情",
|
||||||
|
"parameters": [
|
||||||
|
{
|
||||||
|
"type": "string",
|
||||||
|
"description": "MCP ID",
|
||||||
|
"name": "id",
|
||||||
|
"in": "path",
|
||||||
|
"required": true
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"responses": {
|
||||||
|
"200": {
|
||||||
|
"description": "OK",
|
||||||
|
"schema": {
|
||||||
|
"type": "object",
|
||||||
|
"additionalProperties": true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"put": {
|
||||||
|
"description": "更新MCP配置",
|
||||||
|
"consumes": [
|
||||||
|
"application/json"
|
||||||
|
],
|
||||||
|
"produces": [
|
||||||
|
"application/json"
|
||||||
|
],
|
||||||
|
"tags": [
|
||||||
|
"MCP管理"
|
||||||
|
],
|
||||||
|
"summary": "更新MCP",
|
||||||
|
"parameters": [
|
||||||
|
{
|
||||||
|
"type": "string",
|
||||||
|
"description": "MCP ID",
|
||||||
|
"name": "id",
|
||||||
|
"in": "path",
|
||||||
|
"required": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"description": "MCP信息",
|
||||||
|
"name": "mcp",
|
||||||
|
"in": "body",
|
||||||
|
"required": true,
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/definitions/model.MCP"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"responses": {
|
||||||
|
"200": {
|
||||||
|
"description": "OK",
|
||||||
|
"schema": {
|
||||||
|
"type": "object",
|
||||||
|
"additionalProperties": true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"delete": {
|
||||||
|
"description": "删除MCP配置",
|
||||||
|
"consumes": [
|
||||||
|
"application/json"
|
||||||
|
],
|
||||||
|
"produces": [
|
||||||
|
"application/json"
|
||||||
|
],
|
||||||
|
"tags": [
|
||||||
|
"MCP管理"
|
||||||
|
],
|
||||||
|
"summary": "删除MCP",
|
||||||
|
"parameters": [
|
||||||
|
{
|
||||||
|
"type": "string",
|
||||||
|
"description": "MCP ID",
|
||||||
|
"name": "id",
|
||||||
|
"in": "path",
|
||||||
|
"required": true
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"responses": {
|
||||||
|
"200": {
|
||||||
|
"description": "OK",
|
||||||
|
"schema": {
|
||||||
|
"type": "object",
|
||||||
|
"additionalProperties": true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
"/model/add": {
|
"/model/add": {
|
||||||
"post": {
|
"post": {
|
||||||
"description": "添加新的AI模型配置",
|
"description": "添加新的AI模型配置",
|
||||||
@@ -1996,6 +2167,292 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"/tool/add": {
|
||||||
|
"post": {
|
||||||
|
"description": "创建新的工具",
|
||||||
|
"consumes": [
|
||||||
|
"application/json"
|
||||||
|
],
|
||||||
|
"produces": [
|
||||||
|
"application/json"
|
||||||
|
],
|
||||||
|
"tags": [
|
||||||
|
"工具管理"
|
||||||
|
],
|
||||||
|
"summary": "创建工具",
|
||||||
|
"parameters": [
|
||||||
|
{
|
||||||
|
"description": "工具信息",
|
||||||
|
"name": "tool",
|
||||||
|
"in": "body",
|
||||||
|
"required": true,
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/definitions/model.Tool"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"responses": {
|
||||||
|
"200": {
|
||||||
|
"description": "OK",
|
||||||
|
"schema": {
|
||||||
|
"type": "object",
|
||||||
|
"additionalProperties": true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"/tool/list": {
|
||||||
|
"get": {
|
||||||
|
"description": "获取所有工具列表,支持按分类和状态筛选",
|
||||||
|
"consumes": [
|
||||||
|
"application/json"
|
||||||
|
],
|
||||||
|
"produces": [
|
||||||
|
"application/json"
|
||||||
|
],
|
||||||
|
"tags": [
|
||||||
|
"工具管理"
|
||||||
|
],
|
||||||
|
"summary": "获取工具列表",
|
||||||
|
"parameters": [
|
||||||
|
{
|
||||||
|
"type": "string",
|
||||||
|
"description": "工具分类",
|
||||||
|
"name": "category",
|
||||||
|
"in": "query"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "string",
|
||||||
|
"description": "工具状态",
|
||||||
|
"name": "status",
|
||||||
|
"in": "query"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"responses": {
|
||||||
|
"200": {
|
||||||
|
"description": "OK",
|
||||||
|
"schema": {
|
||||||
|
"type": "object",
|
||||||
|
"additionalProperties": true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"/tool/sync": {
|
||||||
|
"get": {
|
||||||
|
"description": "从代码中的默认配置同步工具到数据库",
|
||||||
|
"consumes": [
|
||||||
|
"application/json"
|
||||||
|
],
|
||||||
|
"produces": [
|
||||||
|
"application/json"
|
||||||
|
],
|
||||||
|
"tags": [
|
||||||
|
"工具管理"
|
||||||
|
],
|
||||||
|
"summary": "手动同步工具",
|
||||||
|
"responses": {
|
||||||
|
"200": {
|
||||||
|
"description": "OK",
|
||||||
|
"schema": {
|
||||||
|
"type": "object",
|
||||||
|
"additionalProperties": true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"/tool/{id}": {
|
||||||
|
"get": {
|
||||||
|
"description": "根据ID获取工具详情",
|
||||||
|
"consumes": [
|
||||||
|
"application/json"
|
||||||
|
],
|
||||||
|
"produces": [
|
||||||
|
"application/json"
|
||||||
|
],
|
||||||
|
"tags": [
|
||||||
|
"工具管理"
|
||||||
|
],
|
||||||
|
"summary": "获取工具详情",
|
||||||
|
"parameters": [
|
||||||
|
{
|
||||||
|
"type": "string",
|
||||||
|
"description": "工具ID",
|
||||||
|
"name": "id",
|
||||||
|
"in": "path",
|
||||||
|
"required": true
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"responses": {
|
||||||
|
"200": {
|
||||||
|
"description": "OK",
|
||||||
|
"schema": {
|
||||||
|
"type": "object",
|
||||||
|
"additionalProperties": true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"put": {
|
||||||
|
"description": "更新工具信息",
|
||||||
|
"consumes": [
|
||||||
|
"application/json"
|
||||||
|
],
|
||||||
|
"produces": [
|
||||||
|
"application/json"
|
||||||
|
],
|
||||||
|
"tags": [
|
||||||
|
"工具管理"
|
||||||
|
],
|
||||||
|
"summary": "更新工具",
|
||||||
|
"parameters": [
|
||||||
|
{
|
||||||
|
"type": "string",
|
||||||
|
"description": "工具ID",
|
||||||
|
"name": "id",
|
||||||
|
"in": "path",
|
||||||
|
"required": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"description": "工具信息",
|
||||||
|
"name": "tool",
|
||||||
|
"in": "body",
|
||||||
|
"required": true,
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/definitions/model.Tool"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"responses": {
|
||||||
|
"200": {
|
||||||
|
"description": "OK",
|
||||||
|
"schema": {
|
||||||
|
"type": "object",
|
||||||
|
"additionalProperties": true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"delete": {
|
||||||
|
"description": "删除工具",
|
||||||
|
"consumes": [
|
||||||
|
"application/json"
|
||||||
|
],
|
||||||
|
"produces": [
|
||||||
|
"application/json"
|
||||||
|
],
|
||||||
|
"tags": [
|
||||||
|
"工具管理"
|
||||||
|
],
|
||||||
|
"summary": "删除工具",
|
||||||
|
"parameters": [
|
||||||
|
{
|
||||||
|
"type": "string",
|
||||||
|
"description": "工具ID",
|
||||||
|
"name": "id",
|
||||||
|
"in": "path",
|
||||||
|
"required": true
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"responses": {
|
||||||
|
"200": {
|
||||||
|
"description": "OK",
|
||||||
|
"schema": {
|
||||||
|
"type": "object",
|
||||||
|
"additionalProperties": true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"/user/list": {
|
||||||
|
"get": {
|
||||||
|
"security": [
|
||||||
|
{
|
||||||
|
"BearerAuth": []
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"description": "获取所有用户列表(需要管理员权限)",
|
||||||
|
"consumes": [
|
||||||
|
"application/json"
|
||||||
|
],
|
||||||
|
"produces": [
|
||||||
|
"application/json"
|
||||||
|
],
|
||||||
|
"tags": [
|
||||||
|
"用户管理"
|
||||||
|
],
|
||||||
|
"summary": "获取所有用户",
|
||||||
|
"responses": {
|
||||||
|
"200": {
|
||||||
|
"description": "OK",
|
||||||
|
"schema": {
|
||||||
|
"type": "object",
|
||||||
|
"additionalProperties": true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"401": {
|
||||||
|
"description": "Unauthorized",
|
||||||
|
"schema": {
|
||||||
|
"type": "object",
|
||||||
|
"additionalProperties": {
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"/user/{id}": {
|
||||||
|
"get": {
|
||||||
|
"security": [
|
||||||
|
{
|
||||||
|
"BearerAuth": []
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"description": "根据ID获取用户详情",
|
||||||
|
"consumes": [
|
||||||
|
"application/json"
|
||||||
|
],
|
||||||
|
"produces": [
|
||||||
|
"application/json"
|
||||||
|
],
|
||||||
|
"tags": [
|
||||||
|
"用户管理"
|
||||||
|
],
|
||||||
|
"summary": "获取用户详情",
|
||||||
|
"parameters": [
|
||||||
|
{
|
||||||
|
"type": "string",
|
||||||
|
"description": "用户ID",
|
||||||
|
"name": "id",
|
||||||
|
"in": "path",
|
||||||
|
"required": true
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"responses": {
|
||||||
|
"200": {
|
||||||
|
"description": "OK",
|
||||||
|
"schema": {
|
||||||
|
"type": "object",
|
||||||
|
"additionalProperties": true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"404": {
|
||||||
|
"description": "Not Found",
|
||||||
|
"schema": {
|
||||||
|
"type": "object",
|
||||||
|
"additionalProperties": {
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"definitions": {
|
"definitions": {
|
||||||
@@ -2352,6 +2809,54 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"model.MCP": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"args": {
|
||||||
|
"description": "参数,JSON数组格式",
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"category": {
|
||||||
|
"description": "分类",
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"command": {
|
||||||
|
"description": "启动命令",
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"created_at": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"description": {
|
||||||
|
"description": "英文描述",
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"description_cn": {
|
||||||
|
"description": "中文描述",
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"env": {
|
||||||
|
"description": "环境变量,JSON对象格式",
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"id": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"name": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"status": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"transport": {
|
||||||
|
"description": "stdio, http, sse",
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"updated_at": {
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
"model.MemoryInfo": {
|
"model.MemoryInfo": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"properties": {
|
"properties": {
|
||||||
@@ -2761,6 +3266,67 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"model.Tool": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"args": {
|
||||||
|
"description": "参数,JSON数组格式",
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"category": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"command": {
|
||||||
|
"description": "启动命令",
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"created_at": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"description": {
|
||||||
|
"description": "英文描述",
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"description_cn": {
|
||||||
|
"description": "中文描述",
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"env": {
|
||||||
|
"description": "环境变量,JSON对象格式",
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"id": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"name": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"parameters": {
|
||||||
|
"description": "JSON格式存储",
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"provider": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"require_approval": {
|
||||||
|
"type": "boolean"
|
||||||
|
},
|
||||||
|
"security_level": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"status": {
|
||||||
|
"description": "状态",
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"transport": {
|
||||||
|
"description": "MCP 特有字段",
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"updated_at": {
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
"model.UpdateDatabaseRequest": {
|
"model.UpdateDatabaseRequest": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"properties": {
|
"properties": {
|
||||||
|
|||||||
@@ -245,6 +245,40 @@ definitions:
|
|||||||
description: 中文映射名
|
description: 中文映射名
|
||||||
type: string
|
type: string
|
||||||
type: object
|
type: object
|
||||||
|
model.MCP:
|
||||||
|
properties:
|
||||||
|
args:
|
||||||
|
description: 参数,JSON数组格式
|
||||||
|
type: string
|
||||||
|
category:
|
||||||
|
description: 分类
|
||||||
|
type: string
|
||||||
|
command:
|
||||||
|
description: 启动命令
|
||||||
|
type: string
|
||||||
|
created_at:
|
||||||
|
type: string
|
||||||
|
description:
|
||||||
|
description: 英文描述
|
||||||
|
type: string
|
||||||
|
description_cn:
|
||||||
|
description: 中文描述
|
||||||
|
type: string
|
||||||
|
env:
|
||||||
|
description: 环境变量,JSON对象格式
|
||||||
|
type: string
|
||||||
|
id:
|
||||||
|
type: string
|
||||||
|
name:
|
||||||
|
type: string
|
||||||
|
status:
|
||||||
|
type: string
|
||||||
|
transport:
|
||||||
|
description: stdio, http, sse
|
||||||
|
type: string
|
||||||
|
updated_at:
|
||||||
|
type: string
|
||||||
|
type: object
|
||||||
model.MemoryInfo:
|
model.MemoryInfo:
|
||||||
properties:
|
properties:
|
||||||
available:
|
available:
|
||||||
@@ -536,6 +570,49 @@ definitions:
|
|||||||
- model_type
|
- model_type
|
||||||
- provider
|
- provider
|
||||||
type: object
|
type: object
|
||||||
|
model.Tool:
|
||||||
|
properties:
|
||||||
|
args:
|
||||||
|
description: 参数,JSON数组格式
|
||||||
|
type: string
|
||||||
|
category:
|
||||||
|
type: string
|
||||||
|
command:
|
||||||
|
description: 启动命令
|
||||||
|
type: string
|
||||||
|
created_at:
|
||||||
|
type: string
|
||||||
|
description:
|
||||||
|
description: 英文描述
|
||||||
|
type: string
|
||||||
|
description_cn:
|
||||||
|
description: 中文描述
|
||||||
|
type: string
|
||||||
|
env:
|
||||||
|
description: 环境变量,JSON对象格式
|
||||||
|
type: string
|
||||||
|
id:
|
||||||
|
type: string
|
||||||
|
name:
|
||||||
|
type: string
|
||||||
|
parameters:
|
||||||
|
description: JSON格式存储
|
||||||
|
type: string
|
||||||
|
provider:
|
||||||
|
type: string
|
||||||
|
require_approval:
|
||||||
|
type: boolean
|
||||||
|
security_level:
|
||||||
|
type: string
|
||||||
|
status:
|
||||||
|
description: 状态
|
||||||
|
type: string
|
||||||
|
transport:
|
||||||
|
description: MCP 特有字段
|
||||||
|
type: string
|
||||||
|
updated_at:
|
||||||
|
type: string
|
||||||
|
type: object
|
||||||
model.UpdateDatabaseRequest:
|
model.UpdateDatabaseRequest:
|
||||||
properties:
|
properties:
|
||||||
charset:
|
charset:
|
||||||
@@ -1399,6 +1476,120 @@ paths:
|
|||||||
summary: 获取数据库列表
|
summary: 获取数据库列表
|
||||||
tags:
|
tags:
|
||||||
- 数据库管理
|
- 数据库管理
|
||||||
|
/mcp/{id}:
|
||||||
|
delete:
|
||||||
|
consumes:
|
||||||
|
- application/json
|
||||||
|
description: 删除MCP配置
|
||||||
|
parameters:
|
||||||
|
- description: MCP ID
|
||||||
|
in: path
|
||||||
|
name: id
|
||||||
|
required: true
|
||||||
|
type: string
|
||||||
|
produces:
|
||||||
|
- application/json
|
||||||
|
responses:
|
||||||
|
"200":
|
||||||
|
description: OK
|
||||||
|
schema:
|
||||||
|
additionalProperties: true
|
||||||
|
type: object
|
||||||
|
summary: 删除MCP
|
||||||
|
tags:
|
||||||
|
- MCP管理
|
||||||
|
get:
|
||||||
|
consumes:
|
||||||
|
- application/json
|
||||||
|
description: 根据ID获取MCP配置
|
||||||
|
parameters:
|
||||||
|
- description: MCP ID
|
||||||
|
in: path
|
||||||
|
name: id
|
||||||
|
required: true
|
||||||
|
type: string
|
||||||
|
produces:
|
||||||
|
- application/json
|
||||||
|
responses:
|
||||||
|
"200":
|
||||||
|
description: OK
|
||||||
|
schema:
|
||||||
|
additionalProperties: true
|
||||||
|
type: object
|
||||||
|
summary: 获取MCP详情
|
||||||
|
tags:
|
||||||
|
- MCP管理
|
||||||
|
put:
|
||||||
|
consumes:
|
||||||
|
- application/json
|
||||||
|
description: 更新MCP配置
|
||||||
|
parameters:
|
||||||
|
- description: MCP ID
|
||||||
|
in: path
|
||||||
|
name: id
|
||||||
|
required: true
|
||||||
|
type: string
|
||||||
|
- description: MCP信息
|
||||||
|
in: body
|
||||||
|
name: mcp
|
||||||
|
required: true
|
||||||
|
schema:
|
||||||
|
$ref: '#/definitions/model.MCP'
|
||||||
|
produces:
|
||||||
|
- application/json
|
||||||
|
responses:
|
||||||
|
"200":
|
||||||
|
description: OK
|
||||||
|
schema:
|
||||||
|
additionalProperties: true
|
||||||
|
type: object
|
||||||
|
summary: 更新MCP
|
||||||
|
tags:
|
||||||
|
- MCP管理
|
||||||
|
/mcp/add:
|
||||||
|
post:
|
||||||
|
consumes:
|
||||||
|
- application/json
|
||||||
|
description: 创建新的MCP工具配置
|
||||||
|
parameters:
|
||||||
|
- description: MCP信息
|
||||||
|
in: body
|
||||||
|
name: mcp
|
||||||
|
required: true
|
||||||
|
schema:
|
||||||
|
$ref: '#/definitions/model.MCP'
|
||||||
|
produces:
|
||||||
|
- application/json
|
||||||
|
responses:
|
||||||
|
"200":
|
||||||
|
description: OK
|
||||||
|
schema:
|
||||||
|
additionalProperties: true
|
||||||
|
type: object
|
||||||
|
summary: 创建MCP
|
||||||
|
tags:
|
||||||
|
- MCP管理
|
||||||
|
/mcp/list:
|
||||||
|
get:
|
||||||
|
consumes:
|
||||||
|
- application/json
|
||||||
|
description: 获取所有MCP工具配置
|
||||||
|
parameters:
|
||||||
|
- description: 分类
|
||||||
|
in: query
|
||||||
|
name: category
|
||||||
|
type: string
|
||||||
|
produces:
|
||||||
|
- application/json
|
||||||
|
responses:
|
||||||
|
"200":
|
||||||
|
description: OK
|
||||||
|
schema:
|
||||||
|
additionalProperties: true
|
||||||
|
type: object
|
||||||
|
summary: 获取MCP列表
|
||||||
|
tags:
|
||||||
|
- MCP管理
|
||||||
/model/{id}:
|
/model/{id}:
|
||||||
delete:
|
delete:
|
||||||
consumes:
|
consumes:
|
||||||
@@ -1957,4 +2148,192 @@ paths:
|
|||||||
summary: 获取系统信息
|
summary: 获取系统信息
|
||||||
tags:
|
tags:
|
||||||
- 系统
|
- 系统
|
||||||
|
/tool/{id}:
|
||||||
|
delete:
|
||||||
|
consumes:
|
||||||
|
- application/json
|
||||||
|
description: 删除工具
|
||||||
|
parameters:
|
||||||
|
- description: 工具ID
|
||||||
|
in: path
|
||||||
|
name: id
|
||||||
|
required: true
|
||||||
|
type: string
|
||||||
|
produces:
|
||||||
|
- application/json
|
||||||
|
responses:
|
||||||
|
"200":
|
||||||
|
description: OK
|
||||||
|
schema:
|
||||||
|
additionalProperties: true
|
||||||
|
type: object
|
||||||
|
summary: 删除工具
|
||||||
|
tags:
|
||||||
|
- 工具管理
|
||||||
|
get:
|
||||||
|
consumes:
|
||||||
|
- application/json
|
||||||
|
description: 根据ID获取工具详情
|
||||||
|
parameters:
|
||||||
|
- description: 工具ID
|
||||||
|
in: path
|
||||||
|
name: id
|
||||||
|
required: true
|
||||||
|
type: string
|
||||||
|
produces:
|
||||||
|
- application/json
|
||||||
|
responses:
|
||||||
|
"200":
|
||||||
|
description: OK
|
||||||
|
schema:
|
||||||
|
additionalProperties: true
|
||||||
|
type: object
|
||||||
|
summary: 获取工具详情
|
||||||
|
tags:
|
||||||
|
- 工具管理
|
||||||
|
put:
|
||||||
|
consumes:
|
||||||
|
- application/json
|
||||||
|
description: 更新工具信息
|
||||||
|
parameters:
|
||||||
|
- description: 工具ID
|
||||||
|
in: path
|
||||||
|
name: id
|
||||||
|
required: true
|
||||||
|
type: string
|
||||||
|
- description: 工具信息
|
||||||
|
in: body
|
||||||
|
name: tool
|
||||||
|
required: true
|
||||||
|
schema:
|
||||||
|
$ref: '#/definitions/model.Tool'
|
||||||
|
produces:
|
||||||
|
- application/json
|
||||||
|
responses:
|
||||||
|
"200":
|
||||||
|
description: OK
|
||||||
|
schema:
|
||||||
|
additionalProperties: true
|
||||||
|
type: object
|
||||||
|
summary: 更新工具
|
||||||
|
tags:
|
||||||
|
- 工具管理
|
||||||
|
/tool/add:
|
||||||
|
post:
|
||||||
|
consumes:
|
||||||
|
- application/json
|
||||||
|
description: 创建新的工具
|
||||||
|
parameters:
|
||||||
|
- description: 工具信息
|
||||||
|
in: body
|
||||||
|
name: tool
|
||||||
|
required: true
|
||||||
|
schema:
|
||||||
|
$ref: '#/definitions/model.Tool'
|
||||||
|
produces:
|
||||||
|
- application/json
|
||||||
|
responses:
|
||||||
|
"200":
|
||||||
|
description: OK
|
||||||
|
schema:
|
||||||
|
additionalProperties: true
|
||||||
|
type: object
|
||||||
|
summary: 创建工具
|
||||||
|
tags:
|
||||||
|
- 工具管理
|
||||||
|
/tool/list:
|
||||||
|
get:
|
||||||
|
consumes:
|
||||||
|
- application/json
|
||||||
|
description: 获取所有工具列表,支持按分类和状态筛选
|
||||||
|
parameters:
|
||||||
|
- description: 工具分类
|
||||||
|
in: query
|
||||||
|
name: category
|
||||||
|
type: string
|
||||||
|
- description: 工具状态
|
||||||
|
in: query
|
||||||
|
name: status
|
||||||
|
type: string
|
||||||
|
produces:
|
||||||
|
- application/json
|
||||||
|
responses:
|
||||||
|
"200":
|
||||||
|
description: OK
|
||||||
|
schema:
|
||||||
|
additionalProperties: true
|
||||||
|
type: object
|
||||||
|
summary: 获取工具列表
|
||||||
|
tags:
|
||||||
|
- 工具管理
|
||||||
|
/tool/sync:
|
||||||
|
get:
|
||||||
|
consumes:
|
||||||
|
- application/json
|
||||||
|
description: 从代码中的默认配置同步工具到数据库
|
||||||
|
produces:
|
||||||
|
- application/json
|
||||||
|
responses:
|
||||||
|
"200":
|
||||||
|
description: OK
|
||||||
|
schema:
|
||||||
|
additionalProperties: true
|
||||||
|
type: object
|
||||||
|
summary: 手动同步工具
|
||||||
|
tags:
|
||||||
|
- 工具管理
|
||||||
|
/user/{id}:
|
||||||
|
get:
|
||||||
|
consumes:
|
||||||
|
- application/json
|
||||||
|
description: 根据ID获取用户详情
|
||||||
|
parameters:
|
||||||
|
- description: 用户ID
|
||||||
|
in: path
|
||||||
|
name: id
|
||||||
|
required: true
|
||||||
|
type: string
|
||||||
|
produces:
|
||||||
|
- application/json
|
||||||
|
responses:
|
||||||
|
"200":
|
||||||
|
description: OK
|
||||||
|
schema:
|
||||||
|
additionalProperties: true
|
||||||
|
type: object
|
||||||
|
"404":
|
||||||
|
description: Not Found
|
||||||
|
schema:
|
||||||
|
additionalProperties:
|
||||||
|
type: string
|
||||||
|
type: object
|
||||||
|
security:
|
||||||
|
- BearerAuth: []
|
||||||
|
summary: 获取用户详情
|
||||||
|
tags:
|
||||||
|
- 用户管理
|
||||||
|
/user/list:
|
||||||
|
get:
|
||||||
|
consumes:
|
||||||
|
- application/json
|
||||||
|
description: 获取所有用户列表(需要管理员权限)
|
||||||
|
produces:
|
||||||
|
- application/json
|
||||||
|
responses:
|
||||||
|
"200":
|
||||||
|
description: OK
|
||||||
|
schema:
|
||||||
|
additionalProperties: true
|
||||||
|
type: object
|
||||||
|
"401":
|
||||||
|
description: Unauthorized
|
||||||
|
schema:
|
||||||
|
additionalProperties:
|
||||||
|
type: string
|
||||||
|
type: object
|
||||||
|
security:
|
||||||
|
- BearerAuth: []
|
||||||
|
summary: 获取所有用户
|
||||||
|
tags:
|
||||||
|
- 用户管理
|
||||||
swagger: "2.0"
|
swagger: "2.0"
|
||||||
|
|||||||
@@ -11,15 +11,22 @@ import (
|
|||||||
type Tool struct {
|
type Tool struct {
|
||||||
ID string `json:"id" gorm:"primaryKey"`
|
ID string `json:"id" gorm:"primaryKey"`
|
||||||
Name string `json:"name" gorm:"uniqueIndex;size:100;not null"`
|
Name string `json:"name" gorm:"uniqueIndex;size:100;not null"`
|
||||||
Description string `json:"description" gorm:"type:text"`
|
Description string `json:"description" gorm:"type:text"` // 英文描述
|
||||||
|
DescriptionCN string `json:"description_cn" gorm:"type:text"` // 中文描述
|
||||||
Category string `json:"category" gorm:"size:50;not null"`
|
Category string `json:"category" gorm:"size:50;not null"`
|
||||||
Provider string `json:"provider" gorm:"size:100"`
|
Provider string `json:"provider" gorm:"size:100"`
|
||||||
SecurityLevel string `json:"security_level" gorm:"size:20;default:'safe'"`
|
SecurityLevel string `json:"security_level" gorm:"size:20;default:'safe'"`
|
||||||
RequireApproval bool `json:"require_approval" gorm:"default:false"`
|
RequireApproval bool `json:"require_approval" gorm:"default:false"`
|
||||||
Parameters string `json:"parameters" gorm:"type:text"` // JSON格式存储
|
Parameters string `json:"parameters" gorm:"type:text"` // JSON格式存储
|
||||||
Status string `json:"status" gorm:"size:20;default:'active'"`
|
// MCP 特有字段
|
||||||
CreatedAt time.Time `json:"created_at"`
|
Transport string `json:"transport" gorm:"size:20;default:'stdio'"` // stdio, http, sse
|
||||||
UpdatedAt time.Time `json:"updated_at"`
|
Command string `json:"command" gorm:"size:500"` // 启动命令
|
||||||
|
Args string `json:"args" gorm:"type:text"` // 参数,JSON数组格式
|
||||||
|
Env string `json:"env" gorm:"type:text"` // 环境变量,JSON对象格式
|
||||||
|
// 状态
|
||||||
|
Status string `json:"status" gorm:"size:20;default:'active'"`
|
||||||
|
CreatedAt time.Time `json:"created_at"`
|
||||||
|
UpdatedAt time.Time `json:"updated_at"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// BeforeCreate 创建前自动生成ID
|
// BeforeCreate 创建前自动生成ID
|
||||||
|
|||||||
@@ -193,8 +193,8 @@ func (s *AuthService) createUserWorkspace(username string) error {
|
|||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
// 创建子目录
|
// 创建子目录: skills(技能), scripts(脚本), sandbox(沙盒), files(文件), temp(临时)
|
||||||
subDirs := []string{"projects", "files", "temp"}
|
subDirs := []string{"skills", "scripts", "sandbox", "files", "temp"}
|
||||||
for _, dir := range subDirs {
|
for _, dir := range subDirs {
|
||||||
if err := os.MkdirAll(filepath.Join(workspacePath, dir), 0755); err != nil {
|
if err := os.MkdirAll(filepath.Join(workspacePath, dir), 0755); err != nil {
|
||||||
return err
|
return err
|
||||||
|
|||||||
@@ -58,12 +58,12 @@ func (s *ToolService) DeleteTool(id string) error {
|
|||||||
func (s *ToolService) InitDefaultTools() error {
|
func (s *ToolService) InitDefaultTools() error {
|
||||||
log.Println("[ToolService] Starting init default tools...")
|
log.Println("[ToolService] Starting init default tools...")
|
||||||
|
|
||||||
// 获取默认工具
|
|
||||||
tools := s.getDefaultTools()
|
|
||||||
|
|
||||||
// 删除现有的系统工具,重新插入
|
// 删除现有的系统工具,重新插入
|
||||||
s.toolRepo.DB().Where("provider = ?", "system").Delete(&model.Tool{})
|
s.toolRepo.DB().Where("provider = ?", "system").Delete(&model.Tool{})
|
||||||
log.Printf("[ToolService] Deleted existing system tools, inserting %d default tools...", len(tools))
|
|
||||||
|
// 插入默认工具
|
||||||
|
tools := s.getDefaultTools()
|
||||||
|
log.Printf("[ToolService] Inserting %d default tools...", len(tools))
|
||||||
|
|
||||||
for _, tool := range tools {
|
for _, tool := range tools {
|
||||||
if err := s.toolRepo.Create(&tool); err != nil {
|
if err := s.toolRepo.Create(&tool); err != nil {
|
||||||
@@ -83,6 +83,7 @@ func (s *ToolService) getDefaultTools() []model.Tool {
|
|||||||
{
|
{
|
||||||
Name: "read_file",
|
Name: "read_file",
|
||||||
Description: "Read the contents of a file from the filesystem.",
|
Description: "Read the contents of a file from the filesystem.",
|
||||||
|
DescriptionCN: "读取文件系统的文件内容。",
|
||||||
Category: "file",
|
Category: "file",
|
||||||
SecurityLevel: "safe",
|
SecurityLevel: "safe",
|
||||||
RequireApproval: false,
|
RequireApproval: false,
|
||||||
@@ -93,6 +94,7 @@ func (s *ToolService) getDefaultTools() []model.Tool {
|
|||||||
{
|
{
|
||||||
Name: "write_file",
|
Name: "write_file",
|
||||||
Description: "Write content to a file. Creates the file if it doesn't exist, overwrites if it does.",
|
Description: "Write content to a file. Creates the file if it doesn't exist, overwrites if it does.",
|
||||||
|
DescriptionCN: "写入内容到文件。如果文件不存在则创建,存在则覆盖。",
|
||||||
Category: "file",
|
Category: "file",
|
||||||
SecurityLevel: "review",
|
SecurityLevel: "review",
|
||||||
RequireApproval: true,
|
RequireApproval: true,
|
||||||
@@ -103,6 +105,7 @@ func (s *ToolService) getDefaultTools() []model.Tool {
|
|||||||
{
|
{
|
||||||
Name: "list_dir",
|
Name: "list_dir",
|
||||||
Description: "List the contents of a directory.",
|
Description: "List the contents of a directory.",
|
||||||
|
DescriptionCN: "列出目录的内容。",
|
||||||
Category: "file",
|
Category: "file",
|
||||||
SecurityLevel: "safe",
|
SecurityLevel: "safe",
|
||||||
RequireApproval: false,
|
RequireApproval: false,
|
||||||
@@ -113,6 +116,7 @@ func (s *ToolService) getDefaultTools() []model.Tool {
|
|||||||
{
|
{
|
||||||
Name: "delete_file",
|
Name: "delete_file",
|
||||||
Description: "Delete a file or directory.",
|
Description: "Delete a file or directory.",
|
||||||
|
DescriptionCN: "删除文件或目录。",
|
||||||
Category: "file",
|
Category: "file",
|
||||||
SecurityLevel: "danger",
|
SecurityLevel: "danger",
|
||||||
RequireApproval: true,
|
RequireApproval: true,
|
||||||
@@ -123,6 +127,7 @@ func (s *ToolService) getDefaultTools() []model.Tool {
|
|||||||
{
|
{
|
||||||
Name: "search_files",
|
Name: "search_files",
|
||||||
Description: "Search for files by name pattern or content.",
|
Description: "Search for files by name pattern or content.",
|
||||||
|
DescriptionCN: "按文件名模式或内容搜索文件。",
|
||||||
Category: "file",
|
Category: "file",
|
||||||
SecurityLevel: "safe",
|
SecurityLevel: "safe",
|
||||||
RequireApproval: false,
|
RequireApproval: false,
|
||||||
@@ -134,6 +139,7 @@ func (s *ToolService) getDefaultTools() []model.Tool {
|
|||||||
{
|
{
|
||||||
Name: "execute_python",
|
Name: "execute_python",
|
||||||
Description: "Execute Python code in a sandboxed environment.",
|
Description: "Execute Python code in a sandboxed environment.",
|
||||||
|
DescriptionCN: "在沙盒环境中执行Python代码。",
|
||||||
Category: "executor",
|
Category: "executor",
|
||||||
SecurityLevel: "review",
|
SecurityLevel: "review",
|
||||||
RequireApproval: true,
|
RequireApproval: true,
|
||||||
@@ -144,6 +150,7 @@ func (s *ToolService) getDefaultTools() []model.Tool {
|
|||||||
{
|
{
|
||||||
Name: "execute_javascript",
|
Name: "execute_javascript",
|
||||||
Description: "Execute JavaScript code in a sandboxed environment.",
|
Description: "Execute JavaScript code in a sandboxed environment.",
|
||||||
|
DescriptionCN: "在沙盒环境中执行JavaScript代码。",
|
||||||
Category: "executor",
|
Category: "executor",
|
||||||
SecurityLevel: "review",
|
SecurityLevel: "review",
|
||||||
RequireApproval: true,
|
RequireApproval: true,
|
||||||
@@ -154,6 +161,7 @@ func (s *ToolService) getDefaultTools() []model.Tool {
|
|||||||
{
|
{
|
||||||
Name: "execute_bash",
|
Name: "execute_bash",
|
||||||
Description: "Execute a bash command in a sandboxed environment.",
|
Description: "Execute a bash command in a sandboxed environment.",
|
||||||
|
DescriptionCN: "在沙盒环境中执行Bash命令。",
|
||||||
Category: "executor",
|
Category: "executor",
|
||||||
SecurityLevel: "danger",
|
SecurityLevel: "danger",
|
||||||
RequireApproval: true,
|
RequireApproval: true,
|
||||||
@@ -165,6 +173,7 @@ func (s *ToolService) getDefaultTools() []model.Tool {
|
|||||||
{
|
{
|
||||||
Name: "web_fetch",
|
Name: "web_fetch",
|
||||||
Description: "Fetch content from a web URL.",
|
Description: "Fetch content from a web URL.",
|
||||||
|
DescriptionCN: "从网页URL获取内容。",
|
||||||
Category: "web",
|
Category: "web",
|
||||||
SecurityLevel: "safe",
|
SecurityLevel: "safe",
|
||||||
RequireApproval: false,
|
RequireApproval: false,
|
||||||
@@ -175,6 +184,7 @@ func (s *ToolService) getDefaultTools() []model.Tool {
|
|||||||
{
|
{
|
||||||
Name: "web_search",
|
Name: "web_search",
|
||||||
Description: "Search the web for information.",
|
Description: "Search the web for information.",
|
||||||
|
DescriptionCN: "在网络上搜索信息。",
|
||||||
Category: "web",
|
Category: "web",
|
||||||
SecurityLevel: "safe",
|
SecurityLevel: "safe",
|
||||||
RequireApproval: false,
|
RequireApproval: false,
|
||||||
@@ -186,6 +196,7 @@ func (s *ToolService) getDefaultTools() []model.Tool {
|
|||||||
{
|
{
|
||||||
Name: "http_request",
|
Name: "http_request",
|
||||||
Description: "Make HTTP requests to APIs.",
|
Description: "Make HTTP requests to APIs.",
|
||||||
|
DescriptionCN: "向API发送HTTP请求。",
|
||||||
Category: "http",
|
Category: "http",
|
||||||
SecurityLevel: "safe",
|
SecurityLevel: "safe",
|
||||||
RequireApproval: false,
|
RequireApproval: false,
|
||||||
@@ -197,6 +208,7 @@ func (s *ToolService) getDefaultTools() []model.Tool {
|
|||||||
{
|
{
|
||||||
Name: "send_notification",
|
Name: "send_notification",
|
||||||
Description: "Send notifications via email, webhook, dingtalk, or slack.",
|
Description: "Send notifications via email, webhook, dingtalk, or slack.",
|
||||||
|
DescriptionCN: "通过邮件、webhook、钉钉或Slack发送通知。",
|
||||||
Category: "notification",
|
Category: "notification",
|
||||||
SecurityLevel: "safe",
|
SecurityLevel: "safe",
|
||||||
RequireApproval: false,
|
RequireApproval: false,
|
||||||
@@ -208,6 +220,7 @@ func (s *ToolService) getDefaultTools() []model.Tool {
|
|||||||
{
|
{
|
||||||
Name: "get_current_time",
|
Name: "get_current_time",
|
||||||
Description: "Get the current date and time.",
|
Description: "Get the current date and time.",
|
||||||
|
DescriptionCN: "获取当前日期和时间。",
|
||||||
Category: "system",
|
Category: "system",
|
||||||
SecurityLevel: "safe",
|
SecurityLevel: "safe",
|
||||||
RequireApproval: false,
|
RequireApproval: false,
|
||||||
|
|||||||
Reference in New Issue
Block a user