Skip to content

An agentic browser harness: an AI side panel & orb in your own logged-in Chrome, Edge, Arc, Brave or even Firefox run by the agent/subscription you already use (Claude Code, Codex, Antigravity). Free, open source, no API key. Also an MCP server.

fix(daemon): resolve the source-checkout extension from the repo root again

Shahriar95fffe4b97b8
diff --git a/package.json b/package.json
index f92553f..355bee5 100644
--- a/package.json
+++ b/package.json
@@ -25,7 +25,7 @@
"daemon:restart": "yarn daemon:build && node src/daemon/dist/cli.js restart",
"daemon:manifest": "yarn daemon:build && node src/daemon/dist/cli.js tools",
"daemon:link": "cd src/daemon && npm link",
- "daemon:unlink": "npm rm -g browsentic"
+ "daemon:unlink": "npm rm -g browsentic @browsentic/mcp"
},
"dependencies": {
"@radix-ui/react-scroll-area": "^1.2.16",
diff --git a/scripts/setup.mjs b/scripts/setup.mjs
index 0a50ade..0b6002f 100644
--- a/scripts/setup.mjs
+++ b/scripts/setup.mjs
@@ -54,5 +54,5 @@ console.log(`
Two steps are left. Both reach outside this directory, so they stay separate:
yarn daemon:link puts \`browsentic\` on your PATH (writes to the global npm prefix)
- browsentic pair prints a single use code, valid for 10 minutes
+ browsentic pair prints a single use code, valid for 10 minutes
`);
diff --git a/src/daemon/paths.ts b/src/daemon/paths.ts
index 043add9..a3c3cf5 100644
--- a/src/daemon/paths.ts
+++ b/src/daemon/paths.ts
@@ -51,13 +51,14 @@ export interface InstallStamp {
* `npm i` or `npx` install has, and it mirrors how bundled skills already resolve
* (see agent/skills.ts).
* 2. `<repo>/dist/chrome-mv3` — a source checkout, i.e. `yarn daemon:link` or running
- * `node mcp/dist/cli.js` directly.
+ * `node src/daemon/dist/cli.js` directly. Count the levels from the *bundle*, not from
+ * this source file: cli.js sits at `<repo>/src/daemon/dist/`, so the repo root is three up.
*/
export function packagedExtension(): { dir: string; source: 'package' | 'repo' } | null {
const here = dirname(fileURLToPath(import.meta.url));
const candidates = [
{ dir: join(here, '..', 'extension', 'chrome-mv3'), source: 'package' as const },
- { dir: join(here, '..', '..', '..', '..', 'dist', 'chrome-mv3'), source: 'repo' as const },
+ { dir: join(here, '..', '..', '..', 'dist', 'chrome-mv3'), source: 'repo' as const },
];
return candidates.find((c) => existsSync(join(c.dir, 'manifest.json'))) ?? null;
}
diff --git a/src/daemon/scripts/stage-extension.mjs b/src/daemon/scripts/stage-extension.mjs
index 346337e..a965f05 100644
--- a/src/daemon/scripts/stage-extension.mjs
+++ b/src/daemon/scripts/stage-extension.mjs
@@ -2,7 +2,7 @@
// Copies the built extension into the package so it can ship in the npm tarball.
//
// npm's `files` allowlist cannot reference paths above the package root, and the extension
-// builds to <repo>/dist/chrome-mv3 — a sibling of mcp/, not a descendant. So it has to be
+// builds to <repo>/dist/chrome-mv3 — a sibling of src/daemon/, not a descendant. So it has to be
// staged inward before packing.
//
// This runs as `prepack`, which means it runs for `npm pack` and `npm publish` alike, so a