mirror of
https://github.com/vercel-labs/agent-browser.git
synced 2026-11-22 09:31:50 +08:00
main
106
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
bb034f384c |
fix(cli): reject unmet preconditions in upload, har stop, diff snapshot and diff url (#2689)
* fix(cli): reject unmet preconditions in upload, har stop, diff snapshot and diff url upload resolves relative paths in the CLI against its own cwd, fails with file_not_found for a missing file (warns for provider browsers) and with not_file_input for other targets. network har stop fails with no_har_recording when no recording is active, e.g. after a browser restart. diff snapshot without --baseline compares against the last snapshot of the page session, or fails with no_baseline. diff url returns the snapshot diff the renderer reads, honours --screenshot, --full, --selector, --compact and --depth. Co-Authored-By: dwin-gharibi <20875684+dwin-gharibi@users.noreply.github.com> Co-Authored-By: Mohammad-Maraqa <154911866+Mohammad-Maraqa@users.noreply.github.com> Co-Authored-By: cavalcanticampos <64264987+cavalcanticampos@users.noreply.github.com> Co-Authored-By: hyunjinee <63354527+hyunjinee@users.noreply.github.com> * docs: describe upload paths, har stop and diff snapshot preconditions * docs: record upload and diff snapshot prose edits in the docs baseline * fix(cli): keep the diff snapshot baseline's options, pass directories to upload, warn for remote browsers A bare diff snapshot captures with the options and frame of the last snapshot; an option that differs fails with baseline_mismatch. diff snapshot accepts -i and -u. upload accepts directories (webkitdirectory), expands ~, and only warns when the browser is on another machine (provider or non-loopback --cdp). diff snapshot --baseline resolves against the CLI cwd and fails with file_not_found when the file is missing. diff url --full without --screenshot is rejected. Messages and docs name the daemon restart as what discards a HAR recording, and MCP tool descriptions are regenerated. * fix(upload): record the attached target for every session connection A session whose settings carry --cdp, auto-connect or a provider attached without recording the target, so upload treated a remote browser as local and rejected paths missing on this host. The target is now derived from the connection after every settings-driven launch. Also: diff snapshot baseline_mismatch names both the requested and the last snapshot values, the MCP diff_snapshot tool accepts urls, the directory upload test waits for the input to be populated, and docs say the implicit baseline is per tab. * fix(cli): keep the diff snapshot baseline per tab and box the launch future The implicit baseline of diff snapshot is kept per tab and dropped when the tab closes, so a snapshot on one tab no longer discards another's. The launch wrapper boxes the inner launch future so it stays out of the caller's future size. * fix(security): keep page text out of upload errors and inside content boundaries not_file_input names the node only through a fixed tag list and input type list. Snapshot diff output, including diff url, goes through the same boundary and truncation path as other page content. * test(cli): compare resolved paths without assuming forward slashes std::path::absolute emits backslashes on Windows, so expected paths are built with Path::join and the HAR test checks the file name. --------- Co-authored-by: dwin-gharibi <20875684+dwin-gharibi@users.noreply.github.com> Co-authored-by: Mohammad-Maraqa <154911866+Mohammad-Maraqa@users.noreply.github.com> Co-authored-by: cavalcanticampos <64264987+cavalcanticampos@users.noreply.github.com> Co-authored-by: hyunjinee <63354527+hyunjinee@users.noreply.github.com> |
||
|
|
45d8c11ddc |
fix(mcp): keep tool argument values from being read as CLI flags (#2681)
* fix(cli): accept -- before operands of select, press, keyboard and similar commands These parsers read operands directly, so a leading end-of-options marker was taken as the first operand. * fix(mcp): pass every typed positional after an end-of-options marker select, upload, press, keydown, keyup, keyboard, set device, tab and the single-value tools built argv without the marker, so values such as --session or --help were parsed as CLI flags. Co-Authored-By: holny <12433219+holny@users.noreply.github.com> * fix(mcp): reject caller values that would be read as global flags A single guard in the shared argv path rejects any typed value that would land before the literal boundary and parse as a global flag (--session, --help, -h, --restore=, --webgpu, --proxy), whether or not the flag is on the allow-list. Schema enums are checked before argv is built, and skills/plugin operands accept the end-of-options marker. A lone -- stays an operand. Co-Authored-By: holny <12433219+holny@users.noreply.github.com> * fix(mcp): reject derived global-flag tokens and enum-array values Global-looking tokens built from caller data (k=v pairs, joined lists, option values) are rejected in both the command and global argument paths. Flow param names may not start with '-'. Enum validation covers array items. skills get/path accept the -- boundary. The class test now covers enum fields, object keys, every global flag from the flag tables, and fails if a tool is skipped. Help text and docs list the commands that take -- and the MCP rejection of flag-shaped values. Co-Authored-By: holny <12433219+holny@users.noreply.github.com> * fix(mcp): scope the global-token guard to value slots and split the class test A caller string equal to a server-emitted global flag is rejected only when it lands in a flag value slot, so data after the literal boundary such as fill text "--session" passes. The class test asserts on parsed flags and covers each flag class plus a table test over every global flag. Co-Authored-By: holny <12433219+holny@users.noreply.github.com> * test(native): give the tab-binding tests their own session Tests that do not take the env lock write default.target into whichever socket dir is current, which can overwrite a binding another test saved. The pin-tab and rollback tests now use their own session name. * fix(mcp): validate click modifiers with the CLI parser and cover every parsed flag - click and dblclick modifiers are checked with Modifiers::parse_list, so aliases such as ctrl, cmd and ctrl+shift stay accepted - tab new accepts the -- marker and MCP passes the url after it - skills get parses its operands in one function and treats names after -- as names - restore keys that start with '-' are rejected - the class test compares every parsed global flag with a neutral reference call, covers the shared arguments, and has a table test per documented command Co-Authored-By: holny <12433219+holny@users.noreply.github.com> * fix(mcp): accept restore keys that start with a hyphen A restore key travels as one --restore=<key> token, so a leading hyphen cannot be read as another flag. The parser now strips exactly one --restore= prefix, so a key such as --restore=evil keeps its text. * fix(mcp): read flag-shaped fields of auth, webmcp and plugin tools as data auth save, auth login, webmcp invoke, webmcp result and plugin run take free-form names and values. The MCP builder now puts -- right after the subcommand, so a name such as --session reaches the command instead of being refused or read as a global flag. Tests run the recorded argv through parse_flags and parse_command and check that Flags stay unchanged. * fix(mcp): keep per-command extraArgs working on auth, webmcp and plugin tools Global extraArgs stay before the -- marker; the remaining options go after the operands, where these parsers read them. The docs name the fields that pass flag-shaped values. * fix(mcp): keep help and version in extraArgs before the operand marker The CLI reads --help and --version only before --, so moving them after the operands ran the command instead of printing help. --------- Co-authored-by: holny <12433219+holny@users.noreply.github.com> |
||
|
|
343602553a |
fix(snapshot): ref native controls with non-interactive roles, pierce shadow roots, scope -s to all matches (#2688)
* fix(snapshot): ref native controls with non-interactive roles, pierce shadow roots, scope -s to all matches The cursor scan skipped every native tag, so <summary> and buttons with role=menu got no ref, and it never entered open shadow roots. It now skips a native tag only when its AX role is interactive, walks open shadow roots, resolves matches without mutating the DOM, and snapshot -s covers every match. Co-Authored-By: swjtuhuangjunfu <7245859+swjtuhuangjunfu@users.noreply.github.com> Co-Authored-By: danted4 <67830495+danted4@users.noreply.github.com> Co-Authored-By: Zhao0335 <218378524+Zhao0335@users.noreply.github.com> Co-Authored-By: linzch3 <20380442+linzch3@users.noreply.github.com> Co-Authored-By: luxleader <205600116+luxleader@users.noreply.github.com> * fix(snapshot): tighten cursor scan and -s scoping The cursor scan compares inherited cursor:pointer against the flat-tree parent, so shadow children and slotted nodes no longer get extra refs. It scans from document.body, skips a details container and a link without href that wraps a control, and ColorWell is an interactive role. snapshot -s drops matches nested in another match and releases its element handles. Help, MCP description, skill text and the docs edit fixture describe the every-match scope. * fix(snapshot): list -s matches in page order and keep links around hidden controls snapshot -s sorts its roots by the page order of the selector matches instead of AX-tree index order. A link without href is skipped only when it wraps a control that is visible and not aria-hidden. * fix(snapshot): treat display:contents controls as visible when their contents render A link without href wrapping a display:contents control was not covered by that control because its own bounding rect is empty. Visibility of such an element now comes from the rect of its contents. --------- Co-authored-by: swjtuhuangjunfu <7245859+swjtuhuangjunfu@users.noreply.github.com> Co-authored-by: danted4 <67830495+danted4@users.noreply.github.com> Co-authored-by: Zhao0335 <218378524+Zhao0335@users.noreply.github.com> Co-authored-by: linzch3 <20380442+linzch3@users.noreply.github.com> Co-authored-by: luxleader <205600116+luxleader@users.noreply.github.com> |
||
|
|
4605d82cfc |
fix(refs): reject refs issued for a replaced document (#2685)
* fix(refs): reject refs issued for a replaced document A click, script or redirect that navigates the main frame left earlier refs resolvable, so the next ref action either did nothing or, through the role/name fallback, hit a same-named element on the new page. Compare the page's current main-frame loader with the one the refs were issued for before any command that names a ref, and fail with a stale-page error. Same-document changes keep the loader, so their refs stay valid. Co-Authored-By: dwin-gharibi <20875684+dwin-gharibi@users.noreply.github.com> * docs(skill): describe stale-page ref error * fix(refs): check the issuing document per frame inside ref resolution The previous check read every string field of a command, so text that looks like a ref (fill '#x' e4) failed as a stale ref, and compared only the main frame, so frame-scoped refs were rejected after a page load while refs of a navigated iframe stayed live. The check now runs in the two resolvers that interpret refs and in the frame command, against the loader of the document each ref was issued in, before and after resolution so the role/name fallback cannot re-query a replaced document. * fix(refs): bind each ref to its own document and report a replaced one on failure A ref now carries the session and loader of the document it was created in, instead of being looked up by page and frame at check time. Refs created outside a snapshot (find, auth login) no longer inherit a stale document recorded by an earlier snapshot, and a document replaced while a ref is resolving is reported as a previous-page error rather than whatever the half-finished resolution failed with. Covers frame @ref and out-of-process iframes in tests, and documents the error. * fix(refs): fail a snapshot that straddles a navigation and word the stale-ref error for removed frames A snapshot read the document loader before fetching the accessibility tree, so a navigation that committed in between bound the new page's refs to the old document and every one of them failed at once. The loader is read again after the tree arrives, and a changed or missing one fails the snapshot instead of handing out refs of unknown provenance. The stale-ref error no longer claims the page navigated, since a removed iframe produces it too. * test(refs): gate the post-resolution check and read find's document before its AX query Two fixture pages make the page navigate while a ref resolves: one lets the role/name fallback run against the new document, the other navigates while the click point is computed. Both fail the click with the stale-ref error and fail the tests when the post-resolution check is removed. find now reads the current document before the accessibility query, so a navigation in between is caught when its ref resolves. * test(refs): gate the object-path check and the snapshot refusal; document the snapshot error get text and fill resolve through the object path, whose post-resolution check had no test; both now fail without it. A large page that reloads every 40 ms gates the snapshot refusal. The refusal message no longer claims a navigation when the frame was removed, and is documented in help, skill, docs and the MCP description. * docs: record the snapshots ref-lifecycle edit in the docs baseline * fix(refs): a read-back after an action never fails the action check and uncheck read the toggle state after clicking. A checkbox whose change navigates replaced the document in between, and the guard failed a click that had worked. Post-action reads on a ref now go through one helper that reports a gone document as an unverified result, and the response carries a warning instead of an error. The check before the action stays strict. --------- Co-authored-by: dwin-gharibi <20875684+dwin-gharibi@users.noreply.github.com> |
||
|
|
19efb41b9a |
fix(security): reject an allowlist that lists no domain (#2683)
* fix(security): reject an allowlist that lists no domain An allowlist supplied through a flag, env var, config file, MCP argument or launch command that parsed to zero domains was treated as no allowlist, so containment was silently off. A supplied empty list is now an error at every entry point, and a missing value after --allowed-domains, --action-policy or --confirm-actions is an error instead of a skipped flag. A config file that sets a security key but is unusable fails to load rather than being skipped. A daemon whose environment carries an empty allowlist refuses to start, so an empty list is never stored. Live settings and launch commands cannot clear an allowlist. A domain filter with no entries allows nothing, and every check that decided containment from the list length now asks whether a filter exists. Commands that only close a session warn about a blank AGENT_BROWSER_ALLOWED_DOMAINS and run. Co-Authored-By: dwin-gharibi <20875684+dwin-gharibi@users.noreply.github.com> * fix(security): keep chat from answering confirmations, harden broken security configs The chat model could run confirm and deny, approving its own pending confirmation; both are removed from the commands chat may run. A broken config that names a security key through JSON unicode escapes is no longer skipped. close, quit and exit report an unusable security config and run, so the session can be closed to fix it. * fix(security): check every batch item chat runs; update docs route baseline The chat allowlist applied only to the first word of a tool call, so batch 'confirm <id>' still reached confirm. Each batch item is now parsed the way batch splits it and must be allowed; a batch with no items is refused because its commands would come from stdin, and chat children no longer inherit stdin. Docs edits for the allowlist wording and the schema change are recorded in docs-edits.json. * fix(security): scope config validation to commands that run a browser A config with an unusable security setting made --version, --help, doctor and other commands that never run a browser exit 1. One predicate now decides which commands run a browser; the rest report the problem as a warning and continue. The MCP allowedDomains schema requires at least one item, matching the config schemas, and the failed-launch tests assert the concrete stored and live lists. * fix(security): classify commands from parsed arguments, never clear containment command_runs_browser scanned the raw arguments for help and version flags, so a value taken by another option (--user-agent --help) made a browser command look browserless, and the empty-allowlist handling then dropped containment. The check now reads the arguments after global flags and their values are removed, as dispatch does. Browserless commands only downgrade the error to a warning and leave the allowlist and environment as given; close alone leaves an unusable list out of its own settings patch and daemon start. --------- Co-authored-by: dwin-gharibi <20875684+dwin-gharibi@users.noreply.github.com> |
||
|
|
25b5d76f28 |
fix(snapshot): keep refs when capture fails (#2666)
* fix(snapshot): keep refs when capture fails Stage replacement refs for snapshots, diffs, and annotated screenshots. Publish them only after the command succeeds so earlier refs survive an error. Co-Authored-By: swjtuhuangjunfu <7245859+swjtuhuangjunfu@users.noreply.github.com> Co-Authored-By: Stefan Smiljkovic <1984909+shtefcs@users.noreply.github.com> * docs(snapshot): explain ref reuse after capture errors * docs(mcp): sync snapshot refs guidance in the tool catalog --------- Co-authored-by: swjtuhuangjunfu <7245859+swjtuhuangjunfu@users.noreply.github.com> Co-authored-by: Stefan Smiljkovic <1984909+shtefcs@users.noreply.github.com> |
||
|
|
a897b24d7e |
Reject unknown command flags (#2665)
* fix(cli): reject unknown screenshot flags Treat unknown flags as errors instead of using them as selectors or output paths. Keep dash-prefixed values available after the end-of-options marker. Co-Authored-By: on101094 <333183542+on101094@users.noreply.github.com> * fix(cli): reject unknown command flags Parse command options consistently while preserving literal arguments and MCP parity. * fix(cli): preserve option boundaries Keep literal values and batch arguments consistent across the CLI and MCP. * Fix batch flag guidance and close validation --------- Co-authored-by: on101094 <333183542+on101094@users.noreply.github.com> |
||
|
|
f85ed4d620 |
feat(tabs): freeze a background tab with tab keep frozen (#2627)
* feat(tabs): freeze a background tab with tab keep frozen `tab keep frozen <tab>` pauses a background tab completely. Timers, network callbacks and scripts stop until the tab becomes the active tab again. Five busy background tabs went from 0.05 CPU cores to zero. A frozen page needs care, so the daemon now tracks one of three modes per tab and changes between them in one place: - Only a tab that is not active and reports itself hidden can be frozen. Freezing a page the browser is showing leaves it reporting hidden for good. - A change that fails leaves the tab in the mode it had. - The daemon unfreezes the active tab before it runs a command, because a command that waits on a timer never finishes on a frozen page. It leaves a tab that another session pinned alone. - A session that closes unfreezes the tabs it froze, because a frozen page stays frozen after the session disconnects. A tab that cannot be unfrozen stays recorded as frozen and is named in the close result as `unfreezeError`. * docs(tabs): say that showing a frozen tab elsewhere resumes it Co-authored-by: vercel-v[bot] <353008837+vercel-v[bot]@users.noreply.github.com> * fix(tabs): list frozen in the tab keep usage hint Co-authored-by: vercel-v[bot] <353008837+vercel-v[bot]@users.noreply.github.com> --------- Co-authored-by: vercel-v[bot] <353008837+vercel-v[bot]@users.noreply.github.com> |
||
|
|
3f6600a589 |
feat(tabs): keep chosen background tabs running at full speed (#2624)
* feat(tabs): keep chosen background tabs running at full speed Chrome slows every tab that is not in front: timers drop to about one per second and animation frames stop. A page an agent leaves to work in another tab stalls, and the agent reads stale state when it switches back. `tab keep <live|throttled|frozen> [tab]` sets how one tab runs in the background. `live` holds focus emulation on the tab, so it keeps running at full speed. `frozen` pauses it until it becomes the active tab again. `throttled` is the default. `tab list` shows the setting, and the `agent_browser_tab_keep` MCP tool in the `tabs` profile sets it. The daemon unfreezes the active tab before it runs a command, because a command that waits on a timer never finishes on a frozen page. Chrome is now launched with `--disable-renderer-backgrounding`. Without it a live tab's timers reach only 6 to 8 of 10 ticks per second. Tabs that are not live stay throttled with the flag. * fix(tabs): unfreeze frozen tabs when a session leaves a running browser A frozen page stays frozen after the session that froze it disconnects. Closing a session attached with `--cdp` or `--auto-connect` therefore left its frozen tabs paused in a browser that keeps running, until someone brought each tab to the front. The daemon now unfreezes every tab it froze before it disconnects from a browser it did not launch. All close paths go through the same place: the `close` command, the idle shutdown, a shutdown signal and a reconnect. * refactor(tabs): keep only the live and throttled modes here The frozen mode moves to its own change. It needs more care than the rest: a frozen page must be unfrozen before any command runs on it and before the session leaves a browser that keeps running. This leaves `tab keep <live|throttled> [tab]`. The daemon tracks live tabs in a set instead of a per-tab state. `tab keep` with no mode switches to a tab labeled `keep`, as it did before this command existed. * tab keep with no mode fell through to tab switch and failed with No tab with label keep. It now fails as a missing argument with the tab keep usage, like the other tab subcommands. The docs also say that the keep setting belongs to the session that set it. Co-authored-by: vercel-v[bot] <353008837+vercel-v[bot]@users.noreply.github.com> * docs(tabs): note the keep setting is per session next to the other multi-session notes Co-authored-by: vercel-v[bot] <353008837+vercel-v[bot]@users.noreply.github.com> --------- Co-authored-by: vercel-v[bot] <353008837+vercel-v[bot]@users.noreply.github.com> |
||
|
|
53384771fb | fix(cdp): share session matching for direct-page events | ||
|
|
e0c121a96d |
feat(click): add right-click, middle-click, and modifier keys to click and dblclick (#2594)
* feat(click): add --button and --modifiers to click and dblclick click and dblclick could only press the left button with no keys held. The parser took the first argument that was not --new-tab or --human as the selector and dropped every other flag, and the dispatch sent one press and one release with no modifiers. A click is now described by one ClickSpec (button, count, modifiers), decoded and validated in one place for both the CLI parser and the daemon. The dispatch walks an explicit Move, Press, Release sequence per click and carries the modifiers on every event, so a double click sends two full clicks and the page receives click, click, dblclick as with a real mouse. dblclick now shares the click handler, so it also follows the session input mode and accepts --human. Unknown flags are rejected instead of being ignored, and --new-tab cannot be combined with --button or --modifiers. Co-Authored-By: Kevin GATERA <22301610+kevingatera@users.noreply.github.com> * feat(mcp): expose click button and modifiers, and document them agent_browser_click and agent_browser_dblclick accept button and modifiers and pass them through the CLI parser. The mouse button schema now comes from the shared button table, so mouse down and up also list back and forward, which the CLI already accepted. Documents the new flags in the commands reference and the core skill reference. * fix(mcp): require at least one click modifier in the tool schema The modifiers array schema allowed an empty list that the argument reader rejects. Also corrects the docs sentence that said dblclick takes every click flag: it does not take --new-tab. * test(docs): record the new click examples in the docs baseline The /commands baseline sample is the whole command block, so the two inserted example lines need a from/to entry in docs-edits.json. * fix(click): name the backend limit when a non-Chrome session gets a button or keys The WebDriver guard rejected the new flags with a message that did not say what was unsupported or what to use instead. * refactor(mcp): read button and modifier names from the pointer tables The click tool schema spelled the modifier names out and used a fully qualified UFCS call for the buttons, so the schema could drift from the parser. Both enums now come from pointer.rs, and Modifiers derives its bits from one name list. * fix(click): keep the test, help, and backend guard correct on macOS The modifier test used ctrl+shift, which macOS turns into a context menu with no click, so it could never pass there; it now holds meta and shift, which behaves the same on every platform. The click help and the commands reference now say what macOS does with control-click and which key opens a link in a new tab there. The Safari and iOS guard matched every non-plain plan with one message, so click --new-tab there failed with a message about flags the caller never passed. Each plan variant now has its own arm and its own message. --------- Co-authored-by: Kevin GATERA <22301610+kevingatera@users.noreply.github.com> |
||
|
|
1cc19526f3 | Prepare v0.43.0 (#2583) | ||
|
|
f88c40b7ed | Add hints to snapshot controls that share or lack a name (#2578) | ||
|
|
d129226078 |
Ship native binaries as per-platform packages (#2150)
* Ship native binaries as per-platform packages - Publish each platform binary as an @agent-browser/cli-* optional dependency, so installs download only the host's binary - Link the global command to the native binary on first run when install scripts are blocked (npm 12, pnpm, bun), and in postinstall when they run - Release and CI publish the platform packages and test global installs with scripts blocked and allowed * fix: link the native binary on pnpm 12 and keep skills resolvable Three fixes on top of the per-platform packaging work. relinkPnpmShim compared the shim's cmd-shim-target marker to argv[1] with string equality. On pnpm 12 the marker keeps the ./ from the package's "./bin/agent-browser.js" and argv[1] does not, so the shim was never rewritten and every command still started Node. It now compares resolved paths, which also covers the pnpm 10 and 11 spellings. The launcher spawned the binary straight out of the platform package. npm hoists that package beside agent-browser, so skills.rs, chat.rs and upgrade.rs, which resolve their files by walking up from the executable, found nothing. It now materializes into agent-browser/bin first and runs from there. postinstall only linked when npm_config_global was set, which only npm does, so pnpm, yarn and bun never linked at install time. It now asks the invoking manager for its global bin directory and also considers the enclosing node_modules/.bin, which Yarn Classic links through. The probe is skipped for local installs so they do not pay a subprocess. The Windows shims are rewritten in a format npm's read-cmd-shim can parse, each file's own target is checked before it is replaced, and replacement is staged then renamed so a failure leaves the working launcher in place. Verified with real global installs on macOS and Linux: npm with scripts allowed and blocked, pnpm 11 and 12, and bun. Yarn could not be verified locally because it fails when an optionalDependency is unresolvable and the platform packages are unpublished. Windows is unverified. * fix(pnpm): link the shim to the binary in the package bin The pnpm branch wrote the platform package's own path into the shim, so once that package resolved, the binary ran from a directory with no skills/ above it. It now links the same materialized path the symlink and Windows branches already use. --------- Co-authored-by: Lahfir <70215676+lahfir@users.noreply.github.com> |
||
|
|
e7519957b9 | Type-check with tsc-ts (#2507) | ||
|
|
2a1f765bb2 |
Prepare v0.42.0 (#2463)
* Prepare v0.42.0 * Add page and replay flow tiers to the 0.42.0 changelog --------- Co-authored-by: Railly Hugo <railly.hugoquispe@vercel.com> |
||
|
|
be6d27a995 |
feat(flow): run flows from the page or by replaying the recorded commands (#2397)
* feat(flow): add saved flow recording, storage and HTTP replay
Records the commands of a task with the first-party JSON requests each
one fired, stores them without credentials, and replays the output
request directly with a response shape check.
* feat(flow): add flow start, save, run and list commands
The daemon tags HAR entries with the running command and announces
saved flows for a site after navigation. A failed run marks the flow
unverified only when the site changed, not when params were rejected.
* feat(flow): print flow results and the saved flows hint
The hint shows recorded param values, the recorded page and item field
names so an agent can call a flow without guessing its inputs.
* feat(mcp): expose saved flows as core tools
Adds flow list, run, start and save to the core profile, carries the
saved flows hint in navigation results, and formats flow results as
text.
* docs(skills): document saved flows in the core skill
Covers when to prefer flow run over driving the page, how to record a
flow, and points derive-client at it for tasks the agent repeats.
* fix(network): let mocked cross-origin responses pass CORS
A route with --body answered cross-origin requests without CORS headers and
with no content type, so the page saw a network error and HAR capture dropped
the body. Mocked responses now echo the request origin, answer preflights,
and label JSON bodies as application/json.
* feat(flow): fall back to the page and to a command replay
A run now tries direct HTTP, then the same request from the page, then a
replay of the recorded commands, and starts the next run at the tier that
worked. Every tier checks the recorded response shape; a change marks the
flow unverified and is reported as drift. Session routes answer the HTTP
tier too, so mocks reach every tier. A write the site accepted is never
sent again by a lower tier, and a replay refuses params it cannot apply.
* feat(flow): find params and references when saving
A value a request sent that came from an item of an earlier list becomes a
param with its source; a value copied from a single field is filled from that
response on each run, and the requests it depends on run first. A login form
on the page at save time names the last gap. The saved flows hint says where
each detected param comes from.
* feat(webmcp): list saved flows next to declared tools
webmcp list now shows the saved flows for the page's site under an
observed section, so declared and observed tools can be compared.
* fix(flow): keep each GraphQL request and treat queries as reads
Requests were deduplicated by method and URL, so a GraphQL app kept only its
first POST. The body is now part of the key, and a POST that only carries
GraphQL queries no longer needs --allow-write; mutations still do.
* feat(flow): record a flow on an already open page
flow start keeps the tab's URL, so a task that begins on a logged-in page
can be saved without an open command, and a replay starts from that page.
* fix(flow): replay recorded commands on live apps
Snapshot refs are gone by the next run, so commands that used one are saved
as the role and name it pointed at. Replayed commands wait for an element
the page is still rendering, and a captured request matches a recorded one
by its body or GraphQL operation, since one endpoint serves every query.
* fix(flow): send writes the way a browser does
The HTTP tier now sends Origin on writes, taken from the recorded referer,
since sites check it before accepting one. A write the site did not accept
may carry stale page tokens, so it moves on to the page and the replay
tiers instead of stopping.
* fix(flow): chain only generated values from read responses
Short words and locale codes repeat across a site's responses, so they
turned into long chains of references, some through POST requests. A
reference now needs a value that looks generated, comes only from a read,
and replaces whole tokens, never part of a longer word.
* feat(flow): take params from the start URL and find nested lists
A query value of the recorded page URL that the API requests also sent,
such as ?keyword=, becomes a param without --param. --where, --fields and
the hint's item fields now use the heaviest list anywhere in the response,
since GraphQL nests it under data.
* feat(flow): read JSON embedded in server-rendered pages
Sites that render on the server send no API request for their main data, but
often embed it in the HTML as a JSON script, a Next.js __NEXT_DATA__ block or
a window.x = {...} assignment. flow save now keeps those blocks from
first-party documents as requests that fetch the page and read the same
block back, so they get params, shape checks and --fields like any API
response. The page's own path segments and blocks of the same document are
no longer taken as params or references.
* fix(flow): treat a response without its lists as no results
Many APIs drop an empty list and its counts instead of sending []. That
used to read as a changed shape and mark the flow unverified. When only
lists and counts are missing and no new list appeared, the run now returns
no items and leaves the verified state as it was.
* docs: document saved flows
Adds a saved flows section to the network page and two lines to the README
command list: recording, params, the run tiers, discovery and storage.
* feat(flow): describe saved flows in the shape of WebMCP tools
Saved flows now carry a description and an inputSchema built from their
params, returned by flow list and shown by webmcp list after the tools the
page declares. When a page declares WebMCP tools, they come before the saved
flows hint, and the hint suggests them first. flow run still runs flows;
webmcp invoke only calls the page's own tools.
* fix(flow): close the gaps found in security review
- Every resolved request URL, and every redirect the HTTP tier follows, must
pass the session's current domain allowlist.
- A command replay sends every write the recording caused, so it needs
--allow-write whenever the flow recorded one, not only for writes the
output depends on.
- Param values are substituted into parsed JSON strings, so quotes and
backslashes keep request bodies and replayed commands valid.
- Suggested commands shell-quote recorded param values, and inferred param
names keep only letters, digits and underscores.
- Values typed into password-like fields are not stored, auth and
credential commands are not recorded, and flow files and directories are
created owner-only.
- webmcp list prints each saved flow's inputs as name, type and recorded
value.
* fix(flow): keep typed secrets out of saved commands and requests
type stores its input in text, which the redaction skipped. Both fields are
now redacted, and the typed value is kept in memory during the recording so
that flow save drops any captured request whose URL, body or headers carry
it, and reports why.
* feat(flow): capture flows with --capture flow and save several per session
Recording moves from `flow start` to a launch flag. Every recorded command
returns recorded.seq, failed commands stay in the recording as ok:false, and
`flow steps` lists them. `flow save <name>` takes --from/--to/--description,
no longer resets the recorder, and close reports unsaved steps. The hint hides
only flows saved in the same session, and har stop is refused while capture
owns the recorder. Flow files are version 2; older files must be saved again.
* fix(flow): keep runs on the flow's own site
A flow records the base domain of its start URL as allowedHosts. A run
rejects any request, redirect or recorded navigation outside it, whatever
--allowed-domains says, and the in-page tier only runs on a tab that is
already on that site. Flow origins are validated as hostnames before they
become directory names, and IP hosts no longer collapse to a shared base.
* feat(flow): list writes at save and confirm each one before a run
flow save records writes[{id, method, url, kind}] with kind explicit or
suspected. A GET is suspected when a click fired it and no output depends
on it, or when its path has a whole logout, signout, unsubscribe, delete or
remove segment. --allow-write takes all or write ids, in the CLI and in
flow_run. A write it does not cover asks for confirmation as policy action
flow_write:<id>, so --action-policy and --confirm-actions reach the http
and page tiers; the command replay checks the writes no request covers.
* feat(flow): redact secret fields by what the page says and keep typed values as params
Recording reads type, autocomplete and the field's name, id, label and
placeholder from the element behind a fill or type, so an unlabeled
one-time-code or cc-* input is redacted. Any other typed value becomes an
auto-named param with source typed, stored as a placeholder in the step, or
the --param name when one has the same value. Params record their source
(typed, query, response) and the file lists redactedSteps.
* feat(flow): stop a run on auth, rate limit and challenge responses
A 401 or 403 returns auth_expired, a 429 returns rate_limited with
retryAfter when the site sent one, and a bot challenge page returns blocked.
Each stops the chain instead of falling to a lower tier, carries a
machine-readable code and leaves the flow's verified state alone.
* fix(flow): ask only about the writes a run sends
A run now gates the writes among the requests its output needs, not every
write the recording caused; the command replay checks the rest. Adds a
Chrome e2e against a local fixture: sign-in cookie, CSRF write through a
response value, GraphQL query, a GET side effect, a cross-domain redirect,
and two saves in one session. commands.mdx stays as it was because the docs
route fixtures freeze it.
* fix(flow): close review findings on credentials, redirects, replay and typed values
- A 401 or 403 on a request recorded with stripped credential headers falls
through to the page and replay tiers; auth_expired is reported when every
way is refused.
- A blocked redirect returns its 3xx, a write with a 2xx or 3xx answer is
accepted, a write with no answer returns outcome_unknown and is never
resent, and the in-page write does not follow redirects.
- The replay runs only plain interactions, checks every URL in a recorded
command, and stops when the tab leaves the flow's site.
- keyboard type and inserttext read the focused element; typed params keep
no example.
- base_domain uses the public suffix list; a flow whose origin directory does
not match its start URL must be saved again.
- A save of an earlier range no longer moves the save marker back, and
challenge pages are recognized only in HTML.
* fix(flow): keep vault and key-by-key passwords out of flows and close URL and retry gaps
- Replay URL checks read every string the way the URL parser does, so tabs,
newlines and leading control characters cannot hide a host, and URL keys
are checked whatever the value looks like.
- The in-page fetch sends a write once; a thrown fetch is outcome_unknown.
- A command that is not recorded tags no requests to the previous step, and
the password auth login fills is registered as a secret.
- Keys pressed in a secret field are gathered into one secret, redacted from
the steps, and requests carrying it are dropped at save.
* fix(flow): keep modifier chords and clipboard text out of secret handling gaps
A key joins a secret only when it is bare or Shift plus a key, so Control+a
no longer corrupts the buffer. A paste chord or clipboard paste into a
secret field redacts the step and drops the requests it tagged, and
clipboard write text is redacted and registered as a secret.
* fix(flow): register a pasted password once the paste has finished
After a paste chord or clipboard paste into a secret field, the focused
field's value is read and registered as a secret in full, with any typed
prefix, and later keys extend it. A request a later step sends with it is
no longer saved. When the value cannot be read, the requests tagged to the
paste step are still dropped.
* fix(flow): replay once per run, recognize encoded secrets and link writes to earlier responses
- The command replay runs at most once per run; every request that falls
back to it reads its answer from that replay, and it is skipped when
another tier already sent a write it would repeat.
- Requests carrying a secret are recognized in form-encoded, percent-encoded
and JSON-escaped forms.
- A write's request takes a value from an earlier response and depends on it,
so a rotating token is read fresh at each run.
* fix(flow): never resend a replayed write, keep rejected writes eligible, match replays by query
- Before any tier sends a write, the run checks whether it was already sent.
A write the replay sent is answered from the replay's capture, and stops
with outcome_unknown when the capture has no answer.
- Only a 2xx or 3xx answer, or an unknown outcome, counts as a sent write; a
4xx rejection leaves the replay available.
- Replayed requests match by method, host, path, recorded query and body,
ignoring query parameters the recording never had; a missing or ambiguous
match fails for that request. JSON bodies compare by value.
* fix(flow): read the flow once per run and carry it through confirmation
A flow_run loads its file once. Policy, the write gate and the run use that
copy, and a confirmation keeps it so the confirmed run executes the file
that was checked, not one read again from disk. The write gate is one
function used before the run and inside it.
* refactor(flow): one secret-field predicate and one header classifier
FieldTraits::looks_secret replaces four copies of the type, autocomplete and
name check. HeaderClass names the four ways a recorded header is treated, in
place of three separate lists.
* refactor(flow): type the saved flow and move to a module directory
Flow, Step, Request, Write, Param and Tier are serde types with unknown
fields rejected, so the file schema is checked on load and a run no longer
walks serde_json::Value. Request.write replaces the writes lookups in the
run path. The file format is version 1; nothing older has shipped, so the
old-version path is gone. Fixtures build flows through serde_json.
* refactor(flow): one write ledger and next_tier decide when a request is sent again
WriteLedger records which writes a run sent, and next_tier picks the next
tier from the attempts so far. They replace the accepted, retry, completed
and already-sent checks that were spread over the run loop, the replay and
its guard. A write that was sent is only read back from the replay's
capture.
* refactor(flow): a Sender per tier behind ports, and the run loop in flow
HttpSender, PageSender and ReplaySender each live in their own file and
implement Sender. The browser session is reached through the Host and
CommandRunner ports, which actions.rs implements in one wiring struct, so
the replay no longer lives in actions.rs. run_requests is the run loop; an
in-memory Senders drives it in tests without a browser or a network. The
navigation hint moves into flow.
* refactor(flow): the recorder keeps its fields and offers begin, tag, end, steps and save
actions.rs no longer reads or writes recorder internals. It enters and exits
a command, begins and ends it with what the page said, and asks for the
steps or a save. Range resolution, marking a save and the session's saved
list live behind save. Step stabilizing moves into the recorder.
* refactor(flow): one host policy, one failure constructor, no pass-throughs
HostPolicy is the only place a URL is checked against a flow's hosts; the
recording's first-party test, the run, the redirect policy, the replay and
the page tier all use it. TierResult::fail with Failure::drift, unavailable
and unknown_outcome replaces five result builders. replay_match,
validate_name's wrapper, write_policy_action and flow_for_command are gone;
a Write names its own policy action.
* refactor(flow): drop the click-fired write guess and the --from keywords
A GET is a suspected write only when its path has a whole logout, signout,
unsubscribe, delete or remove segment; guessing from the command that fired
it needed the output's dependencies and the request's resource type. --from
takes a step number, and without it a save starts at the last navigation
after the previous save. Help, MCP, the tool catalog, docs and the skill
reference follow.
* test(flow): table-driven cases, behavior names, and key tests through the save
Hosts, check_response, GraphQL and secret-field cases are tables. The tests
named after review comments carry the behavior they check. Key-buffer,
paste and clipboard tests ask whether a request carrying the secret
survives a save instead of reading the recorder's secrets.
* fix(flow): a request is a write only when the writes list says so
Request.write was a second copy of what Flow.writes records, and it
defaulted to false, so a file could disagree with itself and a write could
skip the ledger. The run reads the writes list alone.
* refactor(flow): build the flow from its types and put write queries on Flow
build_flow and the reference linker create Step, Request and Param directly
instead of json! values that were parsed back into the same types.
run_writes, replay_only_writes and AllowWrite::check replace four free
functions that walked the writes list.
* refactor(flow): three tier functions over one Browser port
http::send, page::send and replay::send replace the Sender trait and its
three structs. Host and CommandRunner become one Browser trait. The Senders
seam and its in-memory adapter stay.
* refactor(flow): Stop and RunOutcome name why a run ended, and a flow is read once
Stop replaces the four string codes that were matched in send, memory and
actions. RunOutcome builds the stopped, drift and failed messages with unit
tests, so handle_flow_run no longer formats them. The run's host check is
the per-request one after references are filled. A flow_run that cannot read
its flow fails at the first read, before policy, so policy and the run never
see two different files.
* fix(flow): tag a request by when it started and wait on conditions in the e2e
A request belongs to the command that was running when it started, using
the request's own start time against each command's begin time, so a late
event read during the next command keeps its step. The replay's wait no
longer stalls for its full timeout: a request body that still has references
to fill is matched on the request alone. The e2e wait for the server to see
a click's request and for the browser to finish reading it, instead of
sleeping.
* fix(flow): check every request's host before the first one is sent
A flow with a foreign host in a later request sent the earlier requests
before rejecting it. The run now checks every request URL against the
flow's hosts up front, on the template with references unfilled, and again
per request once they are filled.
* fix(flow): a flow that sends a write it does not list fails to load
A request that changes state and is missing from the writes list would run
with no gate and no once-only guarantee, so an edited file could drop it.
Loading now refuses the file and asks to save it again.
* fix(flow): the replay lets each command's requests finish before the next
A command that depends on what the previous one fetched, such as a click
that sends a token the page stored from the last response, raced the
response and sent the wrong body.
* refactor(flow): ship flow run over http only
Flow run sends the saved requests over direct HTTP. The in-page fetch and
command replay tiers, the cross-tier write ledger, recorded commands in the
file and the tier preference are removed; a 401 or 403 is auth_expired.
Every HTTP guard stays: host policy, write gate, single load, shape
verification, redaction and owner-only files. Docs, help, skill reference
and the MCP catalog describe the HTTP path only.
* fix(flow): report a stripped credential instead of an expired session
A request recorded with an authorization, token or CSRF header is marked
strippedAuth at save. A 401 or 403 for it stops the run with
credential_not_sendable, since signing in again cannot supply what the
file does not keep. Other 401 and 403 responses stay auth_expired.
The file no longer lists redactedSteps: it holds no steps to point to.
* feat(flow): add page and replay tiers to flow run
A run tries direct HTTP, then the same request from the page, then a
replay of the recorded commands, and starts the next run at the tier that
worked. Requests marked strippedAuth fall through on a 401 or 403 and end
with credential_not_sendable when every tier is refused. The file keeps
the recorded commands and redactedSteps again. Writes are sent once across
tiers and the replay stays on the flow's site.
* fix(flow): keep params out of GraphQL operations and expand placeholders once
A param fills the variables and other fields of a GraphQL body, never the
operation text, and an operation with a placeholder in its text counts as a
write. After values are filled, a request that classifies as a write but is
not in writes is refused before anything is sent, for params and for
references.
Params and references are expanded in one pass over the template, so a
response or param value that contains placeholder text is inserted as data
instead of being expanded again, which looped without end.
* fix(flow): refuse a read whose filled path names a state change
After params and references are filled, a GET whose path has a whole
logout, signout, unsubscribe, delete or remove segment and is not listed in
writes is refused before it is sent, the same as a request that becomes a
write by method or GraphQL operation.
* fix(flow): encode values per slot, gate every write, never resend a write on redirect
Placeholders are parsed once into parts and bound in a single pass, with
each value encoded for where it lands: a URL query or path segment, a form
body, or a JSON string. Text that was inserted is never read as a
placeholder again. At save, a typed value is found in the form its slot
writes it, so quotes, backslashes, newlines, ampersands and plus signs in a
JSON or form body become params instead of staying literal.
A flow with no output sends every request, and every write among them goes
through the write gate. An empty dependency no longer replaces a nonempty
output with an empty result. A write never follows a redirect, including a
307 or 308; the 3xx is its answer.
* fix(flow): replay swaps values in one pass, redacts credential headers and reports unknown writes
The replay reads each recorded command once, turns the recorded values into
placeholders and fills them with each value encoded for its slot, so a value
with `&` or `#` stays inside its query and two params can exchange values.
A flow recorded on an already open page replays its start URL with the run's
values instead of refusing the param.
Headers sent with a command, such as navigate with headers, are classified
like a request's: authorization, cookie, token and CSRF values are redacted
and the step is marked, so the commands are not replayed. A write the replay
may have sent with no captured answer ends the run as outcome_unknown.
* fix(flow): read a form by its shape and refuse values that break a raw body
A body shaped k=v&k=v is a form whatever its content type, so a param value
with & or = stays inside its field. For a header, a plain text body or a
multipart body, a value with a line break, or one that contains the
multipart boundary, is refused before anything is sent.
* fix(flow): keep path segments shared across requests literal when linking response values
A value found in an earlier response replaced a path segment such as /api when the response held the same word (gitRootDirectory = "api"). A segment present in the path of more than one recorded request is site structure, so it is no longer linked to a response.
* fix(flow): accept capture request ids for --output and list valid ids on error
Saved ids are renumbered within the saved range, while the ids a capture shows keep their step sequence. --output now accepts either form, and an unknown id lists the ids that are valid.
* fix(flow): drop per-request tracing and client-identity headers when saving
x-client-ip, x-forwarded-for, x-real-ip, forwarded, traceparent, tracestate, x-request-id, request-id, x-amzn-trace-id, sentry-trace, baggage, cf-connecting-ip and true-client-ip identify the machine or one request. Replay sends only the saved headers and reads none of these, so they are classified as dropped next to cookie and host.
* fix(flow): do not promote a page-query value that only the Referer carries
A start-URL query value counts as sent when any recorded entry, saved or not, contains it, so `?create=true` became a param although only the Referer of the saved requests held it. After the requests are templated, a page-query param used by no URL, body or other header is dropped and the Referer keeps its recorded value.
* fix(flow): decide structural values by source instead of how many paths share them
A response value is left literal when it is already a path segment of the request it came from or of an earlier one. Counting requests also stopped ids that two later paths use, such as a project id, from becoming params or references.
* style(flow): remove the empty line after a doc comment
* fix(flow): refuse an --output id that names two different requests
When a range starts after step 1, a capture id and a saved id can be the same string for different requests. The error names both meanings. The accepted id forms are documented.
* fix(flow): template the restored Referer against the params that remain
Restoring the raw Referer when a page-query param is dropped also removed the placeholders of params that are kept. The recorded Referer is now templated against the remaining params.
* fix(flow): report drift and signed requests, name dropped secret requests, link ids to their source
- A recorded list missing from the response is drifted; a present empty list stays ok. The main list path is saved and checked, including lists deeper than the shape signature.
- A 401 or 403 on a request carrying a per-request signature or timestamp reports request_signed; static or word-like values keep auth_expired with a hint naming the header.
- A request dropped for carrying a secret-field value is named by method and path with the secret redacted, or by host when the value cannot be located.
- Response values link to the latest supplying response that does not echo the value from its own path, preferring lists, so a param chosen from a list carries through detail and nested requests.
* fix(flow): keep the recorded list's items when only counts are missing
A response that omits a recorded count but still has its list is ok and
returns the items; it is empty only when the list itself is empty.
* fix(flow): reword capture guidance for the relaunch behavior and validate raw launch capture
The launch body's capture value is checked like the per-command setting, the
not-capturing message and --capture help describe the relaunch, and the
capture e2e asserts it.
* fix(flow): drop replay entries from a session capture that was already running
* fix(flow): fall through signed denials, scope drift per request, retry reads on transport errors
A signed or credentialed 401/403 on http or page now goes on to the replay.
A replay denial is auth_expired. A read goes on after a network error and after
a 5xx once drift was seen. A run that stops after a shape change is unverified.
* docs(flow): describe the tier fallthrough and stop rules
* fix(flow): drain pending events around a replay capture
* fix(flow): a write answered with a 5xx or 408 is not sent again
* fix(flow): keep the tier on a transport error and report a changed replay shape as drift
* fix(flow): keep the tier past skipped and transport attempts, say outcome_unknown once, and trust routed answers
A skipped tier is a property of the result, not of its message. The saved tier moves
only past tiers that failed for a reason about the site. A session route answer is
not a write that left the machine.
* fix(flow): a skipped tier is not drift for unverify or the failed outcome
* test(flow): the page tier without a tab on the site is skipped
* fix(flow): a failed in-page read is a transport error, not drift
* fix(flow): share route selection between the HTTP tier and browser interception
* fix(flow): a write the replay may have sent is answered from the capture or unknown, never drift
* fix(flow): the replay waits only on first-party requests, with a clock per command
* fix(flow): an in-page read that ends off the site is refused like an HTTP redirect
* fix(flow): a replay keeps response bodies when the session's HAR runs without content
* fix(flow): resolve replay URLs against the start URL before the host check
* docs(flow): name the three tiers in help, tool text and network docs
* fix(flow): an accepted write with a changed answer ends as write_applied, never drift
* fix(flow): only a 2xx JSON answer of another shape is write_applied; a redirect or page is outcome_unknown
* fix(flow): a replay over a content-none HAR drains before the mode change and leaves earlier entries without bodies
* fix(flow): the replay settles on its own command's requests and ends by the run deadline; flow run inherits the default timeout
* fix(flow): check the host part of wait globs; docs and skill reference for write_applied, outcome_unknown and the replay wait
* fix(flow): the run has one clock for every tier, running out of time is not drift, a challenge answering a sent write is unknown
* fix(flow): the tab read and a stalled body respect the run deadline
* fix(flow): a reference in a path finds its replayed answer
The replay looked up later requests with their references unfilled, so a
path like /items/{{@s1r1.id}} never matched its captured entry and the run
waited out its clock. Later requests are filled with the answers known so
far, and an unfilled path segment matches any segment.
* fix(flow): list a write saved in two steps for each saved request
The same POST URL and body recorded in separate steps was listed as a
write only once, so the later saved request had no entry in writes and the
flow failed to load. Deduplication now applies only to writes the replay
alone sends.
* fix(flow): the page tier never follows a redirect
A read fetched with redirects followed, so an off-site hop was already
sent by the time the final URL was checked. Every in-page request now
uses redirect: manual; a read answered with a redirect moves on to the
next tier as a skipped tier, and a write's 3xx stays its answer.
* fix(flow): only an answer from the site is drift
Drift unverifies the flow, but it was also produced for local failures:
a browser or capture that could not start, a body that could not be
read, a 407 from the proxy, and a skipped tier, which carried drift only
to reach the next tier. Those are now unavailable, transport or
unknown_outcome for a write, and next_tier treats a skipped tier on its
own.
* fix(flow): scrub the whole flow file before it is written
Redaction ran per channel (typed values, navigation headers), so a
channel nobody listed leaked, such as a token in a navigation's query.
One pass over every command, request and the start URL now runs when the
flow is built and again in write_flow: a known secret in any encoding and
the value of a credential query parameter become <redacted>, and a step
it touches is marked redacted so the replay never sends it.
* fix(flow): a run's result is never hidden by a flow file it could not save
Saving the flow after a run used ?, so a disk error replaced the stop
code, including write_applied and its warning not to repeat the write.
The run's result now comes first and a save error is added to it as
saveError. Tests also cover the replay-only write gate with --allow-write
all under a denying policy, a policy confirmation and --confirm-actions.
* chore(flow): drop a format! with no arguments
* docs(flow): a run a later tier answered can be ok and unverified
A lower tier can return the recorded shape after an earlier one saw it
change: the run is ok with data, but verified is false, drift names the
tier and step, and the flow is unverified.
* fix(flow): flow run reads --timeout, and every flow tool argument reaches its command
flow run never parsed --timeout, so the MCP tool's forwarded value was
dropped. Both flow save and flow run now share one parser, the run tool's
schema declares timeout, and a test checks that every argument the flow
MCP tools declare survives flow_args and the CLI parser into the daemon
command.
* chore(flow): scrub every item without fold
* fix(flow): scrub credential params from every URL in the flow file
The credential-param scrub only looked at a command's url, so the token
from a navigation survived in the Referer header of the requests it
caused. Every URL in a command, a request URL and a header value is now
scrubbed, changing only the credential values so a template such as
{{@s1r1.token}} stays as written.
* fix(flow): no credential the scrub removed is sent as <redacted>
A start URL with a stripped credential made the replay open it without
one, writes kept credential params in their URLs, and a request whose URL
lost its token answered a 401 as auth_expired. The replay now refuses a
start URL without its credential, writes are scrubbed like requests, and
a request whose credential was removed gets credential_not_sendable.
Pagination cursors such as pageToken are no longer treated as
credentials, and auth, key, apikey, sig, signature, jwt and sid are.
saveError is always in the run data and in the text output.
* fix(flow): scrub credentials where the browser went, keep what the run sends
Scrubbing every saved request URL by parameter name replaced publishable
keys such as Algolia's with <redacted>, which the HTTP and page tiers then
sent, and marked the step redacted so the replay could not recover.
Credential parameters are now redacted only in commands, the start URL,
the Referer and Origin headers and writes; a saved request's URL keeps
what the run must send, and only known secrets are removed from it. A
credential-named param keeps no recorded value, the save report's gaps
pass the scrub, tokens in a #k=v fragment are caught, a name without a
value is left alone, and bare key, sig and sid no longer count as
credentials.
* fix(flow): scrub credentials in hash-router fragments and values with a slash
|
||
|
|
d44f6989bf |
docs(flow): mark saved flows experimental in the skill and MCP tools (#2444)
The CLI help and the network docs already call saved flows experimental, but the agent-facing surfaces did not. A run can fail on a page that changed or answers differently each time, so the core skill, the commands reference and the four flow MCP tools now say so and point back to the UI. |
||
|
|
f01a743a66 |
fix(flow): wait for in-flight requests on save and finalize redirect hops (#2433)
* fix(flow): wait for in-flight requests before saving flow save cloned the recorded entries right after one drain, so a request the last step had started but not finished had no response body and was dropped. The save now drains until requests tagged to the saved steps finish, bounded by the command timeout. * fix(flow): do not wait on third-party or streaming requests when saving The save waits only for unfinished requests that could become flow requests: first-party, not telemetry, XHR/Fetch with a JSON (or not yet known) type, or a document. Event streams and other non-JSON responses never delay it. * fix(flow): bound the save wait by redirects, the client read timeout, and report what is left out A redirect hop never finishes, so it no longer counts as an unfinished request. flow_save carries the default timeout like the wait commands, so the client read timeout follows it. Requests still loading at the deadline are reported as gaps. * fix(har): finalize a redirect hop when the redirect is followed Network.requestWillBeSent with redirectResponse now fills the previous entry for that request id (status, headers, mime type) and stamps its finish time, so the hop no longer stays incomplete in har stop and network requests. The flow save wait no longer needs a special case for it. * fix(test): box the command future at execute_command The debug-build command future is large enough to overflow a test thread's stack when a test awaits it directly; it now lives on the heap for every caller. * fix(flow): redact and scope still-loading gaps, finalize redirect hops in network requests * fix(flow): keep secret and login gaps, detect undecodable secrets, return the final redirect hop A step with a loading request only loses its generic no-request reason, not the secret-drop or login-wall gaps. Secret detection decodes percent escapes that are not valid UTF-8 instead of skipping the comparison. network request returns the last hop that shares a request id. The har_compute_timings doc comment is back on its function. * fix(flow): decode every escape leniently when looking for a secret The form-encoded comparison and the dropped-request label use the lossless decode too, and an undecodable escape is kept exactly as written, so a lowercase escape in a secret still matches. * fix(flow): flow save does not wait on a long poll, and names requests still loading when it fails A first-party JSON request whose headers came and whose body never ended kept every save waiting for the whole command timeout. A response with headers that gets no bytes for the network idle window is no longer waited on and is reported as still loading. A save that failed for want of requests returned before the still-loading gaps were added, so the error hid the request that explained it. The error now names them. * fix(flow): flow save waits on a request with no answer only if the last step started it A request a long-poll server holds without writing headers kept every save waiting for the whole command timeout. A request with no response that an earlier step started has outlived the steps after it, so it is reported as still loading instead of waited on. One the last step started is still awaited up to the command timeout. * fix(flow): flow save reads --timeout The save path never read the flag, so a request the last step left hanging still blocked for the default timeout. The CLI and the MCP tool now pass it. |
||
|
|
d86ca4bb37 |
Upgrade to TypeScript 7
- Move docs, dashboard and sandbox to TypeScript 7 (dashboard on Next 16.3) - Replace ESLint with oxlint in docs - Use esbuild and @babel/parser instead of the TypeScript API in docs tests and scripts |
||
|
|
b86ca559c3 |
fix(batch): reject misplaced global options in command parsing (#2386)
* fix(batch): reject global flags inside command items Keep batch-wide options out of item positionals and point callers to the outer invocation. Co-Authored-By: PerryLink <255665900+PerryLink@users.noreply.github.com> * test(batch): cover global flag errors across CLI and MCP Document batch-wide flags and verify quoted items, stdin, and MCP preserve parse errors and bail behavior. * fix(batch): reject item help and version controls * fix(batch): validate option positions without rejecting payload text Check misplaced globals in navigation, screenshot, and snapshot parsing while preserving literal input values. * style(batch): format flag checks and assertions * fix(mcp): sync batch tool description * test(batch): use status reads for batch parity checks * fix(batch): reject global flags in vitals batch items (#2400) A batch item such as vitals --init-script probe.js navigated to probe.js. Reject global flags there like open does, and add a parser test covering each batch item check plus literal fill and type text. Co-authored-by: roboeve[bot] <311457182+roboeve[bot]@users.noreply.github.com> --------- Co-authored-by: PerryLink <255665900+PerryLink@users.noreply.github.com> Co-authored-by: roboeve[bot] <311457182+roboeve[bot]@users.noreply.github.com> |
||
|
|
c1b8c3bd6a |
fix(chrome): discover macOS user applications (#2388)
* fix(chrome): discover macOS user applications Search ~/Applications after /Applications so user-installed browsers launch automatically. Co-Authored-By: ch3rry <1595486059h@gmail.com> * test(chrome): cover user application discovery Check filesystem selection and preserve system-browser priority. Document the macOS search locations in CLI, MCP, and browser references. * fix(mcp): sync browser discovery description --------- Co-authored-by: ch3rry <1595486059h@gmail.com> |
||
|
|
794de3c037 |
Type-check the Eve package with tsc-ts
- Run the Eve package's typecheck with tsc-ts, which reports the same diagnostics as tsc - Keep the official tsc as typecheck:tsc and run it in CI while tsc-ts is new |
||
|
|
9455ebbd0d |
feat(flow): record a browser task once and replay its requests (#2236)
* feat(flow): add saved flow recording, storage and HTTP replay
Records the commands of a task with the first-party JSON requests each
one fired, stores them without credentials, and replays the output
request directly with a response shape check.
* feat(flow): add flow start, save, run and list commands
The daemon tags HAR entries with the running command and announces
saved flows for a site after navigation. A failed run marks the flow
unverified only when the site changed, not when params were rejected.
* feat(flow): print flow results and the saved flows hint
The hint shows recorded param values, the recorded page and item field
names so an agent can call a flow without guessing its inputs.
* feat(mcp): expose saved flows as core tools
Adds flow list, run, start and save to the core profile, carries the
saved flows hint in navigation results, and formats flow results as
text.
* docs(skills): document saved flows in the core skill
Covers when to prefer flow run over driving the page, how to record a
flow, and points derive-client at it for tasks the agent repeats.
* fix(network): let mocked cross-origin responses pass CORS
A route with --body answered cross-origin requests without CORS headers and
with no content type, so the page saw a network error and HAR capture dropped
the body. Mocked responses now echo the request origin, answer preflights,
and label JSON bodies as application/json.
* feat(flow): fall back to the page and to a command replay
A run now tries direct HTTP, then the same request from the page, then a
replay of the recorded commands, and starts the next run at the tier that
worked. Every tier checks the recorded response shape; a change marks the
flow unverified and is reported as drift. Session routes answer the HTTP
tier too, so mocks reach every tier. A write the site accepted is never
sent again by a lower tier, and a replay refuses params it cannot apply.
* feat(flow): find params and references when saving
A value a request sent that came from an item of an earlier list becomes a
param with its source; a value copied from a single field is filled from that
response on each run, and the requests it depends on run first. A login form
on the page at save time names the last gap. The saved flows hint says where
each detected param comes from.
* feat(webmcp): list saved flows next to declared tools
webmcp list now shows the saved flows for the page's site under an
observed section, so declared and observed tools can be compared.
* fix(flow): keep each GraphQL request and treat queries as reads
Requests were deduplicated by method and URL, so a GraphQL app kept only its
first POST. The body is now part of the key, and a POST that only carries
GraphQL queries no longer needs --allow-write; mutations still do.
* feat(flow): record a flow on an already open page
flow start keeps the tab's URL, so a task that begins on a logged-in page
can be saved without an open command, and a replay starts from that page.
* fix(flow): replay recorded commands on live apps
Snapshot refs are gone by the next run, so commands that used one are saved
as the role and name it pointed at. Replayed commands wait for an element
the page is still rendering, and a captured request matches a recorded one
by its body or GraphQL operation, since one endpoint serves every query.
* fix(flow): send writes the way a browser does
The HTTP tier now sends Origin on writes, taken from the recorded referer,
since sites check it before accepting one. A write the site did not accept
may carry stale page tokens, so it moves on to the page and the replay
tiers instead of stopping.
* fix(flow): chain only generated values from read responses
Short words and locale codes repeat across a site's responses, so they
turned into long chains of references, some through POST requests. A
reference now needs a value that looks generated, comes only from a read,
and replaces whole tokens, never part of a longer word.
* feat(flow): take params from the start URL and find nested lists
A query value of the recorded page URL that the API requests also sent,
such as ?keyword=, becomes a param without --param. --where, --fields and
the hint's item fields now use the heaviest list anywhere in the response,
since GraphQL nests it under data.
* feat(flow): read JSON embedded in server-rendered pages
Sites that render on the server send no API request for their main data, but
often embed it in the HTML as a JSON script, a Next.js __NEXT_DATA__ block or
a window.x = {...} assignment. flow save now keeps those blocks from
first-party documents as requests that fetch the page and read the same
block back, so they get params, shape checks and --fields like any API
response. The page's own path segments and blocks of the same document are
no longer taken as params or references.
* fix(flow): treat a response without its lists as no results
Many APIs drop an empty list and its counts instead of sending []. That
used to read as a changed shape and mark the flow unverified. When only
lists and counts are missing and no new list appeared, the run now returns
no items and leaves the verified state as it was.
* docs: document saved flows
Adds a saved flows section to the network page and two lines to the README
command list: recording, params, the run tiers, discovery and storage.
* feat(flow): describe saved flows in the shape of WebMCP tools
Saved flows now carry a description and an inputSchema built from their
params, returned by flow list and shown by webmcp list after the tools the
page declares. When a page declares WebMCP tools, they come before the saved
flows hint, and the hint suggests them first. flow run still runs flows;
webmcp invoke only calls the page's own tools.
* fix(flow): close the gaps found in security review
- Every resolved request URL, and every redirect the HTTP tier follows, must
pass the session's current domain allowlist.
- A command replay sends every write the recording caused, so it needs
--allow-write whenever the flow recorded one, not only for writes the
output depends on.
- Param values are substituted into parsed JSON strings, so quotes and
backslashes keep request bodies and replayed commands valid.
- Suggested commands shell-quote recorded param values, and inferred param
names keep only letters, digits and underscores.
- Values typed into password-like fields are not stored, auth and
credential commands are not recorded, and flow files and directories are
created owner-only.
- webmcp list prints each saved flow's inputs as name, type and recorded
value.
* fix(flow): keep typed secrets out of saved commands and requests
type stores its input in text, which the redaction skipped. Both fields are
now redacted, and the typed value is kept in memory during the recording so
that flow save drops any captured request whose URL, body or headers carry
it, and reports why.
* feat(flow): capture flows with --capture flow and save several per session
Recording moves from `flow start` to a launch flag. Every recorded command
returns recorded.seq, failed commands stay in the recording as ok:false, and
`flow steps` lists them. `flow save <name>` takes --from/--to/--description,
no longer resets the recorder, and close reports unsaved steps. The hint hides
only flows saved in the same session, and har stop is refused while capture
owns the recorder. Flow files are version 2; older files must be saved again.
* fix(flow): keep runs on the flow's own site
A flow records the base domain of its start URL as allowedHosts. A run
rejects any request, redirect or recorded navigation outside it, whatever
--allowed-domains says, and the in-page tier only runs on a tab that is
already on that site. Flow origins are validated as hostnames before they
become directory names, and IP hosts no longer collapse to a shared base.
* feat(flow): list writes at save and confirm each one before a run
flow save records writes[{id, method, url, kind}] with kind explicit or
suspected. A GET is suspected when a click fired it and no output depends
on it, or when its path has a whole logout, signout, unsubscribe, delete or
remove segment. --allow-write takes all or write ids, in the CLI and in
flow_run. A write it does not cover asks for confirmation as policy action
flow_write:<id>, so --action-policy and --confirm-actions reach the http
and page tiers; the command replay checks the writes no request covers.
* feat(flow): redact secret fields by what the page says and keep typed values as params
Recording reads type, autocomplete and the field's name, id, label and
placeholder from the element behind a fill or type, so an unlabeled
one-time-code or cc-* input is redacted. Any other typed value becomes an
auto-named param with source typed, stored as a placeholder in the step, or
the --param name when one has the same value. Params record their source
(typed, query, response) and the file lists redactedSteps.
* feat(flow): stop a run on auth, rate limit and challenge responses
A 401 or 403 returns auth_expired, a 429 returns rate_limited with
retryAfter when the site sent one, and a bot challenge page returns blocked.
Each stops the chain instead of falling to a lower tier, carries a
machine-readable code and leaves the flow's verified state alone.
* fix(flow): ask only about the writes a run sends
A run now gates the writes among the requests its output needs, not every
write the recording caused; the command replay checks the rest. Adds a
Chrome e2e against a local fixture: sign-in cookie, CSRF write through a
response value, GraphQL query, a GET side effect, a cross-domain redirect,
and two saves in one session. commands.mdx stays as it was because the docs
route fixtures freeze it.
* fix(flow): close review findings on credentials, redirects, replay and typed values
- A 401 or 403 on a request recorded with stripped credential headers falls
through to the page and replay tiers; auth_expired is reported when every
way is refused.
- A blocked redirect returns its 3xx, a write with a 2xx or 3xx answer is
accepted, a write with no answer returns outcome_unknown and is never
resent, and the in-page write does not follow redirects.
- The replay runs only plain interactions, checks every URL in a recorded
command, and stops when the tab leaves the flow's site.
- keyboard type and inserttext read the focused element; typed params keep
no example.
- base_domain uses the public suffix list; a flow whose origin directory does
not match its start URL must be saved again.
- A save of an earlier range no longer moves the save marker back, and
challenge pages are recognized only in HTML.
* fix(flow): keep vault and key-by-key passwords out of flows and close URL and retry gaps
- Replay URL checks read every string the way the URL parser does, so tabs,
newlines and leading control characters cannot hide a host, and URL keys
are checked whatever the value looks like.
- The in-page fetch sends a write once; a thrown fetch is outcome_unknown.
- A command that is not recorded tags no requests to the previous step, and
the password auth login fills is registered as a secret.
- Keys pressed in a secret field are gathered into one secret, redacted from
the steps, and requests carrying it are dropped at save.
* fix(flow): keep modifier chords and clipboard text out of secret handling gaps
A key joins a secret only when it is bare or Shift plus a key, so Control+a
no longer corrupts the buffer. A paste chord or clipboard paste into a
secret field redacts the step and drops the requests it tagged, and
clipboard write text is redacted and registered as a secret.
* fix(flow): register a pasted password once the paste has finished
After a paste chord or clipboard paste into a secret field, the focused
field's value is read and registered as a secret in full, with any typed
prefix, and later keys extend it. A request a later step sends with it is
no longer saved. When the value cannot be read, the requests tagged to the
paste step are still dropped.
* fix(flow): replay once per run, recognize encoded secrets and link writes to earlier responses
- The command replay runs at most once per run; every request that falls
back to it reads its answer from that replay, and it is skipped when
another tier already sent a write it would repeat.
- Requests carrying a secret are recognized in form-encoded, percent-encoded
and JSON-escaped forms.
- A write's request takes a value from an earlier response and depends on it,
so a rotating token is read fresh at each run.
* fix(flow): never resend a replayed write, keep rejected writes eligible, match replays by query
- Before any tier sends a write, the run checks whether it was already sent.
A write the replay sent is answered from the replay's capture, and stops
with outcome_unknown when the capture has no answer.
- Only a 2xx or 3xx answer, or an unknown outcome, counts as a sent write; a
4xx rejection leaves the replay available.
- Replayed requests match by method, host, path, recorded query and body,
ignoring query parameters the recording never had; a missing or ambiguous
match fails for that request. JSON bodies compare by value.
* fix(flow): read the flow once per run and carry it through confirmation
A flow_run loads its file once. Policy, the write gate and the run use that
copy, and a confirmation keeps it so the confirmed run executes the file
that was checked, not one read again from disk. The write gate is one
function used before the run and inside it.
* refactor(flow): one secret-field predicate and one header classifier
FieldTraits::looks_secret replaces four copies of the type, autocomplete and
name check. HeaderClass names the four ways a recorded header is treated, in
place of three separate lists.
* refactor(flow): type the saved flow and move to a module directory
Flow, Step, Request, Write, Param and Tier are serde types with unknown
fields rejected, so the file schema is checked on load and a run no longer
walks serde_json::Value. Request.write replaces the writes lookups in the
run path. The file format is version 1; nothing older has shipped, so the
old-version path is gone. Fixtures build flows through serde_json.
* refactor(flow): one write ledger and next_tier decide when a request is sent again
WriteLedger records which writes a run sent, and next_tier picks the next
tier from the attempts so far. They replace the accepted, retry, completed
and already-sent checks that were spread over the run loop, the replay and
its guard. A write that was sent is only read back from the replay's
capture.
* refactor(flow): a Sender per tier behind ports, and the run loop in flow
HttpSender, PageSender and ReplaySender each live in their own file and
implement Sender. The browser session is reached through the Host and
CommandRunner ports, which actions.rs implements in one wiring struct, so
the replay no longer lives in actions.rs. run_requests is the run loop; an
in-memory Senders drives it in tests without a browser or a network. The
navigation hint moves into flow.
* refactor(flow): the recorder keeps its fields and offers begin, tag, end, steps and save
actions.rs no longer reads or writes recorder internals. It enters and exits
a command, begins and ends it with what the page said, and asks for the
steps or a save. Range resolution, marking a save and the session's saved
list live behind save. Step stabilizing moves into the recorder.
* refactor(flow): one host policy, one failure constructor, no pass-throughs
HostPolicy is the only place a URL is checked against a flow's hosts; the
recording's first-party test, the run, the redirect policy, the replay and
the page tier all use it. TierResult::fail with Failure::drift, unavailable
and unknown_outcome replaces five result builders. replay_match,
validate_name's wrapper, write_policy_action and flow_for_command are gone;
a Write names its own policy action.
* refactor(flow): drop the click-fired write guess and the --from keywords
A GET is a suspected write only when its path has a whole logout, signout,
unsubscribe, delete or remove segment; guessing from the command that fired
it needed the output's dependencies and the request's resource type. --from
takes a step number, and without it a save starts at the last navigation
after the previous save. Help, MCP, the tool catalog, docs and the skill
reference follow.
* test(flow): table-driven cases, behavior names, and key tests through the save
Hosts, check_response, GraphQL and secret-field cases are tables. The tests
named after review comments carry the behavior they check. Key-buffer,
paste and clipboard tests ask whether a request carrying the secret
survives a save instead of reading the recorder's secrets.
* fix(flow): a request is a write only when the writes list says so
Request.write was a second copy of what Flow.writes records, and it
defaulted to false, so a file could disagree with itself and a write could
skip the ledger. The run reads the writes list alone.
* refactor(flow): build the flow from its types and put write queries on Flow
build_flow and the reference linker create Step, Request and Param directly
instead of json! values that were parsed back into the same types.
run_writes, replay_only_writes and AllowWrite::check replace four free
functions that walked the writes list.
* refactor(flow): three tier functions over one Browser port
http::send, page::send and replay::send replace the Sender trait and its
three structs. Host and CommandRunner become one Browser trait. The Senders
seam and its in-memory adapter stay.
* refactor(flow): Stop and RunOutcome name why a run ended, and a flow is read once
Stop replaces the four string codes that were matched in send, memory and
actions. RunOutcome builds the stopped, drift and failed messages with unit
tests, so handle_flow_run no longer formats them. The run's host check is
the per-request one after references are filled. A flow_run that cannot read
its flow fails at the first read, before policy, so policy and the run never
see two different files.
* fix(flow): tag a request by when it started and wait on conditions in the e2e
A request belongs to the command that was running when it started, using
the request's own start time against each command's begin time, so a late
event read during the next command keeps its step. The replay's wait no
longer stalls for its full timeout: a request body that still has references
to fill is matched on the request alone. The e2e wait for the server to see
a click's request and for the browser to finish reading it, instead of
sleeping.
* fix(flow): check every request's host before the first one is sent
A flow with a foreign host in a later request sent the earlier requests
before rejecting it. The run now checks every request URL against the
flow's hosts up front, on the template with references unfilled, and again
per request once they are filled.
* fix(flow): a flow that sends a write it does not list fails to load
A request that changes state and is missing from the writes list would run
with no gate and no once-only guarantee, so an edited file could drop it.
Loading now refuses the file and asks to save it again.
* fix(flow): the replay lets each command's requests finish before the next
A command that depends on what the previous one fetched, such as a click
that sends a token the page stored from the last response, raced the
response and sent the wrong body.
* refactor(flow): ship flow run over http only
Flow run sends the saved requests over direct HTTP. The in-page fetch and
command replay tiers, the cross-tier write ledger, recorded commands in the
file and the tier preference are removed; a 401 or 403 is auth_expired.
Every HTTP guard stays: host policy, write gate, single load, shape
verification, redaction and owner-only files. Docs, help, skill reference
and the MCP catalog describe the HTTP path only.
* fix(flow): report a stripped credential instead of an expired session
A request recorded with an authorization, token or CSRF header is marked
strippedAuth at save. A 401 or 403 for it stops the run with
credential_not_sendable, since signing in again cannot supply what the
file does not keep. Other 401 and 403 responses stay auth_expired.
The file no longer lists redactedSteps: it holds no steps to point to.
* fix(flow): keep params out of GraphQL operations and expand placeholders once
A param fills the variables and other fields of a GraphQL body, never the
operation text, and an operation with a placeholder in its text counts as a
write. After values are filled, a request that classifies as a write but is
not in writes is refused before anything is sent, for params and for
references.
Params and references are expanded in one pass over the template, so a
response or param value that contains placeholder text is inserted as data
instead of being expanded again, which looped without end.
* fix(flow): refuse a read whose filled path names a state change
After params and references are filled, a GET whose path has a whole
logout, signout, unsubscribe, delete or remove segment and is not listed in
writes is refused before it is sent, the same as a request that becomes a
write by method or GraphQL operation.
* fix(flow): encode values per slot, gate every write, never resend a write on redirect
Placeholders are parsed once into parts and bound in a single pass, with
each value encoded for where it lands: a URL query or path segment, a form
body, or a JSON string. Text that was inserted is never read as a
placeholder again. At save, a typed value is found in the form its slot
writes it, so quotes, backslashes, newlines, ampersands and plus signs in a
JSON or form body become params instead of staying literal.
A flow with no output sends every request, and every write among them goes
through the write gate. An empty dependency no longer replaces a nonempty
output with an empty result. A write never follows a redirect, including a
307 or 308; the 3xx is its answer.
* fix(flow): read a form by its shape and refuse values that break a raw body
A body shaped k=v&k=v is a form whatever its content type, so a param value
with & or = stays inside its field. For a header, a plain text body or a
multipart body, a value with a line break, or one that contains the
multipart boundary, is refused before anything is sent.
* fix(flow): keep path segments shared across requests literal when linking response values
A value found in an earlier response replaced a path segment such as /api when the response held the same word (gitRootDirectory = "api"). A segment present in the path of more than one recorded request is site structure, so it is no longer linked to a response.
* fix(flow): accept capture request ids for --output and list valid ids on error
Saved ids are renumbered within the saved range, while the ids a capture shows keep their step sequence. --output now accepts either form, and an unknown id lists the ids that are valid.
* fix(flow): drop per-request tracing and client-identity headers when saving
x-client-ip, x-forwarded-for, x-real-ip, forwarded, traceparent, tracestate, x-request-id, request-id, x-amzn-trace-id, sentry-trace, baggage, cf-connecting-ip and true-client-ip identify the machine or one request. Replay sends only the saved headers and reads none of these, so they are classified as dropped next to cookie and host.
* fix(flow): do not promote a page-query value that only the Referer carries
A start-URL query value counts as sent when any recorded entry, saved or not, contains it, so `?create=true` became a param although only the Referer of the saved requests held it. After the requests are templated, a page-query param used by no URL, body or other header is dropped and the Referer keeps its recorded value.
* fix(flow): decide structural values by source instead of how many paths share them
A response value is left literal when it is already a path segment of the request it came from or of an earlier one. Counting requests also stopped ids that two later paths use, such as a project id, from becoming params or references.
* style(flow): remove the empty line after a doc comment
* fix(flow): refuse an --output id that names two different requests
When a range starts after step 1, a capture id and a saved id can be the same string for different requests. The error names both meanings. The accepted id forms are documented.
* fix(flow): template the restored Referer against the params that remain
Restoring the raw Referer when a page-query param is dropped also removed the placeholders of params that are kept. The recorded Referer is now templated against the remaining params.
* fix(flow): report drift and signed requests, name dropped secret requests, link ids to their source
- A recorded list missing from the response is drifted; a present empty list stays ok. The main list path is saved and checked, including lists deeper than the shape signature.
- A 401 or 403 on a request carrying a per-request signature or timestamp reports request_signed; static or word-like values keep auth_expired with a hint naming the header.
- A request dropped for carrying a secret-field value is named by method and path with the secret redacted, or by host when the value cannot be located.
- Response values link to the latest supplying response that does not echo the value from its own path, preferring lists, so a param chosen from a list carries through detail and nested requests.
* fix(flow): keep the recorded list's items when only counts are missing
A response that omits a recorded count but still has its list is ok and
returns the items; it is empty only when the list itself is empty.
* fix(flow): reword capture guidance for the relaunch behavior and validate raw launch capture
The launch body's capture value is checked like the per-command setting, the
not-capturing message and --capture help describe the relaunch, and the
capture e2e asserts it.
|
||
|
|
b585af5b2c |
fix(daemon): decide session reuse and relaunch in one place (#2396)
* feat(cli): add session settings option table and patch One table lists every session setting with its flag, effect class (launch or live), persistence class, secrecy and the rule that reads it from the resolved flags. Patch::from_flags builds the set of values an invocation set explicitly, with a wire encoding. Characterization tests check the patch carries every value DaemonOptions and the launch envelope helpers send. Nothing calls the module yet; parse_proxy moves into it unchanged. * refactor(daemon): read session settings through typed views DaemonState holds a Running value seeded once from AGENT_BROWSER_* at startup. The state initializers, auto launch, launch fallbacks, init script and enable lists, CDP headers, the extensions file and the policy and confirm-actions loaders read it through views instead of the environment. Behavior is unchanged: the seed applies each variable's existing parsing rules. The idle timeout resolution moves into the module so one definition serves the daemon and the view. * refactor(daemon): read idle timeout, provider and plugin launch defaults from settings The idle timeout, the provider named in policy checks and the headed, engine, user agent and color scheme defaults handed to plugin providers come from Running instead of the environment. Plugin providers keep their looser headed rule, where any value except 0, false, no or empty counts, behind a dedicated view. * refactor(cli): limit dead code allowances to the patch and option table The running views and the env seed are used by the daemon, so the compiler checks them again. Only the patch, the option table and the settings error keep an allowance until the CLI sends the patch. * test(daemon): pin separator-only allowlist and policy seeding A separator-only allowed domains value seeds an empty list and the resulting filter allows every host. The daemon state test now loads a real action policy file and the plugin provider headed rule has its own tests. * fix(cli): redact secrets from session settings debug output Patch and Running print through a manual Debug that hides secret rows and strips credentials embedded in the proxy URL. * feat(cli): plan a settings patch against the running settings Running::plan compares a patch with the running values and returns the changes, whether the browser has to relaunch, and the settings that follow. A key the patch does not name is left alone, an equal value is free, and setting one connection target displaces the others. Add --relaunch to force a relaunch with no change. * feat(daemon): apply the settings patch carried by each command The daemon plans the patch on every command. Timeouts, policy, confirm actions and auto-dialog apply in place, and launch settings close the browser so the next launch uses them. handle_launch_inner becomes plan plus launch from the session settings, with no per-field env fallbacks. launch_hash is replaced by a launch identity reported in lifecycle only. Every change is reported in lifecycle.settings.changes with secrets redacted, and relaunchedBrowser is set whenever the browser was relaunched. The idle timeout is read on each pass of the shutdown loop so it can change while the daemon runs. * feat(cli): send the settings patch on every command The CLI attaches Patch::from_flags to each command it sends and prints one stderr line per change the daemon reports. The separate launch envelopes, should_send_local_launch_config and attach_obscura_proxy_bypass are gone, and bare open no longer sends a second launch. ensure_daemon restarts the daemon only for --debug. Timeouts, policy, confirm actions and auto-dialog apply in place, so the ignored-timeout warning is removed. * docs: describe settings changes on a running session Cover the per-command patch, the one-line notice for each change, and --relaunch. * fix(cli): keep CDP headers and URL secrets with their endpoint CDP headers are dropped when the CDP endpoint changes unless the same patch sets them. CDP URLs lose userinfo, query and fragment wherever a value is reported. Setting a storage state replaces an inherited profile or extensions, and the reverse, so an inherited setting cannot wedge the launch. A null on the wire no longer clears a security setting. * fix(daemon): commit launch settings only after the launch succeeds A failed launch puts the previous launch settings back, and the failed response still reports what changed. Commands that never launch a browser apply live settings only and leave launch settings pending, so they no longer close the browser or claim a relaunch. * fix(cli): send no launch settings with get cdp-url, print one relaunch line get cdp-url, alone or in a batch, carries live settings only. A settings notice replaces the generic relaunch note. Add relaunch to the MCP common arguments and refresh the tool catalog. * docs: say which settings changes are reported and when * fix(cli): ignore local-only settings for external sessions, send no-xvfb off A session attached over CDP, auto-connect or a provider ignores settings that only describe a browser agent-browser launches itself, so an ambient value cannot relaunch it or start a new cloud session. The ignored requests are reported with effect ignored. AGENT_BROWSER_NO_XVFB set to an off value is now sent. * fix(daemon): apply launch settings at the launch, after the policy gates Live settings apply before the gates. Launch settings are planned there and applied only where the launch happens, so a denied or unconfirmed command leaves the browser running and changes nothing. A failed launch keeps the allowed domains it installed, except when the launch was rejected because they cannot be enforced for it. Settings-driven relaunches invalidate the ref map, an iOS relaunch keeps its device, and the new daemon tests hold the env lock. * fix(cli): send --relaunch once for a batch * docs: describe ignored, pending and kept settings and the env seed * fix(daemon): gate a launch by the provider its settings name A launch that names no connection target connects as the session settings say, so its policy actions now follow them: a settings provider is gated as a browser provider, an external target no longer adds the launch-mutator actions, and the plugin does not run when policy denies or asks to confirm. * fix(daemon): requested CDP headers replace the cached ones Changing or clearing --cdp-headers on a session at the same endpoint updated the settings but reconnected with the headers cached for that endpoint. The cache now follows the plan, and a failed launch puts it back. * fix(daemon): fail the launch when a named --state file cannot be loaded A launch that only inherits the state file still continues without it, as before; one whose command named the file fails, closes the browser and puts the previous launch settings back. * fix(daemon): keep the stored default timeout in step with a live change A command that omits --default-timeout sizes its wait from the daemon's stored config, which kept the value the daemon started with. * docs: list --relaunch after the existing global flags * fix(daemon): a provider named by settings decides the launch policy Policy for a launch now prefers the target the envelope names, then the external target the settings name, then the browser the session is attached to, so switching an attached session to a provider is gated by that provider's plugin and not the old attachment. * fix(daemon): a bare open that carries --state loads it strictly handle_launch_inner looked only at the launch envelope for the state file, so a bare open, which carries it in its settings, launched without state when the file could not be loaded. * fix(daemon): an external session carries no local launch settings Switching to CDP, auto-connect or a provider drops the inherited state file, profile, extensions, proxy and its credentials, executable path and args, and the external launch paths read no state file and install no proxy credentials. A launch that changes where the session connects no longer takes its policy from the old attachment, and an empty provider names no browser, so resetting to a local launch gates the launch mutators. * refactor(daemon): use the launch's storage state binding only once * docs: say inherited local settings are dropped for external sessions * chore: drop a test-generated state file * chore: ignore the parity test state file * fix(daemon): one rule for what names a browser, and a failed switch keeps local settings A blank or zero connection target names no browser in the settings views, the attached target, the launch envelope and the launch policy, so a direct launch with an empty cdpUrl is gated as the local launch it runs. Values dropped because a switch to an external browser failed are put back with the rest of the launch settings. An inherited engine no longer labels a CDP or auto-connect browser. * fix(cli): keep --relaunch for the first batch command that can launch A browserless batch item such as `read` consumed `--relaunch`, so the next command reused the browser. The CLI now asks the daemon's own predicate, `command_launches_browser`, before marking the relaunch as sent. * test(webdriver): change a setting Safari sessions track in the replacement test Headed is local-only, so a Safari session ignores it and the second launch reused the session instead of replacing it. * fix(cli): carry --relaunch until the daemon reports it applied A batch item denied by policy or parked for confirmation never reaches the launch, yet it marked the relaunch as sent, so the next command reused the browser. The batch now reads `lifecycle.settings.forcedRelaunch` from each response instead of predicting it. * fix(cli): count a relaunch reported by an early error or a confirm replay The WebDriver-unsupported and dialog-blocked errors now carry the settings outcome of the launch that ran before them, and the batch reads the replayed command's report nested in a `confirm` response. Without both, the next batch item relaunched a second time. * fix(daemon): confirmation replay runs under the current security settings A command parked under one action policy was replayed with its saved settings, so `confirm` could put back the policy, confirm actions or allowed domains the operator had since tightened. The replay drops security settings, and any change to them drops the pending confirmation. * fix(daemon): re-arm the idle timer from the timeout in effect now The shutdown loop re-armed the timer with the timeout read at the top of the pass, so a live change waited out the previous value, and enabling a timeout that started disabled never armed it. Every re-arm now reads the current timeout and the last activity. * docs: list relaunch as a shared MCP argument and note it applies once per batch * test: cover the CA trust, attached target and CDP headers a failed launch puts back * fix(daemon): keep a parked command's allowed domains in its confirmation replay Allowed domains apply only at the launch, so stripping them from the replay launched a confirmed command without the containment it was parked with. The replay now drops only the action policy and confirm actions; a change to the session's allowed domains already drops the pending confirmation. * docs: every MCP tool accepts relaunch; open and tab_new list it * test(docs): record the relaunch edit to the MCP shared arguments |
||
|
|
6682da310c |
fix: decode percent-encoded proxy credentials (#2389)
* fix: decode proxy URL credentials before authentication Decode the username and password after splitting proxy URL userinfo so authentication receives the intended characters. Co-Authored-By: Alexandr Kazmin <316548136+alkaz-nodemaven@users.noreply.github.com> * test: cover encoded proxy credentials and document URL handling * docs: clarify proxy credential decoding fallback * fix: sync proxy credential guidance in MCP catalog --------- Co-authored-by: Alexandr Kazmin <316548136+alkaz-nodemaven@users.noreply.github.com> |
||
|
|
79207af2f4 |
fix(download): reject local file moves from attached Chrome (#2392)
* fix(download): reject local file moves from attached Chrome An attached CDP endpoint controlled the download GUID, which download then renamed from the local filesystem, so absolute or ../ GUIDs moved arbitrary files. Reject download over --cdp, --auto-connect, or a provider before clicking, matching wait --download. For launched browsers, require the GUID to be a single filename and the file to resolve inside the download directory. Reproduced with a GUID-rewriting proxy in front of real Chrome; the fix rejects it and leaves the file in place. * test(download): cover the GUID path check and note the attach restriction in MCP (#2399) Move the GUID filename check into guid_download_path and unit test it with hostile GUIDs. Update the MCP download and wait_for_download descriptions and mcp-tools.json to say they are rejected over --cdp, --auto-connect, or a provider. Co-authored-by: roboeve[bot] <311457182+roboeve[bot]@users.noreply.github.com> --------- Co-authored-by: roboeve[bot] <311457182+roboeve[bot]@users.noreply.github.com> |
||
|
|
49cd179c69 |
fix: preserve fractional mouse and element coordinates (#2393)
* fix: preserve fractional mouse and element coordinates Parse supplied mouse values as finite numbers and ignore unused box dimensions when resolving element refs. Co-Authored-By: Osraka <98612432+Osraka@users.noreply.github.com> Co-Authored-By: Mohammad Maraqa <154911866+Mohammad-Maraqa@users.noreply.github.com> * fix: align mouse help and MCP with fractional inputs --------- Co-authored-by: Osraka <98612432+Osraka@users.noreply.github.com> Co-authored-by: Mohammad Maraqa <154911866+Mohammad-Maraqa@users.noreply.github.com> |
||
|
|
071b68f554 |
fix(cli): reject unknown commands and cookie operations (#2383)
* fix(cli): reject unknown commands when help is requested Keep successful help for known commands and reject unknown cookie operations instead of treating them as reads. Co-Authored-By: holny <12433219+holny@users.noreply.github.com> * test(cli): cover unknown-command failures across CLI and MCP Check real exit codes and MCP batch errors, document rejected commands, and use the supported init-script launch flag in examples. * style(tests): format the MCP error assertion * fix(mcp): sync the batch tool catalog description * test(docs): track corrected init-script examples * docs: clarify the init-script removal section --------- Co-authored-by: holny <12433219+holny@users.noreply.github.com> |
||
|
|
2e12e30627 |
feat(mcp): list only the shared arguments each tool uses (#2311)
* feat(mcp): advertise only per-call shared arguments in tool schemas Every tool schema repeated 14 shared argument definitions, about 83% of the default tools/list payload. Schemas now list session, restore, allowedDomains, extraArgs, and timeoutMs with short descriptions. The daemon, restore-check, and CA arguments are still accepted by every tool and are described once in the initialize instructions. * feat(mcp): scope advertised shared arguments to the tools that use them session stays on every tool. restore goes on launch tools, allowedDomains and extraArgs on launch tools and read, and timeoutMs on tools that navigate, wait, or run scripts. Every tool still accepts all 14 shared arguments. Unknown-argument errors suggest a close match and list the shared arguments, so a typo of an unlisted one can be fixed. * fix(mcp): accept unlisted shared arguments in tool schemas Validating MCP clients rejected shared arguments such as namespace or timeoutMs once they left the per-tool schema. Drop additionalProperties: false and rely on reject_unknown_arguments for typos. Advertise timeoutMs on wait_for_url, wait_for_function, wait_for_download and tab_new. |
||
|
|
de99b17824 | chore: prepare v0.41.2 release (#2395) | ||
|
|
2d1271baef |
feat(skills): load one reference with skills get --ref (#2310)
* feat(skills): load one reference with skills get --ref skills get returned SKILL.md alone or every reference with --full. --ref <ref> returns only the named reference or template, matched by path, file name, or stem, and the MCP skills_get tool takes the same values in refs. The core guide's routing table now loads references this way instead of reading the skill directory. * test(evals): check that agents load one reference with skills get --ref reference-routing gives the model the core guide as already loaded and asks for tasks that need one reference. It passes when the model loads that reference with --ref, and fails on --full or reading the skill directory. A control case checks that a task core covers loads no reference. |
||
|
|
43c78a7da2 |
docs: simplify the README and repo docs (#2302)
* docs: move README-only content to the docs site and fix the source build steps The source build used a removed pnpm build script and a ./bin/agent-browser path that does not exist. Timeout and page_wedged behavior and the Lambda example now live on the debugging and installation pages. The proxy CA config test reads the configuration page instead of the README. * docs: simplify the README and repo docs The README repeated most of agent-browser.dev and had drifted from it. It now covers install, the quick start loop, how it works, agent setup, and a command groups table that links to the docs. The benchmarks README states that phase 1 now installs a Rust release. |
||
|
|
5868f7c050 |
fix: validate session names before use (#2272)
* fix: validate session names before execution Co-Authored-By: Vishnu Jayavel <vishnuj81093@gmail.com> Co-Authored-By: Dwin Gharibi <dwin.gharibi@email.kntu.ac.ir> * docs: document session name rules * style: format session validation regression test * fix: validate sessions only for session commands * fix(mcp): return config errors without exiting Keep the exiting CLI wrapper and use fallible flag parsing for MCP. Cover selected configs removed or corrupted after initialization, and keep config fixtures aligned with explicit trust. --------- Co-authored-by: Vishnu Jayavel <vishnuj81093@gmail.com> Co-authored-by: Dwin Gharibi <dwin.gharibi@email.kntu.ac.ir> |
||
|
|
0b123cb2b2 |
fix(install): check macOS before Chrome download (#2270)
* fix(install): reject unsupported macOS before Chrome download Stop before the Chrome for Testing metadata request when macOS is older than 13 or the system version cannot be read. Co-Authored-By: holny <12433219+holny@users.noreply.github.com> * docs(install): explain macOS install requirements Explain how the installer handles older or undetectable macOS versions. Keep help, MCP catalog, and installation guidance aligned. --------- Co-authored-by: holny <12433219+holny@users.noreply.github.com> |
||
|
|
5c2b128e9f |
fix(wait): parse selector state flags (#2274)
* fix(wait): parse selector state flags Keep global auth state parsing while forwarding wait-local state to the selector command. Co-Authored-By: Mat Silverstein <4837632+silverstein@users.noreply.github.com> * fix(mcp): support selector wait states Expose the existing selector state choices and forward the selected state through the CLI parser. * fix(mcp): retain numeric selector validation Keep selector waits aligned with the existing integer wait guard. * fix(wait): reject state on non-selector waits Report the supported wait modes accurately and keep MCP guidance consistent. * test(mcp): expect rejected integer wait selectors Keep the MCP boundary test aligned with the selector error wording. * docs(wait): explain selector state options Document selector states and their relationship to global auth state and other wait modes. * fix(mcp): allow selector wait state * fix: report invalid selector wait states clearly --------- Co-authored-by: Mat Silverstein <4837632+silverstein@users.noreply.github.com> |
||
|
|
b482ba65f6 |
fix: reject extra operands in storage commands (#2252)
* fix: reject extra operands in shorthand storage reads Preserve bare keys while reporting mistakenly supplied operations and arguments. Co-Authored-By: Dwin Gharibi <20875684+dwin-gharibi@users.noreply.github.com> * test: preserve storage key reads across CLI and MCP * test: keep storage coverage focused on the regression * fix: validate operand counts for all storage operations --------- Co-authored-by: Dwin Gharibi <20875684+dwin-gharibi@users.noreply.github.com> |
||
|
|
426100c210 |
fix(skills): find home skills in standalone installations (#2277)
* fix(skills): embed core skill for standalone binaries Standalone and Cargo-installed binaries need a usable core skill without a checked-out package directory. Co-Authored-By: holny <12433219+holny@users.noreply.github.com> * docs(skills): explain bundled skill availability Describe which skills are available in npm, Cargo, and standalone installations. * docs(mcp): sync skill tool descriptions Keep the generated sandbox catalog aligned with the current skills MCP help. * fix(skills): isolate temporary skill fallback Use a fresh private directory when the user cache cannot hold embedded skills. * style(skills): format private fallback helper Apply rustfmt's import order and line wrapping. * fix(skills): use the home directory when no package root exists Read manually installed skills from the home directory while preserving explicit-directory and package precedence. Remove embedded skill copies and temporary extraction. * fix(skills): ignore unrelated ancestor skill directories --------- Co-authored-by: holny <12433219+holny@users.noreply.github.com> |
||
|
|
b612020e28 |
fix(tab): reject labels reserved for tab IDs (#2276)
* fix(tab): reject labels reserved for tab IDs Use the tab-reference parser when assigning labels so every accepted label resolves to its tab. Declare the identifier syntax and reserved forms in the MCP label schema. Co-Authored-By: Dwin Gharibi <20875684+dwin-gharibi@users.noreply.github.com> Co-Authored-By: Terry <186405119+tlq5l@users.noreply.github.com> * test(tab): cover reserved labels and document naming rules Verify that rejected labels leave tabs and IDs unchanged, and publish the naming rules in help, docs, skills, and the MCP catalog. * fix(tab): preserve active state when a label is rejected --------- Co-authored-by: Dwin Gharibi <20875684+dwin-gharibi@users.noreply.github.com> Co-authored-by: Terry <186405119+tlq5l@users.noreply.github.com> |
||
|
|
82172010cc |
fix(cli): scroll at the current pointer (#2275)
* fix(cli): dispatch wheel input at the tracked pointer Route wheel events through the shared mouse-event builder so a preceding mouse move controls the dispatch position. Keep explicit protocol coordinates and scroll deltas intact, and add a real Chrome regression fixture. Co-Authored-By: David Gaynor <david@aheadhealth.com> * docs(mouse): describe wheel pointer behavior Document that wheel input starts at the tracked pointer and add the move-then-wheel recipe across CLI help, README, docs, MCP description, and the core command reference. * chore(mcp): sync the mouse wheel description Regenerate the shipped MCP catalog from the updated wheel tool description. * fix(cli): keep raw mouse position in sync Track successful raw mouse input so later wheel events use the current position. Cover nested scrolling and explicit coordinates. * fix(mouse): preserve pointer after rejected wheel events --------- Co-authored-by: David Gaynor <david@aheadhealth.com> |
||
|
|
17d83c714e |
fix(eval): preserve unserializable JavaScript values (#2273)
* fix(eval): preserve CDP special values Keep internal evaluation on its existing JSON value contract while exposing raw CDP results to direct eval. Co-Authored-By: Dwin Gharibi <20875684+dwin-gharibi@users.noreply.github.com> * fix(eval): expose CDP tokens in CLI and MCP Print and document special results across CLI and MCP, with real Chrome coverage. * docs(eval): scope special-value output to top-level Document that eval reports CDP special values only when they are the top-level result. * chore(mcp): sync eval tool description --------- Co-authored-by: Dwin Gharibi <20875684+dwin-gharibi@users.noreply.github.com> |
||
|
|
0f9ddf3bef |
fix(cli): print React tree in plain output (#2266)
* fix(cli): print React tree in plain output Show the daemon's preformatted component tree in plain CLI output. Keep structured output intact and explain empty tree results. Co-Authored-By: holny <12433219+holny@users.noreply.github.com> * docs(react): document plain tree output Explain what plain and structured React tree results contain and what an empty tree means. --------- Co-authored-by: holny <12433219+holny@users.noreply.github.com> |
||
|
|
c7b7726918 |
fix(snapshot): retain visible text in compact snapshots (#2265)
* fix(snapshot): retain status text in compact output Keep named content when compact snapshots include noninteractive elements. Co-Authored-By: Junpei Zhang <199601925+pei711@users.noreply.github.com> * test(snapshot): cover compact text and document MCP filtering * fix(snapshot): keep only direct ancestors in compact output --------- Co-authored-by: Junpei Zhang <199601925+pei711@users.noreply.github.com> |
||
|
|
9d6b6fa023 |
fix(install): allow root dependency installs (#2264)
* fix(install): support root dependency installs Run Linux package managers directly when install --with-deps runs as root. Co-Authored-By: Gaurav Yadav <160158213+MeGaurav4@users.noreply.github.com> * docs(install): explain root dependency handling Keep the CLI, MCP catalog, and installation guidance in sync with root package-manager execution. --------- Co-authored-by: Gaurav Yadav <160158213+MeGaurav4@users.noreply.github.com> |
||
|
|
46bff14046 |
fix(snapshot): include presentational iframe controls (#2262)
* fix(snapshot): include presentational iframe contents Normalize Chrome presentational iframe roles before assigning refs and visiting child documents. Co-Authored-By: Hunter Hammonds <132389258+hunterassembly@users.noreply.github.com> * test(snapshot): cover refs inside presentational frames * fix(snapshot): recover stale presentational iframe refs --------- Co-authored-by: Hunter Hammonds <132389258+hunterassembly@users.noreply.github.com> |
||
|
|
71ee8cedc3 |
fix(cdp): query live browser URLs without launching Chrome (#2260)
* fix(daemon): avoid launching Chrome for CDP URL queries Return the existing browser endpoint or report that no browser is running. Co-Authored-By: holny <12433219+holny@users.noreply.github.com> * test(daemon): cover CDP metadata lookup without Chrome Exercise the dispatcher without a browser and document the behavior across CLI, MCP, and command references. * fix(cli): keep metadata queries from applying launch settings Ignore implicit local launch configuration for CDP URL queries and preserve the original command examples. * fix(cdp): query only live browser connections Skip provider startup for CDP URL queries and reject stale connections without restarting Chrome. * fix(cdp): skip browser launches for metadata batches --------- Co-authored-by: holny <12433219+holny@users.noreply.github.com> |
||
|
|
77274a72c6 |
fix(set): reject non-finite viewport and geolocation values (#2257)
* fix(set): reject non-finite viewport and geolocation values Co-Authored-By: Dwin Gharibi <20875684+dwin-gharibi@users.noreply.github.com> * test(set): cover finite arguments and describe their contract --------- Co-authored-by: Dwin Gharibi <20875684+dwin-gharibi@users.noreply.github.com> |
||
|
|
573de3c837 |
fix: report failed load-state waits (#2251)
* fix: report failed load-state waits Propagate the lifecycle error when the inner wait times out. Co-Authored-By: Jeremy Mack <305901+mutewinter@users.noreply.github.com> * test: cover network-idle timeout on a busy page Document load-state timeout errors across the CLI and MCP. * fix: wait out the full load-state timeout budget The load-state wait used the browser manager's built-in 25s default, so `wait --load` and `waitforloadstate` with a larger `--timeout`, or with a larger `AGENT_BROWSER_DEFAULT_TIMEOUT`, failed at 25s instead of waiting. Pass the command timeout into `wait_for_lifecycle_external` and use it for lifecycle events, network idle, and the already-reached probe, so the caller owns the deadline. The probe runs inside the same budget so a wedged renderer cannot stretch the wait. Timeout errors now name the state and the budget that expired, and that detail survives the AI-friendly error mapping instead of becoming generic element advice. Unit tests cover the caller budget for lifecycle and network-idle waits, and the busy-page e2e test asserts that a 30s budget is actually used. * fix: share one deadline across the load-state probe and wait The ready-state probe and the lifecycle wait each consumed a full timeout, so a slow probe that answered "not reached" let a load-state command run past its configured deadline. Compute one deadline in `wait_for_lifecycle_external` and give the probe and the wait only the time that remains. `wait_for_lifecycle` now returns a structured failure, so callers keep reporting the configured budget instead of the remaining slice. A regression test drives a 500ms probe inside an 800ms budget and asserts the wait still ends near the budget. * test: bound the network-idle caller timeout --------- Co-authored-by: Jeremy Mack <305901+mutewinter@users.noreply.github.com> |
||
|
|
7ed6afd8b0 |
Prepare v0.41.1 release (#2282)
- Bump synchronized package and Rust versions to 0.41.1. - Add release notes for the latest fixes and documentation updates. |
||
|
|
9fb80655fa |
fix(plugins): redact protocol values on sensitive paths (#2255)
* fix(plugins): redact protocol values on sensitive paths Co-Authored-By: darshan rajagoli <195645367+darshanrajagoli@users.noreply.github.com> * test(plugins): cover protocol diagnostic redaction and document it * style(plugins): format the protocol diagnostic --------- Co-authored-by: darshan rajagoli <195645367+darshanrajagoli@users.noreply.github.com> |