@extension.dev/mcp 5.7.0 → 6.1.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.
@@ -7,6 +7,7 @@
7
7
  * localhost) can then watch the session's real-lane trace and pair with it.
8
8
  */
9
9
  export declare const CARRIER_DIR_NAME = "extension-dev-live-preview";
10
+ export declare const CARRIER_EXTENSION_ID = "ibppeifnekhjjjmpjfiobccjlicbmgcb";
10
11
  /** Where the carrier lands inside a project. */
11
12
  export declare function carrierPath(projectPath: string): string;
12
13
  /** True only for a directory carrying our marker, i.e. ours to delete. */
@@ -49,6 +50,17 @@ export type CarrierMaterialization = {
49
50
  * was written down anywhere the caller would look.
50
51
  */
51
52
  limitations?: string[];
53
+ /**
54
+ * The graduation path, stated next to the shared-identity limitation so the
55
+ * caller is not left at a dead end. The carrier lane is the SHARED real lane
56
+ * (calls run as the carrier); but the guest is ALREADY loaded as itself in
57
+ * this same session, so its OWN storage, identity and messaging are reached by
58
+ * driving the guest directly with the control verbs, not the carrier bridge.
59
+ * This is the agent-lane twin of the inspect Trace tab's "load as your own
60
+ * extension" affordance: here the extension is already loaded, so graduating
61
+ * means targeting it, not launching it.
62
+ */
63
+ graduation?: string;
52
64
  /**
53
65
  * How to actually DRIVE the real lane. Seven personas reached a
54
66
  * permanently empty trace and concluded the feature was broken, because
@@ -0,0 +1,27 @@
1
+ export type GuestTarget = {
2
+ id: string;
3
+ type: string;
4
+ url: string;
5
+ };
6
+ export type GuestLoadCheck = {
7
+ checked: boolean;
8
+ loaded: boolean;
9
+ guestTargets: GuestTarget[];
10
+ guestIds: string[];
11
+ cdpPort?: number;
12
+ reason: string;
13
+ };
14
+ /**
15
+ * The BUGS_TO_FIX §83 oracle: ask the BROWSER whether the guest actually loaded,
16
+ * instead of trusting the engine's ready.json. Chrome refusing --load-extension
17
+ * is invisible to every engine surface (ready.json stamps status:ready, empty
18
+ * logs), so the only trustworthy "did the guest load" signal is a
19
+ * chrome-extension:// target in the browser's own CDP /json list. The engine's
20
+ * devtools companion is always present and is not the guest; a NON-companion
21
+ * extension target is. Never throws: an unreachable endpoint returns
22
+ * checked:false so callers can degrade instead of failing.
23
+ */
24
+ export declare function verifyGuestLoaded(projectPath: string, browser: string, options?: {
25
+ waitMs?: number;
26
+ timeoutMs?: number;
27
+ }): Promise<GuestLoadCheck>;
@@ -1,5 +1,17 @@
1
- export declare const REGISTRY_BASE_DEFAULT = "https://registry.extension.land";
2
- export declare const CONSOLE_BASE = "https://console.extension.dev";
1
+ import { type Origins } from "./urls-origins";
2
+ export declare const REGISTRY_BASE_DEFAULT: string;
3
+ /**
4
+ * Resolve the fleet origins from the MCP's env vars, once per call. Console,
5
+ * registry, and media all DERIVE from the platform base (`EXTENSION_DEV_API_URL`
6
+ * or a per-tool `api`): point that at a local stack and every dashboard link the
7
+ * MCP hands back follows to the dev host (`console.extension.localhost`) instead
8
+ * of silently pointing at prod. Explicit per-host env vars still win. Falls back
9
+ * to production when nothing is set. The dev-derivation lives in
10
+ * `@extensiondev/urls` so it stays identical to what the apps resolve.
11
+ */
12
+ export declare function mcpOrigins(apiHint?: string): Origins;
13
+ /** Base origin of the console dashboard, dev-aware (no trailing slash). */
14
+ export declare function consoleBase(apiHint?: string): string;
3
15
  export declare function registryBase(): string;
4
16
  export interface ProjectRef {
5
17
  workspace: string;
@@ -17,8 +29,14 @@ export declare function resolveProjectRef(overrides?: {
17
29
  }): ProjectRef | null;
18
30
  /** URL of a file under the project's `_extension-dev/` registry directory. */
19
31
  export declare function registryFileUrl(ref: ProjectRef, file: string): string;
20
- /** Console page URL for the project (builds, releases/new, stores, ...). */
21
- export declare function consoleProjectUrl(ref: ProjectRef | null, page: string): string;
32
+ /**
33
+ * Console page URL for the project (builds, releases/new, stores, ...). The
34
+ * origin is dev-aware; the path comes from the shared route contract so a
35
+ * console route rename is caught in one place. Pass `apiHint` (a tool's `api`
36
+ * arg) so the link matches that call's environment; otherwise it follows
37
+ * `EXTENSION_DEV_API_URL`/`EXTENSION_DEV_CONSOLE_URL`.
38
+ */
39
+ export declare function consoleProjectUrl(ref: ProjectRef | null, page: string, apiHint?: string): string;
22
40
  export type RegistryFetchResult<T> = {
23
41
  ok: true;
24
42
  json: T;
@@ -0,0 +1,4 @@
1
+ export declare const PINNED_COMMIT = "2d2ed9668cca002148d9eecd953a08b54d0bad9d";
2
+ export declare function templateMetaUrls(): Promise<string[]>;
3
+ export declare function stripTemplatePathPrefix(slug: string, relativePath: string): string;
4
+ export declare function templateFileUrls(slug: string, relativePath: string): Promise<string[]>;
@@ -0,0 +1,34 @@
1
+ /** The set of app/service origins the fleet links between. */
2
+ export interface Origins {
3
+ www: string;
4
+ console: string;
5
+ inspect: string;
6
+ templates: string;
7
+ intelligence: string;
8
+ /** Public release-state JSON host (registry.extension.land). */
9
+ registry: string;
10
+ /** Content-addressed template corpus host (media.extension.land). */
11
+ media: string;
12
+ }
13
+ /** Production origins. The prod fallback for every resolver in the fleet. */
14
+ export declare const PROD_ORIGINS: Origins;
15
+ export declare const DEV_LOCALHOST_ORIGINS: Origins;
16
+ /**
17
+ * True for `localhost`, `127.0.0.1`, `[::1]`, or any `*.extension.localhost`
18
+ * host -- the shapes the dev proxy serves. Anything unparseable is treated as
19
+ * not-local so an odd value falls back to prod rather than leaking a dev host.
20
+ */
21
+ export declare function isLocalOrigin(url: string | undefined | null): boolean;
22
+ /**
23
+ * Resolve the full origin set from a caller's overrides.
24
+ *
25
+ * Precedence per origin: explicit override -> derived base (dev vs prod) ->
26
+ * prod. The base is chosen by whether the environment looks local: if any of
27
+ * `www`/`console`/`hint` points at a local host, unset origins derive from the
28
+ * Caddy dev map instead of prod. This is what lets an operator set only
29
+ * `EXTENSION_DEV_API_URL=http://localhost:3100` and still get a console link at
30
+ * `console.extension.localhost` rather than one that silently points at prod.
31
+ */
32
+ export declare function resolveOrigins(overrides?: Partial<Origins>, opts?: {
33
+ hint?: string;
34
+ }): Origins;
@@ -0,0 +1,56 @@
1
+ /** A project is addressed by its workspace slug + project slug across the fleet. */
2
+ export interface ProjectRef {
3
+ workspace: string;
4
+ project: string;
5
+ }
6
+ /** `/:workspace` (or a sub-page like `settings` / `settings/:section`). */
7
+ export declare function consoleWorkspacePath(workspace: string, page?: string): string;
8
+ /**
9
+ * `/:workspace/:project/<page>`. Pass a page tail from `ConsoleProjectPage`
10
+ * (e.g. `ConsoleProjectPage.builds`) rather than hand-typing it, so a route
11
+ * rename is a one-line change here instead of a scattered string edit.
12
+ */
13
+ export declare function consoleProjectPath(ref: ProjectRef, page?: string): string;
14
+ /**
15
+ * Named project-page tails. Values are the exact segments under
16
+ * `/:username/:reponame/` in console's route table; deep pages take ids.
17
+ */
18
+ export declare const ConsoleProjectPage: {
19
+ readonly overview: "";
20
+ readonly onboard: "onboard";
21
+ readonly activity: "activity";
22
+ readonly builds: "builds";
23
+ readonly build: (buildId: string, browser?: string) => string;
24
+ readonly releases: "releases";
25
+ readonly releasesNew: "releases/new";
26
+ readonly release: (releaseId: string) => string;
27
+ readonly stores: "stores";
28
+ readonly storesNew: "stores/new";
29
+ readonly store: (store: string) => string;
30
+ readonly storeSubmissions: (store: string) => string;
31
+ readonly storeSubmissionNew: (store: string) => string;
32
+ readonly storeSubmission: (store: string, submissionId: string) => string;
33
+ readonly projectSettings: "project-settings";
34
+ readonly projectSettingsSection: (section: string) => string;
35
+ /** Where CLI/MCP tokens are minted and revoked. */
36
+ readonly accessTokens: "settings/access-tokens";
37
+ };
38
+ export type QueryValue = string | number | boolean | null | undefined;
39
+ /**
40
+ * `/new?...` -- project creation. The public deep-link contract: external
41
+ * READMEs use `extension.dev/new?template=<slug>`, which www normalizes to
42
+ * `/import` preserving every param. Do not change the `template` key.
43
+ */
44
+ export declare function wwwNewPath(query?: Record<string, QueryValue>): string;
45
+ /** `/import?...` -- the ported import/deploy flow templates' Deploy buttons target. */
46
+ export declare function wwwImportPath(query?: Record<string, QueryValue>): string;
47
+ /** `/device` -- CLI/MCP device-code consent. Lives on www, never console. */
48
+ export declare function wwwDevicePath(): string;
49
+ /** `/templates` and `/templates/:slug` -- externally linkable gallery entry on www. */
50
+ export declare function wwwTemplatesPath(slug?: string): string;
51
+ export type TemplateTab = "preview" | "instructions" | "source";
52
+ /** `/:slug` for the default `preview` tab, else `/:slug/<tab>`. */
53
+ export declare function templateTabPath(slug: string, tab?: TemplateTab): string;
54
+ export type InspectTab = "preview" | "details" | "source" | "trace";
55
+ /** `/` for the default `preview` tab, else `/details` / `/source` / `/trace`. */
56
+ export declare function inspectTabPath(tab?: InspectTab): string;
@@ -44,6 +44,7 @@ export declare const schema: {
44
44
  required: string[];
45
45
  };
46
46
  };
47
+ export declare function sessionIsHeadless(): boolean;
47
48
  export declare function handler(args: ActArgs & {
48
49
  surface?: string;
49
50
  name?: string;
package/package.json CHANGED
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "name": "@extension.dev/mcp",
3
3
  "type": "module",
4
- "version": "5.7.0",
4
+ "version": "6.1.0",
5
5
  "description": "MCP server that lets AI agents (Claude Code, Claude Desktop, Cursor, Copilot, Codex) build, run, inspect, and publish browser extensions. 33 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
- "license": "MIT",
7
+ "license": "Apache-2.0",
8
8
  "author": {
9
9
  "name": "Cezar Augusto",
10
10
  "email": "hello@extension.dev",
@@ -42,7 +42,9 @@
42
42
  "server.json",
43
43
  "README.md",
44
44
  "CHANGELOG.md",
45
- "LICENSE"
45
+ "LICENSE",
46
+ "NOTICE",
47
+ "TRADEMARK.md"
46
48
  ],
47
49
  "scripts": {
48
50
  "clean": "rm -rf dist",
package/server.json CHANGED
@@ -7,13 +7,13 @@
7
7
  "source": "github"
8
8
  },
9
9
  "websiteUrl": "https://extension.dev",
10
- "version": "5.7.0",
10
+ "version": "6.1.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.7.0",
16
+ "version": "6.1.0",
17
17
  "runtimeHint": "npx",
18
18
  "transport": {
19
19
  "type": "stdio"