@extension.dev/mcp 6.2.0 → 6.4.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.
Files changed (32) hide show
  1. package/.claude-plugin/marketplace.json +1 -1
  2. package/.claude-plugin/plugin.json +1 -1
  3. package/CHANGELOG.md +103 -0
  4. package/README.md +12 -2
  5. package/bin/extension-mcp.js +1 -0
  6. package/dist/module.js +5094 -3216
  7. package/dist/src/lib/carrier.d.ts +0 -57
  8. package/dist/src/lib/credentials.d.ts +0 -9
  9. package/dist/src/lib/device-flow.d.ts +0 -6
  10. package/dist/src/lib/github-device.d.ts +0 -9
  11. package/dist/src/lib/guest-load-oracle.d.ts +0 -10
  12. package/dist/src/lib/login-flow.d.ts +0 -36
  13. package/dist/src/lib/preview-upload.d.ts +33 -0
  14. package/dist/src/lib/project-ignore.d.ts +10 -0
  15. package/dist/src/lib/publish.d.ts +0 -10
  16. package/dist/src/lib/registry-access.d.ts +29 -0
  17. package/dist/src/lib/registry.d.ts +7 -45
  18. package/dist/src/lib/share-record.d.ts +26 -0
  19. package/dist/src/lib/vendor/chrome-theme/chrome-theme-color-math.d.ts +84 -0
  20. package/dist/src/lib/vendor/chrome-theme/chrome-theme-reference.d.ts +270 -0
  21. package/dist/src/lib/vendor/chrome-theme/chrome-theme-resolve.d.ts +52 -0
  22. package/dist/src/tools/open.d.ts +1 -0
  23. package/dist/src/tools/preview-web.d.ts +76 -0
  24. package/dist/src/tools/release-list.d.ts +5 -0
  25. package/dist/src/tools/stop.d.ts +0 -1
  26. package/dist/src/tools/store-status.d.ts +5 -9
  27. package/dist/src/tools/theme-verify.d.ts +22 -0
  28. package/extensions/live-preview/chromium/action/index.js +9 -1
  29. package/extensions/live-preview/chromium/background/service_worker.js +10 -2
  30. package/extensions/live-preview/chromium/manifest.json +1 -0
  31. package/package.json +3 -3
  32. package/server.json +3 -3
@@ -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": "6.2.0",
13
+ "version": "6.4.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": "6.2.0",
4
+ "version": "6.4.0",
5
5
  "author": {
6
6
  "name": "Cezar Augusto",
7
7
  "email": "hello@extension.dev",
package/CHANGELOG.md CHANGED
@@ -1,5 +1,108 @@
1
1
  # Changelog
2
2
 
3
+ ## 6.4.0
4
+
5
+ A build on your machine can now become a link someone else can open, and the
6
+ bundled Live Preview carrier finally allows the origin that opens it.
7
+
8
+ ### Added
9
+
10
+ - **`extension_preview_web` renders an in-progress build in the web emulator.**
11
+ It builds the project, points `preview.extension.dev` at `dist/<browser>` over
12
+ the dev-only `preview://build` scheme, and returns a deep link plus a
13
+ loadability check against the preview dev server. `surface:"inspect"` renders
14
+ in `inspect.extension.dev` instead, for fixture and forensic work. This tool
15
+ reaches npm for the first time in this release.
16
+ - **`share:true` uploads the build you just made.** It POSTs the resolved
17
+ `dist/<browser>` to the platform's artifact store and returns a public
18
+ `preview.extension.dev` link that renders those exact bytes, for a recipient
19
+ with no install, no sign-in, and no dev server. That link also serves the
20
+ whole build as a downloadable zip (`share.zipUrl`), so sharing it hands over
21
+ the built code. `share.serves` reports `uploaded-local-build`. Sharing needs a
22
+ token scoped to an existing extension.dev workspace and project
23
+ (`extension_login` or `EXTENSION_DEV_TOKEN`, valid up to 7 days), degrades to
24
+ a login hint when there is no token, and never fails the local preview.
25
+ `share` also returns `expiresAt` and `revokeUrl`: shared builds expire, and
26
+ `DELETE`ing `revokeUrl` with the same token kills the link for good, which is
27
+ the part a TTL alone cannot do when a link reaches the wrong person.
28
+ - **A shared link's revoke handle survives losing the tool output.** Revocation
29
+ is permanent and re-sharing mints a new artifact id, so `share.revokeUrl` is
30
+ the only handle that can ever pull a given link, and losing it used to mean
31
+ waiting out the 30-day TTL. Every successful share is now appended to
32
+ `.extension.dev/shared-previews.json` in the project, next to the carrier's
33
+ own project-local state and gitignored the same way: one entry per share with
34
+ `previewUrl`, `artifactId`, `revokeUrl`, `expiresAt`, `zipUrl` and the time it
35
+ was shared. The list is only ever appended to, an unreadable file is kept
36
+ aside instead of overwritten, a write that fails never fails the share, and
37
+ the returned `share.record` and note say where the handle went. If the entry
38
+ cannot be added to `.gitignore`, the response says so.
39
+ - **`extension_theme_verify` settles a Chrome theme manifest before it ships.**
40
+ It derives every color current Chrome would paint from the manifest with a
41
+ transcribed Chromium resolver and reports the divergence class of any problem:
42
+ D1 fabrication, D3 parity gap, D4 acceptance gap (keys Chrome silently
43
+ discards, such as dead legacy keys, incognito keys, unknown keys and
44
+ out-of-range values). The legs that need a real browser come back as
45
+ `needsAttended` with a pointer to the attended harnesses, never as passed.
46
+
47
+ ### Fixed
48
+
49
+ - **The bundled Live Preview carrier reaches `preview.extension.dev`.** This
50
+ package ships the carrier prebuilt and `extension_dev` materializes it into
51
+ the project's `./extensions`, so the carrier only changes when the package
52
+ does. Its `externally_connectable` allowlist had no web preview origin, so a
53
+ page on `preview.extension.dev` could not talk to the carrier at all. 6.3.0
54
+ shipped without the fix.
55
+ - The carrier popup requested `icons/icon.png` while the carrier build ships
56
+ `images/icon.png`, so the popup icon was broken.
57
+
58
+ ### Changed
59
+
60
+ - `extension_preview_web` takes no `channel` argument. It renders the build on
61
+ disk, not a promoted CI build. `extension_publish` and
62
+ `extension_release_promote` are unchanged and remain the path for released,
63
+ channel-scoped builds.
64
+ - The server advertises 35 tools, up from 33.
65
+
66
+ ## 6.3.0
67
+
68
+ Private projects stop reading as empty, and the links this server hands back
69
+ stop being login-only.
70
+
71
+ ### Fixed
72
+
73
+ - **Registry reads work for PRIVATE projects.** `extension_release_list`,
74
+ `extension_store_status`, `extension_deploy` and `extension_publish` read the
75
+ project's state from `registry.extension.land`, which answers 401 for a
76
+ private project. That 401 was reported as "no registry data", so a project the
77
+ operator owns and is logged into looked like it had no builds at all. A 401 or
78
+ 403 now mints a short-lived read token and retries once. Public projects are
79
+ untouched: still one request, still no call to the platform.
80
+ - The stored login token is never used as the `?t=` URL parameter even though it
81
+ would verify. It is long-lived, and a credential in a query string is kept by
82
+ every proxy and access log on the path, so it is traded for a ten-minute token
83
+ first. Requires the bearer path on `POST /api/access-grant`.
84
+
85
+ ### Added
86
+
87
+ - **Public build links.** `extension_release_list` returns a `publicUrl` for
88
+ every channel and build plus a `publicProjectUrl`, and
89
+ `extension_release_promote` returns `publicChannelUrl` and `publicBuildUrl`.
90
+ Every link these tools returned before pointed at the console, which requires
91
+ a login and workspace membership, so it was a dead end for the teammate or
92
+ reviewer the operator wanted to send it to. The public pages carry the
93
+ per-browser downloads, the run-locally and integrity dialogs, and what's new.
94
+ For a private project the response says plainly that an outside recipient
95
+ still needs a share link from `extension_publish`.
96
+ - `api` is accepted by `extension_release_list` and `extension_store_status`,
97
+ matching the other hosted-facing tools. It picks the platform the read token
98
+ is minted against and the origin the returned links point at.
99
+
100
+ ### Changed
101
+
102
+ - Depends on `@extension.dev/urls` `^0.3.0` for the new `userland` origin and
103
+ its whole-URL builders, so a build link this server returns cannot drift from
104
+ the routes the viewer serves.
105
+
3
106
  ## 6.2.0
4
107
 
5
108
  The URL layer stops being a copy. This server used to carry byte-identical
package/README.md CHANGED
@@ -5,9 +5,11 @@
5
5
  [discord-image]: https://img.shields.io/discord/1253608412890271755?label=Discord&logo=discord&style=flat&color=26FFB8
6
6
  [discord-url]: https://discord.gg/v9h2RgeTSN
7
7
 
8
+ <img alt="@extension.dev/mcp" src="https://media.extension.land/brand/repos/mcp/github-banner.png" />
9
+
8
10
  # @extension.dev/mcp [![Version][npm-version-image]][npm-version-url] [![Downloads][npm-downloads-image]][npm-downloads-url] [![Discord][discord-image]][discord-url]
9
11
 
10
- > Give your AI agent hands for browser extension development. 33 MCP tools that scaffold, run, inspect, debug, and publish cross-browser extensions.
12
+ > Give your AI agent hands for browser extension development. 35 MCP tools that scaffold, run, inspect, debug, and publish cross-browser extensions.
11
13
 
12
14
  <img alt="Logo" align="right" src="https://media.extension.land/brand/extension-dev/logo-dock.png" width="20.7%" />
13
15
 
@@ -118,6 +120,7 @@ cp node_modules/@extension.dev/mcp/claude/commands/*.md ~/my-extension/.claude/c
118
120
  | see | `extension_list_extensions` | List loaded extensions (Chromium) |
119
121
  | see | `extension_logs` | Stream logs from every context |
120
122
  | see | `extension_doctor` | Diagnose the dev session leg by leg (ready contract, ports, token, executor, browser) |
123
+ | see | `extension_theme_verify` | Verify a Chrome theme manifest against the colors Chrome actually paints |
121
124
  | act | `extension_eval` | Evaluate in a context (needs `allowEval: true` on `extension_dev`) |
122
125
  | act | `extension_storage` | Read/write `chrome.storage` |
123
126
  | act | `extension_reload` | Reload extension or tab |
@@ -129,15 +132,22 @@ cp node_modules/@extension.dev/mcp/claude/commands/*.md ~/my-extension/.claude/c
129
132
  | platform | `extension_login` | GitHub device-code login, stored token |
130
133
  | platform | `extension_whoami` | Show the stored login (never the token) |
131
134
  | platform | `extension_logout` | Remove stored credentials |
135
+ | platform | `extension_preview_web` | Render a build in the web emulator, and share it as a link |
132
136
  | platform | `extension_publish` | Publish a shareable preview to extension.dev |
133
137
  | platform | `extension_release_promote` | Promote a build to a release channel, headless |
134
138
  | platform | `extension_deploy` | Submit to the Chrome, Firefox, and Edge stores through extension.dev |
135
139
 
136
140
  Browser-launching tools (`dev`, `start`, `preview`) shell out to the `extension` CLI, the project's own `node_modules/.bin/extension` when present, otherwise `npx extension@<pinned>` at the version this package is verified against; everything else runs in-process.
137
141
 
142
+ ## Sharing a build in progress
143
+
144
+ An unpacked extension is unusually hard to hand to someone: the only way to look at a colleague's work-in-progress has been to take their zip and run untrusted code with real browser permissions on your own machine. `extension_preview_web` with `share: true` uploads the `dist/` it just built and returns a link that renders those exact bytes in the emulator. Whoever opens it installs nothing and signs in to nothing, which is what lets a designer, a PM, or a reviewer into the loop at all. Sharing needs auth (`extension_login` or `EXTENSION_DEV_TOKEN`), the link expires, and `DELETE`ing the returned `revokeUrl` with the same token kills it early. Revocation is permanent and re-sharing mints a new link, so that `revokeUrl` is the only handle to the link you just made; every share is also appended to `.extension.dev/shared-previews.json` in the project (gitignored) so it survives losing the tool output. Without `share`, the tool returns a local-only deep link and uploads nothing.
145
+
146
+ That is a different job from shipping. Use `share` for the build you are holding right now; use `extension_publish` and `extension_release_promote` below for builds your CI has released.
147
+
138
148
  ## From preview to store
139
149
 
140
- The platform tools connect agents to [extension.dev](https://extension.dev): `extension_login` runs a GitHub device-code flow and stores a project-scoped token locally (never returned to the agent), `extension_publish` turns a build into a shareable preview URL, and `extension_release_promote` promotes a tested build to a release channel from CI or an agent session, no browser required. `extension_deploy` submits a built extension to the Chrome Web Store, Edge Add-ons, and Firefox AMO through extension.dev, which holds your store credentials and dispatches the release from your project's mirror CI, it defaults to a dry run and store credentials are never tool arguments. After a real submission, `extension_store_status` reads the recorded outcome, per-store credential health, and review state from the project's public registry, so agents and CI can answer "was it approved?" without a console visit. Access tokens live at most 7 days; CI pipelines re-mint them from the console's Access tokens page.
150
+ The platform tools connect agents to [extension.dev](https://extension.dev): `extension_login` runs a GitHub device-code flow and stores a project-scoped token locally (never returned to the agent), `extension_publish` turns a build your project has already published into a shareable URL, and `extension_release_promote` promotes a tested build to a release channel from CI or an agent session, no browser required. `extension_deploy` submits a built extension to the Chrome Web Store, Edge Add-ons, and Firefox AMO through extension.dev, which holds your store credentials and dispatches the release from your project's mirror CI, it defaults to a dry run and store credentials are never tool arguments. After a real submission, `extension_store_status` reads the recorded outcome, per-store credential health, and review state from the project's public registry, so agents and CI can answer "was it approved?" without a console visit. Access tokens live at most 7 days; CI pipelines re-mint them from the console's Access tokens page.
141
151
 
142
152
  ## The extension.dev stack
143
153
 
@@ -6,6 +6,7 @@
6
6
  // ██║ ╚═╝ ██║╚██████╗██║
7
7
  // ╚═╝ ╚═╝ ╚═════╝╚═╝
8
8
  // Apache License 2.0 (c) 2026 Cezar Augusto and the extension.dev collaborators
9
+
9
10
  import {startServer, runCli} from '../dist/module.js'
10
11
 
11
12
  const [, , cmd, ...rest] = process.argv