@flareum/mcp 0.2.0 → 0.2.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.
Files changed (3) hide show
  1. package/README.md +28 -0
  2. package/dist/cli.js +12 -0
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -23,6 +23,33 @@ The key is shown once and cannot be retrieved again. If you lose it, revoke it a
23
23
 
24
24
  ---
25
25
 
26
+ ## Updating
27
+
28
+ `npx` caches what it downloaded, so it can keep running an old copy after a new one ships. To get
29
+ the newest:
30
+
31
+ ```bash
32
+ npx -y @flareum/mcp@latest --help
33
+ ```
34
+
35
+ Naming `@latest` is what refreshes the cache. Then restart your editor session — a running MCP
36
+ server keeps the version it started with.
37
+
38
+ Check which version you are actually on:
39
+
40
+ ```bash
41
+ npm view @flareum/mcp version # the newest published
42
+ npx -y @flareum/mcp@latest --version
43
+ ```
44
+
45
+ If you installed it globally instead of through `npx`:
46
+
47
+ ```bash
48
+ npm install -g @flareum/mcp@latest
49
+ ```
50
+
51
+ ---
52
+
26
53
  ## What your agent can do with it
27
54
 
28
55
  Ask in plain language — the agent picks the tool:
@@ -100,6 +127,7 @@ and it prints where it wrote (or why it could not) on stderr.
100
127
  | What you see | Cause |
101
128
  |---|---|
102
129
  | The server fails to connect / closes immediately | The package is not installed. Check `npx -y @flareum/mcp` resolves — if it 404s, it has not been published yet. |
130
+ | A command the docs describe is not recognised | `npx` is running a cached older copy. Re-run it as `@latest` — see Updating. |
103
131
  | The agent types literal values anyway | The skill did not land. Look for `[flareum] skill written to …` in the MCP server's stderr. |
104
132
  | Values labelled with long ids instead of mode names | The Flareum server is older than the client. Restart it. |
105
133
  | `401` on every call | The key was revoked, or belongs to another project. Mint a new one. |
package/dist/cli.js CHANGED
@@ -6,6 +6,8 @@ import { CONFIG_PATH, cliErrorReport, parseArgs, resolveConfig } from './config.
6
6
  import { pullReport, pullStyles } from './pull.js';
7
7
  import { DEFAULT_INTERVAL_MS, watchPublished, watchStartedReport } from './watch.js';
8
8
  const DEFAULT_OUT = 'src/styles/flareum';
9
+ // Read rather than restated: a hardcoded version is wrong the moment `npm version` runs.
10
+ const VERSION = JSON.parse(await readFile(new URL('../package.json', import.meta.url), 'utf8')).version;
9
11
  const HELP = `flareum — read a Flareum project's design tokens
10
12
 
11
13
  flareum pull [--out <dir>] [--token pk_…] [--api <url>]
@@ -20,6 +22,16 @@ Mint one in the project's Connect screen in Flareum.`;
20
22
  const readConfigFile = async () => readFile(join(process.cwd(), CONFIG_PATH), 'utf8').then(JSON.parse).catch(() => null);
21
23
  const { command, flags } = parseArgs(process.argv.slice(2));
22
24
  const COMMANDS = ['pull', 'watch'];
25
+ // Read from flags, not `command`: parseArgs takes every leading `--x` as a flag, so checking the
26
+ // command alone printed the help instead.
27
+ if (flags.version || command === '-v') {
28
+ console.log(VERSION);
29
+ process.exit(0);
30
+ }
31
+ if (flags.help || command === '-h') {
32
+ console.log(HELP);
33
+ process.exit(0);
34
+ }
23
35
  if (!COMMANDS.includes(command)) {
24
36
  console.log(HELP);
25
37
  process.exit(command ? 1 : 0);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@flareum/mcp",
3
- "version": "0.2.0",
3
+ "version": "0.2.1",
4
4
  "description": "Connect a coding agent to a Flareum project's design tokens.",
5
5
  "license": "MIT",
6
6
  "author": "Flareum",