feat(core): support loading extra actions in aiAct - #2910
Draft
quanruzhuoxiu wants to merge 5 commits into
Draft
Conversation
Deploying midscene with
|
| Latest commit: |
447b1bb
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://9310e902.midscene.pages.dev |
| Branch Preview URL: | https://feat-ai-act-load-extra-actio.midscene.pages.dev |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
loadExtraActionstoaiActfor loading reusable UI action YAML files per callactionParammust contain one item, loading produces oneplan, and planner expansion is one-to-oneTaskExecutor.actionAPI compatible while using a call-options overload internallyRuntime validation
A six-field Puppeteer form was executed with
openai_qwen3.5-plus. The reuse variant loaded six independent YAML files, oneInputoperation per field. Every official sample usedMIDSCENE_MODEL_RETRY_COUNT=0, generated a self-contained Midscene HTML report, and passed an exact comparison of all six final DOM values.Baseline C/D mean versus single-operation Extra Action C/D mean:
aiActdeepThink: falseThe corrected fine-grained replay reduced total tokens by 47.1%, LLM time by 49.7%, wall time by 43.8%, and model calls by 46.2%. Each reuse report dump contains exactly one selection of
MidsceneExtraAction_1throughMidsceneExtraAction_6.One directional
deepThink: truesample also passed with seven model calls. It used 101,444 tokens and 44.463 s wall time: 24.4% more tokens and 19.1% more wall time than the non-deepThink reuse mean. Reuse therefore does not depend on deep thinking.This supersedes the earlier macro-style experiment, which incorrectly exposed six
Inputoperations as one planner action. Its 86.5% token reduction did not answer the single-operation granularity question and is excluded from the corrected results.The formal validation document contains the core implementation, all six complete YAML files, the reproduction harness, raw metrics, report-dump audit steps, downloadable evidence archives, and these hosted Midscene reports:
Small-model replay is not yet confirmed: the candidate endpoint returned 401, so no successful auditable sample exists. Fast mode was not enabled in this comparison and should be measured separately.
Validation commands
pnpm run lintpnpm exec nx build @midscene/coreaiAct, and planning-prompt unit tests (51 passed)pnpm exec nx test @midscene/core(125 files and 1,376 tests passed; 8 skipped; one unrelated report-size assertion failed)generateReport: true,outputFormat: 'single-html', andMIDSCENE_MODEL_RETRY_COUNT=0(five successful official samples; harness archived in the validation document and removed from the branch after measurement)Scope
This PR implements loading and replaying existing action YAML files. A future
midscene analyze report.htmlcommand for generating those files from a report is not included.Known unrelated failure
merge-browser-parse.test.tsexpects a merged report below 15 MB, while this checkout generates about 28.35 MB. The failure reproduces in isolation and does not exercise Extra Action loading, planning, or expansion.