Repository navigation
Added
- Snapshot tool (
snapshot): compact, LLM-friendly list of interactive elements and headings with stable
refs (e12). Every element-based tool acceptsref:e12as a selector. - Waiting tools:
wait_for_selector(visible/hidden/attached/detached),wait_for_text,
wait_for_network_idle. - Page tools:
scroll,select_option,upload_file,set_viewport. - Tab tools:
list_tabs,new_tab,switch_tab,close_tab. Tools act on the session's current tab. - XPath (
xpath:prefix or//) accepted by every element-based tool, not onlyclick/get_text. LOG_FILE(path orstderr) to choose the log destination.TRUST_PROXYto opt in toX-Forwarded-Forfor rate limiting and audit logs.ALLOWED_HOSTS/BLOCKED_HOSTSnavigation policy (exact hosts,*.suffix, CIDR).UPLOAD_ALLOWED_DIRSrestricting whereupload_filemay read from.fill_formfield optionclear,get_htmloptionmax_length,get_textoptionwait,
navigateoptionswait_for_idle/timeout,set_cookieoptionexpires.rake test:unit(no Chrome) andrake test:integration.- Unit specs for
BrowserManager,SessionManagerconcurrency, the CLI runner, logging and the rate limiter.
Changed
- Tool DSL: tools declare
tool_name,descriptionandparams; the JSON schema is generated,
session_idis injected automatically and params reach#performwith symbol keys and defaults applied. BrowserManagerdetects a dead Chrome process and the session restarts it on the next call.- Cookies are read through Ferrum's cookie accessors (structured
domain,path,expires, flags). - Screenshot resizing is optional: without libvips the image is returned untouched.
LOG_LEVELdefaults toinfoeverywhere (Configuration used to default todebug).- Ruby: Gemfile requires
>= 3.2, Docker images build on Ruby 3.3. test/debug scripts removed,scripts/moved toexamples/.- RuboCop metric exclusions narrowed to the two heuristic tools (
accept_cookies,solve_captcha).
Fixed
- Session
browser_optionsnever reached Ferrum (private method behind arespond_to?check) and keys
written with a leading--produced----flag. Keys are now normalized. user_profile_idwas resolved but never mapped touser-data-dir.StdioServerduplicated the MCP transport read loop.- Shutdown called the deprecated
stop_browser, never stopped the cleanup thread and exited from
inside a signal trap. Signals now interrupt the main loop, which runs the shutdown sequence. - Logs were written inside the installed gem directory.
- The CLI required
bundler/setup, breakinggem install ferrum-mcp && ferrum-mcp start. close_sessionstopped Chrome while holding the global lock, blocking every other session; a closed
session could be resurrected by a concurrent call.- Rate limiter trusted
X-Forwarded-Forunconditionally (trivially bypassable). drag_and_dropreported wrong coordinates for elements found through XPath.get_textreturned text with surrounding newlines and indentation (now collapsed,raw: trueto opt out).- BotBrowser Docker image failed to build: the pinned upstream package had been removed (404). The latest
release is now resolved at build time (BOTBROWSER_VERSIONbuild arg to pin one). snapshotlisted unlabeled radio buttons of one group with the same name; theirvalueis now shown.
Removed
- Deprecated
Server#start_browser/Server#stop_browser. wait_for_selector/wait_for_textwere listed in the 1.0.0 notes before they existed; they now do.
CI
- Docker images (standard and BotBrowser) are built on every pull request, and the standard image is
smoke-tested over HTTP and stdio with a real browser session. - The release workflow fails when the release tag does not match
FerrumMCP::VERSION.
Upgrade notes
- Custom tools must implement
#perform(params)(params arrive with symbol keys) and declare their interface
withtool_name/description/paraminstead of overriding.input_schema. browser_optionskeys are written without leading dashes ("window-size"); dashed keys are still accepted.get_textnow collapses whitespace; passraw: truefor the previous behaviour.
Full changelog: v1.0.0...v1.1.0