80 Commits

Author SHA1 Message Date
yutao
fd6703c6d5 chore(core): add test cases 2025-05-22 07:31:55 +08:00
Leyang
4c8d881614
fix(web-integration): handle undefined aiInput case in ScriptPlayer (#743)
* fix(web-integration): handle undefined aiInput case in ScriptPlayer

* fix(workflow): version

* fix(core): yaml player

---------

Co-authored-by: yutao <yutao.tao@bytedance.com>
2025-05-21 19:18:29 +08:00
github-actions[bot]
049d9f6565 release: v0.17.1 2025-05-20 09:11:17 +00:00
Leyang
fb2580616c
fix cache bugs(scroll instant, text node info, cache hit condition) (#732)
* fix(web-integration): cache hit when element.id exist and scroll element instantly

* fix(web-integration): use parent xpath for text node

* fix(web-integration): only scroll in to view when element is not completly visible

* fix(shared): distinct text node

* test(web-integration): getElementInfoByXpath

* test(web-integration): rename desc

* test(web-integration): fix

* test(web-integration): snapshot attributes only

* test(web-integration): fix test
2025-05-20 13:19:32 +08:00
github-actions[bot]
39ddc57df3 release: v0.17.0 2025-05-16 14:32:01 +00:00
yuyutaotao
b261ed7f2a
feat(web): use xpath and yaml as cache (#711)
* feat(web-integration): use xpath for cache instead of id

* feat(web-integration): enhance TaskCache to support xpaths for cache matching and add new test cases

* feat(web-integration): add debug log for unknown page types in TaskCache

* feat(web-integration): update caching logic and cache hit conditions for Plan and Locate tasks

* chore(core): update debug log

* feat(web-integration): update rspress.config and enhance TaskCache structure with new properties

* feat(web-integration): recalculate id when hit cache

* fix(web-integration): update mock implementation in task-cache test to use evaluate method

* feat(web-integration): enhance element caching by adding XPath support and improving cache hit logic

* chore(core): lint

* feat(web-integration): improve XPath handling in web-extractor

* test(web-integration): fix tests

* feat(core, web-integration): add attributes to LocateResultElement and enhance element handling

* fix(core): lint

* feat(web-integration): add midsceneVersion to TaskCache and update cache validation logic

* fix(core): test

* fix(web-integration): update cache validation logic to prevent reading outdated midscene cache files

* feat(web-integration): enhance TaskCache to track used cache items and improve cache retrieval logic

* fix(core): xpath logic (#710)

* feat(core): resue context for locate

* feat(core): build yamlFlow from aiAction

* feat(core): refine task-cache

* feat(core): update cache

* feat(core): refine task-cache

* feat(core): refine task-cache

* feat(core): remove unused checkElementExistsByXPath

* feat(core): use yaml file as cache

* chore(core): fix lint

* chore(core): print warning for previous cache

* refactor(core): remove quickAnswer references and improve element matching logic

* fix(core): update import path for buildYamlFlowFromPlans

* chore(web-integration): update output image and skip task error test

* fix(web-integration): update test snapshots to handle beta versions

* fix(web-integration): adjust test snapshots for version consistency

* fix(web-integration): track original cache length and adjust matching logic in tests

* fix(web-integration): update test URLs to reflect new target site and enable previously skipped test

* chore(core): update cache docs

* fix(core): test

* feat(core): try to match element from plan

* fix(web-integration): cache id stable when retry in palywright

* fix(web-integration): typo

* style(web-integration): lint

* fix(web-integration): stable cacheid in tests

* fix(web-integration): cache id

---------

Co-authored-by: quanruzhuoxiu <quanruzhuoxiu@gmail.com>
2025-05-16 17:16:56 +08:00
yuyutaotao
80b4e7b609
fix(mcp): mcp error connection (#676)
* fix(mcp): mcp error connection

* fix(mcp): lint

* fix(core): add kill signal for server

* chore(core): force close conflict port in bridge

---------

Co-authored-by: zhouxiao.shaw <zhouxiao.shaw@bytedance.com>

* chore(core): merge main
2025-04-30 16:07:59 +08:00
Leyang
4718066bb1
feat(web-integration): add support for new agent method(aiBoolean, aiString, aiNumber, aiLocate) (#658)
* feat(web-integration): add support for new agent method(aiBoolean, aiString, aiNumber, aiLocate)

* fix(core, web-integration): update data extraction logic and refine return types for agent methods

* feat(site): add detailed descriptions and examples

* fix(web-integration): remove unused properties from aiLocate return type and update UI titles

* fix(core): enhance agent methods for better extraction and querying

* fix(core): update test scripts and refine data extraction prompts

* fix(core): refine return type in ExecutionTaskApply and remove unused import in inspect

* fix(core): update data extraction logic and enhance type handling in Insight class

* fix(web-integration): update import path for puppeteerAgentForTarget in player test file

* fix(core): tests fix

* fix(core): fix tests

* fix(shared): enhance imageInfo tests by validating individual properties and updating snapshots

* fix(site): remove waitForNavigationTimeout from Playwright integration examples

* fix(site): update timeout configuration examples in FAQ for clarity

* test(web-integration): remove unused client-extractor test and related snapshots

* chore(core): fix query implementation

* fix(report): improve data handling in DetailSide component and enhance output display

* fix(core): refine data extraction prompts and improve error handling in PageTaskExecutor

* fix(core): update data extraction prompt for clarity and type validation

---------

Co-authored-by: yutao <yutao.tao@bytedance.com>
2025-04-29 13:36:49 +08:00
yuyutaotao
667fb59474
refactor(bridge): enhance error handling and connection logic in BridgeClient and BridgeServer (#653)
---------

Co-authored-by: zhouxiao.shaw <zhouxiao.shaw@bytedance.com>
2025-04-27 16:27:42 +08:00
yuyutaotao
e1f708740f
refactor(bridge): update connection handling and server close logic (#646)
---------

Co-authored-by: zhouxiao.shaw <zhouxiao.shaw@bytedance.com>
2025-04-27 13:30:46 +08:00
github-actions[bot]
0a3bc1e230 release: v0.15.0 2025-04-18 11:26:30 +00:00
Zhou Xiao
bc5b6e2121
ci(workflow): add commit msg check (#587)
* ci(workflow): add commit check

* docs(workflow): add commit check to CONTRIBUTING

* chore(workflow): optimize lint error
2025-04-18 12:50:52 +08:00
Leyang
b76211bd5d
feat: android playground (#542)
* refactor: android api

* refactor: enhance Android agent to accept options for device connection

* fix: type error

* fix: click after clearInput

* fix: click before clearInput

* feat: android playground

* feat: support npx package name

* feat: android playground joint

* fix: git ignore conflicts

* feat: ensure adb server is running before initializing adb client

* fix: deps consistency

* ci: add android playground

* feat: integrate shared constants and improve server configuration in android playground

* feat: android playground style

* feat: style opt

* feat: add @rsbuild/plugin-svgr dependency and improve URI handling in adb

* feat: remove unused water flow scripts and update comments to English

* feat: download report file

* feat: standalone android playground

* feat: use dynamic import

* feat: migrate CSS to LESS and remove unused styles in chrome extension and report

* feat: enhance Android playground with ScrcpyPlayer ref integration and device management improvements

* feat: optimize styles and layout in Android playground and visualizer components

* chore: add bin back

* chore: update build script to exclude documentation generation

* feat: add not ready message to PlaygroundResult for improved user guidance

* feat: add error handling for screenshot capture in Android page

* docs: update readme

* feat: add PNG validation for screenshot buffer in Android page

* feat: enhance UI components with improved styling and tooltips in ScrcpyPlayer and PromptInput

* docs: update uri parameter description in integrate-with-android documentation and improve uri handling in launch function

* style: update primary color to #2B83FF across multiple components and adjust margin in App.less

* refactor: replace userConfig with globalConfig for environment configuration management and update related functions

* feat: integrate server validation logic in App, AdbDevice, and ScrcpyPlayer components for improved connection handling

* style: enhance player component layout with overflow handling and margin adjustments

* style: refine player component layout with flex adjustments and improved spacing

* feat: add midscene model name display and improve layout in EnvConfig component

* feat: integrate ShinyText component for enhanced loading progress display in PlaygroundResult

* test: add test for isValidPNGImageBuffer

* style: remove background color from App.less and adjust AI config override behavior in env.ts

---------

Co-authored-by: yutao <yutao.tao@bytedance.com>
2025-04-17 17:44:11 +08:00
Leyang
0ca9fda7ae
feat: android yaml support (#551)
* feat: android yaml support

* feat: enhance ScriptPlayer to support web and android environments

* chore: update error message

* refactor: unify environment interfaces for YAML scripts

---------

Co-authored-by: yutao <yutao.tao@bytedance.com>
2025-04-11 09:36:41 +08:00
yuyutaotao
adc3fd9e0d
feat: use aiTap(prompt, opt) style interface (#512) 2025-04-01 10:41:31 +08:00
Leyang
934a1e2b5d
use adb instead of appium (#483)
* feat: enable search area for locate

* fix: update evaluation

* fix: locator

* feat: show searchArea in report

* chore: add yaml support for aiTap

* feat: use adb instead appium

* feat: Adds debugging information and reconstructs input text capabilities

* feat: refactoring Android related functions and adding android modules

* feat: update the image scaling algorithm, adjust the Android page class to support device scaling, and remove test files that are no longer needed

* feat: adjust the Android page class to support device scaling, and remove test files that are no longer needed

* feat: use appium-adb instead of bare command

* fix: update entry for @midscene/android

* feat: optimize the screenshot processing logic, add a backup mechanism when screenshots fail, and update test cases to accommodate new features

* fix: rethrow error

* feat: add Android debug configuration options and update documentation

* chore: fix code style in #483 (#492)

* fix: remove try for error handle by outside

---------

Co-authored-by: yutao <yutao.tao@bytedance.com>
Co-authored-by: linyibing <linyibing@bytedance.com>
Co-authored-by: yuyutaotao <167746126+yuyutaotao@users.noreply.github.com>
2025-03-25 22:45:05 +08:00
yuyutaotao
649aeceb43
feat: enable search area for locate (#473)
* feat: enable search area for locate

* fix: update evaluation

* fix: build error

* fix: ci

* fix: locator

* feat: show searchArea in report

* chore: add yaml support for aiTap

* feat: update status tip

* fix: #473 (#484)

* chore: optimize unit test list

---------

Co-authored-by: zhouxiao.shaw <zhouxiao.shaw@bytedance.com>
2025-03-24 09:50:27 +08:00
yuyutaotao
8e1ba565d0
feat: optimize locator (#456)
---------

Co-authored-by: zhouxiao.shaw <zhouxiao.shaw@bytedance.com>
2025-03-17 19:19:54 +08:00
github-actions[bot]
9dad7f3e7f release: v0.12.5 2025-03-10 08:56:47 +00:00
Zhou Xiao
5d63ef9151
refactor: switch bundle type to bundleless (#437) 2025-03-07 17:20:18 +08:00
Zhou Xiao
8e69f8d151
fix(keybord): resolve selectAll/Copy/Paste event (#384)
* fix(keybord): resolve selectAll/Copy/Paste event

* chore: fix e2e test

* chore: upgrade deps

* chore: add keybord commands  ref
2025-02-13 15:53:53 +08:00
github-actions[bot]
f7c583cdf5 release: v0.11.1 2025-02-13 06:50:24 +00:00
yuyutaotao
2f2400dffa
fix: correctly collect elements in absolute container (#373) 2025-02-10 20:51:43 +08:00
github-actions[bot]
d1e2e2b560 release: v0.11.0 2025-02-10 10:35:13 +00:00
yuyutaotao
2a28472fa5
feat: use different color for annotations (#366) 2025-02-10 16:36:12 +08:00
yuyutaotao
9d5f2fbcac
feat(web-extract): extract web content as a tree (#337)
* feat: extract web content as a tree

* chore: update test data

* chore: update test data

* feat: update answer of evaluation

* chore: update test cases

* chore: remove focusing on cases

* fix: ci

* fix: put rect in html tree

* fix: CI

* fix: AI test

* fix: lint

* fix: CI

* fix: static-page compatibility

* fix: CI

* fix: map by markerId

* fix: llm planning prompt

* chore: update hash length

* chore: ignore writing dump file

* fix: lint

* fix: ci snapshot

* chore: snapshot tree in web extractor

* chore: export tree utils in core

* chore: export tree utils in core

* fix: CI

* fix: update test case and evaluation

* chore: remove unused file

* refactor(extract): modify dependencies (#358)

* refactor(extract): modify dependencies

* chore: modify files config

* chore: add indexId as key for map

---------

Co-authored-by: Zhou Xiao <zhouxiao.shaw@bytedance.com>
2025-02-07 14:55:52 +08:00
github-actions[bot]
8eacc354a7 release: v0.10.3 2025-01-27 08:21:33 +00:00
Zhou Xiao
02ad84cf6f
chore: fix ai test (#332) 2025-01-27 10:22:56 +08:00
github-actions[bot]
e6fc69eb81 release: v0.10.2 2025-01-26 12:39:17 +00:00
yuyutaotao
6d924e267f
feat(puppeteer): allow tracking new tab in puppeteer agent (#310) 2025-01-26 16:49:32 +08:00
Zhou xiao
4c82eff526
chore: fix e2e test (#316)
* chore: fix e2e test

* chore: ignore todo test

* chore: fix e2e test

* chore: upgrade gpt api version

* chore: fix e2e test

* chore: fix e2e test

* chore: fix direction

* chore: fix direction

* chore: split test

* chore: split test

* chore: modify input info

* fix: scroll param in ci

* fix: lint

* fix: ai test

* fix: ai test

---------

Co-authored-by: yutao <yutao.tao@bytedance.com>
2025-01-24 15:02:50 +08:00
github-actions[bot]
0f92941f54 release: v0.10.1 2025-01-23 07:15:56 +00:00
yuyutaotao
57f6786628
feat(extract-data): extract data from same-origin iframe (#258)
* feat: extract data from same-origin iframe

* fix: ci snapshot

* fix: extracting timeout error

* fix: ci timeout

* fix: update assets

* feat: set default size of yaml as 1920x1080

* chore: update default viewport size

---------

Co-authored-by: zhouxiao.shaw <zhouxiao.shaw@bytedance.com>
2025-01-22 20:52:11 +08:00
yuyutaotao
3d95460f44
docs(ai-model): update docs for ui-tars (#305)
* feat: update docs for ui-tars

* doc: update

* doc: update

* doc: update

* chore: update readme

* fix: ci

* docs: upgrade video

* chore: modify huagging face icon

---------

Co-authored-by: zhouxiao.shaw <zhouxiao.shaw@bytedance.com>
2025-01-22 09:24:29 +08:00
yuyutaotao
ed45cfab6c
fix(action): keyboard and div extracting (#304)
* fix: clearInput in browser

* fix: input issue on mac

* fix: playwright input

* fix: issue when collecting fixed item
---------

Co-authored-by: zhouxiao.shaw <zhouxiao.shaw@bytedance.com>

* fix: extract fixed style content

* fix: extract fixed style content

* fix: customize window size in yaml
2025-01-21 19:21:09 +08:00
github-actions[bot]
d580bd02fe release: v0.9.2 2025-01-15 03:22:10 +00:00
Zhou xiao
2b18ed55de
feat(ai-model): support vlm (#262)
* feat(ai-model): support plan to target

* chore: modify test

* chore: modify test

* chore: fix env config

* chore: unify the action logic

* chore: optimize type hint

* chore: optimize type hint

* chore: fix type hint

* chore: fix build type error

* chore: support open new tab

* feat: support auto complete element

* chore: add sleep event

* chore: add ai cost time

* chore: optimize prompt

* chore: optimize report prompt

* chore: optimize vlm name

* chore: fix command

* chore: optimize error handle and use check debugger list replace last tab id

* chore: fix chrome debugger attach logic

* chore: fix unit test
2025-01-13 14:32:17 +08:00
George Lei
fe5f7eed20
feat: add environment variable interpolation to YAML script parser (#226)
* feat: add environment variable interpolation to YAML script parser

* Update environment variable interpolation syntax in YAML utils

---------

Co-authored-by: George Lei <george.lei@lesmills.com>
2025-01-10 12:03:56 +08:00
yuyutaotao
8479bcb652
feat: bridge mode - phase 2 (#257)
* feat: allow auto reconnect in bridge mode after disconnect

* feat: show agent progress in extension

* feat: allow using bridge mode in yaml

* doc: add doc for bridge mode

* doc: add doc for bridge mode

* docs: update screenshot
2025-01-10 10:55:41 +08:00
yuyutaotao
c91da56431
feat: allow continue-on-error in yaml (#254)
* feat: allow continue on error in yaml #252

* doc: update doc for new param

* fix: ignore yaml file in node-modules
2025-01-08 20:59:54 +08:00
yuyutaotao
ae49685348
feat: add bridge mode for extension (#228) 2025-01-07 11:10:28 +08:00
yuyutaotao
05dad23bfd
chore: print yaml file in chrome extension (#205) 2024-12-25 20:23:12 +08:00
yuyutaotao
523adab12f
feat: support the if-statement in planning prompt (#184) 2024-12-19 10:44:08 +08:00
github-actions[bot]
3dc57eef32 release: v0.8.6 2024-12-16 07:41:16 +00:00
yuyutaotao
537a5c43d0
feat: add a real-time progress indicator for playground (#177) 2024-12-16 15:04:21 +08:00
github-actions[bot]
91896c421a release: v0.8.5 2024-12-09 09:11:52 +00:00
yuyutaotao
082e347da9
feat: replanning before locating (#167) 2024-12-08 20:12:17 +08:00
yuyutaotao
4282e7bf07
feat: lower the cost of page description (#159) 2024-11-20 16:00:34 +08:00
github-actions[bot]
4972d22ec4 release: v0.8.1 2024-11-15 08:41:21 +00:00
yuyutaotao
26779cf082
fix: fix some extraction bug in extension (#157) 2024-11-14 19:29:22 +08:00