Adrià Arrufat
41b81c8b05
mcp: use io poll for stdin and integrate message loop
...
Replaces blocking stdin reads with `std.io.poll` to allow macrotasks to
run. Removes the stdout mutex as I/O is now serialized.
2026-03-02 10:04:23 +09:00
Adrià Arrufat
42b5e32473
mcp: modernize I/O processing and reuse message buffer
2026-03-01 22:35:28 +09:00
Adrià Arrufat
e9c36fd6f8
mcp: use declarative static definitions for tools and resources
2026-03-01 21:56:48 +09:00
Adrià Arrufat
952dfbef36
mcp: use acquire/release ordering for server running flag
2026-03-01 21:39:38 +09:00
Adrià Arrufat
254984b600
mcp: use dynamic allocation for error messages in tools
2026-03-01 21:36:21 +09:00
Adrià Arrufat
8cbc58d257
mcp: unify error reporting and use named error codes
2026-03-01 21:29:59 +09:00
Adrià Arrufat
e6cc3e8c34
mcp: refactor tools handling
2026-03-01 21:18:28 +09:00
Karl Seguin
516335e0ed
Merge pull request #1686 from lightpanda-io/load_event_iframe_fix
...
Fix load event for page with no external scripts but with iframes
2026-03-01 20:15:36 +08:00
Adrià Arrufat
01798ed7f8
mcp: use sentinel-terminated strings for tool params
2026-03-01 20:58:00 +09:00
Adrià Arrufat
fcad67a854
mcp: pre-initialize tools and resources on server startup
2026-03-01 20:44:11 +09:00
Adrià Arrufat
e359ffead0
mcp: propagate errors in tool schema parsing
2026-03-01 20:39:40 +09:00
Adrià Arrufat
eb09041859
mcp: resolve absolute URLs for links tool
2026-03-01 20:35:13 +09:00
Adrià Arrufat
b3d52c966d
mcp: handle errors during resource and tool streaming
2026-03-01 20:23:23 +09:00
Karl Seguin
84a949e7c7
Fix load event for page with no external scripts but with iframes
...
Previously the "load" event happened when all external scripts were done. In the
case that there was no external script, the "load" event would fire immediately
after parsing.
With iframes, it now waits for external script AND iframes to complete but the
no-external-script code was never updated to consider iframes and would thus
fire load events prematurely.
2026-03-01 18:19:40 +08:00
Pierre Tachoire
f37962d3de
Merge pull request #1683 from lightpanda-io/dump_mode_wpt
...
Add a "wpt" dump mode
2026-03-01 11:00:29 +01:00
Pierre Tachoire
511e957d4b
Merge pull request #1682 from lightpanda-io/iframe_document_open_fix
...
Noop when document.open is called during iframe parsing
2026-03-01 10:57:42 +01:00
Pierre Tachoire
71df03b729
Merge pull request #1681 from lightpanda-io/xhr_url_escape_mime_parse_lax
...
Escape XHR URL, Lax MIME parameter parsing
2026-03-01 10:55:50 +01:00
Pierre Tachoire
839052f4b8
Merge pull request #1680 from lightpanda-io/cdp_json_url
...
Correctly JSON encode URL
2026-03-01 10:55:05 +01:00
Adrià Arrufat
947e672d18
mcp: stream resource and tool content to JSON output
2026-02-28 23:04:22 +09:00
Adrià Arrufat
96942960a9
mcp: reuse arena allocator for message processing
2026-02-28 22:38:16 +09:00
Adrià Arrufat
8b0118e2c8
mcp: update logging scope to use mcp instead of app
2026-02-28 22:30:02 +09:00
Adrià Arrufat
5f9a7a5381
mcp: ignore unknown json fields and improve error reporting
2026-02-28 22:18:37 +09:00
Adrià Arrufat
6897d72c3e
mcp: simplify request processing to single-threaded
2026-02-28 21:26:51 +09:00
Adrià Arrufat
aae9a505e0
mcp: promot Server.zig to file struct
2026-02-28 21:02:49 +09:00
Karl Seguin
45196e022b
Add a "wpt" dump mode
...
Adds a not-documented "wpt" mode to --dump which outputs a formatted
report.cases.
This is meant to make working on a single WPT test case easier, particularly
with some coding tool. Claude recommended this output for its own use.
Instead of telling claude to start the browser in serve mode, then run the
wptrunner, and merge the two outputs (and then stop the server), you can do:
zig build run -- fetch --dump wpt "http://localhost:8000/dom/nodes/CharacterData-appendChild.html "
(you still need the wpt server up)
2026-02-28 19:08:58 +08:00
Karl Seguin
b9e4c44d63
Noop when document.open is called during iframe parsing
...
I'm not sure what the correct behavior is, but this fixes a WPT crash:
/html/browsers/sandboxing/sandbox-inherited-from-required-csp.html
The issue is iframe-specific as, with an iframe, you document.write can be
called during parsing when there's no document._current_script (because it's
being executed from the parent).
2026-02-28 18:05:03 +08:00
Karl Seguin
0a9e5b66ee
Merge pull request #1679 from lightpanda-io/escape_data_uri
...
e2e-test / zig build release (push) Has been cancelled
zig-test / zig test using v8 in debug mode (push) Has been cancelled
zig-test / zig test (push) Has been cancelled
e2e-test / demo-scripts (push) Has been cancelled
e2e-test / cdp-and-hyperfine-bench (push) Has been cancelled
e2e-test / perf-fmt (push) Has been cancelled
e2e-test / browser fetch (push) Has been cancelled
zig-test / perf-fmt (push) Has been cancelled
nightly build / build-linux-x86_64 (push) Has been cancelled
nightly build / build-linux-aarch64 (push) Has been cancelled
nightly build / build-macos-aarch64 (push) Has been cancelled
nightly build / build-macos-x86_64 (push) Has been cancelled
wpt / zig build release (push) Has been cancelled
wpt / build wpt runner (push) Has been cancelled
wpt / web platform tests json output (push) Has been cancelled
wpt / perf-fmt (push) Has been cancelled
e2e-integration-test / zig build release (push) Has been cancelled
e2e-integration-test / demo-integration-scripts (push) Has been cancelled
Escape DataURIs
2026-02-28 14:45:12 +08:00
Karl Seguin
8b99e82743
Merge pull request #1678 from lightpanda-io/improve_atob
...
Re-implement forgiving base64 decode without intermediate allocation
2026-02-28 14:45:01 +08:00
Karl Seguin
059fb85e22
Escape XHR URL, Lax MIME parameter parsing
...
Follow up to https://github.com/lightpanda-io/browser/pull/1646 applies the
same change to XHR URLs.
Following specs, ignores unknown/invalid parameters of the Content-Type when
parsing the MIME (rather than rejecting the entire header).
2026-02-28 14:42:43 +08:00
Karl Seguin
8997df861a
Merge pull request #1677 from lightpanda-io/mime_charset_default
...
Initialize charset to safe default
2026-02-28 14:30:14 +08:00
Karl Seguin
e65667963f
Correctly JSON encode URL
...
I think this code comes from some serialization tweak from when everything was
an std.Uri and by switch to [:0]const u8 everywhere not only was the tweak
unecessary, it was also wrong - possibly resulting in the generation of
invalid JSON.
2026-02-28 12:48:45 +08:00
Karl Seguin
3d51667fc8
Escape DataURIs
...
Support forgiving base64 decoder
Support non-encoded DataURIs
2026-02-28 12:24:26 +08:00
Karl Seguin
7fc6e97cd8
Re-implement forgiving base64 decode without intermediate allocation
...
Was looking at, what I thought was a related issue, and started to extract this
code to re-use it (in DataURIs). Realized it could be written without the
intermediate allocation. Then I realized the dataURI issue is something else,
but wanted to keep this improvement.
2026-02-28 11:22:31 +08:00
Karl Seguin
1473e58a41
Initialize charset to safe default
...
Fixes a WPT crash (not sure which, but in `/fetch/content-type/`)
2026-02-28 10:42:53 +08:00
Karl Seguin
2394b2f44f
Merge pull request #1676 from lightpanda-io/add-scroll-by
...
e2e-test / zig build release (push) Has been cancelled
e2e-test / demo-scripts (push) Has been cancelled
e2e-test / cdp-and-hyperfine-bench (push) Has been cancelled
e2e-test / perf-fmt (push) Has been cancelled
e2e-test / browser fetch (push) Has been cancelled
zig-test / zig test using v8 in debug mode (push) Has been cancelled
zig-test / zig test (push) Has been cancelled
zig-test / perf-fmt (push) Has been cancelled
nightly build / build-linux-x86_64 (push) Has been cancelled
nightly build / build-linux-aarch64 (push) Has been cancelled
nightly build / build-macos-aarch64 (push) Has been cancelled
nightly build / build-macos-x86_64 (push) Has been cancelled
wpt / zig build release (push) Has been cancelled
wpt / build wpt runner (push) Has been cancelled
wpt / web platform tests json output (push) Has been cancelled
wpt / perf-fmt (push) Has been cancelled
e2e-integration-test / zig build release (push) Has been cancelled
e2e-integration-test / demo-integration-scripts (push) Has been cancelled
add window.scrollBy
2026-02-28 07:03:39 +08:00
Karl Seguin
516bd98198
Merge pull request #1675 from lightpanda-io/reset-attribute-listener
...
Set a null attribute listener must remove existing value
2026-02-28 07:01:11 +08:00
Karl Seguin
7d8688a130
Merge pull request #1674 from lightpanda-io/atob-unpadded-base64
...
accept must accept unpadded data in atob
2026-02-28 07:00:00 +08:00
Pierre Tachoire
631ec70058
add window.scrollBy
2026-02-27 16:19:27 +01:00
Pierre Tachoire
6fd51cfdc0
Set a null attribute listener must remove existing value
2026-02-27 14:47:43 +01:00
Pierre Tachoire
6857b74623
accept must accept unpadded data in atob
...
according with https://infra.spec.whatwg.org/#forgiving-base64-decode
2026-02-27 14:31:03 +01:00
Adrià Arrufat
5ec4305a9f
mcp: add optional url parameter to tools
2026-02-27 22:17:15 +09:00
Pierre Tachoire
88baff96d0
Merge pull request #1671 from lightpanda-io/custom_element_name
...
e2e-test / zig build release (push) Has been cancelled
e2e-test / demo-scripts (push) Has been cancelled
e2e-test / cdp-and-hyperfine-bench (push) Has been cancelled
e2e-test / perf-fmt (push) Has been cancelled
e2e-test / browser fetch (push) Has been cancelled
zig-test / zig test using v8 in debug mode (push) Has been cancelled
zig-test / zig test (push) Has been cancelled
zig-test / perf-fmt (push) Has been cancelled
Fix our custom element name validation
2026-02-27 14:08:13 +01:00
Pierre Tachoire
e871f0002b
Merge pull request #1633 from lightpanda-io/wptrunner
...
remove WPT specific code
2026-02-27 13:02:47 +01:00
Karl Seguin
7358d48e35
Fix our custom element name validation
...
Passes all WPT tests:
/custom-elements/registries/valid-custom-element-names.html
Also, apply validation to whenDefined, which we were not doing.
2026-02-27 18:46:07 +08:00
Karl Seguin
a50597ff27
Merge pull request #1669 from lightpanda-io/more_interned_strings
...
e2e-test / zig build release (push) Has been cancelled
e2e-test / demo-scripts (push) Has been cancelled
e2e-test / cdp-and-hyperfine-bench (push) Has been cancelled
e2e-test / perf-fmt (push) Has been cancelled
e2e-test / browser fetch (push) Has been cancelled
zig-test / zig test using v8 in debug mode (push) Has been cancelled
zig-test / zig test (push) Has been cancelled
zig-test / perf-fmt (push) Has been cancelled
Expand the strings we intern
2026-02-27 17:30:21 +08:00
Karl Seguin
e4cb78abee
Merge pull request #1670 from lightpanda-io/cdata_sso
...
Change CData._data from []const to String (SSO)
2026-02-27 17:30:03 +08:00
Karl Seguin
732884a3b2
Merge pull request #1668 from lightpanda-io/selector_list_arena
...
Add RC support to NodeList
2026-02-27 17:29:06 +08:00
Karl Seguin
80f2c42c69
Merge pull request #1660 from lightpanda-io/fix_css_parse_overflow
...
Fix possible overflow when parsing floats without an integer
2026-02-27 17:27:56 +08:00
Pierre Tachoire
24b6934d3b
remove WPT specific code
...
Using both lightpanda-io/wpt and lightpanda-io/demo/wptrunner remove the
need for code specific to run WPT from browser.
2026-02-27 10:09:07 +01:00
Pierre Tachoire
ef6a7a6904
storage: maintain Lookup size correctly
2026-02-27 08:57:29 +01:00