MCPcopy Create free account
hub / github.com/ChromeDevTools/chrome-devtools-mcp / assertValidSessionId

Function assertValidSessionId

src/daemon/utils.ts:26–33  ·  view source on GitHub ↗
(sessionId: string)

Source from the content-addressed store, hash-verified

24export const DAEMON_CLIENT_NAME = 'chrome-devtools-cli-daemon';
25
26export function assertValidSessionId(sessionId: string): void {
27 if (!sessionId) {
28 return;
29 }
30 if (!/^[a-fA-F0-9-]+$/.test(sessionId)) {
31 throw new Error(`Invalid sessionId: ${sessionId}`);
32 }
33}
34
35// Using these paths due to strict limits on the POSIX socket path length.
36export function getSocketPath(sessionId: string): string {

Callers 8

daemon.tsFile · 0.85
getSocketPathFunction · 0.85
getRuntimeHomeFunction · 0.85
getPidFilePathFunction · 0.85
getDaemonPidFunction · 0.85
isDaemonRunningFunction · 0.85
chrome-devtools.tsFile · 0.85
utils.test.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected