@cloudbase/cloudbase-mcp 1.7.4 → 1.7.6

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.
@@ -1,5 +1,5 @@
1
1
  import { z } from "zod";
2
- import { getCloudBaseManager } from '../cloudbase-manager.js';
2
+ import { getCloudBaseManager, getEnvId } from '../cloudbase-manager.js';
3
3
  // 获取数据库实例ID
4
4
  async function getDatabaseInstanceId() {
5
5
  const cloudbase = await getCloudBaseManager();
@@ -9,6 +9,352 @@ async function getDatabaseInstanceId() {
9
9
  }
10
10
  return EnvInfo.Databases[0].InstanceId;
11
11
  }
12
+ // 生成SDK使用文档的函数
13
+ function generateSDKDocs(modelName, modelTitle, userFields, relations) {
14
+ // 获取主要字段(前几个非关联字段)
15
+ const mainFields = userFields.filter(f => !f.linkage);
16
+ const requiredFields = userFields.filter(f => f.required);
17
+ const stringFields = userFields.filter(f => f.type === 'string' && !f.linkage);
18
+ const numberFields = userFields.filter(f => f.type === 'number');
19
+ // 生成字段示例值
20
+ const generateFieldValue = (field) => {
21
+ if (field.enum && field.enum.length > 0) {
22
+ return `"${field.enum[0]}"`;
23
+ }
24
+ switch (field.type) {
25
+ case 'string':
26
+ return field.format === 'email' ? '"user@example.com"' :
27
+ field.format === 'url' ? '"https://example.com"' :
28
+ `"示例${field.title || field.name}"`;
29
+ case 'number':
30
+ return field.format === 'currency' ? '99.99' : '1';
31
+ case 'boolean':
32
+ return field.default !== undefined ? field.default : 'true';
33
+ case 'array':
34
+ return '[]';
35
+ case 'object':
36
+ return '{}';
37
+ default:
38
+ return `"${field.title || field.name}值"`;
39
+ }
40
+ };
41
+ // 生成创建数据示例
42
+ const createDataExample = mainFields.map(field => ` ${field.name}: ${generateFieldValue(field)}, // ${field.description || field.title || field.name}`).join('\n');
43
+ // 生成更新数据示例
44
+ const updateDataExample = mainFields.slice(0, 2).map(field => ` ${field.name}: ${generateFieldValue(field)}, // ${field.description || field.title || field.name}`).join('\n');
45
+ // 生成查询条件示例
46
+ const queryField = stringFields[0] || mainFields[0];
47
+ const queryExample = queryField ?
48
+ ` ${queryField.name}: {\n $eq: ${generateFieldValue(queryField)}, // 根据${queryField.description || queryField.title || queryField.name}查询\n },` :
49
+ ' _id: {\n $eq: "记录ID", // 根据ID查询\n },';
50
+ return `# 数据模型 ${modelTitle} (${modelName}) SDK 使用文档
51
+
52
+ ## 数据模型字段说明
53
+
54
+ ${userFields.map(field => {
55
+ let fieldDoc = `- **${field.name}** (${field.type})`;
56
+ if (field.required)
57
+ fieldDoc += ' *必填*';
58
+ if (field.description)
59
+ fieldDoc += `: ${field.description}`;
60
+ if (field.format)
61
+ fieldDoc += ` [格式: ${field.format}]`;
62
+ if (field.enum)
63
+ fieldDoc += ` [可选值: ${field.enum.join(', ')}]`;
64
+ if (field.default !== undefined)
65
+ fieldDoc += ` [默认值: ${field.default}]`;
66
+ return fieldDoc;
67
+ }).join('\n')}
68
+
69
+ ${relations.length > 0 ? `
70
+ ## 关联关系
71
+
72
+ ${relations.map(rel => `- **${rel.field}**: 关联到 ${rel.targetModel} 模型的 ${rel.foreignKey} 字段`).join('\n')}
73
+ ` : ''}
74
+
75
+ ## 增删改查操作
76
+
77
+ ### 创建数据
78
+
79
+ #### 创建单条数据 \`create\`
80
+
81
+ \`\`\`javascript
82
+ const { data } = await models.${modelName}.create({
83
+ data: {
84
+ ${createDataExample}
85
+ },
86
+ });
87
+
88
+ // 返回创建的记录 id
89
+ console.log(data);
90
+ // { id: "7d8ff72c665eb6c30243b6313aa8539e"}
91
+ \`\`\`
92
+
93
+ #### 创建多条数据 \`createMany\`
94
+
95
+ \`\`\`javascript
96
+ const { data } = await models.${modelName}.createMany({
97
+ data: [
98
+ {
99
+ ${createDataExample}
100
+ },
101
+ {
102
+ ${createDataExample}
103
+ },
104
+ ],
105
+ });
106
+
107
+ // 返回创建的记录 idList
108
+ console.log(data);
109
+ // {
110
+ // "idList": [
111
+ // "7d8ff72c665ebe5c02442a1a7b29685e",
112
+ // "7d8ff72c665ebe5c02442a1b77feba4b"
113
+ // ]
114
+ // }
115
+ \`\`\`
116
+
117
+ ### 更新数据
118
+
119
+ #### 更新单条数据 \`update\`
120
+
121
+ \`\`\`javascript
122
+ const { data } = await models.${modelName}.update({
123
+ data: {
124
+ ${updateDataExample}
125
+ },
126
+ filter: {
127
+ where: {
128
+ _id: {
129
+ $eq: "记录ID", // 推荐传入_id数据标识进行操作
130
+ },
131
+ },
132
+ },
133
+ });
134
+
135
+ // 返回更新成功的条数
136
+ console.log(data);
137
+ // { count: 1}
138
+ \`\`\`
139
+
140
+ #### 创建或更新数据 \`upsert\`
141
+
142
+ \`\`\`javascript
143
+ const recordData = {
144
+ ${createDataExample}
145
+ _id: "指定ID",
146
+ };
147
+
148
+ const { data } = await models.${modelName}.upsert({
149
+ create: recordData,
150
+ update: recordData,
151
+ filter: {
152
+ where: {
153
+ _id: {
154
+ $eq: recordData._id,
155
+ },
156
+ },
157
+ },
158
+ });
159
+
160
+ console.log(data);
161
+ // 新增时返回: { "count": 0, "id": "指定ID" }
162
+ // 更新时返回: { "count": 1, "id": "" }
163
+ \`\`\`
164
+
165
+ #### 更新多条数据 \`updateMany\`
166
+
167
+ \`\`\`javascript
168
+ const { data } = await models.${modelName}.updateMany({
169
+ data: {
170
+ ${updateDataExample}
171
+ },
172
+ filter: {
173
+ where: {
174
+ ${queryExample}
175
+ },
176
+ },
177
+ });
178
+
179
+ // 返回更新成功的条数
180
+ console.log(data);
181
+ // { "count": 5 }
182
+ \`\`\`
183
+
184
+ ### 删除数据
185
+
186
+ #### 删除单条 \`delete\`
187
+
188
+ \`\`\`javascript
189
+ const { data } = await models.${modelName}.delete({
190
+ filter: {
191
+ where: {
192
+ _id: {
193
+ $eq: "记录ID", // 推荐传入_id数据标识进行操作
194
+ },
195
+ },
196
+ },
197
+ });
198
+
199
+ // 返回删除成功的条数
200
+ console.log(data);
201
+ // { "count": 1 }
202
+ \`\`\`
203
+
204
+ #### 删除多条 \`deleteMany\`
205
+
206
+ \`\`\`javascript
207
+ const { data } = await models.${modelName}.deleteMany({
208
+ filter: {
209
+ where: {
210
+ ${queryExample}
211
+ },
212
+ },
213
+ });
214
+
215
+ // 返回删除成功的条数
216
+ console.log(data);
217
+ // { "count": 3 }
218
+ \`\`\`
219
+
220
+ ### 读取数据
221
+
222
+ #### 读取单条数据 \`get\`
223
+
224
+ \`\`\`javascript
225
+ const { data } = await models.${modelName}.get({
226
+ filter: {
227
+ where: {
228
+ _id: {
229
+ $eq: "记录ID", // 推荐传入_id数据标识进行操作
230
+ },
231
+ },
232
+ },
233
+ });
234
+
235
+ // 返回查询到的数据
236
+ console.log(data);
237
+ // {
238
+ // "_id": "记录ID",
239
+ ${userFields.slice(0, 5).map(field => `// "${field.name}": ${generateFieldValue(field)}, // ${field.description || field.title || field.name}`).join('\n')}
240
+ // "createdAt": 1717488585078,
241
+ // "updatedAt": 1717490751944
242
+ // }
243
+ \`\`\`
244
+
245
+ #### 读取多条数据 \`list\`
246
+
247
+ \`\`\`javascript
248
+ const { data } = await models.${modelName}.list({
249
+ filter: {
250
+ where: {
251
+ ${queryExample}
252
+ },
253
+ },
254
+ getCount: true, // 开启用来获取总数
255
+ });
256
+
257
+ // 返回查询到的数据列表 records 和 总数 total
258
+ console.log(data);
259
+ // {
260
+ // "records": [
261
+ // {
262
+ // "_id": "记录ID1",
263
+ ${userFields.slice(0, 3).map(field => `// "${field.name}": ${generateFieldValue(field)}, // ${field.description || field.title || field.name}`).join('\n')}
264
+ // "createdAt": 1717488585078,
265
+ // "updatedAt": 1717490751944
266
+ // },
267
+ // // ... 更多记录
268
+ // ],
269
+ // "total": 10
270
+ // }
271
+ \`\`\`
272
+
273
+ ## 查询条件和排序
274
+
275
+ ### 常用查询条件
276
+
277
+ \`\`\`javascript
278
+ // 等于查询
279
+ const { data } = await models.${modelName}.list({
280
+ filter: {
281
+ where: {
282
+ ${queryField ? ` ${queryField.name}: {
283
+ $eq: ${generateFieldValue(queryField)}, // ${queryField.description || queryField.title || queryField.name}等于指定值
284
+ },` : ' _id: { $eq: "记录ID" },'}
285
+ },
286
+ },
287
+ });
288
+
289
+ ${stringFields.length > 0 ? `// 模糊查询
290
+ const { data: searchData } = await models.${modelName}.list({
291
+ filter: {
292
+ where: {
293
+ ${stringFields[0].name}: {
294
+ $regex: "关键词", // ${stringFields[0].description || stringFields[0].title || stringFields[0].name}包含关键词
295
+ },
296
+ },
297
+ },
298
+ });` : ''}
299
+
300
+ ${numberFields.length > 0 ? `// 范围查询
301
+ const { data: rangeData } = await models.${modelName}.list({
302
+ filter: {
303
+ where: {
304
+ ${numberFields[0].name}: {
305
+ $gte: 10, // ${numberFields[0].description || numberFields[0].title || numberFields[0].name}大于等于10
306
+ $lte: 100, // ${numberFields[0].description || numberFields[0].title || numberFields[0].name}小于等于100
307
+ },
308
+ },
309
+ },
310
+ });` : ''}
311
+ \`\`\`
312
+
313
+ ### 排序
314
+
315
+ \`\`\`javascript
316
+ const { data } = await models.${modelName}.list({
317
+ filter: {
318
+ where: {},
319
+ orderBy: [
320
+ {
321
+ ${mainFields[0] ? `${mainFields[0].name}: "asc", // 按${mainFields[0].description || mainFields[0].title || mainFields[0].name}升序` : '_id: "desc", // 按ID降序'}
322
+ },
323
+ ],
324
+ },
325
+ });
326
+ \`\`\`
327
+
328
+ ${relations.length > 0 ? `
329
+ ## 关联查询
330
+
331
+ ${relations.map(rel => `
332
+ ### 查询关联的 ${rel.targetModel} 数据
333
+
334
+ \`\`\`javascript
335
+ const { data } = await models.${modelName}.list({
336
+ filter: {
337
+ where: {},
338
+ include: {
339
+ ${rel.field}: true, // 包含关联的${rel.targetModel}数据
340
+ },
341
+ },
342
+ });
343
+
344
+ // 返回的数据中会包含关联信息
345
+ console.log(data.records[0].${rel.field});
346
+ \`\`\`
347
+ `).join('')}
348
+ ` : ''}
349
+
350
+ ## 更多操作
351
+
352
+ 更多高级查询、分页、聚合等操作,请参考:
353
+ - [查询和筛选](https://docs.cloudbase.net/model/select)
354
+ - [过滤和排序](https://docs.cloudbase.net/model/filter-and-sort)
355
+ ${relations.length > 0 ? '- [关联关系](https://docs.cloudbase.net/model/relation)' : ''}
356
+ `;
357
+ }
12
358
  export function registerDatabaseTools(server) {
13
359
  // 创建云开发数据库集合
14
360
  server.tool("createCollection", "创建一个新的云开发数据库集合", {
@@ -659,4 +1005,257 @@ export function registerDatabaseTools(server) {
659
1005
  };
660
1006
  }
661
1007
  });
1008
+ // 数据模型查询工具
1009
+ server.tool("manageDataModel", "数据模型查询工具,支持查询和列表数据模型(只读操作)。list操作返回基础信息(不含Schema),get操作返回详细信息(含简化的Schema,包括字段列表、格式、关联关系等),docs操作生成SDK使用文档", {
1010
+ action: z.enum(["get", "list", "docs"]).describe("操作类型:get=查询单个模型(含Schema字段列表、格式、关联关系),list=获取模型列表(不含Schema),docs=生成SDK使用文档"),
1011
+ name: z.string().optional().describe("模型名称(get操作时必填)"),
1012
+ names: z.array(z.string()).optional().describe("模型名称数组(list操作时可选,用于过滤)")
1013
+ }, async ({ action, name, names }) => {
1014
+ try {
1015
+ const cloudbase = await getCloudBaseManager();
1016
+ let currentEnvId = await getEnvId();
1017
+ let result;
1018
+ switch (action) {
1019
+ case 'get':
1020
+ if (!name) {
1021
+ throw new Error('获取数据模型需要提供模型名称');
1022
+ }
1023
+ try {
1024
+ result = await cloudbase.commonService('lowcode').call({
1025
+ Action: 'DescribeBasicDataSource',
1026
+ Param: {
1027
+ EnvId: currentEnvId,
1028
+ Name: name
1029
+ }
1030
+ });
1031
+ // 只保留基础字段,过滤掉冗余信息,并简化Schema
1032
+ let simplifiedSchema = null;
1033
+ // 解析并简化Schema
1034
+ if (result.Data.Schema) {
1035
+ try {
1036
+ const schema = JSON.parse(result.Data.Schema);
1037
+ const properties = schema.properties || {};
1038
+ // 提取用户定义的字段(排除系统字段)
1039
+ const userFields = Object.keys(properties)
1040
+ .filter(key => !properties[key]['x-system']) // 排除系统字段
1041
+ .map(key => {
1042
+ const field = properties[key];
1043
+ const fieldInfo = {
1044
+ name: key,
1045
+ type: field.type,
1046
+ format: field.format,
1047
+ title: field.title || key,
1048
+ required: schema.required?.includes(key) || false,
1049
+ description: field.description || ''
1050
+ };
1051
+ if (field['x-parent']) {
1052
+ fieldInfo.linkage = field['x-parent'];
1053
+ }
1054
+ return fieldInfo;
1055
+ });
1056
+ // 提取关联关系
1057
+ const relations = userFields
1058
+ .filter(field => field.linkage)
1059
+ .map(field => ({
1060
+ field: field.name,
1061
+ type: field.format,
1062
+ title: field.title,
1063
+ targetModel: field.linkage.parentDataSourceName,
1064
+ foreignKey: field.linkage.parentFieldKey,
1065
+ displayField: field.linkage.parentFieldTitle
1066
+ }));
1067
+ simplifiedSchema = {
1068
+ userFields,
1069
+ relations,
1070
+ totalFields: Object.keys(properties).length,
1071
+ userFieldsCount: userFields.length
1072
+ };
1073
+ }
1074
+ catch (e) {
1075
+ simplifiedSchema = { error: 'Schema解析失败' };
1076
+ }
1077
+ }
1078
+ const simplifiedModel = {
1079
+ DbInstanceType: result.Data.DbInstanceType,
1080
+ Title: result.Data.Title,
1081
+ Description: result.Data.Description,
1082
+ Name: result.Data.Name,
1083
+ UpdatedAt: result.Data.UpdatedAt,
1084
+ Schema: simplifiedSchema
1085
+ };
1086
+ return {
1087
+ content: [{
1088
+ type: "text",
1089
+ text: JSON.stringify({
1090
+ success: true,
1091
+ action: 'get',
1092
+ data: simplifiedModel,
1093
+ message: "获取数据模型成功"
1094
+ }, null, 2)
1095
+ }]
1096
+ };
1097
+ }
1098
+ catch (error) {
1099
+ if (error.original?.Code === 'ResourceNotFound') {
1100
+ return {
1101
+ content: [{
1102
+ type: "text",
1103
+ text: JSON.stringify({
1104
+ success: false,
1105
+ action: 'get',
1106
+ error: 'ResourceNotFound',
1107
+ message: `数据模型 ${name} 不存在`
1108
+ }, null, 2)
1109
+ }]
1110
+ };
1111
+ }
1112
+ throw error;
1113
+ }
1114
+ case 'list':
1115
+ // 构建请求参数
1116
+ const listParams = {
1117
+ EnvId: currentEnvId,
1118
+ PageIndex: 1,
1119
+ PageSize: 1000,
1120
+ QuerySystemModel: true, // 查询系统模型
1121
+ QueryConnector: 0 // 0 表示数据模型
1122
+ };
1123
+ // 只有当 names 参数存在且不为空时才添加过滤条件
1124
+ if (names && names.length > 0) {
1125
+ listParams.DataSourceNames = names;
1126
+ }
1127
+ result = await cloudbase.commonService('lowcode').call({
1128
+ Action: 'DescribeDataSourceList',
1129
+ Param: listParams
1130
+ });
1131
+ const models = result.Data?.Rows || [];
1132
+ // 只保留基础字段,list操作不返回Schema
1133
+ const simplifiedModels = models.map((model) => ({
1134
+ DbInstanceType: model.DbInstanceType,
1135
+ Title: model.Title,
1136
+ Description: model.Description,
1137
+ Name: model.Name,
1138
+ UpdatedAt: model.UpdatedAt
1139
+ }));
1140
+ return {
1141
+ content: [{
1142
+ type: "text",
1143
+ text: JSON.stringify({
1144
+ success: true,
1145
+ action: 'list',
1146
+ data: simplifiedModels,
1147
+ count: simplifiedModels.length,
1148
+ message: "获取数据模型列表成功"
1149
+ }, null, 2)
1150
+ }]
1151
+ };
1152
+ case 'docs':
1153
+ if (!name) {
1154
+ throw new Error('生成SDK文档需要提供模型名称');
1155
+ }
1156
+ try {
1157
+ // 先获取模型信息
1158
+ result = await cloudbase.commonService('lowcode').call({
1159
+ Action: 'DescribeBasicDataSource',
1160
+ Param: {
1161
+ EnvId: currentEnvId,
1162
+ Name: name
1163
+ }
1164
+ });
1165
+ if (!result.Data) {
1166
+ throw new Error(`数据模型 ${name} 不存在`);
1167
+ }
1168
+ // 解析Schema获取字段信息
1169
+ let userFields = [];
1170
+ let relations = [];
1171
+ if (result.Data.Schema) {
1172
+ try {
1173
+ const schema = JSON.parse(result.Data.Schema);
1174
+ console.log(result.Data);
1175
+ const properties = schema.properties || {};
1176
+ // 提取用户定义的字段
1177
+ userFields = Object.keys(properties)
1178
+ .filter(key => !properties[key]['x-system'])
1179
+ .map(key => {
1180
+ const field = properties[key];
1181
+ return {
1182
+ name: key,
1183
+ type: field.type,
1184
+ title: field.title || key,
1185
+ required: schema.required?.includes(key) || false,
1186
+ description: field.description || '',
1187
+ format: field.format,
1188
+ enum: field.enum,
1189
+ default: field.default,
1190
+ linkage: field['x-parent']
1191
+ };
1192
+ });
1193
+ // 提取关联关系
1194
+ relations = userFields
1195
+ .filter(field => field.linkage)
1196
+ .map(field => ({
1197
+ field: field.name,
1198
+ type: field.format,
1199
+ title: field.title,
1200
+ targetModel: field.linkage.parentDataSourceName,
1201
+ foreignKey: field.linkage.parentFieldKey,
1202
+ displayField: field.linkage.parentFieldTitle
1203
+ }));
1204
+ }
1205
+ catch (e) {
1206
+ // Schema解析失败,使用空数组
1207
+ console.error('Schema解析失败', e);
1208
+ }
1209
+ }
1210
+ // 生成SDK使用文档
1211
+ const docs = generateSDKDocs(result.Data.Name, result.Data.Title, userFields, relations);
1212
+ return {
1213
+ content: [{
1214
+ type: "text",
1215
+ text: JSON.stringify({
1216
+ success: true,
1217
+ action: 'docs',
1218
+ modelName: name,
1219
+ modelTitle: result.Data.Title,
1220
+ docs,
1221
+ message: "SDK使用文档生成成功"
1222
+ }, null, 2)
1223
+ }]
1224
+ };
1225
+ }
1226
+ catch (error) {
1227
+ if (error.original?.Code === 'ResourceNotFound') {
1228
+ return {
1229
+ content: [{
1230
+ type: "text",
1231
+ text: JSON.stringify({
1232
+ success: false,
1233
+ action: 'docs',
1234
+ error: 'ResourceNotFound',
1235
+ message: `数据模型 ${name} 不存在`
1236
+ }, null, 2)
1237
+ }]
1238
+ };
1239
+ }
1240
+ throw error;
1241
+ }
1242
+ default:
1243
+ throw new Error(`不支持的操作类型: ${action}`);
1244
+ }
1245
+ }
1246
+ catch (error) {
1247
+ return {
1248
+ content: [{
1249
+ type: "text",
1250
+ text: JSON.stringify({
1251
+ success: false,
1252
+ action,
1253
+ error: error.message || error.original?.Message || '未知错误',
1254
+ code: error.original?.Code,
1255
+ message: "数据模型操作失败"
1256
+ }, null, 2)
1257
+ }]
1258
+ };
1259
+ }
1260
+ });
662
1261
  }
package/dist/tools/env.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { z } from "zod";
2
- import { getCloudBaseManager } from '../cloudbase-manager.js';
2
+ import { getCloudBaseManager, resetCloudBaseManagerCache } from '../cloudbase-manager.js';
3
3
  import { logout } from '../auth.js';
4
4
  import { clearUserEnvId, _promptAndSetEnvironmentId } from './interactive.js';
5
5
  import { debug } from '../utils/logger.js';
@@ -9,7 +9,7 @@ export function registerEnvTools(server) {
9
9
  forceUpdate: z.boolean().optional().describe("是否强制重新选择环境")
10
10
  }, async ({ forceUpdate = false }) => {
11
11
  try {
12
- const { selectedEnvId, cancelled, error, noEnvs } = await _promptAndSetEnvironmentId(false);
12
+ const { selectedEnvId, cancelled, error, noEnvs } = await _promptAndSetEnvironmentId(forceUpdate);
13
13
  debug("login", { selectedEnvId, cancelled, error, noEnvs });
14
14
  if (error) {
15
15
  return { content: [{ type: "text", text: error }] };
@@ -48,6 +48,7 @@ export function registerEnvTools(server) {
48
48
  await logout();
49
49
  // 清理环境ID配置
50
50
  await clearUserEnvId();
51
+ resetCloudBaseManagerCache();
51
52
  return {
52
53
  content: [{
53
54
  type: "text",
@@ -8,7 +8,7 @@ export const SUPPORTED_NODEJS_RUNTIMES = [
8
8
  'Nodejs 14.18',
9
9
  'Nodejs 12.16',
10
10
  'Nodejs 10.15',
11
- 'Nodejs 8.9(即将下线)',
11
+ 'Nodejs 8.9',
12
12
  ];
13
13
  export const DEFAULT_NODEJS_RUNTIME = 'Nodejs 18.15';
14
14
  /**
@@ -57,7 +57,7 @@ export function registerFunctionTools(server) {
57
57
  vpcId: z.string(),
58
58
  subnetId: z.string()
59
59
  }).optional().describe("私有网络配置"),
60
- runtime: z.string().optional().describe("运行时环境,可选值:" + SUPPORTED_NODEJS_RUNTIMES.join(',') + ",默认 Nodejs 18.15"),
60
+ runtime: z.string().optional().describe("运行时环境,建议指定为 'Nodejs 18.15',其他可选值:" + SUPPORTED_NODEJS_RUNTIMES.join(',')),
61
61
  installDependency: z.boolean().optional().describe("是否安装依赖,建议传 true"),
62
62
  triggers: z.array(z.object({
63
63
  name: z.string(),