Skip to content

Chrome DevTools for coding agents

refactor: import types and values from a module in one statement (#3303)

Nikolay Vitkovf4eaf1facebf
diff --git a/scripts/eval_gemini.ts b/scripts/eval_gemini.ts
index 68cce58f..9712ca22 100644
--- a/scripts/eval_gemini.ts
+++ b/scripts/eval_gemini.ts
@@ -15,8 +15,11 @@ import {Client} from '@modelcontextprotocol/client';
import {StdioClientTransport} from '@modelcontextprotocol/client/stdio';
import {TestServer} from '../build/tests/server.js';
-import type {CapturedFunctionCall, TestScenario} from './eval_result.js';
-import {Result} from './eval_result.js';
+import {
+ Result,
+ type CapturedFunctionCall,
+ type TestScenario,
+} from './eval_result.js';
const ROOT_DIR = path.resolve(import.meta.dirname, '..');
const SCENARIOS_DIR = path.join(import.meta.dirname, 'eval_scenarios');
diff --git a/src/BrowserManager.ts b/src/BrowserManager.ts
index 3cc1a635..66a1195d 100644
--- a/src/BrowserManager.ts
+++ b/src/BrowserManager.ts
@@ -10,12 +10,13 @@ import os from 'node:os';
import path from 'node:path';
import type {ReadonlyServerConfig} from './config/ServerConfig.js';
-import type {
- Browser,
- ChromeReleaseChannel,
- LaunchOptions,
+import {
+ Mutex,
+ puppeteer,
+ type Browser,
+ type ChromeReleaseChannel,
+ type LaunchOptions,
} from './third_party/index.js';
-import {Mutex, puppeteer} from './third_party/index.js';
import {
logger,
puppeteerLogger,
diff --git a/src/McpContext.ts b/src/McpContext.ts
index 83d3664e..19103716 100644
--- a/src/McpContext.ts
+++ b/src/McpContext.ts
@@ -21,7 +21,7 @@ import type {
HeapQueryOptions,
} from './processors/HeapSnapshotManager.js';
import {McpPage} from './McpPage.js';
-import {type UncaughtError} from './collectors/PageCollector.js';
+import type {UncaughtError} from './collectors/PageCollector.js';
import {ServiceWorkerConsoleCollector} from './collectors/ServiceWorkerCollector.js';
import {
Locator,
diff --git a/src/McpResponse.ts b/src/McpResponse.ts
index 60594cd0..4a380b00 100644
--- a/src/McpResponse.ts
+++ b/src/McpResponse.ts
@@ -43,15 +43,17 @@ import type {McpContext} from './McpContext.js';
import type {McpPage} from './McpPage.js';
import {UncaughtError} from './collectors/PageCollector.js';
import {TextSnapshot} from './TextSnapshot.js';
-import {DevTools, getToonEncode, getGcfEncode} from './third_party/index.js';
-import type {
- ConsoleMessage,
- ImageContent,
- ResourceType,
- TextContent,
- Extension,
- HTTPRequest,
- Protocol,
+import {
+ DevTools,
+ getToonEncode,
+ getGcfEncode,
+ type ConsoleMessage,
+ type ImageContent,
+ type ResourceType,
+ type TextContent,
+ type Extension,
+ type HTTPRequest,
+ type Protocol,
} from './third_party/index.js';
import {handleDialog, listPages} from './tools/pages.js';
import type {ToolGroups} from './tools/thirdPartyDeveloper.js';
@@ -70,8 +72,7 @@ import {
getTraceSummary,
} from './processors/PerformanceTrace.js';
import type {CD4ACommentThread, PaginationOptions} from './types.js';
-import type {WithSymbolId} from './utils/id.js';
-import {stableIdSymbol} from './utils/id.js';
+import {stableIdSymbol, type WithSymbolId} from './utils/id.js';
import {paginate} from './utils/pagination.js';
import {getFilterableResourceType} from './utils/resourceType.js';
import {truncateText} from './utils/text.js';
diff --git a/src/ToolHandler.ts b/src/ToolHandler.ts
index 3ee6322a..653435ec 100644
--- a/src/ToolHandler.ts
+++ b/src/ToolHandler.ts
@@ -11,23 +11,26 @@ import type {McpPage} from './McpPage.js';
import {McpResponse, type DataFormat} from './McpResponse.js';
import {SlimMcpResponse} from './SlimMcpResponse.js';
import {ClearcutLogger} from './telemetry/ClearcutLogger.js';
-import type {Browser, CallToolResult} from './third_party/index.js';
-import {ProtocolError, ProtocolErrorCode, zod} from './third_party/index.js';
+import {
+ ProtocolError,
+ ProtocolErrorCode,
+ zod,
+ type Browser,
+ type CallToolResult,
+} from './third_party/index.js';
import {labels} from './tools/categories.js';
import {categoryToFlagName} from './config/category-options.js';
-import type {
- AnyToolDefinition,
- BrowserlessToolDefinition,
- DefinedPageTool,
- DevToolsData,
- FileVerificationOption,
- ToolDefinition,
-} from './tools/ToolDefinition.js';
import {
isAvailableInMode,
isBrowserlessTool,
isPageScopedTool,
isSlimTool,
+ type AnyToolDefinition,
+ type BrowserlessToolDefinition,
+ type DefinedPageTool,
+ type DevToolsData,
+ type FileVerificationOption,
+ type ToolDefinition,
} from './tools/ToolDefinition.js';
import {getErrorMessage} from './utils/errorHandling.js';
import {logger} from './utils/logger.js';
diff --git a/src/collectors/PageCollector.ts b/src/collectors/PageCollector.ts
index 1b5dc1e6..25c87dcb 100644
--- a/src/collectors/PageCollector.ts
+++ b/src/collectors/PageCollector.ts
@@ -5,18 +5,19 @@
*/
import {FakeIssuesManager} from '../devtools/DevtoolsUtils.js';
-import type {
- CDPSession,
- ConsoleMessage,
- Protocol,
- Issue,
- Frame,
- Handler,
- HTTPRequest,
- Page,
- PageEvents as PuppeteerPageEvents,
+import {
+ DevTools,
+ FrameEvent,
+ type CDPSession,
+ type ConsoleMessage,
+ type Protocol,
+ type Issue,
+ type Frame,
+ type Handler,
+ type HTTPRequest,
+ type Page,
+ type PageEvents as PuppeteerPageEvents,
} from '../third_party/index.js';
-import {DevTools, FrameEvent} from '../third_party/index.js';
import {
createIdGenerator,
stableIdSymbol,
diff --git a/src/collectors/ServiceWorkerCollector.ts b/src/collectors/ServiceWorkerCollector.ts
index a2e2a8ae..3487f018 100644
--- a/src/collectors/ServiceWorkerCollector.ts
+++ b/src/collectors/ServiceWorkerCollector.ts
@@ -14,8 +14,11 @@ import type {
Browser,
} from '../third_party/index.js';
import type {McpWorker} from '../McpWorker.js';
-import type {WithSymbolId} from '../utils/id.js';
-import {createIdGenerator, stableIdSymbol} from '../utils/id.js';
+import {
+ createIdGenerator,
+ stableIdSymbol,
+ type WithSymbolId,
+} from '../utils/id.js';
const CHROME_EXTENSION_PREFIX = 'chrome-extension://';
diff --git a/src/config/ConfigParser.ts b/src/config/ConfigParser.ts
index 28c47616..03e861b4 100644
--- a/src/config/ConfigParser.ts
+++ b/src/config/ConfigParser.ts
@@ -8,8 +8,12 @@ import {readFileSync} from 'node:fs';
import type {Argv} from 'yargs';
-import type {YargsOptions, InferredOptionTypes} from '../third_party/cli.js';
-import {yargs, hideBin} from '../third_party/cli.js';
+import {
+ yargs,
+ hideBin,
+ type YargsOptions,
+ type InferredOptionTypes,
+} from '../third_party/cli.js';
import {getErrorMessage} from '../utils/errorHandling.js';
import {ConfigLocator} from './ConfigLocator.js';
diff --git a/src/devtools/DevtoolsUtils.ts b/src/devtools/DevtoolsUtils.ts
index a9e9218a..6ff035af 100644
--- a/src/devtools/DevtoolsUtils.ts
+++ b/src/devtools/DevtoolsUtils.ts
@@ -4,11 +4,11 @@
* SPDX-License-Identifier: Apache-2.0
*/
-import {DevTools} from '../third_party/index.js';
-import type {
- CDPSession,
- ConsoleMessage,
- Protocol,
+import {
+ DevTools,
+ type CDPSession,
+ type ConsoleMessage,
+ type Protocol,
} from '../third_party/index.js';
import {McpHostBindingAdapter} from './McpHostBindingAdapter.js';
diff --git a/src/formatters/RemoteObjectFormatter.ts b/src/formatters/RemoteObjectFormatter.ts
index 6d633896..50a29cd4 100644
--- a/src/formatters/RemoteObjectFormatter.ts
+++ b/src/formatters/RemoteObjectFormatter.ts
@@ -29,8 +29,7 @@
* trimEndWithMaxLength() inline is named MAX_DESCRIPTION_LENGTH.
*/
-import {DevTools} from '../third_party/index.js';
-import type {Protocol} from '../third_party/index.js';
+import {DevTools, type Protocol} from '../third_party/index.js';
const {StringUtilities} = DevTools.Platform;
diff --git a/src/telemetry/watchdog/main.ts b/src/telemetry/watchdog/main.ts
index 2407c126..ec3ccc3d 100644
--- a/src/telemetry/watchdog/main.ts
+++ b/src/telemetry/watchdog/main.ts
@@ -10,8 +10,7 @@ import readline from 'node:readline';
import {parseArgs} from 'node:util';
import {logger, flushLogs, saveLogsToFile} from '../../utils/logger.js';
-import type {OsType} from '../types.js';
-import {WatchdogMessageType} from '../types.js';
+import {WatchdogMessageType, type OsType} from '../types.js';
import {ClearcutSender} from './ClearcutSender.js';
diff --git a/src/tools/ToolDefinition.ts b/src/tools/ToolDefinition.ts
index 73af5e40..714f0e36 100644
--- a/src/tools/ToolDefinition.ts
+++ b/src/tools/ToolDefinition.ts
@@ -21,25 +21,25 @@ import type {
ContextFilterOptions,
HeapSnapshotFormatOptions,
} from '../formatters/HeapSnapshotFormatter.js';
-import {zod} from '../third_party/index.js';
-import type {
- Dialog,
- ElementHandle,
- Extension,
- GetPWAStateOptions,
- InstallPWAOptions,
- LaunchPWAOptions,
- PWAState,
- ScreenRecorder,
- ScreenRecording,
- UninstallPWAOptions,
- Viewport,
- DevTools,
- Flags,
- Protocol,
- Page,
- RunnerResult,
- WebMCPTool,
+import {
+ zod,
+ type Dialog,
+ type ElementHandle,
+ type Extension,
+ type GetPWAStateOptions,
+ type InstallPWAOptions,
+ type LaunchPWAOptions,
+ type PWAState,
+ type ScreenRecorder,
+ type ScreenRecording,
+ type UninstallPWAOptions,
+ type Viewport,
+ type DevTools,
+ type Flags,
+ type Protocol,
+ type Page,
+ type RunnerResult,
+ type WebMCPTool,
} from '../third_party/index.js';
import type {InsightName, TraceResult} from '../processors/PerformanceTrace.js';
import type {
diff --git a/src/tools/console.ts b/src/tools/console.ts
index 1c29bafe..3239f27b 100644
--- a/src/tools/console.ts
+++ b/src/tools/console.ts
@@ -5,8 +5,7 @@
*/
import type {ParsedArguments} from '../config/mcp-options.js';
-import {zod} from '../third_party/index.js';
-import type {ConsoleMessageType} from '../third_party/index.js';
+import {zod, type ConsoleMessageType} from '../third_party/index.js';
import {ToolCategory} from './categories.js';
import {definePageTool, type PageToolFactory} from './ToolDefinition.js';
diff --git a/src/tools/input.ts b/src/tools/input.ts
index 4c5ea231..91bf5ee9 100644
--- a/src/tools/input.ts
+++ b/src/tools/input.ts
@@ -4,16 +4,23 @@
* SPDX-License-Identifier: Apache-2.0
*/
-import {TimeoutError, zod} from '../third_party/index.js';
-import type {ElementHandle, KeyInput} from '../third_party/index.js';
+import {
+ TimeoutError,
+ zod,
+ type ElementHandle,
+ type KeyInput,
+} from '../third_party/index.js';
import type {TextSnapshotNode} from '../types.js';
import {invalidKeyMessage, isValidKey, parseKey} from '../utils/keyboard.js';
import {logger} from '../utils/logger.js';
import type {WaitForEventsResult} from '../utils/WaitForHelper.js';
import {ToolCategory} from './categories.js';
-import type {ContextPage, PageToolFactory} from './ToolDefinition.js';
-import {definePageTool} from './ToolDefinition.js';
+import {
+ definePageTool,
+ type ContextPage,
+ type PageToolFactory,
+} from './ToolDefinition.js';
const dblClickSchema = zod
.boolean()
diff --git a/src/tools/network.ts b/src/tools/network.ts
index 2e8770ed..0fa81880 100644
--- a/src/tools/network.ts
+++ b/src/tools/network.ts
@@ -5,8 +5,7 @@
*/
import type {ParsedArguments} from '../config/mcp-options.js';
-import {zod} from '../third_party/index.js';
-import type {ResourceType} from '../third_party/index.js';
+import {zod, type ResourceType} from '../third_party/index.js';
import {ToolCategory} from './categories.js';
import {definePageTool, type PageToolFactory} from './ToolDefinition.js';
diff --git a/src/tools/pages.ts b/src/tools/pages.ts
index 3fdae2fe..c7ef4ddd 100644
--- a/src/tools/pages.ts
+++ b/src/tools/pages.ts
@@ -5,8 +5,7 @@
*/
import type {ParsedArguments} from '../config/mcp-options.js';
-import type {CdpPage} from '../third_party/index.js';
-import {zod} from '../third_party/index.js';
+import {zod, type CdpPage} from '../third_party/index.js';
import {logger} from '../utils/logger.js';
import {validateUrl} from '../utils/url.js';
diff --git a/src/tools/performance.ts b/src/tools/performance.ts
index f6c74965..7d07a485 100644
--- a/src/tools/performance.ts
+++ b/src/tools/performance.ts
@@ -7,21 +7,22 @@
import zlib from 'node:zlib';
import {zod, DevTools} from '../third_party/index.js';
-import type {InsightName, TraceResult} from '../processors/PerformanceTrace.js';
import {
parseRawTraceBuffer,
traceResultIsSuccess,
+ type InsightName,
+ type TraceResult,
} from '../processors/PerformanceTrace.js';
import {logger} from '../utils/logger.js';
import {ToolCategory} from './categories.js';
-import type {
- Context,
- Response,
- ContextPage,
- PageToolFactory,
+import {
+ definePageTool,
+ type Context,
+ type Response,
+ type ContextPage,
+ type PageToolFactory,
} from './ToolDefinition.js';
-import {definePageTool} from './ToolDefinition.js';
const filePathSchema = zod
.string()
diff --git a/src/tools/screencast.ts b/src/tools/screencast.ts
index 34ad2ee3..d4ffadf9 100644
--- a/src/tools/screencast.ts
+++ b/src/tools/screencast.ts
@@ -9,12 +9,12 @@ import os from 'node:os';
import path from 'node:path';
import type {ParsedArguments} from '../config/mcp-options.js';
-import {zod} from '../third_party/index.js';
-import type {
- Page,
- ScreenRecorder,
- ScreenRecording,
- VideoFormat,
+import {
+ zod,
+ type Page,
+ type ScreenRecorder,
+ type ScreenRecording,
+ type VideoFormat,
} from '../third_party/index.js';
import {ToolCategory} from './categories.js';
diff --git a/src/tools/screenshot.ts b/src/tools/screenshot.ts
index 811dfe32..432c5bf8 100644
--- a/src/tools/screenshot.ts
+++ b/src/tools/screenshot.ts
@@ -5,12 +5,12 @@
*/
import type {ParsedArguments} from '../config/mcp-options.js';
-import {zod} from '../third_party/index.js';
-import type {
- BoundingBox,
- ElementHandle,
- Page,
- ScreenshotClip,
+import {
+ zod,
+ type BoundingBox,
+ type ElementHandle,
+ type Page,
+ type ScreenshotClip,
} from '../third_party/index.js';
import {ToolCategory} from './categories.js';
diff --git a/src/tools/script.ts b/src/tools/script.ts
index cfc27078..0cb6d755 100644
--- a/src/tools/script.ts
+++ b/src/tools/script.ts
@@ -7,12 +7,22 @@
import {pathToFileURL} from 'node:url';
import type {ParsedArguments} from '../config/mcp-options.js';
-import {zod} from '../third_party/index.js';
-import type {Frame, JSHandle, Page, WebWorker} from '../third_party/index.js';
+import {
+ zod,
+ type Frame,
+ type JSHandle,
+ type Page,
+ type WebWorker,
+} from '../third_party/index.js';
import {ToolCategory} from './categories.js';
-import type {Context, Response, ToolFactory} from './ToolDefinition.js';
-import {defineTool, pageIdSchema} from './ToolDefinition.js';
+import {
+ defineTool,
+ pageIdSchema,
+ type Context,
+ type Response,
+ type ToolFactory,
+} from './ToolDefinition.js';
export type Evaluatable = Page | Frame | WebWorker;
diff --git a/src/tools/slim/tools.ts b/src/tools/slim/tools.ts
index 8d6122e8..3f6aa5fb 100644
--- a/src/tools/slim/tools.ts
+++ b/src/tools/slim/tools.ts
@@ -5,8 +5,7 @@
*/
import type {ParsedArguments} from '../../config/mcp-options.js';
-import type {Dialog} from '../../third_party/index.js';
-import {zod} from '../../third_party/index.js';
+import {zod, type Dialog} from '../../third_party/index.js';
import {ToolCategory} from '../categories.js';
import {definePageTool, type PageToolFactory} from '../ToolDefinition.js';
import {validateUrl} from '../../utils/url.js';
diff --git a/tests/McpPage.test.ts b/tests/McpPage.test.ts
index bc129caa..c17338ab 100644
--- a/tests/McpPage.test.ts
+++ b/tests/McpPage.test.ts
@@ -18,8 +18,8 @@ import {
Frame,
Locator,
ScreenRecorder,
+ type JSONSchema7Definition,
} from '../src/third_party/index.js';
-import type {JSONSchema7Definition} from '../src/third_party/index.js';
import {TextSnapshot} from '../src/TextSnapshot.js';
import type {TextSnapshotNode} from '../src/types.js';
import {
diff --git a/tests/McpResponse.test.ts b/tests/McpResponse.test.ts
index d4299278..dc09ae2c 100644
--- a/tests/McpResponse.test.ts
+++ b/tests/McpResponse.test.ts
@@ -25,10 +25,10 @@ import {
newPage,
selectPage,
} from '../src/tools/pages.js';
-import type {InsightName} from '../src/processors/PerformanceTrace.js';
import {
parseRawTraceBuffer,
traceResultIsSuccess,
+ type InsightName,
} from '../src/processors/PerformanceTrace.js';
import {serverHooks} from './server.js';
diff --git a/tests/collectors/PageCollector.test.ts b/tests/collectors/PageCollector.test.ts
index 05f583d1..477a5be3 100644
--- a/tests/collectors/PageCollector.test.ts
+++ b/tests/collectors/PageCollector.test.ts
@@ -15,11 +15,11 @@ import type {
} from 'puppeteer-core';
import sinon from 'sinon';
-import type {ListenerMap} from '../../src/collectors/PageCollector.js';
import {
ConsoleCollector,
NetworkCollector,
PageCollector,
+ type ListenerMap,
} from '../../src/collectors/PageCollector.js';
import {DevTools, FrameEvent} from '../../src/third_party/index.js';
diff --git a/tests/devtools/DevtoolsUtils.test.ts b/tests/devtools/DevtoolsUtils.test.ts
index b44390de..0dc37710 100644
--- a/tests/devtools/DevtoolsUtils.test.ts
+++ b/tests/devtools/DevtoolsUtils.test.ts
@@ -13,8 +13,7 @@ import {
createTargetUniverse,
SymbolizedError,
} from '../../src/devtools/DevtoolsUtils.js';
-import {DevTools} from '../../src/third_party/index.js';
-import type {Protocol} from '../../src/third_party/index.js';
+import {DevTools, type Protocol} from '../../src/third_party/index.js';
import {serverHooks} from '../server.js';
import {html, withBrowser} from '../utils.js';
diff --git a/tests/mocks.ts b/tests/mocks.ts
index aabca3df..f97bd523 100644
--- a/tests/mocks.ts
+++ b/tests/mocks.ts
@@ -64,19 +64,17 @@ import {
WebWorker,
WebMCP,
WebMCPTool,
-} from '../src/third_party/index.js';
-import type {
- Browser,
- BrowserContext,
- ConsoleMessageLocation,
- ConsoleMessageType,
- Extension,
- JSHandle,
- Page,
- Protocol,
- Realm,
- Result,
- RunnerResult,
+ type Browser,
+ type BrowserContext,
+ type ConsoleMessageLocation,
+ type ConsoleMessageType,
+ type Extension,
+ type JSHandle,
+ type Page,
+ type Protocol,
+ type Realm,
+ type Result,
+ type RunnerResult,
} from '../src/third_party/index.js';
export type MockPuppeteerPage = sinon.SinonStubbedInstance<Page> & {
diff --git a/tests/shutdown.test.ts b/tests/shutdown.test.ts
index a55a548a..d7592cff 100644
--- a/tests/shutdown.test.ts
+++ b/tests/shutdown.test.ts
@@ -5,8 +5,7 @@
*/
import assert from 'node:assert';
-import type {ChildProcessByStdio} from 'node:child_process';
-import {spawn} from 'node:child_process';
+import {spawn, type ChildProcessByStdio} from 'node:child_process';
import type {Readable, Writable} from 'node:stream';
import {describe, it} from 'node:test';
diff --git a/tests/telemetry/ClearcutLogger.test.ts b/tests/telemetry/ClearcutLogger.test.ts
index 115ce92f..c525b472 100644
--- a/tests/telemetry/ClearcutLogger.test.ts
+++ b/tests/telemetry/ClearcutLogger.test.ts
@@ -12,8 +12,10 @@ import sinon from 'sinon';
import {DAEMON_CLIENT_NAME} from '../../src/daemon/utils.js';
import {ClearcutLogger} from '../../src/telemetry/ClearcutLogger.js';
import {ErrorCode} from '../../src/telemetry/errors.js';
-import type {Persistence} from '../../src/telemetry/persistence.js';
-import {FilePersistence} from '../../src/telemetry/persistence.js';
+import {
+ FilePersistence,
+ type Persistence,
+} from '../../src/telemetry/persistence.js';
import {McpClient, WatchdogMessageType} from '../../src/telemetry/types.js';
import {WatchdogClient} from '../../src/telemetry/WatchdogClient.js';
import {zod} from '../../src/third_party/index.js';
diff --git a/tests/telemetry/watchdog/ClearcutSender.test.ts b/tests/telemetry/watchdog/ClearcutSender.test.ts
index 62a7362e..6daceb60 100644
--- a/tests/telemetry/watchdog/ClearcutSender.test.ts
+++ b/tests/telemetry/watchdog/ClearcutSender.test.ts
@@ -10,8 +10,7 @@ import {describe, it, beforeEach} from 'node:test';
import sinon from 'sinon';
-import {OsType} from '../../../src/telemetry/types.js';
-import type {LogRequest} from '../../../src/telemetry/types.js';
+import {OsType, type LogRequest} from '../../../src/telemetry/types.js';
import {ClearcutSender} from '../../../src/telemetry/watchdog/ClearcutSender.js';
const FLUSH_INTERVAL_MS = 15 * 1000;
diff --git a/tests/tools/comments.test.ts b/tests/tools/comments.test.ts
index 29b6285a..8a249f77 100644
--- a/tests/tools/comments.test.ts
+++ b/tests/tools/comments.test.ts
@@ -10,12 +10,12 @@ import {describe, it} from 'node:test';
import sinon from 'sinon';
import {DevToolsCommentBridge} from '../../src/devtools/DevToolsCommentBridge.js';
-import type {CommentThreadPayload} from '../../src/tools/comments.js';
import {
getDevtoolsComments,
openDevtools,
resolveDevtoolsComment,
revealInDevtools,
+ type CommentThreadPayload,
} from '../../src/tools/comments.js';
import {createHandlerMocks, createMockPuppeteerPage} from '../mocks.js';
diff --git a/tests/tools/console.test.ts b/tests/tools/console.test.ts
index 85e149ac..aa7fd19e 100644
--- a/tests/tools/console.test.ts
+++ b/tests/tools/console.test.ts
@@ -14,8 +14,7 @@ import type {ParsedArguments} from '../../src/config/mcp-options.js';
import {loadIssueDescriptions} from '../../src/devtools/issueDescriptions.js';
import {McpResponse} from '../../src/McpResponse.js';
import {TextSnapshot} from '../../src/TextSnapshot.js';
-import type {CdpWebWorker} from '../../src/third_party/index.js';
-import {DevTools} from '../../src/third_party/index.js';
+import {DevTools, type CdpWebWorker} from '../../src/third_party/index.js';
import {
getConsoleMessage,
listConsoleMessages,
diff --git a/tests/utils.ts b/tests/utils.ts
index 55bc7ec7..504896c1 100644
--- a/tests/utils.ts
+++ b/tests/utils.ts
@@ -17,7 +17,6 @@ import type {TestContext} from 'node:test';
import type {Browser} from 'puppeteer';
import puppeteer, {Locator} from 'puppeteer';
-import type {CallToolResult} from '../src/third_party/index.js';
import type {
Frame,
HTTPRequest,
@@ -36,7 +35,7 @@ import {McpResponse} from '../src/McpResponse.js';
import {HeapSnapshotManager} from '../src/processors/HeapSnapshotManager.js';
import {TaskRunner} from '../src/utils/TaskRunner.js';
import {TextSnapshot} from '../src/TextSnapshot.js';
-import {DevTools} from '../src/third_party/index.js';
+import {DevTools, type CallToolResult} from '../src/third_party/index.js';
import {stableIdSymbol} from '../src/utils/id.js';
import {
diff --git a/tests/utils/id.test.ts b/tests/utils/id.test.ts
index 7e6ece10..a42ebb28 100644
--- a/tests/utils/id.test.ts
+++ b/tests/utils/id.test.ts
@@ -7,8 +7,11 @@
import assert from 'node:assert';
import {describe, it} from 'node:test';
-import type {WithSymbolId} from '../../src/utils/id.js';
-import {createIdGenerator, stableIdSymbol} from '../../src/utils/id.js';
+import {
+ createIdGenerator,
+ stableIdSymbol,
+ type WithSymbolId,
+} from '../../src/utils/id.js';
describe('createIdGenerator', () => {
it('should return 1 as the first id', () => {