1460 Commits

Author SHA1 Message Date
791c460546 Fix browser capabilities and persistent MCP session handling
Some checks failed
PR checks / PR / Policy (push) Has been cancelled
PR checks / PR / Core (push) Has been cancelled
PR checks / PR / Performance (push) Has been cancelled
2026-10-14 17:16:40 +01:00
SGavrl
9414bf5b19 Merge pull request #1252 from h4ckf0r0day/fix/web-storage-persistence
fix(browser): preserve Web Storage across navigation and target switching
2026-10-13 21:16:51 +02:00
SGavrl
f495cee844 perf(storage): index entries and reuse checked document origins 2026-10-13 19:11:30 +00:00
SGavrl
97e0dad9bc Merge current main into storage repair 2026-10-13 18:10:29 +00:00
SGavrl
61beaea6d5 Merge pull request #1253 from h4ckf0r0day/fix/ci-v8-cache-recovery
ci: recover incomplete V8 native-library caches
2026-10-13 20:05:47 +02:00
SGavrl
123dbc6f52 Merge corrected V8 cache recovery into storage repair 2026-10-12 22:58:25 +00:00
SGavrl
a8814c4064 ci: discard incomplete archives and reject directory cache paths 2026-10-12 22:58:23 +00:00
SGavrl
00404326a8 Merge V8 cache recovery into storage repair 2026-10-12 22:57:16 +00:00
SGavrl
3aba28e3d1 ci: recover incomplete V8 native-library caches 2026-10-12 22:56:17 +00:00
SGavrl
677f6d2fbb fix(storage): retry profile writes and preserve browser strings 2026-10-12 22:40:18 +00:00
SGavrl
a253ccbcc6 Merge commit '8edfe480133b383f70e17f9d4ea55e3592cdfd24' into repair/1223-web-storage 2026-10-12 21:51:42 +00:00
SGavrl
8edfe48013 Merge pull request #1221 from yvv4git/fix/rod-cdp-compat
fix(cdp): accept go-rod's objectId arguments, getOuterHTML and Page.close
2026-10-12 23:49:58 +02:00
SGavrl
361f15d68d fix(cdp): cancel pending loads and honor beforeunload 2026-10-12 21:45:29 +00:00
SGavrl
694826fb81 Merge pull request #1199 from pederbe/contrib/1049-module-network-records
fix(browser): record ES module network responses and bodies
2026-10-12 23:45:17 +02:00
SGavrl
f9d08b4077 Merge remote-tracking branch 'upstream/main' into repair/1221-rod-cdp 2026-10-11 16:10:35 +00:00
SGavrl
73358fdb40 fix(browser): preserve response bodies during runtime suspension 2026-10-11 15:37:17 +00:00
SGavrl
550c7a64b9 Merge remote-tracking branch 'upstream/main' into repair/1199-module-records 2026-10-11 15:05:46 +00:00
SGavrl
2bda71a557 Merge pull request #1209 from flolep2607/fix/serve-heap-fragmentation
fix(cdp): return freed heap to the OS while serve workers stay busy
2026-10-10 21:02:38 +02:00
SGavrl
183362f23e fix(cdp): claim busy heap trims atomically 2026-10-10 18:38:47 +00:00
SGavrl
d8a410c532 Merge remote-tracking branch 'upstream/main' into pr-1209 2026-10-10 18:04:28 +00:00
SGavrl
17fe750e62 Merge pull request #1234 from Yi-111-a/fix/plain-text-document-for-non-html
fix(browser): build a plain-text document for non-HTML text responses
2026-10-10 20:02:14 +02:00
SGavrl
cb6960e009 Merge pull request #1235 from seamile/fix/mcp-font-directory
fix(mcp): load explicit font directories before startup
2026-10-10 19:39:11 +02:00
SGavrl
335f92989d fix(browser): preserve plain-text document metadata and newlines 2026-10-10 17:12:38 +00:00
SGavrl
c2dae89f64 Merge branch 'main' into fix/mcp-font-directory 2026-10-10 18:52:49 +02:00
SGavrl
2a77855093 Merge remote-tracking branch 'upstream/main' into pr-1209 2026-10-10 16:46:30 +00:00
SGavrl
e32b64fc23 Merge remote-tracking branch 'upstream/main' into pr-1234 2026-10-10 16:45:00 +00:00
SGavrl
73299d5f65 Merge pull request #1127 from vvinayakkk/worker-navigation-wait-until
feat(worker): accept per-navigation readiness modes
2026-10-10 18:36:58 +02:00
SGavrl
f3f9b8ec6e Merge pull request #1233 from Yi-111-a/fix/filelist-not-defined
fix(js): define the FileList global so boot references stop crashing
2026-10-10 17:41:45 +02:00
SGavrl
3ffcb7ce11 Merge pull request #1117 from ice-zeus/fix/fetch-pause-patterns-upstream
fix: pause only requests matching Fetch.enable patterns
2026-10-10 17:41:07 +02:00
SGavrl
816a60aed1 Merge branch 'main' into worker-navigation-wait-until 2026-10-10 17:30:14 +02:00
SGavrl
459a5af123 Merge remote-tracking branch 'upstream/main' into pr-1233 2026-10-10 15:28:59 +00:00
SGavrl
5a71fc40ec Merge remote-tracking branch 'upstream/main' into pr-1117 2026-10-10 15:28:47 +00:00
SGavrl
41cdbf19fc Merge pull request #1238 from h4ckf0r0day/fix/mcp-shutdown-cookie-save
fix(mcp): use existing cookie persistence on shutdown
2026-10-10 17:25:27 +02:00
SGavrl
dc07e2ece0 test(cdp): retain network error state in navigation fixture 2026-10-10 15:04:46 +00:00
SGavrl
e1105aeda4 Merge branch 'fix/mcp-shutdown-cookie-save' into pr-1117 2026-10-10 14:29:58 +00:00
SGavrl
61aa8fbe19 fix(cdp): match interception wildcards without false negatives 2026-10-10 14:29:58 +00:00
SGavrl
f46fc5979a Merge branch 'fix/mcp-shutdown-cookie-save' into pr-1233 2026-10-10 14:15:23 +00:00
SGavrl
716826c1e5 fix(js): preserve FileList iteration on current main 2026-10-10 14:15:23 +00:00
SGavrl
604d30b671 fix(mcp): use existing cookie persistence on shutdown 2026-10-10 14:13:53 +00:00
SGavrl
8111657c47 Merge pull request #1227 from Suydev/mr/agent-ergonomics
feat(mcp): await a promise in browser_evaluate, add browser_wait_for_function
2026-10-10 15:44:00 +02:00
SGavrl
a33fbe5890 Merge pull request #1130 from vvinayakkk/stealth-script-network-events
test(stealth): cover scripted network events and body retention
2026-10-10 15:20:58 +02:00
SGavrl
f81fad2966 Merge pull request #1225 from ginkel/fix/page-set-bypass-csp
fix(cdp): acknowledge Page.setBypassCSP
2026-10-10 15:07:01 +02:00
Seamile
5171717e71 fix(mcp): accept explicit font directories before startup 2026-10-10 12:05:56 +08:00
Yi-111-a
22eb6b4238 fix(browser): build a plain-text document for non-HTML text responses
A text/plain or text/markdown response was parsed as HTML, so every
<word> in the body became an element and its text was dropped from
textContent, --dump text and --dump markdown. document.contentType also
reported text/html for these documents because it was inferred from the
URL.

Plain-text responses now build the document Chrome builds: a body
holding one <pre> with the whole text. document.contentType reports the
main resource's own MIME type, and _isXMLDocument no longer treats a
plain-text document as XML.
2026-10-10 09:00:38 +08:00
Yi-111-a
86f0ec0633 fix(js): define the FileList global so boot references stop crashing
typeof FileList was undefined, so apps that touch it while booting die
with a ReferenceError. input.files is now a real FileList instance.
Fixes #1232.
2026-10-10 07:04:39 +08:00
opencode
f661c2e0f6 fix(js): keep Web Storage across navigation and persist it, and back IndexedDB
Web Storage was a plain object inside the V8 realm, and `Page::init_js` builds a
new realm on every navigation, so every entry was dropped by the next document.
localStorage now lives on the BrowserContext and sessionStorage on the Page, both
in Rust keyed by origin, with per-origin and total quotas.

Under `--storage-dir`, localStorage is written per origin after a document's
scripts run and on shutdown, and read back when a context is created. Only
origins that changed since the last successful write are touched, a clear or a
last-key removal unlinks the file instead of letting the next load resurrect it,
and a failed write leaves the store dirty so it is retried. sessionStorage stays
in memory: it is per tab, like a real browser, but it now survives navigation
and CDP target switching within the process.

`obscura mcp` never passed `--storage-dir` to its BrowserContext, so that path
persisted nothing, cookies included. It reads the profile from
OBSCURA_STORAGE_DIR, set by the CLI from the global flag, and flushes on exit.

IndexedDB was a shim that handed every object store its own Map and never fired
onupgradeneeded, so a schema-created database was unreachable and the first read
threw. Records and the schema live in an origin-keyed store on the context, and
the shim implements the spec shape: versionchange transactions, real
objectStoreNames, NotFoundError, asynchronous request settlement, transactions
that complete on a macrotask so chained requests work, key paths, generators,
indexes and cursors. Values round-trip through JSON.

Fixes #678.
2026-10-09 15:44:25 +05:30
opencode
7500e6ddf4 feat(mcp): let browser_evaluate await a promise, and add browser_wait_for_function
`browser_evaluate` is synchronous, so an agent that wrote an async IIFE or
`await fetch(...)` got `{}` back, with no way to tell that from an empty object.
The expression is now evaluated once and, if the result is a thenable, its
settlement is polled until it resolves, fails, or the timeout runs out. The poll
drives the page's own task queue, because a promise that settles in a network
callback never gets a chance otherwise, which is what made the first version of
this look like a hang. A page with no realm falls back to the old synchronous
reading, so the tool can only ever return more than before.

`browser_wait_for_function` polls a JavaScript predicate with a timeout and a
poll interval. Agents otherwise express "wait until the app finished loading" as
a loop of evaluate plus a sleep, which costs a round trip per iteration and is
where flaky automation comes from.

`expression_wrapper` is separate from the polling loop so its shape can be
asserted in a test: a wrapper that dereferences its slot before creating it turns
every synchronous expression into "did not settle", which is exactly what the
first version did.
2026-10-09 13:47:08 +05:30
SGavrl
1f8eb76437 Merge pull request #1219 from flolep2607/fix/network-error-cause
net: include the error's cause chain in network error messages
2026-10-08 21:51:15 +02:00
SGavrl
7634f464c0 Merge pull request #955 from pederbe/learn/934-word-spacing
fix(render): apply word spacing to text layout and paint
2026-10-08 19:53:46 +02:00
SGavrl
714b180c8a Merge pull request #1033 from lisa0314/fix/937-inline-transform-incremental
fix(render): ignore transforms on ordinary inline boxes
2026-10-08 19:53:03 +02:00