vectorvesper 2.4.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/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-28T05:06:16.709Z",
4
+ "generatedAt": "2026-08-28T08:18:25.103Z",
5
5
  "contractLevel": "full",
6
6
  "hooks": [
7
7
  {
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.4.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.4.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-UEQ2Y6FU.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.4.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-H4XNBFKQ.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.4.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,6 +1,6 @@
1
1
  {
2
2
  "name": "vectorvesper",
3
- "version": "2.4.0",
3
+ "version": "2.4.1",
4
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",