@extension.dev/mcp 10.9.0 → 10.10.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.
- package/.claude-plugin/marketplace.json +1 -1
- package/.claude-plugin/plugin.json +1 -1
- package/CHANGELOG.md +79 -0
- package/README.md +34 -0
- package/claude/ARCHITECTURE.md +1 -4
- package/claude/CLAUDE.md +5 -0
- package/claude/commands/extension-debug.md +2 -0
- package/claude/rules/mcp-tools.md +16 -0
- package/dist/module.js +1002 -57
- package/dist/src/index.d.ts +3 -0
- package/dist/src/lib/allowance.d.ts +16 -0
- package/dist/src/lib/analytics-scrub.d.ts +3 -0
- package/dist/src/lib/cdp-extension-page.d.ts +21 -0
- package/dist/src/lib/envelope.d.ts +1 -1
- package/dist/src/lib/preview-upload.d.ts +1 -0
- package/dist/src/lib/safari-automation.d.ts +16 -0
- package/dist/src/lib/template-artifact-source.d.ts +1 -1
- package/dist/src/lib/types.d.ts +2 -0
- package/dist/src/lib/webdriver.d.ts +28 -0
- package/dist/src/tools/eval.d.ts +3 -0
- package/dist/src/tools/open.d.ts +2 -0
- package/package.json +4 -4
- package/server.json +2 -2
package/dist/src/index.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { Server } from "@modelcontextprotocol/sdk/server/index.js";
|
|
1
2
|
import { version } from "../package.json";
|
|
2
3
|
export { version };
|
|
3
4
|
export interface ToolModule {
|
|
@@ -16,5 +17,7 @@ export declare function toolResultFrame(result: string): {
|
|
|
16
17
|
}>;
|
|
17
18
|
isError?: boolean;
|
|
18
19
|
};
|
|
20
|
+
export declare const SERVER_INSTRUCTIONS: string;
|
|
21
|
+
export declare function createServer(): Server;
|
|
19
22
|
export declare function startServer(): Promise<void>;
|
|
20
23
|
export declare function runCli(cmd: string, args: string[]): Promise<number>;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export declare const FREE_ALLOWANCE_PHRASE = "counts against your free allowance";
|
|
2
|
+
export interface SpendNarration {
|
|
3
|
+
spent: string;
|
|
4
|
+
remains: string;
|
|
5
|
+
wall: string;
|
|
6
|
+
}
|
|
7
|
+
export declare function allowanceWallUrl(apiHint?: string): string;
|
|
8
|
+
export declare function readPlatformAllowance(body: unknown): {
|
|
9
|
+
used: number;
|
|
10
|
+
limit: number;
|
|
11
|
+
} | null;
|
|
12
|
+
export declare function spendNarration(options: {
|
|
13
|
+
what: string;
|
|
14
|
+
body?: unknown;
|
|
15
|
+
api?: string;
|
|
16
|
+
}): SpendNarration;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { type PageTarget } from "./cdp-targets";
|
|
2
|
+
export type ExtensionPageEval = {
|
|
3
|
+
ok: true;
|
|
4
|
+
value: unknown;
|
|
5
|
+
} | {
|
|
6
|
+
ok: false;
|
|
7
|
+
message: string;
|
|
8
|
+
thrown: boolean;
|
|
9
|
+
};
|
|
10
|
+
export declare function matchExtensionPageTargets(targets: PageTarget[], wantedUrl: string): PageTarget[];
|
|
11
|
+
export declare function findExtensionPageTargets(port: number, wantedUrl: string): Promise<PageTarget[]>;
|
|
12
|
+
export declare function evaluateOnExtensionPage(port: number, targetId: string, expression: string): Promise<ExtensionPageEval>;
|
|
13
|
+
export type SidePanelGestureOutcome = {
|
|
14
|
+
opened: true;
|
|
15
|
+
targetId: string;
|
|
16
|
+
url: string;
|
|
17
|
+
} | {
|
|
18
|
+
opened: false;
|
|
19
|
+
reason: string;
|
|
20
|
+
};
|
|
21
|
+
export declare function openSidePanelWithSyntheticGesture(port: number, hostUrl: string): Promise<SidePanelGestureOutcome>;
|
|
@@ -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_APPROVAL_PENDING" | "E_APPROVAL_REJECTED" | "E_APPROVAL_REQUIRED" | "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";
|
|
3
|
+
export type ErrorCode = "E_AMBIGUOUS_TARGET" | "E_APPROVAL_PENDING" | "E_APPROVAL_REJECTED" | "E_APPROVAL_REQUIRED" | "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_EVAL" | "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;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export interface SafariAutomation {
|
|
2
|
+
safaridriver: string | null;
|
|
3
|
+
mcp: boolean;
|
|
4
|
+
bidi: boolean;
|
|
5
|
+
}
|
|
6
|
+
export declare const SAFARI_MCP_SETTING = "Safari > Settings > Developer > \"Allow remote automation and external agents\"";
|
|
7
|
+
export declare const SAFARI_MCP_ADD_COMMAND = "claude mcp add safari-mcp -- \"/usr/bin/safaridriver\" --mcp";
|
|
8
|
+
export declare function parseSafariDriverHelp(helpText: string): {
|
|
9
|
+
mcp: boolean;
|
|
10
|
+
bidi: boolean;
|
|
11
|
+
};
|
|
12
|
+
export declare function safariDriverCandidates(safariBinary: string | null): string[];
|
|
13
|
+
export declare function readSafariDriverHelp(driverPath: string): Promise<string | null>;
|
|
14
|
+
export declare function detectSafariAutomation(safariBinary: string | null): Promise<SafariAutomation>;
|
|
15
|
+
export declare function readSafariVersion(safariBinary: string): Promise<string | null>;
|
|
16
|
+
export declare function safariAutomationHint(automation: SafariAutomation): string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare const PINNED_COMMIT = "
|
|
1
|
+
export declare const PINNED_COMMIT = "8e2336852b51c0fb71fd03abeca1f5e93a44700e";
|
|
2
2
|
export type TemplateCatalogUtmSource = "mcp" | "mcp-create";
|
|
3
3
|
export declare function templateCatalogUrl(slug: string, utmSource?: TemplateCatalogUtmSource): string;
|
|
4
4
|
export declare function resolvedTemplateCommit(): Promise<string>;
|
package/dist/src/lib/types.d.ts
CHANGED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
export declare const WEBDRIVER_SESSION_MISSING_HINT = "A Safari page is readable only through a safaridriver session the dev session records in ready.json (webdriverPort and webdriverSessionId), and no Extension.js release opens one today: Safari grants one automation session at a time, so this server never opens its own. What Safari does give you is the dev session's log file, which extension_logs and the log-based assertions read once the extension is enabled; the rest is Web Inspector, attended.";
|
|
2
|
+
export interface WebDriverSessionInfo {
|
|
3
|
+
port: number;
|
|
4
|
+
sessionId: string;
|
|
5
|
+
}
|
|
6
|
+
export declare function readWebDriverSession(projectPath: string, browser: string): WebDriverSessionInfo | null;
|
|
7
|
+
export declare function readyExtensionId(projectPath: string, browser: string): string | null;
|
|
8
|
+
export declare class WebDriverClient {
|
|
9
|
+
readonly info: WebDriverSessionInfo;
|
|
10
|
+
private readonly fetchFn;
|
|
11
|
+
private readonly base;
|
|
12
|
+
constructor(info: WebDriverSessionInfo, fetchFn?: typeof fetch);
|
|
13
|
+
private call;
|
|
14
|
+
alive(): Promise<boolean>;
|
|
15
|
+
currentUrl(): Promise<string | null>;
|
|
16
|
+
navigate(url: string, timeoutMs?: number): Promise<void>;
|
|
17
|
+
refresh(timeoutMs?: number): Promise<void>;
|
|
18
|
+
execute(script: string, args?: unknown[], timeoutMs?: number): Promise<unknown>;
|
|
19
|
+
}
|
|
20
|
+
export interface ExtensionRootReading {
|
|
21
|
+
roots: number;
|
|
22
|
+
owners: string[];
|
|
23
|
+
url: string;
|
|
24
|
+
title: string;
|
|
25
|
+
}
|
|
26
|
+
export declare const EXTENSION_ROOT_READING_SCRIPT = "\n const nodes = Array.from(document.querySelectorAll('#extension-root,[data-extension-root]'));\n return {\n roots: nodes.length,\n owners: nodes.map((n) => String(n.getAttribute('data-extjs-reinject-owner') || '')),\n url: String(location.href),\n title: String(document.title || '')\n };\n";
|
|
27
|
+
export declare function readExtensionRoots(client: WebDriverClient): Promise<ExtensionRootReading>;
|
|
28
|
+
export declare function sameDocument(current: string | null, wanted: string): boolean;
|
package/dist/src/tools/eval.d.ts
CHANGED
|
@@ -38,7 +38,10 @@ export declare const schema: {
|
|
|
38
38
|
required: string[];
|
|
39
39
|
};
|
|
40
40
|
};
|
|
41
|
+
export declare function chromiumManifestVersion(projectPath: string, browser: string): 2 | 3 | null;
|
|
41
42
|
export declare function resolveDefaultEvalContext(projectPath: string, browser: string): "background" | "page";
|
|
43
|
+
export declare const EXTENSION_PAGE_CONTEXTS: string[];
|
|
44
|
+
export declare function wantsExtensionPageOverCdp(projectPath: string, browser: string, context: string | undefined, url: string | undefined): boolean;
|
|
42
45
|
export declare function handler(args: ActArgs & {
|
|
43
46
|
expression: string;
|
|
44
47
|
}): Promise<string>;
|
package/dist/src/tools/open.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { type ActArgs } from "../lib/act";
|
|
2
|
+
export declare const OVERRIDE_SURFACES: string[];
|
|
2
3
|
export declare function navigateToUrl(projectPath: string, browser: string, url: string, timeout?: number): Promise<string>;
|
|
3
4
|
export declare function resolveExtensionId(projectPath: string, browser: string): Promise<string | null>;
|
|
4
5
|
export declare function surfaceDocument(projectPath: string, browser: string, surface: string): string | null;
|
|
@@ -56,3 +57,4 @@ export declare function handler(args: ActArgs & {
|
|
|
56
57
|
url?: string;
|
|
57
58
|
asTab?: boolean;
|
|
58
59
|
}): Promise<string>;
|
|
60
|
+
export declare const E_USER_GESTURE_REQUIRED = "E_USER_GESTURE_REQUIRED";
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@extension.dev/mcp",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "10.
|
|
4
|
+
"version": "10.10.0",
|
|
5
5
|
"description": "MCP server that lets AI agents (Claude Code, Claude Desktop, Cursor, Copilot, Codex) build, run, inspect, and publish browser extensions. 30 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",
|
|
@@ -91,9 +91,9 @@
|
|
|
91
91
|
"@modelcontextprotocol/sdk": "^1.12.1",
|
|
92
92
|
"browser-extension-manifest-fields": "^2.2.9",
|
|
93
93
|
"cross-spawn": "^7.0.6",
|
|
94
|
-
"extension-create": "4.1.
|
|
95
|
-
"extension-develop": "4.1.
|
|
96
|
-
"extension-install": "4.1.
|
|
94
|
+
"extension-create": "4.1.29",
|
|
95
|
+
"extension-develop": "4.1.29",
|
|
96
|
+
"extension-install": "4.1.29",
|
|
97
97
|
"ws": "^8.20.0"
|
|
98
98
|
},
|
|
99
99
|
"devDependencies": {
|
package/server.json
CHANGED
|
@@ -7,13 +7,13 @@
|
|
|
7
7
|
"source": "github"
|
|
8
8
|
},
|
|
9
9
|
"websiteUrl": "https://extension.dev",
|
|
10
|
-
"version": "10.
|
|
10
|
+
"version": "10.10.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.
|
|
16
|
+
"version": "10.10.0",
|
|
17
17
|
"runtimeHint": "npx",
|
|
18
18
|
"transport": {
|
|
19
19
|
"type": "stdio"
|