feat: 自托管 AI Gateway 运维管理 SKILL

This commit is contained in:
2026-07-16 23:57:14 +08:00
parent 30ad0e9f2c
commit a24eb1aeb0
23 changed files with 1544 additions and 3 deletions
+9
View File
@@ -0,0 +1,9 @@
package docs
import _ "embed"
//go:embed swagger.json
var SwaggerJSON []byte
//go:embed swagger.yaml
var SwaggerYAML []byte
+135
View File
@@ -12,6 +12,47 @@
},
"basePath": "/",
"paths": {
"/api-docs-json": {
"get": {
"description": "返回当前构建内嵌的完整机器可读 Swagger JSON,供 Agent 在 SKILL references 未覆盖接口时查询。",
"produces": [
"application/json"
],
"tags": [
"agent-resources"
],
"summary": "获取 AI Gateway Swagger JSON",
"responses": {
"200": {
"description": "OK",
"schema": {
"type": "object",
"additionalProperties": true
}
}
}
}
},
"/api-docs-yaml": {
"get": {
"description": "返回当前构建内嵌的完整机器可读 Swagger YAML。",
"produces": [
"application/yaml"
],
"tags": [
"agent-resources"
],
"summary": "获取 AI Gateway Swagger YAML",
"responses": {
"200": {
"description": "OK",
"schema": {
"type": "string"
}
}
}
}
},
"/api/admin/access-rules": {
"get": {
"security": [
@@ -5320,6 +5361,58 @@
}
}
},
"/api/v1/public/skills/ai-gateway-ops-management/download": {
"get": {
"description": "下载可交给 Agent 使用的 ai-gateway-ops-management ZIP 包。",
"produces": [
"application/zip"
],
"tags": [
"agent-resources"
],
"summary": "下载 AI Gateway 运维管理 SKILL",
"responses": {
"200": {
"description": "OK",
"schema": {
"type": "file"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/httpapi.ErrorEnvelope"
}
}
}
}
},
"/api/v1/public/skills/ai-gateway-ops-management/metadata": {
"get": {
"description": "返回公开运维管理 SKILL 的名称、版本、模块、下载文件名和机器可读接口文档路径。",
"produces": [
"application/json"
],
"tags": [
"agent-resources"
],
"summary": "获取 AI Gateway 运维管理 SKILL 元数据",
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/httpapi.SkillBundleMetadataResponse"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/httpapi.ErrorEnvelope"
}
}
}
}
},
"/api/v1/reranks": {
"post": {
"security": [
@@ -10369,6 +10462,48 @@
}
}
},
"httpapi.SkillBundleMetadataResponse": {
"type": "object",
"properties": {
"apiDocsJsonPath": {
"type": "string",
"example": "/api-docs-json"
},
"apiDocsYamlPath": {
"type": "string",
"example": "/api-docs-yaml"
},
"displayName": {
"type": "string",
"example": "AI Gateway 运维管理"
},
"downloadPath": {
"type": "string",
"example": "/api/v1/public/skills/ai-gateway-ops-management/download"
},
"fileName": {
"type": "string",
"example": "ai-gateway-ops-management-v1.0.1.zip"
},
"modules": {
"type": "array",
"items": {
"type": "string"
},
"example": [
"model-runtime"
]
},
"name": {
"type": "string",
"example": "ai-gateway-ops-management"
},
"version": {
"type": "string",
"example": "1.0.1"
}
}
},
"httpapi.TaskAcceptedResponse": {
"type": "object",
"properties": {
+91
View File
@@ -614,6 +614,36 @@ definitions:
$ref: '#/definitions/store.RuntimePolicySet'
type: array
type: object
httpapi.SkillBundleMetadataResponse:
properties:
apiDocsJsonPath:
example: /api-docs-json
type: string
apiDocsYamlPath:
example: /api-docs-yaml
type: string
displayName:
example: AI Gateway 运维管理
type: string
downloadPath:
example: /api/v1/public/skills/ai-gateway-ops-management/download
type: string
fileName:
example: ai-gateway-ops-management-v1.0.1.zip
type: string
modules:
example:
- model-runtime
items:
type: string
type: array
name:
example: ai-gateway-ops-management
type: string
version:
example: 1.0.1
type: string
type: object
httpapi.TaskAcceptedResponse:
properties:
next:
@@ -2545,6 +2575,33 @@ info:
title: EasyAI AI Gateway API
version: 0.1.0
paths:
/api-docs-json:
get:
description: 返回当前构建内嵌的完整机器可读 Swagger JSON,供 Agent 在 SKILL references 未覆盖接口时查询。
produces:
- application/json
responses:
"200":
description: OK
schema:
additionalProperties: true
type: object
summary: 获取 AI Gateway Swagger JSON
tags:
- agent-resources
/api-docs-yaml:
get:
description: 返回当前构建内嵌的完整机器可读 Swagger YAML。
produces:
- application/yaml
responses:
"200":
description: OK
schema:
type: string
summary: 获取 AI Gateway Swagger YAML
tags:
- agent-resources
/api/admin/access-rules:
get:
description: 管理端返回用户组、租户、用户或 API Key 到平台、平台模型、基础模型的访问规则。
@@ -5951,6 +6008,40 @@ paths:
summary: 获取公开客户端自定义设置
tags:
- system
/api/v1/public/skills/ai-gateway-ops-management/download:
get:
description: 下载可交给 Agent 使用的 ai-gateway-ops-management ZIP 包。
produces:
- application/zip
responses:
"200":
description: OK
schema:
type: file
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/httpapi.ErrorEnvelope'
summary: 下载 AI Gateway 运维管理 SKILL
tags:
- agent-resources
/api/v1/public/skills/ai-gateway-ops-management/metadata:
get:
description: 返回公开运维管理 SKILL 的名称、版本、模块、下载文件名和机器可读接口文档路径。
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/httpapi.SkillBundleMetadataResponse'
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/httpapi.ErrorEnvelope'
summary: 获取 AI Gateway 运维管理 SKILL 元数据
tags:
- agent-resources
/api/v1/reranks:
post:
consumes: