@extension.dev/mcp 5.1.1 → 5.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.
@@ -10,7 +10,7 @@
10
10
  "name": "extension-mcp",
11
11
  "source": "./",
12
12
  "description": "MCP tools for browser extension development: scaffold from 60+ templates, run the dev server with HMR, inspect the live DOM and logs, and publish store-ready builds for Chrome, Edge, and Firefox.",
13
- "version": "5.1.1",
13
+ "version": "5.2.0",
14
14
  "category": "development",
15
15
  "author": {
16
16
  "name": "Cezar Augusto"
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "extension-mcp",
3
3
  "description": "MCP tools for browser extension development: scaffold from 60+ templates, run the dev server with HMR, inspect the live DOM and logs, and publish store-ready builds for Chrome, Edge, and Firefox. Ships /extension, /extension-add, /extension-debug, and /extension-publish commands.",
4
- "version": "5.1.1",
4
+ "version": "5.2.0",
5
5
  "author": {
6
6
  "name": "Cezar Augusto",
7
7
  "email": "boss@cezaraugusto.net",
package/CHANGELOG.md CHANGED
@@ -1,5 +1,30 @@
1
1
  # Changelog
2
2
 
3
+ ## 5.2.0
4
+
5
+ ### Added
6
+
7
+ - `extension_manifest_validate` warns when a Chrome-desktop-only manifest
8
+ key (for example `file_browser_handlers`) rides an Edge target, where it
9
+ is inert. Family-level prefix resolution already worked; this adds
10
+ granularity inside the chromium family for Edge-targeted publishers.
11
+ - `extension_logout` now returns `revokeUrl` pointing at the project's
12
+ access-tokens page and says plainly that the token stays valid
13
+ server-side until revoked there. The scope is read before the local
14
+ credentials are cleared so the link can still be built.
15
+
16
+ ## 5.1.2
17
+
18
+ ### Fixed
19
+
20
+ - `extension_logs` no longer flags a healthy live session as stale. Newer
21
+ engine canaries stamp log and event rows with ready.json's `instanceId`
22
+ rather than its `runId`, so the staleness check compared ids from two
23
+ different spaces and every live read carried `stale: true` with a
24
+ do-not-trust warning. The comparator now accepts either identity field,
25
+ pinned by a test against the real contract shapes. (Filed upstream as
26
+ Extension.js bug 77 so the ready/logs contract agrees on one field.)
27
+
3
28
  ## 5.1.1
4
29
 
5
30
  ### Added
package/dist/module.js CHANGED
@@ -203,7 +203,7 @@ __webpack_require__.d(whoami_namespaceObject, {
203
203
  handler: ()=>whoami_handler,
204
204
  schema: ()=>whoami_schema
205
205
  });
206
- var package_namespaceObject = JSON.parse('{"rE":"5.1.0","El":{"OP":"^4.0.13"}}');
206
+ var package_namespaceObject = JSON.parse('{"rE":"5.2.0","El":{"OP":"^4.0.13"}}');
207
207
  function scaffoldEnginePin(projectPath) {
208
208
  try {
209
209
  const pkg = JSON.parse(node_fs.readFileSync(node_path.join(projectPath, "package.json"), "utf8"));
@@ -1657,6 +1657,12 @@ function isChromiumFamily(browser) {
1657
1657
  function isGeckoFamily(browser) {
1658
1658
  return GECKO_FAMILY.has(browser);
1659
1659
  }
1660
+ const CHROME_DESKTOP_ONLY_KEYS = [
1661
+ "file_browser_handlers",
1662
+ "file_system_provider_capabilities",
1663
+ "input_components",
1664
+ "chrome_os_system_extension"
1665
+ ];
1660
1666
  const KNOWN_PERMISSIONS = new Set([
1661
1667
  "activeTab",
1662
1668
  "alarms",
@@ -2026,6 +2032,9 @@ async function manifest_validate_handler(args) {
2026
2032
  if (!perms.includes("sidePanel")) issues.push('Side panel declared but "sidePanel" permission is missing.');
2027
2033
  }
2028
2034
  if (manifest["firefox:browser_action"] && !effective.action) issues.push('Firefox browser_action found but no chromium:action. Chromium MV3 uses "action" instead of "browser_action".');
2035
+ if ("edge" === browser) {
2036
+ for (const key of CHROME_DESKTOP_ONLY_KEYS)if (void 0 !== effective[key]) result.warnings.push(`Manifest key "${key}" works on Chrome but is inert on Edge (it is a Chrome-only surface). The edge build ships it as a no-op; move it under "chromium:${key}" only if you also target Chrome, or remove it.`);
2037
+ }
2029
2038
  }
2030
2039
  if (isFirefox) {
2031
2040
  const contentScripts = effective.content_scripts;
@@ -3229,7 +3238,11 @@ function staleFileNote(projectPath, browser, eventsRunId) {
3229
3238
  } catch {
3230
3239
  return `These events are from a PAST run: the session that wrote them (pid ${contract.pid}) is dead. Nothing current is producing logs; do not read these as live output.`;
3231
3240
  }
3232
- if (eventsRunId && contract.runId && String(contract.runId) !== eventsRunId) return `These events carry runId ${eventsRunId} but the current session is run ${String(contract.runId)}, which has written nothing yet. Do not read these as the current run's output.`;
3241
+ const liveIds = [
3242
+ contract.runId,
3243
+ contract.instanceId
3244
+ ].map((v)=>String(v || "")).filter(Boolean);
3245
+ if (eventsRunId && liveIds.length > 0 && !liveIds.includes(eventsRunId)) return `These events carry runId ${eventsRunId} but the current session is run ${liveIds.join(" / ")}, which has written nothing yet. Do not read these as the current run's output.`;
3233
3246
  }
3234
3247
  async function readFromFile(args, browser, limit) {
3235
3248
  const file = logsFilePath(args.projectPath, browser);
@@ -5509,18 +5522,23 @@ async function whoami_handler() {
5509
5522
  }
5510
5523
  const logout_schema = {
5511
5524
  name: "extension_logout",
5512
- description: "Delete the locally stored extension.dev credentials. Does not revoke the token server-side (revoke from the dashboard if needed); only removes it from this machine.",
5525
+ description: "Delete the locally stored extension.dev credentials. Does not revoke the token server-side (the response includes the dashboard URL where the token can be revoked); only removes it from this machine.",
5513
5526
  inputSchema: {
5514
5527
  type: "object",
5515
5528
  properties: {}
5516
5529
  }
5517
5530
  };
5518
5531
  async function logout_handler() {
5532
+ const creds = readCredentials();
5533
+ const revokeUrl = creds?.workspaceSlug && creds?.projectSlug ? `https://console.extension.dev/${creds.workspaceSlug}/${creds.projectSlug}/settings/access-tokens` : null;
5519
5534
  const result = clearCredentials();
5520
5535
  return JSON.stringify({
5521
5536
  ok: true,
5522
5537
  cleared: result.cleared,
5523
- message: result.cleared ? "Local credentials removed." : "No stored credentials to remove."
5538
+ ...result.cleared && revokeUrl ? {
5539
+ revokeUrl
5540
+ } : {},
5541
+ message: result.cleared ? revokeUrl ? `Local credentials removed. The token stays valid server-side until it expires; revoke it now at ${revokeUrl} (takes about a minute to propagate).` : "Local credentials removed. The token stays valid server-side until it expires; revoke it from the project's access-tokens page if needed." : "No stored credentials to remove."
5524
5542
  });
5525
5543
  }
5526
5544
  const install_browser_schema = {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@extension.dev/mcp",
3
3
  "type": "module",
4
- "version": "5.1.1",
4
+ "version": "5.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. 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": "5.1.1",
10
+ "version": "5.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": "5.1.1",
16
+ "version": "5.2.0",
17
17
  "runtimeHint": "npx",
18
18
  "transport": {
19
19
  "type": "stdio"