Commit Graph

8347 Commits

Author SHA1 Message Date
Karl Seguin
ca1191d103 Merge pull request #2752 from lightpanda-io/domparsing
webapi; WPT domparsing improvements
2026-06-18 07:39:20 +08:00
Karl Seguin
6e7867a8ae zig fmt 2026-06-18 07:38:59 +08:00
Karl Seguin
d052a79241 webapi, worker: Expose Navigator on Worker
This includes everything the Navigator depends on: NavigatorUAData, Permissions
and StorageManager.
2026-06-18 07:34:35 +08:00
Pierre Tachoire
b556d3221d webapi: structured-clone BroadcastChannel messages per receiver
postMessage handed the same js.Value.Temp to every receiver's MessageEvent,
which broke two things:

1. No structured clone. Receivers got the literal object the sender posted,
   so a mutation in one receiver was visible to the others and to the sender
   (received === payload). The spec requires the message to be cloned for
   each destination.

2. Shared temp freed after the first delivery (latent use-after-free). Events
   are refcounted and deinit'd synchronously at the end of each dispatch, and
   MessageEvent.deinit release()s its data value. With a shared temp, the first
   receiver's teardown reset the v8 persistent slot, leaving later receivers
   reading a dead handle.

Fix, following the Worker.postMessage precedent: StructuredSerialize the
message once, synchronously, in postMessage (so an unserializable value throws
a DataCloneError to the caller per spec, and cloning stays off the scheduler
tick). A TryCatch contains any v8 exception from a failed serialize so it is
re-raised as a clean DataCloneError. Delivery then re-clones the sanitized
snapshot per receiver, giving every MessageEvent its own independently owned
temp. The snapshot is released by the callback (cancelled finalizer covers the
dropped-task path).
2026-06-17 21:27:56 +02:00
Adrià Arrufat
d872238189 Merge pull request #2770 from lightpanda-io/agent-simplify-local-provider
agent: simplify local provider detection
2026-06-17 20:45:01 +02:00
Adrià Arrufat
6a3bc54dd5 build: update zenai dependency 2026-06-17 20:07:49 +02:00
Adrià Arrufat
34f6afb019 agent: simplify local provider detection
Remove redundant `detectOllama` and `detectLlamaCpp` wrappers in
settings, calling `detectLocalProvider` directly instead. Also clean
up some logic in Agent.zig.
2026-06-17 20:03:11 +02:00
Adrià Arrufat
5fa5d09394 Merge pull request #2769 from lightpanda-io/update-zenai
build: update zenai dependency
2026-06-17 17:43:16 +02:00
Adrià Arrufat
bc522c4aa3 build: update zenai dependency
preserve unknown enum values during JSON parsing
2026-06-17 17:31:50 +02:00
Adrià Arrufat
f244478dbe Merge pull request #2768 from lightpanda-io/terminal-single-positional-arg
terminal: support positional args for single-field schemas
2026-06-17 16:52:22 +02:00
Adrià Arrufat
144b3a58a0 terminal: support positional args for single-field schemas
Allows tools like `/getEnv` with a single optional field to accept
positional arguments. Also adds autocompletion and ghost hints for
live `LP_*` environment variables.

Additionally, fixes a memory leak in `settings.zig` when parsing
invalid ZON configurations.
2026-06-17 16:26:43 +02:00
Adrià Arrufat
8bbb4a5474 Merge pull request #2766 from lightpanda-io/vercel-mistral
agent: add support for Vercel AI Gateway and Mistral
2026-06-17 16:04:05 +02:00
Pierre Tachoire
7c4df82903 implement BroadcastChannel 2026-06-17 16:03:35 +02:00
Adrià Arrufat
88bfec4c7e agent: add support for Vercel AI Gateway and Mistral 2026-06-17 15:38:48 +02:00
Adrià Arrufat
94148cb567 Merge pull request #2763 from lightpanda-io/llama.cpp
agent: support llama.cpp as local provider
2026-06-17 14:59:57 +02:00
Halil Durak
bf16a64387 Crypto: update tests 2026-06-17 14:31:54 +03:00
Halil Durak
b9c718642b Crypto(X25519): don't check for deriveBits permission twice 2026-06-17 14:31:46 +03:00
Halil Durak
6f47466b34 Crypto(AES-CTR): proper counter-wrap handling 2026-06-17 14:30:00 +03:00
Halil Durak
79c90cf876 Crypto(HMAC): check signature length and sign length are equal 2026-06-17 14:28:05 +03:00
Halil Durak
7675de2c26 Crypto(HMAC): error on 0-sized block 2026-06-17 14:27:26 +03:00
Adrià Arrufat
45dd56258b agent: simplify and shorten comments 2026-06-17 12:45:18 +02:00
Adrià Arrufat
285c5eb523 agent: support llama.cpp as local provider
Generalizes Ollama detection, completion, and model reconciliation
to support llama.cpp. Also improves API error reporting by formatting
and surfacing HTTP status and messages on failures.
2026-06-17 12:24:45 +02:00
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
Karl Seguin
67a434bd97 webapi; WPT domparsing improvements
A few APIs already support [LegacyNullToEmptyString], this extends it to various
setInnerHTML (Element, DocumentFragment, Template) and a few other places.

Also changes how Range.createContextualFragment. Unlike other fragment parsers
(e.g. setInnerHTML) this one _does_ run scripts.
2026-06-17 16:50:27 +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
Muki Kiboigo
3091571b91 add tests for cache entry renewal 2026-06-16 22:35:42 -07:00
Muki Kiboigo
47483fd992 update more fields on renew 2026-06-16 22:13:08 -07:00
Muki Kiboigo
9aed4a20e7 remove dead code from Forward 2026-06-16 21:35:00 -07: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