@vcad/mcp 0.10.0-main.126 → 0.10.0-main.127

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 +53 -66
  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 cf7237b3fa4de3ec9ddd2eccbd0f33b802ea1089 at 2026-10-21T14:05:09.525Z. Source: https://github.com/ecto/vcad
9
+ Built from 29cbe4343d120465c4b5eda7f7ccfc72d65a2171 at 2026-10-21T14:37:18.317Z. Source: https://github.com/ecto/vcad
package/index.mjs CHANGED
@@ -12220,6 +12220,8 @@ var init_dist = __esm({
12220
12220
  importStepBufferWithReport: wasmModule7.importStepBufferWithReport,
12221
12221
  documentToStepBuffer: wasmModule7.documentToStepBuffer,
12222
12222
  registerStepSource: wasmModule7.registerStepSource,
12223
+ stepImportDocument: wasmModule7.stepImportDocument,
12224
+ importStepMeshDocument: wasmModule7.importStepMeshDocument,
12223
12225
  stepSourceRegistered: wasmModule7.stepSourceRegistered,
12224
12226
  unregisterStepSource: wasmModule7.unregisterStepSource,
12225
12227
  inspectDocumentFaces: wasmModule7.inspectDocumentFaces,
@@ -12774,6 +12776,28 @@ var init_dist = __esm({
12774
12776
  summary: result.summary
12775
12777
  };
12776
12778
  }
12779
+ /**
12780
+ * Build the document for a B-rep STEP import: one lazy `step_import` root
12781
+ * per solid index of the file registered under `path`, named `partName`
12782
+ * (or `partName_N` for several), in `material` (`vcad_eval::step_doc`).
12783
+ */
12784
+ stepImportDocument(path, solidIndices, partName, material) {
12785
+ if (typeof this.kernel.stepImportDocument !== "function") {
12786
+ throw new Error("stepImportDocument is not available - rebuild the kernel WASM");
12787
+ }
12788
+ return JSON.parse(this.kernel.stepImportDocument(path, Uint32Array.from(solidIndices), partName, material));
12789
+ }
12790
+ /**
12791
+ * Tessellated STEP import straight to a document (one `ImportedMesh` root
12792
+ * per body), built in the kernel. Throws when the file has no geometry.
12793
+ */
12794
+ importStepMeshDocument(data, partName, material, source) {
12795
+ if (typeof this.kernel.importStepMeshDocument !== "function") {
12796
+ throw new Error("importStepMeshDocument is not available - rebuild the kernel WASM");
12797
+ }
12798
+ const r = this.kernel.importStepMeshDocument(new Uint8Array(data), partName, material, source);
12799
+ return { ...r, document: JSON.parse(r.document) };
12800
+ }
12777
12801
  /**
12778
12802
  * Register STEP file contents so `step_import` nodes resolve to B-rep.
12779
12803
  *
@@ -41460,6 +41484,18 @@ var init_CHANGELOG = __esm({
41460
41484
  "ai"
41461
41485
  ]
41462
41486
  },
41487
+ {
41488
+ id: "2026-10-21-agent-nested-create",
41489
+ version: "0.10.0",
41490
+ date: "2026-10-21",
41491
+ category: "fix",
41492
+ title: "Agent accepts nested create calls",
41493
+ summary: "The Agent's create tool now accepts the nested argument shape models naturally emit, and repeat requests reuse the endpoint's prompt cache.",
41494
+ features: [
41495
+ "desktop",
41496
+ "agent"
41497
+ ]
41498
+ },
41463
41499
  {
41464
41500
  id: "2026-10-20-vendor-verified-power-imu-footprints",
41465
41501
  version: "0.10.0",
@@ -81056,30 +81092,6 @@ function readStepInput(input) {
81056
81092
  }
81057
81093
  return { bytes: readFileSync7(filepath), diskPath: resolve5(filepath) };
81058
81094
  }
81059
- function defaultMaterials() {
81060
- return {
81061
- steel: {
81062
- name: "Steel",
81063
- color: [0.6, 0.6, 0.65],
81064
- metallic: 0.9,
81065
- roughness: 0.3,
81066
- density: 7850
81067
- },
81068
- aluminum: {
81069
- name: "Aluminum",
81070
- color: [0.8, 0.8, 0.85],
81071
- metallic: 0.9,
81072
- roughness: 0.2,
81073
- density: 2700
81074
- },
81075
- default: {
81076
- name: "Default",
81077
- color: [0.8, 0.8, 0.8],
81078
- metallic: 0,
81079
- roughness: 0.5
81080
- }
81081
- };
81082
- }
81083
81095
  function skippedFaceSummary(report, warnings) {
81084
81096
  const skipped = report.reduce((sum, s) => sum + s.skipped_faces.length, 0);
81085
81097
  if (skipped === 0) return {};
@@ -81108,36 +81120,18 @@ function importStep(input, engine) {
81108
81120
  /\.(step|stp)$/i.test(sourceLabel) ? sourceLabel.slice(-5) : ""
81109
81121
  );
81110
81122
  const partMaterial = material ?? "steel";
81111
- const doc = createDocument();
81112
- doc.materials = defaultMaterials();
81113
- const addRoot = (nodeId, nodeName, op) => {
81114
- doc.nodes[String(nodeId)] = { id: nodeId, name: nodeName, op };
81115
- doc.roots.push({ root: nodeId, material: partMaterial });
81116
- doc.part_materials[nodeName] = partMaterial;
81117
- };
81123
+ let doc;
81118
81124
  let summary;
81119
81125
  if (as_mesh) {
81120
- const { meshes, report, summary: importWarnings } = engine.importStepWithReport(arrayBuffer);
81121
- if (meshes.length === 0) {
81122
- throw new Error("No geometry found in STEP file");
81123
- }
81124
- meshes.forEach((mesh, i) => {
81125
- const op = {
81126
- type: "ImportedMesh",
81127
- positions: Array.from(mesh.positions),
81128
- indices: Array.from(mesh.indices),
81129
- normals: mesh.normals ? Array.from(mesh.normals) : void 0,
81130
- source: sourceLabel
81131
- };
81132
- addRoot(i + 1, meshes.length === 1 ? partName : `${partName}_${i + 1}`, op);
81133
- });
81126
+ const imported = engine.importStepMeshDocument(arrayBuffer, partName, partMaterial, sourceLabel);
81127
+ doc = imported.document;
81134
81128
  summary = {
81135
81129
  representation: "mesh",
81136
- bodies: meshes.length,
81137
- total_triangles: meshes.reduce((sum, m) => sum + m.indices.length / 3, 0),
81138
- total_vertices: meshes.reduce((sum, m) => sum + m.positions.length / 3, 0),
81130
+ bodies: imported.bodies,
81131
+ total_triangles: imported.triangles,
81132
+ total_vertices: imported.vertices,
81139
81133
  note: "Imported as triangle meshes: no analytic faces, and these parts cannot be exported to STEP. Drop `as_mesh` for a B-rep import.",
81140
- ...skippedFaceSummary(report, importWarnings)
81134
+ ...skippedFaceSummary(imported.report, imported.summary)
81141
81135
  };
81142
81136
  } else {
81143
81137
  const label = basename(sourceLabel).replace(/[^\w.-]/g, "_") || "import.step";
@@ -81151,18 +81145,12 @@ function importStep(input, engine) {
81151
81145
  if (registered.solids.length === 0) {
81152
81146
  throw new Error("No geometry found in STEP file");
81153
81147
  }
81154
- registered.solids.forEach((solid, i) => {
81155
- const op = {
81156
- type: "step_import",
81157
- path,
81158
- ...solid.index === 0 ? {} : { solid_index: solid.index }
81159
- };
81160
- addRoot(
81161
- i + 1,
81162
- registered.solids.length === 1 ? partName : `${partName}_${i + 1}`,
81163
- op
81164
- );
81165
- });
81148
+ doc = engine.stepImportDocument(
81149
+ path,
81150
+ registered.solids.map((solid) => solid.index),
81151
+ partName,
81152
+ partMaterial
81153
+ );
81166
81154
  const meshOnly = registered.solids.filter((s) => s.faces === 0);
81167
81155
  summary = {
81168
81156
  representation: "brep",
@@ -81228,7 +81216,6 @@ var MAX_STEP_BYTES, STEP_CACHE_DIR, importStepSchema, toolDefs46;
81228
81216
  var init_import = __esm({
81229
81217
  "src/tools/import.ts"() {
81230
81218
  "use strict";
81231
- init_dist2();
81232
81219
  init_safe_path();
81233
81220
  init_remote();
81234
81221
  init_artifact_store();
@@ -86915,8 +86902,8 @@ var init_server3 = __esm({
86915
86902
  init_order_feed();
86916
86903
  init_animate();
86917
86904
  PKG_VERSION = (() => {
86918
- if ("0.10.0-main.126") {
86919
- return "0.10.0-main.126";
86905
+ if ("0.10.0-main.127") {
86906
+ return "0.10.0-main.127";
86920
86907
  }
86921
86908
  try {
86922
86909
  const req = createRequire2(import.meta.url);
@@ -86925,8 +86912,8 @@ var init_server3 = __esm({
86925
86912
  return "0.0.0";
86926
86913
  }
86927
86914
  })();
86928
- BUILD_SHA = "cf7237b3fa4de3ec9ddd2eccbd0f33b802ea1089";
86929
- BUILD_TIME = "2026-10-21T14:05:09.525Z";
86915
+ BUILD_SHA = "29cbe4343d120465c4b5eda7f7ccfc72d65a2171";
86916
+ BUILD_TIME = "2026-10-21T14:37:18.317Z";
86930
86917
  SHORT_SHA = BUILD_SHA === "unknown" ? "unknown" : BUILD_SHA.slice(0, 7);
86931
86918
  VERSION_WITH_BUILD = SHORT_SHA === "unknown" ? PKG_VERSION : `${PKG_VERSION}+${SHORT_SHA}`;
86932
86919
  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.126",
3
+ "version": "0.10.0-main.127",
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": "cf7237b3fa4de3ec9ddd2eccbd0f33b802ea1089",
23
- "builtAt": "2026-10-21T14:05:09.525Z"
22
+ "sha": "29cbe4343d120465c4b5eda7f7ccfc72d65a2171",
23
+ "builtAt": "2026-10-21T14:37:18.317Z"
24
24
  }
25
25
  }