session stdinOne small engine for brave agents.
One page per process. The swarm collects typed results.
URL + action plan
session stdinsession stdinsnapshottyped effectdocument generationHow browser.jr builds a page.
How the DOM tree is built
html5ever drives a custom TreeSink. Nodes keep children
and weak parent links, then flatten into ordered elements.
How styles become computed values
Rules match each element. Specificity and source order resolve conflicts; inline styles run last.
src/page/style.rs ↗How layout boxes are computed
Document-order flow resolves containing blocks, margins, borders, padding, widths, and viewport-relative boxes.
src/page.rs ↗How paint stays bounded
Supported boxes become clipped fill and border commands. Unsupported paint blocks capture.
src/page/paint.rs ↗How actions return evidence
Snapshots bind references to a document epoch. Actions return checks, effects, and before/after generations.
src/snapshot.rs ↗Compatibility targets
Adapters are not complete
One session. Typed actions. Visible proof.
Line-oriented session / local pageprintf 'open http://localhost:3000\nsnapshot\nget title\nexit\n' \ | ./browser.jr --allow-loopback sessionopen http://localhost:3000snapshotget titleexitMeasured as a control path.
Apple M3, one warmup, ten measured samples. Every supported sample passed.
| Adapter | Control path | Median | p95 |
|---|---|---|---|
| browser.jr | session stdin | 22.55 ms | 46.39 ms |
| Chrome | Playwright | 375.36 ms | 559.17 ms |
| Firefox | Playwright | 643.46 ms | 813.90 ms |
| WebKit | Playwright | 681.95 ms | 1,348.91 ms |
| Lightpanda | Puppeteer / CDP | 492.45 ms | 1,461.68 ms |
| agent-browser / Chrome | CLI + daemon | 7,366.00 ms | 16,838.12 ms |
| agent-browser / Lightpanda | CLI + daemon | 1,693.90 ms | 3,392.81 ms |
Same fixture
One deterministic loopback page.
Warm session
One reused session per adapter.
Timed work
Setup excluded. Engines run sequentially.
Checked result
Expected output required for every sample.
Full workflow: navigate, snapshot, mutate three controls, read state, follow a link, and read its title. Browser-control timings, not engine rankings.
Read the complete resultDeliberately small.
Works today
- Bounded public HTTP and HTTPS loading
- Static HTML and a small CSS and layout engine
- Role, text, CSS, XPath, and attribute locators
- Typed actions with checks, effects, and generations
- Agent snapshots and software-rendered screenshots
Current limits
- No JavaScript runtime
- No complete DOM, CSS cascade, or layout engine
- No complete browser paint or compositor
- No Playwright or agent-browser protocol compatibility
- No browser window