browser-devtools-mcp 0.5.3 → 0.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -3,4 +3,5 @@ import { BrowserToolSessionContext } from './context';
3
3
  import { BrowserToolExecutor } from './tool-executor';
4
4
  export declare const tools: Tool<BrowserToolSessionContext>[];
5
5
  export declare function createToolSessionContext(sessionIdProvider: () => string): Promise<BrowserToolSessionContext>;
6
+ export { createScenarioRunTool } from './scenario';
6
7
  export declare function createToolExecutor(): BrowserToolExecutor;
@@ -0,0 +1,7 @@
1
+ import { ToolRegistry } from '../../../../tools/tool-registry';
2
+ import { Tool } from '../../../../tools/types';
3
+ import { ScenarioRun } from './scenario-run';
4
+ /** Tools that don't need ToolRegistry — can be registered statically. */
5
+ export declare const tools: Tool[];
6
+ /** Creates scenario-run tool that needs ToolRegistry for delegating to execute. */
7
+ export declare function createScenarioRunTool(toolRegistry: ToolRegistry): ScenarioRun;
@@ -0,0 +1,3 @@
1
+ export { ScenarioStore, resolveScenario, listAllScenarios, } from './scenario-store';
2
+ export { ScenarioScope } from './types';
3
+ export type { Scenario } from './types';
@@ -0,0 +1,9 @@
1
+ export interface Scenario {
2
+ name: string;
3
+ description: string;
4
+ script: string;
5
+ }
6
+ export declare enum ScenarioScope {
7
+ PROJECT = "project",
8
+ GLOBAL = "global"
9
+ }
@@ -0,0 +1,3 @@
1
+ export { createSearchEngine, resolveSearchStrategy } from './search-engine';
2
+ export { SearchStrategy } from './types';
3
+ export type { SearchDocument, SearchEngine, SearchResult } from './types';
@@ -0,0 +1,20 @@
1
+ export declare enum SearchStrategy {
2
+ SIMPLE = "SIMPLE",
3
+ FTS5 = "FTS5"
4
+ }
5
+ export interface SearchDocument {
6
+ id: string;
7
+ fields: Record<string, string>;
8
+ }
9
+ export interface SearchResult {
10
+ id: string;
11
+ score: number;
12
+ }
13
+ export interface SearchEngine {
14
+ index(documents: SearchDocument[]): void;
15
+ add(document: SearchDocument): void;
16
+ update(id: string, document: SearchDocument): void;
17
+ remove(id: string): void;
18
+ search(query: string, limit?: number): SearchResult[];
19
+ close(): void;
20
+ }
@@ -1,4 +1,5 @@
1
1
  export { augmentToolInputSchema } from './input-schema-metadata';
2
2
  export { ToolRegistry } from './tool-registry';
3
- export type { Tool, ToolExecutor, ToolInput, ToolInputMetadata, ToolInputSchema, ToolOutput, ToolOutputSchema, ToolOutputWithImage, ToolSessionContext, } from './types';
3
+ export { ArtifactType } from './types';
4
+ export type { Tool, ToolExecutor, ToolInput, ToolInputMetadata, ToolInputSchema, ToolOutput, ToolOutputArtifact, ToolOutputSchema, ToolOutputWithImage, ToolSessionContext, } from './types';
4
5
  export { isToolEnabled } from './types';
@@ -3,8 +3,13 @@ export type ToolInputSchema = ZodRawShape;
3
3
  export type ToolOutputSchema = ZodRawShape;
4
4
  /** Internal bag passed as `ToolInput._metadata` when `TOOL_INPUT_METADATA_ENABLE` is on. */
5
5
  export interface ToolInputMetadata {
6
+ projectName?: string;
6
7
  sessionId?: string;
8
+ verificationId?: string;
7
9
  traceId?: string;
10
+ traceState?: string;
11
+ collectorUrl?: string;
12
+ collectorApiKey?: string;
8
13
  [key: string]: unknown;
9
14
  }
10
15
  /**
@@ -14,7 +19,19 @@ export interface ToolInput {
14
19
  _metadata?: ToolInputMetadata | undefined;
15
20
  [key: string]: unknown;
16
21
  }
22
+ export declare enum ArtifactType {
23
+ IMAGE = "IMAGE",
24
+ VIDEO = "VIDEO"
25
+ }
26
+ export interface ToolOutputArtifact {
27
+ type: ArtifactType;
28
+ filePath: string;
29
+ mimeType: string;
30
+ }
17
31
  export interface ToolOutput {
32
+ /** Artifacts to upload to the collector (stripped before MCP response). */
33
+ _artifacts?: ToolOutputArtifact[];
34
+ [key: string]: unknown;
18
35
  }
19
36
  export interface ToolOutputWithImage extends ToolOutput {
20
37
  image?: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "browser-devtools-mcp",
3
- "version": "0.5.3",
3
+ "version": "0.6.0",
4
4
  "description": "MCP Server for Browser Dev Tools",
5
5
  "private": false,
6
6
  "type": "module",
@@ -61,23 +61,24 @@
61
61
  "LICENSE"
62
62
  ],
63
63
  "devDependencies": {
64
+ "@anthropic-ai/mcpb": "^2.1.2",
64
65
  "@anthropic-ai/sdk": "^0.32.1",
65
- "dotenv": "^16.4.5",
66
66
  "@anthropic-ai/tokenizer": "^0.0.4",
67
- "gpt-tokenizer": "^2.9.0",
68
- "@anthropic-ai/mcpb": "^2.1.2",
69
67
  "@opentelemetry/auto-instrumentations-web": "^0.54.0",
70
68
  "@opentelemetry/context-zone": "^2.2.0",
71
69
  "@opentelemetry/exporter-trace-otlp-http": "^0.208.0",
70
+ "@opentelemetry/exporter-trace-otlp-proto": "^0.208.0",
72
71
  "@types/node": "^18.19.87",
73
72
  "@types/picomatch": "^4.0.2",
74
73
  "@types/pngjs": "^6.0.5",
75
74
  "@types/ws": "^8.18.1",
76
75
  "@typescript-eslint/eslint-plugin": "^8.31.1",
77
76
  "@typescript-eslint/parser": "^8.31.1",
77
+ "dotenv": "^16.4.5",
78
78
  "esbuild": "^0.27.2",
79
79
  "eslint": "^9.26.0",
80
80
  "eslint-plugin-import": "^2.31.0",
81
+ "gpt-tokenizer": "^2.9.0",
81
82
  "prettier": "^3.5.3",
82
83
  "release-it": "^17.6.0",
83
84
  "rimraf": "^6.1.2",
@@ -91,19 +92,25 @@
91
92
  "@hono/mcp": "^0.1.4",
92
93
  "@hono/node-server": "^1.19.5",
93
94
  "@modelcontextprotocol/sdk": "^1.23.1",
95
+ "@opentelemetry/core": "^2.6.0",
94
96
  "@playwright/browser-chromium": "^1.58.2",
95
97
  "@playwright/browser-firefox": "^1.58.2",
96
98
  "@playwright/browser-webkit": "^1.58.2",
97
99
  "commander": "^14.0.1",
98
100
  "hono": "^4.11.4",
99
101
  "jpeg-js": "^0.4.4",
102
+ "minisearch": "^7.2.0",
100
103
  "picomatch": "^4.0.3",
101
104
  "playwright": "^1.58.2",
102
105
  "pngjs": "^7.0.0",
103
106
  "posthog-node": "^5.21.2",
104
107
  "sharp": "^0.34.5",
105
108
  "ssim.js": "^3.5.0",
109
+ "stemmer": "^2.0.1",
106
110
  "ws": "^8.19.0",
107
111
  "zod": "^3.24.3"
112
+ },
113
+ "optionalDependencies": {
114
+ "better-sqlite3": "^12.8.0"
108
115
  }
109
116
  }