@autotest/agent 0.0.1 → 0.0.3
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 +43 -27
- package/dist/api/agent_api.d.ts +1 -1
- package/dist/api/agent_api.js +555 -0
- package/dist/api/autotest_agent.d.ts +0 -1
- package/dist/api/autotest_agent.js +205 -0
- package/dist/api/types.d.ts +0 -1
- package/dist/api/types.js +11 -0
- package/dist/autotest-cli.d.ts +1 -1
- package/dist/autotest-cli.js +391 -0
- package/dist/common/case_manager.d.ts +0 -1
- package/dist/common/case_manager.js +91 -0
- package/dist/common/collect_case.d.ts +0 -1
- package/dist/common/collect_case.js +128 -0
- package/dist/common/common_errors.d.ts +0 -1
- package/dist/common/common_errors.js +66 -0
- package/dist/common/config/config_validator.d.ts +0 -1
- package/dist/common/config/config_validator.js +28 -0
- package/dist/common/config/manager.d.ts +0 -1
- package/dist/common/config/manager.js +257 -0
- package/dist/common/config/output.d.ts +0 -1
- package/dist/common/config/output.js +59 -0
- package/dist/common/config/types.d.ts +2243 -2244
- package/dist/common/config/types.js +184 -0
- package/dist/common/dfx/client_factory.d.ts +0 -1
- package/dist/common/dfx/client_factory.js +62 -0
- package/dist/common/dfx/context.d.ts +0 -1
- package/dist/common/dfx/context.js +23 -0
- package/dist/common/dfx/index.d.ts +0 -1
- package/dist/common/dfx/index.js +15 -0
- package/dist/common/dfx/recorder.d.ts +0 -1
- package/dist/common/dfx/recorder.js +191 -0
- package/dist/common/dfx/recording_fetch.d.ts +0 -1
- package/dist/common/dfx/recording_fetch.js +228 -0
- package/dist/common/dfx/source.d.ts +0 -1
- package/dist/common/dfx/source.js +13 -0
- package/dist/common/image_cacher.d.ts +0 -1
- package/dist/common/image_cacher.js +36 -0
- package/dist/common/image_helper.d.ts +0 -1
- package/dist/common/image_helper.js +128 -0
- package/dist/common/image_similarity.d.ts +0 -1
- package/dist/common/image_similarity.js +171 -0
- package/dist/common/llm_cache/cache_transport.d.ts +2 -1
- package/dist/common/llm_cache/cache_transport.js +102 -0
- 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 +158 -0
- package/dist/common/model/custom_model.d.ts +0 -1
- package/dist/common/model/custom_model.js +467 -0
- package/dist/common/model/index.d.ts +0 -1
- package/dist/common/model/index.js +5 -0
- package/dist/common/path_utils.d.ts +0 -1
- package/dist/common/path_utils.js +81 -0
- package/dist/common/result_parser.d.ts +0 -1
- package/dist/common/result_parser.js +49 -0
- package/dist/common/usage/token_usage.d.ts +0 -1
- package/dist/common/usage/token_usage.js +117 -0
- package/dist/common/utils.d.ts +0 -1
- package/dist/common/utils.js +125 -0
- package/dist/core/agent/layered_agent/ability_helper.d.ts +0 -1
- package/dist/core/agent/layered_agent/ability_helper.js +125 -0
- package/dist/core/agent/layered_agent/agent.d.ts +0 -1
- package/dist/core/agent/layered_agent/agent.js +37 -0
- package/dist/core/agent/layered_agent/agent_registry.d.ts +0 -1
- package/dist/core/agent/layered_agent/agent_registry.js +75 -0
- package/dist/core/agent/layered_agent/decision.d.ts +0 -1
- package/dist/core/agent/layered_agent/decision.js +478 -0
- 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 +155 -0
- 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 +41 -0
- 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 +112 -0
- 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 +207 -0
- 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 +241 -0
- package/dist/core/agent/layered_agent/execute_agent/i18n.d.ts +0 -1
- package/dist/core/agent/layered_agent/execute_agent/i18n.js +34 -0
- package/dist/core/agent/layered_agent/execute_agent/index.d.ts +0 -1
- package/dist/core/agent/layered_agent/execute_agent/index.js +67 -0
- 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 +316 -0
- package/dist/core/agent/layered_agent/execute_agent/mcp_prompts.d.ts +0 -1
- package/dist/core/agent/layered_agent/execute_agent/mcp_prompts.js +154 -0
- 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 +243 -0
- 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 +139 -0
- 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 +9 -0
- 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 +94 -0
- package/dist/core/agent/layered_agent/execute_agent/prompts.d.ts +0 -1
- package/dist/core/agent/layered_agent/execute_agent/prompts.js +109 -0
- 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 +33 -0
- package/dist/core/agent/layered_agent/execute_agent/utils.d.ts +0 -1
- package/dist/core/agent/layered_agent/execute_agent/utils.js +52 -0
- package/dist/core/agent/report_analyzer_agent/agent.d.ts +0 -1
- package/dist/core/agent/report_analyzer_agent/agent.js +565 -0
- package/dist/core/agent/report_analyzer_agent/config.d.ts +0 -1
- package/dist/core/agent/report_analyzer_agent/config.js +22 -0
- package/dist/core/agent/report_analyzer_agent/data_loader.d.ts +0 -1
- package/dist/core/agent/report_analyzer_agent/data_loader.js +255 -0
- package/dist/core/agent/report_analyzer_agent/guardrails.d.ts +0 -1
- package/dist/core/agent/report_analyzer_agent/guardrails.js +99 -0
- package/dist/core/agent/report_analyzer_agent/hooks.d.ts +0 -1
- package/dist/core/agent/report_analyzer_agent/hooks.js +31 -0
- package/dist/core/agent/report_analyzer_agent/index.d.ts +0 -1
- package/dist/core/agent/report_analyzer_agent/index.js +52 -0
- 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 +42 -0
- package/dist/core/agent/report_analyzer_agent/mapping.d.ts +0 -1
- package/dist/core/agent/report_analyzer_agent/mapping.js +133 -0
- package/dist/core/agent/report_analyzer_agent/parse.d.ts +0 -1
- package/dist/core/agent/report_analyzer_agent/parse.js +375 -0
- package/dist/core/agent/report_analyzer_agent/prompt.d.ts +0 -1
- package/dist/core/agent/report_analyzer_agent/prompt.js +300 -0
- package/dist/core/agent/report_analyzer_agent/report_writer.d.ts +0 -1
- package/dist/core/agent/report_analyzer_agent/report_writer.js +558 -0
- package/dist/core/agent/report_analyzer_agent/tools.d.ts +0 -1
- package/dist/core/agent/report_analyzer_agent/tools.js +150 -0
- package/dist/core/agent/report_analyzer_agent/types.d.ts +0 -1
- package/dist/core/agent/report_analyzer_agent/types.js +274 -0
- package/dist/core/agent/rewrite_agent/agent.d.ts +0 -1
- package/dist/core/agent/rewrite_agent/agent.js +209 -0
- package/dist/core/agent/rewrite_agent/guardrails.d.ts +0 -1
- package/dist/core/agent/rewrite_agent/guardrails.js +95 -0
- package/dist/core/agent/rewrite_agent/mapping.d.ts +0 -1
- package/dist/core/agent/rewrite_agent/mapping.js +56 -0
- package/dist/core/agent/rewrite_agent/parse.d.ts +0 -1
- package/dist/core/agent/rewrite_agent/parse.js +121 -0
- package/dist/core/agent/rewrite_agent/types.d.ts +0 -1
- package/dist/core/agent/rewrite_agent/types.js +37 -0
- package/dist/core/agent/single_agent/agent.d.ts +0 -1
- package/dist/core/agent/single_agent/agent.js +798 -0
- package/dist/core/agent/single_agent/hook_manager.d.ts +0 -1
- package/dist/core/agent/single_agent/hook_manager.js +60 -0
- package/dist/core/agent/single_agent/hooks.d.ts +0 -1
- package/dist/core/agent/single_agent/hooks.js +288 -0
- package/dist/core/agent/single_agent/image_utils.d.ts +0 -1
- package/dist/core/agent/single_agent/image_utils.js +159 -0
- package/dist/core/agent/single_agent/scroll_search_agent.d.ts +0 -1
- package/dist/core/agent/single_agent/scroll_search_agent.js +376 -0
- package/dist/core/agent/single_agent/subagent_manager.d.ts +0 -1
- package/dist/core/agent/single_agent/subagent_manager.js +73 -0
- package/dist/core/agent/single_agent/tool_recorder_hook.d.ts +0 -1
- package/dist/core/agent/single_agent/tool_recorder_hook.js +42 -0
- package/dist/core/agent/types.d.ts +0 -1
- package/dist/core/agent/types.js +2 -0
- package/dist/core/agent/utils/message_builder.d.ts +0 -1
- package/dist/core/agent/utils/message_builder.js +138 -0
- package/dist/core/device/device_protocol.d.ts +0 -1
- package/dist/core/device/device_protocol.js +2 -0
- package/dist/core/device/hdc/apps.d.ts +0 -1
- package/dist/core/device/hdc/apps.js +437 -0
- package/dist/core/device/hdc/device.d.ts +0 -1
- package/dist/core/device/hdc/device.js +219 -0
- package/dist/core/device/hdc/index.d.ts +0 -1
- package/dist/core/device/hdc/index.js +31 -0
- package/dist/core/device/hdc/input.d.ts +0 -1
- package/dist/core/device/hdc/input.js +74 -0
- package/dist/core/device/hdc/screenshot.d.ts +0 -1
- package/dist/core/device/hdc/screenshot.js +171 -0
- package/dist/core/device/index.d.ts +0 -1
- package/dist/core/device/index.js +70 -0
- package/dist/core/device/types.d.ts +0 -1
- package/dist/core/device/types.js +2 -0
- package/dist/core/knowledge/knowledge_manager.d.ts +0 -1
- package/dist/core/knowledge/knowledge_manager.js +70 -0
- package/dist/core/knowledge/vectordb.d.ts +0 -1
- package/dist/core/knowledge/vectordb.js +283 -0
- package/dist/core/mcp/adapter_factory.d.ts +0 -1
- package/dist/core/mcp/adapter_factory.js +99 -0
- package/dist/core/mcp/android_adapter.d.ts +1 -2
- package/dist/core/mcp/android_adapter.js +286 -0
- package/dist/core/mcp/base_adapter.d.ts +0 -1
- package/dist/core/mcp/base_adapter.js +86 -0
- package/dist/core/mcp/harmony_hdc_adapter.d.ts +9 -1
- package/dist/core/mcp/harmony_hdc_adapter.js +782 -0
- package/dist/core/mcp/ios_adapter.d.ts +1 -2
- package/dist/core/mcp/ios_adapter.js +286 -0
- package/dist/core/mcp/local_tools.d.ts +0 -1
- package/dist/core/mcp/local_tools.js +41 -0
- package/dist/core/mcp/mcp_tools.d.ts +0 -1
- package/dist/core/mcp/mcp_tools.js +382 -0
- package/dist/core/mcp/types.d.ts +0 -1
- package/dist/core/mcp/types.js +6 -0
- package/dist/core/memory/compressed_session.d.ts +0 -1
- package/dist/core/memory/compressed_session.js +182 -0
- package/dist/core/memory/context_compressor.d.ts +0 -1
- package/dist/core/memory/context_compressor.js +176 -0
- package/dist/core/memory/index.d.ts +0 -1
- package/dist/core/memory/index.js +22 -0
- package/dist/core/memory/memory_manager.d.ts +0 -1
- package/dist/core/memory/memory_manager.js +28 -0
- package/dist/core/memory/reflector.d.ts +0 -1
- package/dist/core/memory/reflector.js +95 -0
- package/dist/core/memory/session_factory.d.ts +0 -1
- package/dist/core/memory/session_factory.js +29 -0
- package/dist/core/memory/tool_player.d.ts +0 -1
- package/dist/core/memory/tool_player.js +225 -0
- package/dist/core/memory/tool_recorder.d.ts +0 -1
- package/dist/core/memory/tool_recorder.js +126 -0
- package/dist/core/preprocessor/task_splitter.d.ts +0 -1
- package/dist/core/preprocessor/task_splitter.js +112 -0
- package/dist/core/prompt/prompt_loader.d.ts +0 -1
- package/dist/core/prompt/prompt_loader.js +313 -0
- package/dist/core/skill/skill_manager.d.ts +0 -1
- package/dist/core/skill/skill_manager.js +299 -0
- package/dist/data_types/action.d.ts +0 -1
- package/dist/data_types/action.js +2 -0
- package/dist/data_types/agent.d.ts +0 -1
- package/dist/data_types/agent.js +2 -0
- package/dist/data_types/device.d.ts +0 -1
- package/dist/data_types/device.js +2 -0
- package/dist/data_types/index.d.ts +0 -1
- package/dist/data_types/index.js +6 -0
- package/dist/data_types/report.d.ts +0 -1
- package/dist/data_types/report.js +6 -0
- package/dist/data_types/task.d.ts +0 -1
- package/dist/data_types/task.js +2 -0
- package/dist/index.d.ts +1 -2
- package/dist/index.js +164 -1
- package/dist/loop/cli.d.ts +0 -1
- package/dist/loop/cli.js +127 -0
- package/dist/loop/orchestrator.d.ts +0 -1
- package/dist/loop/orchestrator.js +314 -0
- package/dist/loop/result_writer.d.ts +0 -1
- package/dist/loop/result_writer.js +260 -0
- package/dist/loop/types.d.ts +0 -1
- package/dist/loop/types.js +82 -0
- package/dist/mcp-server/server.d.ts +0 -1
- package/dist/mcp-server/server.js +341 -0
- package/dist/mcp-server/types.d.ts +283 -118
- package/dist/mcp-server/types.js +202 -0
- package/dist/reporter/batch_summary.d.ts +0 -1
- package/dist/reporter/batch_summary.js +197 -0
- package/dist/reporter/generator.d.ts +0 -1
- package/dist/reporter/generator.js +772 -0
- package/dist/reporter/types.d.ts +14 -15
- package/dist/reporter/types.js +44 -0
- package/dist/tools/batch_runner.d.ts +1 -1
- package/dist/tools/batch_runner.js +731 -0
- package/package.json +5 -3
- package/dist/common/config/config.yaml +0 -113
- package/dist/hypium_generator/generator.d.ts +0 -38
|
@@ -6,14 +6,41 @@ export interface McpServerConfig {
|
|
|
6
6
|
autoStart: boolean;
|
|
7
7
|
}
|
|
8
8
|
export declare enum McpServerToolName {
|
|
9
|
-
|
|
10
|
-
|
|
9
|
+
CLICK = "click",
|
|
10
|
+
DOUBLE_CLICK = "double_click",
|
|
11
|
+
LONG_CLICK = "long_click",
|
|
11
12
|
SWIPE = "swipe",
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
13
|
+
DRAG = "drag",
|
|
14
|
+
INPUT_TEXT = "input_text",
|
|
15
|
+
CLEAR_TEXT = "clear_text",
|
|
16
|
+
GO_BACK = "go_back",
|
|
17
|
+
GO_HOME = "go_home",
|
|
18
|
+
START_APP = "start_app",
|
|
19
|
+
STOP_APP = "stop_app",
|
|
20
|
+
CLEAR_APP_DATA = "clear_app_data",
|
|
21
|
+
WAIT = "wait",
|
|
22
|
+
PRESS_KEY = "press_key",
|
|
23
|
+
SCREEN_ON = "screen_on",
|
|
24
|
+
SCREEN_OFF = "screen_off",
|
|
25
|
+
UNLOCK_SCREEN = "unlock_screen",
|
|
26
|
+
CLEAR_RECENT_TASK = "clear_recent_task",
|
|
27
|
+
ENTER_RECENT_TASK = "enter_recent_task",
|
|
28
|
+
GET_CURRENT_APP = "get_current_app",
|
|
29
|
+
SCREENSHOT = "screenshot",
|
|
30
|
+
LAYOUT = "layout",
|
|
31
|
+
MCP_CLEAN_UP = "mcp_clean_up",
|
|
32
|
+
OPEN_CONTROL_CENTER = "open_control_center",
|
|
33
|
+
OPEN_NOTIFICATION_CENTER = "open_notification_center",
|
|
34
|
+
PINCH_IN = "pinch_in",
|
|
35
|
+
PINCH_OUT = "pinch_out",
|
|
36
|
+
ROTATE_GESTURE = "rotate_gesture",
|
|
37
|
+
ROTATE_SCREEN = "rotate_screen",
|
|
38
|
+
STOP_ALL_APP = "stop_all_app",
|
|
39
|
+
START_LISTEN_TOAST = "start_listen_toast",
|
|
40
|
+
GET_TOAST = "get_toast",
|
|
41
|
+
START_DATA_COLLECT = "start_data_collect",
|
|
42
|
+
STOP_DATA_COLLECT = "stop_data_collect",
|
|
43
|
+
GENERATE_REPORT = "generate_report",
|
|
17
44
|
LIST_DEVICES = "list_devices",
|
|
18
45
|
RUN_TASK = "run_task",
|
|
19
46
|
GET_TASK_RESULT = "get_task_result",
|
|
@@ -22,96 +49,240 @@ export declare enum McpServerToolName {
|
|
|
22
49
|
GET_CONFIG = "get_config",
|
|
23
50
|
UPDATE_CONFIG = "update_config"
|
|
24
51
|
}
|
|
25
|
-
export declare const
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
}, "strip", z.ZodTypeAny, {
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
}, {
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
}>;
|
|
38
|
-
export
|
|
39
|
-
|
|
40
|
-
x: z.ZodNumber
|
|
41
|
-
y: z.ZodNumber
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
x
|
|
45
|
-
y
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
x
|
|
49
|
-
y
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
52
|
+
export declare const ClickInputSchema: z.ZodObject<{
|
|
53
|
+
pos: z.ZodOptional<z.ZodArray<z.ZodNumber, "many">>;
|
|
54
|
+
x: z.ZodOptional<z.ZodNumber>;
|
|
55
|
+
y: z.ZodOptional<z.ZodNumber>;
|
|
56
|
+
}, "strip", z.ZodTypeAny, {
|
|
57
|
+
pos?: number[];
|
|
58
|
+
x?: number;
|
|
59
|
+
y?: number;
|
|
60
|
+
}, {
|
|
61
|
+
pos?: number[];
|
|
62
|
+
x?: number;
|
|
63
|
+
y?: number;
|
|
64
|
+
}>;
|
|
65
|
+
export declare const DoubleClickInputSchema: z.ZodObject<{
|
|
66
|
+
pos: z.ZodOptional<z.ZodArray<z.ZodNumber, "many">>;
|
|
67
|
+
x: z.ZodOptional<z.ZodNumber>;
|
|
68
|
+
y: z.ZodOptional<z.ZodNumber>;
|
|
69
|
+
}, "strip", z.ZodTypeAny, {
|
|
70
|
+
pos?: number[];
|
|
71
|
+
x?: number;
|
|
72
|
+
y?: number;
|
|
73
|
+
}, {
|
|
74
|
+
pos?: number[];
|
|
75
|
+
x?: number;
|
|
76
|
+
y?: number;
|
|
77
|
+
}>;
|
|
78
|
+
export declare const LongClickInputSchema: z.ZodObject<{
|
|
79
|
+
pos: z.ZodOptional<z.ZodArray<z.ZodNumber, "many">>;
|
|
80
|
+
x: z.ZodOptional<z.ZodNumber>;
|
|
81
|
+
y: z.ZodOptional<z.ZodNumber>;
|
|
82
|
+
duration: z.ZodDefault<z.ZodNumber>;
|
|
83
|
+
}, "strip", z.ZodTypeAny, {
|
|
84
|
+
pos?: number[];
|
|
85
|
+
x?: number;
|
|
86
|
+
y?: number;
|
|
87
|
+
duration?: number;
|
|
88
|
+
}, {
|
|
89
|
+
pos?: number[];
|
|
90
|
+
x?: number;
|
|
91
|
+
y?: number;
|
|
92
|
+
duration?: number;
|
|
93
|
+
}>;
|
|
53
94
|
export declare const SwipeInputSchema: z.ZodObject<{
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
95
|
+
start: z.ZodArray<z.ZodNumber, "many">;
|
|
96
|
+
end: z.ZodArray<z.ZodNumber, "many">;
|
|
97
|
+
direction: z.ZodOptional<z.ZodString>;
|
|
98
|
+
}, "strip", z.ZodTypeAny, {
|
|
99
|
+
start?: number[];
|
|
100
|
+
end?: number[];
|
|
101
|
+
direction?: string;
|
|
102
|
+
}, {
|
|
103
|
+
start?: number[];
|
|
104
|
+
end?: number[];
|
|
105
|
+
direction?: string;
|
|
106
|
+
}>;
|
|
107
|
+
export declare const DragInputSchema: z.ZodObject<{
|
|
108
|
+
start: z.ZodArray<z.ZodNumber, "many">;
|
|
109
|
+
end: z.ZodArray<z.ZodNumber, "many">;
|
|
110
|
+
}, "strip", z.ZodTypeAny, {
|
|
111
|
+
start?: number[];
|
|
112
|
+
end?: number[];
|
|
113
|
+
}, {
|
|
114
|
+
start?: number[];
|
|
115
|
+
end?: number[];
|
|
116
|
+
}>;
|
|
117
|
+
export declare const InputTextInputSchema: z.ZodObject<{
|
|
71
118
|
text: z.ZodString;
|
|
72
119
|
}, "strip", z.ZodTypeAny, {
|
|
73
|
-
text
|
|
120
|
+
text?: string;
|
|
121
|
+
}, {
|
|
122
|
+
text?: string;
|
|
123
|
+
}>;
|
|
124
|
+
export declare const ClearTextInputSchema: z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>;
|
|
125
|
+
export declare const GoBackInputSchema: z.ZodObject<{
|
|
126
|
+
times: z.ZodDefault<z.ZodNumber>;
|
|
127
|
+
}, "strip", z.ZodTypeAny, {
|
|
128
|
+
times?: number;
|
|
129
|
+
}, {
|
|
130
|
+
times?: number;
|
|
131
|
+
}>;
|
|
132
|
+
export declare const GoHomeInputSchema: z.ZodObject<{
|
|
133
|
+
times: z.ZodDefault<z.ZodNumber>;
|
|
134
|
+
}, "strip", z.ZodTypeAny, {
|
|
135
|
+
times?: number;
|
|
136
|
+
}, {
|
|
137
|
+
times?: number;
|
|
138
|
+
}>;
|
|
139
|
+
export declare const StartAppInputSchema: z.ZodObject<{
|
|
140
|
+
app_name: z.ZodString;
|
|
141
|
+
cold_start: z.ZodDefault<z.ZodBoolean>;
|
|
142
|
+
}, "strip", z.ZodTypeAny, {
|
|
143
|
+
app_name?: string;
|
|
144
|
+
cold_start?: boolean;
|
|
145
|
+
}, {
|
|
146
|
+
app_name?: string;
|
|
147
|
+
cold_start?: boolean;
|
|
148
|
+
}>;
|
|
149
|
+
export declare const StopAppInputSchema: z.ZodObject<{
|
|
150
|
+
app_name: z.ZodString;
|
|
151
|
+
}, "strip", z.ZodTypeAny, {
|
|
152
|
+
app_name?: string;
|
|
74
153
|
}, {
|
|
75
|
-
|
|
154
|
+
app_name?: string;
|
|
76
155
|
}>;
|
|
77
|
-
export
|
|
78
|
-
|
|
79
|
-
delay: z.ZodDefault<z.ZodNumber>;
|
|
156
|
+
export declare const ClearAppDataInputSchema: z.ZodObject<{
|
|
157
|
+
app_name: z.ZodString;
|
|
80
158
|
}, "strip", z.ZodTypeAny, {
|
|
81
|
-
|
|
159
|
+
app_name?: string;
|
|
82
160
|
}, {
|
|
83
|
-
|
|
161
|
+
app_name?: string;
|
|
84
162
|
}>;
|
|
85
|
-
export
|
|
86
|
-
|
|
87
|
-
delay: z.ZodDefault<z.ZodNumber>;
|
|
163
|
+
export declare const WaitInputSchema: z.ZodObject<{
|
|
164
|
+
duration: z.ZodDefault<z.ZodNumber>;
|
|
88
165
|
}, "strip", z.ZodTypeAny, {
|
|
89
|
-
|
|
166
|
+
duration?: number;
|
|
90
167
|
}, {
|
|
91
|
-
|
|
168
|
+
duration?: number;
|
|
92
169
|
}>;
|
|
93
|
-
export
|
|
94
|
-
|
|
95
|
-
appName: z.ZodString;
|
|
96
|
-
delay: z.ZodDefault<z.ZodNumber>;
|
|
170
|
+
export declare const PressKeyInputSchema: z.ZodObject<{
|
|
171
|
+
key_name: z.ZodEnum<["home", "power", "volume_up", "volume_down"]>;
|
|
97
172
|
}, "strip", z.ZodTypeAny, {
|
|
98
|
-
|
|
99
|
-
delay: number;
|
|
173
|
+
key_name?: "home" | "power" | "volume_up" | "volume_down";
|
|
100
174
|
}, {
|
|
101
|
-
|
|
102
|
-
delay?: number | undefined;
|
|
175
|
+
key_name?: "home" | "power" | "volume_up" | "volume_down";
|
|
103
176
|
}>;
|
|
104
|
-
export
|
|
105
|
-
export declare const
|
|
106
|
-
|
|
177
|
+
export declare const ScreenOnInputSchema: z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>;
|
|
178
|
+
export declare const ScreenOffInputSchema: z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>;
|
|
179
|
+
export declare const UnlockScreenInputSchema: z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>;
|
|
180
|
+
export declare const ClearRecentTaskInputSchema: z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>;
|
|
181
|
+
export declare const EnterRecentTaskInputSchema: z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>;
|
|
182
|
+
export declare const GetCurrentAppInputSchema: z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>;
|
|
183
|
+
export declare const ScreenshotInputSchema: z.ZodObject<{
|
|
184
|
+
save_path: z.ZodOptional<z.ZodString>;
|
|
107
185
|
}, "strip", z.ZodTypeAny, {
|
|
108
|
-
|
|
186
|
+
save_path?: string;
|
|
109
187
|
}, {
|
|
110
|
-
|
|
188
|
+
save_path?: string;
|
|
111
189
|
}>;
|
|
112
|
-
export
|
|
190
|
+
export declare const LayoutInputSchema: z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>;
|
|
191
|
+
export declare const McpCleanUpInputSchema: z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>;
|
|
192
|
+
export declare const OpenControlCenterInputSchema: z.ZodObject<{
|
|
193
|
+
full_screen: z.ZodDefault<z.ZodBoolean>;
|
|
194
|
+
}, "strip", z.ZodTypeAny, {
|
|
195
|
+
full_screen?: boolean;
|
|
196
|
+
}, {
|
|
197
|
+
full_screen?: boolean;
|
|
198
|
+
}>;
|
|
199
|
+
export declare const OpenNotificationCenterInputSchema: z.ZodObject<{
|
|
200
|
+
full_screen: z.ZodDefault<z.ZodBoolean>;
|
|
201
|
+
}, "strip", z.ZodTypeAny, {
|
|
202
|
+
full_screen?: boolean;
|
|
203
|
+
}, {
|
|
204
|
+
full_screen?: boolean;
|
|
205
|
+
}>;
|
|
206
|
+
export declare const PinchInInputSchema: z.ZodObject<{
|
|
207
|
+
pos: z.ZodOptional<z.ZodArray<z.ZodNumber, "many">>;
|
|
208
|
+
x: z.ZodOptional<z.ZodNumber>;
|
|
209
|
+
y: z.ZodOptional<z.ZodNumber>;
|
|
210
|
+
radius: z.ZodDefault<z.ZodNumber>;
|
|
211
|
+
scale: z.ZodDefault<z.ZodNumber>;
|
|
212
|
+
}, "strip", z.ZodTypeAny, {
|
|
213
|
+
pos?: number[];
|
|
214
|
+
x?: number;
|
|
215
|
+
y?: number;
|
|
216
|
+
radius?: number;
|
|
217
|
+
scale?: number;
|
|
218
|
+
}, {
|
|
219
|
+
pos?: number[];
|
|
220
|
+
x?: number;
|
|
221
|
+
y?: number;
|
|
222
|
+
radius?: number;
|
|
223
|
+
scale?: number;
|
|
224
|
+
}>;
|
|
225
|
+
export declare const PinchOutInputSchema: z.ZodObject<{
|
|
226
|
+
pos: z.ZodOptional<z.ZodArray<z.ZodNumber, "many">>;
|
|
227
|
+
x: z.ZodOptional<z.ZodNumber>;
|
|
228
|
+
y: z.ZodOptional<z.ZodNumber>;
|
|
229
|
+
radius: z.ZodDefault<z.ZodNumber>;
|
|
230
|
+
scale: z.ZodDefault<z.ZodNumber>;
|
|
231
|
+
}, "strip", z.ZodTypeAny, {
|
|
232
|
+
pos?: number[];
|
|
233
|
+
x?: number;
|
|
234
|
+
y?: number;
|
|
235
|
+
radius?: number;
|
|
236
|
+
scale?: number;
|
|
237
|
+
}, {
|
|
238
|
+
pos?: number[];
|
|
239
|
+
x?: number;
|
|
240
|
+
y?: number;
|
|
241
|
+
radius?: number;
|
|
242
|
+
scale?: number;
|
|
243
|
+
}>;
|
|
244
|
+
export declare const RotateGestureInputSchema: z.ZodObject<{
|
|
245
|
+
pos: z.ZodOptional<z.ZodArray<z.ZodNumber, "many">>;
|
|
246
|
+
x: z.ZodOptional<z.ZodNumber>;
|
|
247
|
+
y: z.ZodOptional<z.ZodNumber>;
|
|
248
|
+
angle: z.ZodDefault<z.ZodNumber>;
|
|
249
|
+
clockwise: z.ZodDefault<z.ZodBoolean>;
|
|
250
|
+
radius: z.ZodDefault<z.ZodNumber>;
|
|
251
|
+
}, "strip", z.ZodTypeAny, {
|
|
252
|
+
pos?: number[];
|
|
253
|
+
x?: number;
|
|
254
|
+
y?: number;
|
|
255
|
+
radius?: number;
|
|
256
|
+
angle?: number;
|
|
257
|
+
clockwise?: boolean;
|
|
258
|
+
}, {
|
|
259
|
+
pos?: number[];
|
|
260
|
+
x?: number;
|
|
261
|
+
y?: number;
|
|
262
|
+
radius?: number;
|
|
263
|
+
angle?: number;
|
|
264
|
+
clockwise?: boolean;
|
|
265
|
+
}>;
|
|
266
|
+
export declare const RotateScreenInputSchema: z.ZodObject<{
|
|
267
|
+
direction: z.ZodEnum<["portrait", "landscape"]>;
|
|
268
|
+
}, "strip", z.ZodTypeAny, {
|
|
269
|
+
direction?: "portrait" | "landscape";
|
|
270
|
+
}, {
|
|
271
|
+
direction?: "portrait" | "landscape";
|
|
272
|
+
}>;
|
|
273
|
+
export declare const StopAllAppInputSchema: z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>;
|
|
274
|
+
export declare const StartListenToastInputSchema: z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>;
|
|
275
|
+
export declare const GetToastInputSchema: z.ZodObject<{
|
|
276
|
+
timeout: z.ZodDefault<z.ZodNumber>;
|
|
277
|
+
}, "strip", z.ZodTypeAny, {
|
|
278
|
+
timeout?: number;
|
|
279
|
+
}, {
|
|
280
|
+
timeout?: number;
|
|
281
|
+
}>;
|
|
282
|
+
export declare const StartDataCollectInputSchema: z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>;
|
|
283
|
+
export declare const StopDataCollectInputSchema: z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>;
|
|
284
|
+
export declare const GenerateReportInputSchema: z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>;
|
|
113
285
|
export declare const ListDevicesInputSchema: z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>;
|
|
114
|
-
export type ListDevicesInput = z.infer<typeof ListDevicesInputSchema>;
|
|
115
286
|
export declare const RunTaskInputSchema: z.ZodObject<{
|
|
116
287
|
task: z.ZodString;
|
|
117
288
|
agentMode: z.ZodDefault<z.ZodEnum<["single", "hypium", "layered"]>>;
|
|
@@ -123,67 +294,62 @@ export declare const RunTaskInputSchema: z.ZodObject<{
|
|
|
123
294
|
feedbackMode: z.ZodDefault<z.ZodEnum<["poll", "stream", "callback"]>>;
|
|
124
295
|
callbackUrl: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
125
296
|
}, "strip", z.ZodTypeAny, {
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
callbackUrl?: string
|
|
135
|
-
}, {
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
feedbackMode?: "poll" | "stream" | "callback"
|
|
144
|
-
callbackUrl?: string
|
|
145
|
-
}>;
|
|
146
|
-
export type RunTaskInput = z.infer<typeof RunTaskInputSchema>;
|
|
297
|
+
promptVersion?: string;
|
|
298
|
+
reportDir?: string;
|
|
299
|
+
task?: string;
|
|
300
|
+
agentMode?: "single" | "hypium" | "layered";
|
|
301
|
+
deviceId?: string;
|
|
302
|
+
platform?: "harmony" | "android" | "ios";
|
|
303
|
+
configOverrides?: Record<string, unknown>;
|
|
304
|
+
feedbackMode?: "poll" | "stream" | "callback";
|
|
305
|
+
callbackUrl?: string;
|
|
306
|
+
}, {
|
|
307
|
+
promptVersion?: string;
|
|
308
|
+
reportDir?: string;
|
|
309
|
+
task?: string;
|
|
310
|
+
agentMode?: "single" | "hypium" | "layered";
|
|
311
|
+
deviceId?: string;
|
|
312
|
+
platform?: "harmony" | "android" | "ios";
|
|
313
|
+
configOverrides?: Record<string, unknown>;
|
|
314
|
+
feedbackMode?: "poll" | "stream" | "callback";
|
|
315
|
+
callbackUrl?: string;
|
|
316
|
+
}>;
|
|
147
317
|
export declare const GetTaskResultInputSchema: z.ZodObject<{
|
|
148
318
|
taskId: z.ZodString;
|
|
149
319
|
}, "strip", z.ZodTypeAny, {
|
|
150
|
-
taskId
|
|
320
|
+
taskId?: string;
|
|
151
321
|
}, {
|
|
152
|
-
taskId
|
|
322
|
+
taskId?: string;
|
|
153
323
|
}>;
|
|
154
|
-
export type GetTaskResultInput = z.infer<typeof GetTaskResultInputSchema>;
|
|
155
324
|
export declare const ResumeTaskInputSchema: z.ZodObject<{
|
|
156
325
|
taskId: z.ZodString;
|
|
157
326
|
startIndex: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
158
327
|
}, "strip", z.ZodTypeAny, {
|
|
159
|
-
taskId
|
|
160
|
-
startIndex?: number
|
|
328
|
+
taskId?: string;
|
|
329
|
+
startIndex?: number;
|
|
161
330
|
}, {
|
|
162
|
-
taskId
|
|
163
|
-
startIndex?: number
|
|
331
|
+
taskId?: string;
|
|
332
|
+
startIndex?: number;
|
|
164
333
|
}>;
|
|
165
|
-
export type ResumeTaskInput = z.infer<typeof ResumeTaskInputSchema>;
|
|
166
334
|
export declare const AnalyzeFailureInputSchema: z.ZodObject<{
|
|
167
335
|
taskId: z.ZodString;
|
|
168
336
|
caseIdx: z.ZodNumber;
|
|
169
337
|
}, "strip", z.ZodTypeAny, {
|
|
170
|
-
taskId
|
|
171
|
-
caseIdx
|
|
338
|
+
taskId?: string;
|
|
339
|
+
caseIdx?: number;
|
|
172
340
|
}, {
|
|
173
|
-
taskId
|
|
174
|
-
caseIdx
|
|
341
|
+
taskId?: string;
|
|
342
|
+
caseIdx?: number;
|
|
175
343
|
}>;
|
|
176
|
-
export type AnalyzeFailureInput = z.infer<typeof AnalyzeFailureInputSchema>;
|
|
177
344
|
export declare const GetConfigInputSchema: z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>;
|
|
178
|
-
export type GetConfigInput = z.infer<typeof GetConfigInputSchema>;
|
|
179
345
|
export declare const UpdateConfigInputSchema: z.ZodObject<{
|
|
180
346
|
partial: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
181
347
|
}, "strip", z.ZodTypeAny, {
|
|
182
|
-
partial
|
|
348
|
+
partial?: Record<string, unknown>;
|
|
183
349
|
}, {
|
|
184
|
-
partial
|
|
350
|
+
partial?: Record<string, unknown>;
|
|
185
351
|
}>;
|
|
186
|
-
export
|
|
352
|
+
export declare const TOOL_DESCRIPTIONS: Record<string, string>;
|
|
187
353
|
export interface McpServerCapabilities {
|
|
188
354
|
tools: {
|
|
189
355
|
listChanged: boolean;
|
|
@@ -193,4 +359,3 @@ export interface McpServerCapabilities {
|
|
|
193
359
|
listChanged: boolean;
|
|
194
360
|
};
|
|
195
361
|
}
|
|
196
|
-
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.TOOL_DESCRIPTIONS = exports.UpdateConfigInputSchema = exports.GetConfigInputSchema = exports.AnalyzeFailureInputSchema = exports.ResumeTaskInputSchema = exports.GetTaskResultInputSchema = exports.RunTaskInputSchema = exports.ListDevicesInputSchema = exports.GenerateReportInputSchema = exports.StopDataCollectInputSchema = exports.StartDataCollectInputSchema = exports.GetToastInputSchema = exports.StartListenToastInputSchema = exports.StopAllAppInputSchema = exports.RotateScreenInputSchema = exports.RotateGestureInputSchema = exports.PinchOutInputSchema = exports.PinchInInputSchema = exports.OpenNotificationCenterInputSchema = exports.OpenControlCenterInputSchema = exports.McpCleanUpInputSchema = exports.LayoutInputSchema = exports.ScreenshotInputSchema = exports.GetCurrentAppInputSchema = exports.EnterRecentTaskInputSchema = exports.ClearRecentTaskInputSchema = exports.UnlockScreenInputSchema = exports.ScreenOffInputSchema = exports.ScreenOnInputSchema = exports.PressKeyInputSchema = exports.WaitInputSchema = exports.ClearAppDataInputSchema = exports.StopAppInputSchema = exports.StartAppInputSchema = exports.GoHomeInputSchema = exports.GoBackInputSchema = exports.ClearTextInputSchema = exports.InputTextInputSchema = exports.DragInputSchema = exports.SwipeInputSchema = exports.LongClickInputSchema = exports.DoubleClickInputSchema = exports.ClickInputSchema = exports.McpServerToolName = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
var McpServerToolName;
|
|
6
|
+
(function (McpServerToolName) {
|
|
7
|
+
McpServerToolName["CLICK"] = "click";
|
|
8
|
+
McpServerToolName["DOUBLE_CLICK"] = "double_click";
|
|
9
|
+
McpServerToolName["LONG_CLICK"] = "long_click";
|
|
10
|
+
McpServerToolName["SWIPE"] = "swipe";
|
|
11
|
+
McpServerToolName["DRAG"] = "drag";
|
|
12
|
+
McpServerToolName["INPUT_TEXT"] = "input_text";
|
|
13
|
+
McpServerToolName["CLEAR_TEXT"] = "clear_text";
|
|
14
|
+
McpServerToolName["GO_BACK"] = "go_back";
|
|
15
|
+
McpServerToolName["GO_HOME"] = "go_home";
|
|
16
|
+
McpServerToolName["START_APP"] = "start_app";
|
|
17
|
+
McpServerToolName["STOP_APP"] = "stop_app";
|
|
18
|
+
McpServerToolName["CLEAR_APP_DATA"] = "clear_app_data";
|
|
19
|
+
McpServerToolName["WAIT"] = "wait";
|
|
20
|
+
McpServerToolName["PRESS_KEY"] = "press_key";
|
|
21
|
+
McpServerToolName["SCREEN_ON"] = "screen_on";
|
|
22
|
+
McpServerToolName["SCREEN_OFF"] = "screen_off";
|
|
23
|
+
McpServerToolName["UNLOCK_SCREEN"] = "unlock_screen";
|
|
24
|
+
McpServerToolName["CLEAR_RECENT_TASK"] = "clear_recent_task";
|
|
25
|
+
McpServerToolName["ENTER_RECENT_TASK"] = "enter_recent_task";
|
|
26
|
+
McpServerToolName["GET_CURRENT_APP"] = "get_current_app";
|
|
27
|
+
McpServerToolName["SCREENSHOT"] = "screenshot";
|
|
28
|
+
McpServerToolName["LAYOUT"] = "layout";
|
|
29
|
+
McpServerToolName["MCP_CLEAN_UP"] = "mcp_clean_up";
|
|
30
|
+
McpServerToolName["OPEN_CONTROL_CENTER"] = "open_control_center";
|
|
31
|
+
McpServerToolName["OPEN_NOTIFICATION_CENTER"] = "open_notification_center";
|
|
32
|
+
McpServerToolName["PINCH_IN"] = "pinch_in";
|
|
33
|
+
McpServerToolName["PINCH_OUT"] = "pinch_out";
|
|
34
|
+
McpServerToolName["ROTATE_GESTURE"] = "rotate_gesture";
|
|
35
|
+
McpServerToolName["ROTATE_SCREEN"] = "rotate_screen";
|
|
36
|
+
McpServerToolName["STOP_ALL_APP"] = "stop_all_app";
|
|
37
|
+
McpServerToolName["START_LISTEN_TOAST"] = "start_listen_toast";
|
|
38
|
+
McpServerToolName["GET_TOAST"] = "get_toast";
|
|
39
|
+
McpServerToolName["START_DATA_COLLECT"] = "start_data_collect";
|
|
40
|
+
McpServerToolName["STOP_DATA_COLLECT"] = "stop_data_collect";
|
|
41
|
+
McpServerToolName["GENERATE_REPORT"] = "generate_report";
|
|
42
|
+
McpServerToolName["LIST_DEVICES"] = "list_devices";
|
|
43
|
+
McpServerToolName["RUN_TASK"] = "run_task";
|
|
44
|
+
McpServerToolName["GET_TASK_RESULT"] = "get_task_result";
|
|
45
|
+
McpServerToolName["RESUME_TASK"] = "resume_task";
|
|
46
|
+
McpServerToolName["ANALYZE_FAILURE"] = "analyze_failure";
|
|
47
|
+
McpServerToolName["GET_CONFIG"] = "get_config";
|
|
48
|
+
McpServerToolName["UPDATE_CONFIG"] = "update_config";
|
|
49
|
+
})(McpServerToolName || (exports.McpServerToolName = McpServerToolName = {}));
|
|
50
|
+
const PointSchema = zod_1.z.object({
|
|
51
|
+
pos: zod_1.z.array(zod_1.z.number()).length(2).optional(),
|
|
52
|
+
x: zod_1.z.number().optional(),
|
|
53
|
+
y: zod_1.z.number().optional(),
|
|
54
|
+
});
|
|
55
|
+
exports.ClickInputSchema = PointSchema;
|
|
56
|
+
exports.DoubleClickInputSchema = PointSchema;
|
|
57
|
+
exports.LongClickInputSchema = zod_1.z.object({
|
|
58
|
+
pos: zod_1.z.array(zod_1.z.number()).length(2).optional(),
|
|
59
|
+
x: zod_1.z.number().optional(),
|
|
60
|
+
y: zod_1.z.number().optional(),
|
|
61
|
+
duration: zod_1.z.number().default(2),
|
|
62
|
+
});
|
|
63
|
+
exports.SwipeInputSchema = zod_1.z.object({
|
|
64
|
+
start: zod_1.z.array(zod_1.z.number()).length(2),
|
|
65
|
+
end: zod_1.z.array(zod_1.z.number()).length(2),
|
|
66
|
+
direction: zod_1.z.string().optional(),
|
|
67
|
+
});
|
|
68
|
+
exports.DragInputSchema = zod_1.z.object({
|
|
69
|
+
start: zod_1.z.array(zod_1.z.number()).length(2),
|
|
70
|
+
end: zod_1.z.array(zod_1.z.number()).length(2),
|
|
71
|
+
});
|
|
72
|
+
exports.InputTextInputSchema = zod_1.z.object({ text: zod_1.z.string() });
|
|
73
|
+
exports.ClearTextInputSchema = zod_1.z.object({});
|
|
74
|
+
exports.GoBackInputSchema = zod_1.z.object({ times: zod_1.z.number().int().default(1) });
|
|
75
|
+
exports.GoHomeInputSchema = zod_1.z.object({ times: zod_1.z.number().int().default(1) });
|
|
76
|
+
exports.StartAppInputSchema = zod_1.z.object({
|
|
77
|
+
app_name: zod_1.z.string(),
|
|
78
|
+
cold_start: zod_1.z.boolean().default(false),
|
|
79
|
+
});
|
|
80
|
+
exports.StopAppInputSchema = zod_1.z.object({ app_name: zod_1.z.string() });
|
|
81
|
+
exports.ClearAppDataInputSchema = zod_1.z.object({ app_name: zod_1.z.string() });
|
|
82
|
+
exports.WaitInputSchema = zod_1.z.object({ duration: zod_1.z.number().default(3) });
|
|
83
|
+
exports.PressKeyInputSchema = zod_1.z.object({
|
|
84
|
+
key_name: zod_1.z.enum(['home', 'power', 'volume_up', 'volume_down']),
|
|
85
|
+
});
|
|
86
|
+
exports.ScreenOnInputSchema = zod_1.z.object({});
|
|
87
|
+
exports.ScreenOffInputSchema = zod_1.z.object({});
|
|
88
|
+
exports.UnlockScreenInputSchema = zod_1.z.object({});
|
|
89
|
+
exports.ClearRecentTaskInputSchema = zod_1.z.object({});
|
|
90
|
+
exports.EnterRecentTaskInputSchema = zod_1.z.object({});
|
|
91
|
+
exports.GetCurrentAppInputSchema = zod_1.z.object({});
|
|
92
|
+
exports.ScreenshotInputSchema = zod_1.z.object({
|
|
93
|
+
save_path: zod_1.z.string().optional(),
|
|
94
|
+
});
|
|
95
|
+
exports.LayoutInputSchema = zod_1.z.object({});
|
|
96
|
+
exports.McpCleanUpInputSchema = zod_1.z.object({});
|
|
97
|
+
exports.OpenControlCenterInputSchema = zod_1.z.object({
|
|
98
|
+
full_screen: zod_1.z.boolean().default(false),
|
|
99
|
+
});
|
|
100
|
+
exports.OpenNotificationCenterInputSchema = zod_1.z.object({
|
|
101
|
+
full_screen: zod_1.z.boolean().default(false),
|
|
102
|
+
});
|
|
103
|
+
exports.PinchInInputSchema = zod_1.z.object({
|
|
104
|
+
pos: zod_1.z.array(zod_1.z.number()).length(2).optional(),
|
|
105
|
+
x: zod_1.z.number().optional(),
|
|
106
|
+
y: zod_1.z.number().optional(),
|
|
107
|
+
radius: zod_1.z.number().default(300),
|
|
108
|
+
scale: zod_1.z.number().default(0.2),
|
|
109
|
+
});
|
|
110
|
+
exports.PinchOutInputSchema = zod_1.z.object({
|
|
111
|
+
pos: zod_1.z.array(zod_1.z.number()).length(2).optional(),
|
|
112
|
+
x: zod_1.z.number().optional(),
|
|
113
|
+
y: zod_1.z.number().optional(),
|
|
114
|
+
radius: zod_1.z.number().default(300),
|
|
115
|
+
scale: zod_1.z.number().default(1.6),
|
|
116
|
+
});
|
|
117
|
+
exports.RotateGestureInputSchema = zod_1.z.object({
|
|
118
|
+
pos: zod_1.z.array(zod_1.z.number()).length(2).optional(),
|
|
119
|
+
x: zod_1.z.number().optional(),
|
|
120
|
+
y: zod_1.z.number().optional(),
|
|
121
|
+
angle: zod_1.z.number().default(90),
|
|
122
|
+
clockwise: zod_1.z.boolean().default(true),
|
|
123
|
+
radius: zod_1.z.number().default(300),
|
|
124
|
+
});
|
|
125
|
+
exports.RotateScreenInputSchema = zod_1.z.object({
|
|
126
|
+
direction: zod_1.z.enum(['portrait', 'landscape']),
|
|
127
|
+
});
|
|
128
|
+
exports.StopAllAppInputSchema = zod_1.z.object({});
|
|
129
|
+
exports.StartListenToastInputSchema = zod_1.z.object({});
|
|
130
|
+
exports.GetToastInputSchema = zod_1.z.object({
|
|
131
|
+
timeout: zod_1.z.number().default(3),
|
|
132
|
+
});
|
|
133
|
+
exports.StartDataCollectInputSchema = zod_1.z.object({});
|
|
134
|
+
exports.StopDataCollectInputSchema = zod_1.z.object({});
|
|
135
|
+
exports.GenerateReportInputSchema = zod_1.z.object({});
|
|
136
|
+
exports.ListDevicesInputSchema = zod_1.z.object({});
|
|
137
|
+
exports.RunTaskInputSchema = zod_1.z.object({
|
|
138
|
+
task: zod_1.z.string(),
|
|
139
|
+
agentMode: zod_1.z.enum(['single', 'hypium', 'layered']).default('single'),
|
|
140
|
+
deviceId: zod_1.z.string(),
|
|
141
|
+
platform: zod_1.z.enum(['harmony', 'android', 'ios']).default('harmony'),
|
|
142
|
+
promptVersion: zod_1.z.string().nullable().optional(),
|
|
143
|
+
configOverrides: zod_1.z.record(zod_1.z.string(), zod_1.z.unknown()).nullable().optional(),
|
|
144
|
+
reportDir: zod_1.z.string().nullable().optional(),
|
|
145
|
+
feedbackMode: zod_1.z.enum(['poll', 'stream', 'callback']).default('poll'),
|
|
146
|
+
callbackUrl: zod_1.z.string().nullable().optional(),
|
|
147
|
+
});
|
|
148
|
+
exports.GetTaskResultInputSchema = zod_1.z.object({ taskId: zod_1.z.string() });
|
|
149
|
+
exports.ResumeTaskInputSchema = zod_1.z.object({
|
|
150
|
+
taskId: zod_1.z.string(),
|
|
151
|
+
startIndex: zod_1.z.number().int().nullable().optional(),
|
|
152
|
+
});
|
|
153
|
+
exports.AnalyzeFailureInputSchema = zod_1.z.object({
|
|
154
|
+
taskId: zod_1.z.string(),
|
|
155
|
+
caseIdx: zod_1.z.number().int(),
|
|
156
|
+
});
|
|
157
|
+
exports.GetConfigInputSchema = zod_1.z.object({});
|
|
158
|
+
exports.UpdateConfigInputSchema = zod_1.z.object({ partial: zod_1.z.record(zod_1.z.string(), zod_1.z.unknown()) });
|
|
159
|
+
exports.TOOL_DESCRIPTIONS = {
|
|
160
|
+
click: 'Click at the given coordinates',
|
|
161
|
+
double_click: 'Double-click at the given coordinates',
|
|
162
|
+
long_click: 'Long-press at the given coordinates',
|
|
163
|
+
swipe: 'Swipe from start point to end point',
|
|
164
|
+
drag: 'Drag from start point to end point',
|
|
165
|
+
input_text: 'Input text at the current cursor position',
|
|
166
|
+
clear_text: 'Clear text at the current cursor position',
|
|
167
|
+
go_back: 'Go back to the previous screen',
|
|
168
|
+
go_home: 'Go to the home screen',
|
|
169
|
+
start_app: 'Launch an application on the device',
|
|
170
|
+
stop_app: 'Stop an application on the device',
|
|
171
|
+
clear_app_data: 'Clear application data',
|
|
172
|
+
wait: 'Wait for the specified duration (max 200s)',
|
|
173
|
+
press_key: 'Press a key (home/power/volume_up/volume_down)',
|
|
174
|
+
screen_on: 'Turn on the device screen',
|
|
175
|
+
screen_off: 'Turn off the device screen',
|
|
176
|
+
unlock_screen: 'Unlock the device screen',
|
|
177
|
+
clear_recent_task: 'Clear all recent tasks',
|
|
178
|
+
enter_recent_task: 'Enter the recent tasks page',
|
|
179
|
+
get_current_app: 'Get the current foreground app bundle name',
|
|
180
|
+
screenshot: 'Capture a screenshot',
|
|
181
|
+
layout: 'Get the current UI layout',
|
|
182
|
+
mcp_clean_up: 'Release all cached device connections',
|
|
183
|
+
open_control_center: 'Open the system control center',
|
|
184
|
+
open_notification_center: 'Open the system notification center',
|
|
185
|
+
pinch_in: 'Pinch in (two-finger zoom out)',
|
|
186
|
+
pinch_out: 'Pinch out (two-finger zoom in)',
|
|
187
|
+
rotate_gesture: 'Perform a two-finger rotation gesture',
|
|
188
|
+
rotate_screen: 'Rotate the screen orientation',
|
|
189
|
+
stop_all_app: 'Stop all running applications',
|
|
190
|
+
start_listen_toast: 'Start listening for Toast messages',
|
|
191
|
+
get_toast: 'Get the latest Toast message',
|
|
192
|
+
start_data_collect: 'Start data collection',
|
|
193
|
+
stop_data_collect: 'Stop data collection',
|
|
194
|
+
generate_report: 'Generate a test report',
|
|
195
|
+
list_devices: 'List all connected devices',
|
|
196
|
+
run_task: 'Run a test task',
|
|
197
|
+
get_task_result: 'Get the result of a task',
|
|
198
|
+
resume_task: 'Resume a task from a given step',
|
|
199
|
+
analyze_failure: 'Analyze the failure of a task',
|
|
200
|
+
get_config: 'Get the current configuration',
|
|
201
|
+
update_config: 'Update the configuration',
|
|
202
|
+
};
|