mcp-server-esa 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (46) hide show
  1. package/.prettierignore +4 -0
  2. package/.prettierrc +3 -0
  3. package/abc.json +8 -0
  4. package/dist/721.js +305 -0
  5. package/dist/721.mjs +304 -0
  6. package/dist/index.d.ts +1 -0
  7. package/dist/index.js +7475 -0
  8. package/dist/index.js.LICENSE.txt +27 -0
  9. package/dist/index.mjs +7448 -0
  10. package/dist/index.mjs.LICENSE.txt +27 -0
  11. package/dist/tools/commit.d.ts +9 -0
  12. package/dist/tools/deploy.d.ts +17 -0
  13. package/dist/tools/deployments.d.ts +9 -0
  14. package/dist/tools/list-esa-function.d.ts +26 -0
  15. package/dist/tools/record.d.ts +25 -0
  16. package/dist/tools/route.d.ts +49 -0
  17. package/dist/tools/routine.d.ts +33 -0
  18. package/dist/tools/site.d.ts +17 -0
  19. package/dist/utils/helpers.d.ts +25 -0
  20. package/dist/utils/service.d.ts +39 -0
  21. package/dist/utils/types.d.ts +59 -0
  22. package/esa.toml +8 -0
  23. package/eslint.config.mjs +10 -0
  24. package/image/readme/1744114566511.png +0 -0
  25. package/image/readme/1744114625974.png +0 -0
  26. package/image/readme/1744165412296.png +0 -0
  27. package/image/readme/1744168230082.gif +0 -0
  28. package/image/readme/1744168440370.gif +0 -0
  29. package/image/readme/1744168966418.gif +0 -0
  30. package/package.json +46 -0
  31. package/readme.md +281 -0
  32. package/rslib.config.ts +15 -0
  33. package/src/index.ts +48 -0
  34. package/src/tools/commit.ts +90 -0
  35. package/src/tools/deploy.ts +103 -0
  36. package/src/tools/deployments.ts +37 -0
  37. package/src/tools/list-esa-function.ts +92 -0
  38. package/src/tools/record.ts +115 -0
  39. package/src/tools/route.ts +314 -0
  40. package/src/tools/routine.ts +130 -0
  41. package/src/tools/site.ts +61 -0
  42. package/src/utils/helpers.ts +181 -0
  43. package/src/utils/service.ts +337 -0
  44. package/src/utils/types.ts +71 -0
  45. package/test.js +0 -0
  46. package/tsconfig.json +16 -0
package/readme.md ADDED
@@ -0,0 +1,281 @@
1
+ # ESA MCP 服务器
2
+
3
+ **ESA MCP 服务器是一个 Model Context Protocol (MCP) 服务器实现,用于实现 AI 模型与边缘安全加速(ESA)服务之间的通信。该服务器充当桥梁,允许模型通过标准化协议利用 ESA 功能。**
4
+
5
+ ## 安装
6
+
7
+ **在支持MCP server的client配置文件中**
8
+
9
+ ```
10
+ {
11
+ "mcpServers": {
12
+ "esa-mcp-server": {
13
+ "command": "npx",
14
+ "args": ["-y", "mcp-server-esa"],
15
+ "env": {
16
+ "ESA_ACCESS_KEY_ID": "your AK",
17
+ "ESA_ACCESS_KEY_SECRET": "your SK"
18
+ }
19
+ }
20
+ }
21
+ }
22
+
23
+
24
+ ```
25
+
26
+ ## 演示视频
27
+
28
+ **Claude演示视频**
29
+
30
+ ![1744168230082](image/readme/1744168230082.gif)
31
+
32
+ ![1744168440370](image/readme/1744168440370.gif)
33
+
34
+ **cline演示视频**
35
+
36
+ ![1744168966418](image/readme/1744168966418.gif)
37
+
38
+ ## 安装
39
+
40
+ **在支持MCP server的client(Cline,Claude...)配置文件中**
41
+
42
+ ```
43
+ {
44
+ "mcpServers": {
45
+ "esa-mcp-server": {
46
+ "command": "tnpx",
47
+ "args": ["-y", "@ali/esa-mcp-server"],
48
+ "env": {
49
+ "ESA_ACCESS_KEY_ID": "你的AK",
50
+ "ESA_ACCESS_KEY_SECRET": "你的SK"
51
+ }
52
+ }
53
+ }
54
+ }
55
+
56
+
57
+ ```
58
+
59
+ Client配置成功后界面
60
+
61
+ ![1744114625974](image/readme/1744114625974.png)
62
+
63
+ Claude配置成功后界面
64
+
65
+ ![1744165412296](image/readme/1744165412296.png)
66
+
67
+ ## 功能特点
68
+
69
+ - **实现了用于工具执行的 Model Context Protocol**
70
+ - **提供对 ESA OpenAPI 服务的访问**
71
+ - **通过标准输入/输出 (stdio) 作为服务器运行,以便与模型运行器无缝集成**
72
+
73
+ ## 工具列表
74
+
75
+ 服务器提供以下 ESA 工具,可以通过 MCP 协议调用:
76
+
77
+ ### Routine 管理工具
78
+
79
+ #### routine_create
80
+
81
+ **创建一个 Routine**
82
+
83
+ | 参数 | 类型 | 是否必需 | 描述 |
84
+ | ----------- | ------ | -------- | -------------------------------------------------------------------------------------------------- |
85
+ | name | string | 是 | Routine 名称,支持小写英文、数字和连字符,必须以小写英文开头,长度不少于 2 个字符 |
86
+ | description | string | 否 | Routine 描述,不含空格 |
87
+ | code | string | 是 | Routine 源代码,例如:`export default { async fetch(request) { return handleRequest(request); } }` |
88
+
89
+ #### routine_delete
90
+
91
+ **删除一个 Routine**
92
+
93
+ | 参数 | 类型 | 是否必需 | 描述 |
94
+ | ---- | ------ | -------- | --------------------- |
95
+ | name | string | 是 | 要删除的 Routine 名称 |
96
+
97
+ #### routine_list
98
+
99
+ **列出所有 Routine**
100
+
101
+ 无需参数。
102
+
103
+ #### routine_get
104
+
105
+ **获取 Routine 详情**
106
+
107
+ | 参数 | 类型 | 是否必需 | 描述 |
108
+ | ---- | ------ | -------- | ------------------------- |
109
+ | name | string | 是 | 要获取详情的 Routine 名称 |
110
+
111
+ ### 部署工具
112
+
113
+ #### routine_code_commit
114
+
115
+ **提交 Routine 代码**
116
+
117
+ | 参数 | 类型 | 是否必需 | 描述 |
118
+ | ---- | ------ | -------- | -------------- |
119
+ | name | string | 是 | Routine 名称 |
120
+ | code | string | 是 | Routine 源代码 |
121
+
122
+ #### routine_code_deploy
123
+
124
+ **部署 Routine 代码**
125
+
126
+ | 参数 | 类型 | 是否必需 | 描述 |
127
+ | ----------------- | ------ | -------- | ------------------------------------------------------------------------ |
128
+ | name | string | 是 | Routine 名称 |
129
+ | codeVersion | string | 是 | Routine 版本,必须是有效的语义化版本 |
130
+ | env | string | 是 | Routine 环境,必须是 "production" 或 "staging" |
131
+ | canaryAreaList | array | 否 | 金丝雀发布区域,必须是有效的区域名称,需要调用 canary_area_list 方法获取 |
132
+ | canaryCodeVersion | string | 否 | 金丝雀版本,必须是有效的语义化版本 |
133
+
134
+ #### canary_area_list
135
+
136
+ **列出所有可用于 Routine 部署的金丝雀区域**
137
+
138
+ 无需参数。
139
+
140
+ #### deployment_delete
141
+
142
+ **删除部署**
143
+
144
+ | 参数 | 类型 | 是否必需 | 描述 |
145
+ | ---- | ------ | -------- | -------- |
146
+ | name | string | 是 | 部署名称 |
147
+
148
+ ### 路由管理工具
149
+
150
+ #### route_create
151
+
152
+ **创建与 Routine 相关的路由**
153
+
154
+ | 参数 | 类型 | 是否必需 | 描述 |
155
+ | ----------- | ------ | -------------- | --------------------------------------------- |
156
+ | siteId | number | 是 | 站点 ID |
157
+ | mode | string | 是 | 路由模式,可选 'simple' 或 'custom' |
158
+ | route | string | 根据 mode 而定 | 路由路径,如果 mode 是 'simple',则必填 |
159
+ | rule | string | 是 | 路由规则,如果 mode 是 'custom',则必填 |
160
+ | routineName | string | 是 | Routine 名称 |
161
+ | routeName | string | 是 | 路由名称,用于标识路由 |
162
+ | bypass | string | 是 | 路由旁路,可选 'on' 或 'off',默认为 'off' |
163
+ | routeEnable | string | 是 | 路由启用状态,可选 'on' 或 'off',默认为 'on' |
164
+ | sequence | number | 否 | 路由序列,默认为当前路由数量 |
165
+
166
+ #### route_update
167
+
168
+ **更新与 Routine 相关的路由**
169
+
170
+ | 参数 | 类型 | 是否必需 | 描述 |
171
+ | ----------- | ------ | -------- | -------------------------------- |
172
+ | siteId | number | 是 | 站点 ID |
173
+ | configId | number | 是 | 配置 ID |
174
+ | routeName | string | 是 | 路由名称 |
175
+ | routeEnable | string | 是 | 路由启用状态,可选 'on' 或 'off' |
176
+ | rule | string | 是 | 路由规则 |
177
+ | routineName | string | 是 | Routine 名称 |
178
+ | bypass | string | 是 | 路由旁路,可选 'on' 或 'off' |
179
+ | sequence | number | 否 | 路由序列 |
180
+
181
+ #### route_delete
182
+
183
+ **删除与 Routine 相关的路由**
184
+
185
+ | 参数 | 类型 | 是否必需 | 描述 |
186
+ | -------- | ------ | -------- | ------- |
187
+ | siteId | number | 是 | 站点 ID |
188
+ | configId | number | 是 | 配置 ID |
189
+
190
+ #### route_get
191
+
192
+ **获取与 Routine 相关的路由**
193
+
194
+ | 参数 | 类型 | 是否必需 | 描述 |
195
+ | -------- | ------ | -------- | ------- |
196
+ | siteId | number | 是 | 站点 ID |
197
+ | configId | number | 是 | 配置 ID |
198
+
199
+ #### routine_route_list
200
+
201
+ **列出 Routine 的所有路由**
202
+
203
+ | 参数 | 类型 | 是否必需 | 描述 |
204
+ | ----------- | ------ | -------- | -------------------------- |
205
+ | routineName | string | 是 | Routine 名称 |
206
+ | routeName | string | 否 | 路由名称,用于过滤列表结果 |
207
+ | pageNumber | number | 否 | 路由页码 |
208
+ | pageSize | number | 否 | 每页路由数量 |
209
+
210
+ #### site_route_list
211
+
212
+ **列出站点的所有路由**
213
+
214
+ | 参数 | 类型 | 是否必需 | 描述 |
215
+ | ---------- | ------ | -------- | -------------------------- |
216
+ | siteId | number | 是 | 站点 ID |
217
+ | routeName | string | 否 | 路由名称,用于过滤列表结果 |
218
+ | pageNumber | number | 否 | 路由页码 |
219
+ | pageSize | number | 否 | 每页路由数量 |
220
+
221
+ ### 记录管理工具
222
+
223
+ #### record_create
224
+
225
+ **创建记录**
226
+
227
+ | 参数 | 类型 | 是否必需 | 描述 |
228
+ | ----- | ------ | -------- | ------ |
229
+ | key | string | 是 | 记录键 |
230
+ | value | string | 是 | 记录值 |
231
+
232
+ #### record_delete
233
+
234
+ **删除记录**
235
+
236
+ | 参数 | 类型 | 是否必需 | 描述 |
237
+ | ---- | ------ | -------- | -------------- |
238
+ | key | string | 是 | 要删除的记录键 |
239
+
240
+ #### record_list
241
+
242
+ **列出所有记录**
243
+
244
+ 无需参数。
245
+
246
+ ### 站点工具
247
+
248
+ #### site_active_list
249
+
250
+ **列出活跃站点**
251
+
252
+ 无需参数。
253
+
254
+ #### site_match
255
+
256
+ **匹配站点**
257
+
258
+ | 参数 | 类型 | 是否必需 | 描述 |
259
+ | ------ | ------ | -------- | ------------ |
260
+ | domain | string | 是 | 要匹配的域名 |
261
+
262
+ ## 可用脚本
263
+
264
+ - `npm run build` - 使用 rslib 构建项目
265
+ - `npm run dev` - 以监视模式运行构建用于开发
266
+ - `npm run format` - 使用 Prettier 格式化代码
267
+ - `npm run lint` - 使用 ESLint 检查代码
268
+
269
+ ### 项目结构
270
+
271
+ - `src/index.ts` - 主入口点
272
+ - `src/tools/` - ESA 工具实现
273
+ - `src/utils/` - 实用函数和辅助程序
274
+
275
+ ## 许可证
276
+
277
+ **ISC**
278
+
279
+ ## 贡献
280
+
281
+ **对于阿里巴巴的内部贡献者,请遵循项目的标准贡献工作流程。**
@@ -0,0 +1,15 @@
1
+ import { defineConfig } from '@rslib/core';
2
+
3
+ export default defineConfig({
4
+ lib: [
5
+ {
6
+ format: 'esm',
7
+ syntax: 'es2021',
8
+ dts: true,
9
+ },
10
+ {
11
+ format: 'cjs',
12
+ syntax: 'es2021',
13
+ },
14
+ ],
15
+ });
package/src/index.ts ADDED
@@ -0,0 +1,48 @@
1
+ import { Server } from '@modelcontextprotocol/sdk/server/index.js';
2
+ import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js';
3
+ import {
4
+ CallToolRequestSchema,
5
+ ListToolsRequestSchema,
6
+ } from '@modelcontextprotocol/sdk/types.js';
7
+ import { ESA_OPENAPI_LIST, routineHandlers } from './tools/list-esa-function';
8
+ import { log } from './utils/helpers';
9
+
10
+ const server = new Server(
11
+ {
12
+ name: 'esa-server',
13
+ version: '1.0.0',
14
+ },
15
+ {
16
+ capabilities: {
17
+ tools: {},
18
+ },
19
+ },
20
+ );
21
+
22
+ // Define available tools
23
+ server.setRequestHandler(ListToolsRequestSchema, async () => {
24
+ return { tools: ESA_OPENAPI_LIST };
25
+ });
26
+
27
+ // Handle tool execution
28
+ server.setRequestHandler(CallToolRequestSchema, async (request) => {
29
+ const toolName = request.params.name;
30
+ log(
31
+ 'Received tool call:',
32
+ toolName,
33
+ 'Params:',
34
+ JSON.stringify(request.params),
35
+ );
36
+ return await routineHandlers[toolName](request);
37
+ });
38
+
39
+ async function main() {
40
+ const transport = new StdioServerTransport();
41
+ await server.connect(transport);
42
+ console.error('ESA MCP Server running on stdio');
43
+ }
44
+
45
+ main().catch((error) => {
46
+ console.error('Fatal error in main():', error);
47
+ process.exit(1);
48
+ });
@@ -0,0 +1,90 @@
1
+ import { CallToolRequest, Tool } from '@modelcontextprotocol/sdk/types.js';
2
+ import api from '../utils/service.js';
3
+ import {
4
+ CommitRoutineStagingCodeRequest,
5
+ GetRoutineStagingCodeUploadInfoRequest,
6
+ } from '@alicloud/esa20240910';
7
+ import { uploadCodeToOSS } from '../utils/helpers.js';
8
+
9
+ export const ROUTINE_CODE_COMMIT_TOOL: Tool = {
10
+ name: 'routine_code_commit',
11
+ description:
12
+ 'Commit a edge routine(ER) code. If it fails, please submit again.',
13
+ inputSchema: {
14
+ type: 'object',
15
+ properties: {
16
+ name: {
17
+ type: 'string',
18
+ description:
19
+ 'The name of the routine, support lowercase English, numbers, and hyphens, must start with lowercase English, length cannot be less than 2 characters',
20
+ },
21
+ description: {
22
+ type: 'string',
23
+ description: 'Description of the routine, no spaces',
24
+ },
25
+ code: {
26
+ type: 'string',
27
+ description:
28
+ 'Source Code of the routine, export default { async fetch(request) { return handleRequest(request); } }',
29
+ },
30
+ },
31
+ required: ['name', 'code'],
32
+ },
33
+ };
34
+ export const routine_code_commit = async (request: CallToolRequest) => {
35
+ const res = await api.getRoutineStagingCodeUploadInfo(
36
+ request.params.arguments as GetRoutineStagingCodeUploadInfoRequest,
37
+ );
38
+ if (!res) {
39
+ return {
40
+ content: [
41
+ {
42
+ type: 'text',
43
+ text: `Failed to get routine staging code upload info. ${JSON.stringify(res)}`,
44
+ },
45
+ ],
46
+ success: false,
47
+ };
48
+ } else {
49
+ const uploadRes = await uploadCodeToOSS(
50
+ res,
51
+ request?.params?.arguments?.code as string,
52
+ );
53
+ if (uploadRes !== true) {
54
+ return {
55
+ content: [
56
+ {
57
+ type: 'text',
58
+ text: `Failed to upload code to OSS. ${uploadRes}`,
59
+ },
60
+ ],
61
+ success: false,
62
+ };
63
+ } else {
64
+ const commitRes = await api.commitRoutineStagingCode(
65
+ request.params.arguments as CommitRoutineStagingCodeRequest,
66
+ );
67
+ if (commitRes.statusCode !== 200) {
68
+ return {
69
+ content: [
70
+ {
71
+ type: 'text',
72
+ text: `Failed to commit routine staging code. ${JSON.stringify(commitRes)}`,
73
+ },
74
+ ],
75
+ success: false,
76
+ };
77
+ } else {
78
+ return {
79
+ content: [
80
+ {
81
+ type: 'text',
82
+ text: JSON.stringify(commitRes),
83
+ },
84
+ ],
85
+ success: true,
86
+ };
87
+ }
88
+ }
89
+ }
90
+ };
@@ -0,0 +1,103 @@
1
+ import { CallToolRequest, Tool } from '@modelcontextprotocol/sdk/types.js';
2
+ import api from '../utils/service.js';
3
+ import {
4
+ ListRoutineCanaryAreasResponse,
5
+ PublishRoutineCodeVersionRequest,
6
+ } from '@alicloud/esa20240910';
7
+
8
+ export const ROUTINE_CODE_DEPLOY_TOOL: Tool = {
9
+ name: 'routine_code_deploy',
10
+ description:
11
+ 'Deploy a routine code, must be a valid semantic version. If version is not exist, should call routine_code_commit first',
12
+ inputSchema: {
13
+ type: 'object',
14
+ properties: {
15
+ name: {
16
+ type: 'string',
17
+ description:
18
+ 'The name of the routine, support lowercase English, numbers, and hyphens, must start with lowercase English, length cannot be less than 2 characters',
19
+ },
20
+ codeVersion: {
21
+ type: 'string',
22
+ description: 'Version of the routine, must be a valid semantic version',
23
+ },
24
+ env: {
25
+ type: 'string',
26
+ description:
27
+ 'Environment of the routine, must be "production" or "staging". If the user has no special requirements, it will be deployed to the production environment by default',
28
+ },
29
+ canaryAreaList: {
30
+ type: 'array',
31
+ description:
32
+ 'The regions for canary release, must be a valid region name. Need to call ListRoutineCanaryAreas method to get',
33
+ },
34
+ canaryCodeVersion: {
35
+ type: 'string',
36
+ description: 'Version of the routine, must be a valid semantic version',
37
+ },
38
+ },
39
+ required: ['name', 'codeVersion', 'env'],
40
+ },
41
+ };
42
+
43
+ export const CANARY_AREA_LIST: Tool = {
44
+ name: 'canary_area_list',
45
+ description: 'List all available canary areas for routine deployment',
46
+ inputSchema: {
47
+ type: 'object',
48
+ properties: {},
49
+ },
50
+ };
51
+
52
+ export const routine_code_deploy = async (request: CallToolRequest) => {
53
+ const res = await api.publishRoutineCodeVersion(
54
+ request.params.arguments as PublishRoutineCodeVersionRequest,
55
+ );
56
+ if (!res) {
57
+ return {
58
+ content: [
59
+ {
60
+ type: 'text',
61
+ text: `Failed to publish routine code version. ${JSON.stringify(res)}`,
62
+ },
63
+ ],
64
+ success: false,
65
+ };
66
+ } else {
67
+ return {
68
+ content: [
69
+ {
70
+ type: 'text',
71
+ text: JSON.stringify(res),
72
+ },
73
+ ],
74
+ success: true,
75
+ };
76
+ }
77
+ };
78
+
79
+ export const canary_area_list = async () => {
80
+ const res: ListRoutineCanaryAreasResponse =
81
+ await api.listRoutineCanaryAreas();
82
+ if (res.statusCode !== 200) {
83
+ return {
84
+ content: [
85
+ {
86
+ type: 'text',
87
+ text: `Failed to list canary areas. ${JSON.stringify(res)}`,
88
+ },
89
+ ],
90
+ success: false,
91
+ };
92
+ } else {
93
+ return {
94
+ content: [
95
+ {
96
+ type: 'text',
97
+ text: JSON.stringify(res.body?.canaryAreas || []),
98
+ },
99
+ ],
100
+ success: true,
101
+ };
102
+ }
103
+ };
@@ -0,0 +1,37 @@
1
+ import { CallToolRequest, Tool } from '@modelcontextprotocol/sdk/types.js';
2
+ import api from '../utils/service.js';
3
+ import { DeleteRoutineCodeVersionRequest } from '@alicloud/esa20240910';
4
+
5
+ export const DEPLOYMENT_DELETE_TOOL: Tool = {
6
+ name: 'deployment_delete',
7
+ description: 'Delete a deployment',
8
+ inputSchema: {
9
+ type: 'object',
10
+ properties: {
11
+ name: {
12
+ type: 'string',
13
+ description: 'The name of the deployment to delete',
14
+ },
15
+ codeVersion: {
16
+ type: 'string',
17
+ description: 'The version of the code to delete',
18
+ },
19
+ },
20
+ required: ['name', 'codeVersion'],
21
+ },
22
+ };
23
+
24
+ export const deployment_delete = async (request: CallToolRequest) => {
25
+ const res = await api.deleteRoutineCodeVersion(
26
+ request.params.arguments as DeleteRoutineCodeVersionRequest,
27
+ );
28
+ return {
29
+ content: [
30
+ {
31
+ type: 'text',
32
+ text: JSON.stringify(res),
33
+ },
34
+ ],
35
+ success: true,
36
+ };
37
+ };
@@ -0,0 +1,92 @@
1
+ import { ToolHandlers } from '../utils/types';
2
+ import { routine_code_commit, ROUTINE_CODE_COMMIT_TOOL } from './commit';
3
+ import {
4
+ CANARY_AREA_LIST,
5
+ canary_area_list,
6
+ routine_code_deploy,
7
+ ROUTINE_CODE_DEPLOY_TOOL,
8
+ } from './deploy';
9
+ import { deployment_delete, DEPLOYMENT_DELETE_TOOL } from './deployments';
10
+ import {
11
+ record_create,
12
+ RECORD_CREATE_TOOL,
13
+ record_delete,
14
+ RECORD_DELETE_TOOL,
15
+ record_list,
16
+ RECORD_LIST_TOOL,
17
+ } from './record';
18
+ import {
19
+ route_create,
20
+ ROUTE_CREATE_TOOL,
21
+ route_delete,
22
+ ROUTE_DELETE_TOOL,
23
+ route_get,
24
+ ROUTE_GET_TOOL,
25
+ route_update,
26
+ ROUTE_UPDATE_TOOL,
27
+ routine_route_list,
28
+ ROUTINE_ROUTE_LIST_TOOL,
29
+ site_route_list,
30
+ SITE_ROUTE_LIST_TOOL,
31
+ } from './route';
32
+ import {
33
+ ROUTINE_CREATE_TOOL,
34
+ ROUTINE_DELETE_TOOL,
35
+ ROUTINE_LIST_TOOL,
36
+ ROUTINE_GET_TOOL,
37
+ routine_delete,
38
+ routine_create,
39
+ routine_list,
40
+ routine_get,
41
+ } from './routine';
42
+ import {
43
+ site_active_list,
44
+ SITE_ACTIVE_LIST_TOOL,
45
+ site_match,
46
+ SITE_MATCH_TOOL,
47
+ } from './site';
48
+
49
+ export const ESA_OPENAPI_ER_LIST = [
50
+ ROUTINE_CREATE_TOOL,
51
+ ROUTINE_DELETE_TOOL,
52
+ ROUTINE_LIST_TOOL,
53
+ ROUTINE_GET_TOOL,
54
+ ROUTINE_CODE_COMMIT_TOOL,
55
+ ROUTINE_CODE_DEPLOY_TOOL,
56
+ ROUTINE_ROUTE_LIST_TOOL,
57
+ CANARY_AREA_LIST,
58
+ DEPLOYMENT_DELETE_TOOL,
59
+ SITE_ACTIVE_LIST_TOOL,
60
+ SITE_ROUTE_LIST_TOOL,
61
+ ROUTE_CREATE_TOOL,
62
+ ROUTE_DELETE_TOOL,
63
+ ROUTE_UPDATE_TOOL,
64
+ ROUTE_GET_TOOL,
65
+ SITE_MATCH_TOOL,
66
+ RECORD_CREATE_TOOL,
67
+ RECORD_DELETE_TOOL,
68
+ RECORD_LIST_TOOL,
69
+ ];
70
+
71
+ export const ESA_OPENAPI_LIST = [...ESA_OPENAPI_ER_LIST];
72
+ export const routineHandlers: ToolHandlers = {
73
+ routine_create,
74
+ routine_delete,
75
+ routine_list,
76
+ routine_get,
77
+ routine_code_commit,
78
+ routine_code_deploy,
79
+ routine_route_list,
80
+ canary_area_list,
81
+ deployment_delete,
82
+ site_active_list,
83
+ site_match,
84
+ site_route_list,
85
+ route_create,
86
+ route_delete,
87
+ route_update,
88
+ route_get,
89
+ record_create,
90
+ record_delete,
91
+ record_list,
92
+ };