Commit Graph

8347 Commits

Author SHA1 Message Date
Karl Seguin
2e8a7e59c4 Merge pull request #2105 from lightpanda-io/no-context-handling
Better handle v8 callback with no valid context
2026-04-10 08:11:36 +08:00
Karl Seguin
e8fbaeb2d9 Initialize snapshot before network
When the snapshot isn't baked-into the binary, it requires more memory to
initialize and load. By changing the initializing order from: network, isolate,
snapshot to: isolate, snapshot, network we can reduce the peak startup memory.
This is because the short-live snapshot intermediary data and the long-lived
network data (certs) no longer overlap.
2026-04-10 07:08:13 +08:00
Karl Seguin
96736d440d Merge pull request #2112 from lightpanda-io/reduce_telemetry_size
Reduces the size of Telemetry.Lightpanda
2026-04-10 07:07:55 +08:00
Karl Seguin
26253874de Merge pull request #2111 from lightpanda-io/typos
Fix a lot of typos.
2026-04-10 07:07:43 +08:00
Karl Seguin
cec9628e37 zig fmt 2026-04-10 06:51:50 +08:00
Karl Seguin
255fa247c3 Reduces the size of Telemetry.Lightpanda
32920 -> 8344

We buffer [1024]Telemetry.Event, and the event is unnecessarily large.
2026-04-10 06:51:50 +08:00
Karl Seguin
8eaeafe16c Fix a lot of typos.
I used https://github.com/crate-ci/typos, it worked well.

Also, make sure cdp-initiated KeyboardEvent is freed when no element is in focus
2026-04-10 06:51:10 +08:00
Karl Seguin
4dcb2c997e Better handle v8 callback with no valid context
In https://github.com/lightpanda-io/browser/pull/1885 we added fallback to the
incumbent context when the current context had be released (by us, but not by
v8).

This now handles the case where there is no incumbent context. It's not clear
exactly why this can happen, but we do see it in some WPT tests (e.g.
/html/browsers/the-window-object/named-access-on-the-window-object/navigated-named-objects.window.html)
2026-04-10 06:50:47 +08:00
Karl Seguin
a9e7d75272 Merge pull request #2120 from lightpanda-io/memory_test3
run e2e-test with pre-generated snapshot
2026-04-10 06:47:35 +08:00
Adrià Arrufat
d19e62ec3c http: add default write callback to prevent stdout pollution 2026-04-09 22:03:09 +02:00
Adrià Arrufat
7aa11c7006 agent: update CLI args and refactor code 2026-04-09 17:51:56 +02:00
Adrià Arrufat
9a8ad8951f agent: rename missing tool calls to semanticTree and eval 2026-04-09 17:08:35 +02:00
Adrià Arrufat
a1ef413a9a Terminal: add command completion and hints 2026-04-09 17:02:31 +02:00
Adrià Arrufat
61fd69eaae agent: improve script recording logic and formatting 2026-04-09 16:51:54 +02:00
Adrià Arrufat
91e61905cf tools: remove aliases, normalize names to camelCase, simplify dispatch 2026-04-09 16:19:20 +02:00
Adrià Arrufat
286976a7c7 browser: centralize tool definitions 2026-04-09 16:07:05 +02:00
Adrià Arrufat
f431202bbf Merge branch 'main' into agent 2026-04-09 14:27:15 +02:00
Karl Seguin
5c7a665d11 run e2e-test with pre-generated snapshot 2026-04-09 18:54:31 +08:00
Pierre Tachoire
afbad07f0f Merge pull request #2114 from lightpanda-io/update-README
Update readme
2026-04-09 11:03:43 +02:00
Pierre Tachoire
9eba3c1463 Merge pull request #2113 from lightpanda-io/add-ip-filters-2
Improvements to IpFilters
2026-04-09 11:01:31 +02:00
Pierre Tachoire
0905306c79 Add skill link in README 2026-04-09 10:57:25 +02:00
Pierre Tachoire
cb3cc9cd8c update benchmark 2026-04-09 10:56:08 +02:00
Pierre Tachoire
2d2b1584cf update contribution and why section 2026-04-09 10:56:08 +02:00
Pierre Tachoire
d1883ad211 cleanup README, add MCP 2026-04-09 09:56:39 +02:00
Karl Seguin
0253092f20 Improvements to IpFilters
The main change is changing how CidrV4 and CidrV6 are stored, by pre-calculating
their mask and storing their address as integer.

This allows significant simplification of matchesCidrV4 and matchesCidrV6.
2026-04-09 15:40:16 +08:00
Karl Seguin
689fb908ac Merge pull request #2110 from lightpanda-io/test-cache-filter
cache: add log filter to garbage file test
2026-04-09 07:55:07 +08:00
Karl Seguin
795b0affe2 Merge pull request #2102 from lightpanda-io/non-utf8-encoding
Use encoding_rs on non-UTF-8 html to convert to utf-8
2026-04-09 07:25:48 +08:00
Adrià Arrufat
182447c907 cache: add log filter to garbage file test 2026-04-08 19:36:29 +02:00
Adrià Arrufat
d2a4d388b1 agent: consolidate findNodeIdByText tests 2026-04-08 19:29:54 +02:00
Adrià Arrufat
ad13eb76e2 agent: improve element lookup in CommandExecutor
Replaces heuristic string search with JSON parsing and case-insensitive
matching across multiple fields. Adds unit tests for verification.
2026-04-08 19:21:07 +02:00
Adrià Arrufat
ffb38f268b agent: add --self-heal flag to control self-healing 2026-04-08 18:15:34 +02:00
Adrià Arrufat
8d3d3a2c67 agent: improve command parsing and selector reliability
- Support single quotes in commands for nested CSS selectors.
- Mask password values in interactive element output.
- Update system prompt and recorder for better reproducibility.
- Try CSS selectors first in click actions.
2026-04-08 18:10:04 +02:00
Trevin Chow
574264aaff fix: update page URL and location on pushState/replaceState
history.pushState() and replaceState() updated the navigation entry
but did not update page.url or reinitialize window.location. This
caused location.pathname to return the old value after pushState,
breaking SPA routing detection in automation scripts.

Both methods now set page.url and re-init the Location object after
updating the navigation history.

Fixes #2081
Ref #2043
2026-04-08 08:34:08 -07:00
Adrià Arrufat
c242e324f3 browser: auto-resolve env vars in fill tool 2026-04-08 17:17:23 +02:00
Adrià Arrufat
b8ae185cad tools: support CSS selectors for click and fill actions 2026-04-08 16:56:10 +02:00
Adrià Arrufat
796a17ff81 agent: update default AI models 2026-04-08 16:35:10 +02:00
Adrià Arrufat
7ca289ece6 Config: support user agent for agent mode 2026-04-08 16:34:47 +02:00
Adrià Arrufat
f8497ca090 Merge branch 'main' into agent 2026-04-08 16:15:07 +02:00
Adrià Arrufat
08ec5a645a tools: wait for navigation in execPress 2026-04-08 15:48:14 +02:00
Adrià Arrufat
0c51c6f174 browser: wait for navigation after click in tools 2026-04-08 15:45:37 +02:00
Adrià Arrufat
73f0e0456b tools: add getUrl and getCookies tools 2026-04-08 15:10:23 +02:00
Pierre Tachoire
6ef518438b fix custom cidrs mem leak 2026-04-08 15:09:01 +02:00
Adrià Arrufat
701836be88 browser: add consoleLogs tool to capture page logs 2026-04-08 15:04:08 +02:00
Pierre Tachoire
e57b5c645b remove deadcode libcurl.CurlOpenSocketFunction 2026-04-08 14:06:17 +02:00
Karl Seguin
077b8b1481 Merge pull request #2106 from lightpanda-io/simplify_nodelist_foreach
Simplifies NodeList.foreach
2026-04-08 19:51:15 +08:00
Pierre Tachoire
9915f0f19d Merge pull request #2100 from lightpanda-io/osc/2029-user-agent-override
Allow user agent override with restrictions
2026-04-08 13:20:32 +02:00
Adrià Arrufat
ee2fd70dea Merge branch 'main' into agent 2026-04-08 13:06:12 +02:00
Adrià Arrufat
babe3c68ca tools: add getEnv tool to read environment variables 2026-04-08 13:01:21 +02:00
Adrià Arrufat
9f932e69d6 Session: skip pages without queued navigation
Prevents panics in processQueuedNavigation by using orelse continue
instead of force unwrapping the queued navigation.
2026-04-08 13:01:01 +02:00
Karl Seguin
077263bae4 Simplifies NodeList.foreach
Removes 2 layers of indirection (including 1 allocation) that is unnecessary for
an internal call.
2026-04-08 18:32:47 +08:00