[0.1.0] - 2026-04-14
A one-shot breaking reshape toward an agent-first CLI: every capability of Bun.WebView 1.3.12 is now reachable from the shell, and defaults favor agents making discrete tool calls (silent on success, stable exit codes, cursor-pull buffers, token-efficient terse output). See CLAUDE.md for the full design principles.
Breaking changes
- Renamed verb:
stop→close. Daemon/stopHTTP route renamed to/close; start a fresh daemon after upgrading.evalis kept as a deprecated alias forevaluate. navigateoutput removed: was<url>\n<title>, now silent (exit 0) like every other action verb. Scripts parsing navigate output must switch to exit codes or--json.scrollsplit:bunwv scroll <dx> <dy>now only dispatches a wheel event. Element-into-view moved to new verbbunwv scroll-to <selector> [--block start|center|end|nearest] [--timeout ms].clickunified: one verb, exactly one of--selector <css>,--text <text>,--at <x,y>. The separateclick-textcommand is removed. New options:--button left|right|middle,--count 1|2|3,--mod <Modifier>(repeatable),--timeout ms,--text-match exact|contains|regex(default contains, trimmed, case-sensitive).--modis repeatable:--mod Shift --mod Control(comma form still accepted).- Silent on success:
click,type,navigate,press,scroll,scroll-to,clear,submit,resize,back/forward/reload,close,exists,wait-for,wait-for-gone,cdp-subscribe,cdp-unsubscribeprint nothing on stdout and exit 0. Previous versions printed confirmation lines. - Stable exit codes: 0 ok, 1 generic, 2 usage, 3 timeout, 4 element-not-found, 5 daemon-unreachable, 6 batch-partial. Errors are JSON on stderr (
{ok:false, error, exitCode}) — branch on exit code, not stderr text. statusterse default is one line:<url> | <title> | <idle|loading> | pending=<n>. Multi-field JSON behind--json.evaluatealways prints JSON-literal ("Example",42,[1,2]) so agents can distinguish types without a format flag.console --sinceuses seq cursors (not ms timestamps). Response carriescursorandtruncated/oldeston eviction, matchingevents. Terse output:<seq> [<level>] <message>, one line per entry,\n/\rescaped; empty buffer prints nothing.- Screenshot default path is session-scoped:
/tmp/bunwv-screenshot-<session>.png(was/tmp/bunwv-screenshot.png). New--out <path>,--out -(stdout bytes),--encoding blob|buffer|base64|shmem. - Socket + PID file are
chmod 0600on daemon start. Other local users on shared machines can no longer connect to your session.
Added
- Events ring buffer —
bunwv events [--since <seq>]. CapturesonNavigated,onNavigationFailed, and any subscribed CDP events. 1000 entries / 10 MB LRU cap. Responses includecursorandtruncated/oldestwhen the cursor pre-dates retained entries. - CDP event subscriptions —
bunwv cdp-subscribe <CDP.event> [<CDP.event> ...],cdp-unsubscribe,cdp-subscriptions. Multiple types per call; subscribed events land in the events buffer. exists <selector>— silent probe. Exit 0 present, 4 missing. Cheaper thanevaluate "!!document.querySelector(...)".wait-for --url <substr>/--title <substr>— wait for URL or title to contain a substring (pollslocation.href/document.title).wait-for-gone --url / --title— symmetric withwait-for.batch [--file <path>] [--keep-going]— read NDJSON-style stdin (each line a JSON array of args), run each in one Bun process (no per-command startup), emit one NDJSON envelope per command on stdout. Outer flags like--sessioninherit into each line. Exit 0 on full success, failing code on first error, 6 under--keep-goingwith ≥1 failure.close --all— enumerate/tmp/bunwv-*.sockand close every session.- Error-level console auto-surfaces —
console.error/console.warnfired during a verb returns as{console:[…]}on the verb's stderr, so the agent sees page errors without a second call. (HTTP contract:X-Console-Errorsresponse header.) BUNWV_SESSIONenv var — set once;--sessionbecomes optional.--jsonglobal flag — any command emits{ok, data?, error?, exitCode}as a single envelope line when set.- Flexible flag parser —
--flag value,--flag=value, repeated flags, and flags before or after the command all work. - Initial URL —
bunwv start --url <url>navigates before serving. - Chrome backend options —
--chrome-argv '[json]',--chrome-stdout inherit|ignore,--chrome-stderr inherit|ignore,--chrome-url <ws-url>(attach to a running Chrome via DevTools WebSocket), plus--webkit-stdout/--webkit-stderr. statusextras — includesloading,pendingEvents,cursor,cdpSubscriptionsin the--jsonenvelope.
Changed
- Bumped
@types/bunto 1.3.12; dropped the localdeclare module "bun"augmentation. Daemon usesWebView.ClickOptions,WebView.ScrollToOptions,WebView.Modifier, etc. directly. - Removed dead
/click-textdaemon route (superseded by unified/click). - Console ring buffer entries carry a monotonic
seq(used for cursor semantics and error auto-surface). - Agent-first docs —
CLAUDE.mdgained a "Design principles (agent-first)" section;SKILL.mdgained an "Agent-first usage patterns" lead and updated examples throughout.
Migration
bunwv stop→bunwv close. (bunwv evalstill works as an alias forbunwv evaluate; same semantics, always JSON-literal now.)bunwv scroll <selector>→bunwv scroll-to <selector>.bunwv click <selector>→bunwv click --selector <selector>.bunwv click <x> <y>→bunwv click --at <x,y>.bunwv click-text <text>→bunwv click --text <text>(default match mode is nowcontains— add--text-match exactif you need the old strict behavior).bunwv press foo --mod shift,ctrl→bunwv press foo --mod Shift --mod Control(comma form still works; modifier names are case-sensitive per Bun.WebView).- Scripts that parse
bunwv navigateconfirmation output: removed. Check exit code. - Scripts that parse
bunwv statusformat: new terse shape is<url> | <title> | <idle|loading> | pending=<n>; use--jsonfor structured access. - Scripts using
bunwv console --since <timestamp-ms>: switch to--since <seq>(seq comes from a prior call orstatus --json).