Commit Graph
7456 Commits
Author SHA1 Message Date
Karl Seguin 2814d0ea21 Merge pull request #2757 from lightpanda-io/blob_mimesniff
wpt: Better blob mime handling
2026-06-17 16:51:39 +08:00
Karl Seguin c9c684d3c1 Merge pull request #2756 from lightpanda-io/log_level_note
ops: Add "note" log level for CDP "server running" message
2026-06-17 16:51:10 +08:00
Karl Seguin 94e238e0b3 Merge pull request #2762 from lightpanda-io/document_isequal
webapi: implement node.isNodeEqual when comparing document
2026-06-17 16:50:54 +08:00
Pierre Tachoire 614822d821 Merge pull request #2758 from lightpanda-io/ci-release
Improve ci release
2026-06-17 08:46:58 +00:00
Karl Seguin ea70eb2d89 Merge pull request #2751 from lightpanda-io/url_parse_and_setters
webapi, url: Add URL.parse, better setter compliance
2026-06-17 16:44:42 +08:00
Karl Seguin 5304875a02 Merge pull request #2744 from lightpanda-io/document_frame
webapi: Use document._frame rather than executing frame
2026-06-17 16:44:15 +08:00
Karl Seguin bbe6f90543 webapi: implement node.isNodeEqual when comparing document
I thought this was complicated, but it turns out it's easy, and we already have
the code.
2026-06-17 16:16:48 +08:00
Karl Seguin 4625a72221 Merge pull request #2760 from lightpanda-io/cdp_max_message_size
cdp: configurable max websocket and http message size
2026-06-17 16:11:43 +08:00
Karl Seguin 297027f056 cdp: configurable max websocket and http message size
Move away from hard-coded 512KB (WS) and 4K (http) limits. Introduces two new
serve-specific command line arguments:

--cdp-max-message-size <INT>
        Maximum allowed incoming websocket message size.
        Defaults to 1048576 (1MB)
--cdp-max-http-message-size <INT>
        Maximum allowed HTTP request size
        Defaults to 4096 (maximum allowed: 16383)

--cdp-max-message-size has been bumped from 512KB to 1MB default.

Meant to provide a more robust solution than https://github.com/lightpanda-io/browser/pull/2717
2026-06-17 14:50:55 +08:00
Pierre Tachoire 7836e1e042 ci: invalidate cloudfront distribution on release 2026-06-17 08:33:57 +02:00
Pierre Tachoire 12cdaea683 ci: upload release on s3 in its own directory 2026-06-17 08:29:06 +02:00
Pierre Tachoire cd5822c889 ci: remove nightly agent build 2026-06-17 08:29:03 +02:00
Karl Seguin 8d5a1f2450 wpt: Better blob mime handling
Largely aimed at /mimesniff/mime-types/parsing.*.html. Adds ~2000 passing cases.

The blob API is now a bit simpler (hence FormData/REquest/Response/WebSocket)
being touched, but more logic is now in Mime.zig to parse/validate MIME types.
Better escaping support, correct casing and handling edge cases with multiple
charset, or "charset" as a value, .etc...

Headers also hook into this to validate / normalize header name and values.
2026-06-17 13:56:40 +08:00
Karl Seguin 655523c12a ops: Add "note" log level for CDP "server running" message
`note` is the highest log level (e.g. cannot be turned off), and thus will
always be displayed. The purpose is to make sure that people who use --port 0
can see the listening port WITHOUT giving up log-level filtering (e.g. having
to use --log-level info JUST to see the listening port).

I'm personally a fan of using .note only when (port == 0), but we can tweak it
later if people complain about it showing up despite using a warn/error/fatal
log level.
2026-06-17 11:15:34 +08:00
Pierre Tachoire b59eb4b4aa Merge pull request #2338 from lightpanda-io/agent
Add interactive agent mode with LLM-powered web browsing
2026-06-16 17:24:28 +00:00
Pierre Tachoire 35f09393ba Merge pull request #2755 from lightpanda-io/update-readme-agent
Update readme agent
2026-06-16 16:51:22 +00:00
Pierre Tachoire f2af841f1f removed in favor of https://lightpanda.io/docs/usage/pandascript 2026-06-16 17:49:32 +02:00
Pierre Tachoire b003614064 removed in favor of https://lightpanda.io/docs/usage/agent 2026-06-16 17:49:03 +02:00
Pierre Tachoire c96143984a removed in favor of https://lightpanda.io/docs/guides/lightpanda-agent-tutorial 2026-06-16 17:48:33 +02:00
Pierre Tachoire 208ca4e539 update the README for agent 2026-06-16 17:48:14 +02:00
Adrià Arrufat c64fb5aa18 help: update CLI help for Hugging Face and effort options
Document the new Hugging Face provider, HF_TOKEN auto-detection,
and the --effort option.
2026-06-16 16:01:57 +02:00
Adrià Arrufat d422f79169 Merge branch 'main' into agent 2026-06-16 14:58:24 +02:00
Pierre Tachoire 20be50db7f Merge pull request #2644 from lightpanda-io/agent-telemetry
telemetry: send agent_replay mode on non-interactive usage
2026-06-16 14:03:10 +02:00
Karl Seguin 9a6b471ee4 Merge pull request #2753 from lightpanda-io/iframe_onload_queued_event
webapi: fire iframe load on next tick
2026-06-16 19:06:06 +08:00
Karl Seguin 0793a548bf Merge pull request #2724 from lightpanda-io/preload_onload_event
webapi: preload onload/onerror callback timing
2026-06-16 19:04:54 +08:00
Karl Seguin a32b72e84b Merge pull request #2720 from lightpanda-io/slot
WebAPI: much better shadowdom slot support
2026-06-16 19:03:44 +08:00
Karl Seguin a523359ba5 webapi: fire iframe load on next tick
Unblocks some WPT tests, but more generally, adds correctness so that the onload
on an iframe doesn't fire before subsequent scripts. Imagine something like:

<iframe src=blah onload=done>
<script>
function done() {
 //...
}
</script>

(Which is an approximation of what some WPT tests do)...kind of important that
we don't fire the onload while we're still parsing.
2026-06-16 17:11:32 +08:00
Karl Seguin 0d966f42a7 webapi: Node.baseURI to use document frame if available 2026-06-16 16:12:30 +08:00
Karl Seguin 4aa291c468 webapi, url: Add URL.parse, better setter compliance
Most URL setters (e.g. hostname) don't throw on error. They just do nothing.
This helps ~230 WPT cases pass.

Also added URL.parse.
2026-06-16 15:11:07 +08:00
Adrià Arrufat 85dc343d0c Merge pull request #2750 from lightpanda-io/agent-fix-save-prompts
tools: update save script prompts for Page API
2026-06-16 08:27:18 +02:00
Adrià Arrufat f52bbc0f48 agent: scrub remaining global-goto/extract refs from messages and docs 2026-06-16 08:10:43 +02:00
Adrià Arrufat 56030d148b tools: update save script prompts for Page API
Updates the synthesis prompts and rules for the `save` tool to reflect
the new `Page` class API. Scripts now instantiate `Page`, use async
`await page.goto()`, call other builtins as synchronous methods on
`page`, and use `return` to output results.
2026-06-16 08:03:55 +02:00
Adrià Arrufat 54e0d6b1eb Merge branch 'main' into agent 2026-06-16 07:48:27 +02:00
Adrià Arrufat cc08e744e4 Merge pull request #2748 from lightpanda-io/agent-page-syntax
script: introduce Page API with async goto
2026-06-16 07:47:58 +02:00
Karl Seguin 2907587bcc Merge pull request #2693 from lightpanda-io/module_preload
perf, http: Preload modules
0.3.2
2026-06-16 06:37:16 +08:00
Adrià Arrufat 39924dcd8e Agent: record navigating read tools as goto commands 2026-06-16 00:03:12 +02:00
Adrià Arrufat 7e5777b3e7 Merge branch 'agent' into agent-page-syntax 2026-06-15 23:16:36 +02:00
Adrià Arrufat 78dfc03007 agent: probe Ollama reachability for completions
Lazily probes and caches Ollama server reachability for `/provider`
autocomplete. Validates Ollama availability when manually setting
the provider. Updates zenai dependency.
2026-06-15 23:13:56 +02:00
Adrià Arrufat e7cfc2f72a agent: avoid double Ollama probe at startup
Renames `wouldResolve` to `hasDetectableKey` and removes the Ollama
probe from it. Defers printing the welcome banner for Ollama-only
paths to prevent probing the local server twice. Also bumps zenai.
2026-06-15 22:56:20 +02:00
Adrià Arrufat 21477b39c9 script: introduce Page API with async goto
Replaces global blocking functions with a `Page` class. `page.goto` is
now asynchronous and must be awaited, while other methods remain
synchronous. Scripts are wrapped in an async IIFE to support top-level
await, and output is returned via `return <value>`.
2026-06-15 22:48:12 +02:00
Adrià Arrufat 7a9924ab22 Agent: support HF_BILL_TO for Hugging Face
Passes the `HF_BILL_TO` environment variable to the ZenAI client
to route Hugging Face billing to an organization. Also updates
the `zenai` dependency.
2026-06-15 19:27:58 +02:00
Adrià Arrufat 3e5294318c Agent: add support for Huggingface inference
Updates the zenai dependency to the latest commit and adds HF_TOKEN to
the API keys hint.
2026-06-15 19:12:05 +02:00
Karl Seguin 01cda6d80e Merge pull request #2698 from lightpanda-io/remove_snapshot_create_fallback
bridge: Remove snapshot create fallback
2026-06-15 22:05:43 +08:00
Pierre Tachoire 21a2c2c800 Merge pull request #2697 from lightpanda-io/ci_snapshot_cache_bust
ci: Include v8 version in Snapshot cache key
2026-06-15 15:59:17 +02:00
Adrià Arrufat 2c35d760d8 Merge branch 'main' into agent 2026-06-15 15:21:54 +02:00
Adrià Arrufat cf3cae8aa3 Merge pull request #2747 from lightpanda-io/agent-fix-save-path-reset
agent: reset save destination on /clear and /reset
2026-06-15 15:18:05 +02:00
Adrià Arrufat e35c66c2a6 agent: reset save destination on /clear and /reset
clearConversation reset the recorded action buffer but left save_path
set, so after /clear or /reset a /save <newfile> was rejected with
"already saving to <oldfile>". Free and clear save_path alongside the
buffer so a cleared session can save to a fresh file.
2026-06-15 14:54:26 +02:00
Karl Seguin 15d4968cc8 Merge pull request #2745 from lightpanda-io/silence_a_test_log
dev: silence a test that uses/needs console
2026-06-15 17:16:08 +08:00
Karl Seguin 78d7793327 dev: silence a test that uses/needs console 2026-06-15 16:59:04 +08:00
Karl Seguin 7edf6f5eb9 webapi: Use document._frame rather than executing frame
This continues some previous fixes aimed at iframe/popup scenarios where the DOM
is manipulated from a different frame. The simplest example is:

iframe.contentDocument.domain

should return the domain of the iframe, not the domain of the context this is
being run in. For a case like this, it's easy, use self._frame rather than
the calling context's frame.

Besides these easy cases, there are two other changes here:

1 - ResolveURL has to get an Element's owning document's frame
2 - getElementById has to get the lookup from the element's document

As part of #2, `Frame.getElementByIdFromNode` was optimized to avoid the
double document lookup. Rather than calling isConnected() then finding the root
node, we can just call getRootNode().
2026-06-15 16:47:21 +08:00