feat: add actions option to mql, core, and mcp - #19
Conversation
Type and validate the upcoming browser actions API surface so clients can pass ordered interaction steps with semantic locators before the engine ships. Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
|
Warning Review limit reached
Next review available in: 35 minutes Limit details: You’ve used the included review currently available. You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. How can I continue?Wait for the limit to reset, then comment An organization admin can change what happens after included review limits in Billing. How do review limits work?CodeRabbit enforces per-developer PR review limits within each organization. For paid Pro and Pro+ reviews, CodeRabbit uses a developer's included PR review attempts over the past 7 days to set the current hourly allowance. At typical activity levels, the full plan allowance applies. Higher sustained activity can lower the allowance until earlier attempts leave the 7-day window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: ⛔ Files ignored due to path filters (2)
📒 Files selected for processing (12)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Coverage Report for CI Build 32635109728Warning No base build found for commit Coverage: 79.393%Details
Uncovered ChangesNo uncovered changes found. Coverage RegressionsRequires a base build to compare against. How to fix this → Coverage Stats
💛 - Coveralls |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 2 potential issues.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 7277786. Configure here.
| request?: string | ||
| visible?: boolean | ||
| hidden?: boolean | ||
| } & Partial<ActionLocator>) |
There was a problem hiding this comment.
Wait type allows conflicting locators
Medium Severity
The wait action declares text on the base object and also intersects Partial<ActionLocator>, which already includes text. Because text is always available on the base, TypeScript accepts combining it with another locator strategy such as selector or label, which violates the one-strategy rule used elsewhere.
Additional Locations (1)
Reviewed by Cursor Bugbot for commit 7277786. Configure here.
| fullPage: booleanSchema.optional(), | ||
| ...locatorFields | ||
| }) | ||
| .strict(), |
There was a problem hiding this comment.
Optional locators skip exclusivity checks
Medium Severity
click and fill run through requireLocator so conflicting strategies are rejected, but wait, scroll, and screenshot spread the same locatorFields with no refinement. Inputs with multiple strategies (or name without role) pass MCP validation and reach the API.
Reviewed by Cursor Bugbot for commit 7277786. Configure here.


Restores #9, which was merged by mistake. The merge commit
beab63fwas removed frommasterhistory; this PR brings the same branch back for review.Original PR: #9
Note
Medium Risk
Adds a new public API surface and MCP input validation for browser automation (including fill/evaluate). Types and schemas only; no new client runtime, but invalid locators or snapshot churn could affect callers.
Overview
Adds the Microlink
actionsquery option so clients can send ordered browser steps (inject,click,wait,scroll,fill,evaluate,screenshot,pdf) with semantic locators (role+name,label,text,testId, CSSselector, etc.).MQL and core export
Action/ActionLocatortypes and acceptactionson API options. Existing URL flattening already serializes nested arrays as dotted keys (actions.0.type=…); tests cover that plus tsd usage.MCP validates
actionson sharedbrowserSchema(so screenshot, pdf, html, function, and other URL tools inherit it).click/fillrequire exactly one locator strategy. Tool descriptions now preferactionswhile noting legacyclick/scroll/waitForSelectorstill work.Reviewed by Cursor Bugbot for commit 7277786. Bugbot is set up for automated code reviews on this repo. Configure here.