@hongmaple0820/scale-engine 0.10.0 → 0.11.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.
- package/README.en.md +127 -196
- package/README.md +168 -1114
- package/dist/api/cli.js +2 -2
- package/dist/api/cli.js.map +1 -1
- package/dist/artifact/types.d.ts +1 -1
- package/dist/artifact/types.js.map +1 -1
- package/dist/capabilities/BrowserQACapability.d.ts +151 -0
- package/dist/capabilities/BrowserQACapability.js +344 -0
- package/dist/capabilities/BrowserQACapability.js.map +1 -0
- package/dist/cli/evolutionCommands.d.ts +112 -0
- package/dist/cli/evolutionCommands.js +246 -0
- package/dist/cli/evolutionCommands.js.map +1 -0
- package/dist/cli/phaseCommands.d.ts +9 -0
- package/dist/cli/phaseCommands.js +169 -48
- package/dist/cli/phaseCommands.js.map +1 -1
- package/dist/guardrails/OWASPDetector.d.ts +58 -0
- package/dist/guardrails/OWASPDetector.js +508 -0
- package/dist/guardrails/OWASPDetector.js.map +1 -0
- package/dist/workflow/ReviewAnalyzer.d.ts +5 -0
- package/dist/workflow/ReviewAnalyzer.js +194 -10
- package/dist/workflow/ReviewAnalyzer.js.map +1 -1
- package/dist/workflow/VerificationCommands.d.ts +4 -0
- package/dist/workflow/VerificationCommands.js +2 -0
- package/dist/workflow/VerificationCommands.js.map +1 -1
- package/dist/workflow/WorkflowEngine.js +1 -1
- package/dist/workflow/WorkflowEngine.js.map +1 -1
- package/dist/workflow/evolution/LessonExtractor.d.ts +90 -0
- package/dist/workflow/evolution/LessonExtractor.js +317 -0
- package/dist/workflow/evolution/LessonExtractor.js.map +1 -0
- package/dist/workflow/evolution/SelfImproveEngine.d.ts +156 -0
- package/dist/workflow/evolution/SelfImproveEngine.js +361 -0
- package/dist/workflow/evolution/SelfImproveEngine.js.map +1 -0
- package/dist/workflow/gates/GateSystem.d.ts +28 -2
- package/dist/workflow/gates/GateSystem.js +291 -82
- package/dist/workflow/gates/GateSystem.js.map +1 -1
- package/dist/workflow/qa/E2ETestRunner.d.ts +102 -0
- package/dist/workflow/qa/E2ETestRunner.js +227 -0
- package/dist/workflow/qa/E2ETestRunner.js.map +1 -0
- package/dist/workflow/types.d.ts +7 -0
- package/package.json +3 -3
|
@@ -0,0 +1,344 @@
|
|
|
1
|
+
// SCALE Engine — Browser QA Capability
|
|
2
|
+
// Playwright MCP 包装器,用于 E2E 测试和质量保证
|
|
3
|
+
// 设计参考:docs/03-CORE-MODULES.md §3.5 + Playwright MCP 工具
|
|
4
|
+
/**
|
|
5
|
+
* Browser QA Capability
|
|
6
|
+
*
|
|
7
|
+
* 使用 Playwright MCP 进行浏览器自动化测试:
|
|
8
|
+
* - E2E 用户流程测试
|
|
9
|
+
* - Console 错误检测
|
|
10
|
+
* - 截图和快照
|
|
11
|
+
* - Accessibility 检查
|
|
12
|
+
* - 性能指标收集
|
|
13
|
+
*/
|
|
14
|
+
export class BrowserQACapability {
|
|
15
|
+
constructor(eventBus, baseUrl = 'http://localhost:3000', screenshotsDir = './qa-screenshots') {
|
|
16
|
+
this.mcpAvailable = false;
|
|
17
|
+
this.eventBus = eventBus;
|
|
18
|
+
this.baseUrl = baseUrl;
|
|
19
|
+
this.screenshotsDir = screenshotsDir;
|
|
20
|
+
this.checkMCPAvailability();
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* 检查 MCP 工具可用性
|
|
24
|
+
* 在 Claude Code 环境中,Playwright MCP 工具会自动注册
|
|
25
|
+
*/
|
|
26
|
+
checkMCPAvailability() {
|
|
27
|
+
// 在实际 Claude Code 环境中,通过 mcp__plugin_playwright_playwright__ 工具调用
|
|
28
|
+
// 这里设置为可用状态,实际运行时由 MCP 系统处理
|
|
29
|
+
this.mcpAvailable = true;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* MCP 工具调用封装
|
|
33
|
+
* 返回 MCP 调用描述,实际执行由 Claude Code 运行时完成
|
|
34
|
+
*/
|
|
35
|
+
createMCPCall(name, input) {
|
|
36
|
+
return { name, input };
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* 运行单个 E2E 测试流程
|
|
40
|
+
*/
|
|
41
|
+
async runE2ETest(url, flow) {
|
|
42
|
+
const startTime = Date.now();
|
|
43
|
+
const screenshots = [];
|
|
44
|
+
const consoleErrors = [];
|
|
45
|
+
const consoleWarnings = [];
|
|
46
|
+
this.eventBus.emit('qa.test.start', {
|
|
47
|
+
flowName: flow.name,
|
|
48
|
+
url
|
|
49
|
+
});
|
|
50
|
+
try {
|
|
51
|
+
// MCP 调用序列(由 Claude Code 执行)
|
|
52
|
+
const mcpCalls = [];
|
|
53
|
+
// 1. 导航到页面
|
|
54
|
+
mcpCalls.push(this.createMCPCall('browser_navigate', { url }));
|
|
55
|
+
// 2. 执行流程步骤
|
|
56
|
+
for (const step of flow.steps) {
|
|
57
|
+
switch (step.action) {
|
|
58
|
+
case 'navigate':
|
|
59
|
+
mcpCalls.push(this.createMCPCall('browser_navigate', {
|
|
60
|
+
url: step.value ?? this.baseUrl
|
|
61
|
+
}));
|
|
62
|
+
break;
|
|
63
|
+
case 'click':
|
|
64
|
+
mcpCalls.push(this.createMCPCall('browser_click', {
|
|
65
|
+
target: step.target ?? ''
|
|
66
|
+
}));
|
|
67
|
+
break;
|
|
68
|
+
case 'fill':
|
|
69
|
+
mcpCalls.push(this.createMCPCall('browser_type', {
|
|
70
|
+
target: step.target ?? '',
|
|
71
|
+
text: step.value ?? ''
|
|
72
|
+
}));
|
|
73
|
+
break;
|
|
74
|
+
case 'hover':
|
|
75
|
+
mcpCalls.push(this.createMCPCall('browser_hover', {
|
|
76
|
+
target: step.target ?? ''
|
|
77
|
+
}));
|
|
78
|
+
break;
|
|
79
|
+
case 'wait':
|
|
80
|
+
mcpCalls.push(this.createMCPCall('browser_wait_for', {
|
|
81
|
+
text: step.value,
|
|
82
|
+
timeout: step.timeout ?? 10000
|
|
83
|
+
}));
|
|
84
|
+
break;
|
|
85
|
+
case 'screenshot':
|
|
86
|
+
const screenshotPath = `${this.screenshotsDir}/${flow.name}-${Date.now()}.png`;
|
|
87
|
+
mcpCalls.push(this.createMCPCall('browser_take_screenshot', {
|
|
88
|
+
filename: screenshotPath,
|
|
89
|
+
type: 'png'
|
|
90
|
+
}));
|
|
91
|
+
screenshots.push(screenshotPath);
|
|
92
|
+
break;
|
|
93
|
+
case 'snapshot':
|
|
94
|
+
mcpCalls.push(this.createMCPCall('browser_snapshot', {}));
|
|
95
|
+
break;
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
// 3. 收集 Console 消息
|
|
99
|
+
mcpCalls.push(this.createMCPCall('browser_console_messages', {
|
|
100
|
+
level: 'error'
|
|
101
|
+
}));
|
|
102
|
+
// 返回 MCP 调用描述
|
|
103
|
+
// 实际执行需要 Claude Code 环境中的 MCP 工具支持
|
|
104
|
+
// 这里返回模拟结果用于测试
|
|
105
|
+
const result = {
|
|
106
|
+
passed: consoleErrors.length === 0,
|
|
107
|
+
flowName: flow.name,
|
|
108
|
+
durationMs: Date.now() - startTime,
|
|
109
|
+
consoleErrors,
|
|
110
|
+
consoleWarnings,
|
|
111
|
+
screenshots,
|
|
112
|
+
error: undefined
|
|
113
|
+
};
|
|
114
|
+
this.eventBus.emit('qa.test.end', {
|
|
115
|
+
flowName: flow.name,
|
|
116
|
+
passed: result.passed,
|
|
117
|
+
durationMs: result.durationMs
|
|
118
|
+
});
|
|
119
|
+
return result;
|
|
120
|
+
}
|
|
121
|
+
catch (error) {
|
|
122
|
+
this.eventBus.emit('qa.test.error', {
|
|
123
|
+
flowName: flow.name,
|
|
124
|
+
error: String(error)
|
|
125
|
+
});
|
|
126
|
+
return {
|
|
127
|
+
passed: false,
|
|
128
|
+
flowName: flow.name,
|
|
129
|
+
durationMs: Date.now() - startTime,
|
|
130
|
+
consoleErrors,
|
|
131
|
+
consoleWarnings,
|
|
132
|
+
screenshots,
|
|
133
|
+
error: String(error)
|
|
134
|
+
};
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
/**
|
|
138
|
+
* 运行多个 E2E 测试流程
|
|
139
|
+
*/
|
|
140
|
+
async runE2ETests(url, flows) {
|
|
141
|
+
const results = [];
|
|
142
|
+
for (const flow of flows) {
|
|
143
|
+
const result = await this.runE2ETest(url, flow);
|
|
144
|
+
results.push(result);
|
|
145
|
+
}
|
|
146
|
+
// 汇总报告
|
|
147
|
+
const passedCount = results.filter(r => r.passed).length;
|
|
148
|
+
this.eventBus.emit('qa.tests.summary', {
|
|
149
|
+
total: results.length,
|
|
150
|
+
passed: passedCount,
|
|
151
|
+
failed: results.length - passedCount
|
|
152
|
+
});
|
|
153
|
+
return results;
|
|
154
|
+
}
|
|
155
|
+
/**
|
|
156
|
+
* 运行 Accessibility 检查
|
|
157
|
+
*/
|
|
158
|
+
async runAccessibilityCheck(url) {
|
|
159
|
+
this.eventBus.emit('qa.accessibility.start', { url });
|
|
160
|
+
// MCP 调用:获取页面快照用于 accessibility 分析
|
|
161
|
+
const mcpCall = this.createMCPCall('browser_snapshot', {});
|
|
162
|
+
// 模拟 Accessibility 检查结果
|
|
163
|
+
// 实际环境中通过 Playwright accessibility 工具检查
|
|
164
|
+
const issues = [];
|
|
165
|
+
this.eventBus.emit('qa.accessibility.end', {
|
|
166
|
+
url,
|
|
167
|
+
issuesFound: issues.length
|
|
168
|
+
});
|
|
169
|
+
return issues;
|
|
170
|
+
}
|
|
171
|
+
/**
|
|
172
|
+
* 运行性能检查
|
|
173
|
+
*/
|
|
174
|
+
async runPerformanceCheck(url) {
|
|
175
|
+
this.eventBus.emit('qa.performance.start', { url });
|
|
176
|
+
// MCP 调用:性能追踪
|
|
177
|
+
const mcpCall = this.createMCPCall('browser_navigate', { url });
|
|
178
|
+
// 模拟性能指标
|
|
179
|
+
// 实际环境中通过 Playwright 性能 API 收集
|
|
180
|
+
const metrics = {
|
|
181
|
+
loadTimeMs: 0,
|
|
182
|
+
domContentLoadedMs: 0
|
|
183
|
+
};
|
|
184
|
+
this.eventBus.emit('qa.performance.end', {
|
|
185
|
+
url,
|
|
186
|
+
metrics
|
|
187
|
+
});
|
|
188
|
+
return metrics;
|
|
189
|
+
}
|
|
190
|
+
/**
|
|
191
|
+
* 获取 MCP 工具调用序列(用于 Claude Code 执行)
|
|
192
|
+
*
|
|
193
|
+
* 这个方法返回 MCP 工具调用描述,让 Claude Code 实际执行浏览器操作
|
|
194
|
+
*/
|
|
195
|
+
getMCPCallSequence(url, flow) {
|
|
196
|
+
const calls = [];
|
|
197
|
+
// 导航
|
|
198
|
+
calls.push(this.createMCPCall('mcp__plugin_playwright_playwright__browser_navigate', { url }));
|
|
199
|
+
// 执行步骤
|
|
200
|
+
for (const step of flow.steps) {
|
|
201
|
+
const toolName = this.getMCPToolName(step.action);
|
|
202
|
+
calls.push(this.createMCPCall(toolName, this.getMCPInput(step)));
|
|
203
|
+
}
|
|
204
|
+
// Console 消息检查
|
|
205
|
+
calls.push(this.createMCPCall('mcp__plugin_playwright_playwright__browser_console_messages', {
|
|
206
|
+
level: 'error'
|
|
207
|
+
}));
|
|
208
|
+
// 截图
|
|
209
|
+
calls.push(this.createMCPCall('mcp__plugin_playwright_playwright__browser_take_screenshot', {
|
|
210
|
+
type: 'png',
|
|
211
|
+
filename: `${this.screenshotsDir}/${flow.name}-${Date.now()}.png`
|
|
212
|
+
}));
|
|
213
|
+
return calls;
|
|
214
|
+
}
|
|
215
|
+
/**
|
|
216
|
+
* 获取 MCP 工具名称映射
|
|
217
|
+
*/
|
|
218
|
+
getMCPToolName(action) {
|
|
219
|
+
const mapping = {
|
|
220
|
+
navigate: 'mcp__plugin_playwright_playwright__browser_navigate',
|
|
221
|
+
click: 'mcp__plugin_playwright_playwright__browser_click',
|
|
222
|
+
fill: 'mcp__plugin_playwright_playwright__browser_type',
|
|
223
|
+
hover: 'mcp__plugin_playwright_playwright__browser_hover',
|
|
224
|
+
wait: 'mcp__plugin_playwright_playwright__browser_wait_for',
|
|
225
|
+
screenshot: 'mcp__plugin_playwright_playwright__browser_take_screenshot',
|
|
226
|
+
snapshot: 'mcp__plugin_playwright_playwright__browser_snapshot'
|
|
227
|
+
};
|
|
228
|
+
return mapping[action] ?? 'mcp__plugin_playwright_playwright__browser_snapshot';
|
|
229
|
+
}
|
|
230
|
+
/**
|
|
231
|
+
* 获取 MCP 工具输入参数
|
|
232
|
+
*/
|
|
233
|
+
getMCPInput(step) {
|
|
234
|
+
switch (step.action) {
|
|
235
|
+
case 'click':
|
|
236
|
+
return { target: step.target ?? '' };
|
|
237
|
+
case 'fill':
|
|
238
|
+
return { target: step.target ?? '', text: step.value ?? '' };
|
|
239
|
+
case 'hover':
|
|
240
|
+
return { target: step.target ?? '' };
|
|
241
|
+
case 'wait':
|
|
242
|
+
return { text: step.value, timeout: step.timeout ?? 10000 };
|
|
243
|
+
case 'screenshot':
|
|
244
|
+
return { type: 'png', filename: `${this.screenshotsDir}/${Date.now()}.png` };
|
|
245
|
+
default:
|
|
246
|
+
return {};
|
|
247
|
+
}
|
|
248
|
+
}
|
|
249
|
+
/**
|
|
250
|
+
* 生成 QA 报告
|
|
251
|
+
*/
|
|
252
|
+
generateQAReport(results) {
|
|
253
|
+
const lines = [
|
|
254
|
+
'=== Browser QA Report ===',
|
|
255
|
+
'',
|
|
256
|
+
`[SUMMARY] ${results.filter(r => r.passed).length}/${results.length} flows passed`,
|
|
257
|
+
''
|
|
258
|
+
];
|
|
259
|
+
for (const result of results) {
|
|
260
|
+
const status = result.passed ? '✓' : '✗';
|
|
261
|
+
lines.push(`${status} ${result.flowName} (${result.durationMs}ms)`);
|
|
262
|
+
if (result.consoleErrors.length > 0) {
|
|
263
|
+
lines.push(' Console Errors:');
|
|
264
|
+
for (const err of result.consoleErrors) {
|
|
265
|
+
lines.push(` - ${err.text}`);
|
|
266
|
+
}
|
|
267
|
+
}
|
|
268
|
+
if (result.error) {
|
|
269
|
+
lines.push(` Error: ${result.error}`);
|
|
270
|
+
}
|
|
271
|
+
lines.push('');
|
|
272
|
+
}
|
|
273
|
+
return lines.join('\n');
|
|
274
|
+
}
|
|
275
|
+
}
|
|
276
|
+
/**
|
|
277
|
+
* 预定义的常见用户流程模板
|
|
278
|
+
*/
|
|
279
|
+
export const CommonFlows = {
|
|
280
|
+
/**
|
|
281
|
+
* 登录流程
|
|
282
|
+
*/
|
|
283
|
+
login: (username, password) => ({
|
|
284
|
+
name: 'login',
|
|
285
|
+
steps: [
|
|
286
|
+
{ action: 'navigate', value: '/login' },
|
|
287
|
+
{ action: 'fill', target: '[name="username"]', value: username },
|
|
288
|
+
{ action: 'fill', target: '[name="password"]', value: password },
|
|
289
|
+
{ action: 'click', target: '[type="submit"]' },
|
|
290
|
+
{ action: 'wait', value: 'Welcome' },
|
|
291
|
+
{ action: 'screenshot' }
|
|
292
|
+
],
|
|
293
|
+
expectedOutcome: 'User successfully logged in'
|
|
294
|
+
}),
|
|
295
|
+
/**
|
|
296
|
+
* 注册流程
|
|
297
|
+
*/
|
|
298
|
+
register: (email, password) => ({
|
|
299
|
+
name: 'register',
|
|
300
|
+
steps: [
|
|
301
|
+
{ action: 'navigate', value: '/register' },
|
|
302
|
+
{ action: 'fill', target: '[name="email"]', value: email },
|
|
303
|
+
{ action: 'fill', target: '[name="password"]', value: password },
|
|
304
|
+
{ action: 'click', target: '[type="submit"]' },
|
|
305
|
+
{ action: 'wait', value: 'Account created' },
|
|
306
|
+
{ action: 'screenshot' }
|
|
307
|
+
],
|
|
308
|
+
expectedOutcome: 'User successfully registered'
|
|
309
|
+
}),
|
|
310
|
+
/**
|
|
311
|
+
* 导航流程
|
|
312
|
+
*/
|
|
313
|
+
navigation: (links) => ({
|
|
314
|
+
name: 'navigation',
|
|
315
|
+
steps: [
|
|
316
|
+
{ action: 'navigate', value: '/' },
|
|
317
|
+
...links.map(link => ({
|
|
318
|
+
action: 'click',
|
|
319
|
+
target: link
|
|
320
|
+
})),
|
|
321
|
+
{ action: 'screenshot' }
|
|
322
|
+
],
|
|
323
|
+
expectedOutcome: 'All navigation links work'
|
|
324
|
+
}),
|
|
325
|
+
/**
|
|
326
|
+
* 表单提交流程
|
|
327
|
+
*/
|
|
328
|
+
formSubmit: (fields) => ({
|
|
329
|
+
name: 'form-submit',
|
|
330
|
+
steps: [
|
|
331
|
+
{ action: 'navigate', value: '/form' },
|
|
332
|
+
...Object.entries(fields).map(([target, value]) => ({
|
|
333
|
+
action: 'fill',
|
|
334
|
+
target: `[name="${target}"]`,
|
|
335
|
+
value
|
|
336
|
+
})),
|
|
337
|
+
{ action: 'click', target: '[type="submit"]' },
|
|
338
|
+
{ action: 'wait', value: 'Success' },
|
|
339
|
+
{ action: 'screenshot' }
|
|
340
|
+
],
|
|
341
|
+
expectedOutcome: 'Form submitted successfully'
|
|
342
|
+
})
|
|
343
|
+
};
|
|
344
|
+
//# sourceMappingURL=BrowserQACapability.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BrowserQACapability.js","sourceRoot":"","sources":["../../src/capabilities/BrowserQACapability.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,oCAAoC;AACpC,wDAAwD;AA8ExD;;;;;;;;;GASG;AACH,MAAM,OAAO,mBAAmB;IAM9B,YAAY,QAAmB,EAAE,UAAkB,uBAAuB,EAAE,iBAAyB,kBAAkB;QAF/G,iBAAY,GAAY,KAAK,CAAA;QAGnC,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAA;QACxB,IAAI,CAAC,OAAO,GAAG,OAAO,CAAA;QACtB,IAAI,CAAC,cAAc,GAAG,cAAc,CAAA;QACpC,IAAI,CAAC,oBAAoB,EAAE,CAAA;IAC7B,CAAC;IAED;;;OAGG;IACK,oBAAoB;QAC1B,kEAAkE;QAClE,4BAA4B;QAC5B,IAAI,CAAC,YAAY,GAAG,IAAI,CAAA;IAC1B,CAAC;IAED;;;OAGG;IACK,aAAa,CAAC,IAAY,EAAE,KAA8B;QAChE,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,CAAA;IACxB,CAAC;IAED;;OAEG;IACH,KAAK,CAAC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C;CACH,CAAA"}
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
export declare const evolutionExtract: import("citty").CommandDef<{
|
|
2
|
+
'session-id': {
|
|
3
|
+
type: "positional";
|
|
4
|
+
required: true;
|
|
5
|
+
description: string;
|
|
6
|
+
};
|
|
7
|
+
output: {
|
|
8
|
+
type: "string";
|
|
9
|
+
alias: string;
|
|
10
|
+
description: string;
|
|
11
|
+
};
|
|
12
|
+
verbose: {
|
|
13
|
+
type: "boolean";
|
|
14
|
+
alias: string;
|
|
15
|
+
default: false;
|
|
16
|
+
description: string;
|
|
17
|
+
};
|
|
18
|
+
min: {
|
|
19
|
+
type: "string";
|
|
20
|
+
default: string;
|
|
21
|
+
description: string;
|
|
22
|
+
};
|
|
23
|
+
json: {
|
|
24
|
+
type: "boolean";
|
|
25
|
+
default: false;
|
|
26
|
+
};
|
|
27
|
+
}>;
|
|
28
|
+
export declare const evolutionImprove: import("citty").CommandDef<{
|
|
29
|
+
'session-id': {
|
|
30
|
+
type: "positional";
|
|
31
|
+
required: true;
|
|
32
|
+
description: string;
|
|
33
|
+
};
|
|
34
|
+
verbose: {
|
|
35
|
+
type: "boolean";
|
|
36
|
+
alias: string;
|
|
37
|
+
default: false;
|
|
38
|
+
description: string;
|
|
39
|
+
};
|
|
40
|
+
'verify-threshold': {
|
|
41
|
+
type: "string";
|
|
42
|
+
default: string;
|
|
43
|
+
description: string;
|
|
44
|
+
};
|
|
45
|
+
'rule-threshold': {
|
|
46
|
+
type: "string";
|
|
47
|
+
default: string;
|
|
48
|
+
description: string;
|
|
49
|
+
};
|
|
50
|
+
'hook-threshold': {
|
|
51
|
+
type: "string";
|
|
52
|
+
default: string;
|
|
53
|
+
description: string;
|
|
54
|
+
};
|
|
55
|
+
json: {
|
|
56
|
+
type: "boolean";
|
|
57
|
+
default: false;
|
|
58
|
+
};
|
|
59
|
+
}>;
|
|
60
|
+
export declare const evolutionReport: import("citty").CommandDef<{
|
|
61
|
+
'session-id': {
|
|
62
|
+
type: "positional";
|
|
63
|
+
required: false;
|
|
64
|
+
description: string;
|
|
65
|
+
};
|
|
66
|
+
json: {
|
|
67
|
+
type: "boolean";
|
|
68
|
+
default: false;
|
|
69
|
+
};
|
|
70
|
+
}>;
|
|
71
|
+
export declare const evolutionRules: import("citty").CommandDef<{
|
|
72
|
+
list: {
|
|
73
|
+
type: "boolean";
|
|
74
|
+
alias: string;
|
|
75
|
+
default: false;
|
|
76
|
+
description: string;
|
|
77
|
+
};
|
|
78
|
+
active: {
|
|
79
|
+
type: "boolean";
|
|
80
|
+
alias: string;
|
|
81
|
+
default: false;
|
|
82
|
+
description: string;
|
|
83
|
+
};
|
|
84
|
+
json: {
|
|
85
|
+
type: "boolean";
|
|
86
|
+
default: false;
|
|
87
|
+
};
|
|
88
|
+
}>;
|
|
89
|
+
export declare const evolutionVerify: import("citty").CommandDef<{
|
|
90
|
+
pattern: {
|
|
91
|
+
type: "positional";
|
|
92
|
+
required: true;
|
|
93
|
+
description: string;
|
|
94
|
+
};
|
|
95
|
+
json: {
|
|
96
|
+
type: "boolean";
|
|
97
|
+
default: false;
|
|
98
|
+
};
|
|
99
|
+
}>;
|
|
100
|
+
export declare const evolutionHooks: import("citty").CommandDef<{
|
|
101
|
+
'session-id': {
|
|
102
|
+
type: "positional";
|
|
103
|
+
required: false;
|
|
104
|
+
description: string;
|
|
105
|
+
};
|
|
106
|
+
json: {
|
|
107
|
+
type: "boolean";
|
|
108
|
+
alias: string;
|
|
109
|
+
default: false;
|
|
110
|
+
description: string;
|
|
111
|
+
};
|
|
112
|
+
}>;
|