aboutsummaryrefslogtreecommitdiff
path: root/src/daemon/bridge.ts
diff options
context:
space:
mode:
authoramankumarsingh77 <amankumarsingh7702@gmail.com>2026-07-28 21:47:21 +0530
committerAman Kumar <145339995+amankumarsingh77@users.noreply.github.com>2026-08-02 19:12:46 +0530
commitaedbb88a8025851067be9f77ec406b29d65599a8 (patch)
tree8e62b333e4aad20998056614e19acd34ff6abc3b /src/daemon/bridge.ts
parentea11182a0e8cb62d208b5b53a60c98c8bdef9e9a (diff)
refactor: delete exports and knobs that nothing calls
isInternalUrl, SPECIAL_KEYS, andThen and mapErr had no callers in src or test. BrowserState.remoteBrowserId was parsed on restore and never written — the field that is actually read lives on DaemonStatus. IpcServer.disconnectClient and IpcServer.clients() were unreachable, as was EventRouter.allClients and a write-only lineCount counter. DAEMON_STALE_SOCKET_CLEANUP was a hardcoded true with an if around it, so the unlink now runs unconditionally. CdpBridge.isAlive and getSessionOwner look equally dead from src/ alone, but test/manual/bridge-test.ts drives both — they are the only seams that suite has, so they stay. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Diffstat (limited to 'src/daemon/bridge.ts')
-rw-r--r--src/daemon/bridge.ts8
1 files changed, 0 insertions, 8 deletions
diff --git a/src/daemon/bridge.ts b/src/daemon/bridge.ts
index 95f6888..d9a54ed 100644
--- a/src/daemon/bridge.ts
+++ b/src/daemon/bridge.ts
@@ -17,8 +17,6 @@ export type CdpBridge = {
stop(): Promise<void>;
handleRequest(req: WireRequest, clientId: string, send: SendToClient): Promise<void>;
isAlive(): boolean;
- recordSession(clientId: string, sessionId: string): void;
- releaseSession(sessionId: string): void;
getSessionOwner(sessionId: string): string | undefined;
removeClient(clientId: string): void;
onEvent(handler: EventHandler): void;
@@ -98,10 +96,6 @@ class EventRouter {
}
return [...this.clientSessions.keys()];
}
-
- allClients(): string[] {
- return [...this.clientSessions.keys()];
- }
}
export const createCdpBridge = (): CdpBridge => {
@@ -357,8 +351,6 @@ export const createCdpBridge = (): CdpBridge => {
stop,
handleRequest,
isAlive: () => ws !== null && ws.readyState === WebSocket.OPEN,
- recordSession: (cid, sid) => router.record(cid, sid),
- releaseSession: (sid) => router.release(sid),
getSessionOwner: (sid) => router.getOwner(sid),
removeClient: (cid) => { mux.clearClient(cid); router.removeClient(cid); },
onEvent: (h) => { eventHandler = h; },