Skip to content

Forge Chat (Chrome extension)

Toolbar icon that opens the Forge session launcher as a docked Chrome side panel (right edge of the browser, resizes/moves with the window, stays open when you click into the page). Click the icon, the panel docks; use + New Session to push an agent.

How it works (thin shell, 2026-07-04)

The panel is a full-bleed iframe of the LIVE app, not a bundled copy. All JS/CSS/HTML come from the server, so a website change shows up on the next panel reload with no reinstall. Before this the extension bundled launcher.js and every launcher change meant re-downloading the extension on each machine (MV3 bans loading remote JS into an extension page; iframing the site sidesteps that, since the site's own JS runs in the site's origin, not the extension's).

  • side_panel.default_path = sidepanel.html; the background worker calls chrome.sidePanel.setPanelBehavior({openPanelOnActionClick:true}) so the toolbar icon toggles the panel (Chrome 114+).
  • sidepanel.html is just an <iframe id="app">. config.js sets window.FORGE_CHAT_URL; panel.js points the iframe at it. Both external because the MV3 extension-page CSP (script-src 'self') blocks inline scripts.
  • manifest.json carries a fixed "key" so the extension id is stable (oolcpdakkjdlmodlinblbalhaodhiflb). The app sends Content-Security-Policy: frame-ancestors 'self' chrome-extension://<that-id> so this one extension , and nobody else , may frame it.

LAN build (committed) vs works-anywhere build (downloaded)

  • This committed folder = LAN build. config.js points the iframe at http://192.168.86.50:7365/ui/. Auth is the launcher's bearer-token path: paste SESSION_LAUNCHER_TOKEN (from forge/.env) once into the app's token field; it lives in the iframe origin's localStorage, never in git.
  • Off-LAN = works-anywhere build. Download it from the app itself (GET /api/extension/download, behind CF Access). That build points the iframe at https://chat.justinsforge.com/ui/ and adds a declarativeNetRequest rules.json that injects the CF Access service token on every request to that host, so it authenticates on any network with no login. rules.json holds the secret and exists only in the downloaded zip.

Install (per machine running Chrome: Sol, Vector)

  1. Get the folder: Get the extension button in the app (off-LAN, recommended) or scp/git pull this folder (LAN).
  2. chrome://extensions -> Developer mode on.
  3. Load unpacked -> select the folder (unzip first if downloaded).
  4. Pin Forge Chat, click the icon, accept the permissions.

Requires Chrome 114+ (side panel API). This is the last manual install; after it, launcher changes auto-load on reload.

Files

  • manifest.json MV3 manifest: sidePanel + declarativeNetRequest, stable key.
  • background.js service worker: enables open-on-action-click.
  • sidepanel.html the docked panel: a single iframe.
  • config.js sets FORGE_CHAT_URL (LAN default; download build overrides it).
  • panel.js points the iframe at FORGE_CHAT_URL.
  • rules.json (download build only) DNR rule injecting the CF Access token.
  • icons/ 16/48/128 px toolbar icons.

Notes

  • The launcher SPA (launcher.js/css) is NOT here anymore , it's served live from sites/justinsforge.com/chat/ and loaded in the iframe. Edit it there.
  • scripts/forge_chat_ext_sync.sh --push now only pushes the SHELL files to Vector, needed only when a shell file (manifest/background/sidepanel/config/panel.js) changes. Launcher edits need nothing here.
  • No store listing: load-unpacked, private to your machines.