From 63b16957587fe20566129ffc5191f66f24a70872 Mon Sep 17 00:00:00 2001 From: amankumarsingh77 Date: Wed, 29 Apr 2026 01:38:17 +0530 Subject: Replace socket daemon with direct CDP WebSocket connection Drops the Unix socket subprocess in favor of talking CDP directly over WebSocket from the extension. Removes the protocol's send/health helpers, simplifies setup to just verifying Chrome's remote debugging port, and tightens types in dynamic-tools. Bumps Node engine to >=22 and adds the ws dependency. --- src/index.ts | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'src/index.ts') diff --git a/src/index.ts b/src/index.ts index 2226cd7..31a7c28 100644 --- a/src/index.ts +++ b/src/index.ts @@ -57,7 +57,7 @@ export default function browserHarnessExtension(pi: ExtensionAPI) { // Commands // ═══════════════════════════════════════════════════════════════════════════ pi.registerCommand("browser-status", { - description: "Show browser daemon status and current page", + description: "Show browser connection status and current page", handler: async (_args, ctx) => { if (!daemon) { ctx.ui.notify("Browser daemon not started. Run /browser-setup first.", "warning"); @@ -66,15 +66,12 @@ export default function browserHarnessExtension(pi: ExtensionAPI) { const status = daemon.getStatus(); const lines = [ - `Browser Daemon: ${status.alive ? "🟢 Connected" : "🔴 Disconnected"}`, - `Namespace: ${status.namespace}`, - `Socket: ${status.socketPath}`, + `Browser: ${status.alive ? "🟢 Connected" : "🔴 Disconnected"}`, `Session: ${status.sessionId || "none"}`, - `PID: ${status.pid || "none"}`, ]; if (status.remoteBrowserId) { - lines.push(`Remote Browser: ${status.remoteBrowserId}`); + lines.push(`Browser ID: ${status.remoteBrowserId}`); } // Try to get current page info -- cgit v1.2.3