Chrome DevTools for coding agents
chore: don't re-export internals (#1211)
Nikolay Vitkove56d79393c7e
diff --git a/src/McpContext.ts b/src/McpContext.tsindex 5dc3f44e..3ebbeae9 100644--- a/src/McpContext.ts+++ b/src/McpContext.ts@@ -10,8 +10,12 @@ import path from 'node:path';import type {TargetUniverse} from './DevtoolsUtils.js';import {UniverseManager} from './DevtoolsUtils.js';import {McpPage} from './McpPage.js';-import type {ListenerMap, UncaughtError} from './PageCollector.js';-import {NetworkCollector, ConsoleCollector} from './PageCollector.js';+import {+ NetworkCollector,+ ConsoleCollector,+ type ListenerMap,+ type UncaughtError,+} from './PageCollector.js';import type {DevTools} from './third_party/index.js';import type {Browser,@@ -45,13 +49,6 @@ import {import {saveTemporaryFile} from './utils/files.js';import {WaitForHelper} from './WaitForHelper.js';-export type {- EmulationSettings,- GeolocationOptions,- TextSnapshot,- TextSnapshotNode,-} from './types.js';-interface McpContextOptions {// Whether the DevTools windows are exposed as pages for debugging of DevTools.experimentalDevToolsDebugging: boolean;diff --git a/src/formatters/SnapshotFormatter.ts b/src/formatters/SnapshotFormatter.tsindex 2ec80e75..d118fc17 100644--- a/src/formatters/SnapshotFormatter.ts+++ b/src/formatters/SnapshotFormatter.ts@@ -4,7 +4,7 @@* SPDX-License-Identifier: Apache-2.0*/-import type {TextSnapshot, TextSnapshotNode} from '../McpContext.js';+import type {TextSnapshot, TextSnapshotNode} from '../types.js';export class SnapshotFormatter {#snapshot: TextSnapshot;diff --git a/src/tools/input.ts b/src/tools/input.tsindex 5eba57cb..492d5537 100644--- a/src/tools/input.ts+++ b/src/tools/input.ts@@ -5,9 +5,10 @@*/import {logger} from '../logger.js';-import type {McpContext, TextSnapshotNode} from '../McpContext.js';+import type {McpContext} from '../McpContext.js';import {zod} from '../third_party/index.js';import type {ElementHandle, KeyInput} from '../third_party/index.js';+import type {TextSnapshotNode} from '../types.js';import {parseKey} from '../utils/keyboard.js';import {ToolCategory} from './categories.js';diff --git a/tests/formatters/snapshotFormatter.test.ts b/tests/formatters/snapshotFormatter.test.tsindex db7c4491..90b1f07f 100644--- a/tests/formatters/snapshotFormatter.test.ts+++ b/tests/formatters/snapshotFormatter.test.ts@@ -10,7 +10,7 @@ import {describe, it} from 'node:test';import type {ElementHandle} from 'puppeteer-core';import {SnapshotFormatter} from '../../src/formatters/SnapshotFormatter.js';-import type {TextSnapshot, TextSnapshotNode} from '../../src/McpContext.js';+import type {TextSnapshot, TextSnapshotNode} from '../../src/types.js';describe('snapshotFormatter', () => {it('formats a snapshot with value properties', () => {