@extension.dev/mcp 9.0.0 → 10.1.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.
@@ -1,5 +1,8 @@
1
1
  export declare function toMcpSpeak(text: string): string;
2
- export declare function runActVerb(args: string[], projectPath: string, timeoutMs?: number): Promise<string>;
2
+ export declare function runActVerb(args: string[], projectPath: string, timeoutMs?: number, tool?: string): Promise<string>;
3
+ export declare function addWarning(frame: any, text: unknown): void;
4
+ export declare function actFrameJson(frame: unknown): string;
5
+ export declare function patchValue(frame: any, patch: Record<string, unknown>): void;
3
6
  export interface ActArgs {
4
7
  projectPath: string;
5
8
  browser?: string;
@@ -0,0 +1,47 @@
1
+ import type { ChildProcess } from "node:child_process";
2
+ export interface ProfileLockOwner {
3
+ host?: string;
4
+ pid?: number;
5
+ }
6
+ export type BootVerdict = {
7
+ kind: "alive";
8
+ } | {
9
+ kind: "silent-within-budget";
10
+ } | {
11
+ kind: "exited";
12
+ exitCode: number | null;
13
+ signal: string | null;
14
+ } | {
15
+ kind: "compile-failed";
16
+ message?: string;
17
+ compileErrors: string[];
18
+ } | {
19
+ kind: "browser-exited";
20
+ stamp: {
21
+ code?: string;
22
+ browserExitCode?: number | null;
23
+ browserExitedAt?: string;
24
+ };
25
+ } | {
26
+ kind: "profile-locked";
27
+ owner: ProfileLockOwner | null;
28
+ message?: string;
29
+ lockedAt?: string;
30
+ };
31
+ export interface BootReading {
32
+ verdict: BootVerdict;
33
+ machineContract: boolean;
34
+ evidenceTail: string;
35
+ warnings: string[];
36
+ }
37
+ export interface PollOptions {
38
+ child: ChildProcess;
39
+ readOutput: () => string;
40
+ budgetMs: number;
41
+ since: number;
42
+ noBrowser?: boolean;
43
+ intervalMs?: number;
44
+ }
45
+ export declare function readyContractPath(projectPath: string, browser: string): string;
46
+ export declare function speaksMachineContract(contract: unknown): boolean;
47
+ export declare function pollBootVerdict(projectPath: string, browser: string, options: PollOptions): Promise<BootReading>;
@@ -3,12 +3,12 @@ export interface BridgeTab {
3
3
  url: string;
4
4
  title: string;
5
5
  }
6
- export declare function listBridgeTabs(projectPath: string, browser: string, timeout?: number): Promise<{
6
+ export declare function listBridgeTabs(projectPath: string, browser: string, timeout?: number, tool?: string): Promise<{
7
7
  tabs: BridgeTab[];
8
8
  } | {
9
9
  error: string;
10
10
  }>;
11
11
  export declare function matchTabsByUrl(tabs: BridgeTab[], needle: string): BridgeTab[];
12
12
  export declare function pollForBridgeTab(projectPath: string, browser: string, url: string, budgetMs: number): Promise<BridgeTab | null>;
13
- export declare function navigateToUrlViaBridge(projectPath: string, browser: string, url: string, timeout?: number): Promise<string>;
13
+ export declare function navigateToUrlViaBridge(projectPath: string, browser: string, url: string, timeout?: number, tool?: string): Promise<string>;
14
14
  export declare function resolveBridgeBaseUrl(projectPath: string, browser: string, timeout?: number): Promise<string | null>;
@@ -0,0 +1,41 @@
1
+ export declare const ENVELOPE_SCHEMA: 1;
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";
4
+ export declare const ERROR_CODES: ErrorCode[];
5
+ export interface EnvelopeError {
6
+ code: ErrorCode | string;
7
+ message: string;
8
+ name?: string;
9
+ engine?: string | null;
10
+ hint?: string;
11
+ [key: string]: unknown;
12
+ }
13
+ export interface Envelope {
14
+ schema: typeof ENVELOPE_SCHEMA;
15
+ ok: boolean;
16
+ command: string;
17
+ status: string;
18
+ value: unknown;
19
+ error: EnvelopeError | null;
20
+ truncated?: boolean;
21
+ hint?: string;
22
+ warnings: string[];
23
+ }
24
+ export interface EnvelopeInit {
25
+ ok: boolean;
26
+ command: string;
27
+ status: string;
28
+ value?: unknown;
29
+ error?: EnvelopeError | null;
30
+ truncated?: boolean;
31
+ hint?: string;
32
+ warnings?: (string | null | undefined | false)[];
33
+ }
34
+ export declare function envelopeObject(init: EnvelopeInit): Envelope;
35
+ export declare function envelope(init: EnvelopeInit): string;
36
+ export declare function sessionCommandSinceEnvelopeOwnsCommand(contract: {
37
+ command?: string;
38
+ }): {
39
+ sessionCommand?: string;
40
+ };
41
+ export declare function isEnvelope(frame: unknown): frame is Envelope;
@@ -4,6 +4,8 @@ export interface CliResult {
4
4
  stdout: string;
5
5
  stderr: string;
6
6
  }
7
+ export declare function pinnedCliVersion(): string;
8
+ export declare function exactVersion(spec: string): string;
7
9
  export declare function resolveExtensionInvocation(projectDir?: string): {
8
10
  command: string;
9
11
  prefixArgs: string[];
@@ -16,8 +18,10 @@ export interface SpawnedCli {
16
18
  child: ChildProcess;
17
19
  logPath: string;
18
20
  readOutput: () => string;
21
+ spawnError?: () => Error | null;
19
22
  }
20
23
  export declare function spawnExtensionCli(args: string[], options?: {
21
24
  cwd?: string;
22
25
  projectDir?: string;
23
26
  }): SpawnedCli;
27
+ export declare function spawnFailedEnvelope(command: string, spawned: SpawnedCli): Promise<string>;
@@ -0,0 +1,7 @@
1
+ /** @deprecated see the module note. */
2
+ export declare function denoiseCliLog(raw: string): string;
3
+ /** @deprecated Replaced by `ready.json` `status:"error"`. */
4
+ export declare function legacyCompileScrape(cleanOutput: string): boolean;
5
+ /** @deprecated Replaced by `ready.json` `code:"profile_locked"`. */
6
+ export declare function legacyProfileLockScrape(cleanOutput: string): boolean;
7
+ export declare const LEGACY_FIDELITY_WARNING = "This session ran a CLI that does not stamp the machine contract, so the boot verdict was read from the dev server's output instead of its ready contract. Diagnostics are less precise: compile errors come back as a text tail rather than a list. Upgrade the project's extension dependency to get the precise verdict.";
@@ -17,6 +17,7 @@ export interface LoginConfig {
17
17
  export declare function fetchLoginConfig(apiBase: string, fetchImpl?: FetchImpl): Promise<LoginConfig>;
18
18
  export declare function persistTokenResponse(args: {
19
19
  apiBase: string;
20
+ project: string;
20
21
  data: Record<string, unknown>;
21
22
  }): StoredCredentials;
22
23
  export {};
@@ -1,8 +1,9 @@
1
1
  import type { ProcessInfo } from "./types";
2
- export declare function removeSessionMarker(projectPath: string, browser: string): void;
2
+ export declare function removeSessionMarker(projectPath: string, browser: string, pid?: number): void;
3
3
  export declare function listSessionMarkers(): ProcessInfo[];
4
4
  export declare function registerSession(info: ProcessInfo): void;
5
+ export declare function sessionSinceMs(projectPath: string, browser: string): number | null;
5
6
  export declare function getSession(projectPath: string, browser: string): ProcessInfo | undefined;
6
7
  export declare function findSessionInfo(projectPath: string, browser: string): ProcessInfo | undefined;
7
- export declare function removeSession(projectPath: string, browser: string): void;
8
+ export declare function removeSession(projectPath: string, browser: string, pid?: number): void;
8
9
  export declare function listSessions(): ProcessInfo[];
@@ -6,7 +6,7 @@ export declare function knownSessionBrowsers(projectPath: string): string[];
6
6
  export interface LiveSession {
7
7
  browser: string;
8
8
  pid: number;
9
- source: "registry" | "contract";
9
+ source: "registry" | "contract" | "marker";
10
10
  }
11
11
  export declare function liveProjectSessions(projectPath: string): LiveSession[];
12
12
  export declare function deadReadySession(projectPath: string): {
@@ -0,0 +1,48 @@
1
+ export declare const schema: {
2
+ name: string;
3
+ description: string;
4
+ inputSchema: {
5
+ type: "object";
6
+ properties: {
7
+ projectPath: {
8
+ readonly type: "string";
9
+ readonly description: "Extension project root (needs a live dev session)";
10
+ };
11
+ url: {
12
+ type: string;
13
+ description: string;
14
+ };
15
+ probe: {
16
+ type: string;
17
+ items: {
18
+ type: string;
19
+ };
20
+ description: string;
21
+ };
22
+ include: {
23
+ type: string;
24
+ items: {
25
+ type: string;
26
+ enum: string[];
27
+ };
28
+ default: string[];
29
+ description: string;
30
+ };
31
+ browser: {
32
+ readonly type: "string";
33
+ readonly description: "Session browser; defaults to this project's live session";
34
+ };
35
+ maxBytes: {
36
+ type: string;
37
+ default: number;
38
+ description: string;
39
+ };
40
+ deepDom: {
41
+ type: string;
42
+ default: boolean;
43
+ description: string;
44
+ };
45
+ };
46
+ required: string[];
47
+ };
48
+ };
@@ -1,51 +1,5 @@
1
- export declare const schema: {
2
- name: string;
3
- description: string;
4
- inputSchema: {
5
- type: "object";
6
- properties: {
7
- projectPath: {
8
- readonly type: "string";
9
- readonly description: "Extension project root (needs a live dev session)";
10
- };
11
- url: {
12
- type: string;
13
- description: string;
14
- };
15
- probe: {
16
- type: string;
17
- items: {
18
- type: string;
19
- };
20
- description: string;
21
- };
22
- include: {
23
- type: string;
24
- items: {
25
- type: string;
26
- enum: string[];
27
- };
28
- default: string[];
29
- description: string;
30
- };
31
- browser: {
32
- readonly type: "string";
33
- readonly description: "Session browser; defaults to this project's live session";
34
- };
35
- maxBytes: {
36
- type: string;
37
- default: number;
38
- description: string;
39
- };
40
- deepDom: {
41
- type: string;
42
- default: boolean;
43
- description: string;
44
- };
45
- };
46
- required: string[];
47
- };
48
- };
1
+ import { schema } from "./inspect-schema";
2
+ export { schema };
49
3
  export declare function handler(args: {
50
4
  projectPath: string;
51
5
  url?: string;
@@ -5,6 +5,7 @@ export interface SubmitToolArgs {
5
5
  channel?: string;
6
6
  version?: string;
7
7
  dryRun?: boolean;
8
+ projectPath?: string;
8
9
  api?: string;
9
10
  }
10
11
  export declare const schema: {
@@ -38,6 +39,10 @@ export declare const schema: {
38
39
  default: boolean;
39
40
  description: string;
40
41
  };
42
+ projectPath: {
43
+ type: string;
44
+ description: string;
45
+ };
41
46
  api: {
42
47
  readonly type: "string";
43
48
  readonly description: "Platform base URL (default EXTENSION_DEV_API_URL, else https://www.extension.dev)";
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@extension.dev/mcp",
3
3
  "type": "module",
4
- "version": "9.0.0",
4
+ "version": "10.1.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",
@@ -42,9 +42,7 @@
42
42
  "server.json",
43
43
  "README.md",
44
44
  "CHANGELOG.md",
45
- "LICENSE",
46
- "NOTICE",
47
- "TRADEMARK.md"
45
+ "LICENSE"
48
46
  ],
49
47
  "scripts": {
50
48
  "clean": "rm -rf dist",
@@ -91,9 +89,9 @@
91
89
  "@modelcontextprotocol/sdk": "^1.12.1",
92
90
  "browser-extension-manifest-fields": "^2.2.9",
93
91
  "cross-spawn": "^7.0.6",
94
- "extension-create": "4.0.16-canary.1784889479.74e12044",
95
- "extension-develop": "4.0.16-canary.1784889479.74e12044",
96
- "extension-install": "4.0.16-canary.1784889479.74e12044",
92
+ "extension-create": "4.0.17",
93
+ "extension-develop": "4.0.17",
94
+ "extension-install": "4.0.17",
97
95
  "ws": "^8.20.0"
98
96
  },
99
97
  "devDependencies": {
package/server.json CHANGED
@@ -7,13 +7,13 @@
7
7
  "source": "github"
8
8
  },
9
9
  "websiteUrl": "https://extension.dev",
10
- "version": "9.0.0",
10
+ "version": "10.1.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": "9.0.0",
16
+ "version": "10.1.0",
17
17
  "runtimeHint": "npx",
18
18
  "transport": {
19
19
  "type": "stdio"