@autotest/agent 0.0.1
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.md +648 -0
- package/dist/api/agent_api.d.ts +37 -0
- package/dist/api/autotest_agent.d.ts +60 -0
- package/dist/api/types.d.ts +86 -0
- package/dist/autotest-cli.d.ts +2 -0
- package/dist/common/case_manager.d.ts +10 -0
- package/dist/common/collect_case.d.ts +29 -0
- package/dist/common/common_errors.d.ts +30 -0
- package/dist/common/config/config.yaml +113 -0
- package/dist/common/config/config_validator.d.ts +8 -0
- package/dist/common/config/manager.d.ts +38 -0
- package/dist/common/config/output.d.ts +11 -0
- package/dist/common/config/types.d.ts +2963 -0
- package/dist/common/dfx/client_factory.d.ts +23 -0
- package/dist/common/dfx/context.d.ts +4 -0
- package/dist/common/dfx/index.d.ts +6 -0
- package/dist/common/dfx/recorder.d.ts +59 -0
- package/dist/common/dfx/recording_fetch.d.ts +4 -0
- package/dist/common/dfx/source.d.ts +9 -0
- package/dist/common/image_cacher.d.ts +10 -0
- package/dist/common/image_helper.d.ts +19 -0
- package/dist/common/image_similarity.d.ts +7 -0
- package/dist/common/llm_cache/cache_transport.d.ts +10 -0
- package/dist/common/logger.d.ts +17 -0
- package/dist/common/model/custom_model.d.ts +52 -0
- package/dist/common/model/index.d.ts +3 -0
- package/dist/common/path_utils.d.ts +11 -0
- package/dist/common/result_parser.d.ts +10 -0
- package/dist/common/usage/token_usage.d.ts +23 -0
- package/dist/common/utils.d.ts +44 -0
- package/dist/core/agent/layered_agent/ability_helper.d.ts +36 -0
- package/dist/core/agent/layered_agent/agent.d.ts +15 -0
- package/dist/core/agent/layered_agent/agent_registry.d.ts +34 -0
- package/dist/core/agent/layered_agent/decision.d.ts +82 -0
- package/dist/core/agent/layered_agent/execute_agent/action_handler.d.ts +26 -0
- package/dist/core/agent/layered_agent/execute_agent/agent_factory.d.ts +24 -0
- package/dist/core/agent/layered_agent/execute_agent/base_agent.d.ts +83 -0
- package/dist/core/agent/layered_agent/execute_agent/general_agent.d.ts +33 -0
- package/dist/core/agent/layered_agent/execute_agent/glm_agent.d.ts +36 -0
- package/dist/core/agent/layered_agent/execute_agent/i18n.d.ts +26 -0
- package/dist/core/agent/layered_agent/execute_agent/index.d.ts +16 -0
- package/dist/core/agent/layered_agent/execute_agent/mai_ui_agent.d.ts +52 -0
- package/dist/core/agent/layered_agent/execute_agent/mcp_prompts.d.ts +4 -0
- package/dist/core/agent/layered_agent/execute_agent/parser/general_parser.d.ts +22 -0
- package/dist/core/agent/layered_agent/execute_agent/parser/glm_parser.d.ts +14 -0
- package/dist/core/agent/layered_agent/execute_agent/parser/index.d.ts +7 -0
- package/dist/core/agent/layered_agent/execute_agent/parser/mai_ui_parser.d.ts +17 -0
- package/dist/core/agent/layered_agent/execute_agent/prompts.d.ts +2 -0
- package/dist/core/agent/layered_agent/execute_agent/simple_reporter.d.ts +13 -0
- package/dist/core/agent/layered_agent/execute_agent/utils.d.ts +6 -0
- package/dist/core/agent/report_analyzer_agent/agent.d.ts +22 -0
- package/dist/core/agent/report_analyzer_agent/config.d.ts +5 -0
- package/dist/core/agent/report_analyzer_agent/data_loader.d.ts +26 -0
- package/dist/core/agent/report_analyzer_agent/guardrails.d.ts +9 -0
- package/dist/core/agent/report_analyzer_agent/hooks.d.ts +6 -0
- package/dist/core/agent/report_analyzer_agent/index.d.ts +17 -0
- package/dist/core/agent/report_analyzer_agent/key_steps_builder.d.ts +9 -0
- package/dist/core/agent/report_analyzer_agent/mapping.d.ts +6 -0
- package/dist/core/agent/report_analyzer_agent/parse.d.ts +4 -0
- package/dist/core/agent/report_analyzer_agent/prompt.d.ts +2 -0
- package/dist/core/agent/report_analyzer_agent/prompts/main_agent.md +198 -0
- package/dist/core/agent/report_analyzer_agent/prompts/main_agent_v2.0.md +420 -0
- package/dist/core/agent/report_analyzer_agent/report_writer.d.ts +8 -0
- package/dist/core/agent/report_analyzer_agent/tools.d.ts +26 -0
- package/dist/core/agent/report_analyzer_agent/types.d.ts +97 -0
- package/dist/core/agent/rewrite_agent/agent.d.ts +27 -0
- package/dist/core/agent/rewrite_agent/guardrails.d.ts +16 -0
- package/dist/core/agent/rewrite_agent/mapping.d.ts +25 -0
- package/dist/core/agent/rewrite_agent/parse.d.ts +14 -0
- package/dist/core/agent/rewrite_agent/prompts/rewriter_v1.0.md +168 -0
- package/dist/core/agent/rewrite_agent/types.d.ts +50 -0
- package/dist/core/agent/single_agent/agent.d.ts +43 -0
- package/dist/core/agent/single_agent/hook_manager.d.ts +43 -0
- package/dist/core/agent/single_agent/hooks.d.ts +23 -0
- package/dist/core/agent/single_agent/image_utils.d.ts +38 -0
- package/dist/core/agent/single_agent/scroll_search_agent.d.ts +58 -0
- package/dist/core/agent/single_agent/subagent_manager.d.ts +51 -0
- package/dist/core/agent/single_agent/tool_recorder_hook.d.ts +20 -0
- package/dist/core/agent/types.d.ts +43 -0
- package/dist/core/agent/utils/message_builder.d.ts +38 -0
- package/dist/core/device/device_protocol.d.ts +3 -0
- package/dist/core/device/hdc/apps.d.ts +38 -0
- package/dist/core/device/hdc/device.d.ts +59 -0
- package/dist/core/device/hdc/index.d.ts +9 -0
- package/dist/core/device/hdc/input.d.ts +20 -0
- package/dist/core/device/hdc/screenshot.d.ts +19 -0
- package/dist/core/device/index.d.ts +49 -0
- package/dist/core/device/types.d.ts +37 -0
- package/dist/core/knowledge/knowledge_manager.d.ts +22 -0
- package/dist/core/knowledge/vectordb.d.ts +44 -0
- package/dist/core/mcp/adapter_factory.d.ts +10 -0
- package/dist/core/mcp/android_adapter.d.ts +30 -0
- package/dist/core/mcp/base_adapter.d.ts +26 -0
- package/dist/core/mcp/harmony_hdc_adapter.d.ts +49 -0
- package/dist/core/mcp/ios_adapter.d.ts +30 -0
- package/dist/core/mcp/local_tools.d.ts +20 -0
- package/dist/core/mcp/mcp_tools.d.ts +51 -0
- package/dist/core/mcp/types.d.ts +24 -0
- package/dist/core/memory/compressed_session.d.ts +46 -0
- package/dist/core/memory/context_compressor.d.ts +24 -0
- package/dist/core/memory/index.d.ts +7 -0
- package/dist/core/memory/memory_manager.d.ts +21 -0
- package/dist/core/memory/reflector.d.ts +20 -0
- package/dist/core/memory/session_factory.d.ts +17 -0
- package/dist/core/memory/tool_player.d.ts +82 -0
- package/dist/core/memory/tool_recorder.d.ts +33 -0
- package/dist/core/preprocessor/task_splitter.d.ts +26 -0
- package/dist/core/prompt/prompt_loader.d.ts +24 -0
- package/dist/core/prompt/templates/debug/planner/planner_v0.0.md +290 -0
- package/dist/core/prompt/templates/debug/planner/planner_v1.0.md +221 -0
- package/dist/core/prompt/templates/debug/planner/planner_v1.1-dy.md +74 -0
- package/dist/core/prompt/templates/debug/planner/planner_v2.0.md +319 -0
- package/dist/core/prompt/templates/fast_action/fast_action_v1.0.md +46 -0
- package/dist/core/prompt/templates/hypium/hypium_v1.0.md +33 -0
- package/dist/core/prompt/templates/hypium/hypium_v2.0.md +285 -0
- package/dist/core/prompt/templates/planner/planner_v2.0.md +319 -0
- package/dist/core/prompt/templates/single/single_v1.0.md +452 -0
- package/dist/core/prompt/templates/single/single_v2.0.md +306 -0
- package/dist/core/prompt/templates/single/single_v2.0_eco.md +313 -0
- package/dist/core/prompt/templates/single/single_v3.0.md +200 -0
- package/dist/core/prompt/templates/splitter/task_splitter_v1.0.md +141 -0
- package/dist/core/skill/skill_manager.d.ts +54 -0
- package/dist/data_types/action.d.ts +2 -0
- package/dist/data_types/agent.d.ts +2 -0
- package/dist/data_types/device.d.ts +2 -0
- package/dist/data_types/index.d.ts +6 -0
- package/dist/data_types/report.d.ts +2 -0
- package/dist/data_types/task.d.ts +2 -0
- package/dist/hypium_generator/generator.d.ts +38 -0
- package/dist/index.d.ts +46 -0
- package/dist/index.js +1 -0
- package/dist/loop/cli.d.ts +39 -0
- package/dist/loop/orchestrator.d.ts +47 -0
- package/dist/loop/result_writer.d.ts +12 -0
- package/dist/loop/types.d.ts +77 -0
- package/dist/mcp-server/server.d.ts +15 -0
- package/dist/mcp-server/types.d.ts +196 -0
- package/dist/reporter/batch_summary.d.ts +19 -0
- package/dist/reporter/generator.d.ts +46 -0
- package/dist/reporter/types.d.ts +88 -0
- package/dist/tools/batch_runner.d.ts +92 -0
- package/package.json +51 -0
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Loop CLI 分发 — 移植自 python loop/cli.py
|
|
3
|
+
*
|
|
4
|
+
* resolveMaxLoops / resolveMode / loadAnalyzerSummary / shouldSuppressAnalyzeAfter
|
|
5
|
+
*
|
|
6
|
+
* 与 python 版的差异:args 用普通对象(LoopCliArgs)而非 argparse Namespace;
|
|
7
|
+
* config 读 config.agent.maxLoops(可选,不存在时按 0 处理)。
|
|
8
|
+
*/
|
|
9
|
+
import { LoopMode } from './types';
|
|
10
|
+
/** CLI 参数(loop 相关)。 */
|
|
11
|
+
export interface LoopCliArgs {
|
|
12
|
+
task?: string;
|
|
13
|
+
loop?: boolean;
|
|
14
|
+
maxLoops?: number | null;
|
|
15
|
+
analyze?: string | null;
|
|
16
|
+
rewrite?: string | null;
|
|
17
|
+
analyzeAfter?: boolean;
|
|
18
|
+
}
|
|
19
|
+
/** --loop 启用时的默认迭代次数(config.max_loops 未设或为 0 时兜底)。 */
|
|
20
|
+
export declare const DEFAULT_LOOP_ITERATIONS = 3;
|
|
21
|
+
/** OR 融通 CLI 参数与配置,确定最终 max_loops。 */
|
|
22
|
+
export declare function resolveMaxLoops(args: LoopCliArgs, configMaxLoops: number): number;
|
|
23
|
+
export interface ResolvedMode {
|
|
24
|
+
mode: LoopMode;
|
|
25
|
+
maxLoops: number;
|
|
26
|
+
inputReportDir: string | null;
|
|
27
|
+
}
|
|
28
|
+
/** 根据 CLI 参数分发执行模式。返回 (mode, maxLoops, inputReportDir)。 */
|
|
29
|
+
export declare function resolveMode(args: LoopCliArgs, configMaxLoops: number, cfgAnalyzeAfter: boolean): ResolvedMode;
|
|
30
|
+
export interface AnalyzerSummary {
|
|
31
|
+
summary: Record<string, unknown>;
|
|
32
|
+
originalTask: string;
|
|
33
|
+
}
|
|
34
|
+
/** 读取 analysis_result.json 并裁剪为 summary dict(移植自 python _load_analyzer_summary)。
|
|
35
|
+
* Node.js 与 python 的 analysis_result.json 字段集一致(snake_case)。 */
|
|
36
|
+
export declare function loadAnalyzerSummary(reportDir: string): AnalyzerSummary;
|
|
37
|
+
/** 判断是否抑制 --analyze-after(loop 闭环已内部归因时)。 */
|
|
38
|
+
export declare function shouldSuppressAnalyzeAfter(args: LoopCliArgs, mode: LoopMode, cfgAnalyzeAfter: boolean): boolean;
|
|
39
|
+
//# sourceMappingURL=cli.d.ts.map
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Loop 闭环编排器 — 状态机核心 — 移植自 python loop/orchestrator.py
|
|
3
|
+
*
|
|
4
|
+
* 实现"执行→归因→改写→重执行"的自愈闭环,包裹三个原语(execute/analyze/rewrite),
|
|
5
|
+
* 零侵入原语签名(依赖注入,避免循环导入)。
|
|
6
|
+
*
|
|
7
|
+
* 5 种执行模式(mode-driven 跳步):
|
|
8
|
+
* FULL_LOOP: Step 1→2→3→4→5→6→7→8→9(完整闭环,多轮)
|
|
9
|
+
* EXECUTE_ANALYZE: Step 1→2(执行+归因,单轮)
|
|
10
|
+
* EXECUTE_ONLY: Step 1(仅执行,单轮)
|
|
11
|
+
* ANALYZE_ONLY: Step 2(仅归因,需 inputReportDir,单轮)
|
|
12
|
+
* REWRITE_ONLY: loadAnalyzerSummary → Step 6→7→8→9(仅改写,单轮)
|
|
13
|
+
*
|
|
14
|
+
* 5 类终止条件:PASSED / UNREWRITEABLE / MAX_LOOPS / DEAD_LOOP / ERROR
|
|
15
|
+
*
|
|
16
|
+
* 适配 Node.js ReportAnalyzerAgent 的英文 category 标签与 accuracy verdict。
|
|
17
|
+
*/
|
|
18
|
+
import { LoopMode, type LoopResult } from './types';
|
|
19
|
+
import { type RewriteInput, type RewriteOutput } from '../core/agent/rewrite_agent/types';
|
|
20
|
+
import type { AnalyzerOutput } from '../core/agent/report_analyzer_agent/types';
|
|
21
|
+
/** 执行原语:在 reportDir 运行 agent,返回报告目录与执行状态(PASS/FAIL/...)。 */
|
|
22
|
+
export type ExecutePrimitive = (task: string, reportDir: string, runId: string) => Promise<{
|
|
23
|
+
reportDir: string;
|
|
24
|
+
status: string;
|
|
25
|
+
}>;
|
|
26
|
+
/** 归因原语:对 reportDir 跑 ReportAnalyzerAgent,返回 AnalyzerOutput。 */
|
|
27
|
+
export type AnalyzePrimitive = (reportDir: string) => Promise<AnalyzerOutput>;
|
|
28
|
+
/** 改写原语:跑 RewriteAgent,返回 RewriteOutput。 */
|
|
29
|
+
export type RewritePrimitive = (input: RewriteInput) => Promise<RewriteOutput>;
|
|
30
|
+
export interface LoopPrimitives {
|
|
31
|
+
execute: ExecutePrimitive;
|
|
32
|
+
analyze: AnalyzePrimitive;
|
|
33
|
+
rewrite: RewritePrimitive;
|
|
34
|
+
}
|
|
35
|
+
export interface LoopRunOptions {
|
|
36
|
+
mode: LoopMode;
|
|
37
|
+
maxLoops: number;
|
|
38
|
+
inputReportDir?: string | null;
|
|
39
|
+
originalTask: string;
|
|
40
|
+
/** FULL_LOOP 各轮 iter_N 子目录的根(如 reports/<taskId>)。 */
|
|
41
|
+
baseReportDir: string;
|
|
42
|
+
runId: string;
|
|
43
|
+
primitives: LoopPrimitives;
|
|
44
|
+
}
|
|
45
|
+
/** 闭环状态机核心入口。 */
|
|
46
|
+
export declare function runLoop(opts: LoopRunOptions): Promise<LoopResult>;
|
|
47
|
+
//# sourceMappingURL=orchestrator.d.ts.map
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Loop 结果落盘 — 移植自 python loop/result_writer.py
|
|
3
|
+
*
|
|
4
|
+
* writeLoopResultJson: 序列化 LoopResult → loop_result.json(写在 finalReportDir 父目录)。
|
|
5
|
+
* writeLoopSummaryHtml: 生成 loop_summary.html(Loop 汇总 + 各轮执行/分析报告 iframe 标签页)。
|
|
6
|
+
*/
|
|
7
|
+
import { type LoopResult } from './types';
|
|
8
|
+
/** 写 loop_result.json。finalReportDir 为空时安全降级返回 null。 */
|
|
9
|
+
export declare function writeLoopResultJson(result: LoopResult, finalReportDir: string | null): string | null;
|
|
10
|
+
/** 生成 loop_summary.html(iframe 内嵌各轮报告)。 */
|
|
11
|
+
export declare function writeLoopSummaryHtml(result: LoopResult, finalReportDir: string | null): string | null;
|
|
12
|
+
//# sourceMappingURL=result_writer.d.ts.map
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Loop 闭环类型定义 — 移植自 python/AutoTest/loop/types.py
|
|
3
|
+
*
|
|
4
|
+
* 5 种执行模式 + 6 个状态机状态 + 5 类终止原因 + 迭代记录 + 闭环结果。
|
|
5
|
+
*/
|
|
6
|
+
/** Loop 执行模式枚举(决定状态机跳步策略)。 */
|
|
7
|
+
export declare enum LoopMode {
|
|
8
|
+
/** 完整闭环:执行→归因→改写→重执行,最多 max_loops 轮,生成 iter_N 目录 + loop_summary.html + loop_result.json */
|
|
9
|
+
FULL_LOOP = "full_loop",
|
|
10
|
+
/** 执行 + 归因(不触发改写,单轮即终止) */
|
|
11
|
+
EXECUTE_ANALYZE = "execute_analyze",
|
|
12
|
+
/** 仅执行(不做归因和改写,单轮即终止) */
|
|
13
|
+
EXECUTE_ONLY = "execute_only",
|
|
14
|
+
/** 仅归因(跳过执行,直接对已有报告做根因分析) */
|
|
15
|
+
ANALYZE_ONLY = "analyze_only",
|
|
16
|
+
/** 仅改写(跳过执行和归因,直接对已有分析结果做改写) */
|
|
17
|
+
REWRITE_ONLY = "rewrite_only"
|
|
18
|
+
}
|
|
19
|
+
/** Loop 编排器状态枚举(状态机各阶段)。 */
|
|
20
|
+
export declare enum LoopStatus {
|
|
21
|
+
INIT = "init",
|
|
22
|
+
EXECUTING = "executing",
|
|
23
|
+
ATTRIBUTING = "attributing",
|
|
24
|
+
REWRITING = "rewriting",
|
|
25
|
+
RE_EXECUTING = "re_executing",
|
|
26
|
+
TERMINATED = "terminated"
|
|
27
|
+
}
|
|
28
|
+
/** Loop 终止原因枚举。 */
|
|
29
|
+
export declare enum TerminationReason {
|
|
30
|
+
/** 任务通过 */
|
|
31
|
+
PASSED = "passed",
|
|
32
|
+
/** 不可改写(应用/环境/无问题/未知 category/决策表 NO_REWRITE) */
|
|
33
|
+
UNREWRITEABLE = "unrewriteable",
|
|
34
|
+
/** 达到 max_loops 上限 */
|
|
35
|
+
MAX_LOOPS = "max_loops",
|
|
36
|
+
/** 连续 2 次相同 failure signature */
|
|
37
|
+
DEAD_LOOP = "dead_loop",
|
|
38
|
+
/** analyzer 或 rewriter 异常 */
|
|
39
|
+
ERROR = "error"
|
|
40
|
+
}
|
|
41
|
+
/** 单轮 loop 迭代记录。 */
|
|
42
|
+
export interface IterationRecord {
|
|
43
|
+
/** 1-indexed 轮次 */
|
|
44
|
+
iteration: number;
|
|
45
|
+
/** 本轮报告目录 */
|
|
46
|
+
reportDir: string;
|
|
47
|
+
/** 归因 Agent 输出裁剪后的关键字段 */
|
|
48
|
+
analyzerOutputSummary: Record<string, unknown>;
|
|
49
|
+
/** 改写动作(RewriteAction 值) */
|
|
50
|
+
rewriteAction: string;
|
|
51
|
+
/** 改写后的 task(REWRITE_TASK/BOTH 时非空) */
|
|
52
|
+
rewrittenTask?: string | null;
|
|
53
|
+
/** 本轮追加的知识文本(ADD_KNOWLEDGE/BOTH 时非空) */
|
|
54
|
+
knowledgeText?: string;
|
|
55
|
+
}
|
|
56
|
+
/** Loop 闭环最终结果(编排器 run() 的返回值)。 */
|
|
57
|
+
export interface LoopResult {
|
|
58
|
+
/** 每轮 IterationRecord 列表 */
|
|
59
|
+
iterations: IterationRecord[];
|
|
60
|
+
/** 最后一轮 reportDir(可能为空,如首轮执行即异常) */
|
|
61
|
+
finalReportDir: string | null;
|
|
62
|
+
/** 终止原因(TerminationReason 值) */
|
|
63
|
+
terminationReason: string;
|
|
64
|
+
/** 总迭代次数 */
|
|
65
|
+
totalIterations: number;
|
|
66
|
+
/** 入口保存的原始 task(重建基准) */
|
|
67
|
+
originalTask: string;
|
|
68
|
+
/** 终止时的 task 状态 */
|
|
69
|
+
finalTask: string;
|
|
70
|
+
}
|
|
71
|
+
/** 构造一个空的 LoopResult。 */
|
|
72
|
+
export declare function createLoopResult(): LoopResult;
|
|
73
|
+
/** 序列化 IterationRecord 为普通对象(用于 JSON 落盘)。 */
|
|
74
|
+
export declare function iterationRecordToDict(it: IterationRecord): Record<string, unknown>;
|
|
75
|
+
/** 序列化 LoopResult 为普通对象(用于 loop_result.json 落盘)。 */
|
|
76
|
+
export declare function loopResultToDict(result: LoopResult): Record<string, unknown>;
|
|
77
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { McpServerConfig } from './types';
|
|
2
|
+
import type { AgentAPIImpl } from '../api/agent_api';
|
|
3
|
+
export declare class McpServerImpl {
|
|
4
|
+
private server;
|
|
5
|
+
private config;
|
|
6
|
+
private agentApi;
|
|
7
|
+
constructor(config: McpServerConfig, agentApi: AgentAPIImpl);
|
|
8
|
+
start(): Promise<void>;
|
|
9
|
+
stop(): Promise<void>;
|
|
10
|
+
private handleRequest;
|
|
11
|
+
private routeRequest;
|
|
12
|
+
private callTool;
|
|
13
|
+
private zodToJsonSchema;
|
|
14
|
+
}
|
|
15
|
+
//# sourceMappingURL=server.d.ts.map
|
|
@@ -0,0 +1,196 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export interface McpServerConfig {
|
|
3
|
+
port: number;
|
|
4
|
+
host: string;
|
|
5
|
+
transport: 'streamable-http' | 'sse';
|
|
6
|
+
autoStart: boolean;
|
|
7
|
+
}
|
|
8
|
+
export declare enum McpServerToolName {
|
|
9
|
+
TAP = "tap",
|
|
10
|
+
DOUBLE_TAP = "double_tap",
|
|
11
|
+
SWIPE = "swipe",
|
|
12
|
+
TYPE_TEXT = "type_text",
|
|
13
|
+
BACK = "back",
|
|
14
|
+
HOME = "home",
|
|
15
|
+
LAUNCH_APP = "launch_app",
|
|
16
|
+
GET_SCREENSHOT = "get_screenshot",
|
|
17
|
+
LIST_DEVICES = "list_devices",
|
|
18
|
+
RUN_TASK = "run_task",
|
|
19
|
+
GET_TASK_RESULT = "get_task_result",
|
|
20
|
+
RESUME_TASK = "resume_task",
|
|
21
|
+
ANALYZE_FAILURE = "analyze_failure",
|
|
22
|
+
GET_CONFIG = "get_config",
|
|
23
|
+
UPDATE_CONFIG = "update_config"
|
|
24
|
+
}
|
|
25
|
+
export declare const TapInputSchema: z.ZodObject<{
|
|
26
|
+
x: z.ZodNumber;
|
|
27
|
+
y: z.ZodNumber;
|
|
28
|
+
delay: z.ZodDefault<z.ZodNumber>;
|
|
29
|
+
}, "strip", z.ZodTypeAny, {
|
|
30
|
+
x: number;
|
|
31
|
+
y: number;
|
|
32
|
+
delay: number;
|
|
33
|
+
}, {
|
|
34
|
+
x: number;
|
|
35
|
+
y: number;
|
|
36
|
+
delay?: number | undefined;
|
|
37
|
+
}>;
|
|
38
|
+
export type TapInput = z.infer<typeof TapInputSchema>;
|
|
39
|
+
export declare const DoubleTapInputSchema: z.ZodObject<{
|
|
40
|
+
x: z.ZodNumber;
|
|
41
|
+
y: z.ZodNumber;
|
|
42
|
+
delay: z.ZodDefault<z.ZodNumber>;
|
|
43
|
+
}, "strip", z.ZodTypeAny, {
|
|
44
|
+
x: number;
|
|
45
|
+
y: number;
|
|
46
|
+
delay: number;
|
|
47
|
+
}, {
|
|
48
|
+
x: number;
|
|
49
|
+
y: number;
|
|
50
|
+
delay?: number | undefined;
|
|
51
|
+
}>;
|
|
52
|
+
export type DoubleTapInput = z.infer<typeof DoubleTapInputSchema>;
|
|
53
|
+
export declare const SwipeInputSchema: z.ZodObject<{
|
|
54
|
+
startX: z.ZodNumber;
|
|
55
|
+
startY: z.ZodNumber;
|
|
56
|
+
endX: z.ZodNumber;
|
|
57
|
+
endY: z.ZodNumber;
|
|
58
|
+
}, "strip", z.ZodTypeAny, {
|
|
59
|
+
startX: number;
|
|
60
|
+
startY: number;
|
|
61
|
+
endX: number;
|
|
62
|
+
endY: number;
|
|
63
|
+
}, {
|
|
64
|
+
startX: number;
|
|
65
|
+
startY: number;
|
|
66
|
+
endX: number;
|
|
67
|
+
endY: number;
|
|
68
|
+
}>;
|
|
69
|
+
export type SwipeInput = z.infer<typeof SwipeInputSchema>;
|
|
70
|
+
export declare const TypeTextInputSchema: z.ZodObject<{
|
|
71
|
+
text: z.ZodString;
|
|
72
|
+
}, "strip", z.ZodTypeAny, {
|
|
73
|
+
text: string;
|
|
74
|
+
}, {
|
|
75
|
+
text: string;
|
|
76
|
+
}>;
|
|
77
|
+
export type TypeTextInput = z.infer<typeof TypeTextInputSchema>;
|
|
78
|
+
export declare const BackInputSchema: z.ZodObject<{
|
|
79
|
+
delay: z.ZodDefault<z.ZodNumber>;
|
|
80
|
+
}, "strip", z.ZodTypeAny, {
|
|
81
|
+
delay: number;
|
|
82
|
+
}, {
|
|
83
|
+
delay?: number | undefined;
|
|
84
|
+
}>;
|
|
85
|
+
export type BackInput = z.infer<typeof BackInputSchema>;
|
|
86
|
+
export declare const HomeInputSchema: z.ZodObject<{
|
|
87
|
+
delay: z.ZodDefault<z.ZodNumber>;
|
|
88
|
+
}, "strip", z.ZodTypeAny, {
|
|
89
|
+
delay: number;
|
|
90
|
+
}, {
|
|
91
|
+
delay?: number | undefined;
|
|
92
|
+
}>;
|
|
93
|
+
export type HomeInput = z.infer<typeof HomeInputSchema>;
|
|
94
|
+
export declare const LaunchAppInputSchema: z.ZodObject<{
|
|
95
|
+
appName: z.ZodString;
|
|
96
|
+
delay: z.ZodDefault<z.ZodNumber>;
|
|
97
|
+
}, "strip", z.ZodTypeAny, {
|
|
98
|
+
appName: string;
|
|
99
|
+
delay: number;
|
|
100
|
+
}, {
|
|
101
|
+
appName: string;
|
|
102
|
+
delay?: number | undefined;
|
|
103
|
+
}>;
|
|
104
|
+
export type LaunchAppInput = z.infer<typeof LaunchAppInputSchema>;
|
|
105
|
+
export declare const GetScreenshotInputSchema: z.ZodObject<{
|
|
106
|
+
saveToReport: z.ZodDefault<z.ZodBoolean>;
|
|
107
|
+
}, "strip", z.ZodTypeAny, {
|
|
108
|
+
saveToReport: boolean;
|
|
109
|
+
}, {
|
|
110
|
+
saveToReport?: boolean | undefined;
|
|
111
|
+
}>;
|
|
112
|
+
export type GetScreenshotInput = z.infer<typeof GetScreenshotInputSchema>;
|
|
113
|
+
export declare const ListDevicesInputSchema: z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>;
|
|
114
|
+
export type ListDevicesInput = z.infer<typeof ListDevicesInputSchema>;
|
|
115
|
+
export declare const RunTaskInputSchema: z.ZodObject<{
|
|
116
|
+
task: z.ZodString;
|
|
117
|
+
agentMode: z.ZodDefault<z.ZodEnum<["single", "hypium", "layered"]>>;
|
|
118
|
+
deviceId: z.ZodString;
|
|
119
|
+
platform: z.ZodDefault<z.ZodEnum<["harmony", "android", "ios"]>>;
|
|
120
|
+
promptVersion: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
121
|
+
configOverrides: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
|
|
122
|
+
reportDir: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
123
|
+
feedbackMode: z.ZodDefault<z.ZodEnum<["poll", "stream", "callback"]>>;
|
|
124
|
+
callbackUrl: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
125
|
+
}, "strip", z.ZodTypeAny, {
|
|
126
|
+
task: string;
|
|
127
|
+
platform: "harmony" | "android" | "ios";
|
|
128
|
+
agentMode: "single" | "hypium" | "layered";
|
|
129
|
+
deviceId: string;
|
|
130
|
+
feedbackMode: "poll" | "stream" | "callback";
|
|
131
|
+
promptVersion?: string | null | undefined;
|
|
132
|
+
reportDir?: string | null | undefined;
|
|
133
|
+
configOverrides?: Record<string, unknown> | null | undefined;
|
|
134
|
+
callbackUrl?: string | null | undefined;
|
|
135
|
+
}, {
|
|
136
|
+
task: string;
|
|
137
|
+
deviceId: string;
|
|
138
|
+
promptVersion?: string | null | undefined;
|
|
139
|
+
reportDir?: string | null | undefined;
|
|
140
|
+
platform?: "harmony" | "android" | "ios" | undefined;
|
|
141
|
+
configOverrides?: Record<string, unknown> | null | undefined;
|
|
142
|
+
agentMode?: "single" | "hypium" | "layered" | undefined;
|
|
143
|
+
feedbackMode?: "poll" | "stream" | "callback" | undefined;
|
|
144
|
+
callbackUrl?: string | null | undefined;
|
|
145
|
+
}>;
|
|
146
|
+
export type RunTaskInput = z.infer<typeof RunTaskInputSchema>;
|
|
147
|
+
export declare const GetTaskResultInputSchema: z.ZodObject<{
|
|
148
|
+
taskId: z.ZodString;
|
|
149
|
+
}, "strip", z.ZodTypeAny, {
|
|
150
|
+
taskId: string;
|
|
151
|
+
}, {
|
|
152
|
+
taskId: string;
|
|
153
|
+
}>;
|
|
154
|
+
export type GetTaskResultInput = z.infer<typeof GetTaskResultInputSchema>;
|
|
155
|
+
export declare const ResumeTaskInputSchema: z.ZodObject<{
|
|
156
|
+
taskId: z.ZodString;
|
|
157
|
+
startIndex: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
158
|
+
}, "strip", z.ZodTypeAny, {
|
|
159
|
+
taskId: string;
|
|
160
|
+
startIndex?: number | null | undefined;
|
|
161
|
+
}, {
|
|
162
|
+
taskId: string;
|
|
163
|
+
startIndex?: number | null | undefined;
|
|
164
|
+
}>;
|
|
165
|
+
export type ResumeTaskInput = z.infer<typeof ResumeTaskInputSchema>;
|
|
166
|
+
export declare const AnalyzeFailureInputSchema: z.ZodObject<{
|
|
167
|
+
taskId: z.ZodString;
|
|
168
|
+
caseIdx: z.ZodNumber;
|
|
169
|
+
}, "strip", z.ZodTypeAny, {
|
|
170
|
+
taskId: string;
|
|
171
|
+
caseIdx: number;
|
|
172
|
+
}, {
|
|
173
|
+
taskId: string;
|
|
174
|
+
caseIdx: number;
|
|
175
|
+
}>;
|
|
176
|
+
export type AnalyzeFailureInput = z.infer<typeof AnalyzeFailureInputSchema>;
|
|
177
|
+
export declare const GetConfigInputSchema: z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>;
|
|
178
|
+
export type GetConfigInput = z.infer<typeof GetConfigInputSchema>;
|
|
179
|
+
export declare const UpdateConfigInputSchema: z.ZodObject<{
|
|
180
|
+
partial: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
181
|
+
}, "strip", z.ZodTypeAny, {
|
|
182
|
+
partial: Record<string, unknown>;
|
|
183
|
+
}, {
|
|
184
|
+
partial: Record<string, unknown>;
|
|
185
|
+
}>;
|
|
186
|
+
export type UpdateConfigInput = z.infer<typeof UpdateConfigInputSchema>;
|
|
187
|
+
export interface McpServerCapabilities {
|
|
188
|
+
tools: {
|
|
189
|
+
listChanged: boolean;
|
|
190
|
+
};
|
|
191
|
+
logging?: {};
|
|
192
|
+
prompts?: {
|
|
193
|
+
listChanged: boolean;
|
|
194
|
+
};
|
|
195
|
+
}
|
|
196
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { type ReportEvent } from './types';
|
|
2
|
+
export interface BatchResultEntry {
|
|
3
|
+
name: string;
|
|
4
|
+
status: 'success' | 'fail';
|
|
5
|
+
duration: number;
|
|
6
|
+
reportPath: string;
|
|
7
|
+
}
|
|
8
|
+
export declare function buildResultFromEvents(name: string, events: ReportEvent[], startTime?: string | null, endTime?: string | null, reportPath?: string, outputDir?: string): BatchResultEntry;
|
|
9
|
+
export declare function buildResultFromGenerator(generator: {
|
|
10
|
+
testCase?: string;
|
|
11
|
+
task?: string;
|
|
12
|
+
status?: string | null;
|
|
13
|
+
startTime?: string | null;
|
|
14
|
+
endTime?: string | null;
|
|
15
|
+
reportDir?: string;
|
|
16
|
+
_baseFilename?: string;
|
|
17
|
+
}, reportPath?: string, outputDir?: string): BatchResultEntry;
|
|
18
|
+
export declare function generateSummaryReport(results: BatchResultEntry[], totalDuration: number, outputDir: string): string | null;
|
|
19
|
+
//# sourceMappingURL=batch_summary.d.ts.map
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { type ReportEvent, type ReportGenerator } from './types';
|
|
2
|
+
export declare class ReportGeneratorImpl implements ReportGenerator {
|
|
3
|
+
private events;
|
|
4
|
+
private totalTokens;
|
|
5
|
+
private stepTokens;
|
|
6
|
+
private taskDesc;
|
|
7
|
+
private testCase;
|
|
8
|
+
private startTime;
|
|
9
|
+
private endTime;
|
|
10
|
+
private status;
|
|
11
|
+
private reportDir;
|
|
12
|
+
private embedImages;
|
|
13
|
+
private embedMaxPixels;
|
|
14
|
+
constructor(reportDir: string, embedImages?: boolean, embedMaxPixels?: number);
|
|
15
|
+
addEvent(event: ReportEvent): void;
|
|
16
|
+
getCurrentStepNumber(): number;
|
|
17
|
+
private flushJson;
|
|
18
|
+
addTokenUsage(usage: unknown, source?: string, stepNumber?: number): void;
|
|
19
|
+
setTask(task: string): void;
|
|
20
|
+
setTestCase(testCase: string): void;
|
|
21
|
+
startTask(): void;
|
|
22
|
+
endTask(result: string, status?: string): void;
|
|
23
|
+
saveScreenshot(base64Data: string, layoutData?: string, prefix?: string): string;
|
|
24
|
+
saveJson(): void;
|
|
25
|
+
saveAll(baseFilename?: string): Promise<Record<string, string>>;
|
|
26
|
+
getReportDir(): string;
|
|
27
|
+
private buildReportData;
|
|
28
|
+
private serializeForJson;
|
|
29
|
+
private eventToDict;
|
|
30
|
+
private toRelativePath;
|
|
31
|
+
private resolveImgSrc;
|
|
32
|
+
private escapeHtml;
|
|
33
|
+
private formatDuration;
|
|
34
|
+
private formatTime;
|
|
35
|
+
private formatTokenCount;
|
|
36
|
+
private extractStepTitle;
|
|
37
|
+
private asPoint2;
|
|
38
|
+
private asPointFromXY;
|
|
39
|
+
private stripTagMarkers;
|
|
40
|
+
private groupSteps;
|
|
41
|
+
private getStepTokens;
|
|
42
|
+
private getFinalStatus;
|
|
43
|
+
private generateMarkdown;
|
|
44
|
+
private generateHtml;
|
|
45
|
+
}
|
|
46
|
+
//# sourceMappingURL=generator.d.ts.map
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare enum EventType {
|
|
3
|
+
TASK_START = "task_start",
|
|
4
|
+
TASK_END = "task_end",
|
|
5
|
+
STEP_START = "step_start",
|
|
6
|
+
STEP_END = "step_end",
|
|
7
|
+
PLANNER_START = "planner_start",
|
|
8
|
+
PLANNER_OBSERVATION = "planner_observation",
|
|
9
|
+
PLANNER_THINKING = "planner_thinking",
|
|
10
|
+
PLANNER_OUTPUT = "planner_output",
|
|
11
|
+
PLANNER_TOOL_CALL = "planner_tool_call",
|
|
12
|
+
PLANNER_END = "planner_end",
|
|
13
|
+
MCP_TOOL_START = "mcp_tool_start",
|
|
14
|
+
MCP_TOOL_END = "mcp_tool_end",
|
|
15
|
+
SUBAGENT_START = "subagent_start",
|
|
16
|
+
SUBAGENT_END = "subagent_end",
|
|
17
|
+
EXECUTE_STEP_START = "execute_step_start",
|
|
18
|
+
EXECUTE_STEP_END = "execute_step_end",
|
|
19
|
+
EXECUTE_ACTION = "execute_action",
|
|
20
|
+
COMPRESSION = "compression",
|
|
21
|
+
REFLECTION = "reflection",
|
|
22
|
+
TOOL_CALL = "tool_call",
|
|
23
|
+
TOOL_RESULT = "tool_result",
|
|
24
|
+
LLM_CALL = "llm_call",
|
|
25
|
+
LLM_RESPONSE = "llm_response",
|
|
26
|
+
GLM_STEP_START = "model_step_start",
|
|
27
|
+
GLM_THINKING = "model_thinking",
|
|
28
|
+
GLM_ACTION = "model_action",
|
|
29
|
+
GLM_STEP_END = "model_step_end",
|
|
30
|
+
SCREENSHOT = "screenshot"
|
|
31
|
+
}
|
|
32
|
+
export declare const ReportEventSchema: z.ZodObject<{
|
|
33
|
+
eventType: z.ZodNativeEnum<typeof EventType>;
|
|
34
|
+
timestamp: z.ZodDefault<z.ZodString>;
|
|
35
|
+
content: z.ZodDefault<z.ZodString>;
|
|
36
|
+
data: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
37
|
+
screenshotPath: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
38
|
+
stepNumber: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
39
|
+
subEvents: z.ZodOptional<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>, "many">>;
|
|
40
|
+
}, "strip", z.ZodTypeAny, {
|
|
41
|
+
eventType: EventType;
|
|
42
|
+
timestamp: string;
|
|
43
|
+
content: string;
|
|
44
|
+
data: Record<string, unknown>;
|
|
45
|
+
screenshotPath?: string | null | undefined;
|
|
46
|
+
stepNumber?: number | null | undefined;
|
|
47
|
+
subEvents?: Record<string, unknown>[] | undefined;
|
|
48
|
+
}, {
|
|
49
|
+
eventType: EventType;
|
|
50
|
+
timestamp?: string | undefined;
|
|
51
|
+
content?: string | undefined;
|
|
52
|
+
data?: Record<string, unknown> | undefined;
|
|
53
|
+
screenshotPath?: string | null | undefined;
|
|
54
|
+
stepNumber?: number | null | undefined;
|
|
55
|
+
subEvents?: Record<string, unknown>[] | undefined;
|
|
56
|
+
}>;
|
|
57
|
+
export type ReportEvent = z.infer<typeof ReportEventSchema>;
|
|
58
|
+
export interface TokenUsageRecord {
|
|
59
|
+
total: number;
|
|
60
|
+
inputTokens: number;
|
|
61
|
+
outputTokens: number;
|
|
62
|
+
reasoningTokens: number;
|
|
63
|
+
cachedTokens: number;
|
|
64
|
+
sources: Record<string, TokenUsageRecord>;
|
|
65
|
+
}
|
|
66
|
+
export interface ReportData {
|
|
67
|
+
test_case: string;
|
|
68
|
+
task: string;
|
|
69
|
+
start_time: string | null;
|
|
70
|
+
end_time: string | null;
|
|
71
|
+
total_tokens: TokenUsageRecord;
|
|
72
|
+
step_tokens: Array<Record<string, unknown>>;
|
|
73
|
+
events: ReportEvent[];
|
|
74
|
+
}
|
|
75
|
+
export interface ReportGenerator {
|
|
76
|
+
addEvent(event: ReportEvent): void;
|
|
77
|
+
addTokenUsage(usage: unknown, source?: string, stepNumber?: number): void;
|
|
78
|
+
setTask(task: string): void;
|
|
79
|
+
setTestCase(testCase: string): void;
|
|
80
|
+
startTask(): void;
|
|
81
|
+
endTask(result: string, status?: string): void;
|
|
82
|
+
saveScreenshot(base64Data: string, layoutData?: string, prefix?: string): string;
|
|
83
|
+
saveJson(): void;
|
|
84
|
+
saveAll(baseFilename?: string): Promise<Record<string, string>>;
|
|
85
|
+
getReportDir(): string;
|
|
86
|
+
getCurrentStepNumber(): number;
|
|
87
|
+
}
|
|
88
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Batch test execution runner.
|
|
3
|
+
*
|
|
4
|
+
* Runs multiple test cases in sequence, collects results into JSONL/CSV,
|
|
5
|
+
* updates the original case files and per-category reports, and emits a
|
|
6
|
+
* summary. Uses {@link AgentAPIImpl} to execute each case.
|
|
7
|
+
*/
|
|
8
|
+
import { AgentAPIImpl } from '../api/agent_api';
|
|
9
|
+
import type { TaskResult } from '../api/types';
|
|
10
|
+
/** Replace characters that are invalid in file names with underscores. */
|
|
11
|
+
export declare function sanitizeFilename(name: string): string;
|
|
12
|
+
/** Result of a single case execution. */
|
|
13
|
+
export interface CaseResultData {
|
|
14
|
+
exec_index: number;
|
|
15
|
+
uuid: string;
|
|
16
|
+
spec: string;
|
|
17
|
+
case_name: string;
|
|
18
|
+
category: string;
|
|
19
|
+
test_steps: string;
|
|
20
|
+
report_dir: string;
|
|
21
|
+
start_time: string;
|
|
22
|
+
end_time: string;
|
|
23
|
+
duration_seconds: number;
|
|
24
|
+
status: 'PASS' | 'FAIL' | 'UNKNOWN';
|
|
25
|
+
return_code: number;
|
|
26
|
+
reason: string;
|
|
27
|
+
}
|
|
28
|
+
/** Summary statistics for a batch run. */
|
|
29
|
+
export interface SummaryData {
|
|
30
|
+
total_cases: number;
|
|
31
|
+
pass_count: number;
|
|
32
|
+
fail_count: number;
|
|
33
|
+
unknown_count: number;
|
|
34
|
+
pass_rate: string;
|
|
35
|
+
avg_duration: number;
|
|
36
|
+
max_duration: number;
|
|
37
|
+
min_duration: number;
|
|
38
|
+
category: string;
|
|
39
|
+
start_time: string;
|
|
40
|
+
end_time: string;
|
|
41
|
+
task_dir: string;
|
|
42
|
+
}
|
|
43
|
+
/** Backend that executes a single case via the AgentAPI. */
|
|
44
|
+
export declare class AutoTestBackend {
|
|
45
|
+
private agent;
|
|
46
|
+
private config;
|
|
47
|
+
private mode;
|
|
48
|
+
constructor(agent: AgentAPIImpl, config?: string, mode?: string);
|
|
49
|
+
/** Execute a single test case. */
|
|
50
|
+
executeCase(testSteps: string, reportDir: string, caseMode?: string): Promise<{
|
|
51
|
+
returnCode: number;
|
|
52
|
+
taskResult: TaskResult;
|
|
53
|
+
}>;
|
|
54
|
+
private runWithTimeout;
|
|
55
|
+
/** Determine the pass/fail status from a task result. */
|
|
56
|
+
checkStatus(taskResult: TaskResult): {
|
|
57
|
+
status: 'PASS' | 'FAIL' | 'UNKNOWN';
|
|
58
|
+
reason: string;
|
|
59
|
+
};
|
|
60
|
+
}
|
|
61
|
+
/** Append a case result to the JSONL and CSV result files. */
|
|
62
|
+
export declare function writeResult(jsonlFile: string, csvFile: string, resultData: CaseResultData): void;
|
|
63
|
+
/** Read metadata (total_tokens, start_time, end_time) from a report directory. */
|
|
64
|
+
export declare function readReportMetadata(reportDir: string): {
|
|
65
|
+
total_tokens: number;
|
|
66
|
+
start_time: string;
|
|
67
|
+
end_time: string;
|
|
68
|
+
};
|
|
69
|
+
/** Update the auto_result field of a case in the original case file. */
|
|
70
|
+
export declare function updateOriginalTestcase(testsetRoot: string, category: string, uuid: string, status: string): boolean;
|
|
71
|
+
/** Update the per-category reports JSON file with a case result. */
|
|
72
|
+
export declare function updateReportsFile(testsetRoot: string, category: string, uuid: string, reportDir: string, status: string, startTime?: string, endTime?: string, durationSeconds?: number, totalTokens?: number): boolean;
|
|
73
|
+
/** Generate a summary report from the task results JSONL. */
|
|
74
|
+
export declare function generateSummary(taskDir: string, category: string): SummaryData | null;
|
|
75
|
+
/** Print a阶段性 progress report. */
|
|
76
|
+
export declare function printProgressReport(passCount: number, failCount: number, unknownCount: number, executedCount: number, totalCases: number, startTime: Date): void;
|
|
77
|
+
export interface BatchOptions {
|
|
78
|
+
agent: AgentAPIImpl;
|
|
79
|
+
taskDir: string;
|
|
80
|
+
testcases: string;
|
|
81
|
+
category: string;
|
|
82
|
+
testsetRoot?: string;
|
|
83
|
+
config?: string;
|
|
84
|
+
mode?: string;
|
|
85
|
+
workDir?: string;
|
|
86
|
+
maxCases?: number;
|
|
87
|
+
}
|
|
88
|
+
/** Execute a batch of test cases. */
|
|
89
|
+
export declare function executeBatch(options: BatchOptions): Promise<SummaryData | null>;
|
|
90
|
+
/** CLI entry point. */
|
|
91
|
+
export declare function main(): Promise<number>;
|
|
92
|
+
//# sourceMappingURL=batch_runner.d.ts.map
|