@extension.dev/mcp 10.1.0 → 10.2.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.
@@ -7,5 +7,12 @@ export interface ToolModule {
7
7
  handler: (args: any) => Promise<string>;
8
8
  }
9
9
  export declare const tools: ToolModule[];
10
+ export declare function toolResultFrame(result: string): {
11
+ content: Array<{
12
+ type: "text";
13
+ text: string;
14
+ }>;
15
+ isError?: boolean;
16
+ };
10
17
  export declare function startServer(): Promise<void>;
11
18
  export declare function runCli(cmd: string, args: string[]): Promise<number>;
@@ -37,6 +37,7 @@ export interface ArtifactListing {
37
37
  matched: number;
38
38
  limit: number;
39
39
  truncated: boolean;
40
+ truncatedReported: boolean;
40
41
  scanned: number;
41
42
  }
42
43
  export interface ArtifactRevocation {
@@ -56,6 +57,7 @@ export type ArtifactsOutcome<T> = {
56
57
  };
57
58
  };
58
59
  export declare function parseArtifactRef(input: string): string | null;
60
+ export declare function wwwRevokeUrl(value: string): string;
59
61
  export declare function listArtifacts(options?: {
60
62
  limit?: number;
61
63
  liveOnly?: boolean;
@@ -42,6 +42,5 @@ export interface PollOptions {
42
42
  noBrowser?: boolean;
43
43
  intervalMs?: number;
44
44
  }
45
- export declare function readyContractPath(projectPath: string, browser: string): string;
46
45
  export declare function speaksMachineContract(contract: unknown): boolean;
47
46
  export declare function pollBootVerdict(projectPath: string, browser: string, options: PollOptions): Promise<BootReading>;
@@ -0,0 +1,8 @@
1
+ import { type CarrierRemoval } from "./carrier";
2
+ export type CarrierSweepEntry = CarrierRemoval & {
3
+ projectPath: string;
4
+ };
5
+ export declare function sweepCarriers(projectPaths: string[]): CarrierSweepEntry[];
6
+ export declare function sweepCarriersPlacedHere(): CarrierSweepEntry[];
7
+ export declare function installCarrierExitCleanup(): void;
8
+ export declare function uninstallCarrierExitCleanup(): void;
@@ -0,0 +1,4 @@
1
+ export declare function rememberCarrier(projectPath: string): void;
2
+ export declare function forgetCarrier(projectPath: string): void;
3
+ export declare function carriersPlacedHere(): string[];
4
+ export declare function rememberedCarriers(): string[];
@@ -2,6 +2,14 @@ export declare const CARRIER_DIR_NAME = "extension-dev-live-preview";
2
2
  export declare const CARRIER_EXTENSION_ID = "ibppeifnekhjjjmpjfiobccjlicbmgcb";
3
3
  export declare function carrierPath(projectPath: string): string;
4
4
  export declare function isManagedCarrier(projectPath: string): boolean;
5
+ export type CarrierClaim = {
6
+ ours: true;
7
+ how: "marker" | "payload" | "partial";
8
+ } | {
9
+ ours: false;
10
+ how: "foreign";
11
+ };
12
+ export declare function claimCarrier(target: string): CarrierClaim;
5
13
  export type CarrierRemoval = {
6
14
  removed: boolean;
7
15
  path: string;
@@ -0,0 +1,24 @@
1
+ export declare const OUTPUT_JSON_FLOOR: {
2
+ readonly act: "3.18.1";
3
+ readonly doctor: "4.0.11";
4
+ readonly dev: "4.0.17";
5
+ readonly build: "4.0.17";
6
+ };
7
+ export type OutputJsonCommand = keyof typeof OUTPUT_JSON_FLOOR;
8
+ export declare function parseVersion(text: string): string | null;
9
+ export declare function compareVersions(a: string, b: string): number | null;
10
+ export interface EngineFacts {
11
+ version: string | null;
12
+ outputJsonCommands: readonly string[] | null;
13
+ }
14
+ export declare function resetEngineVersionCache(): void;
15
+ export declare function resolvedEngineFacts(projectPath?: string): Promise<EngineFacts>;
16
+ export declare function resolvedEngineVersion(projectPath?: string): Promise<string | null>;
17
+ export interface OutputJsonVerdict {
18
+ supported: boolean | null;
19
+ version: string | null;
20
+ floor: string;
21
+ }
22
+ export declare function outputJsonVerdict(command: OutputJsonCommand, projectPath?: string): Promise<OutputJsonVerdict>;
23
+ export declare function refusedTheOutputFlag(stderr: string): boolean;
24
+ export declare function outputFlagRefusalMessage(command: OutputJsonCommand, cliName: string, projectPath?: string): Promise<string>;
@@ -1,6 +1,6 @@
1
1
  export declare const ENVELOPE_SCHEMA: 1;
2
2
  export declare const DECISION_D6 = "The MCP tool name owns the envelope `command` key; forking the key to `tool` would fork the schema the checksum test pins.";
3
- export type ErrorCode = "E_AMBIGUOUS_TARGET" | "E_AUTH_DENIED" | "E_AUTH_EXPIRED" | "E_AUTH_FAILED" | "E_AUTH_PENDING" | "E_AUTH_REQUIRED" | "E_BAD_MANIFEST" | "E_BAD_REQUEST" | "E_BRIDGE" | "E_BROWSER_EXITED" | "E_BROWSER_INSTALL" | "E_BROWSER_UNINSTALL" | "E_BUILD_FAILED" | "E_CARRIER_IN_DIST" | "E_CDP" | "E_CLI" | "E_COMPILE" | "E_CONFIG" | "E_CONTRACT_ERROR" | "E_CONTROL_CHANNEL" | "E_ENTRYPOINT_MISSING" | "E_FIRST_COMPILE" | "E_INPUT_VALIDATION" | "E_INTERNAL" | "E_LOGS_MISSING" | "E_MANIFEST_BLOCKING" | "E_MANIFEST_NOT_FOUND" | "E_NAVIGATE_ERROR" | "E_NAVIGATE_FAILED" | "E_NETWORK" | "E_NO_CONTROL_CHANNEL" | "E_NO_DIST" | "E_NO_EXTENSION_ID" | "E_NO_MATCHING_TARGET" | "E_NO_REFERENCE_TEMPLATE" | "E_NO_SESSION" | "E_NO_SURFACE_DOCUMENT" | "E_NO_TARGET" | "E_NOT_ATTACHED" | "E_PARSE" | "E_PLATFORM" | "E_PROFILE_LOCKED" | "E_RDP" | "E_SCAFFOLD_FAILED" | "E_SCAFFOLD_INCOMPLETE" | "E_SESSION_EXISTS" | "E_SESSION_EXITED" | "E_STALE_CONTRACT" | "E_SURFACE_DID_NOT_OPEN" | "E_TEMPLATE_FETCH" | "E_TEMPLATE_NOT_FOUND" | "E_UNKNOWN_COMMAND" | "E_UNKNOWN_TOOL" | "E_UNSUPPORTED_BROWSER" | "E_WAIT_TIMEOUT";
3
+ export type ErrorCode = "E_AMBIGUOUS_TARGET" | "E_AUTH_DENIED" | "E_AUTH_EXPIRED" | "E_AUTH_FAILED" | "E_AUTH_PENDING" | "E_AUTH_REQUIRED" | "E_BAD_HOST_URL" | "E_BAD_MANIFEST" | "E_BAD_REQUEST" | "E_BRIDGE" | "E_BROWSER_EXITED" | "E_BROWSER_INSTALL" | "E_BROWSER_UNINSTALL" | "E_BUILD_FAILED" | "E_CARRIER_IN_DIST" | "E_CDP" | "E_CLI" | "E_COMPILE" | "E_CONFIG" | "E_CONTRACT_ERROR" | "E_CONTROL_CHANNEL" | "E_CONTROL_ENVELOPE" | "E_ENGINE_TOO_OLD" | "E_ENTRYPOINT_MISSING" | "E_FIRST_COMPILE" | "E_INPUT_VALIDATION" | "E_INTERNAL" | "E_INVALID_BUNDLE_ID" | "E_LOGS_MISSING" | "E_MANIFEST_BLOCKING" | "E_MANIFEST_NOT_FOUND" | "E_NAVIGATE_ERROR" | "E_NAVIGATE_FAILED" | "E_NETWORK" | "E_NO_CONTROL_CHANNEL" | "E_NO_DIST" | "E_NO_EXTENSION_ID" | "E_NO_MATCHING_TARGET" | "E_NO_REFERENCE_TEMPLATE" | "E_NO_SESSION" | "E_NO_SURFACE_DOCUMENT" | "E_NO_TARGET" | "E_NOT_ATTACHED" | "E_PARSE" | "E_PLATFORM" | "E_PREVIEW_HOST_UNREACHABLE" | "E_PROFILE_LOCKED" | "E_RDP" | "E_SAFARI_ONLY_OPTION" | "E_SCAFFOLD_FAILED" | "E_SCAFFOLD_INCOMPLETE" | "E_SESSION_EXISTS" | "E_SESSION_EXITED" | "E_STALE_CONTRACT" | "E_SURFACE_DID_NOT_OPEN" | "E_TEMPLATE_FETCH" | "E_TEMPLATE_NOT_FOUND" | "E_UNKNOWN_COMMAND" | "E_UNKNOWN_TOOL" | "E_UNSUPPORTED_BROWSER" | "E_WAIT_TIMEOUT";
4
4
  export declare const ERROR_CODES: ErrorCode[];
5
5
  export interface EnvelopeError {
6
6
  code: ErrorCode | string;
@@ -1,3 +1,4 @@
1
+ export declare function isEngineCompanionUrl(url: string): boolean;
1
2
  export type GuestTarget = {
2
3
  id: string;
3
4
  type: string;
@@ -2,7 +2,7 @@ import { type StoredCredentials } from "./credentials";
2
2
  export declare function tokenTtlNote(workspaceSlug?: string, projectSlug?: string): string;
3
3
  type FetchImpl = typeof fetch;
4
4
  export declare function resolveApiBase(api?: string): string;
5
- export declare function safeApiBase(raw: string): {
5
+ export declare function safeApiBase(raw: string, callerSupplied?: string): {
6
6
  ok: true;
7
7
  base: string;
8
8
  } | {
@@ -1,4 +1,5 @@
1
1
  import type { ProcessInfo } from "./types";
2
+ export declare function sessionStateDir(): string;
2
3
  export declare function removeSessionMarker(projectPath: string, browser: string, pid?: number): void;
3
4
  export declare function listSessionMarkers(): ProcessInfo[];
4
5
  export declare function registerSession(info: ProcessInfo): void;
@@ -0,0 +1,16 @@
1
+ export type ServerIdentityAnswer = {
2
+ kind: "confirmed";
3
+ login: string;
4
+ live: boolean;
5
+ } | {
6
+ kind: "refused";
7
+ } | {
8
+ kind: "unavailable";
9
+ detail: string;
10
+ };
11
+ export declare function askServerIdentity(args: {
12
+ apiBase: string;
13
+ token: string;
14
+ fetchImpl?: typeof fetch;
15
+ timeoutMs?: number;
16
+ }): Promise<ServerIdentityAnswer>;
@@ -0,0 +1,12 @@
1
+ export { actionsPath, browserArtifactsDir, buildSummaryPath, eventsPath, logsPath, readyContractPath, sessionArtifactsRootDir, sessionStateDir, } from "extension-develop/bridge";
2
+ export { readReadyContract, type ReadyContractInfo, } from "extension-develop/bridge";
3
+ export declare function sessionPathHint(file: string): string;
4
+ export declare function profilesRootDir(projectPath: string): string;
5
+ export declare function browserProfileRootDir(projectPath: string, browser: string): string;
6
+ export declare const PERSISTED_PROFILE_DIR_NAME = "dev";
7
+ export interface ProfileRemediationInput {
8
+ projectPath: string;
9
+ browser: string;
10
+ profile?: string;
11
+ }
12
+ export declare function profileRemediation(input: ProfileRemediationInput): string;
@@ -0,0 +1,17 @@
1
+ type FetchImpl = typeof fetch;
2
+ export interface ShareCorsVerdict {
3
+ ok: boolean;
4
+ checkedUrl: string;
5
+ origin: string;
6
+ finalUrl: string;
7
+ finalStatus: number;
8
+ redirects: number;
9
+ allowOrigin: string | null;
10
+ reason: string;
11
+ }
12
+ export declare function probeShareCors(options: {
13
+ zipUrl: string;
14
+ origin: string;
15
+ fetchImpl?: FetchImpl;
16
+ }): Promise<ShareCorsVerdict>;
17
+ export {};
@@ -1,4 +1,4 @@
1
- export declare const PINNED_COMMIT = "2d2ed9668cca002148d9eecd953a08b54d0bad9d";
1
+ export declare const PINNED_COMMIT = "520a8ede767fe1937c7184f4857408caf9c5934f";
2
2
  export declare function templateMetaUrls(): Promise<string[]>;
3
3
  export declare function stripTemplatePathPrefix(slug: string, relativePath: string): string;
4
4
  export declare function templateFileUrls(slug: string, relativePath: string): Promise<string[]>;
@@ -0,0 +1,5 @@
1
+ export interface ZipListing {
2
+ names: string[];
3
+ readable: boolean;
4
+ }
5
+ export declare function readZipEntryNames(zipPath: string): ZipListing;
@@ -48,10 +48,29 @@ export declare const schema: {
48
48
  default: boolean;
49
49
  description: string;
50
50
  };
51
+ appName: {
52
+ type: string;
53
+ description: string;
54
+ };
55
+ bundleId: {
56
+ type: string;
57
+ description: string;
58
+ };
59
+ macOsOnly: {
60
+ type: string;
61
+ default: boolean;
62
+ description: string;
63
+ };
64
+ forceRegenerate: {
65
+ type: string;
66
+ default: boolean;
67
+ description: string;
68
+ };
51
69
  };
52
70
  required: string[];
53
71
  };
54
72
  };
73
+ export declare const BUNDLE_ID_PATTERN: RegExp;
55
74
  export declare function handler(args: {
56
75
  projectPath: string;
57
76
  browser?: string;
@@ -62,4 +81,8 @@ export declare function handler(args: {
62
81
  silent?: boolean;
63
82
  mode?: "development" | "production" | "none";
64
83
  skipValidation?: boolean;
84
+ appName?: string;
85
+ bundleId?: string;
86
+ macOsOnly?: boolean;
87
+ forceRegenerate?: boolean;
65
88
  }): Promise<string>;
@@ -1,5 +1,5 @@
1
- export declare const CONTROL_ENVELOPE_VERSION = 1;
2
- export declare const CONTROL_WS_PATH = "/extjs-control";
1
+ export { CLOSE_BAD_HELLO, CLOSE_BAD_INSTANCE, CLOSE_CONTROL_UNAVAILABLE, CLOSE_SLOW_CONSUMER, CONTROL_ENVELOPE_VERSION, CONTROL_WS_PATH, LOG_EVENT_VERSION, } from "extension-develop/bridge";
2
+ export declare const CLOSE_REFUSAL_FLOOR = 4000;
3
3
  export declare const DEFAULT_LIMIT = 200;
4
4
  export declare const DEFAULT_FOLLOW_MS = 4000;
5
5
  export declare const MIN_FOLLOW_MS = 500;
@@ -1,3 +1,5 @@
1
+ import { readLogEvents } from "extension-develop/bridge";
2
+ export { readLogEvents };
1
3
  export interface LogsArgs {
2
4
  projectPath: string;
3
5
  browser?: string;
@@ -11,4 +13,4 @@ export interface LogsArgs {
11
13
  followMs?: number;
12
14
  limit?: number;
13
15
  }
14
- export declare function makeFilter(args: LogsArgs): (event: any) => boolean;
16
+ export declare function makeFilter(args: LogsArgs): (event: unknown) => boolean;
@@ -1,3 +1,11 @@
1
1
  import { type LogsArgs } from "./logs-filter";
2
+ import { type ErrorCode } from "../lib/envelope";
2
3
  export { schema } from "./logs-schema";
4
+ export interface ControlRefusal {
5
+ code: ErrorCode;
6
+ status: string;
7
+ message: string;
8
+ hint: string;
9
+ }
10
+ export declare function controlRefusal(closeCode: number, reason: string, url: string, sentVersion: number): ControlRefusal | undefined;
3
11
  export declare function handler(args: LogsArgs): Promise<string>;
@@ -1 +1,3 @@
1
- export declare function readIdentity(): Promise<string>;
1
+ export declare function readIdentity(deps?: {
2
+ fetchImpl?: typeof fetch;
3
+ }): Promise<string>;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@extension.dev/mcp",
3
3
  "type": "module",
4
- "version": "10.1.0",
4
+ "version": "10.2.0",
5
5
  "description": "MCP server that lets AI agents (Claude Code, Claude Desktop, Cursor, Copilot, Codex) build, run, inspect, and publish browser extensions. 28 tools for scaffolding, live DOM inspection, log streaming, and store-ready builds across Chrome, Edge, Firefox, Safari, and every Chromium- or Gecko-based browser (Brave, Opera, Vivaldi, Yandex, Waterfox, LibreWolf). Powered by extension.dev and Extension.js.",
6
6
  "mcpName": "io.github.extensiondev/mcp",
7
7
  "license": "Apache-2.0",
@@ -89,9 +89,9 @@
89
89
  "@modelcontextprotocol/sdk": "^1.12.1",
90
90
  "browser-extension-manifest-fields": "^2.2.9",
91
91
  "cross-spawn": "^7.0.6",
92
- "extension-create": "4.0.17",
93
- "extension-develop": "4.0.17",
94
- "extension-install": "4.0.17",
92
+ "extension-create": "4.0.20",
93
+ "extension-develop": "4.0.20",
94
+ "extension-install": "4.0.20",
95
95
  "ws": "^8.20.0"
96
96
  },
97
97
  "devDependencies": {
@@ -101,6 +101,22 @@
101
101
  "@types/node": "^25.2.0",
102
102
  "@types/ws": "^8.18.1",
103
103
  "typescript": "6.0.2",
104
+ "vite": "^8.1.5",
104
105
  "vitest": "^4.1.3"
106
+ },
107
+ "pnpm": {
108
+ "overrides": {
109
+ "hono": "^4.12.27",
110
+ "@hono/node-server": "^2.0.5",
111
+ "ws@>=8 <8.21.0": "^8.21.0",
112
+ "form-data@4": "^4.0.6",
113
+ "js-yaml@4": "^4.3.0",
114
+ "fast-uri@3": "^3.1.4",
115
+ "postcss@8": "^8.5.18",
116
+ "body-parser@2": "^2.3.0",
117
+ "ip-address@10": "^10.1.1",
118
+ "qs@6": "^6.15.2",
119
+ "vite@8": "^8.0.16"
120
+ }
105
121
  }
106
122
  }
package/server.json CHANGED
@@ -7,13 +7,13 @@
7
7
  "source": "github"
8
8
  },
9
9
  "websiteUrl": "https://extension.dev",
10
- "version": "10.1.0",
10
+ "version": "10.2.0",
11
11
  "packages": [
12
12
  {
13
13
  "registryType": "npm",
14
14
  "registryBaseUrl": "https://registry.npmjs.org",
15
15
  "identifier": "@extension.dev/mcp",
16
- "version": "10.1.0",
16
+ "version": "10.2.0",
17
17
  "runtimeHint": "npx",
18
18
  "transport": {
19
19
  "type": "stdio"