@extension.dev/mcp 4.6.0 → 4.8.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 +48 -2
- package/README.md +3 -3
- package/dist/module.js +1103 -432
- package/dist/src/lib/cdp-port.d.ts +1 -0
- package/dist/src/lib/credentials.d.ts +2 -0
- package/dist/src/lib/device-flow.d.ts +41 -0
- package/dist/src/lib/login-flow.d.ts +23 -3
- package/dist/src/lib/validate-input.d.ts +1 -0
- package/dist/src/tools/deploy.d.ts +14 -70
- package/dist/src/tools/doctor.d.ts +1 -2
- package/dist/src/tools/manifest-validate.d.ts +7 -2
- package/dist/src/tools/publish.d.ts +1 -6
- package/dist/src/tools/stop.d.ts +0 -1
- package/package.json +1 -1
- package/server.json +2 -2
|
@@ -8,6 +8,8 @@ export interface StoredCredentials {
|
|
|
8
8
|
expiresAt: number;
|
|
9
9
|
/** Platform base URL the token was minted against. */
|
|
10
10
|
api: string;
|
|
11
|
+
/** Which device flow minted this token: extension.dev-gated or GitHub-direct. */
|
|
12
|
+
provider?: "extensiondev" | "github";
|
|
11
13
|
}
|
|
12
14
|
export declare function credentialsPath(): string;
|
|
13
15
|
export declare function readCredentials(): StoredCredentials | null;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import type { StoredCredentials } from "./credentials";
|
|
2
|
+
type FetchImpl = typeof fetch;
|
|
3
|
+
export interface DeviceCodeStart {
|
|
4
|
+
deviceCode: string;
|
|
5
|
+
userCode: string;
|
|
6
|
+
verificationUri: string;
|
|
7
|
+
verificationUriComplete: string;
|
|
8
|
+
interval: number;
|
|
9
|
+
expiresIn: number;
|
|
10
|
+
}
|
|
11
|
+
export declare function requestDeviceCode(args: {
|
|
12
|
+
apiBase: string;
|
|
13
|
+
path: string;
|
|
14
|
+
project: string;
|
|
15
|
+
clientName?: string;
|
|
16
|
+
fetchImpl?: FetchImpl;
|
|
17
|
+
}): Promise<DeviceCodeStart>;
|
|
18
|
+
export type DevicePollResult = {
|
|
19
|
+
ok: true;
|
|
20
|
+
creds: StoredCredentials;
|
|
21
|
+
} | {
|
|
22
|
+
ok: false;
|
|
23
|
+
reason: "pending" | "denied" | "expired" | "error";
|
|
24
|
+
message?: string;
|
|
25
|
+
};
|
|
26
|
+
/**
|
|
27
|
+
* Poll the extension.dev token endpoint until approved or the budget runs out.
|
|
28
|
+
* The budget is kept under the MCP client request timeout; the tool re-invokes
|
|
29
|
+
* with the same deviceCode to keep waiting (idempotent), mirroring the GitHub
|
|
30
|
+
* poll's two-phase contract.
|
|
31
|
+
*/
|
|
32
|
+
export declare function pollDeviceToken(args: {
|
|
33
|
+
apiBase: string;
|
|
34
|
+
path: string;
|
|
35
|
+
project: string;
|
|
36
|
+
deviceCode: string;
|
|
37
|
+
interval: number;
|
|
38
|
+
budgetMs: number;
|
|
39
|
+
fetchImpl?: FetchImpl;
|
|
40
|
+
}): Promise<DevicePollResult>;
|
|
41
|
+
export {};
|
|
@@ -17,15 +17,35 @@ export declare function safeApiBase(raw: string): {
|
|
|
17
17
|
message: string;
|
|
18
18
|
};
|
|
19
19
|
export interface LoginConfig {
|
|
20
|
+
/**
|
|
21
|
+
* "extensiondev": the extension.dev-gated device flow (branded /device, GitHub
|
|
22
|
+
* federated server-side). "github": the legacy GitHub-direct device flow.
|
|
23
|
+
*/
|
|
24
|
+
provider: "extensiondev" | "github";
|
|
20
25
|
clientId: string;
|
|
21
26
|
scope: string;
|
|
27
|
+
deviceCodeUrl: string;
|
|
28
|
+
deviceTokenUrl: string;
|
|
29
|
+
verificationUri: string;
|
|
22
30
|
}
|
|
23
31
|
/**
|
|
24
|
-
* Resolve the
|
|
25
|
-
*
|
|
26
|
-
*
|
|
32
|
+
* Resolve how the device flow should authenticate. The server's public config
|
|
33
|
+
* picks the provider (extension.dev-gated once its device endpoints are live,
|
|
34
|
+
* else GitHub-direct). EXTENSION_DEV_GITHUB_CLIENT_ID forces the GitHub flow
|
|
35
|
+
* (useful when pointing at a self-hosted platform).
|
|
27
36
|
*/
|
|
28
37
|
export declare function fetchLoginConfig(apiBase: string, fetchImpl?: FetchImpl): Promise<LoginConfig>;
|
|
38
|
+
/**
|
|
39
|
+
* Persist a `{ token, expiresAt, workspaceSlug, projectSlug }` response (the
|
|
40
|
+
* shape returned by BOTH the GitHub exchange endpoint and the extension.dev
|
|
41
|
+
* device/token endpoint) to the local credentials file. Records which provider
|
|
42
|
+
* minted it.
|
|
43
|
+
*/
|
|
44
|
+
export declare function persistTokenResponse(args: {
|
|
45
|
+
apiBase: string;
|
|
46
|
+
data: Record<string, unknown>;
|
|
47
|
+
provider: "extensiondev" | "github";
|
|
48
|
+
}): StoredCredentials;
|
|
29
49
|
/**
|
|
30
50
|
* Trade a verified GitHub user token for a project-scoped access token and
|
|
31
51
|
* write it to the local credentials file. Returns the stored credentials
|
|
@@ -2,5 +2,6 @@ export interface InputIssue {
|
|
|
2
2
|
path: string;
|
|
3
3
|
message: string;
|
|
4
4
|
}
|
|
5
|
+
export declare function normalizeArgAliases(inputSchema: Record<string, unknown>, args: Record<string, unknown>): Record<string, unknown>;
|
|
5
6
|
export declare function validateToolInput(inputSchema: Record<string, unknown>, args: Record<string, unknown>): InputIssue[];
|
|
6
7
|
export declare function inputValidationError(toolName: string, issues: InputIssue[]): string;
|
|
@@ -1,71 +1,34 @@
|
|
|
1
1
|
export interface DeployToolArgs {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
firefoxZip?: string;
|
|
7
|
-
firefoxSourcesZip?: string;
|
|
8
|
-
firefoxExtensionId?: string;
|
|
9
|
-
firefoxChannel?: "listed" | "unlisted";
|
|
10
|
-
edgeZip?: string;
|
|
11
|
-
edgeProductId?: string;
|
|
2
|
+
browsers: string[];
|
|
3
|
+
buildSha: string;
|
|
4
|
+
channel?: string;
|
|
5
|
+
version?: string;
|
|
12
6
|
dryRun?: boolean;
|
|
13
|
-
|
|
14
|
-
chromeDeployPercentage?: number;
|
|
15
|
-
chromeSkipSubmitReview?: boolean;
|
|
16
|
-
edgeSkipSubmitReview?: boolean;
|
|
17
|
-
outputJson?: string;
|
|
7
|
+
api?: string;
|
|
18
8
|
}
|
|
19
|
-
/**
|
|
20
|
-
* Build the extension-deploy argv from tool arguments. Pure and exported so the
|
|
21
|
-
* flag mapping is unit-tested without spawning a process. Never emits a
|
|
22
|
-
* credential flag - secrets come from the environment / .env.submit.
|
|
23
|
-
*/
|
|
24
|
-
export declare function buildDeployArgs(args: DeployToolArgs): string[];
|
|
25
9
|
export declare const schema: {
|
|
26
10
|
name: string;
|
|
27
11
|
description: string;
|
|
28
12
|
inputSchema: {
|
|
29
13
|
type: "object";
|
|
30
14
|
properties: {
|
|
31
|
-
|
|
15
|
+
browsers: {
|
|
32
16
|
type: string;
|
|
17
|
+
items: {
|
|
18
|
+
type: string;
|
|
19
|
+
enum: string[];
|
|
20
|
+
};
|
|
33
21
|
description: string;
|
|
34
22
|
};
|
|
35
|
-
|
|
23
|
+
buildSha: {
|
|
36
24
|
type: string;
|
|
37
25
|
description: string;
|
|
38
26
|
};
|
|
39
|
-
|
|
27
|
+
channel: {
|
|
40
28
|
type: string;
|
|
41
29
|
description: string;
|
|
42
30
|
};
|
|
43
|
-
|
|
44
|
-
type: string;
|
|
45
|
-
description: string;
|
|
46
|
-
};
|
|
47
|
-
firefoxZip: {
|
|
48
|
-
type: string;
|
|
49
|
-
description: string;
|
|
50
|
-
};
|
|
51
|
-
firefoxSourcesZip: {
|
|
52
|
-
type: string;
|
|
53
|
-
description: string;
|
|
54
|
-
};
|
|
55
|
-
firefoxExtensionId: {
|
|
56
|
-
type: string;
|
|
57
|
-
description: string;
|
|
58
|
-
};
|
|
59
|
-
firefoxChannel: {
|
|
60
|
-
type: string;
|
|
61
|
-
enum: string[];
|
|
62
|
-
description: string;
|
|
63
|
-
};
|
|
64
|
-
edgeZip: {
|
|
65
|
-
type: string;
|
|
66
|
-
description: string;
|
|
67
|
-
};
|
|
68
|
-
edgeProductId: {
|
|
31
|
+
version: {
|
|
69
32
|
type: string;
|
|
70
33
|
description: string;
|
|
71
34
|
};
|
|
@@ -74,26 +37,7 @@ export declare const schema: {
|
|
|
74
37
|
default: boolean;
|
|
75
38
|
description: string;
|
|
76
39
|
};
|
|
77
|
-
|
|
78
|
-
type: string;
|
|
79
|
-
default: boolean;
|
|
80
|
-
description: string;
|
|
81
|
-
};
|
|
82
|
-
chromeDeployPercentage: {
|
|
83
|
-
type: string;
|
|
84
|
-
description: string;
|
|
85
|
-
};
|
|
86
|
-
chromeSkipSubmitReview: {
|
|
87
|
-
type: string;
|
|
88
|
-
default: boolean;
|
|
89
|
-
description: string;
|
|
90
|
-
};
|
|
91
|
-
edgeSkipSubmitReview: {
|
|
92
|
-
type: string;
|
|
93
|
-
default: boolean;
|
|
94
|
-
description: string;
|
|
95
|
-
};
|
|
96
|
-
outputJson: {
|
|
40
|
+
api: {
|
|
97
41
|
type: string;
|
|
98
42
|
description: string;
|
|
99
43
|
};
|
|
@@ -8,6 +8,10 @@ export declare const schema: {
|
|
|
8
8
|
type: string;
|
|
9
9
|
description: string;
|
|
10
10
|
};
|
|
11
|
+
projectPath: {
|
|
12
|
+
type: string;
|
|
13
|
+
description: string;
|
|
14
|
+
};
|
|
11
15
|
browsers: {
|
|
12
16
|
type: string;
|
|
13
17
|
items: {
|
|
@@ -17,10 +21,11 @@ export declare const schema: {
|
|
|
17
21
|
description: string;
|
|
18
22
|
};
|
|
19
23
|
};
|
|
20
|
-
required:
|
|
24
|
+
required: never[];
|
|
21
25
|
};
|
|
22
26
|
};
|
|
23
27
|
export declare function handler(args: {
|
|
24
|
-
manifestPath
|
|
28
|
+
manifestPath?: string;
|
|
29
|
+
projectPath?: string;
|
|
25
30
|
browsers?: string[];
|
|
26
31
|
}): Promise<string>;
|
|
@@ -4,10 +4,6 @@ export declare const schema: {
|
|
|
4
4
|
inputSchema: {
|
|
5
5
|
type: "object";
|
|
6
6
|
properties: {
|
|
7
|
-
projectPath: {
|
|
8
|
-
type: string;
|
|
9
|
-
description: string;
|
|
10
|
-
};
|
|
11
7
|
ttlHours: {
|
|
12
8
|
type: string;
|
|
13
9
|
description: string;
|
|
@@ -21,11 +17,10 @@ export declare const schema: {
|
|
|
21
17
|
description: string;
|
|
22
18
|
};
|
|
23
19
|
};
|
|
24
|
-
required:
|
|
20
|
+
required: never[];
|
|
25
21
|
};
|
|
26
22
|
};
|
|
27
23
|
export declare function handler(args: {
|
|
28
|
-
projectPath: string;
|
|
29
24
|
ttlHours?: number;
|
|
30
25
|
buildSha?: string;
|
|
31
26
|
api?: string;
|
package/dist/src/tools/stop.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@extension.dev/mcp",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "4.
|
|
4
|
+
"version": "4.8.0",
|
|
5
5
|
"description": "MCP server that lets AI agents (Claude Code, Claude Desktop, Cursor, Copilot, Codex) build, run, inspect, and publish browser extensions. 31 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": "MIT",
|
package/server.json
CHANGED
|
@@ -7,13 +7,13 @@
|
|
|
7
7
|
"source": "github"
|
|
8
8
|
},
|
|
9
9
|
"websiteUrl": "https://extension.dev",
|
|
10
|
-
"version": "4.
|
|
10
|
+
"version": "4.8.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": "4.
|
|
16
|
+
"version": "4.8.0",
|
|
17
17
|
"runtimeHint": "npx",
|
|
18
18
|
"transport": {
|
|
19
19
|
"type": "stdio"
|