UNPKG

@phren/cli

Version:

Knowledge layer for AI agents - CLI, MCP server, and data layer

11 lines (10 loc) • 485 B
import { createHash } from "node:crypto"; import path from "node:path"; import { bridgeRoot } from "./protocol.js"; /** One endpoint per Hook root; Windows pipes live outside the filesystem. */ export function browserSocketPath(root = bridgeRoot()) { if (process.platform !== "win32") return path.join(root, "browser.sock"); const id = createHash("sha256").update(path.resolve(root).toLowerCase()).digest("hex"); return String.raw `\\.\pipe\phren-browser-${id}`; }