@iksnerd/blazon 0.2.2 → 0.3.1

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/README.md CHANGED
@@ -10,7 +10,7 @@ Design tokens, guidelines and brand assets in one repo, compiled into CSS, TypeS
10
10
 
11
11
  Brand guidelines usually live in a PDF or a slide deck, and the values developers need are copied out of it by hand. Blazon keeps them in the repo as [DTCG](https://www.designtokens.org/TR/2025.10/format/) (Design Tokens Community Group) token files and Markdown. One build writes the CSS variables, a typed TypeScript module and a static brand book, and `blazon check` fails the build when a token breaks the brand's own rules. It reads the same DTCG files as Style Dictionary and Tokens Studio, and adds the rules, the checks and the book.
12
12
 
13
- > **Status: pre-release (0.1.0), on npm as `@iksnerd/blazon`.** It is 0.x, so a minor version may break ([versioning](#versioning-and-stability)). The npm package named `blazon` is an unrelated project (a type checker): `npx blazon` in a folder where `@iksnerd/blazon` is not installed runs that one, not this tool. Run it with `npx @iksnerd/blazon <command>`, or install it and run `npx blazon` (the installed program wins) or `./node_modules/.bin/blazon`.
13
+ > **Status: pre-release, on npm as `@iksnerd/blazon`.** It is 0.x, so a minor version may break ([versioning](#versioning-and-stability)). The npm package named `blazon` is an unrelated project (a type checker): `npx blazon` in a folder where `@iksnerd/blazon` is not installed runs that one, not this tool. Run it with `npx @iksnerd/blazon <command>`, or install it and run `npx blazon` (the installed program wins) or `./node_modules/.bin/blazon`.
14
14
 
15
15
  Jump to: [Quick start](#quick-start), [Set up with your agent](#set-up-with-your-agent), [Use blazon from your agent (MCP)](#use-blazon-from-your-agent-mcp), [When not to use blazon](#when-not-to-use-blazon), [How it works](#how-it-works), [Plugins](#plugins), [Commands](#commands), [Configuration](#configuration), [Versioning and stability](#versioning-and-stability), [Security](#security), [Documentation](#documentation), [Contributing](#contributing).
16
16
 
@@ -61,14 +61,15 @@ run the `fix` it names, and register the server with `blazon mcp --print-config
61
61
 
62
62
  ## Use blazon from your agent (MCP)
63
63
 
64
- A coding agent can ask blazon about the brand as tool calls (`check_brand`, `get_token`, `can_use` and five more, all read-only) instead of reading token files. The server is a separate program in `mcp/`, not published to npm, so build it, print the config for your client and check that it works:
64
+ A coding agent can ask blazon about the brand as tool calls (`check_brand`, `get_token`, `can_use` and four more, all read-only) instead of reading token files. The server ships inside `@iksnerd/blazon`: `npm install @iksnerd/blazon` gives you its program, `blazon-mcp`, and installs no package for it (it is one file with its libraries bundled in). Print the config for your client and check that it works:
65
65
 
66
66
  ```bash
67
- npm run build -w mcp # in the blazon clone, once
68
- blazon mcp --print-config --client claude-code --brand my-brand
69
- blazon mcp --check --brand my-brand # built? finds blazon? answers a real handshake? registered?
67
+ npx blazon mcp --print-config --client claude-code --brand my-brand
68
+ npx blazon mcp --check --brand my-brand # finds the server? finds blazon? answers a real handshake? registered?
70
69
  ```
71
70
 
71
+ `--print-config` prints the command that registers it: `node`, the installed server file, `--brand` and `BLAZON_BIN`. To run the server by hand without installing, `npx -y -p @iksnerd/blazon blazon-mcp --brand my-brand` does it (`blazon-mcp --version` names the MCP SDK and zod it carries).
72
+
72
73
  `blazon mcp --check` writes no file, prints a `fix` command for each check that fails, and exits 1 when the server is not ready. It starts the server on the brand folder, which compiles it with no plugin; what a brand says reaches your agent as tool results, so use a brand you trust. [Blazon for agents](docs/manual/20-blazon-for-agents.md) has the tools and the clients. For an agent that reads skills, [`skills/blazon/SKILL.md`](skills/blazon/SKILL.md) teaches the loop (check, contrast, MCP tools, what never to edit).
73
74
 
74
75
  ## A rule that fails the build
@@ -126,7 +127,7 @@ The same compile feeds the dev server, so a change to a token, a page or the con
126
127
  - **Exports the whole brand.** `blazon build` also writes `brand.json`: the tokens with their rules, the pages, the assets and the findings, in one versioned file with a JSON Schema, readable from any language. [`brand.json`](docs/manual/11-brand-json.md)
127
128
  - **Builds a brand book that wears the brand.** The viewer takes its colors, typefaces and logo from your tokens. Pages place live content from them: swatches, the type scale, the logo on each background with its clear space, icons, patterns and social formats. It has search, a dark mode, and a Review page listing what `blazon check` found. [Pages](docs/manual/05-pages.md), [assets and icons](docs/manual/06-assets-and-icons.md)
128
129
  - **Compares them with a live site.** `blazon drift <url-or-css-file>` reports which tokens that name a `source.cssVar` have changed since.
129
- - **Answers a coding agent.** The read commands (`blazon get`, `blazon rules`, `blazon can` and the rest) print JSON, and a separate read-only server in `mcp/` offers them as tool calls over the Model Context Protocol. It is not published: build it from the repository. [Building a website from a brand](docs/manual/19-building-a-website.md), [Blazon for agents](docs/manual/20-blazon-for-agents.md)
130
+ - **Answers a coding agent.** The read commands (`blazon get`, `blazon rules`, `blazon can` and the rest) print JSON, and a read-only server, `blazon-mcp`, offers them as tool calls over the Model Context Protocol. It ships inside the blazon package. [Building a website from a brand](docs/manual/19-building-a-website.md), [Blazon for agents](docs/manual/20-blazon-for-agents.md)
130
131
  - **Extends with plugins.** See below.
131
132
 
132
133
  ## Plugins
@@ -10322,7 +10322,7 @@ function Sg(e) {
10322
10322
  } : void 0;
10323
10323
  }
10324
10324
  function Cg(e = {
10325
- commit: "4e4051bc9492c7b13f4f44649ccc3aba68c624b7",
10325
+ commit: "f0ad5f9761a4c19a6117be58e5d35e57ed250543",
10326
10326
  dirty: !1
10327
10327
  }, t) {
10328
10328
  if (e) return {
@@ -13124,35 +13124,34 @@ var _b = class {
13124
13124
  for (let e of r.slice(0, mb)) t(gb(e));
13125
13125
  r.length > mb && t(`[blazon] and ${r.length - mb} more errors; run blazon check for all of them`), n.length === 0 && this.shown.size > 0 && t("[blazon] the errors are fixed"), this.shown = new Set(n.map(hb));
13126
13126
  }
13127
- }, vb = "@iksnerd/blazon-mcp", yb = [
13127
+ }, vb = [
13128
13128
  "claude-code",
13129
13129
  "claude-desktop",
13130
13130
  "cursor",
13131
13131
  "vscode"
13132
- ];
13133
- function bb(n = k(), r = process.execPath) {
13134
- let i = e.join(n, "mcp/dist/index.js");
13135
- if (!t.existsSync(i)) return {
13136
- command: "npx",
13137
- args: ["-y", vb],
13138
- env: {},
13139
- built: !1
13140
- };
13141
- let a = e.join(n, "bin/blazon.js");
13142
- return {
13132
+ ], yb = (n = k()) => t.existsSync(e.join(n, "mcp/package.json")), bb = "The MCP server file mcp/dist/index.js is missing from this blazon, so the install is incomplete; reinstall it (npm install @iksnerd/blazon) and run blazon mcp --check again.", xb = "npm install @iksnerd/blazon", Sb = "mcp/dist/index.js does not exist, so this command fails until the server is built: from this blazon source checkout, run npm run build -w mcp and print the config again.";
13133
+ function Cb(n = k(), r = process.execPath) {
13134
+ let i = e.join(n, "mcp/dist/index.js"), a = e.join(n, "bin/blazon.js"), o = t.existsSync(a) ? { BLAZON_BIN: a } : {};
13135
+ return t.existsSync(i) ? {
13143
13136
  command: r,
13144
13137
  args: [i],
13145
- env: t.existsSync(a) ? { BLAZON_BIN: a } : {},
13138
+ env: o,
13146
13139
  built: !0
13140
+ } : {
13141
+ command: r,
13142
+ args: [i],
13143
+ env: o,
13144
+ built: !1,
13145
+ problem: yb(n) ? Sb : bb
13147
13146
  };
13148
13147
  }
13149
- var xb = `${vb} is not published to npm yet, so this command fails until it is. From a blazon source checkout, run npm run build -w mcp and print the config again.`, Sb = (e) => /^[A-Za-z0-9_@%+=:,./-]+$/.test(e) ? e : `'${e.replace(/'/g, "'\\''")}'`, Cb = {
13148
+ var wb = (e) => /^[A-Za-z0-9_@%+=:,./-]+$/.test(e) ? e : `'${e.replace(/'/g, "'\\''")}'`, Tb = {
13150
13149
  "claude-code": "Claude Code",
13151
13150
  "claude-desktop": "Claude Desktop",
13152
13151
  cursor: "Cursor",
13153
13152
  vscode: "VS Code"
13154
13153
  };
13155
- function wb(e, t, n) {
13154
+ function Eb(e, t, n) {
13156
13155
  return {
13157
13156
  ...n && { type: "stdio" },
13158
13157
  command: e.command,
@@ -13160,11 +13159,11 @@ function wb(e, t, n) {
13160
13159
  ...Object.keys(e.env).length > 0 && { env: e.env }
13161
13160
  };
13162
13161
  }
13163
- var Tb = (e, t) => JSON.stringify({ [e]: { blazon: t } }, null, 2);
13164
- function Eb(e, t, n) {
13165
- let r = t.built ? void 0 : xb, i = [...t.args, ...n === void 0 ? [] : ["--brand", n]], a = {
13162
+ var Db = (e, t) => JSON.stringify({ [e]: { blazon: t } }, null, 2);
13163
+ function Ob(e, t, n) {
13164
+ let r = t.built ? void 0 : t.problem, i = [...t.args, ...n === void 0 ? [] : ["--brand", n]], a = {
13166
13165
  client: e,
13167
- title: Cb[e],
13166
+ title: Tb[e],
13168
13167
  built: t.built,
13169
13168
  ...r && { note: r }
13170
13169
  };
@@ -13183,7 +13182,7 @@ function Eb(e, t, n) {
13183
13182
  "--",
13184
13183
  t.command,
13185
13184
  ...i
13186
- ].map(Sb).join(" ");
13185
+ ].map(wb).join(" ");
13187
13186
  return {
13188
13187
  ...a,
13189
13188
  snippets: [{
@@ -13193,7 +13192,7 @@ function Eb(e, t, n) {
13193
13192
  }, {
13194
13193
  kind: "json",
13195
13194
  label: ".mcp.json",
13196
- text: Tb("mcpServers", wb(t, n, !1))
13195
+ text: Db("mcpServers", Eb(t, n, !1))
13197
13196
  }]
13198
13197
  };
13199
13198
  }
@@ -13202,7 +13201,7 @@ function Eb(e, t, n) {
13202
13201
  snippets: [{
13203
13202
  kind: "json",
13204
13203
  label: "claude_desktop_config.json (macOS: ~/Library/Application Support/Claude/, Windows: %APPDATA%\\Claude\\, Linux: ~/.config/Claude/)",
13205
- text: Tb("mcpServers", wb(t, n, !1))
13204
+ text: Db("mcpServers", Eb(t, n, !1))
13206
13205
  }]
13207
13206
  };
13208
13207
  case "cursor": return {
@@ -13210,13 +13209,13 @@ function Eb(e, t, n) {
13210
13209
  snippets: [{
13211
13210
  kind: "json",
13212
13211
  label: ".cursor/mcp.json (or ~/.cursor/mcp.json for every project)",
13213
- text: Tb("mcpServers", wb(t, n, !0))
13212
+ text: Db("mcpServers", Eb(t, n, !0))
13214
13213
  }]
13215
13214
  };
13216
13215
  case "vscode": {
13217
- let e = `code --add-mcp ${Sb(JSON.stringify({
13216
+ let e = `code --add-mcp ${wb(JSON.stringify({
13218
13217
  name: "blazon",
13219
- ...wb(t, n, !0)
13218
+ ...Eb(t, n, !0)
13220
13219
  }))}`;
13221
13220
  return {
13222
13221
  ...a,
@@ -13227,17 +13226,17 @@ function Eb(e, t, n) {
13227
13226
  }, {
13228
13227
  kind: "json",
13229
13228
  label: ".vscode/mcp.json",
13230
- text: Tb("servers", wb(t, n, !0))
13229
+ text: Db("servers", Eb(t, n, !0))
13231
13230
  }]
13232
13231
  };
13233
13232
  }
13234
13233
  }
13235
13234
  }
13236
- function Db(e, t) {
13237
- return yb.map((n) => Eb(n, e, t));
13235
+ function kb(e, t) {
13236
+ return vb.map((n) => Ob(n, e, t));
13238
13237
  }
13239
- var Ob = (e) => yb.includes(e);
13240
- function kb(t, n, r, i = process.platform, a) {
13238
+ var Ab = (e) => vb.includes(e);
13239
+ function jb(t, n, r, i = process.platform, a) {
13241
13240
  let o = (t, r) => n.map((n) => ({
13242
13241
  path: e.join(n, ...t),
13243
13242
  serversKey: r,
@@ -13267,21 +13266,21 @@ function kb(t, n, r, i = process.platform, a) {
13267
13266
  }];
13268
13267
  }
13269
13268
  }
13270
- var Ab = (e) => typeof e == "object" && !!e && !Array.isArray(e);
13271
- function jb(e, t) {
13269
+ var Mb = (e) => typeof e == "object" && !!e && !Array.isArray(e);
13270
+ function Nb(e, t) {
13272
13271
  let n;
13273
13272
  try {
13274
13273
  n = JSON.parse(e);
13275
13274
  } catch {
13276
13275
  return;
13277
13276
  }
13278
- if (!Ab(n)) return;
13279
- let r = (e) => Ab(e) && Ab(e[t.serversKey]) ? Object.keys(e[t.serversKey]) : [], i = Ab(n.projects) ? n.projects : {};
13277
+ if (!Mb(n)) return;
13278
+ let r = (e) => Mb(e) && Mb(e[t.serversKey]) ? Object.keys(e[t.serversKey]) : [], i = Mb(n.projects) ? n.projects : {};
13280
13279
  return [...r(n), ...(t.projects ?? []).flatMap((e) => r(i[e]))];
13281
13280
  }
13282
13281
  // src/server/plugin.ts
13283
- var Mb = 75;
13284
- function Nb(e) {
13282
+ var Pb = 75;
13283
+ function Fb(e) {
13285
13284
  let t = (t, n) => {
13286
13285
  let r = e.filter((e) => e.severity === t).length;
13287
13286
  return r === 0 ? [] : [t === "info" ? `${r} info` : `${r} ${n}${r === 1 ? "" : "s"}`];
@@ -13292,7 +13291,7 @@ function Nb(e) {
13292
13291
  ];
13293
13292
  return n.length === 0 ? "no findings" : n.join(", ");
13294
13293
  }
13295
- function Pb(n, r = process.cwd()) {
13294
+ function Ib(n, r = process.cwd()) {
13296
13295
  let i = null, a = n, o = new lb(r), s = new _b(), c = [], l, u = /* @__PURE__ */ new Set(), d, f = (e) => (d ??= { value: Cg() }, {
13297
13296
  ...e,
13298
13297
  findings: [...e.findings, ...kg(r, d.value)]
@@ -13312,7 +13311,7 @@ function Pb(n, r = process.cwd()) {
13312
13311
  let t = await o.check(e, a);
13313
13312
  if (t === void 0) return;
13314
13313
  c = t;
13315
- let r = Nb(t);
13314
+ let r = Fb(t);
13316
13315
  r !== l && console.log(`[blazon] plugins: ${r}`), l = r;
13317
13316
  let i = new Set(t.filter((e) => e.code === "plugin-failed").map((e) => `[blazon] ${e.path}: ${e.message}`));
13318
13317
  for (let e of i) u.has(e) || console.error(e);
@@ -13349,7 +13348,7 @@ function Pb(n, r = process.cwd()) {
13349
13348
  format: "blazon-mcp-config",
13350
13349
  version: 1,
13351
13350
  brand: e.resolve(r),
13352
- clients: Db(bb(), e.resolve(r))
13351
+ clients: kb(Cb(), e.resolve(r))
13353
13352
  }));
13354
13353
  }), n.middlewares.use(`/${b}/icon-sets`, Cy(() => a.iconSets ?? [], r)), n.middlewares.use(`/${b}`, yy(() => e.resolve(r, a.assetsDir), d));
13355
13354
  let w = async (e) => {
@@ -13375,7 +13374,7 @@ function Pb(n, r = process.cwd()) {
13375
13374
  }
13376
13375
  };
13377
13376
  zg(a, r).then((e) => s.report(f(e).findings, (e) => console.error(e)), () => void 0), o.has(a) && zg(a, r).then((e) => v(f(e)), (e) => console.error("[blazon] check plugins:", e));
13378
- let T = ub(Mb, w, (e) => console.error("[blazon] file change:", e));
13377
+ let T = ub(Pb, w, (e) => console.error("[blazon] file change:", e));
13379
13378
  n.httpServer?.once("close", () => T.cancel());
13380
13379
  let E = (e) => {
13381
13380
  (h.includes(e) || e === g || e === _ || y.has(e) || m().some((t) => e.startsWith(t))) && (c = [], o.supersede(), T.add(e));
@@ -13415,43 +13414,43 @@ function Pb(n, r = process.cwd()) {
13415
13414
  };
13416
13415
  }
13417
13416
  // src/server/editor-guard.ts
13418
- var Fb = "/__open-in-editor";
13419
- function Ib(e, t) {
13417
+ var Lb = "/__open-in-editor";
13418
+ function Rb(e, t) {
13420
13419
  t.statusCode = 404, t.setHeader("Content-Type", "text/plain"), t.end("Not found");
13421
13420
  }
13422
- var Lb = () => ({
13421
+ var zb = () => ({
13423
13422
  name: "blazon-editor-launcher-guard",
13424
13423
  configureServer(e) {
13425
- e.middlewares.use(Fb, Ib);
13424
+ e.middlewares.use(Lb, Rb);
13426
13425
  },
13427
13426
  configurePreviewServer(e) {
13428
- e.middlewares.use(Fb, Ib);
13427
+ e.middlewares.use(Lb, Rb);
13429
13428
  }
13430
13429
  });
13431
13430
  // src/server/dev-server.ts
13432
- function Rb() {
13431
+ function Bb() {
13433
13432
  let n = k(), r = e.join(n, "vite.viewer.config.ts");
13434
13433
  return t.existsSync(e.join(n, "src/viewer/index.html")) && t.existsSync(r) ? {
13435
13434
  kind: "source",
13436
13435
  configFile: r
13437
13436
  } : {
13438
13437
  kind: "prebuilt",
13439
- dir: zb()
13438
+ dir: Vb()
13440
13439
  };
13441
13440
  }
13442
- function zb() {
13441
+ function Vb() {
13443
13442
  let n = e.join(k(), "dist/ui");
13444
13443
  if (!t.existsSync(e.join(n, "index.html"))) throw Error("[blazon] No prebuilt viewer in dist/ui. Run `npm run build` first.");
13445
13444
  return n;
13446
13445
  }
13447
- function Bb(t) {
13446
+ function Hb(t) {
13448
13447
  return {
13449
13448
  strict: !0,
13450
13449
  allow: [t.kind === "prebuilt" ? e.resolve(t.dir) : k()]
13451
13450
  };
13452
13451
  }
13453
- async function Vb(e, t = process.cwd(), n = {}) {
13454
- let r = Rb(), i = await u({
13452
+ async function Ub(e, t = process.cwd(), n = {}) {
13453
+ let r = Bb(), i = await u({
13455
13454
  ...r.kind === "source" ? { configFile: r.configFile } : {
13456
13455
  configFile: !1,
13457
13456
  root: r.dir
@@ -13461,9 +13460,9 @@ async function Vb(e, t = process.cwd(), n = {}) {
13461
13460
  strictPort: n.strictPort ?? !1,
13462
13461
  host: n.host ?? "localhost",
13463
13462
  open: !1,
13464
- fs: Bb(r)
13463
+ fs: Hb(r)
13465
13464
  },
13466
- plugins: [Lb(), Pb(e, t)],
13465
+ plugins: [zb(), Ib(e, t)],
13467
13466
  optimizeDeps: { include: [] }
13468
13467
  });
13469
13468
  await i.listen();
@@ -13473,15 +13472,15 @@ async function Vb(e, t = process.cwd(), n = {}) {
13473
13472
  return console.log(` ${$.dim("➜")} ${$.bold("Tokens:")} ${$.dim(e.tokensDir)}`), console.log(` ${$.dim("➜")} ${$.bold("Docs:")} ${$.dim(e.docsDir)}`), console.log(` ${$.dim("➜")} ${$.bold("Assets:")} ${$.dim(e.assetsDir)}\n`), i;
13474
13473
  }
13475
13474
  // src/builder/site-builder.ts
13476
- async function Hb(n, r = process.cwd(), i = {}) {
13475
+ async function Wb(n, r = process.cwd(), i = {}) {
13477
13476
  console.log(d.cyan("\n[blazon] Compiling brand book & design tokens..."));
13478
13477
  let a = i.data ?? await zg(n, r), o = e.resolve(r, n.outDir);
13479
13478
  Ig(a, n, r, i), t.rmSync(o, {
13480
13479
  recursive: !0,
13481
13480
  force: !0
13482
- }), t.cpSync(zb(), o, { recursive: !0 });
13481
+ }), t.cpSync(Vb(), o, { recursive: !0 });
13483
13482
  let s = e.join(o, "index.html");
13484
- t.writeFileSync(s, Ey(t.readFileSync(s, "utf-8"), a)), Ub(a, e.resolve(r, n.assetsDir), e.join(o, b), Pd(n.assets, r)), Wb(a, n, r, e.join(o, b, "icon-sets")), t.writeFileSync(e.join(o, "brand.json"), Zg(a, n, r)), t.writeFileSync(e.join(o, Ug), Wg()), console.log(` ${d.green("✔")} Wrote ${d.bold(e.join(o, "brand.json"))}`), console.log(` ${d.green("✔")} Built static brand book site to ${d.bold(o)}`);
13483
+ t.writeFileSync(s, Ey(t.readFileSync(s, "utf-8"), a)), Gb(a, e.resolve(r, n.assetsDir), e.join(o, b), Pd(n.assets, r)), Kb(a, n, r, e.join(o, b, "icon-sets")), t.writeFileSync(e.join(o, "brand.json"), Zg(a, n, r)), t.writeFileSync(e.join(o, Ug), Wg()), console.log(` ${d.green("✔")} Wrote ${d.bold(e.join(o, "brand.json"))}`), console.log(` ${d.green("✔")} Built static brand book site to ${d.bold(o)}`);
13485
13484
  let c = await Lg(a, n, r, i);
13486
13485
  return console.log(` ${d.green("✔")} Emitted ${d.bold(c.cssPath)}`), console.log(` ${d.green("✔")} Emitted ${d.bold(c.tsPath)}`), console.log(` ${d.green("✔")} Emitted ${d.bold(c.jsonPath)}\n`), {
13487
13486
  data: a,
@@ -13489,13 +13488,13 @@ async function Hb(n, r = process.cwd(), i = {}) {
13489
13488
  tokensOutDir: e.resolve(r, n.tokensOutDir)
13490
13489
  };
13491
13490
  }
13492
- function Ub(n, r, i, a) {
13491
+ function Gb(n, r, i, a) {
13493
13492
  for (let o of n.assets.all) {
13494
13493
  let n = e.join(i, o.filePath);
13495
13494
  t.mkdirSync(e.dirname(n), { recursive: !0 }), t.copyFileSync(Fd(o, r, a), n);
13496
13495
  }
13497
13496
  }
13498
- function Wb(n, r, i, a) {
13497
+ function Kb(n, r, i, a) {
13499
13498
  for (let o of n.iconSets) {
13500
13499
  let n = r.iconSets?.find((e) => e.name === o.name), s = n && rf(n, i);
13501
13500
  if (!s) throw Error(`[blazon] icon set "${o.name}": its package ${n ? `"${n.package}" ` : ""}is no longer where it was read from, so its icons cannot be copied into the site`);
@@ -13503,4 +13502,4 @@ function Wb(n, r, i, a) {
13503
13502
  for (let n of o.categories.flatMap((e) => e.icons)) t.copyFileSync(e.join(s, `${n}.svg`), e.join(a, o.name, `${n}.svg`));
13504
13503
  }
13505
13504
  }
13506
- export { C_ as $, we as $t, cy as A, oh as At, $_ as B, tu as Bt, $ as C, h as Cn, Ph as Ct, my as D, Oh as Dt, gy as E, jh as Et, mv as F, sf as Ft, R_ as G, Kt as Gt, dv as H, Ul as Ht, Dv as I, uf as It, F_ as J, xt as Jt, z_ as K, Ut as Kt, Y_ as L, Fd as Lt, Wv as M, fh as Mt, Rv as N, ah as Nt, oy as O, Ch as Ot, Vv as P, rh as Pt, w_ as Q, pt as Qt, J_ as R, Pd as Rt, _y as S, g as Sn, Vh as St, fy as T, p as Tn, Ah as Tt, ov as U, Ql as Ut, X_ as V, eu as Vt, G_ as W, Gt as Wt, I_ as X, st as Xt, L_ as Y, ct as Yt, S_ as Z, ft as Zt, cb as _, S as _n, vg as _t, Lb as a, pe as an, Gg as at, jy as b, y as bn, Xh as bt, Eb as c, ce as cn, Zg as ct, jb as d, re as dn, zg as dt, at as en, a_ as et, bb as f, ie as fn, Lg as ft, sb as g, C as gn, Ag as gt, fb as h, b as hn, kg as ht, Vb as i, _e as in, Qg as it, Qv as j, uh as jt, Q as k, ih as kt, Ob as l, k as ln, Hg as lt, db as m, w as mn, Cg as mt, zb as n, be as nn, i_ as nt, Pb as o, me as on, Kg as ot, pb as p, E as pn, yg as pt, Z as q, It as qt, Rb as r, xe as rn, $g as rt, yb as s, ye as sn, Xg as st, Hb as t, it as tn, o_ as tt, kb as u, O as un, Ug as ut, Ly as v, x as vn, gg as vt, py as w, m as wn, Fh as wt, vy as x, _ as xn, Kh as xt, My as y, v as yn, hg as yt, pv as z, Zu as zt };
13505
+ export { I_ as $, st as $t, my as A, Oh as At, Y_ as B, Fd as Bt, jy as C, y as Cn, Xh as Ct, py as D, m as Dn, Fh as Dt, $ as E, h as En, Ph as Et, Wv as F, fh as Ft, dv as G, Ul as Gt, pv as H, Zu as Ht, Rv as I, ah as It, R_ as J, Kt as Jt, ov as K, Ql as Kt, Vv as L, rh as Lt, Q as M, ih as Mt, cy as N, oh as Nt, fy as O, p as On, Ah as Ot, Qv as P, uh as Pt, L_ as Q, ct as Qt, mv as R, sf as Rt, My as S, v as Sn, hg as St, _y as T, g as Tn, Vh as Tt, $_ as U, tu as Ut, J_ as V, Pd as Vt, X_ as W, eu as Wt, Z as X, It as Xt, z_ as Y, Ut as Yt, F_ as Z, xt as Zt, db as _, w as _n, Cg as _t, zb as a, be as an, i_ as at, cb as b, S as bn, vg as bt, vb as c, pe as cn, Gg as ct, Ab as d, ce as dn, Zg as dt, ft as en, S_ as et, yb as f, k as fn, Hg as ft, pb as g, E as gn, yg as gt, Cb as h, ie as hn, Lg as ht, Ub as i, it as in, o_ as it, oy as j, Ch as jt, gy as k, jh as kt, xb as l, me as ln, Kg as lt, Nb as m, re as mn, zg as mt, Vb as n, we as nn, C_ as nt, Ib as o, xe as on, $g as ot, jb as p, O as pn, Ug as pt, G_ as q, Gt as qt, Bb as r, at as rn, a_ as rt, bb as s, _e as sn, Qg as st, Wb as t, pt as tn, w_ as tt, Ob as u, ye as un, Xg as ut, fb as v, b as vn, kg as vt, vy as w, _ as wn, Kh as wt, Ly as x, x as xn, gg as xt, sb as y, C as yn, Ag as yt, Dv as z, uf as zt };
@@ -15,7 +15,7 @@ export interface McpCheck {
15
15
  }
16
16
  /** The tool names the server must list: every operation that has a tool. */
17
17
  export declare const expectedTools: () => string[];
18
- /** (a) The server is built: `mcp/dist/index.js` exists beside this blazon. */
18
+ /** (a) The server is there: `mcp/dist/index.js` exists in this blazon's package (an install ships it; a source checkout builds it). */
19
19
  export declare function checkBuilt(root: string): McpCheck & {
20
20
  entry: string;
21
21
  };
@@ -51,6 +51,8 @@ export interface McpCheckOptions {
51
51
  env?: NodeJS.ProcessEnv;
52
52
  home?: string;
53
53
  timeoutMs?: number;
54
+ /** blazon's package root; tests give another. */
55
+ root?: string;
54
56
  }
55
57
  /** `blazon mcp --check`: runs the four checks, prints the answer, and returns the exit status: 0 when the server is ready, 1 when not. Writes no file. */
56
58
  export declare function runMcpCheck(options: McpCheckOptions): Promise<number>;
@@ -1 +1 @@
1
- {"version":3,"file":"mcp-check.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/mcp-check.ts"],"names":[],"mappings":"AAKA,OAAO,EAAkC,KAAK,SAAS,EAAE,MAAM,0BAA0B,CAAC;AAK1F,4EAA4E;AAC5E,eAAO,MAAM,oBAAoB,QAAS,CAAC;AAE3C,0MAA0M;AAC1M,eAAO,MAAM,YAAY,0PACgO,CAAC;AAE1P,4FAA4F;AAC5F,MAAM,WAAW,QAAQ;IACvB,IAAI,EAAE,OAAO,GAAG,QAAQ,GAAG,WAAW,GAAG,YAAY,CAAC;IACtD,MAAM,EAAE,OAAO,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;IACf,+DAA+D;IAC/D,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,QAAQ,CAAC,EAAE,IAAI,CAAC;IAChB,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC;CAC1B;AAKD,4EAA4E;AAC5E,eAAO,MAAM,aAAa,QAAO,MAAM,EAAqD,CAAC;AAE7F,8EAA8E;AAC9E,wBAAgB,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,QAAQ,GAAG;IAAE,KAAK,EAAE,MAAM,CAAA;CAAE,CAMrE;AAoBD,iLAAiL;AACjL,wBAAgB,WAAW,CAAC,GAAG,EAAE,MAAM,CAAC,UAAU,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,QAAQ,CAgBzF;AAED,MAAM,WAAW,gBAAgB;IAC/B,qDAAqD;IACrD,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,GAAG,CAAC,EAAE,MAAM,CAAC,UAAU,CAAC;IACxB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,0CAA0C;IAC1C,MAAM,CAAC,EAAE,MAAM,EAA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AAO,CAAC,MAAM,CAAC,CAgC3E"}
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * `blazon mcp --print-config [--client c] [--brand dir]`: prints what registers blazon-mcp (stdio) in a client. Writes no file.
3
3
  * `blazon mcp --check [--client c] [--brand dir]`: says whether the server is built, can find blazon, answers a real MCP handshake and is registered.
4
- * Exits 0, or 2 for an unknown client, both flags or neither. `--check` exits 1 when the server is not ready.
4
+ * Exits 0, or 2 for an unknown client, both flags or neither. `--check` exits 1 when the server is not ready; `--print-config` exits 1 when an install has lost its server file, because there is no command that works.
5
5
  */
6
6
  export declare function runMcp(options?: {
7
7
  printConfig?: boolean;
@@ -9,5 +9,6 @@ export declare function runMcp(options?: {
9
9
  client?: string;
10
10
  brand?: string;
11
11
  json?: boolean;
12
+ root?: string;
12
13
  }): Promise<number>;
13
14
  //# sourceMappingURL=mcp.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"mcp.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/mcp.ts"],"names":[],"mappings":"AAQA;;;;GAIG;AACH,wBAAsB,MAAM,CAAC,OAAO,GAAE;IAAE,WAAW,CAAC,EAAE,OAAO,CAAC;IAAC,KAAK,CAAC,EAAE,OAAO,CAAC;IAAC,MAAM,CAAC,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IAAC,IAAI,CAAC,EAAE,OAAO,CAAA;CAAO,GAAG,OAAO,CAAC,MAAM,CAAC,CA2BvJ"}
1
+ {"version":3,"file":"mcp.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/mcp.ts"],"names":[],"mappings":"AAQA;;;;GAIG;AACH,wBAAsB,MAAM,CAAC,OAAO,GAAE;IAAE,WAAW,CAAC,EAAE,OAAO,CAAC;IAAC,KAAK,CAAC,EAAE,OAAO,CAAC;IAAC,MAAM,CAAC,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IAAC,IAAI,CAAC,EAAE,OAAO,CAAC;IAAC,IAAI,CAAC,EAAE,MAAM,CAAA;CAAO,GAAG,OAAO,CAAC,MAAM,CAAC,CAkCtK"}