Replace the hand-rolled MV3 extension (extension/manifest.json, content.js, sidepanel.js, vendored wllama/) with a wxt project mirroring play-ai/apps/extension (wxt 0.20.26, bun, vanilla TS side panel).
Why: wxt removes the hand-rolled manifest/CSP/wasm/worker risk, exposes a CDP endpoint so agent-browser can drive .output/chrome-mv3 for a real-browser smoke test (does wllama's WASM actually run under MV3 CSP?), and makes the pure grounding/DOM-extraction logic unit-testable via vitest.
Plan: .agents/plans/2026-07-16-wxt-extension.md
Scope:
- Port
content.js -> entrypoints/content.ts (extract roleOf/labelOf/isVisible/extractPage for jsdom unit tests)
- Port
sidepanel.js -> entrypoints/sidepanel/main.ts (npm @wllama/wllama, not vendored copy)
- Port
background.js -> entrypoints/background.ts
- Port
grounding.js -> lib/grounding.ts verbatim
wxt.config.ts with CDP webExt wiring (--remote-debugging-port=9222)
- Unit tests:
grounding.test.ts, content-map.test.ts
- Real-browser smoke test via agent-browser (not Playwright, per global rule)
- Delete hand-rolled files once ported
Out of scope: Firefox build target, multi-step agent behavior, model/training changes.
Replace the hand-rolled MV3 extension (
extension/manifest.json,content.js,sidepanel.js, vendoredwllama/) with a wxt project mirroringplay-ai/apps/extension(wxt 0.20.26, bun, vanilla TS side panel).Why: wxt removes the hand-rolled manifest/CSP/wasm/worker risk, exposes a CDP endpoint so agent-browser can drive
.output/chrome-mv3for a real-browser smoke test (does wllama's WASM actually run under MV3 CSP?), and makes the pure grounding/DOM-extraction logic unit-testable via vitest.Plan:
.agents/plans/2026-07-16-wxt-extension.mdScope:
content.js->entrypoints/content.ts(extractroleOf/labelOf/isVisible/extractPagefor jsdom unit tests)sidepanel.js->entrypoints/sidepanel/main.ts(npm@wllama/wllama, not vendored copy)background.js->entrypoints/background.tsgrounding.js->lib/grounding.tsverbatimwxt.config.tswith CDP webExt wiring (--remote-debugging-port=9222)grounding.test.ts,content-map.test.tsOut of scope: Firefox build target, multi-step agent behavior, model/training changes.