Browser Extension
The browser extension sends allowlisted site content snapshots to the local WebLayer daemon and applies the daemon's returned DOM commands. Chrome and Firefox use the same shared source with browser-specific manifests.
Build Development Extensions
This creates browser-extension/dist/chrome and
browser-extension/dist/firefox.
Load in Chrome
- Open
chrome://extensions. - Enable Developer mode.
- Choose Load unpacked.
- Select
browser-extension/dist/chrome.
Load in Firefox
- Open
about:debugging. - Choose This Firefox.
- Choose Load Temporary Add-on.
- Select
browser-extension/dist/firefox/manifest.json.
Daemon Contract
The extension captures content only through explicit site adapters. Unknown
hosts, unknown page surfaces, and unknown DOM structures send nothing. The
current adapter supports X.com and Twitter URLs for home, explore, search, and
status pages, and it captures visible top-level article[data-testid="tweet"]
post regions. X snapshots include observed post metadata such as post ID,
author handle, visible order, and Replying to @... handles so the daemon can
build the visible reply tree and decide any hide cascade. Quoted posts stay
inside the captured post snapshot; nested quoted-post cards are not targeted as
separate feedback regions.
The extension opens a WebSocket to:
It sends DOM analysis events and receives command events. The daemon can push
immediate pending commands, such as insertFeedbackControl, before local
analysis finishes. When a final answer is already cached, the daemon can push
final immediately without a pending event.
The REST endpoint remains available as a fallback and smoke-test path:
The extension also sends user feedback to the daemon:
Supported DOM command actions are keep, hide, dim, insertLabel,
insertFeedbackControl, replaceText, and showDebugStats. The daemon emits
showDebugStats only when X debug stats are enabled. On X pages the extension
renders that payload in the right sidebar when the sidebar is available, with a
link to the local daemon dashboard.
The extension decides only which site content surfaces may be captured. It does not make filtering decisions. The daemon interprets captured content and decides what commands to return.