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.

feat(cli): recognise an install laid down by the macOS app and leave its updates to the app

Shahriarc0e0495e9665
diff --git a/src/daemon/npx.ts b/src/daemon/npx.ts
index 99da0b4..a411594 100644
--- a/src/daemon/npx.ts
+++ b/src/daemon/npx.ts
@@ -6,7 +6,10 @@ import { fileURLToPath } from 'node:url';
/** The installed package, whatever tree it landed in. The bundle sits one level down, in dist/. */
export const packageRoot = resolve(dirname(fileURLToPath(import.meta.url)), '..');
-export type InstallKind = 'npx' | 'global' | 'repo';
+export type InstallKind = 'npx' | 'global' | 'repo' | 'app';
+
+/** Written beside the payload by Browsentic.app when it lays the CLI down in ~/.browsentic/cli. */
+export const APP_MARKER = '.browsentic-app.json';
const inNpxCache = (path: string) => path.split(sep).includes('_npx');
@@ -16,6 +19,7 @@ const inNpxCache = (path: string) => path.split(sep).includes('_npx');
*/
export function installKind(): InstallKind {
if (inNpxCache(packageRoot)) return 'npx';
+ if (existsSync(join(packageRoot, APP_MARKER))) return 'app';
// A build config the `files` allowlist never ships. Checking for the extension payload
// instead would misread a checkout that still has src/daemon/extension/ staged from a
// previous `npm pack`, which is the normal state of a maintainer's tree.
diff --git a/src/daemon/self-update.ts b/src/daemon/self-update.ts
index c3d40ec..3732103 100644
--- a/src/daemon/self-update.ts
+++ b/src/daemon/self-update.ts
@@ -58,6 +58,12 @@ export async function upgradeCli(current: string, forward: string[]): Promise<nu
return null;
}
+ if (kind === 'app') {
+ console.error(`\n ! browsentic ${latest} is published; this is ${current}, installed by Browsentic.app.`);
+ console.error(` Update it from the app, which replaces the command and the extension together.\n`);
+ return null;
+ }
+
console.error(`\n ↻ Updating the command itself, ${current} → ${latest}\n`);
const rerun = [...forward, '--no-self-update'];