lilong.129
404865ba6b
refactor: complete ActionOptions unification and pointer type optimization
2025-05-27 13:34:12 +08:00
lilong.129
7fb966b7ba
refactor: improve ActionMethod type safety and eliminate type conversions
2025-05-27 11:49:30 +08:00
lilong.129
466fe39cb9
docs: add comprehensive migration summary for ActionOptions and Request integration
...
- Document the complete integration process of ActionOptions and Request structures
- Include detailed statistics: 40 tools migrated with 100% test pass rate
- Provide technical implementation details and usage examples
- Record backward compatibility guarantees and migration helpers
- Summarize code quality improvements and performance optimizations
- Outline future development plans and goals
This documentation serves as a complete record of the unification initiative
and provides guidance for future development and maintenance.
2025-05-26 23:13:19 +08:00
lilong.129
a47d65bc4e
feat: migrate all remaining MCP tools to use UnifiedActionRequest
...
- Migrated 39 remaining MCP tools from individual Request structures to UnifiedActionRequest
- All tools now use unifiedReq.GetMCPOptions(ACTION_*) instead of option.NewMCPOptions(Request{})
- Completed the unification of parameter definitions across all 40 MCP tools
- Eliminated duplication between ActionOptions and Request structures
- All tests pass, confirming successful migration
Tools migrated:
- Basic operations: TapAbsXY, TapByOCR, TapByCV, DoubleTapXY
- Device management: ListPackages, ScreenShot, GetScreenSize, PressButton
- App management: LaunchApp, TerminateApp, AppInstall, AppUninstall, AppClear
- Swipe operations: SwipeDirection, SwipeCoordinate, SwipeToTapApp, SwipeToTapText, SwipeToTapTexts
- Input/Navigation: Input, Home, Back, Drag
- Web operations: WebLoginNoneUI, SecondaryClick, HoverBySelector, TapBySelector, SecondaryClickBySelector, WebCloseTab
- System utilities: SetIme, GetSource, ClosePopups
- Sleep operations: SleepMS, SleepRandom
- AI/Task management: AIAction, Finished
This completes the ActionOptions and Request structures integration initiative.
2025-05-26 23:10:58 +08:00
lilong.129
8181e4244a
refactor ToolSwipe to delegate to existing tools instead of duplicating logic
...
- Modified ToolSwipe.ConvertActionToCallToolRequest to delegate to ToolSwipeDirection and ToolSwipeCoordinate
- Removed duplicate parameter handling logic in favor of reusing existing implementations
- Fixed linter error by removing unused variable
- Maintained backward compatibility while reducing code duplication
- All tests pass, confirming the refactoring is successful
2025-05-26 22:42:50 +08:00
lilong.129
6ae4c300c1
add generic swipe tool with auto-detection of direction vs coordinate params
...
- Added ACTION_Swipe to option/action.go for generic swipe functionality
- Implemented ToolSwipe in mcp_server.go that automatically detects parameter type:
- String params (up/down/left/right) use direction-based swipe logic
- Array params [fromX, fromY, toX, toY] use coordinate-based swipe logic
- Added comprehensive test coverage for ToolSwipe in mcp_server_test.go
- Updated tool registration to include the new generic swipe tool
- All tests pass, confirming backward compatibility with existing tools
2025-05-26 22:39:23 +08:00
lilong.129
8895e9e970
merge mcp_tools_test.go into mcp_server_test.go
...
- Merged all individual MCP tool test functions from mcp_tools_test.go into mcp_server_test.go
- Added require import for additional test assertions
- Removed duplicate TestMCPServer4XTDriver function
- Deleted the original mcp_tools_test.go file
- All 39 MCP tools now have comprehensive unit tests in a single file
- Tests cover tool name, description, options, and request conversion functionality
2025-05-26 22:32:26 +08:00
lilong.129
77f5683f9a
fix: remove unnecessary IgnoreNotFoundError and MaxRetryTimes from coordinate-based tap tools
...
- Removed IgnoreNotFoundError and MaxRetryTimes parameters from TapRequest, TapAbsXYRequest, and DoubleTapXYRequest structures
- Updated corresponding tool implementations to remove references to these non-existent fields
- These parameters are not applicable to coordinate-based operations as they don't involve element searching
- Only OCR/CV-based operations need these error handling parameters
This ensures that only relevant tools have the ignore_NotFoundError functionality,
making the API more consistent and avoiding confusion.
2025-05-26 22:10:08 +08:00
lilong.129
df65f9a828
fix: MCP server ignore_NotFoundError option not working
...
- Fixed TapByOCR and TapByCV tools to properly handle ignore_NotFoundError option
- Added option parameters to all MCP tool request structures
- Fixed ConvertActionToCallToolRequest methods to extract action options
- Added extractActionOptionsToArguments helper function for consistent option handling
- Extended fix to all MCP tools: SwipeToTapApp, SwipeToTapText, SwipeToTapTexts, TapXY, TapAbsXY
- Added comprehensive tests for option parameter handling
- Updated test expectations to match actual registered tools
This ensures that when ignore_NotFoundError is set to true, OCR/CV operations
will return nil instead of throwing errors when target elements are not found,
allowing tests to continue execution as expected.
2025-05-26 22:02:01 +08:00
lilong.129
9a5e0849de
fix: handle GetOrCreateXTDriver when serial is empty
2025-05-26 21:25:25 +08:00
lilong.129
2569670c7f
feat: implement unified XTDriver cache
2025-05-26 19:39:46 +08:00
lilong.129
1bd2b1ba5e
change: move code
2025-05-26 16:08:27 +08:00
lilong.129
7045a9d452
change: check call tool result error
2025-05-26 15:30:51 +08:00
lilong.129
5eafcc8a2b
merge master
2025-05-26 14:53:36 +08:00
lilong.129
f20fdd51bc
feat: Validate model type and model name compatibility
2025-05-26 09:40:28 +08:00
lilong.129
4e74247cab
fix: miss tool call ID
2025-05-26 09:28:46 +08:00
lilong.129
36c5044402
feat: add mcp tool finished
2025-05-26 09:05:48 +08:00
lilong.129
e60c362257
change: rename function
2025-05-26 08:49:06 +08:00
lilong.129
778344c826
change: remove call function tool
2025-05-26 00:43:01 +08:00
lilong.129
a888022cbc
refactor: split driver cache
2025-05-26 00:35:56 +08:00
lilong.129
2e17d9df16
refactor: merge DoAction to mcp server tools
2025-05-25 23:53:07 +08:00
lilong.129
7986c4899f
refactor: move DoAction to MCP tools call
2025-05-25 08:10:57 +08:00
lilong.129
4ff2692f02
refactor: move action options
2025-05-25 00:15:18 +08:00
lilong.129
97dad38b7b
refactor: move tool request types to option
2025-05-24 23:51:58 +08:00
lilong.129
f65d8aebbd
refactor: move model struct to types
2025-05-24 23:32:10 +08:00
lilong.129
02611d3d5a
refactor: uixt MCP Server
2025-05-24 23:22:00 +08:00
lilong.129
0a68701faa
refactor: move uixt mcp server
2025-05-24 10:46:50 +08:00
lilong.129
014140ccc7
change: append tool call message for planner
2025-05-24 10:28:55 +08:00
lilong.129
b639b4473f
test: update unittests
2025-05-24 01:00:30 +08:00
lilong.129
81c854f963
refactor: merge ai parser
2025-05-24 00:25:44 +08:00
lilong.129
19ddcb40cc
change: update ui-tars prompt
2025-05-23 22:05:21 +08:00
lilong.129
009bfa4ecb
refactor: replace ui-tars parser with https://github.com/bytedance/UI-TARS/blob/main/codes/ui_tars/action_parser.py
2025-05-22 22:52:47 +08:00
lilong.129
3b77ade24f
refactor: json asserter
2025-05-22 18:22:12 +08:00
lilong.129
c377664518
refactor: add LLMServiceTypeDoubaoVL
2025-05-22 15:34:11 +08:00
lilong.129
269fe2de23
fix: tap_xy, swipe handler
2025-05-21 22:51:51 +08:00
lilong.129
bb592548b4
fix: chat with screenshot
2025-05-21 22:35:16 +08:00
lilong.129
d58bbaeb5f
fix: uixt tool take_screenshot
2025-05-21 18:05:12 +08:00
lilong.129
60e608f101
feat: add uixt tool swipe
2025-05-21 17:47:53 +08:00
lilong.129
7724cf0062
feat: add uixt tool press_button
2025-05-21 17:25:17 +08:00
lilong.129
5c68760cca
feat: add uixt tool get_screen_size
2025-05-21 16:51:39 +08:00
lilong.129
0d6a37ecef
feat: add uixt tool terminate_app
2025-05-21 16:42:53 +08:00
lilong.129
03553a4962
feat: add uixt tool launch_app
2025-05-21 16:37:42 +08:00
lilong.129
495443a2c4
feat: add uixt tool list_packages
2025-05-21 16:24:54 +08:00
lilong.129
044eb07a35
feat: add uixt tool select_device
2025-05-20 23:11:22 +08:00
lilong.129
1fa87819ae
feat: add uixt tool list_available_devices
2025-05-20 22:58:16 +08:00
lilong.129
0c20fe7b02
feat: add argument --with-uixt to start built-in uixt MCP server
2025-05-20 22:36:46 +08:00
lilong.129
037e69315e
change: remove unused code
2025-05-20 18:03:54 +08:00
lilong.129
83434cca1e
feat: load uixt mcp server in mcphost
2025-05-20 17:07:33 +08:00
lilong.129
5066c64368
refactor: move server models to uixt/types
2025-05-20 14:21:18 +08:00
lilong.129
2f48a92f7f
feat: add mcp server for uixt tap/swipe/screenshot actions
2025-05-20 13:26:55 +08:00
lilong.129
b2ab14efcc
refactor: rename to AssertionResult
2025-05-19 11:51:49 +08:00
lilong.129
3f1ee03529
refactor: mcphost planner
2025-05-18 21:55:01 +08:00
lilong.129
e35d644acf
docs: update docs
2025-05-17 12:20:45 +08:00
lilong.129
e94dacb5b2
refactor: move mcphost package to top level
2025-05-17 11:55:26 +08:00
lilong.129
5d8c22f729
refactor: mcphost call tools
2025-05-17 11:37:11 +08:00
lilong.129
8346fb179c
feat: add chat style
2025-05-17 01:00:40 +08:00
lilong.129
6ceab19fef
refactor: GetTools returns []MCPTools
2025-05-17 00:08:25 +08:00
lilong.129
a4cff1c98a
feat: chat with mcp tools
2025-05-16 23:05:40 +08:00
lilong.129
a58ccffb28
feat: call CallMCPTool in parser
2025-05-16 14:30:24 +08:00
lilong.129
e333ba380a
refactor: move mcp to pkg/mcphost
2025-05-16 14:14:56 +08:00
lilong.129
9b77bd1fd2
feat: add GetEinoTool
2025-05-16 14:06:01 +08:00
lilong.129
f8b7a42560
feat: hrp mcphost
2025-05-16 13:37:52 +08:00
lilong.129
ce38ef3be0
feat: add mcp host, load/invoke mcp tools
2025-05-16 11:43:49 +08:00
lilong.129
d834b5a2e1
feat: load mcp config file
2025-05-16 11:41:22 +08:00
李隆
a91eba6070
Merge branch 'mcp-plugin' into 'master'
...
CaseRunner 支持注册自定义 driver
See merge request iesqa/httprunner!86
2025-05-15 09:14:31 +00:00
lilong.129
c71ac5c3cd
feat: set step loops with expression variable
2025-05-14 15:01:10 +08:00
lilong.129
d145784910
fix: swipe with params
2025-05-14 14:36:46 +08:00
lilong.129
6f428ce5cd
change: upgrade mcp-go to v0.27.0
2025-05-12 22:46:21 +08:00
lilong.129
3b3807770d
change: update docstring
2025-05-12 21:35:49 +08:00
lilong.129
4d48a418f9
change: parse mobile device config
2025-05-12 19:16:01 +08:00
lilong.129
9c735bd46a
feat: save screenshot after action
2025-05-12 18:04:56 +08:00
lilong.129
0722e92e87
change: remove options for AppLaunch/AppTerminate
2025-05-12 17:36:16 +08:00
lilong.129
00a6ca1f61
change: remove options for AppLaunch/AppTerminate/AppClear
2025-05-12 17:27:48 +08:00
lilong.129
0b1a92d8dd
refactor: NewCaseRunner
2025-05-12 15:25:32 +08:00
lilong.129
4dfeffc32b
refactor: RegisterUIXTDrivers
2025-05-12 09:18:05 +08:00
lilong.129
d95eec78b0
feat: add WithPreMarkOperation and WithPostMarkOperation to mark UI operation before/after action
2025-05-12 08:58:27 +08:00
lilong.129
7a6890a160
feat: set timeout for Call function
2025-05-12 08:48:54 +08:00
lilong.129
f6ad6c9eff
feat: add function call for XTDriver
2025-05-10 09:50:00 +08:00
lilong.129
9bafea53af
feat: support action options for AppLaunch/AppTerminate
2025-05-10 00:01:30 +08:00
lilong.129
4a2276c7f0
refactor:
...
1, add options for AppLaunch/AppTerminate/AppClear;
2, add pre hook and post hook for AppLaunch/AppTerminate action
2025-05-09 23:30:49 +08:00
lilong.129
2a13594e3d
feat: add pre hook and post hook for Swipe action
2025-05-09 23:15:27 +08:00
lilong.129
1dfc473d33
feat: add pre hook and post hook for Drag action
2025-05-09 23:10:59 +08:00
lilong.129
f7ec4a06b4
feat: add pre hook and post hook for DoubleTap action
2025-05-09 23:06:45 +08:00
lilong.129
3715cbb432
feat: support pre hook and post hook for actions
2025-05-09 23:01:27 +08:00
李隆
433b1cd48d
Merge 'feat-ai' into 'master'
...
fix: syntax error
See merge request: !84
2025-05-09 03:59:20 +00:00
lilong.129
7bad75f92d
fix: syntax error
2025-05-09 11:22:10 +08:00
李隆
dd1b0c2b7b
Merge branch 'feature/xucong.053/player' into 'master'
...
fix: web ui test
See merge request iesqa/httprunner!83
2025-05-07 14:47:19 +00:00
李隆
ca0282a6bf
Merge branch 'feat-ai' into 'master'
...
refactor
See merge request iesqa/httprunner!82
2025-05-07 12:03:17 +00:00
lilong.129
032a130418
change: handlerTapAbsXY
2025-05-07 17:15:20 +08:00
lilong.129
81f29cdef5
refactor: replace OpenFile with Open
2025-05-07 16:40:39 +08:00
lilong.129
5e9fca046a
refactor: rename to driver_handler
2025-05-06 00:57:15 +08:00
lilong.129
71dac459e6
refactor: handlerDoubleTap
2025-05-06 00:55:54 +08:00
lilong.129
48e3d9002e
refactor: handlerSwipe
2025-05-06 00:41:15 +08:00
lilong.129
338c2c77aa
refactor: handlerDrag
2025-05-06 00:38:07 +08:00
lilong.129
5943f8c033
refactor: handlerTapAbsXY
2025-05-06 00:26:27 +08:00
lilong.129
379fea9008
refactor: move cached screenResults from XTDriver to DriverSession
2025-05-06 00:10:54 +08:00
lilong.129
ce93df1f23
change: mark ui operation before action
2025-05-05 16:54:59 +08:00
lilong.129
e5ececa776
change: log time duration for ui marker
2025-05-05 16:35:37 +08:00
lilong.129
cfc71819d2
feat: mark tap/swipe UI operation
2025-05-05 16:31:13 +08:00
lilong.129
6569121d5d
refactor: move LoadImage
2025-04-30 16:21:01 +08:00