@extension.dev/mcp 7.0.0 → 10.0.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 (65) hide show
  1. package/.claude-plugin/marketplace.json +1 -1
  2. package/.claude-plugin/plugin.json +1 -1
  3. package/CHANGELOG.md +271 -0
  4. package/README.md +13 -21
  5. package/claude/ARCHITECTURE.md +4 -4
  6. package/claude/CLAUDE.md +2 -2
  7. package/claude/README.md +1 -1
  8. package/claude/commands/extension-add.md +1 -1
  9. package/claude/commands/extension-debug.md +1 -1
  10. package/claude/commands/extension-publish.md +1 -1
  11. package/claude/commands/extension.md +3 -3
  12. package/claude/rules/mcp-tools.md +67 -59
  13. package/dist/module.js +2946 -2043
  14. package/dist/src/lib/act.d.ts +4 -1
  15. package/dist/src/lib/boot-verdict.d.ts +53 -0
  16. package/dist/src/lib/bridge-tabs.d.ts +2 -2
  17. package/dist/src/lib/common-schema.d.ts +28 -0
  18. package/dist/src/lib/envelope.d.ts +35 -0
  19. package/dist/src/lib/launch-flags.d.ts +6 -6
  20. package/dist/src/lib/legacy-stdout.d.ts +7 -0
  21. package/dist/src/lib/session-identity.d.ts +16 -0
  22. package/dist/src/tools/add-feature.d.ts +2 -2
  23. package/dist/src/tools/analyze.d.ts +29 -0
  24. package/dist/src/tools/auth.d.ts +33 -0
  25. package/dist/src/tools/browsers.d.ts +39 -0
  26. package/dist/src/tools/build.d.ts +5 -6
  27. package/dist/src/tools/detect-browsers.d.ts +1 -20
  28. package/dist/src/tools/dev.d.ts +11 -11
  29. package/dist/src/tools/{dom-inspect.d.ts → dom-snapshot.d.ts} +6 -6
  30. package/dist/src/tools/eval.d.ts +6 -6
  31. package/dist/src/tools/get-template-source.d.ts +1 -22
  32. package/dist/src/tools/inspect.d.ts +33 -5
  33. package/dist/src/tools/install-browser.d.ts +1 -18
  34. package/dist/src/tools/list-browsers.d.ts +1 -9
  35. package/dist/src/tools/list-extensions.d.ts +4 -4
  36. package/dist/src/tools/list-templates.d.ts +1 -35
  37. package/dist/src/tools/login.d.ts +1 -23
  38. package/dist/src/tools/logout.d.ts +1 -9
  39. package/dist/src/tools/logs-schema.d.ts +2 -2
  40. package/dist/src/tools/open.d.ts +6 -6
  41. package/dist/src/tools/preview-web.d.ts +4 -4
  42. package/dist/src/tools/publish.d.ts +2 -2
  43. package/dist/src/tools/release-list.d.ts +1 -23
  44. package/dist/src/tools/release-promote.d.ts +2 -2
  45. package/dist/src/tools/release-status.d.ts +37 -0
  46. package/dist/src/tools/reload.d.ts +6 -6
  47. package/dist/src/tools/shares.d.ts +2 -2
  48. package/dist/src/tools/start.d.ts +16 -10
  49. package/dist/src/tools/stop.d.ts +2 -2
  50. package/dist/src/tools/storage.d.ts +6 -6
  51. package/dist/src/tools/store-status.d.ts +1 -23
  52. package/dist/src/tools/{deploy.d.ts → submit.d.ts} +4 -4
  53. package/dist/src/tools/{source-inspect.d.ts → templates.d.ts} +27 -23
  54. package/dist/src/tools/uninstall-browser.d.ts +1 -21
  55. package/dist/src/tools/wait.d.ts +4 -4
  56. package/dist/src/tools/whoami.d.ts +1 -9
  57. package/extensions/live-preview/chromium/action/index.js +1 -9
  58. package/extensions/live-preview/chromium/background/service_worker.js +3 -11
  59. package/extensions/live-preview/chromium/manifest.json +1 -1
  60. package/package.json +5 -5
  61. package/server.json +3 -3
  62. package/dist/src/__tests__/fixtures/ready-contract.d.ts +0 -7
  63. package/dist/src/__tests__/setup-session-dir.d.ts +0 -1
  64. package/dist/src/tools/preview.d.ts +0 -66
  65. /package/dist/src/tools/{source-inspect-gecko.d.ts → inspect-gecko.d.ts} +0 -0
@@ -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": "7.0.0",
13
+ "version": "10.0.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": "7.0.0",
4
+ "version": "10.0.0",
5
5
  "author": {
6
6
  "name": "Cezar Augusto",
7
7
  "email": "hello@extension.dev",
package/CHANGELOG.md CHANGED
@@ -1,5 +1,276 @@
1
1
  # Changelog
2
2
 
3
+ ## 10.0.0
4
+
5
+ Every tool now returns the same frame. Before this, 28 tools hand-built 142
6
+ different JSON shapes: `ok` appeared on 71 of them, `error` on 67, `hint` on 60,
7
+ `message` on 49, `status` on 46, and five more keys carried the same meaning
8
+ under different names. An agent could not tell success from failure without
9
+ knowing which tool it had called.
10
+
11
+ The frame is schema 1, the same one the Extension.js CLI emits under
12
+ `--output json`:
13
+
14
+ ```json
15
+ {
16
+ "schema": 1,
17
+ "ok": false,
18
+ "command": "extension_dev",
19
+ "status": "compile-failed",
20
+ "value": null,
21
+ "error": { "code": "E_FIRST_COMPILE", "message": "…" },
22
+ "hint": "…",
23
+ "warnings": []
24
+ }
25
+ ```
26
+
27
+ `command` names the tool. `status` is a kebab-case word from that tool's own
28
+ vocabulary. `error.code` is stable and worth branching on; `error.message` is
29
+ free copy and is not. The payload moved under `value`, and every advisory note
30
+ that used to have its own key is now an entry in `warnings`.
31
+
32
+ **Breaking.** Every payload key moved one level down. `build.success` is now
33
+ `ok`, `doctor.healthy` is now `ok`, `manifest_validate.valid` is now
34
+ `value.valid`, and `wait` gained the `ok` it never had. The ready contract's own
35
+ `command` is carried as `value.sessionCommand`, because the envelope claims that
36
+ key. `authorization_pending` became `authorization-pending`, with the old
37
+ spelling echoed as `value.legacyStatus` for one minor.
38
+
39
+ `extension_dev` and `extension_start` also stopped reading the dev server's
40
+ prose to decide whether the first compile failed. They poll its `ready.json`
41
+ contract instead, which splits a locked profile out of a dead browser and
42
+ returns the compile errors as a list. The output scrape survives only as a
43
+ fallback for a project whose own CLI predates the contract, is confined to one
44
+ `@deprecated` module, and says so in `warnings` whenever it is used. The choice
45
+ is a capability probe, never a version check: a project-local `extension` binary
46
+ wins over this package's pin, so the version is not knowable in advance. The
47
+ contract's own error stamps are read whatever the engine's age, so a locked
48
+ profile is named as one the moment the engine records it.
49
+
50
+ ## 9.0.0
51
+
52
+ Every client pays for this server's tool list at the start of every session,
53
+ whether or not the user ever touches an extension. That list was 36 tools and
54
+ 52,403 bytes on the wire (roughly 13,100 tokens). It is now 28 tools and
55
+ 43,214 bytes (roughly 10,800 tokens), a 17.5% cut, with no capability removed.
56
+ Eleven tools folded into the four that already owned their resource,
57
+ `extension_preview` folded into `extension_start`, and the prose was tightened
58
+ everywhere it repeated the schema or a parameter name.
59
+
60
+ 9.0.0 lands close behind 8.0.0 on purpose. 8.0.0 renamed four tools for
61
+ disambiguation; this release cuts what the surface costs. Both are breaking,
62
+ adoption is still low, and doing them as one migration is cheaper for early
63
+ users than spacing them out.
64
+
65
+ ### Migration
66
+
67
+ | Old tool | New call |
68
+ | --- | --- |
69
+ | `extension_detect_browsers({ browsers })` | `extension_browsers({ action: "detect", browsers })` |
70
+ | `extension_list_browsers()` | `extension_browsers({ action: "list" })` |
71
+ | `extension_install_browser({ browser })` | `extension_browsers({ action: "install", browser })` |
72
+ | `extension_uninstall_browser({ browser, all })` | `extension_browsers({ action: "uninstall", browser, all })` |
73
+ | `extension_login({ project, deviceCode, api })` | `extension_auth({ action: "login", project, deviceCode, api })` |
74
+ | `extension_whoami()` | `extension_auth({ action: "status" })` |
75
+ | `extension_logout()` | `extension_auth({ action: "logout" })` |
76
+ | `extension_list_templates({ surface, framework, tags, featured, query })` | `extension_templates({ action: "list", surface, framework, tags, featured, query })` |
77
+ | `extension_get_template_source({ slug, files })` | `extension_templates({ action: "source", slug, files })` |
78
+ | `extension_release_list({ workspace, project, api })` | `extension_release_status({ include: ["releases"], workspace, project, api })` |
79
+ | `extension_store_status({ workspace, project, api })` | `extension_release_status({ include: ["stores"], workspace, project, api })` |
80
+ | `extension_preview({ projectPath, browser, port, noBrowser, ...launch })` | `extension_start({ projectPath, build: false, browser, port, noBrowser, ...launch })` |
81
+
82
+ Every argument keeps its name and its meaning. `action` defaults to the most
83
+ common case (`detect`, `status`, `list`), so `extension_browsers({})` scans,
84
+ `extension_auth({})` reports the login, and `extension_templates({})` lists.
85
+ `extension_release_status` returns both sections by default and nests each
86
+ under `releases` and `stores`; the old flat bodies are unchanged inside them.
87
+ The CLI is untouched: `extension-mcp login|logout|whoami|release` still work
88
+ exactly as before.
89
+
90
+ `extension_submit`, `extension_publish`, `extension_analyze`,
91
+ `extension_inspect` and `extension_dom_snapshot` were deliberately NOT merged.
92
+ 8.0.0 separated them because agents confused them; folding them behind an
93
+ `action` parameter would hide that ambiguity rather than remove it.
94
+
95
+ ### Upgrading from 7.0.0
96
+
97
+ Most installs are still on 7.0.0 and two majors have landed on top of it. Do
98
+ both in one pass: apply the 8.0.0 renames, then the 9.0.0 merges above. 7.0.0
99
+ advertised 36 tools; 9.0.0 advertises 28, and every capability survived.
100
+
101
+ | 7.0.0 call | 9.0.0 call | Landed in |
102
+ | --- | --- | --- |
103
+ | `extension_deploy(...)` | `extension_submit(...)` | 8.0.0 |
104
+ | `extension_inspect({ projectPath })` | `extension_analyze({ projectPath })` | 8.0.0 |
105
+ | `extension_source_inspect(...)` | `extension_inspect(...)` | 8.0.0 |
106
+ | `extension_dom_inspect(...)` | `extension_dom_snapshot(...)` | 8.0.0 |
107
+ | `extension_detect_browsers({ browsers })` | `extension_browsers({ action: "detect", browsers })` | 9.0.0 |
108
+ | `extension_list_browsers()` | `extension_browsers({ action: "list" })` | 9.0.0 |
109
+ | `extension_install_browser({ browser })` | `extension_browsers({ action: "install", browser })` | 9.0.0 |
110
+ | `extension_uninstall_browser({ browser, all })` | `extension_browsers({ action: "uninstall", browser, all })` | 9.0.0 |
111
+ | `extension_login({ project, deviceCode, api })` | `extension_auth({ action: "login", project, deviceCode, api })` | 9.0.0 |
112
+ | `extension_whoami()` | `extension_auth({ action: "status" })` | 9.0.0 |
113
+ | `extension_logout()` | `extension_auth({ action: "logout" })` | 9.0.0 |
114
+ | `extension_list_templates({ surface, framework, tags, featured, query })` | `extension_templates({ action: "list", surface, framework, tags, featured, query })` | 9.0.0 |
115
+ | `extension_get_template_source({ slug, files })` | `extension_templates({ action: "source", slug, files })` | 9.0.0 |
116
+ | `extension_release_list({ workspace, project, api })` | `extension_release_status({ include: ["releases"], workspace, project, api })` | 9.0.0 |
117
+ | `extension_store_status({ workspace, project, api })` | `extension_release_status({ include: ["stores"], workspace, project, api })` | 9.0.0 |
118
+ | `extension_preview({ projectPath, browser, port, noBrowser, ...launch })` | `extension_start({ projectPath, build: false, browser, port, noBrowser, ...launch })` | 9.0.0 |
119
+
120
+ Read the `extension_inspect` row before any of the others. That name exists in
121
+ both versions and does not mean the same thing in each. In 7.0.0 it read a
122
+ BUILT extension's files off disk. In 9.0.0 it reads a RUNNING extension over
123
+ the browser's debugger protocol and needs a live `extension_dev` or
124
+ `extension_start` session. A 7.0.0 call left alone does not fail with an
125
+ unknown-tool error, it silently reaches the wrong tool and reports no dev
126
+ session instead of the file sizes you asked for. The disk reader is
127
+ `extension_analyze` now. Every call that passed a bare `projectPath` and
128
+ expected sizes, permissions and store-readiness back has to move.
129
+
130
+ `extension_deploy` carried its error names with it into `extension_submit`:
131
+ `DeployAuthError`, `DeployInputError`, `DeployConfigError`,
132
+ `DeployNetworkError` and `DeployError` are now `SubmitAuthError`,
133
+ `SubmitInputError`, `SubmitConfigError`, `SubmitNetworkError` and
134
+ `SubmitError`. Anything branching on those strings has to move with them.
135
+
136
+ Every argument keeps its name and its meaning across both majors, with two
137
+ exceptions:
138
+
139
+ - `extension_release_status` nests what the two 7.0.0 tools returned flat,
140
+ under `releases` and `stores`. The bodies inside are byte-for-byte the old
141
+ ones. Omitting `include` returns both sections.
142
+ - `extension_start` gained `build`, defaulting to `true`. `build: false` is
143
+ what `extension_preview` was.
144
+
145
+ Nothing else moved. `extension_publish`, `extension_preview_web`,
146
+ `extension_shares`, `extension_release_promote`, `extension_dev`,
147
+ `extension_build`, `extension_create`, `extension_add_feature`,
148
+ `extension_wait`, `extension_stop`, `extension_logs`, `extension_eval`,
149
+ `extension_storage`, `extension_reload`, `extension_open`,
150
+ `extension_list_extensions`, `extension_manifest_validate`,
151
+ `extension_theme_verify` and `extension_doctor` are unchanged in name and in
152
+ arguments, and the CLI (`extension-mcp login|logout|whoami|release`) never
153
+ moved at all.
154
+
155
+ ### Merged
156
+
157
+ - **Four browser tools are one.** `extension_browsers` detects, lists,
158
+ installs, and uninstalls. `detect` and `list` were the confusable pair: both
159
+ answered "what browsers do I have", and telling them apart took a sentence of
160
+ prose in each description. An action enum settles it in the schema.
161
+ - **Three auth tools are one.** `extension_auth` signs in, reports the stored
162
+ login, and clears it. They were a lifecycle triad that each re-explained the
163
+ same token model.
164
+ - **Two template tools are one.** `extension_templates` searches the catalog
165
+ and reads a template's source. The slug you read comes from the list you just
166
+ searched, so the pair is one resource.
167
+ - **The two read-only release tools are one.** `extension_release_status`
168
+ returns release channels and recent builds, browser-store submissions and
169
+ review state, or both. They took identical arguments and read the same
170
+ registry. `extension_release_promote` stays separate on purpose: it is the
171
+ only verb that writes, and putting a write behind the same `action`
172
+ parameter as a read is how an agent promotes a build it meant to list.
173
+ - **`extension_preview` folded into `extension_start`.** Both answered "run the
174
+ production build in a browser"; the only difference was whether a build ran
175
+ first. That is now `build`, defaulting to `true`, which matches
176
+ `extension_preview_web`, where `build: false` already means the same thing.
177
+
178
+ ### Sharpened
179
+
180
+ - **`extension_dev` and `extension_start` now say which one to pick.**
181
+ They are not merged: `dev` is the only tool that can unlock the control
182
+ channel (`allowControl`, `allowEval`) that `extension_storage`,
183
+ `extension_reload`, `extension_open`, `extension_dom_snapshot` and
184
+ `extension_eval` need, and `start` runs a production build with none of it.
185
+ A `mode` parameter would have made those flags look valid on a session that
186
+ cannot honor them. Instead each description now opens with the thing that
187
+ decides between them and names the other tool.
188
+ - **Descriptions no longer repeat the schema.** The biggest cuts, in bytes of
189
+ description: `extension_shares` 1,661 to 1,250, `extension_preview_web`
190
+ 1,151 to 639, `extension_submit` 1,478 to 1,194, `extension_eval` 1,128 to
191
+ 831, `extension_wait` 985 to 784, `extension_list_extensions` 944 to 696,
192
+ `extension_dom_snapshot` 965 to 854. What was cut was prose that restated a
193
+ parameter name, repeated a property's own description, or explained the
194
+ response shape the response already carries. What was kept is anything that
195
+ stops a tool being misused: the `activeTab` gesture warning on
196
+ `extension_open`, the MV3 service-worker CSP note on `extension_eval`, the
197
+ profile-lock explanation on `extension_dev`, and the irreversibility of
198
+ `extension_submit` and of revoking a share.
199
+ - **Repeated property schemas are shared.** `projectPath`, the session
200
+ `browser`, the call `timeout`, the platform `api` base and the launch browser
201
+ enum are defined once in `src/lib/common-schema.ts` instead of being
202
+ re-typed per tool.
203
+
204
+ ### Considered and rejected
205
+
206
+ - **A smaller default surface with the rest opt-in.** The platform cluster
207
+ (`extension_auth`, `extension_publish`, `extension_submit`,
208
+ `extension_release_status`, `extension_release_promote`, `extension_shares`,
209
+ `extension_preview_web`) is 13 KB, about 30% of what is left, and is dead
210
+ weight for anyone building an extension locally without an extension.dev
211
+ account. Hiding it behind an env flag would cut the default surface by
212
+ roughly a third. It was not shipped because a hidden tool is an invisible
213
+ capability: an agent asked to publish would report that it cannot, which is
214
+ worse than the tokens. The version worth building expands the surface once a
215
+ login exists and announces it with `notifications/tools/list_changed`, and
216
+ that needs a client-by-client compatibility check first.
217
+
218
+ ### Added
219
+
220
+ - `pnpm exec node scripts/tool-surface-size.mjs` starts the server, calls
221
+ `tools/list`, and reports exactly what a client receives: bytes per tool
222
+ split into description and schema, and the total. `--json` for the raw rows.
223
+ Before this, the cost of the tool surface was never measured, only guessed.
224
+
225
+ ## 8.0.0
226
+
227
+ Four tools are renamed. Every rename fixes a name that made agents pick the
228
+ wrong tool, and one of them could cost you a store submission you did not ask
229
+ for. No behavior changes, no argument changes.
230
+
231
+ ### Migration
232
+
233
+ | Old name | New name |
234
+ | --- | --- |
235
+ | `extension_deploy` | `extension_submit` |
236
+ | `extension_inspect` | `extension_analyze` |
237
+ | `extension_source_inspect` | `extension_inspect` |
238
+ | `extension_dom_inspect` | `extension_dom_snapshot` |
239
+
240
+ `extension_publish` is unchanged.
241
+
242
+ ### Renamed
243
+
244
+ - **`extension_deploy` is now `extension_submit`.** The pair was inverted
245
+ against every other developer tool: `extension_publish` pushes a build to the
246
+ extension.dev platform, while `extension_deploy` submitted to the Chrome Web
247
+ Store, Firefox AMO, Edge Add-ons and the App Store. An agent told to "deploy
248
+ my extension" reached for the store tool, and picking wrong there means an
249
+ unintended store submission, which is irreversible. "Submit" is the stores'
250
+ own word for it ("submit for review"), so the name now says what happens.
251
+ `extension_publish` keeps its name and its job. The error names in the
252
+ response follow: `DeployAuthError`, `DeployInputError`, `DeployConfigError`,
253
+ `DeployNetworkError` and `DeployError` are now `SubmitAuthError`,
254
+ `SubmitInputError`, `SubmitConfigError`, `SubmitNetworkError` and
255
+ `SubmitError`.
256
+ - **Three tools were called inspect; now one is.** `extension_inspect` read a
257
+ built extension's files off disk, `extension_source_inspect` read a running
258
+ extension's live state, and `extension_dom_inspect` snapshotted one surface's
259
+ DOM. The name that reads as the primary one belonged to the static file
260
+ reader, which is the least of the three. Static analysis is now
261
+ `extension_analyze`, and the live-state tool takes `extension_inspect`.
262
+ - **`extension_dom_inspect` is now `extension_dom_snapshot`.** It is not a
263
+ duplicate of the live-state tool and it survives the rename with its
264
+ capabilities intact, but sharing the word "inspect" was most of why the two
265
+ were confusable. The descriptions now state the split outright:
266
+ `extension_dom_snapshot` is the surface picker (it is the only tool that
267
+ reads an OPEN extension surface by name, the only one that takes a numeric
268
+ `chrome.tabs` id, and the only one that enumerates what is open) and it
269
+ returns a shallow snapshot over the CDP-free agent bridge, which needs
270
+ `allowControl: true`. `extension_inspect` is the deep reader (it is the only
271
+ tool that pierces CLOSED shadow roots, runs CSS selector probes, and
272
+ navigates a tab before reading it) and it rides the debugger protocol.
273
+
3
274
  ## 7.0.0
4
275
 
5
276
  `preview.extension.dev` is the only web door this package knows about. The
package/README.md CHANGED
@@ -7,7 +7,7 @@
7
7
 
8
8
  # @extension.dev/mcp [![Version][npm-version-image]][npm-version-url] [![Downloads][npm-downloads-image]][npm-downloads-url] [![Discord][discord-image]][discord-url]
9
9
 
10
- > Give your AI agent hands for browser extension development. 36 MCP tools that scaffold, run, inspect, debug, and publish cross-browser extensions.
10
+ > Give your AI agent hands for browser extension development. 28 MCP tools that scaffold, run, inspect, debug, and publish cross-browser extensions.
11
11
 
12
12
  <img alt="Logo" align="right" src="https://media.extension.land/brand/extension-dev/logo-dock.png" width="20.7%" />
13
13
 
@@ -102,19 +102,17 @@ cp node_modules/@extension.dev/mcp/claude/commands/*.md ~/my-extension/.claude/c
102
102
  | Tier | Tool | Description |
103
103
  | ---- | ---- | ----------- |
104
104
  | build | `extension_create` | Scaffold from a template |
105
- | build | `extension_list_templates` | Browse 60+ templates |
106
- | build | `extension_get_template_source` | Read template source files |
105
+ | build | `extension_templates` | Browse 60+ templates (`list`) and read one's source (`source`) |
107
106
  | build | `extension_add_feature` | Add sidebar/popup/content script |
108
107
  | build | `extension_build` | Build for production |
109
108
  | run | `extension_dev` | Dev server with HMR |
110
- | run | `extension_start` | Build + preview |
111
- | run | `extension_preview` | Preview the production build |
109
+ | run | `extension_start` | Build + launch the production build (`build: false` launches the existing dist) |
112
110
  | run | `extension_wait` | Poll the dev-server ready contract |
113
111
  | run | `extension_stop` | Stop a dev/start/preview session (server + browser) |
114
112
  | see | `extension_manifest_validate` | Cross-browser manifest validation |
115
- | see | `extension_inspect` | Build output analysis |
116
- | see | `extension_source_inspect` | Live DOM inspection (CDP) |
117
- | see | `extension_dom_inspect` | CDP-free DOM snapshot |
113
+ | see | `extension_analyze` | Static analysis of the built extension on disk |
114
+ | see | `extension_inspect` | Deep live inspection of a running extension (closed shadow roots, probes) |
115
+ | see | `extension_dom_snapshot` | Shallow DOM snapshot of a chosen tab or extension surface, CDP-free |
118
116
  | see | `extension_list_extensions` | List loaded extensions (Chromium) |
119
117
  | see | `extension_logs` | Stream logs from every context |
120
118
  | see | `extension_doctor` | Diagnose the dev session leg by leg (ready contract, ports, token, executor, browser) |
@@ -123,26 +121,20 @@ cp node_modules/@extension.dev/mcp/claude/commands/*.md ~/my-extension/.claude/c
123
121
  | act | `extension_storage` | Read/write `chrome.storage` |
124
122
  | act | `extension_reload` | Reload extension or tab |
125
123
  | act | `extension_open` | Open a surface / trigger `action`, `command` |
126
- | browsers | `extension_install_browser` | Install a managed browser binary |
127
- | browsers | `extension_uninstall_browser` | Remove a managed browser binary |
128
- | browsers | `extension_list_browsers` | List managed browsers |
129
- | browsers | `extension_detect_browsers` | Detect system browsers |
130
- | platform | `extension_login` | Device login at extension.dev, stored token |
131
- | platform | `extension_whoami` | Show the stored login (never the token) |
132
- | platform | `extension_logout` | Remove stored credentials |
124
+ | browsers | `extension_browsers` | Detect, list, install, and uninstall browsers |
125
+ | platform | `extension_auth` | Device login at extension.dev, plus login status and logout |
133
126
  | platform | `extension_preview_web` | Render a build in the web emulator, and share it as a link |
134
127
  | platform | `extension_shares` | List every link you have shared, and revoke one permanently |
135
128
  | platform | `extension_publish` | Publish a shareable preview to extension.dev |
136
129
  | platform | `extension_release_promote` | Promote a build to a release channel, headless |
137
- | platform | `extension_release_list` | List release channels and recent builds, to pick a valid build sha |
138
- | platform | `extension_deploy` | Submit to the Chrome, Firefox, and Edge stores through extension.dev |
139
- | platform | `extension_store_status` | Read a submission's outcome, credential health, and review state |
130
+ | platform | `extension_submit` | Submit for store review: Chrome, Firefox, Edge, Safari, through extension.dev |
131
+ | platform | `extension_release_status` | Read release channels, recent builds, and store submission and review state |
140
132
 
141
- 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.
133
+ Browser-launching tools (`dev`, `start`) 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.
142
134
 
143
135
  ## Sharing a build in progress
144
136
 
145
- 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.
137
+ 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_auth` 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.
146
138
 
147
139
  `extension_shares` is the other half of that: it lists every link the token has shared, live and dead, with the `previewUrl` and `revokeUrl` of each, and revokes one by `artifactId` or by pasting any of its URLs. Pass `projectPath` and it reconciles the platform's answer with the project's own record, so a link shared from another machine shows up as `remoteOnly` and a record with nothing behind it any more shows up under `localOnly`. It never rewrites the local file.
148
140
 
@@ -150,7 +142,7 @@ That is a different job from shipping. Use `share` for the build you are holding
150
142
 
151
143
  ## From preview to store
152
144
 
153
- The platform tools connect agents to [extension.dev](https://extension.dev): `extension_login` runs extension.dev's own device flow (you approve the code at [extension.dev/device](https://extension.dev/device), and GitHub is federated server-side, so no GitHub token ever reaches your machine) 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.
145
+ The platform tools connect agents to [extension.dev](https://extension.dev): `extension_auth` runs extension.dev's own device flow (you approve the code at [extension.dev/device](https://extension.dev/device), and GitHub is federated server-side, so no GitHub token ever reaches your machine) 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_submit` 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. The two verbs are not interchangeable: `extension_publish` pushes to the extension.dev platform, `extension_submit` sends the build into a store's review queue, which is irreversible. After a real submission, `extension_release_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.
154
146
 
155
147
  ## The extension.dev stack
156
148
 
@@ -88,7 +88,7 @@ Claude now knows:
88
88
  **Role in ecosystem:** Programmatic bridge between Claude and the extension.dev platform, sourced from the examples repo.
89
89
 
90
90
  ```
91
- Claude (via MCP) calls extension_list_templates({ surface: "sidebar", tags: ["ai"] })
91
+ Claude (via MCP) calls extension_templates({ surface: "sidebar", tags: ["ai"] })
92
92
  │
93
93
  ▼
94
94
  MCP server fetches templates-meta.json (cached, 1hr TTL)
@@ -97,7 +97,7 @@ MCP server fetches templates-meta.json (cached, 1hr TTL)
97
97
  Returns: [{ slug: "sidebar-claude", ... }, { slug: "sidebar-transformers-js", ... }]
98
98
  │
99
99
  ▼
100
- Claude calls extension_get_template_source({ slug: "sidebar-claude", files: ["src/manifest.json", "src/lib/claude.ts"] })
100
+ Claude calls extension_templates({ action: "source", slug: "sidebar-claude", files: ["src/manifest.json", "src/lib/claude.ts"] })
101
101
  │
102
102
  ▼
103
103
  MCP server fetches from https://raw.githubusercontent.com/extension-js/examples/main/examples/sidebar-claude/<file>
@@ -114,8 +114,8 @@ MCP server calls extensionCreate() → same go-git-it flow as CLI
114
114
 
115
115
  **How it integrates with the examples repo:**
116
116
 
117
- - `extension_list_templates` → reads `templates-meta.json` release asset
118
- - `extension_get_template_source` → reads raw files from the examples repo
117
+ - `extension_templates` (`list`) → reads `templates-meta.json` release asset
118
+ - `extension_templates` (`source`) → reads raw files from the examples repo
119
119
  - `extension_create` → clones from the examples repo (same as CLI)
120
120
  - `extension_add_feature` → sources codegen patterns from example templates
121
121
  - `extension_manifest_validate` → cross-references against known-good manifests in the catalog
package/claude/CLAUDE.md CHANGED
@@ -195,9 +195,9 @@ extension inspect --tab 1 --include summary,html --with-console 20
195
195
  | `--max-bytes <n>` | 262144 | Cap on returned HTML bytes |
196
196
  | `--with-console [n]` | 20 | Also include the last n console lines for the target |
197
197
 
198
- The `extension_dom_inspect` MCP tool wraps this verb one-to-one.
198
+ The `extension_dom_snapshot` MCP tool wraps this verb one-to-one.
199
199
 
200
- **Debugging protocol (Chromium CDP): `extension_source_inspect` MCP tool.** Connects directly to the running session's debug port. Use it when the bridge is not enough: closed shadow roots (`deepDom`), selector probes, DOM snapshots, console summaries, or navigating the tab to a URL before inspecting. Returns structured events:
200
+ **Debugging protocol (Chromium CDP): `extension_inspect` MCP tool.** Connects directly to the running session's debug port. Use it when the bridge is not enough: closed shadow roots (`deepDom`), selector probes, DOM snapshots, console summaries, or navigating the tab to a URL before inspecting. Returns structured events:
201
201
 
202
202
  - `page_html` - full injected HTML (after content scripts run)
203
203
  - `page_html_summary` - root/script/style/link counts
package/claude/README.md CHANGED
@@ -62,7 +62,7 @@ Claude Code will automatically pick up the instructions and know how to:
62
62
  The [examples repo](https://github.com/extension-js/examples) publishes `templates-meta.json` as a nightly release asset. This file is the single source of truth for:
63
63
 
64
64
  - **CLAUDE.md**, references it so Claude knows all available templates
65
- - **MCP tools**, `extension_list_templates` fetches and queries it at runtime
65
+ - **MCP tools**, `extension_templates` fetches and queries it at runtime
66
66
  - **`extension create`**, resolves template slugs to repo URLs via the same naming convention
67
67
 
68
68
  When a new template is added to the examples repo, all three layers pick it up automatically.
@@ -20,7 +20,7 @@ Add a new feature surface to the current extension project. The user said: $ARGU
20
20
  2. **Get the reference pattern**
21
21
  If MCP tool `extension_add_feature` is available, use it. It returns the exact manifest additions, files to create, and reference template.
22
22
 
23
- If MCP tool `extension_get_template_source` is available, read the reference template source to get real implementation patterns.
23
+ If MCP tool `extension_templates` (`action: "source"`) is available, read the reference template source to get real implementation patterns.
24
24
 
25
25
  3. **Update manifest.json**
26
26
  Add the required fields to `src/manifest.json`. Use the extension.dev cross-browser format:
@@ -13,7 +13,7 @@ Debug the currently running extension dev session. The user said: $ARGUMENTS
13
13
  - If no session: tell the user to start one with `/extension dev` or `npm run dev`
14
14
 
15
15
  2. **Inspect the live state**
16
- If MCP tool `extension_source_inspect` is available:
16
+ If MCP tool `extension_inspect` is available:
17
17
  - Pass `include: ["html", "summary", "meta", "console", "extension_roots"]`
18
18
  - If the user provided a URL in `$ARGUMENTS`, pass it as `url`
19
19
  - If the user provided CSS selectors (strings starting with `#`, `.`, or `[`), pass them as `probe`
@@ -27,7 +27,7 @@ Default to `both` (Chrome + Firefox). If the user specifies `chrome` or `firefox
27
27
  ```
28
28
 
29
29
  3. **Inspect the builds**
30
- If MCP tool `extension_inspect` is available, use it for each browser build.
30
+ If MCP tool `extension_analyze` is available, use it for each browser build.
31
31
  Check:
32
32
  - Total size under 10MB (store limit)
33
33
  - No source maps in production build
@@ -11,7 +11,7 @@ Parse the user's intent from `$ARGUMENTS` and execute the matching action:
11
11
 
12
12
  ### "create <name>" or "new <name>", Scaffold a new extension
13
13
 
14
- 1. If MCP tool `extension_list_templates` is available, use it to find the best template matching the user's description (check for surface type, framework, and keywords)
14
+ 1. If MCP tool `extension_templates` is available, use it to find the best template matching the user's description (check for surface type, framework, and keywords)
15
15
  2. If not, check the template catalog: `curl -sL https://github.com/extension-js/examples/releases/download/nightly/templates-meta.json | jq '.templates[] | {slug, description, uiFramework, surfaces}'`
16
16
  3. Run `npx extension@latest create <name> --template=<best-match>`
17
17
  4. Report what was created and suggest `npm run dev`
@@ -42,7 +42,7 @@ Parse the user's intent from `$ARGUMENTS` and execute the matching action:
42
42
 
43
43
  ### "debug" or "inspect", Debug a running extension
44
44
 
45
- 1. If MCP tool `extension_source_inspect` is available, use it with `include: ["html", "console", "extension_roots"]`
45
+ 1. If MCP tool `extension_inspect` is available, use it with `include: ["html", "console", "extension_roots"]`
46
46
  2. If there's a URL mentioned, pass it as the target
47
47
  3. If there are CSS selectors mentioned, pass them as `probe`
48
48
  4. Report: injected HTML, console errors, extension root state
@@ -58,7 +58,7 @@ Parse the user's intent from `$ARGUMENTS` and execute the matching action:
58
58
 
59
59
  ### "template <query>", Search for a template
60
60
 
61
- 1. If MCP tool `extension_list_templates` is available, use it with the query
61
+ 1. If MCP tool `extension_templates` is available, use it with the query
62
62
  2. Otherwise, search the catalog JSON
63
63
  3. Show matching templates with slug, description, framework, and surfaces
64
64