@vcad/mcp 0.10.0-main.129 → 0.10.0-main.131

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 +207 -4
  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 c0f41c513a664c5cad95f6b53a04977718e67e65 at 2026-10-21T15:14:39.035Z. Source: https://github.com/ecto/vcad
9
+ Built from 5ba01b5a98082b32c94a94415030e2581bf3288e at 2026-10-21T16:56:57.309Z. Source: https://github.com/ecto/vcad
package/index.mjs CHANGED
@@ -10867,6 +10867,173 @@ var init_delta = __esm({
10867
10867
  }
10868
10868
  });
10869
10869
 
10870
+ // ../engine/dist/engine-host.js
10871
+ function handleEngineRequest(host, req) {
10872
+ try {
10873
+ let envelope;
10874
+ let bytes;
10875
+ switch (req.op) {
10876
+ case "init":
10877
+ host.engine?.free();
10878
+ host.engine = req.replica !== void 0 && host.Engine.withReplica ? host.Engine.withReplica(req.replica) : new host.Engine();
10879
+ envelope = host.engine.stateEnvelope();
10880
+ break;
10881
+ case "load":
10882
+ host.engine?.free();
10883
+ host.engine = host.Engine.load(req.bytes);
10884
+ envelope = host.engine.stateEnvelope();
10885
+ break;
10886
+ default: {
10887
+ const engine2 = host.engine;
10888
+ if (!engine2)
10889
+ return { ok: false, message: "engine not initialized" };
10890
+ if (req.op === "apply")
10891
+ envelope = engine2.applyDelta(JSON.stringify(req.command));
10892
+ else if (req.op === "applyTool")
10893
+ envelope = engine2.applyToolDelta(req.tool, JSON.stringify(req.args));
10894
+ else if (req.op === "state")
10895
+ envelope = engine2.stateEnvelope();
10896
+ else
10897
+ bytes = engine2.save();
10898
+ }
10899
+ }
10900
+ const engine = host.engine;
10901
+ return {
10902
+ ok: true,
10903
+ envelope,
10904
+ bytes,
10905
+ hash: engine.stateHash(),
10906
+ canUndo: engine.can_undo(),
10907
+ canRedo: engine.can_redo()
10908
+ };
10909
+ } catch (e) {
10910
+ return { ok: false, message: e instanceof Error ? e.message : String(e) };
10911
+ }
10912
+ }
10913
+ function inProcessTransport(Engine2) {
10914
+ const host = { Engine: Engine2, engine: null };
10915
+ return {
10916
+ request: async (req) => handleEngineRequest(host, req),
10917
+ dispose: () => {
10918
+ host.engine?.free();
10919
+ host.engine = null;
10920
+ }
10921
+ };
10922
+ }
10923
+ function workerTransport(worker) {
10924
+ let next = 0;
10925
+ const pending2 = /* @__PURE__ */ new Map();
10926
+ worker.addEventListener("message", (e) => {
10927
+ const { id, response } = e.data;
10928
+ pending2.get(id)?.(response);
10929
+ pending2.delete(id);
10930
+ });
10931
+ return {
10932
+ request: (req) => new Promise((resolve7) => {
10933
+ const id = next++;
10934
+ pending2.set(id, resolve7);
10935
+ worker.postMessage({ id, req });
10936
+ }),
10937
+ dispose: () => worker.terminate()
10938
+ };
10939
+ }
10940
+ var EngineHostError, DocumentEngineClient;
10941
+ var init_engine_host = __esm({
10942
+ "../engine/dist/engine-host.js"() {
10943
+ "use strict";
10944
+ init_delta();
10945
+ EngineHostError = class extends Error {
10946
+ constructor(message) {
10947
+ super(message);
10948
+ this.name = "EngineHostError";
10949
+ }
10950
+ };
10951
+ DocumentEngineClient = class {
10952
+ transport;
10953
+ view = null;
10954
+ queue = Promise.resolve();
10955
+ flags = { hash: "", canUndo: false, canRedo: false };
10956
+ constructor(transport) {
10957
+ this.transport = transport;
10958
+ }
10959
+ /** The current view (null before `init`/`load`). */
10960
+ get state() {
10961
+ return this.view;
10962
+ }
10963
+ get stateHash() {
10964
+ return this.flags.hash;
10965
+ }
10966
+ get canUndo() {
10967
+ return this.flags.canUndo;
10968
+ }
10969
+ get canRedo() {
10970
+ return this.flags.canRedo;
10971
+ }
10972
+ /** Start an empty document. */
10973
+ init(replica) {
10974
+ return this.full({ op: "init", replica });
10975
+ }
10976
+ /** Restore a `save()` snapshot. */
10977
+ load(bytes) {
10978
+ return this.full({ op: "load", bytes });
10979
+ }
10980
+ /** Re-read the whole state (resynchronizes the view). */
10981
+ refresh() {
10982
+ return this.full({ op: "state" });
10983
+ }
10984
+ /** Apply a command; rejects with `EngineRefusal` when the engine refuses. */
10985
+ apply(command) {
10986
+ return this.delta({ op: "apply", command });
10987
+ }
10988
+ /** Lower and apply an AI tool call. */
10989
+ applyTool(tool, args) {
10990
+ return this.delta({ op: "applyTool", tool, args });
10991
+ }
10992
+ /** Snapshot the engine (document + history). */
10993
+ save() {
10994
+ return this.enqueue(async () => {
10995
+ const r = this.check(await this.transport.request({ op: "save" }));
10996
+ return r.bytes ?? new Uint8Array();
10997
+ });
10998
+ }
10999
+ dispose() {
11000
+ this.transport.dispose();
11001
+ this.view = null;
11002
+ }
11003
+ full(req) {
11004
+ return this.enqueue(async () => {
11005
+ const r = this.check(await this.transport.request(req));
11006
+ this.view = stateFromEnvelope(r.envelope);
11007
+ return this.view;
11008
+ });
11009
+ }
11010
+ delta(req) {
11011
+ return this.enqueue(async () => {
11012
+ const base = this.view;
11013
+ if (!base)
11014
+ throw new EngineHostError("engine not initialized");
11015
+ const r = this.check(await this.transport.request(req));
11016
+ const delta = parseDeltaEnvelope(r.envelope);
11017
+ const { state, changes } = applyEngineDelta(base, delta);
11018
+ this.view = state;
11019
+ return { state, changes, createdFeatureId: delta.createdFeatureId, warnings: delta.warnings };
11020
+ });
11021
+ }
11022
+ check(r) {
11023
+ if (!r.ok)
11024
+ throw new EngineHostError(r.message);
11025
+ this.flags = { hash: r.hash, canUndo: r.canUndo, canRedo: r.canRedo };
11026
+ return r;
11027
+ }
11028
+ enqueue(f) {
11029
+ const run = this.queue.then(f, f);
11030
+ this.queue = run.catch(() => void 0);
11031
+ return run;
11032
+ }
11033
+ };
11034
+ }
11035
+ });
11036
+
10870
11037
  // ../engine/dist/sequence.js
10871
11038
  function requireWasm2() {
10872
11039
  const mod = getKernelWasmSync();
@@ -12023,7 +12190,9 @@ __export(dist_exports, {
12023
12190
  DEFAULT_NESTING_PARAMS: () => DEFAULT_NESTING_PARAMS,
12024
12191
  DEFAULT_SHOP_PROFILE: () => DEFAULT_SHOP_PROFILE,
12025
12192
  DependencyGraph: () => DependencyGraph,
12193
+ DocumentEngineClient: () => DocumentEngineClient,
12026
12194
  Engine: () => Engine,
12195
+ EngineHostError: () => EngineHostError,
12027
12196
  EngineRefusal: () => EngineRefusal,
12028
12197
  ExpressionEvalError: () => EvalError,
12029
12198
  ExpressionParseError: () => ParseError,
@@ -12055,6 +12224,7 @@ __export(dist_exports, {
12055
12224
  computeRatsnest: () => computeRatsnest,
12056
12225
  connectorsFromPcb: () => connectorsFromPcb,
12057
12226
  createCircuitSim: () => createCircuitSim,
12227
+ createEngineWorker: () => createEngineWorker,
12058
12228
  critiqueRoute: () => critiqueRoute,
12059
12229
  decimateMeshGpu: () => decimateMeshGpu2,
12060
12230
  defaultParamsFor: () => defaultParamsFor,
@@ -12081,8 +12251,10 @@ __export(dist_exports, {
12081
12251
  getKernelWasmSync: () => getKernelWasmSync,
12082
12252
  getPcbDfmPack: () => getPcbDfmPack,
12083
12253
  getRayTracer: () => getRayTracer,
12254
+ handleEngineRequest: () => handleEngineRequest,
12084
12255
  hashCsgOp: () => hashCsgOp,
12085
12256
  homogenizeMaterial: () => homogenizeMaterial,
12257
+ inProcessTransport: () => inProcessTransport,
12086
12258
  initializeGpu: () => initializeGpu,
12087
12259
  initializeRayTracer: () => initializeRayTracer,
12088
12260
  inspectMolecule: () => inspectMolecule,
@@ -12150,8 +12322,12 @@ __export(dist_exports, {
12150
12322
  tryRunDrc: () => tryRunDrc,
12151
12323
  verifyReceipt: () => verifyReceipt,
12152
12324
  verifySubstitution: () => verifySubstitution,
12325
+ workerTransport: () => workerTransport,
12153
12326
  writeXyz: () => writeXyz
12154
12327
  });
12328
+ function createEngineWorker() {
12329
+ return new Worker(new URL("./engine-worker.js", import.meta.url), { type: "module" });
12330
+ }
12155
12331
  var SCENE_CACHE_MAX, Engine;
12156
12332
  var init_dist = __esm({
12157
12333
  "../engine/dist/index.js"() {
@@ -12168,6 +12344,7 @@ var init_dist = __esm({
12168
12344
  init_diff();
12169
12345
  init_solid_cache();
12170
12346
  init_delta();
12347
+ init_engine_host();
12171
12348
  init_mesh_cache();
12172
12349
  init_dependency_graph();
12173
12350
  init_evaluate();
@@ -41483,6 +41660,19 @@ var init_CHANGELOG = __esm({
41483
41660
  "render"
41484
41661
  ]
41485
41662
  },
41663
+ {
41664
+ id: "2026-10-21-photoreal-warm-studio",
41665
+ version: "0.10.0",
41666
+ date: "2026-10-21",
41667
+ category: "feat",
41668
+ title: "Warm studio lighting preset for photoreal renders",
41669
+ summary: "--lighting warm-studio adds a camera-relative warm key, cool fill and rim rig, with every light kept outside the frame.",
41670
+ features: [
41671
+ "photoreal",
41672
+ "render",
41673
+ "lighting"
41674
+ ]
41675
+ },
41486
41676
  {
41487
41677
  id: "2026-10-21-photoreal-focus-dist",
41488
41678
  version: "0.10.0",
@@ -41508,6 +41698,19 @@ var init_CHANGELOG = __esm({
41508
41698
  "mac"
41509
41699
  ]
41510
41700
  },
41701
+ {
41702
+ id: "2026-10-21-mac-sensitivity-panel",
41703
+ version: "0.10.0",
41704
+ date: "2026-10-21",
41705
+ category: "feat",
41706
+ title: "Parameter sensitivity in the Mac inspector",
41707
+ summary: "The Mac app's inspector shows how volume, mass and center of mass change per unit of each named parameter, using exact kernel derivatives.",
41708
+ features: [
41709
+ "desktop",
41710
+ "parameters",
41711
+ "differentiable"
41712
+ ]
41713
+ },
41511
41714
  {
41512
41715
  id: "2026-10-21-mac-open-vcode",
41513
41716
  version: "0.10.0",
@@ -86850,8 +87053,8 @@ var init_server3 = __esm({
86850
87053
  init_order_feed();
86851
87054
  init_animate();
86852
87055
  PKG_VERSION = (() => {
86853
- if ("0.10.0-main.129") {
86854
- return "0.10.0-main.129";
87056
+ if ("0.10.0-main.131") {
87057
+ return "0.10.0-main.131";
86855
87058
  }
86856
87059
  try {
86857
87060
  const req = createRequire2(import.meta.url);
@@ -86860,8 +87063,8 @@ var init_server3 = __esm({
86860
87063
  return "0.0.0";
86861
87064
  }
86862
87065
  })();
86863
- BUILD_SHA = "c0f41c513a664c5cad95f6b53a04977718e67e65";
86864
- BUILD_TIME = "2026-10-21T15:14:39.035Z";
87066
+ BUILD_SHA = "5ba01b5a98082b32c94a94415030e2581bf3288e";
87067
+ BUILD_TIME = "2026-10-21T16:56:57.309Z";
86865
87068
  SHORT_SHA = BUILD_SHA === "unknown" ? "unknown" : BUILD_SHA.slice(0, 7);
86866
87069
  VERSION_WITH_BUILD = SHORT_SHA === "unknown" ? PKG_VERSION : `${PKG_VERSION}+${SHORT_SHA}`;
86867
87070
  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.129",
3
+ "version": "0.10.0-main.131",
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": "c0f41c513a664c5cad95f6b53a04977718e67e65",
23
- "builtAt": "2026-10-21T15:14:39.035Z"
22
+ "sha": "5ba01b5a98082b32c94a94415030e2581bf3288e",
23
+ "builtAt": "2026-10-21T16:56:57.309Z"
24
24
  }
25
25
  }