vectorvesper 2.3.0 → 2.4.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
@@ -53,6 +53,37 @@ export default function Page() {
53
53
  }
54
54
  ```
55
55
 
56
+ ## MCP server — motion advice for your coding agent
57
+
58
+ The same CLI runs as an [MCP](https://modelcontextprotocol.io) server, so Claude Code, Cursor, Copilot and friends can ask about motion before they write it.
59
+
60
+ ```bash
61
+ npx vectorvesper mcp install
62
+ ```
63
+
64
+ That configures every supported editor it finds. Restart the editor and run `npx vectorvesper mcp status` to confirm. No account or token is needed — the runtime, its contracts and the linter are free.
65
+
66
+ **Why bother.** Bad motion code does not error. TypeScript passes, the build is green, and the page janks on a mid-range phone six weeks later with nothing connecting the two. An agent has no feedback signal for the one quality dimension that matters here, so this server gives it three:
67
+
68
+ - **`plan_motion`** — describe what you are building and get told whether it needs a primitive **at all**, which ones, in what order, and when that advice would be wrong. It says "use CSS, not this" for a hover state, a fade on mount, a spinner or a one-time scroll reveal, because those are compositor features that cost no main-thread time. Roughly a fifth of its answers recommend the platform over this library.
69
+ - **`get_hook` / `get_pattern` / `get_component`** — the contract, not the source. Does this need a client boundary, does it own the element's transform, what does it conflict with, which frame lane does it run in, and when should you not use it.
70
+ - **`check_motion`** — a static linter for the failure class that ships silently: a private `requestAnimationFrame` loop outside the shared budget, a discarded unsubscribe, `setState` in a frame callback, layout read in the write lane, one transform with two owners, a `<Canvas>` prop that quietly overrules the adapter that set it, a WebGL scene with nothing watching for a lost context, motion with no reduced-motion guard.
71
+
72
+ Prefer to wire it by hand? Add this to your client's MCP config:
73
+
74
+ ```json
75
+ {
76
+ "mcpServers": {
77
+ "vectorvesper": {
78
+ "command": "npx",
79
+ "args": ["-y", "vectorvesper", "mcp"]
80
+ }
81
+ }
82
+ }
83
+ ```
84
+
85
+ Full setup notes and the per-client config paths: [vectorvesper.dev/docs/mcp](https://vectorvesper.dev/docs/mcp).
86
+
56
87
  ## CLI Command Reference
57
88
 
58
89
  | Command | Description |
@@ -63,6 +94,9 @@ export default function Page() {
63
94
  | `update [slug]` | Update installed components to the latest version |
64
95
  | `diff [slug]` | Check local files against registry updates |
65
96
  | `remove <slug>` | Safely remove a component's files from the project |
97
+ | `mcp install [client]` | Configure the MCP server for your editor(s) |
98
+ | `mcp status` | Check which clients are wired up |
99
+ | `mcp` | Run the MCP server on stdio (what the editor invokes) |
66
100
  | `info` | Output workspace diagnostics for troubleshooting |
67
101
 
68
102
  Works out of the box with **npm, pnpm, yarn, and bun** by checking your lockfile.
package/dist/hooks.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": "1.0.0",
3
3
  "engineVersion": "4.0.0",
4
- "generatedAt": "2026-08-27T13:26:41.858Z",
4
+ "generatedAt": "2026-08-28T08:18:25.103Z",
5
5
  "contractLevel": "full",
6
6
  "hooks": [
7
7
  {
@@ -3503,10 +3503,24 @@
3503
3503
  "parallax",
3504
3504
  "layers move with the mouse",
3505
3505
  "depth effect",
3506
- "tilt with cursor",
3507
3506
  "parallax scene"
3508
3507
  ],
3509
- "allOf": [],
3508
+ "allOf": [
3509
+ [
3510
+ "tilt",
3511
+ "lean",
3512
+ "rotate",
3513
+ "depth",
3514
+ "layer",
3515
+ "perspective",
3516
+ "skew"
3517
+ ],
3518
+ [
3519
+ "cursor",
3520
+ "mouse",
3521
+ "pointer"
3522
+ ]
3523
+ ],
3510
3524
  "unless": [],
3511
3525
  "minHits": 1,
3512
3526
  "priority": 630,
package/dist/index.js CHANGED
@@ -1122,7 +1122,7 @@ Remove ${slug}
1122
1122
  import fs7 from "fs";
1123
1123
  import path7 from "path";
1124
1124
  import pc8 from "picocolors";
1125
- var CLI_VERSION = true ? "2.3.0" : "0.0.0-dev";
1125
+ var CLI_VERSION = true ? "2.4.1" : "0.0.0-dev";
1126
1126
  async function infoCommand() {
1127
1127
  console.log(pc8.bold(pc8.cyan("\nVector Vesper Diagnostics\n")));
1128
1128
  const projectInfo = detectProject();
@@ -1420,7 +1420,7 @@ async function whoamiCommand() {
1420
1420
  }
1421
1421
 
1422
1422
  // src/index.ts
1423
- var version = true ? "2.3.0" : "0.0.0-dev";
1423
+ var version = true ? "2.4.1" : "0.0.0-dev";
1424
1424
  var program = new Command();
1425
1425
  program.name("vv").description("Vector Vesper CLI \u2014 add visual components to your React project").version(version).option("--verbose", "Show detailed debug output").hook("preAction", (thisCommand) => {
1426
1426
  const opts = thisCommand.opts();
@@ -1462,7 +1462,7 @@ program.command("mcp [action] [client]").description(
1462
1462
  "Run as an MCP server (stdio) for AI coding agents. `vv mcp install` wires it into your editor; `vv mcp status` checks the setup."
1463
1463
  ).option("--stdio", "Force server mode even from an interactive terminal").option("-g, --global", "Write user-level config instead of project-level (install)").action(
1464
1464
  async (action, client, options) => {
1465
- const { mcpCommand } = await import("./mcp-H5YYBZ5V.js");
1465
+ const { mcpCommand } = await import("./mcp-FP5FICSI.js");
1466
1466
  await mcpCommand(action, { ...options, client });
1467
1467
  }
1468
1468
  );
@@ -138,7 +138,7 @@ function detectClients(cwd = process.cwd()) {
138
138
  }
139
139
 
140
140
  // src/commands/mcp.ts
141
- var VERSION = true ? "2.3.0" : "0.0.0-dev";
141
+ var VERSION = true ? "2.4.1" : "0.0.0-dev";
142
142
  var CONFIG_SNIPPET = `{
143
143
  "mcpServers": {
144
144
  "vectorvesper": {
@@ -285,7 +285,7 @@ ${pc.red("\u2717")} Unknown argument "${action}" for \`vv mcp\`.
285
285
  return;
286
286
  }
287
287
  protectStdout();
288
- const { startMcpServer } = await import("./server-KJ3YQ7G4.js");
288
+ const { startMcpServer } = await import("./server-AYBXJAAO.js");
289
289
  try {
290
290
  await startMcpServer();
291
291
  } catch (error) {
@@ -65,10 +65,24 @@ function calleeName(callee) {
65
65
  }
66
66
  return void 0;
67
67
  }
68
- function isStateSetterCall(callee) {
68
+ function isStateSetterCall(callee, reactSetters) {
69
69
  if (!callee || callee.type !== "Identifier") return false;
70
- const name = callee.name;
71
- return /^set[A-Z]/.test(name) && name !== "setInterval" && name !== "setTimeout";
70
+ return reactSetters.has(callee.name);
71
+ }
72
+ function collectReactSetters(ast, traverse) {
73
+ const names = /* @__PURE__ */ new Set();
74
+ traverse(ast, {
75
+ VariableDeclarator(p) {
76
+ const { id, init } = p.node;
77
+ if (id?.type !== "ArrayPattern") return;
78
+ const callee = init?.callee;
79
+ const hook = callee?.type === "Identifier" ? callee.name : callee?.property?.name;
80
+ if (hook !== "useState" && hook !== "useReducer") return;
81
+ const second = id.elements?.[1];
82
+ if (second?.type === "Identifier") names.add(second.name);
83
+ }
84
+ });
85
+ return names;
72
86
  }
73
87
  function accessorName(callee) {
74
88
  const obj = callee?.object;
@@ -118,6 +132,7 @@ function collect(ast, traverse) {
118
132
  handlesContextLoss: false,
119
133
  gatingObserver: []
120
134
  };
135
+ const reactSetters = collectReactSetters(ast, traverse);
121
136
  const manifest = loadHookManifest();
122
137
  const hookByName = /* @__PURE__ */ new Map();
123
138
  for (const h of manifest?.hooks ?? []) hookByName.set(h.name, h);
@@ -140,12 +155,12 @@ function collect(ast, traverse) {
140
155
  if (!file) return;
141
156
  traverse(file, {
142
157
  CallExpression(p) {
143
- if (isStateSetterCall(p.node.callee)) {
158
+ if (isStateSetterCall(p.node.callee, reactSetters)) {
144
159
  f.setStateInHot.push({ line: cbNode.loc?.start.line ?? 0, ctx, fromRaf });
145
160
  }
146
161
  },
147
162
  OptionalCallExpression(p) {
148
- if (isStateSetterCall(p.node.callee)) {
163
+ if (isStateSetterCall(p.node.callee, reactSetters)) {
149
164
  f.setStateInHot.push({ line: cbNode.loc?.start.line ?? 0, ctx, fromRaf });
150
165
  }
151
166
  }
@@ -156,7 +171,7 @@ function collect(ast, traverse) {
156
171
  if (!file) return false;
157
172
  let found = false;
158
173
  const visit = (p) => {
159
- if (isStateSetterCall(p.node.callee)) found = true;
174
+ if (isStateSetterCall(p.node.callee, reactSetters)) found = true;
160
175
  };
161
176
  traverse(file, { CallExpression: visit, OptionalCallExpression: visit });
162
177
  return found;
@@ -871,7 +886,7 @@ function formatPlan({ building, using }) {
871
886
  }
872
887
 
873
888
  // src/mcp/server.ts
874
- var VERSION = true ? "2.3.0" : "0.0.0-dev";
889
+ var VERSION = true ? "2.4.1" : "0.0.0-dev";
875
890
  function text(body) {
876
891
  return { content: [{ type: "text", text: body }] };
877
892
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "vectorvesper",
3
- "version": "2.3.0",
4
- "description": "Add WebGL, React Three Fiber & advanced motion components to your project via CLI.",
3
+ "version": "2.4.1",
4
+ "description": "Motion runtime and WebGL/R3F component CLI for React, with an MCP server that tells your coding agent which primitive to use, how to wire it, and when not to.",
5
5
  "type": "module",
6
6
  "license": "MIT",
7
7
  "main": "./dist/index.js",
@@ -25,18 +25,29 @@
25
25
  },
26
26
  "homepage": "https://vectorvesper.dev",
27
27
  "keywords": [
28
+ "mcp",
29
+ "model-context-protocol",
30
+ "mcp-server",
31
+ "ai",
32
+ "agent",
33
+ "claude",
34
+ "cursor",
35
+ "copilot",
28
36
  "react",
29
37
  "webgl",
30
38
  "three",
31
39
  "threejs",
40
+ "react-three-fiber",
32
41
  "components",
33
42
  "cli",
34
43
  "ui",
35
- "visual",
36
44
  "animation",
45
+ "motion",
37
46
  "gsap",
38
47
  "shader",
39
- "interactive"
48
+ "interactive",
49
+ "performance",
50
+ "requestanimationframe"
40
51
  ],
41
52
  "scripts": {
42
53
  "build": "tsup",
@@ -65,5 +76,6 @@
65
76
  "tsup": "^8.0.2",
66
77
  "typescript": "^6.0.3",
67
78
  "vitest": "^2.1.8"
68
- }
79
+ },
80
+ "mcpName": "dev.vectorvesper/motion"
69
81
  }