@vcad/mcp 0.10.0-main.136 → 0.10.0-main.137

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 +1 -1
  2. package/index.mjs +27 -28
  3. package/package.json +3 -3
package/README.md CHANGED
@@ -6,4 +6,4 @@ vcad's MCP server as a self-contained bundle (server + BRep kernel WASM).
6
6
  { "mcpServers": { "vcad": { "command": "npx", "args": ["-y", "@vcad/mcp"] } } }
7
7
  ```
8
8
 
9
- Built from ef69b02e150910dd0991d12581df3a5056928986 at 2026-10-22T11:56:53.248Z. Source: https://github.com/ecto/vcad
9
+ Built from 79aa8373cdef2225640f80911019344193c95bc7 at 2026-10-22T14:18:36.761Z. Source: https://github.com/ecto/vcad
package/index.mjs CHANGED
@@ -55772,6 +55772,7 @@ function engineArgs(toolName, args, doc) {
55772
55772
  if (toolName === "update" && out.node_id !== void 0) {
55773
55773
  out.node_id = nodeRefToStableId(doc, out.node_id);
55774
55774
  }
55775
+ if (out.hide_part_id !== void 0) out.hide_part_id = toStableId(doc, out.hide_part_id);
55775
55776
  if (toolName === "place") {
55776
55777
  for (const key3 of ["from", "to"]) {
55777
55778
  const ref = out[key3];
@@ -55970,7 +55971,6 @@ var init_registry_dispatch = __esm({
55970
55971
  "src/tools/registry-dispatch.ts"() {
55971
55972
  "use strict";
55972
55973
  init_dist3();
55973
- init_session2();
55974
55974
  init_session_core();
55975
55975
  init_part_ids2();
55976
55976
  init_dist();
@@ -56044,7 +56044,9 @@ var init_registry_dispatch = __esm({
56044
56044
  "polyline_tube",
56045
56045
  "place",
56046
56046
  // Reached via parts.ts (place_part handler), not registry dispatch.
56047
- "place_part"
56047
+ "place_part",
56048
+ // Reached via topopt.ts (topology_optimize result), not registry dispatch.
56049
+ "add_mesh_part"
56048
56050
  ]);
56049
56051
  }
56050
56052
  });
@@ -77444,27 +77446,23 @@ function topologyOptimizeTool(args, engine) {
77444
77446
  );
77445
77447
  }
77446
77448
  const partName = a.name ?? (sourceName ? `${sourceName} (optimized)` : "topopt");
77447
- const op = {
77448
- type: "ImportedMesh",
77449
- positions: Array.from(result.mesh.positions),
77450
- indices: Array.from(result.mesh.indices),
77451
- normals: result.mesh.normals ? Array.from(result.mesh.normals) : void 0,
77452
- source: "topology_optimize"
77453
- };
77454
- const existingIds = Object.keys(doc.nodes).map(Number);
77455
- const nodeId = (existingIds.length ? Math.max(...existingIds) : 0) + 1;
77456
- const node = { id: nodeId, name: partName, op };
77457
- doc.nodes[String(nodeId)] = node;
77458
- doc.roots.push({
77459
- root: nodeId,
77460
- material: a.material ?? sourceMaterial ?? "default"
77461
- });
77462
- if (a.part && sourceRootIndex >= 0 && a.hide_source !== false) {
77463
- doc.roots[sourceRootIndex] = {
77464
- ...doc.roots[sourceRootIndex],
77465
- visible: false
77466
- };
77467
- }
77449
+ const hide = a.part && sourceRootIndex >= 0 && a.hide_source !== false;
77450
+ const created = JSON.parse(
77451
+ runMutation(
77452
+ "add_mesh_part",
77453
+ {
77454
+ positions: Array.from(result.mesh.positions),
77455
+ indices: Array.from(result.mesh.indices),
77456
+ ...result.mesh.normals ? { normals: Array.from(result.mesh.normals) } : {},
77457
+ source: "topology_optimize",
77458
+ name: partName,
77459
+ material: a.material ?? sourceMaterial ?? "default",
77460
+ ...hide ? { hide_part_id: a.part } : {}
77461
+ },
77462
+ doc,
77463
+ documentId
77464
+ ).content[0].text
77465
+ );
77468
77466
  const history = result.complianceHistory.map(round5);
77469
77467
  return {
77470
77468
  content: [
@@ -77473,7 +77471,7 @@ function topologyOptimizeTool(args, engine) {
77473
77471
  text: JSON.stringify(
77474
77472
  {
77475
77473
  document_id: documentId,
77476
- part_id: partIdForNode(doc, nodeId),
77474
+ part_id: created.part_id,
77477
77475
  name: partName,
77478
77476
  iterations: result.iterations,
77479
77477
  converged: result.converged,
@@ -77504,6 +77502,7 @@ var init_topopt = __esm({
77504
77502
  init_session_core();
77505
77503
  init_tool_def();
77506
77504
  init_part_ids2();
77505
+ init_registry_dispatch();
77507
77506
  regionSchema = {
77508
77507
  type: "object",
77509
77508
  required: ["min", "max"],
@@ -87279,8 +87278,8 @@ var init_server3 = __esm({
87279
87278
  init_order_feed();
87280
87279
  init_animate();
87281
87280
  PKG_VERSION = (() => {
87282
- if ("0.10.0-main.136") {
87283
- return "0.10.0-main.136";
87281
+ if ("0.10.0-main.137") {
87282
+ return "0.10.0-main.137";
87284
87283
  }
87285
87284
  try {
87286
87285
  const req = createRequire2(import.meta.url);
@@ -87289,8 +87288,8 @@ var init_server3 = __esm({
87289
87288
  return "0.0.0";
87290
87289
  }
87291
87290
  })();
87292
- BUILD_SHA = "ef69b02e150910dd0991d12581df3a5056928986";
87293
- BUILD_TIME = "2026-10-22T11:56:53.248Z";
87291
+ BUILD_SHA = "79aa8373cdef2225640f80911019344193c95bc7";
87292
+ BUILD_TIME = "2026-10-22T14:18:36.761Z";
87294
87293
  SHORT_SHA = BUILD_SHA === "unknown" ? "unknown" : BUILD_SHA.slice(0, 7);
87295
87294
  VERSION_WITH_BUILD = SHORT_SHA === "unknown" ? PKG_VERSION : `${PKG_VERSION}+${SHORT_SHA}`;
87296
87295
  INSTANCE_ID = randomUUID7().slice(0, 8);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vcad/mcp",
3
- "version": "0.10.0-main.136",
3
+ "version": "0.10.0-main.137",
4
4
  "description": "vcad MCP server — parametric CAD + PCB design tools for AI agents (self-contained: bundled server + kernel WASM)",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -19,7 +19,7 @@
19
19
  },
20
20
  "homepage": "https://vcad.io",
21
21
  "vcadBuild": {
22
- "sha": "ef69b02e150910dd0991d12581df3a5056928986",
23
- "builtAt": "2026-10-22T11:56:53.248Z"
22
+ "sha": "79aa8373cdef2225640f80911019344193c95bc7",
23
+ "builtAt": "2026-10-22T14:18:36.761Z"
24
24
  }
25
25
  }