the browser relay leaves, and /scrape stops pretending to be it
plugins/browser now owns the extension, the relay, the CDP bridge, the pairing routes and the two panels. All of it was on disk and switched off since 2026-08-13 — nothing was recovered from history, and nothing regressed, because none of it had been running. What the platform keeps is /scrape, and the two were never one feature split in half. Scrape launches a headless chromium through playwright as the OWNER and knows nobody; the plugin attaches to the browser a person is already signed into, scoped per pairing. The permission is renamed "Scraping" so the registry stops describing one thing in the other's words, and it drops the /browser frontend route it could no longer serve. Two dead screens went with it. BrowserScreen and DesktopScreen were officer-web screens rendering panels through appType placeholders — a plugin supplies its own route and panels through Plugins.gen.tsx, so both were redundant the moment their plugins existed. DesktopScreen was a leftover from this morning's extraction that typechecked cleanly while rendering a panel the AppRegistry no longer had: dead at runtime, invisible to the compiler. The long comment in server.tsx explaining BROWSER_RELAY_PORT goes too, replaced by a pointer to where it lives now. It was written for whoever did this extraction, and this is that. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
+6
-24
@@ -23,7 +23,6 @@ import { startNudger } from './servers/api/chat/nudger';
|
||||
import { taskRunnerWebsocket } from './servers/api/tasks/task-executor';
|
||||
import { pipelineWebsocket } from './servers/api/tasks/pipeline-executor';
|
||||
import officerWeb from './apps/officer-web/index.gen.html';
|
||||
// import { startBrowserRelay } from './servers/api/browser/relay'; // switched off — see below
|
||||
import { registerSidecar, unregisterSidecar, handleSidecarMessage } from './servers/sidecar-registry';
|
||||
import { sendProvisionableUsers } from './servers/plugins/user-provisioning';
|
||||
import './servers/api/chat/opencode/sidecar-server'; // subscribe to the opencode sidecar's port report
|
||||
@@ -512,30 +511,13 @@ console.log(`🚀 Server running at ${server.url}`);
|
||||
//
|
||||
// The Chrome extension, its CDP bridge (api/browser/) and the /browser screen all remain on disk: this
|
||||
// is going to be extracted into a plugin, and deleting it would mean writing it again. What is switched
|
||||
// off is the second listener and the /api/browser mount (see hono.ts) — the platform serves one port.
|
||||
// The browser relay left for `plugins/browser` on 2026-08-21. It ran a SECOND listener from this process,
|
||||
// which is why it was switched off here on 2026-08-13 — the platform serves one port. As a plugin it is a
|
||||
// sidecar, which is a process allowed its own listeners, so the objection no longer applies.
|
||||
//
|
||||
// It used to read BROWSER_RELAY_PORT, default 18792. The name is recorded here because there is nothing
|
||||
// left to grep for, and whoever does the extraction needs to know what it was called.
|
||||
//
|
||||
// ── Read this before turning it back on ──
|
||||
//
|
||||
// The port is not only configuration. relay-auth.ts derives each extension's token as
|
||||
// HMAC(JWT_SECRET, `officer-browser-relay-v1:${port}:${userId}:${salt}`), so the port is an INPUT TO A
|
||||
// CREDENTIAL. Bringing the relay back on a different number silently invalidates every paired browser,
|
||||
// and the extension reports it as "Relay not reachable" — which SETUP.md attributes to a wrong address,
|
||||
// port or token. Re-pairing means re-copying from Settings → Browser Relay.
|
||||
//
|
||||
// Whatever it comes back as, it cannot be a kernel-assigned port:0 the way the other sidecars are. The
|
||||
// extension is configured by hand and stores the value, so a port that changes each restart breaks the
|
||||
// pairing every restart. It has to be predictable — PORT + 2 is the shape the Anthropic proxy already
|
||||
// uses for the same reason.
|
||||
//
|
||||
// try {
|
||||
// await startBrowserRelay(BROWSER_RELAY_PORT);
|
||||
// console.log(`[browser-relay] listening on port ${BROWSER_RELAY_PORT}`);
|
||||
// } catch (err) {
|
||||
// console.error('[browser-relay] failed to start:', err instanceof Error ? err.message : err);
|
||||
// }
|
||||
// The port and everything that depended on it moved with it, including the reason it cannot be
|
||||
// kernel-assigned: the extension stores the number by hand AND the number is an input to the token HMAC.
|
||||
// See plugins/browser/sidecar/protocol.ts.
|
||||
|
||||
// Initialize queue engine in API server process
|
||||
import {
|
||||
|
||||
Reference in New Issue
Block a user