aboutsummaryrefslogtreecommitdiff
path: root/src/index.ts
diff options
context:
space:
mode:
authoramankumarsingh77 <amankumarsingh7702@gmal.com>2026-04-29 01:38:17 +0530
committeramankumarsingh77 <amankumarsingh7702@gmal.com>2026-04-29 01:38:17 +0530
commit63b16957587fe20566129ffc5191f66f24a70872 (patch)
tree8a40fa38e1ae5b4309b1e38d7a3779321f15db4e /src/index.ts
parent5317b32976edce3ab8e2f11d7fb4ff3f16dcac6f (diff)
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.
Diffstat (limited to 'src/index.ts')
-rw-r--r--src/index.ts9
1 files changed, 3 insertions, 6 deletions
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