Skip to content

feat: add actions option to mql, core, and mcp - #19

Draft
Kikobeats wants to merge 3 commits into
masterfrom
feat/actions-sdk
Draft

feat: add actions option to mql, core, and mcp#19
Kikobeats wants to merge 3 commits into
masterfrom
feat/actions-sdk

Conversation

@Kikobeats

@Kikobeats Kikobeats commented Aug 23, 2026

Copy link
Copy Markdown
Member

Restores #9, which was merged by mistake. The merge commit beab63f was removed from master history; 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 actions query option so clients can send ordered browser steps (inject, click, wait, scroll, fill, evaluate, screenshot, pdf) with semantic locators (role+name, label, text, testId, CSS selector, etc.).

MQL and core export Action / ActionLocator types and accept actions on API options. Existing URL flattening already serializes nested arrays as dotted keys (actions.0.type=…); tests cover that plus tsd usage.

MCP validates actions on shared browserSchema (so screenshot, pdf, html, function, and other URL tools inherit it). click/fill require exactly one locator strategy. Tool descriptions now prefer actions while noting legacy click/scroll/waitForSelector still work.

Reviewed by Cursor Bugbot for commit 7277786. Bugbot is set up for automated code reviews on this repo. Configure here.

Kikobeats and others added 3 commits August 9, 2026 19:44
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>
@coderabbitai

coderabbitai Bot commented Aug 23, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@Kikobeats, you've reached your PR review limit, so we couldn't start this review.

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 @coderabbitai review or push new commits to the PR.

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 configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 47d6df72-1d6f-4f81-90c7-769d755b2ef1

📥 Commits

Reviewing files that changed from the base of the PR and between 35a2273 and 7277786.

⛔ Files ignored due to path filters (2)
  • packages/mql/dist/index.d.ts is excluded by !**/dist/**
  • packages/mql/test/snapshots/get-api-url.mjs.snap is excluded by !**/*.snap
📒 Files selected for processing (12)
  • .npmrc
  • packages/core/src/index.d.ts
  • packages/core/test/index.test-d.ts
  • packages/mcp/src/schemas.js
  • packages/mcp/src/tools/function.js
  • packages/mcp/src/tools/html.js
  • packages/mcp/src/tools/pdf.js
  • packages/mcp/src/tools/screenshot.js
  • packages/mcp/test/schemas.test.js
  • packages/mql/test/get-api-url.mjs
  • packages/mql/test/index.test-d.ts
  • packages/mql/test/snapshots/get-api-url.mjs.md

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@Kikobeats
Kikobeats marked this pull request as draft August 23, 2026 10:57
@coveralls

Copy link
Copy Markdown

Coverage Report for CI Build 32635109728

Warning

No base build found for commit 35a2273 on master.
Coverage changes can't be calculated without a base build.
If a base build is processing, this comment will update automatically when it completes.

Coverage: 79.393%

Details

  • Patch coverage: 108 of 108 lines across 5 files are fully covered (100%).

Uncovered Changes

No uncovered changes found.

Coverage Regressions

Requires a base build to compare against. How to fix this →


Coverage Stats

Coverage Status
Relevant Lines: 4398
Covered Lines: 3526
Line Coverage: 80.17%
Relevant Branches: 678
Covered Branches: 504
Branch Coverage: 74.34%
Branches in Coverage %: Yes
Coverage Strength: 11.93 hits per line

💛 - Coveralls

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 2 potential issues.

Fix All in Cursor

❌ 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>)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wait type allows conflicting locators

Medium Severity

The wait action declares text on the base object and also intersects Partial&lt;ActionLocator&gt;, 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)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 7277786. Configure here.

fullPage: booleanSchema.optional(),
...locatorFields
})
.strict(),

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 7277786. Configure here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants