@autotest/agent 0.0.2 → 0.0.4
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 +166 -95
- package/dist/api/agent_api.d.ts +3 -7
- package/dist/api/agent_api.js +12 -12
- package/dist/api/autotest_agent.d.ts +0 -1
- package/dist/api/autotest_agent.js +0 -1
- package/dist/api/types.d.ts +0 -1
- package/dist/api/types.js +0 -1
- package/dist/autotest-cli.d.ts +0 -1
- package/dist/autotest-cli.js +9 -3
- package/dist/common/case_manager.d.ts +0 -1
- package/dist/common/case_manager.js +0 -1
- package/dist/common/collect_case.d.ts +0 -1
- package/dist/common/collect_case.js +0 -1
- package/dist/common/common_errors.d.ts +0 -1
- package/dist/common/common_errors.js +0 -1
- package/dist/common/config/config.yaml +134 -113
- package/dist/common/config/config_validator.d.ts +0 -1
- package/dist/common/config/config_validator.js +0 -1
- package/dist/common/config/manager.d.ts +0 -1
- package/dist/common/config/manager.js +0 -1
- package/dist/common/config/output.d.ts +0 -1
- package/dist/common/config/output.js +0 -1
- package/dist/common/config/types.d.ts +2243 -2244
- package/dist/common/config/types.js +2 -3
- package/dist/common/dfx/client_factory.d.ts +0 -1
- package/dist/common/dfx/client_factory.js +0 -1
- package/dist/common/dfx/context.d.ts +0 -1
- package/dist/common/dfx/context.js +0 -1
- package/dist/common/dfx/index.d.ts +0 -1
- package/dist/common/dfx/index.js +0 -1
- package/dist/common/dfx/recorder.d.ts +0 -1
- package/dist/common/dfx/recorder.js +0 -1
- package/dist/common/dfx/recording_fetch.d.ts +0 -1
- package/dist/common/dfx/recording_fetch.js +0 -1
- package/dist/common/dfx/source.d.ts +0 -1
- package/dist/common/dfx/source.js +0 -1
- package/dist/common/image_cacher.d.ts +0 -1
- package/dist/common/image_cacher.js +0 -1
- package/dist/common/image_helper.d.ts +0 -1
- package/dist/common/image_helper.js +0 -1
- package/dist/common/image_similarity.d.ts +0 -1
- package/dist/common/image_similarity.js +0 -1
- package/dist/common/llm_cache/cache_transport.d.ts +2 -1
- package/dist/common/llm_cache/cache_transport.js +4 -1
- package/dist/common/llm_cache/prompt_cache.d.ts +53 -0
- package/dist/common/llm_cache/prompt_cache.js +113 -0
- package/dist/common/logger.d.ts +0 -1
- package/dist/common/logger.js +0 -1
- package/dist/common/model/custom_model.d.ts +0 -1
- package/dist/common/model/custom_model.js +57 -6
- package/dist/common/model/index.d.ts +0 -1
- package/dist/common/model/index.js +0 -1
- package/dist/common/path_utils.d.ts +7 -4
- package/dist/common/path_utils.js +12 -6
- package/dist/common/result_parser.d.ts +0 -1
- package/dist/common/result_parser.js +1 -2
- package/dist/common/usage/token_usage.d.ts +0 -1
- package/dist/common/usage/token_usage.js +0 -1
- package/dist/common/utils.d.ts +0 -1
- package/dist/common/utils.js +0 -1
- package/dist/core/agent/layered_agent/ability_helper.d.ts +0 -1
- package/dist/core/agent/layered_agent/ability_helper.js +0 -1
- package/dist/core/agent/layered_agent/agent.d.ts +0 -1
- package/dist/core/agent/layered_agent/agent.js +0 -1
- package/dist/core/agent/layered_agent/agent_registry.d.ts +0 -1
- package/dist/core/agent/layered_agent/agent_registry.js +0 -1
- package/dist/core/agent/layered_agent/decision.d.ts +0 -1
- package/dist/core/agent/layered_agent/decision.js +61 -24
- package/dist/core/agent/layered_agent/execute_agent/action_handler.d.ts +0 -1
- package/dist/core/agent/layered_agent/execute_agent/action_handler.js +0 -1
- package/dist/core/agent/layered_agent/execute_agent/agent_factory.d.ts +1 -2
- package/dist/core/agent/layered_agent/execute_agent/agent_factory.js +0 -1
- package/dist/core/agent/layered_agent/execute_agent/base_agent.d.ts +0 -1
- package/dist/core/agent/layered_agent/execute_agent/base_agent.js +0 -1
- package/dist/core/agent/layered_agent/execute_agent/general_agent.d.ts +0 -1
- package/dist/core/agent/layered_agent/execute_agent/general_agent.js +0 -1
- package/dist/core/agent/layered_agent/execute_agent/glm_agent.d.ts +0 -1
- package/dist/core/agent/layered_agent/execute_agent/glm_agent.js +0 -1
- package/dist/core/agent/layered_agent/execute_agent/i18n.d.ts +0 -1
- package/dist/core/agent/layered_agent/execute_agent/i18n.js +0 -1
- package/dist/core/agent/layered_agent/execute_agent/index.d.ts +0 -1
- package/dist/core/agent/layered_agent/execute_agent/index.js +0 -1
- package/dist/core/agent/layered_agent/execute_agent/mai_ui_agent.d.ts +0 -1
- package/dist/core/agent/layered_agent/execute_agent/mai_ui_agent.js +0 -1
- package/dist/core/agent/layered_agent/execute_agent/mcp_prompts.d.ts +1 -2
- package/dist/core/agent/layered_agent/execute_agent/mcp_prompts.js +5 -6
- package/dist/core/agent/layered_agent/execute_agent/parser/general_parser.d.ts +0 -1
- package/dist/core/agent/layered_agent/execute_agent/parser/general_parser.js +1 -2
- package/dist/core/agent/layered_agent/execute_agent/parser/glm_parser.d.ts +0 -1
- package/dist/core/agent/layered_agent/execute_agent/parser/glm_parser.js +1 -2
- package/dist/core/agent/layered_agent/execute_agent/parser/index.d.ts +0 -1
- package/dist/core/agent/layered_agent/execute_agent/parser/index.js +0 -1
- package/dist/core/agent/layered_agent/execute_agent/parser/mai_ui_parser.d.ts +0 -1
- package/dist/core/agent/layered_agent/execute_agent/parser/mai_ui_parser.js +1 -2
- package/dist/core/agent/layered_agent/execute_agent/prompts.d.ts +1 -2
- package/dist/core/agent/layered_agent/execute_agent/prompts.js +5 -6
- package/dist/core/agent/layered_agent/execute_agent/simple_reporter.d.ts +0 -1
- package/dist/core/agent/layered_agent/execute_agent/simple_reporter.js +0 -1
- package/dist/core/agent/layered_agent/execute_agent/utils.d.ts +0 -1
- package/dist/core/agent/layered_agent/execute_agent/utils.js +0 -1
- package/dist/core/agent/report_analyzer_agent/agent.d.ts +0 -1
- package/dist/core/agent/report_analyzer_agent/agent.js +0 -1
- package/dist/core/agent/report_analyzer_agent/config.d.ts +0 -1
- package/dist/core/agent/report_analyzer_agent/config.js +0 -1
- package/dist/core/agent/report_analyzer_agent/data_loader.d.ts +0 -1
- package/dist/core/agent/report_analyzer_agent/data_loader.js +0 -1
- package/dist/core/agent/report_analyzer_agent/guardrails.d.ts +0 -1
- package/dist/core/agent/report_analyzer_agent/guardrails.js +0 -1
- package/dist/core/agent/report_analyzer_agent/hooks.d.ts +0 -1
- package/dist/core/agent/report_analyzer_agent/hooks.js +0 -1
- package/dist/core/agent/report_analyzer_agent/index.d.ts +0 -1
- package/dist/core/agent/report_analyzer_agent/index.js +0 -1
- package/dist/core/agent/report_analyzer_agent/key_steps_builder.d.ts +0 -1
- package/dist/core/agent/report_analyzer_agent/key_steps_builder.js +0 -1
- package/dist/core/agent/report_analyzer_agent/mapping.d.ts +0 -1
- package/dist/core/agent/report_analyzer_agent/mapping.js +0 -1
- package/dist/core/agent/report_analyzer_agent/parse.d.ts +0 -1
- package/dist/core/agent/report_analyzer_agent/parse.js +0 -1
- package/dist/core/agent/report_analyzer_agent/prompt.d.ts +0 -1
- package/dist/core/agent/report_analyzer_agent/prompt.js +0 -1
- package/dist/core/agent/report_analyzer_agent/report_writer.d.ts +0 -1
- package/dist/core/agent/report_analyzer_agent/report_writer.js +0 -1
- package/dist/core/agent/report_analyzer_agent/tools.d.ts +0 -1
- package/dist/core/agent/report_analyzer_agent/tools.js +0 -1
- package/dist/core/agent/report_analyzer_agent/types.d.ts +0 -1
- package/dist/core/agent/report_analyzer_agent/types.js +0 -1
- package/dist/core/agent/rewrite_agent/agent.d.ts +0 -1
- package/dist/core/agent/rewrite_agent/agent.js +0 -1
- package/dist/core/agent/rewrite_agent/guardrails.d.ts +0 -1
- package/dist/core/agent/rewrite_agent/guardrails.js +0 -1
- package/dist/core/agent/rewrite_agent/mapping.d.ts +0 -1
- package/dist/core/agent/rewrite_agent/mapping.js +0 -1
- package/dist/core/agent/rewrite_agent/parse.d.ts +0 -1
- package/dist/core/agent/rewrite_agent/parse.js +0 -1
- package/dist/core/agent/rewrite_agent/types.d.ts +0 -1
- package/dist/core/agent/rewrite_agent/types.js +0 -1
- package/dist/core/agent/single_agent/agent.d.ts +0 -1
- package/dist/core/agent/single_agent/agent.js +1 -2
- package/dist/core/agent/single_agent/hook_manager.d.ts +0 -1
- package/dist/core/agent/single_agent/hook_manager.js +0 -1
- package/dist/core/agent/single_agent/hooks.d.ts +0 -1
- package/dist/core/agent/single_agent/hooks.js +0 -1
- package/dist/core/agent/single_agent/image_utils.d.ts +0 -1
- package/dist/core/agent/single_agent/image_utils.js +0 -1
- package/dist/core/agent/single_agent/scroll_search_agent.d.ts +0 -1
- package/dist/core/agent/single_agent/scroll_search_agent.js +0 -1
- package/dist/core/agent/single_agent/subagent_manager.d.ts +0 -1
- package/dist/core/agent/single_agent/subagent_manager.js +0 -1
- package/dist/core/agent/single_agent/tool_recorder_hook.d.ts +0 -1
- package/dist/core/agent/single_agent/tool_recorder_hook.js +0 -1
- package/dist/core/agent/types.d.ts +0 -1
- package/dist/core/agent/types.js +0 -1
- package/dist/core/agent/utils/message_builder.d.ts +0 -1
- package/dist/core/agent/utils/message_builder.js +0 -1
- package/dist/core/device/device_protocol.d.ts +0 -1
- package/dist/core/device/device_protocol.js +0 -1
- package/dist/core/device/hdc/apps.d.ts +0 -1
- package/dist/core/device/hdc/apps.js +0 -1
- package/dist/core/device/hdc/device.d.ts +0 -1
- package/dist/core/device/hdc/device.js +0 -1
- package/dist/core/device/hdc/index.d.ts +0 -1
- package/dist/core/device/hdc/index.js +0 -1
- package/dist/core/device/hdc/input.d.ts +0 -1
- package/dist/core/device/hdc/input.js +0 -1
- package/dist/core/device/hdc/screenshot.d.ts +0 -1
- package/dist/core/device/hdc/screenshot.js +0 -1
- package/dist/core/device/index.d.ts +0 -1
- package/dist/core/device/index.js +0 -1
- package/dist/core/device/types.d.ts +0 -1
- package/dist/core/device/types.js +0 -1
- package/dist/core/knowledge/knowledge_manager.d.ts +0 -1
- package/dist/core/knowledge/knowledge_manager.js +0 -1
- package/dist/core/knowledge/vectordb.d.ts +0 -1
- package/dist/core/knowledge/vectordb.js +0 -1
- package/dist/core/mcp/adapter_factory.d.ts +0 -1
- package/dist/core/mcp/adapter_factory.js +0 -1
- package/dist/core/mcp/android_adapter.d.ts +1 -2
- package/dist/core/mcp/android_adapter.js +0 -1
- package/dist/core/mcp/base_adapter.d.ts +0 -1
- package/dist/core/mcp/base_adapter.js +0 -1
- package/dist/core/mcp/harmony_hdc_adapter.d.ts +9 -1
- package/dist/core/mcp/harmony_hdc_adapter.js +195 -2
- package/dist/core/mcp/ios_adapter.d.ts +1 -2
- package/dist/core/mcp/ios_adapter.js +0 -1
- package/dist/core/mcp/local_tools.d.ts +0 -1
- package/dist/core/mcp/local_tools.js +0 -1
- package/dist/core/mcp/mcp_tools.d.ts +19 -3
- package/dist/core/mcp/mcp_tools.js +40 -13
- package/dist/core/mcp/types.d.ts +0 -1
- package/dist/core/mcp/types.js +0 -1
- package/dist/core/memory/_utils.d.ts +18 -0
- package/dist/core/memory/_utils.js +140 -0
- package/dist/core/memory/compressed_session.d.ts +0 -1
- package/dist/core/memory/compressed_session.js +0 -1
- package/dist/core/memory/context_compressor.d.ts +0 -1
- package/dist/core/memory/context_compressor.js +0 -1
- package/dist/core/memory/index.d.ts +0 -1
- package/dist/core/memory/index.js +0 -1
- package/dist/core/memory/memory_manager.d.ts +0 -1
- package/dist/core/memory/memory_manager.js +0 -1
- package/dist/core/memory/reflector.d.ts +0 -1
- package/dist/core/memory/reflector.js +2 -3
- package/dist/core/memory/replan_manager.d.ts +9 -0
- package/dist/core/memory/replan_manager.js +12 -0
- package/dist/core/memory/session_factory.d.ts +0 -1
- package/dist/core/memory/session_factory.js +0 -1
- package/dist/core/memory/tool_player.d.ts +0 -1
- package/dist/core/memory/tool_player.js +0 -1
- package/dist/core/memory/tool_player_popup.d.ts +66 -0
- package/dist/core/memory/tool_player_popup.js +276 -0
- package/dist/core/memory/tool_player_replan.d.ts +49 -0
- package/dist/core/memory/tool_player_replan.js +226 -0
- package/dist/core/memory/tool_player_xpath.d.ts +52 -0
- package/dist/core/memory/tool_player_xpath.js +139 -0
- package/dist/core/memory/tool_recorder.d.ts +0 -1
- package/dist/core/memory/tool_recorder.js +0 -1
- package/dist/core/preprocessor/task_splitter.d.ts +0 -1
- package/dist/core/preprocessor/task_splitter.js +0 -1
- package/dist/core/prompt/prompt_loader.d.ts +0 -1
- package/dist/core/prompt/prompt_loader.js +3 -2
- package/dist/core/prompt/templates/debug/hypium/hypium_v2.0_optimize_scroll_search.md +310 -0
- package/dist/core/prompt/templates/debug/hypium/hypium_v2.0_relative_1000.md +284 -0
- package/dist/core/prompt/templates/debug/planner/planner_v3.0.md +140 -0
- package/dist/core/prompt/templates/debug/single/single_v2.0_optimize_scroll_search.md +272 -0
- package/dist/core/prompt/templates/debug/single/single_v2.0_relative_1000.md +277 -0
- package/dist/core/prompt/templates/single/single_v2.0_0_1000.md +315 -0
- package/dist/core/skill/skill_manager.d.ts +0 -1
- package/dist/core/skill/skill_manager.js +4 -2
- package/dist/core/skill/skills/cancel-all-follows/SKILL.md +23 -0
- package/dist/core/skill/skills/create-local-image/SKILL.md +12 -0
- package/dist/core/skill/skills/create-local-video/SKILL.md +12 -0
- package/dist/core/skill/skills/dismiss-popups/SKILL.md +39 -0
- package/dist/core/skill/skills/douyin_test_skills.md +16 -0
- package/dist/data_types/action.d.ts +0 -1
- package/dist/data_types/action.js +0 -1
- package/dist/data_types/agent.d.ts +0 -1
- package/dist/data_types/agent.js +0 -1
- package/dist/data_types/case.d.ts +32 -0
- package/dist/data_types/case.js +57 -0
- package/dist/data_types/device.d.ts +0 -1
- package/dist/data_types/device.js +0 -1
- package/dist/data_types/index.d.ts +2 -1
- package/dist/data_types/index.js +6 -2
- package/dist/data_types/report.d.ts +0 -1
- package/dist/data_types/report.js +0 -1
- package/dist/data_types/screen.d.ts +12 -0
- package/dist/data_types/screen.js +23 -0
- package/dist/data_types/task.d.ts +0 -1
- package/dist/data_types/task.js +0 -1
- package/dist/index.d.ts +1 -2
- package/dist/index.js +37 -9
- package/dist/loop/cli.d.ts +0 -1
- package/dist/loop/cli.js +0 -1
- package/dist/loop/orchestrator.d.ts +0 -1
- package/dist/loop/orchestrator.js +0 -1
- package/dist/loop/result_writer.d.ts +0 -1
- package/dist/loop/result_writer.js +0 -1
- package/dist/loop/types.d.ts +0 -1
- package/dist/loop/types.js +0 -1
- package/dist/mcp-server/server.d.ts +0 -1
- package/dist/mcp-server/server.js +88 -24
- package/dist/mcp-server/types.d.ts +283 -118
- package/dist/mcp-server/types.js +173 -31
- package/dist/reporter/batch_summary.d.ts +0 -1
- package/dist/reporter/batch_summary.js +0 -1
- package/dist/reporter/generator.d.ts +0 -15
- package/dist/reporter/generator.js +18 -505
- package/dist/reporter/html_template/index.d.ts +56 -0
- package/dist/reporter/html_template/index.js +524 -0
- package/dist/reporter/json_report.d.ts +1 -0
- package/dist/reporter/json_report.js +6 -0
- package/dist/reporter/types.d.ts +15 -15
- package/dist/reporter/types.js +1 -1
- package/dist/tools/batch_runner.d.ts +3 -2
- package/dist/tools/batch_runner.js +24 -8
- package/dist/tools/case_runner/report.d.ts +9 -0
- package/dist/tools/case_runner/report.js +264 -0
- package/dist/tools/case_runner/runner.d.ts +57 -0
- package/dist/tools/case_runner/runner.js +410 -0
- package/dist/tools/config/config_tool.d.ts +13 -0
- package/dist/tools/config/config_tool.js +339 -0
- package/dist/tools/prompt_compare/compare_runner.d.ts +13 -0
- package/dist/tools/prompt_compare/compare_runner.js +360 -0
- package/package.json +7 -3
- package/dist/api/agent_api.d.ts.map +0 -1
- package/dist/api/agent_api.js.map +0 -1
- package/dist/api/autotest_agent.d.ts.map +0 -1
- package/dist/api/autotest_agent.js.map +0 -1
- package/dist/api/types.d.ts.map +0 -1
- package/dist/api/types.js.map +0 -1
- package/dist/autotest-cli.d.ts.map +0 -1
- package/dist/autotest-cli.js.map +0 -1
- package/dist/common/case_manager.d.ts.map +0 -1
- package/dist/common/case_manager.js.map +0 -1
- package/dist/common/collect_case.d.ts.map +0 -1
- package/dist/common/collect_case.js.map +0 -1
- package/dist/common/common_errors.d.ts.map +0 -1
- package/dist/common/common_errors.js.map +0 -1
- package/dist/common/config/config_validator.d.ts.map +0 -1
- package/dist/common/config/config_validator.js.map +0 -1
- package/dist/common/config/manager.d.ts.map +0 -1
- package/dist/common/config/manager.js.map +0 -1
- package/dist/common/config/output.d.ts.map +0 -1
- package/dist/common/config/output.js.map +0 -1
- package/dist/common/config/types.d.ts.map +0 -1
- package/dist/common/config/types.js.map +0 -1
- package/dist/common/dfx/client_factory.d.ts.map +0 -1
- package/dist/common/dfx/client_factory.js.map +0 -1
- package/dist/common/dfx/context.d.ts.map +0 -1
- package/dist/common/dfx/context.js.map +0 -1
- package/dist/common/dfx/index.d.ts.map +0 -1
- package/dist/common/dfx/index.js.map +0 -1
- package/dist/common/dfx/recorder.d.ts.map +0 -1
- package/dist/common/dfx/recorder.js.map +0 -1
- package/dist/common/dfx/recording_fetch.d.ts.map +0 -1
- package/dist/common/dfx/recording_fetch.js.map +0 -1
- package/dist/common/dfx/source.d.ts.map +0 -1
- package/dist/common/dfx/source.js.map +0 -1
- package/dist/common/image_cacher.d.ts.map +0 -1
- package/dist/common/image_cacher.js.map +0 -1
- package/dist/common/image_helper.d.ts.map +0 -1
- package/dist/common/image_helper.js.map +0 -1
- package/dist/common/image_similarity.d.ts.map +0 -1
- package/dist/common/image_similarity.js.map +0 -1
- package/dist/common/llm_cache/cache_transport.d.ts.map +0 -1
- package/dist/common/llm_cache/cache_transport.js.map +0 -1
- package/dist/common/logger.d.ts.map +0 -1
- package/dist/common/logger.js.map +0 -1
- package/dist/common/model/custom_model.d.ts.map +0 -1
- package/dist/common/model/custom_model.js.map +0 -1
- package/dist/common/model/index.d.ts.map +0 -1
- package/dist/common/model/index.js.map +0 -1
- package/dist/common/path_utils.d.ts.map +0 -1
- package/dist/common/path_utils.js.map +0 -1
- package/dist/common/result_parser.d.ts.map +0 -1
- package/dist/common/result_parser.js.map +0 -1
- package/dist/common/usage/token_usage.d.ts.map +0 -1
- package/dist/common/usage/token_usage.js.map +0 -1
- package/dist/common/utils.d.ts.map +0 -1
- package/dist/common/utils.js.map +0 -1
- package/dist/core/agent/layered_agent/ability_helper.d.ts.map +0 -1
- package/dist/core/agent/layered_agent/ability_helper.js.map +0 -1
- package/dist/core/agent/layered_agent/agent.d.ts.map +0 -1
- package/dist/core/agent/layered_agent/agent.js.map +0 -1
- package/dist/core/agent/layered_agent/agent_registry.d.ts.map +0 -1
- package/dist/core/agent/layered_agent/agent_registry.js.map +0 -1
- package/dist/core/agent/layered_agent/decision.d.ts.map +0 -1
- package/dist/core/agent/layered_agent/decision.js.map +0 -1
- package/dist/core/agent/layered_agent/execute_agent/action_handler.d.ts.map +0 -1
- package/dist/core/agent/layered_agent/execute_agent/action_handler.js.map +0 -1
- package/dist/core/agent/layered_agent/execute_agent/agent_factory.d.ts.map +0 -1
- package/dist/core/agent/layered_agent/execute_agent/agent_factory.js.map +0 -1
- package/dist/core/agent/layered_agent/execute_agent/base_agent.d.ts.map +0 -1
- package/dist/core/agent/layered_agent/execute_agent/base_agent.js.map +0 -1
- package/dist/core/agent/layered_agent/execute_agent/general_agent.d.ts.map +0 -1
- package/dist/core/agent/layered_agent/execute_agent/general_agent.js.map +0 -1
- package/dist/core/agent/layered_agent/execute_agent/glm_agent.d.ts.map +0 -1
- package/dist/core/agent/layered_agent/execute_agent/glm_agent.js.map +0 -1
- package/dist/core/agent/layered_agent/execute_agent/i18n.d.ts.map +0 -1
- package/dist/core/agent/layered_agent/execute_agent/i18n.js.map +0 -1
- package/dist/core/agent/layered_agent/execute_agent/index.d.ts.map +0 -1
- package/dist/core/agent/layered_agent/execute_agent/index.js.map +0 -1
- package/dist/core/agent/layered_agent/execute_agent/mai_ui_agent.d.ts.map +0 -1
- package/dist/core/agent/layered_agent/execute_agent/mai_ui_agent.js.map +0 -1
- package/dist/core/agent/layered_agent/execute_agent/mcp_prompts.d.ts.map +0 -1
- package/dist/core/agent/layered_agent/execute_agent/mcp_prompts.js.map +0 -1
- package/dist/core/agent/layered_agent/execute_agent/parser/general_parser.d.ts.map +0 -1
- package/dist/core/agent/layered_agent/execute_agent/parser/general_parser.js.map +0 -1
- package/dist/core/agent/layered_agent/execute_agent/parser/glm_parser.d.ts.map +0 -1
- package/dist/core/agent/layered_agent/execute_agent/parser/glm_parser.js.map +0 -1
- package/dist/core/agent/layered_agent/execute_agent/parser/index.d.ts.map +0 -1
- package/dist/core/agent/layered_agent/execute_agent/parser/index.js.map +0 -1
- package/dist/core/agent/layered_agent/execute_agent/parser/mai_ui_parser.d.ts.map +0 -1
- package/dist/core/agent/layered_agent/execute_agent/parser/mai_ui_parser.js.map +0 -1
- package/dist/core/agent/layered_agent/execute_agent/prompts.d.ts.map +0 -1
- package/dist/core/agent/layered_agent/execute_agent/prompts.js.map +0 -1
- package/dist/core/agent/layered_agent/execute_agent/simple_reporter.d.ts.map +0 -1
- package/dist/core/agent/layered_agent/execute_agent/simple_reporter.js.map +0 -1
- package/dist/core/agent/layered_agent/execute_agent/utils.d.ts.map +0 -1
- package/dist/core/agent/layered_agent/execute_agent/utils.js.map +0 -1
- package/dist/core/agent/report_analyzer_agent/agent.d.ts.map +0 -1
- package/dist/core/agent/report_analyzer_agent/agent.js.map +0 -1
- package/dist/core/agent/report_analyzer_agent/config.d.ts.map +0 -1
- package/dist/core/agent/report_analyzer_agent/config.js.map +0 -1
- package/dist/core/agent/report_analyzer_agent/data_loader.d.ts.map +0 -1
- package/dist/core/agent/report_analyzer_agent/data_loader.js.map +0 -1
- package/dist/core/agent/report_analyzer_agent/guardrails.d.ts.map +0 -1
- package/dist/core/agent/report_analyzer_agent/guardrails.js.map +0 -1
- package/dist/core/agent/report_analyzer_agent/hooks.d.ts.map +0 -1
- package/dist/core/agent/report_analyzer_agent/hooks.js.map +0 -1
- package/dist/core/agent/report_analyzer_agent/index.d.ts.map +0 -1
- package/dist/core/agent/report_analyzer_agent/index.js.map +0 -1
- package/dist/core/agent/report_analyzer_agent/key_steps_builder.d.ts.map +0 -1
- package/dist/core/agent/report_analyzer_agent/key_steps_builder.js.map +0 -1
- package/dist/core/agent/report_analyzer_agent/mapping.d.ts.map +0 -1
- package/dist/core/agent/report_analyzer_agent/mapping.js.map +0 -1
- package/dist/core/agent/report_analyzer_agent/parse.d.ts.map +0 -1
- package/dist/core/agent/report_analyzer_agent/parse.js.map +0 -1
- package/dist/core/agent/report_analyzer_agent/prompt.d.ts.map +0 -1
- package/dist/core/agent/report_analyzer_agent/prompt.js.map +0 -1
- package/dist/core/agent/report_analyzer_agent/report_writer.d.ts.map +0 -1
- package/dist/core/agent/report_analyzer_agent/report_writer.js.map +0 -1
- package/dist/core/agent/report_analyzer_agent/tools.d.ts.map +0 -1
- package/dist/core/agent/report_analyzer_agent/tools.js.map +0 -1
- package/dist/core/agent/report_analyzer_agent/types.d.ts.map +0 -1
- package/dist/core/agent/report_analyzer_agent/types.js.map +0 -1
- package/dist/core/agent/rewrite_agent/agent.d.ts.map +0 -1
- package/dist/core/agent/rewrite_agent/agent.js.map +0 -1
- package/dist/core/agent/rewrite_agent/guardrails.d.ts.map +0 -1
- package/dist/core/agent/rewrite_agent/guardrails.js.map +0 -1
- package/dist/core/agent/rewrite_agent/mapping.d.ts.map +0 -1
- package/dist/core/agent/rewrite_agent/mapping.js.map +0 -1
- package/dist/core/agent/rewrite_agent/parse.d.ts.map +0 -1
- package/dist/core/agent/rewrite_agent/parse.js.map +0 -1
- package/dist/core/agent/rewrite_agent/types.d.ts.map +0 -1
- package/dist/core/agent/rewrite_agent/types.js.map +0 -1
- package/dist/core/agent/single_agent/agent.d.ts.map +0 -1
- package/dist/core/agent/single_agent/agent.js.map +0 -1
- package/dist/core/agent/single_agent/hook_manager.d.ts.map +0 -1
- package/dist/core/agent/single_agent/hook_manager.js.map +0 -1
- package/dist/core/agent/single_agent/hooks.d.ts.map +0 -1
- package/dist/core/agent/single_agent/hooks.js.map +0 -1
- package/dist/core/agent/single_agent/image_utils.d.ts.map +0 -1
- package/dist/core/agent/single_agent/image_utils.js.map +0 -1
- package/dist/core/agent/single_agent/scroll_search_agent.d.ts.map +0 -1
- package/dist/core/agent/single_agent/scroll_search_agent.js.map +0 -1
- package/dist/core/agent/single_agent/subagent_manager.d.ts.map +0 -1
- package/dist/core/agent/single_agent/subagent_manager.js.map +0 -1
- package/dist/core/agent/single_agent/tool_recorder_hook.d.ts.map +0 -1
- package/dist/core/agent/single_agent/tool_recorder_hook.js.map +0 -1
- package/dist/core/agent/types.d.ts.map +0 -1
- package/dist/core/agent/types.js.map +0 -1
- package/dist/core/agent/utils/message_builder.d.ts.map +0 -1
- package/dist/core/agent/utils/message_builder.js.map +0 -1
- package/dist/core/device/device_protocol.d.ts.map +0 -1
- package/dist/core/device/device_protocol.js.map +0 -1
- package/dist/core/device/hdc/apps.d.ts.map +0 -1
- package/dist/core/device/hdc/apps.js.map +0 -1
- package/dist/core/device/hdc/device.d.ts.map +0 -1
- package/dist/core/device/hdc/device.js.map +0 -1
- package/dist/core/device/hdc/index.d.ts.map +0 -1
- package/dist/core/device/hdc/index.js.map +0 -1
- package/dist/core/device/hdc/input.d.ts.map +0 -1
- package/dist/core/device/hdc/input.js.map +0 -1
- package/dist/core/device/hdc/screenshot.d.ts.map +0 -1
- package/dist/core/device/hdc/screenshot.js.map +0 -1
- package/dist/core/device/index.d.ts.map +0 -1
- package/dist/core/device/index.js.map +0 -1
- package/dist/core/device/types.d.ts.map +0 -1
- package/dist/core/device/types.js.map +0 -1
- package/dist/core/knowledge/knowledge_manager.d.ts.map +0 -1
- package/dist/core/knowledge/knowledge_manager.js.map +0 -1
- package/dist/core/knowledge/vectordb.d.ts.map +0 -1
- package/dist/core/knowledge/vectordb.js.map +0 -1
- package/dist/core/mcp/adapter_factory.d.ts.map +0 -1
- package/dist/core/mcp/adapter_factory.js.map +0 -1
- package/dist/core/mcp/android_adapter.d.ts.map +0 -1
- package/dist/core/mcp/android_adapter.js.map +0 -1
- package/dist/core/mcp/base_adapter.d.ts.map +0 -1
- package/dist/core/mcp/base_adapter.js.map +0 -1
- package/dist/core/mcp/harmony_hdc_adapter.d.ts.map +0 -1
- package/dist/core/mcp/harmony_hdc_adapter.js.map +0 -1
- package/dist/core/mcp/ios_adapter.d.ts.map +0 -1
- package/dist/core/mcp/ios_adapter.js.map +0 -1
- package/dist/core/mcp/local_tools.d.ts.map +0 -1
- package/dist/core/mcp/local_tools.js.map +0 -1
- package/dist/core/mcp/mcp_tools.d.ts.map +0 -1
- package/dist/core/mcp/mcp_tools.js.map +0 -1
- package/dist/core/mcp/types.d.ts.map +0 -1
- package/dist/core/mcp/types.js.map +0 -1
- package/dist/core/memory/compressed_session.d.ts.map +0 -1
- package/dist/core/memory/compressed_session.js.map +0 -1
- package/dist/core/memory/context_compressor.d.ts.map +0 -1
- package/dist/core/memory/context_compressor.js.map +0 -1
- package/dist/core/memory/index.d.ts.map +0 -1
- package/dist/core/memory/index.js.map +0 -1
- package/dist/core/memory/memory_manager.d.ts.map +0 -1
- package/dist/core/memory/memory_manager.js.map +0 -1
- package/dist/core/memory/reflector.d.ts.map +0 -1
- package/dist/core/memory/reflector.js.map +0 -1
- package/dist/core/memory/session_factory.d.ts.map +0 -1
- package/dist/core/memory/session_factory.js.map +0 -1
- package/dist/core/memory/tool_player.d.ts.map +0 -1
- package/dist/core/memory/tool_player.js.map +0 -1
- package/dist/core/memory/tool_recorder.d.ts.map +0 -1
- package/dist/core/memory/tool_recorder.js.map +0 -1
- package/dist/core/preprocessor/task_splitter.d.ts.map +0 -1
- package/dist/core/preprocessor/task_splitter.js.map +0 -1
- package/dist/core/prompt/prompt_loader.d.ts.map +0 -1
- package/dist/core/prompt/prompt_loader.js.map +0 -1
- package/dist/core/skill/skill_manager.d.ts.map +0 -1
- package/dist/core/skill/skill_manager.js.map +0 -1
- package/dist/data_types/action.d.ts.map +0 -1
- package/dist/data_types/action.js.map +0 -1
- package/dist/data_types/agent.d.ts.map +0 -1
- package/dist/data_types/agent.js.map +0 -1
- package/dist/data_types/device.d.ts.map +0 -1
- package/dist/data_types/device.js.map +0 -1
- package/dist/data_types/index.d.ts.map +0 -1
- package/dist/data_types/index.js.map +0 -1
- package/dist/data_types/report.d.ts.map +0 -1
- package/dist/data_types/report.js.map +0 -1
- package/dist/data_types/task.d.ts.map +0 -1
- package/dist/data_types/task.js.map +0 -1
- package/dist/hypium_generator/generator.d.ts +0 -38
- package/dist/hypium_generator/generator.d.ts.map +0 -1
- package/dist/hypium_generator/generator.js +0 -847
- package/dist/hypium_generator/generator.js.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/loop/cli.d.ts.map +0 -1
- package/dist/loop/cli.js.map +0 -1
- package/dist/loop/orchestrator.d.ts.map +0 -1
- package/dist/loop/orchestrator.js.map +0 -1
- package/dist/loop/result_writer.d.ts.map +0 -1
- package/dist/loop/result_writer.js.map +0 -1
- package/dist/loop/types.d.ts.map +0 -1
- package/dist/loop/types.js.map +0 -1
- package/dist/mcp-server/server.d.ts.map +0 -1
- package/dist/mcp-server/server.js.map +0 -1
- package/dist/mcp-server/types.d.ts.map +0 -1
- package/dist/mcp-server/types.js.map +0 -1
- package/dist/reporter/batch_summary.d.ts.map +0 -1
- package/dist/reporter/batch_summary.js.map +0 -1
- package/dist/reporter/generator.d.ts.map +0 -1
- package/dist/reporter/generator.js.map +0 -1
- package/dist/reporter/types.d.ts.map +0 -1
- package/dist/reporter/types.js.map +0 -1
- package/dist/tools/batch_runner.d.ts.map +0 -1
- package/dist/tools/batch_runner.js.map +0 -1
|
@@ -3,4 +3,3 @@ import type { ReportData } from './data_loader';
|
|
|
3
3
|
export declare function mapResultToOutput(result: RootCauseResult, reportData: ReportData, modelUsed: string, duration: number, llmCalls: number): AnalyzerOutput;
|
|
4
4
|
export declare function createErrorOutput(reportDir: string, errorMsg: string, modelUsed: string, duration: number): AnalyzerOutput;
|
|
5
5
|
export declare function createPrecheckOutput(reportData: ReportData, reason: string, modelUsed: string, duration: number): AnalyzerOutput;
|
|
6
|
-
//# sourceMappingURL=mapping.d.ts.map
|
|
@@ -1,2 +1 @@
|
|
|
1
1
|
export declare const MAIN_AGENT_PROMPT = "# Role\n\nYou are a senior QA analyst responsible for reviewing automated test reports, judging whether the test Agent's PASS/FAIL conclusion is accurate, and determining who caused the failure.\n\n# Task\n\nReview the test report. By analyzing the Agent's execution process and viewing screenshots, determine who caused the test failure, and based on that judge whether the original conclusion is accurate.\n\n# Thinking Process\n\n**Hard constraint**: Complete each phase in one pass; do not oscillate between phases. Evaluate all 5 attribution layers at once; do not repeatedly reconsider with \"But wait/Actually\". Once you move to the next phase, do not modify the previous phase's conclusion.\n\n## Fact Analysis (no attribution conclusions allowed)\n\nFirst clarify the task intent, then record objective facts step by step. **This phase forbids any attribution conclusions** -- only record \"what was observed\", do not judge \"who caused it\".\n\n1. **Task intent**: One sentence summarizing what function/scenario the task is meant to verify.\n2. **Step-by-step facts**: Record objective observations per step, one sentence each referencing the step number/evidence:\n - What operation did the Agent perform at each step\n - What did the Agent observe at each step (quote key sentences from the thinking)\n - What did the App actually do at each step (what was shown on the interface)\n - What did the test case expect at each step\n - What causal relationships exist between steps; which step is the key turning point\n - Is the Agent's observation self-consistent (any contradictions)\n - Did the Agent ignore evidence contradicting the conclusion\n\n**In this phase, call get_step_screenshot to obtain screenshot evidence**:\n- First output the suspected issues and step numbers that need screenshot review in the text analysis\n- Then call the tool to verify the suspicions (each call returns two screenshots: observed = what the Agent saw at decision time, before_action = the page before execution; compare the two to detect whether the page changed after the Agent observed it, e.g. carousel auto-switch -> operation lag)\n- Append the facts observed from screenshots to the step-by-step facts\n\n**Screenshot element interpretation guide**:\nElements in a screenshot may be real UI (popups, buttons, tab bars) or part of the content (post covers, screenshots inside cards, video frames). When interpreting:\n1. Do not assume an element is one type -- first observe appearance features (position, style, relationship with surrounding elements) and context\n2. When an element \"looks like\" some UI but appears in an unusual location, consider whether it might be part of the content\n\n**Analysis should be concise and focused**: First locate the 1-2 most suspicious steps, then call the tool to verify; do not make lengthy derivations.\n\n**Forbidden**:\n- No attribution conclusions (\"this is an Agent issue\" / \"this is an App bug\", etc.)\n- No \"But wait/Actually\" repeated reconsideration\n- No cross-step jumping reasoning\n\n## 5-Layer Equal Attribution (one-time evaluation, no repetition)\n\nBased on the objective facts recorded in the fact analysis phase, evaluate all 5 layers equally at once, **with no preset priority**. Choose the root cause by **evidence strength**: objective evidence (screenshot directly confirms a layer is wrong) > inferred evidence (LLM speculation). Choose the layer with objective evidence; when multiple layers have objective evidence, choose the more direct/abundant one; when only inference with no objective evidence exists, judge \"Inconclusive\".\n\nEvaluate these 5 layers at once:\n\n1. **App behavior**: What the App \"should do\" vs \"actually did\". **Only look at whether the app functionality/behavior is correct** (not whether the Agent operated correctly, not whether the test case expectation is reasonable)\n2. **Test case expectation**: Whether the expectation itself is reasonable (unrealizable / expectation that should not exist). **Only look at expectation reasonableness** (not Agent/app)\n3. **Test case steps**: Whether the step description is clear (can it correspond to the interface). **Only look at description clarity** (not Agent understanding)\n4. **Environment**: Whether data/account/device/network are satisfied\n5. **Agent execution**: Whether the Agent's understanding/operation is correct (identified the right element / clicked the right position / followed the steps). **Only look at Agent behavior** (not app response)\n\n**Evaluate each layer independently (do not be biased by screenshots)**:\n1. Each layer must independently conclude \"problem / no problem\" -- regardless of whether there are screenshots, no layer can be skipped\n2. Screenshot evidence and logical reasoning are equal -- screenshots are one form of evidence, logical reasoning is also evidence. A layer with screenshots is not prioritized over one without\n3. Having screenshot evidence does not mean that layer is the root cause -- the phenomenon shown in the screenshot may be the result (app/Agent), the root cause may be a layer requiring logical reasoning (test case expectation / step reasonableness). After viewing screenshots still evaluate each layer independently\n\n**Phenomenon vs root cause**: Phenomena (app no response / wrong jump / not matching expectation) are results, not root causes. Root cause = the layer with objective evidence confirming \"this layer is wrong\". E.g.: screenshot confirms Agent coordinate offset (Agent objectively wrong) + app no response (phenomenon) -> Agent has objective evidence, judge Agent. Distinguish phenomenon from root cause by evidence strength, not layer order.\n\n**Key distinction**: Do not simply compare surface differences between \"thinking text\" and \"MCP call\" to judge operation errors. You must deeply understand the operation's contextual intent:\n- An Agent calling wait/swipe etc. inconsistent with the thinking text, if it is a reasonable strategic behavior (waiting for page load, swiping to find a target element), and the final direction is correct, this is a strategic operation, not an operation error\n- Only when the Agent's operation caused a clear, uncorrectable wrong result (clicked the wrong key position, skipped the core verification step, judgment logic has a flaw), judge it as an Agent issue\n\n**Select the main root cause at once**: Choose the main root cause by evidence strength (objective > inferred); when multiple objective evidences exist choose the more direct/abundant one. No \"medium\" leeway. If multiple layers all have problems, give the primary and secondary root causes.\n\n**Forbidden**:\n- No \"But wait/Actually\" repeated reconsideration (e.g. \"might be A... but wait could also be B... actually still A\")\n- No oscillating between the 5 layers -- evaluate all layers at once, select directly\n\n## Verification (one-time)\n\nReverse-verify the determined root cause, complete in one pass:\n\n- **Evidence sufficiency**:\n - Judge App issue -> does the screenshot or Agent observation directly show the bug? Does the bug appear in steps where the Agent operated correctly?\n - Judge Agent issue -> can you point out which specific step the Agent had cognition/operation/reasoning error? After fixing, can the task truly pass?\n - Judge test case issue -> can you give a specific test case fix plan (point out which step/which expectation is problematic, give the fixed text)? After fixing, can the task truly pass?\n - Judge environment issue -> can you point out which specific environment condition is not met? After satisfying, can the task truly pass?\n- **Fix plan feasibility**: Assuming the suggestions are applied, can the task truly pass? If not, the judgment or suggestions may be incomplete\n\n**Forbidden**: When verification finds problems, do not return to the attribution phase to reselect -- only record \"evidence insufficient\" or \"plan infeasible\" in the verification section; the final output's confidence is lowered accordingly.\n\n# Attribution Categories\n\nAttribution is divided into primary cause (4 categories) and secondary cause (specific type). Evaluate each layer independently; select by judgment criteria + boundaries:\n\n## Application Issue\n\nThe App \"should do\" vs \"actually did\" is inconsistent. Test case expectation reasonable + Agent operation correct, but the app did not implement / behaved wrong.\n\n**Functional Exception**: Function logic not implemented or abnormal. E.g. scoring calculation, search, submit etc. functions should exist but don't, or the function exists but works abnormally. Boundary: missing UI elements do not belong here (-> UI Display Bug); data not matching across pages does not belong here (-> Data Inconsistency).\n\n**UI Display Bug**: UI element missing / displayed incorrectly / layout broken. E.g. score label, icon, some UI element should exist but is not shown, or is displayed broken. Boundary: function logic not implemented does not belong here (-> Functional Exception).\n\n**Data Inconsistency**: The same data shows different values on different pages. E.g. list page shows 3 items but detail page shows 2. Boundary: single page data display error belongs to Functional Exception or UI Display Bug.\n\n**Interaction Logic Bug**: Behavior after operation does not match expectation. E.g. clicking product A jumps to product B's detail page. Boundary: Agent clicking wrong element causing abnormal app response -> judge Agent, not app.\n\n**Compatibility/Stability Bug**: Crash / blank screen / compatibility issues.\n\n## Agent Issue\n\nThe Agent's understanding/operation/reasoning is wrong. Test case expectation reasonable + app implementation correct, but the Agent did not do it right.\n\n**Operation Error**: Clicked wrong element / coordinate offset / swiped wrong direction. E.g. clicked the wrong button, swipe direction reversed.\n\n**Omitted Operation**: Skipped a necessary operation. E.g. skipped login and operated directly.\n\n**Cognition Error**: Observation/understanding error. E.g. hallucination (said it saw something that doesn't exist), missed (didn't see what should be seen), misread (misunderstood element meaning), screenshot understanding error.\n\n**Reasoning Error**: Cognition correct but conclusion derivation wrong. E.g. observed correctly but judgment logic has a flaw, over-literal interpretation of expectation.\n\n**Operation Lag**: Agent observation and decision correct, but the page state had changed by operation time (carousel auto-switch, loading delay etc.), causing abnormal operation result.\n\n**Repeated Operation**: Looping ineffective operations. E.g. repeatedly swiping but the list already reached the end.\n\n**Tool Exception**: Tool call failed / parameter error.\n\n## Test Case Issue\n\nThe test case expectation/steps themselves are unreasonable. App implementation correct + Agent operation correct, but the test case itself has problems.\n\n**Ambiguous Step**: Step description vague, causing Agent free exploration to deviate. E.g. only says \"click\" without specifying which element.\n\n**Ambiguous Expectation**: Expected result ambiguous/polysemous. E.g. \"consistency\" without specifying what compared to what.\n\n**Unexecutable**: The step itself cannot be executed. E.g. selecting the first item in an empty list.\n\n**Missing Prerequisite**: The test case did not state necessary preconditions. E.g. did not state login is required first.\n\n**Missing Step**: The test case skipped a necessary intermediate step. E.g. asked to click into the detail page but didn't say to enter the list page first.\n\n**Unreasonable Expectation**: Self-contradicting / requiring impossible behavior. E.g. expectation \"enlarge image\" but app design uses video playback.\n\n**External Dependency**: Expectation depends on external data that cannot be verified. E.g. expectation to show specific user data but not pre-provisioned.\n\n## Environment Issue\n\nData/account/device/network not satisfied.\n\n**Data Preparation**: Test data not prepared / business state not satisfied.\n**Account/Permission**: Account issue / insufficient permission.\n**Network Exception**: Network timeout / disconnection.\n**Device Exception**: Device hardware / system issue.\n**Configuration Error**: Environment config / framework init / app not installed.\n**Business Limitation**: Business state not satisfied / rules do not allow the operation.\n\n## Accuracy Judgment\n\nBased on the primary cause and the original conclusion, determine accuracy:\n\n| Primary Cause | Original Conclusion | Accuracy |\n|---------------|---------------------|----------|\n| Application Issue | FAIL | Correct |\n| Application Issue | PASS | Misjudged Pass |\n| Agent Issue | FAIL | Misjudged Fail |\n| Agent Issue | PASS | Misjudged Pass |\n| Test Case Issue | FAIL | Misjudged Fail |\n| Test Case Issue | PASS | Misjudged Pass |\n| Environment Issue | Any | Inconclusive |\n| No issue (test passed) | PASS | Correct |\n\n# Core Principles\n\n1. **Attribution must be evidence-based**: Attribution without evidence support is unreliable. Evidence sources: screenshot comparison, step operation data, judgment block content.\n2. **Agent-caused FAIL cannot be judged Correct**: When the Agent's operation error, cognition error, or reasoning error caused the expected result to not be achieved, you cannot judge FAIL as Correct just because \"the expectation was not met\". The expectation was not met because the Agent got it wrong, not because the app has a problem.\n3. **If the test case explicitly required it and it's missing, it's an Application Issue**: When the test case explicitly requires a function and the app actually lacks it, you cannot excuse the app just because \"this function is usually not here\" -- the test case explicitly required it, it's missing, it's an Application Issue.\n4. **Before judging Agent operation error, you must first view the screenshot to confirm whether the App really has a bug**: If the screenshot shows the App indeed has a bug (element does not exist / function abnormal), attribute to Application Issue not Agent Issue. Only when the screenshot confirms the App is normal and the Agent indeed got it wrong, attribute to Agent Issue.\n5. **Environment issues are not attributed to the app**: Data preparation incorrect, insufficient account permission and other environment issues causing FAIL, attribute to Environment Issue not Application Issue.\n\nRegarding findings outside checkpoints: Only when all checkpoints of the test case pass and the Agent found an additional issue outside checkpoints, you need to verify whether that issue is real. If the issue is real the Agent's finding is valid; if not real attribute to cognition error. This rule only applies when all checkpoints pass, not when checkpoints fail.\n\n# Tool\n\n**get_step_screenshot(step_number, desc)** -- Returns two screenshots for the specified step and the step's operation info. The desc parameter explains why you are viewing this screenshot. Use it in the fact analysis phase to locate key steps based on suspicions.\n\n**Efficiency requirement**:\n- You must call get_step_screenshot at least once to obtain screenshot evidence before attributing (pure text analysis cannot directly conclude).\n\n## Tool-calling protocol\n\nSince the runtime does not expose native function-calling, express tool requests as text markers. When you need to view a step's screenshot, output exactly one line in this format (each marker on its own line):\n\n```\n[TOOL_CALL] get_step_screenshot step_number=3 desc=\"reason for viewing this screenshot\"\n```\n\nYou may output multiple [TOOL_CALL] lines in a single response to view several steps at once. After the tool results are returned, continue your analysis in the next turn.\n\nWhen you have gathered enough evidence and are ready to give the final verdict, output the Markdown report with the `## Verdict` section and no [TOOL_CALL] lines.\n\n# Test Case Validity Guide\n\n- **Valid** -- The expected result is explicit and specific, and verifiable from the report.\n- **Unreasonable Expectation** -- The expectation itself is self-contradicting, or requires behavior the app cannot possibly implement. Note: just because a function \"is usually not on this page\" does not make it an unreasonable expectation -- if the test case explicitly required that function and the app lacks it, attribute to Application Issue.\n- **Unverifiable** -- The expectation depends on external state (server config, backend data, etc.) and cannot be observed from screenshots or layout.\n- **Ambiguous** -- The expectation is vague or polysemous, cannot be clearly judged as pass/fail.\n\n# Input\n\nYou will receive the following information:\n\n1. **Original conclusion** -- PASS or FAIL.\n2. **Test case** -- The original test case text, containing actions and expected results.\n3. **Agent execution process** -- The Agent's per-step thinking and reasoning chain.\n4. **Agent judgment block** -- The Agent's structured checkpoints, observed states, and final conclusion.\n5. **Step inventory** -- Screenshot numbers and corresponding operation descriptions, used to locate which screenshots to view.\n\n# Output Format\n\nOutput Markdown. First output the three thinking-process sections, then the structured verdict:\n\n```\n## Fact Analysis (no attribution conclusions allowed)\nStep-by-step facts:\n- step{N}: {objective observation} (no attribution, no \"But wait\")\n\n## 5-Layer Equal Attribution (one-time evaluation, no repetition)\nApp behavior: {evidence or \"no obvious issue\"}\nTest case expectation: {evidence or \"no obvious issue\"}\nTest case steps: {evidence or \"no obvious issue\"}\nEnvironment: {evidence or \"no obvious issue\"}\nAgent execution: {evidence or \"no obvious issue\"}\nMain root cause: {select the layer with most abundant evidence, no medium leeway}\n\n## Verification (one-time)\nEvidence sufficiency: {whether sufficient, if insufficient explain}\nFix plan feasibility: {whether feasible, if infeasible explain}\n\n## Verdict\n- Accuracy: Correct/Misjudged Pass/Misjudged Fail/Inconclusive\n- Primary Cause: Application Issue/Agent Issue/Test Case Issue/Environment Issue\n- Secondary Cause: Functional Exception/UI Display Bug/Data Inconsistency/Interaction Logic Bug/Compatibility/Stability Bug/Operation Error/Omitted Operation/Cognition Error/Reasoning Error/Operation Lag/Repeated Operation/Tool Exception/Ambiguous Step/Ambiguous Expectation/Unexecutable/Missing Prerequisite/Missing Step/Unreasonable Expectation/External Dependency/Network Exception/Device Exception/Configuration Error/Data Preparation/Business Limitation\n- Root Cause: specific description\n- Test Case Validity: Valid/Unreasonable Expectation/Unverifiable/Ambiguous\n- Confidence: High/Medium/Low\n\n## Task Intent\nYour understanding of the task intent (one sentence)\n\n## Analysis Summary\nNo more than 300 words of analysis\n\n## Evidence List\nEach item references the step number and specific observation\n\n## Improvement Suggestions\n1. {specific, actionable fix suggestion for the root cause}\n2. {specific, actionable fix suggestion for the root cause}\n3. {specific, actionable fix suggestion for the root cause}\nReverse verification: {Assuming the above suggestions are applied, can the task execute and pass normally? If not, the root cause judgment or suggestions may be incomplete}\n```\n\n## Examples\n\n### Example 1: Agent operation error -> FAIL\n\nInput: The Agent clicked a promotional banner instead of a product card, entering a promo page instead of the product detail page.\n\n- Primary Cause: Agent Issue\n- Secondary Cause: Operation Error\n- Root Cause: The Agent clicked the promotional banner instead of the product card; the app correctly jumped to the promo page; the failure was caused by the Agent's operation error\n- Accuracy: Misjudged Fail\n\n### Example 2: App function missing -> FAIL\n\nInput: The test case expects a \"Delivery Method\" menu on the product config page; the screenshot confirms it actually does not exist. The Agent operated correctly.\n\n- Primary Cause: Application Issue\n- Secondary Cause: Functional Exception\n- Root Cause: The product config page lacks the delivery method menu explicitly required by the test case; the Agent's operation and observation were both correct; the FAIL judgment is accurate\n- Accuracy: Correct\n\n### Example 3: Agent operation lag -> FAIL\n\nInput: The Agent observed the carousel showing product A; during thinking the carousel auto-switched to product B; clicking the same position entered product B's detail page. Two screenshots show the carousel switching between observation and operation.\n\n- Primary Cause: Agent Issue\n- Secondary Cause: Operation Lag\n- Root Cause: The carousel auto-switched between the Agent's observation and click; the page content had changed by the time of click; the app correctly jumped to the product detail page corresponding to the click at that time\n- Accuracy: Misjudged Fail\n\n### Example 4: Unreasonable test case expectation -> FAIL (do not judge app/Agent)\n\nInput: The test case expects \"enlarge image to view details\", but the app design uses video playback to display content (not a bug). The Agent operated correctly and correctly observed it is video not image enlargement.\n\n- Primary Cause: Test Case Issue\n- Secondary Cause: Unreasonable Expectation\n- Root Cause: The test case expectation \"enlarge image\" does not match the app design (video playback display); the app function works normally; the Agent's operation and observation were both correct. Superficially it looks like \"app interaction logic does not match expectation\", but the root cause is actually the unreasonable test case expectation\n- Accuracy: Misjudged Fail\n";
|
|
2
|
-
//# sourceMappingURL=prompt.d.ts.map
|
|
@@ -298,4 +298,3 @@ Input: The test case expects "enlarge image to view details", but the app design
|
|
|
298
298
|
- Root Cause: The test case expectation "enlarge image" does not match the app design (video playback display); the app function works normally; the Agent's operation and observation were both correct. Superficially it looks like "app interaction logic does not match expectation", but the root cause is actually the unreasonable test case expectation
|
|
299
299
|
- Accuracy: Misjudged Fail
|
|
300
300
|
`;
|
|
301
|
-
//# sourceMappingURL=prompt.js.map
|
|
@@ -23,4 +23,3 @@ export type ScreenshotContentBlock = {
|
|
|
23
23
|
};
|
|
24
24
|
export declare function getStepScreenshot(ctx: AnalyzerContext, stepNumber: string | number, desc?: string): Promise<ScreenshotToolResult>;
|
|
25
25
|
export declare function getStepScreenshotErrorFunction(error: Error): string;
|
|
26
|
-
//# sourceMappingURL=tools.d.ts.map
|
|
@@ -22,4 +22,3 @@ import { RewriteDecision } from './types';
|
|
|
22
22
|
* @param _subCategory 二级根因分类(二元门不依赖此字段,保留以兼容调用方签名)
|
|
23
23
|
*/
|
|
24
24
|
export declare function decideAction(rootCauseCategory: string | null | undefined, _subCategory?: string | null): RewriteDecision;
|
|
25
|
-
//# sourceMappingURL=mapping.d.ts.map
|
|
@@ -40,4 +40,3 @@ export declare class SingleAgent {
|
|
|
40
40
|
export declare class FastActionAgent extends SingleAgent {
|
|
41
41
|
constructor(adapter: MCPDeviceAdapter, config: AppConfig, reportGenerator: ReportGenerator, hooks?: AgentHooks, llmCaller?: LLMCaller);
|
|
42
42
|
}
|
|
43
|
-
//# sourceMappingURL=agent.d.ts.map
|
|
@@ -67,7 +67,7 @@ class SingleAgent {
|
|
|
67
67
|
getCurrentStepNumber: () => this.stepNumber,
|
|
68
68
|
maxHistoryImage: this.config.agent.unified.maxHistoryImage,
|
|
69
69
|
compressionConfig: this.config.contextCompression ?? { enabled: true, maxTokens: 7000, maxRecentMessages: 6 },
|
|
70
|
-
reflectionConfig: this.config.reflection ?? { enabled: true, initialStep:
|
|
70
|
+
reflectionConfig: this.config.reflection ?? { enabled: true, initialStep: 25, interval: 15, recentMessages: 10 },
|
|
71
71
|
});
|
|
72
72
|
if (this.hooks) {
|
|
73
73
|
await this.hooks.onAgentStart('single');
|
|
@@ -796,4 +796,3 @@ class FastActionAgent extends SingleAgent {
|
|
|
796
796
|
}
|
|
797
797
|
}
|
|
798
798
|
exports.FastActionAgent = FastActionAgent;
|
|
799
|
-
//# sourceMappingURL=agent.js.map
|
|
@@ -20,4 +20,3 @@ export declare class SingleAgentHooks implements AgentHooks {
|
|
|
20
20
|
onToolStart(agentName: string, toolName: string, args?: Record<string, unknown>): Promise<void>;
|
|
21
21
|
onToolEnd(agentName: string, toolName: string, result: string, stepNumber: number): Promise<void>;
|
|
22
22
|
}
|
|
23
|
-
//# sourceMappingURL=hooks.d.ts.map
|
|
@@ -35,4 +35,3 @@ export declare function injectScreenshotsAndHistory(prevScreenshot: string | nul
|
|
|
35
35
|
* Converts older image parts to text placeholders.
|
|
36
36
|
*/
|
|
37
37
|
export declare function manageImageHistory(items: Array<Record<string, unknown>>, maxImages?: number): Array<Record<string, unknown>>;
|
|
38
|
-
//# sourceMappingURL=image_utils.d.ts.map
|
package/dist/core/agent/types.js
CHANGED
|
@@ -56,4 +56,3 @@ export declare function launchApp(driver: HdcDriver, appName: string, delay?: nu
|
|
|
56
56
|
export declare function resetDevice(driver: HdcDriver): Promise<void>;
|
|
57
57
|
/** Async sleep for the given number of seconds. */
|
|
58
58
|
export declare function sleep(seconds: number): Promise<void>;
|
|
59
|
-
//# sourceMappingURL=device.d.ts.map
|
|
@@ -6,4 +6,3 @@ export { getScreenshot } from './screenshot';
|
|
|
6
6
|
export { inputText, typeText, clearText } from './input';
|
|
7
7
|
export { APP_PACKAGES, APP_ABILITIES, TOP_225_APP, BUNDLE_NAME_TO_APP_NAME, getPackageName, getAppName, listSupportedApps, } from './apps';
|
|
8
8
|
export { getAppDisplayName, getCurrentApp, tap, doubleTap, longPress, swipe, back, home, launchApp, resetDevice, } from './device';
|
|
9
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -29,4 +29,3 @@ Object.defineProperty(exports, "back", { enumerable: true, get: function () { re
|
|
|
29
29
|
Object.defineProperty(exports, "home", { enumerable: true, get: function () { return device_1.home; } });
|
|
30
30
|
Object.defineProperty(exports, "launchApp", { enumerable: true, get: function () { return device_1.launchApp; } });
|
|
31
31
|
Object.defineProperty(exports, "resetDevice", { enumerable: true, get: function () { return device_1.resetDevice; } });
|
|
32
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -17,4 +17,3 @@ export declare function inputText(driver: HdcDriver, text: string): Promise<void
|
|
|
17
17
|
export declare function typeText(driver: HdcDriver, text: string): Promise<void>;
|
|
18
18
|
/** Clear text in the currently focused input field (select-all then delete). */
|
|
19
19
|
export declare function clearText(driver: HdcDriver): Promise<void>;
|
|
20
|
-
//# sourceMappingURL=input.d.ts.map
|
|
@@ -7,4 +7,3 @@ export declare function createAdapterFromDeviceInfo(deviceInfo: {
|
|
|
7
7
|
port?: number;
|
|
8
8
|
}, configManager: ConfigManager): MCPDeviceAdapter;
|
|
9
9
|
export declare function detectDevicePlatform(deviceSn: string, config: Record<string, unknown>): DevicePlatform;
|
|
10
|
-
//# sourceMappingURL=adapter_factory.d.ts.map
|
|
@@ -12,7 +12,7 @@ export declare class AndroidMCPAdapter extends MCPDeviceAdapterBase {
|
|
|
12
12
|
private static readonly MCP_SERVICE_PORT;
|
|
13
13
|
private static readonly SCREENSHOT_TOOL_NAME;
|
|
14
14
|
private static readonly PRESS_BUTTON_TOOL;
|
|
15
|
-
constructor(adbPath: string
|
|
15
|
+
constructor(adbPath: string, configManager: ConfigManager);
|
|
16
16
|
getDefaultServerUrl(): string;
|
|
17
17
|
getMcpServicePort(): number;
|
|
18
18
|
useSseTransport(): boolean;
|
|
@@ -27,4 +27,3 @@ export declare class AndroidMCPAdapter extends MCPDeviceAdapterBase {
|
|
|
27
27
|
private closeLogStream;
|
|
28
28
|
private isPortListening;
|
|
29
29
|
}
|
|
30
|
-
//# sourceMappingURL=android_adapter.d.ts.map
|
|
@@ -24,6 +24,9 @@ export declare class HarmonyHdcAdapter extends MCPDeviceAdapterBase {
|
|
|
24
24
|
private readonly deviceResetDevice;
|
|
25
25
|
private readonly deviceScreenAlwaysOn;
|
|
26
26
|
private readonly deviceOperationMode;
|
|
27
|
+
private toastListener;
|
|
28
|
+
private toastBuffer;
|
|
29
|
+
private toastListening;
|
|
27
30
|
constructor(hdcPath: string, configManager: ConfigManager);
|
|
28
31
|
getDefaultServerUrl(): string;
|
|
29
32
|
getMcpServicePort(): number;
|
|
@@ -45,5 +48,10 @@ export declare class HarmonyHdcAdapter extends MCPDeviceAdapterBase {
|
|
|
45
48
|
private extractPoint;
|
|
46
49
|
private keyNameToCode;
|
|
47
50
|
private clearRecentTasks;
|
|
51
|
+
private pinchGesture;
|
|
52
|
+
private rotateGesture;
|
|
53
|
+
private startToastListener;
|
|
54
|
+
private stopToastListener;
|
|
55
|
+
private getLatestToast;
|
|
56
|
+
private extractToastText;
|
|
48
57
|
}
|
|
49
|
-
//# sourceMappingURL=harmony_hdc_adapter.d.ts.map
|