# ShowRunner DOM Capture (Chrome Extension)

This folder contains a lightweight MV3 Chrome extension that captures **metadata-only** DOM
workflow events and forwards them to the ShowRunner Python sidecar on `http://127.0.0.1:8765`
**only while a ShowRunner recording is active**.

It’s intended to make workflow detection more scalable than relying on window-title heuristics
alone, by adding DOM-level semantics like:

- Navigation events with full URLs (good for search query inference via URL parameters)
- Click targets with roles/labels/text previews (good for “open first email”)
- Form submissions and input changes (records `value_len`, not raw text)

## Install (Developer)

1. Open Chrome and go to `chrome://extensions`
2. Enable **Developer mode**
3. Click **Load unpacked**
4. Select this folder:
   `/Users/farman/Documents/projects/showrunner/docs`

## Safety Defaults

- Skips incognito tabs
- Skips password fields
- Uses a simple built-in blocklist for clearly sensitive domains (password managers, major banks,
  common healthcare portals)
- Does not capture raw typed text by default

## Files

- `manifest.json`
- `background.js` (forwards events to sidecar `/api/events/append`, batches writes)
- `content.js` (captures DOM signals)
