Browser Extension¶
The browser extension (plugins/browser-extension) covers the surface the CLI plugins can't
reach: web chat. It intercepts submissions in ChatGPT and Claude.ai, scans them against the
same rules, and records findings to the same local store — ~/.aka/data/aka.db — so browser
detections sit alongside Claude Code, Codex, and Antigravity ones in aka findings and the
dashboard.
It is a Chrome MV3 extension with a single permission (nativeMessaging) and content scripts
matching:
https://chatgpt.com/*https://chat.openai.com/*https://claude.ai/*
How it works¶
The extension never talks to a network service. Its only privileged channel is a native-messaging host running locally under Node:
- A content script watches the composer's submit gesture on a supported provider and calls
preventDefault()before the message leaves the page. - It relays the text to the MV3 service worker, which owns the one
chrome.runtime.connectNativeport (content scripts cannot open one themselves). - The native host scans the text with the same detection engine and returns a decision — block, warn, or redact — which the content script renders as an in-page banner.
- An approved send is re-triggered programmatically, guarded so the re-fired gesture doesn't re-enter the interceptor.
Fail-open holds here too: a host that isn't installed, has died, or is wedged is bounded by a 3-second relay deadline, after which the send proceeds rather than the message silently vanishing.
Installing¶
Two halves — the native host (installed by the aka CLI) and the extension itself (loaded in
Chrome).
That writes the native-messaging host manifest and a launcher into Chrome's per-OS manifest
directory (plus the HKCU\Software\Google\Chrome\NativeMessagingHosts\… registry key on Windows),
pointing at a bundled Node host script. Then load the extension:
- Open
chrome://extensions. - Enable Developer mode (top right).
- Click Load unpacked and select the extension's built
distdirectory — the pathaka extension installprints when it finishes.
Check the host side any time with:
Not yet on the Chrome Web Store
The extension package is unpublished (private in its package.json), so Load unpacked
is the install path today. The extension id is pinned by the public key committed in
manifest.json, so it stays stable across machines and rebuilds — which is what lets the
native host's allowed_origins be locked to it.
Building from a workspace checkout:
node must be on your PATH — Chrome executes the launcher, and the launcher execs Node over the
host script.
Uninstalling¶
Remove the extension from chrome://extensions, and delete the native-messaging manifest and
launcher from the directory aka extension status reports (on Windows, also remove the registry
key above). Neither step touches ~/.aka — see Uninstalling.