feat(provider-webos): add LG webOS TV provider plugin
Summary
Adds @agent-device/webos, an optional provider plugin that drives web apps on LG webOS TVs, and the private @agent-device/tv-cdp package it bundles, which the Tizen plugin in #4168 shares. The TV enters as a plugin-owned Android TV device (webos:<ares device>): lifecycle through ares-launch, the page over CDP through the ares-inspect tunnel.
Scope is the smaller v1 from review: open/close/apps, snapshot (-s, -d, -i), remote keys (directions, select, back), pointer, text, scroll, screenshot, logs, appstate. SSAP system buttons, perf memory, network dump, install/uninstall and the capability-matrix column follow in separate PRs.
agent-device plugins add @agent-device/webos
agent-device connect webos --device living-room
agent-device open com.example.app
agent-device snapshot -i
52 files. Also: kernel cdp-dom producer, an interactive-test option in capture-kit's desktop shaper, smoke fixtures, docs, a one-line provider-plugin catalog in help so help remote keeps its first-screen rules as plugins are added, and the TV flows of help remote in their own module (cli-help-tv.ts), which keeps cli-help.ts within its line limit. No linked issue.
Validation
Tested SHA 70420cb73, rebased on main bb960da51.
pnpm check:affected --run: every stage passed except unit, whose failures are unrelated.fill-verificationandcommitted-source-treealso fail intermittently onmain. Two script tests failed under machine load and pass when run alone.pnpm check:coverage-changedata9301f326, before the rebase: changed-line coverage is 370/408 (90.69%) against the 70% threshold.pnpm check:coverage-crapreports no touched function at or above 30.- Unit tests cover the device route against fakes: the
ares-inspecttunnel,connectTv, cancellableopen, a lease that ends whileopenwaits for the page, exit-onlyaresErrorrewrites, emptyfill, pointer, scroll, screenshot, covered controls, Map/Set log previews, and the inspector error in the open timeout. - Live at
b942ccd96:fill ""clears a filled input, andopen --relaunchkeeps one tunnel.pgrep -fl ares-inspectprints nothing afterdisconnectand after Ctrl-C duringopen. - Live at
a9301f326: snapshots hit-test interactive nodes. A control under another element is marked[covered],pressrefuses it with the cover named, andsnapshot -istill lists it. The output is in the PR conversation. - An independent review found four issues, all fixed.
- Live on an LG 32LQ63006LA (webOS TV 22, SDK 7.6.0, firmware 04.60.91):
connect,open,snapshot(41 nodes) /-i(18) /-s <label>(that subtree only), keys,screenshot,logs,appstate,apps,close. Afterdisconnect,pgrep -fl ares-inspectprints nothing. An app closed outside agent-device gives the typed "No webOS app is attached" error in 0.15 s; with the TV unreachable,openreturnsCOMMAND_FAILEDin 2.9 s; without the CLI,TOOL_MISSING.
Risks: experimental; no CI device lane.
š¤ Generated with Claude Code