@vcad/mcp 0.10.0-main.100 → 0.10.0-main.107

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
@@ -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 fa4b74e6a0f3daf8a17ee8ab575ba38d826443c7 at 2026-10-20T15:49:21.597Z. Source: https://github.com/ecto/vcad
9
+ Built from a463c0d111f8f432469d77dd4b9038fd370f6801 at 2026-10-20T21:08:32.781Z. Source: https://github.com/ecto/vcad
package/index.mjs CHANGED
@@ -5380,11 +5380,11 @@ function __wbg_get_imports() {
5380
5380
  return ret;
5381
5381
  },
5382
5382
  __wbindgen_generic_0000000000000004: function(arg0, arg1) {
5383
- const ret = makeMutClosure(arg0, arg1, wasm_bindgen_d8ba3021eaa32f54___convert__closures_____invoke___wasm_bindgen_d8ba3021eaa32f54___sys__JsNullable_wgpu_f894171a91484cea___backend__webgpu__webgpu_sys__gen_GpuError__GpuError___core_37ee0ce0c4cd57d5___result__Result_____wasm_bindgen_d8ba3021eaa32f54___JsError___true__443);
5383
+ const ret = makeMutClosure(arg0, arg1, wasm_bindgen_d8ba3021eaa32f54___convert__closures_____invoke___wasm_bindgen_d8ba3021eaa32f54___sys__JsNullable_wgpu_f894171a91484cea___backend__webgpu__webgpu_sys__gen_GpuError__GpuError___core_37ee0ce0c4cd57d5___result__Result_____wasm_bindgen_d8ba3021eaa32f54___JsError___true__447);
5384
5384
  return ret;
5385
5385
  },
5386
5386
  __wbindgen_generic_0000000000000005: function(arg0, arg1) {
5387
- const ret = makeMutClosure(arg0, arg1, wasm_bindgen_d8ba3021eaa32f54___convert__closures_____invoke___wasm_bindgen_d8ba3021eaa32f54___sys__JsNullable_wgpu_f894171a91484cea___backend__webgpu__webgpu_sys__gen_GpuError__GpuError___core_37ee0ce0c4cd57d5___result__Result_____wasm_bindgen_d8ba3021eaa32f54___JsError___true__444);
5387
+ const ret = makeMutClosure(arg0, arg1, wasm_bindgen_d8ba3021eaa32f54___convert__closures_____invoke___wasm_bindgen_d8ba3021eaa32f54___sys__JsNullable_wgpu_f894171a91484cea___backend__webgpu__webgpu_sys__gen_GpuError__GpuError___core_37ee0ce0c4cd57d5___result__Result_____wasm_bindgen_d8ba3021eaa32f54___JsError___true__448);
5388
5388
  return ret;
5389
5389
  },
5390
5390
  __wbindgen_generic_0000000000000006: function(arg0) {
@@ -5473,14 +5473,14 @@ function wasm_bindgen_d8ba3021eaa32f54___convert__closures_____invoke___wasm_bin
5473
5473
  throw takeFromExternrefTable0(ret[0]);
5474
5474
  }
5475
5475
  }
5476
- function wasm_bindgen_d8ba3021eaa32f54___convert__closures_____invoke___wasm_bindgen_d8ba3021eaa32f54___sys__JsNullable_wgpu_f894171a91484cea___backend__webgpu__webgpu_sys__gen_GpuError__GpuError___core_37ee0ce0c4cd57d5___result__Result_____wasm_bindgen_d8ba3021eaa32f54___JsError___true__443(arg0, arg1, arg2) {
5477
- const ret = wasm.wasm_bindgen_d8ba3021eaa32f54___convert__closures_____invoke___wasm_bindgen_d8ba3021eaa32f54___sys__JsNullable_wgpu_f894171a91484cea___backend__webgpu__webgpu_sys__gen_GpuError__GpuError___core_37ee0ce0c4cd57d5___result__Result_____wasm_bindgen_d8ba3021eaa32f54___JsError___true__443(arg0, arg1, arg2);
5476
+ function wasm_bindgen_d8ba3021eaa32f54___convert__closures_____invoke___wasm_bindgen_d8ba3021eaa32f54___sys__JsNullable_wgpu_f894171a91484cea___backend__webgpu__webgpu_sys__gen_GpuError__GpuError___core_37ee0ce0c4cd57d5___result__Result_____wasm_bindgen_d8ba3021eaa32f54___JsError___true__447(arg0, arg1, arg2) {
5477
+ const ret = wasm.wasm_bindgen_d8ba3021eaa32f54___convert__closures_____invoke___wasm_bindgen_d8ba3021eaa32f54___sys__JsNullable_wgpu_f894171a91484cea___backend__webgpu__webgpu_sys__gen_GpuError__GpuError___core_37ee0ce0c4cd57d5___result__Result_____wasm_bindgen_d8ba3021eaa32f54___JsError___true__447(arg0, arg1, arg2);
5478
5478
  if (ret[1]) {
5479
5479
  throw takeFromExternrefTable0(ret[0]);
5480
5480
  }
5481
5481
  }
5482
- function wasm_bindgen_d8ba3021eaa32f54___convert__closures_____invoke___wasm_bindgen_d8ba3021eaa32f54___sys__JsNullable_wgpu_f894171a91484cea___backend__webgpu__webgpu_sys__gen_GpuError__GpuError___core_37ee0ce0c4cd57d5___result__Result_____wasm_bindgen_d8ba3021eaa32f54___JsError___true__444(arg0, arg1, arg2) {
5483
- const ret = wasm.wasm_bindgen_d8ba3021eaa32f54___convert__closures_____invoke___wasm_bindgen_d8ba3021eaa32f54___sys__JsNullable_wgpu_f894171a91484cea___backend__webgpu__webgpu_sys__gen_GpuError__GpuError___core_37ee0ce0c4cd57d5___result__Result_____wasm_bindgen_d8ba3021eaa32f54___JsError___true__444(arg0, arg1, arg2);
5482
+ function wasm_bindgen_d8ba3021eaa32f54___convert__closures_____invoke___wasm_bindgen_d8ba3021eaa32f54___sys__JsNullable_wgpu_f894171a91484cea___backend__webgpu__webgpu_sys__gen_GpuError__GpuError___core_37ee0ce0c4cd57d5___result__Result_____wasm_bindgen_d8ba3021eaa32f54___JsError___true__448(arg0, arg1, arg2) {
5483
+ const ret = wasm.wasm_bindgen_d8ba3021eaa32f54___convert__closures_____invoke___wasm_bindgen_d8ba3021eaa32f54___sys__JsNullable_wgpu_f894171a91484cea___backend__webgpu__webgpu_sys__gen_GpuError__GpuError___core_37ee0ce0c4cd57d5___result__Result_____wasm_bindgen_d8ba3021eaa32f54___JsError___true__448(arg0, arg1, arg2);
5484
5484
  if (ret[1]) {
5485
5485
  throw takeFromExternrefTable0(ret[0]);
5486
5486
  }
@@ -8030,6 +8030,52 @@ var init_vcad_kernel_wasm = __esm({
8030
8030
  const ret = wasm.wasmdocumentengine_add_feature(this.__wbg_ptr, ptr0, len0);
8031
8031
  return ret;
8032
8032
  }
8033
+ /**
8034
+ * Apply a JSON `DocCommand` (see `vcad_app::command`). Returns the
8035
+ * shared JSON envelope: `{"ok":true,"result":{…}}` or
8036
+ * `{"ok":false,"error":{"kind":…,"message":…}}`. Unlike the per-method
8037
+ * calls, unknown ids and malformed input are reported, not ignored.
8038
+ * @param {string} command_json
8039
+ * @returns {string}
8040
+ */
8041
+ apply(command_json) {
8042
+ let deferred2_0;
8043
+ let deferred2_1;
8044
+ try {
8045
+ const ptr0 = passStringToWasm0(command_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
8046
+ const len0 = WASM_VECTOR_LEN;
8047
+ const ret = wasm.wasmdocumentengine_apply(this.__wbg_ptr, ptr0, len0);
8048
+ deferred2_0 = ret[0];
8049
+ deferred2_1 = ret[1];
8050
+ return getStringFromWasm0(ret[0], ret[1]);
8051
+ } finally {
8052
+ wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
8053
+ }
8054
+ }
8055
+ /**
8056
+ * Lower an AI tool call (`create`, `translate`, `linear_pattern`, …)
8057
+ * to a `DocCommand` in Rust and apply it. Same envelope as `apply`;
8058
+ * tools the engine can't lower yet report `{"kind":"unsupported"}`.
8059
+ * @param {string} tool
8060
+ * @param {string} args_json
8061
+ * @returns {string}
8062
+ */
8063
+ apply_tool(tool, args_json) {
8064
+ let deferred3_0;
8065
+ let deferred3_1;
8066
+ try {
8067
+ const ptr0 = passStringToWasm0(tool, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
8068
+ const len0 = WASM_VECTOR_LEN;
8069
+ const ptr1 = passStringToWasm0(args_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
8070
+ const len1 = WASM_VECTOR_LEN;
8071
+ const ret = wasm.wasmdocumentengine_apply_tool(this.__wbg_ptr, ptr0, len0, ptr1, len1);
8072
+ deferred3_0 = ret[0];
8073
+ deferred3_1 = ret[1];
8074
+ return getStringFromWasm0(ret[0], ret[1]);
8075
+ } finally {
8076
+ wasm.__wbindgen_free(deferred3_0, deferred3_1, 1);
8077
+ }
8078
+ }
8033
8079
  /**
8034
8080
  * Whether redo is available.
8035
8081
  * @returns {boolean}
@@ -8420,6 +8466,22 @@ var init_vcad_kernel_wasm = __esm({
8420
8466
  const ret = wasm.wasmdocumentengine_set_visible(this.__wbg_ptr, ptr0, len0, visible);
8421
8467
  return ret;
8422
8468
  }
8469
+ /**
8470
+ * Deterministic state fingerprint; matches `vcad_engine_state_hash`.
8471
+ * @returns {string}
8472
+ */
8473
+ stateHash() {
8474
+ let deferred1_0;
8475
+ let deferred1_1;
8476
+ try {
8477
+ const ret = wasm.wasmdocumentengine_stateHash(this.__wbg_ptr);
8478
+ deferred1_0 = ret[0];
8479
+ deferred1_1 = ret[1];
8480
+ return getStringFromWasm0(ret[0], ret[1]);
8481
+ } finally {
8482
+ wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
8483
+ }
8484
+ }
8423
8485
  /**
8424
8486
  * Undo the last action.
8425
8487
  * @returns {any}
@@ -8442,6 +8504,16 @@ var init_vcad_kernel_wasm = __esm({
8442
8504
  const ret = wasm.wasmdocumentengine_update_feature(this.__wbg_ptr, ptr0, len0, ptr1, len1);
8443
8505
  return ret;
8444
8506
  }
8507
+ /**
8508
+ * Create an empty engine with a fixed replica id (deterministic stable
8509
+ * ids — used by the parity harness and by hosts that persist replicas).
8510
+ * @param {number} replica_id
8511
+ * @returns {WasmDocumentEngine}
8512
+ */
8513
+ static withReplica(replica_id) {
8514
+ const ret = wasm.wasmdocumentengine_withReplica(replica_id);
8515
+ return _WasmDocumentEngine.__wrap(ret);
8516
+ }
8445
8517
  };
8446
8518
  if (Symbol.dispose) WasmDocumentEngine.prototype[Symbol.dispose] = WasmDocumentEngine.prototype.free;
8447
8519
  WasmKeybindings = class {
@@ -30736,6 +30808,40 @@ var init_esm2 = __esm({
30736
30808
  }
30737
30809
  });
30738
30810
 
30811
+ // ../core/dist/stores/engine-command.js
30812
+ function applyCommand(engine, command) {
30813
+ const envelope = JSON.parse(engine.apply(JSON.stringify(command)));
30814
+ if (!envelope.ok)
30815
+ throw new DocCommandError(command, envelope.error);
30816
+ for (const w of envelope.result.warnings ?? [])
30817
+ console.warn(`[vcad] ${w}`);
30818
+ return envelope.result;
30819
+ }
30820
+ function applyToolCall(engine, tool, args) {
30821
+ const envelope = JSON.parse(engine.apply_tool(tool, JSON.stringify(args)));
30822
+ if (envelope.ok) {
30823
+ for (const w of envelope.result.warnings ?? [])
30824
+ console.warn(`[vcad] ${w}`);
30825
+ }
30826
+ return envelope;
30827
+ }
30828
+ var DocCommandError;
30829
+ var init_engine_command = __esm({
30830
+ "../core/dist/stores/engine-command.js"() {
30831
+ "use strict";
30832
+ DocCommandError = class extends Error {
30833
+ command;
30834
+ error;
30835
+ constructor(command, error2) {
30836
+ super(`${command.type}: ${error2.message}`);
30837
+ this.command = command;
30838
+ this.error = error2;
30839
+ this.name = "DocCommandError";
30840
+ }
30841
+ };
30842
+ }
30843
+ });
30844
+
30739
30845
  // ../core/dist/sketch-constraint-persist.js
30740
30846
  function pointAnchor(node, ref) {
30741
30847
  const seg = ref.index;
@@ -31472,7 +31578,7 @@ function getOrCreateAnalysisStudiesFeature(state) {
31472
31578
  _analysisStudiesFeatureId = existing.id;
31473
31579
  return existing.id;
31474
31580
  }
31475
- const result = engine.create_feature("analysis-studies", "{}");
31581
+ const result = applyCommand(engine, { type: "create_feature", kind: "analysis-studies" });
31476
31582
  if (result.createdFeatureId) {
31477
31583
  _analysisStudiesFeatureId = result.createdFeatureId;
31478
31584
  return result.createdFeatureId;
@@ -31490,7 +31596,7 @@ function getOrCreateSceneFeature(state) {
31490
31596
  _sceneSettingsFeatureId = existing.id;
31491
31597
  return existing.id;
31492
31598
  }
31493
- const result = engine.create_feature("scene-settings", "{}");
31599
+ const result = applyCommand(engine, { type: "create_feature", kind: "scene-settings" });
31494
31600
  if (result.createdFeatureId) {
31495
31601
  _sceneSettingsFeatureId = result.createdFeatureId;
31496
31602
  return result.createdFeatureId;
@@ -31508,7 +31614,7 @@ function getOrCreateDrawingFeature(state) {
31508
31614
  _drawingSettingsFeatureId = existing.id;
31509
31615
  return existing.id;
31510
31616
  }
31511
- const result = engine.create_feature("drawing-settings", "{}");
31617
+ const result = applyCommand(engine, { type: "create_feature", kind: "drawing-settings" });
31512
31618
  if (result.createdFeatureId) {
31513
31619
  _drawingSettingsFeatureId = result.createdFeatureId;
31514
31620
  return result.createdFeatureId;
@@ -31526,7 +31632,7 @@ function getOrCreateConstraintsFeature(state) {
31526
31632
  _constraintsFeatureId = existing.id;
31527
31633
  return existing.id;
31528
31634
  }
31529
- const result = engine.create_feature("design-constraints", "{}");
31635
+ const result = applyCommand(engine, { type: "create_feature", kind: "design-constraints" });
31530
31636
  if (result.createdFeatureId) {
31531
31637
  _constraintsFeatureId = result.createdFeatureId;
31532
31638
  return result.createdFeatureId;
@@ -31551,7 +31657,7 @@ function getOrCreateSchematicFeature(state) {
31551
31657
  _schematicFeatureId = existing.id;
31552
31658
  return existing.id;
31553
31659
  }
31554
- const result = engine.create_feature("schematic", "{}");
31660
+ const result = applyCommand(engine, { type: "create_feature", kind: "schematic" });
31555
31661
  if (result.createdFeatureId) {
31556
31662
  _schematicFeatureId = result.createdFeatureId;
31557
31663
  return result.createdFeatureId;
@@ -31587,7 +31693,7 @@ function addPcbToDocument(get, set, pcbBoard, boardName2) {
31587
31693
  board: crdtStr(JSON.stringify(pcbBoard)),
31588
31694
  material: crdtStr("__pcb_fr4__")
31589
31695
  };
31590
- const result = engine.create_feature("pcb-board", JSON.stringify(params));
31696
+ const result = applyCommand(engine, { type: "create_feature", kind: "pcb-board", params });
31591
31697
  set({ ...applyLegacyResult(result), isDirty: true });
31592
31698
  const pcbPart = result.parts.find((p) => p.kind === "pcb-board");
31593
31699
  return pcbPart ? pcbPart.boardNodeId : 0;
@@ -31598,6 +31704,7 @@ var init_document_store = __esm({
31598
31704
  "use strict";
31599
31705
  init_esm2();
31600
31706
  init_wasm_singleton2();
31707
+ init_engine_command();
31601
31708
  init_sketch_constraint_persist();
31602
31709
  init_dist2();
31603
31710
  init_dist2();
@@ -31703,7 +31810,7 @@ var init_document_store = __esm({
31703
31810
  sphere: { type: "Sphere", radius: 10, segments: 32 }
31704
31811
  };
31705
31812
  try {
31706
- const result = engine.add_feature(JSON.stringify(defaults[kind]));
31813
+ const result = applyCommand(engine, { type: "add_feature", feature: defaults[kind] });
31707
31814
  set(applyApiResult(result));
31708
31815
  return result.createdFeatureId ?? "";
31709
31816
  } catch (e) {
@@ -31718,12 +31825,12 @@ var init_document_store = __esm({
31718
31825
  return "";
31719
31826
  }
31720
31827
  try {
31721
- const result = engine.add_feature(JSON.stringify({
31828
+ const result = applyCommand(engine, { type: "add_feature", feature: {
31722
31829
  type: "PartInstance",
31723
31830
  path,
31724
31831
  version: version2,
31725
31832
  params_json: JSON.stringify(params)
31726
- }));
31833
+ } });
31727
31834
  set(applyApiResult(result));
31728
31835
  return result.createdFeatureId ?? "";
31729
31836
  } catch (e) {
@@ -31733,22 +31840,22 @@ var init_document_store = __esm({
31733
31840
  },
31734
31841
  removePart: (partId) => {
31735
31842
  const engine = get()._crdtEngine;
31736
- const result = engine.delete_feature_by_id(partId);
31843
+ const result = applyCommand(engine, { type: "delete_feature", id: partId });
31737
31844
  set(applyApiResult(result));
31738
31845
  },
31739
31846
  setTranslation: (partId, offset) => {
31740
31847
  const engine = get()._crdtEngine;
31741
- const result = engine.set_translation(partId, offset.x, offset.y, offset.z);
31848
+ const result = applyCommand(engine, { type: "set_translation", id: partId, offset: [offset.x, offset.y, offset.z] });
31742
31849
  set(applyApiResult(result));
31743
31850
  },
31744
31851
  setRotation: (partId, angles) => {
31745
31852
  const engine = get()._crdtEngine;
31746
- const result = engine.set_rotation(partId, angles.x, angles.y, angles.z);
31853
+ const result = applyCommand(engine, { type: "set_rotation", id: partId, angles: [angles.x, angles.y, angles.z] });
31747
31854
  set(applyApiResult(result));
31748
31855
  },
31749
31856
  setScale: (partId, factor) => {
31750
31857
  const engine = get()._crdtEngine;
31751
- const result = engine.set_scale(partId, factor.x, factor.y, factor.z);
31858
+ const result = applyCommand(engine, { type: "set_scale", id: partId, factor: [factor.x, factor.y, factor.z] });
31752
31859
  set(applyApiResult(result));
31753
31860
  },
31754
31861
  updatePrimitiveOp: (partId, op) => {
@@ -31761,25 +31868,25 @@ var init_document_store = __esm({
31761
31868
  let lastResult;
31762
31869
  if (o.type === "Cube" && "size" in o) {
31763
31870
  const size = o.size;
31764
- engine.set_param(partId, "size_x", JSON.stringify(crdtF64(size.x)));
31765
- engine.set_param(partId, "size_y", JSON.stringify(crdtF64(size.y)));
31766
- lastResult = engine.set_param(partId, "size_z", JSON.stringify(crdtF64(size.z)));
31871
+ applyCommand(engine, { type: "set_param", id: partId, key: "size_x", value: crdtF64(size.x) });
31872
+ applyCommand(engine, { type: "set_param", id: partId, key: "size_y", value: crdtF64(size.y) });
31873
+ lastResult = applyCommand(engine, { type: "set_param", id: partId, key: "size_z", value: crdtF64(size.z) });
31767
31874
  } else if (o.type === "Cylinder" && "radius" in o) {
31768
- engine.set_param(partId, "radius", JSON.stringify(crdtF64(o.radius)));
31769
- engine.set_param(partId, "height", JSON.stringify(crdtF64(o.height)));
31770
- lastResult = engine.set_param(partId, "segments", JSON.stringify(crdtF64(o.segments)));
31875
+ applyCommand(engine, { type: "set_param", id: partId, key: "radius", value: crdtF64(o.radius) });
31876
+ applyCommand(engine, { type: "set_param", id: partId, key: "height", value: crdtF64(o.height) });
31877
+ lastResult = applyCommand(engine, { type: "set_param", id: partId, key: "segments", value: crdtF64(o.segments) });
31771
31878
  } else if (o.type === "Sphere" && "radius" in o) {
31772
- engine.set_param(partId, "radius", JSON.stringify(crdtF64(o.radius)));
31773
- lastResult = engine.set_param(partId, "segments", JSON.stringify(crdtF64(o.segments)));
31879
+ applyCommand(engine, { type: "set_param", id: partId, key: "radius", value: crdtF64(o.radius) });
31880
+ lastResult = applyCommand(engine, { type: "set_param", id: partId, key: "segments", value: crdtF64(o.segments) });
31774
31881
  } else if (o.type === "Cone" && "radius_bottom" in o) {
31775
- engine.set_param(partId, "radius_bottom", JSON.stringify(crdtF64(o.radius_bottom)));
31776
- engine.set_param(partId, "radius_top", JSON.stringify(crdtF64(o.radius_top)));
31777
- engine.set_param(partId, "height", JSON.stringify(crdtF64(o.height)));
31778
- lastResult = engine.set_param(partId, "segments", JSON.stringify(crdtF64(o.segments)));
31882
+ applyCommand(engine, { type: "set_param", id: partId, key: "radius_bottom", value: crdtF64(o.radius_bottom) });
31883
+ applyCommand(engine, { type: "set_param", id: partId, key: "radius_top", value: crdtF64(o.radius_top) });
31884
+ applyCommand(engine, { type: "set_param", id: partId, key: "height", value: crdtF64(o.height) });
31885
+ lastResult = applyCommand(engine, { type: "set_param", id: partId, key: "segments", value: crdtF64(o.segments) });
31779
31886
  } else if (o.type === "Torus" && "major_radius" in o) {
31780
- engine.set_param(partId, "major_radius", JSON.stringify(crdtF64(o.major_radius)));
31781
- engine.set_param(partId, "minor_radius", JSON.stringify(crdtF64(o.minor_radius)));
31782
- lastResult = engine.set_param(partId, "segments", JSON.stringify(crdtF64(o.segments)));
31887
+ applyCommand(engine, { type: "set_param", id: partId, key: "major_radius", value: crdtF64(o.major_radius) });
31888
+ applyCommand(engine, { type: "set_param", id: partId, key: "minor_radius", value: crdtF64(o.minor_radius) });
31889
+ lastResult = applyCommand(engine, { type: "set_param", id: partId, key: "segments", value: crdtF64(o.segments) });
31783
31890
  }
31784
31891
  if (lastResult) {
31785
31892
  set(applyLegacyResult(lastResult));
@@ -31789,25 +31896,25 @@ var init_document_store = __esm({
31789
31896
  const engine = get()._crdtEngine;
31790
31897
  let lastResult;
31791
31898
  if (updates.twist_angle !== void 0) {
31792
- lastResult = engine.set_param(partId, "twist_angle", JSON.stringify(crdtF64(updates.twist_angle)));
31899
+ lastResult = applyCommand(engine, { type: "set_param", id: partId, key: "twist_angle", value: crdtF64(updates.twist_angle) });
31793
31900
  }
31794
31901
  if (updates.scale_start !== void 0) {
31795
- lastResult = engine.set_param(partId, "scale_start", JSON.stringify(crdtF64(updates.scale_start)));
31902
+ lastResult = applyCommand(engine, { type: "set_param", id: partId, key: "scale_start", value: crdtF64(updates.scale_start) });
31796
31903
  }
31797
31904
  if (updates.scale_end !== void 0) {
31798
- lastResult = engine.set_param(partId, "scale_end", JSON.stringify(crdtF64(updates.scale_end)));
31905
+ lastResult = applyCommand(engine, { type: "set_param", id: partId, key: "scale_end", value: crdtF64(updates.scale_end) });
31799
31906
  }
31800
31907
  if (updates.path !== void 0) {
31801
- lastResult = engine.set_param(partId, "path", JSON.stringify(crdtStr(JSON.stringify(updates.path))));
31908
+ lastResult = applyCommand(engine, { type: "set_param", id: partId, key: "path", value: crdtStr(JSON.stringify(updates.path)) });
31802
31909
  }
31803
31910
  if (updates.orientation !== void 0) {
31804
- lastResult = engine.set_param(partId, "orientation", JSON.stringify(crdtF64(updates.orientation)));
31911
+ lastResult = applyCommand(engine, { type: "set_param", id: partId, key: "orientation", value: crdtF64(updates.orientation) });
31805
31912
  }
31806
31913
  if (updates.path_segments !== void 0) {
31807
- lastResult = engine.set_param(partId, "path_segments", JSON.stringify(crdtF64(updates.path_segments)));
31914
+ lastResult = applyCommand(engine, { type: "set_param", id: partId, key: "path_segments", value: crdtF64(updates.path_segments) });
31808
31915
  }
31809
31916
  if (updates.arc_segments !== void 0) {
31810
- lastResult = engine.set_param(partId, "arc_segments", JSON.stringify(crdtF64(updates.arc_segments)));
31917
+ lastResult = applyCommand(engine, { type: "set_param", id: partId, key: "arc_segments", value: crdtF64(updates.arc_segments) });
31811
31918
  }
31812
31919
  if (lastResult) {
31813
31920
  set(applyLegacyResult(lastResult));
@@ -31815,22 +31922,22 @@ var init_document_store = __esm({
31815
31922
  },
31816
31923
  setFeatureParam: (partId, key3, value) => {
31817
31924
  const engine = get()._crdtEngine;
31818
- const result = engine.set_param(partId, key3, JSON.stringify(value));
31925
+ const result = applyCommand(engine, { type: "set_param", id: partId, key: key3, value });
31819
31926
  set(applyLegacyResult(result));
31820
31927
  },
31821
31928
  updateBooleanType: (partId, newType) => {
31822
31929
  const engine = get()._crdtEngine;
31823
- const result = engine.set_param(partId, "boolean_type", JSON.stringify(crdtStr(newType)));
31930
+ const result = applyCommand(engine, { type: "set_param", id: partId, key: "boolean_type", value: crdtStr(newType) });
31824
31931
  set(applyLegacyResult(result));
31825
31932
  },
31826
31933
  applyBoolean: (type, partIdA, partIdB) => {
31827
31934
  const engine = get()._crdtEngine;
31828
- const result = engine.add_feature(JSON.stringify({
31935
+ const result = applyCommand(engine, { type: "add_feature", feature: {
31829
31936
  type: "Boolean",
31830
31937
  boolean_type: type,
31831
31938
  input_a: partIdA,
31832
31939
  input_b: partIdB
31833
- }));
31940
+ } });
31834
31941
  set(applyApiResult(result));
31835
31942
  return result.createdFeatureId ?? null;
31836
31943
  },
@@ -31855,7 +31962,7 @@ var init_document_store = __esm({
31855
31962
  if (existingName && "String" in existingName) {
31856
31963
  params.name = { String: existingName.String + " copy" };
31857
31964
  }
31858
- lastResult = engine.create_feature(feature.kind, JSON.stringify(params));
31965
+ lastResult = applyCommand(engine, { type: "create_feature", kind: feature.kind, params });
31859
31966
  if (lastResult.createdFeatureId)
31860
31967
  newIds.push(lastResult.createdFeatureId);
31861
31968
  }
@@ -31942,7 +32049,7 @@ var init_document_store = __esm({
31942
32049
  }
31943
32050
  }
31944
32051
  const irJson = JSON.stringify(generatedDoc);
31945
- const result = engine.import_ir(irJson);
32052
+ const result = applyCommand(engine, { type: "import_ir", document: JSON.parse(irJson) });
31946
32053
  set({ ...applyLegacyResult(result), isDirty: true });
31947
32054
  if (generatedDoc.parameters || generatedDoc.bindings) {
31948
32055
  const store = useParametersStore.getState();
@@ -31979,7 +32086,7 @@ var init_document_store = __esm({
31979
32086
  if (options?.scale_end != null)
31980
32087
  input.scale_end = options.scale_end;
31981
32088
  try {
31982
- const result = engine.add_feature(JSON.stringify(input));
32089
+ const result = applyCommand(engine, { type: "add_feature", feature: input });
31983
32090
  set(applyApiResult(result));
31984
32091
  return result.createdFeatureId ?? null;
31985
32092
  } catch (e) {
@@ -31991,13 +32098,13 @@ var init_document_store = __esm({
31991
32098
  if (segments.length === 0)
31992
32099
  return null;
31993
32100
  const engine = get()._crdtEngine;
31994
- const result = engine.add_feature(JSON.stringify({
32101
+ const result = applyCommand(engine, { type: "add_feature", feature: {
31995
32102
  type: "Revolve",
31996
32103
  sketch: sketchJson(segments, plane, origin),
31997
32104
  axis_origin: [axisOrigin.x, axisOrigin.y, axisOrigin.z],
31998
32105
  axis_dir: [axisDir.x, axisDir.y, axisDir.z],
31999
32106
  angle_deg: angleDeg
32000
- }));
32107
+ } });
32001
32108
  set(applyApiResult(result));
32002
32109
  return result.createdFeatureId ?? null;
32003
32110
  },
@@ -32016,7 +32123,7 @@ var init_document_store = __esm({
32016
32123
  input.scale_start = options.scale_start;
32017
32124
  if (options.scale_end != null)
32018
32125
  input.scale_end = options.scale_end;
32019
- const result = engine.add_feature(JSON.stringify(input));
32126
+ const result = applyCommand(engine, { type: "add_feature", feature: input });
32020
32127
  set(applyApiResult(result));
32021
32128
  return result.createdFeatureId ?? null;
32022
32129
  },
@@ -32031,7 +32138,7 @@ var init_document_store = __esm({
32031
32138
  };
32032
32139
  if (options.closed != null)
32033
32140
  input.closed = options.closed;
32034
- const result = engine.add_feature(JSON.stringify(input));
32141
+ const result = applyCommand(engine, { type: "add_feature", feature: input });
32035
32142
  set(applyApiResult(result));
32036
32143
  return result.createdFeatureId ?? null;
32037
32144
  },
@@ -32046,7 +32153,7 @@ var init_document_store = __esm({
32046
32153
  input.normals_json = JSON.stringify(Array.from(normals));
32047
32154
  if (source)
32048
32155
  input.source = source;
32049
- const result = engine.add_feature(JSON.stringify(input));
32156
+ const result = applyCommand(engine, { type: "add_feature", feature: input });
32050
32157
  set(applyApiResult(result));
32051
32158
  return result.createdFeatureId ?? "";
32052
32159
  },
@@ -32059,7 +32166,7 @@ var init_document_store = __esm({
32059
32166
  };
32060
32167
  if (source)
32061
32168
  params.source = crdtStr(source);
32062
- const result = engine.create_feature("embroidery-pattern", JSON.stringify(params));
32169
+ const result = applyCommand(engine, { type: "create_feature", kind: "embroidery-pattern", params });
32063
32170
  set(applyLegacyResult(result));
32064
32171
  return result.createdFeatureId ?? "";
32065
32172
  },
@@ -32107,7 +32214,7 @@ var init_document_store = __esm({
32107
32214
  const d = structuredClone(design);
32108
32215
  if (d.threads[threadIdx])
32109
32216
  d.threads[threadIdx].color = color;
32110
- const result = engine.set_param(part.id, "design", JSON.stringify(crdtStr(JSON.stringify(d))));
32217
+ const result = applyCommand(engine, { type: "set_param", id: part.id, key: "design", value: crdtStr(JSON.stringify(d)) });
32111
32218
  set(applyLegacyResult(result));
32112
32219
  },
32113
32220
  setThreadName: (nodeId, threadIdx, name) => {
@@ -32122,7 +32229,7 @@ var init_document_store = __esm({
32122
32229
  const d = structuredClone(design);
32123
32230
  if (d.threads[threadIdx])
32124
32231
  d.threads[threadIdx].name = name;
32125
- const result = engine.set_param(part.id, "design", JSON.stringify(crdtStr(JSON.stringify(d))));
32232
+ const result = applyCommand(engine, { type: "set_param", id: part.id, key: "design", value: crdtStr(JSON.stringify(d)) });
32126
32233
  set(applyLegacyResult(result));
32127
32234
  },
32128
32235
  setStitchGroupFillParams: (nodeId, groupIdx, params) => {
@@ -32139,7 +32246,7 @@ var init_document_store = __esm({
32139
32246
  const group = d.stitch_groups[groupIdx];
32140
32247
  group.fill_params = { ...group.fill_params ?? DEFAULT_FILL_PARAMS, ...params };
32141
32248
  }
32142
- const result = engine.set_param(part.id, "design", JSON.stringify(crdtStr(JSON.stringify(d))));
32249
+ const result = applyCommand(engine, { type: "set_param", id: part.id, key: "design", value: crdtStr(JSON.stringify(d)) });
32143
32250
  set(applyLegacyResult(result));
32144
32251
  },
32145
32252
  optimizeJumpStitches: (nodeId) => {
@@ -32185,36 +32292,36 @@ var init_document_store = __esm({
32185
32292
  }
32186
32293
  }
32187
32294
  d.stitch_groups = ordered;
32188
- const result = engine.set_param(part.id, "design", JSON.stringify(crdtStr(JSON.stringify(d))));
32295
+ const result = applyCommand(engine, { type: "set_param", id: part.id, key: "design", value: crdtStr(JSON.stringify(d)) });
32189
32296
  set(applyLegacyResult(result));
32190
32297
  },
32191
32298
  addFillet: (partId, radius) => {
32192
32299
  const engine = get()._crdtEngine;
32193
- const result = engine.add_feature(JSON.stringify({
32300
+ const result = applyCommand(engine, { type: "add_feature", feature: {
32194
32301
  type: "Fillet",
32195
32302
  input: partId,
32196
32303
  radius
32197
- }));
32304
+ } });
32198
32305
  set(applyApiResult(result));
32199
32306
  return result.createdFeatureId ?? null;
32200
32307
  },
32201
32308
  addChamfer: (partId, distance) => {
32202
32309
  const engine = get()._crdtEngine;
32203
- const result = engine.add_feature(JSON.stringify({
32310
+ const result = applyCommand(engine, { type: "add_feature", feature: {
32204
32311
  type: "Chamfer",
32205
32312
  input: partId,
32206
32313
  distance
32207
- }));
32314
+ } });
32208
32315
  set(applyApiResult(result));
32209
32316
  return result.createdFeatureId ?? null;
32210
32317
  },
32211
32318
  addShell: (partId, thickness) => {
32212
32319
  const engine = get()._crdtEngine;
32213
- const result = engine.add_feature(JSON.stringify({
32320
+ const result = applyCommand(engine, { type: "add_feature", feature: {
32214
32321
  type: "Shell",
32215
32322
  input: partId,
32216
32323
  thickness
32217
- }));
32324
+ } });
32218
32325
  set(applyApiResult(result));
32219
32326
  return result.createdFeatureId ?? null;
32220
32327
  },
@@ -32304,36 +32411,36 @@ var init_document_store = __esm({
32304
32411
  },
32305
32412
  addLinearPattern: (partId, direction, count, spacing) => {
32306
32413
  const engine = get()._crdtEngine;
32307
- const result = engine.add_feature(JSON.stringify({
32414
+ const result = applyCommand(engine, { type: "add_feature", feature: {
32308
32415
  type: "LinearPattern",
32309
32416
  input: partId,
32310
32417
  direction: [direction.x, direction.y, direction.z],
32311
32418
  count,
32312
32419
  spacing
32313
- }));
32420
+ } });
32314
32421
  set(applyApiResult(result));
32315
32422
  return result.createdFeatureId ?? null;
32316
32423
  },
32317
32424
  addCircularPattern: (partId, axisOrigin, axisDir, count, angleDeg) => {
32318
32425
  const engine = get()._crdtEngine;
32319
- const result = engine.add_feature(JSON.stringify({
32426
+ const result = applyCommand(engine, { type: "add_feature", feature: {
32320
32427
  type: "CircularPattern",
32321
32428
  input: partId,
32322
32429
  axis_origin: [axisOrigin.x, axisOrigin.y, axisOrigin.z],
32323
32430
  axis_dir: [axisDir.x, axisDir.y, axisDir.z],
32324
32431
  count,
32325
32432
  angle_deg: angleDeg
32326
- }));
32433
+ } });
32327
32434
  set(applyApiResult(result));
32328
32435
  return result.createdFeatureId ?? null;
32329
32436
  },
32330
32437
  addMirror: (partId, plane) => {
32331
32438
  const engine = get()._crdtEngine;
32332
- const result = engine.add_feature(JSON.stringify({
32439
+ const result = applyCommand(engine, { type: "add_feature", feature: {
32333
32440
  type: "Mirror",
32334
32441
  input: partId,
32335
32442
  plane
32336
- }));
32443
+ } });
32337
32444
  set(applyApiResult(result));
32338
32445
  return result.createdFeatureId ?? null;
32339
32446
  },
@@ -32354,31 +32461,31 @@ var init_document_store = __esm({
32354
32461
  input.letter_spacing = letterSpacing;
32355
32462
  if (lineSpacing !== void 0)
32356
32463
  input.line_spacing = lineSpacing;
32357
- const result = engine.add_feature(JSON.stringify(input));
32464
+ const result = applyCommand(engine, { type: "add_feature", feature: input });
32358
32465
  set(applyApiResult(result));
32359
32466
  return result.createdFeatureId ?? null;
32360
32467
  },
32361
32468
  setPartMaterial: (partId, materialKey) => {
32362
32469
  const engine = get()._crdtEngine;
32363
- const result = engine.set_material(partId, materialKey);
32470
+ const result = applyCommand(engine, { type: "set_material", id: partId, material: materialKey });
32364
32471
  set(applyApiResult(result));
32365
32472
  },
32366
32473
  renamePart: (partId, name) => {
32367
32474
  const engine = get()._crdtEngine;
32368
- const result = engine.rename_feature(partId, name);
32475
+ const result = applyCommand(engine, { type: "rename", id: partId, name });
32369
32476
  set(applyApiResult(result));
32370
32477
  },
32371
32478
  undo: () => {
32372
32479
  const engine = get()._crdtEngine;
32373
32480
  if (engine.can_undo()) {
32374
- const result = engine.undo();
32481
+ const result = applyCommand(engine, { type: "undo" });
32375
32482
  set(applyLegacyResult(result));
32376
32483
  }
32377
32484
  },
32378
32485
  redo: () => {
32379
32486
  const engine = get()._crdtEngine;
32380
32487
  if (engine.can_redo()) {
32381
- const result = engine.redo();
32488
+ const result = applyCommand(engine, { type: "redo" });
32382
32489
  set(applyLegacyResult(result));
32383
32490
  }
32384
32491
  },
@@ -32396,17 +32503,17 @@ var init_document_store = __esm({
32396
32503
  // Assembly operations
32397
32504
  setInstanceTransform: (instanceId, transform2) => {
32398
32505
  const engine = get()._crdtEngine;
32399
- const result = engine.set_param(instanceId, "transform", JSON.stringify(crdtStr(JSON.stringify(transform2))));
32506
+ const result = applyCommand(engine, { type: "set_param", id: instanceId, key: "transform", value: crdtStr(JSON.stringify(transform2)) });
32400
32507
  set(applyLegacyResult(result));
32401
32508
  },
32402
32509
  setInstanceMaterial: (instanceId, materialKey) => {
32403
32510
  const engine = get()._crdtEngine;
32404
- const result = engine.set_param(instanceId, "material", JSON.stringify(crdtStr(materialKey)));
32511
+ const result = applyCommand(engine, { type: "set_param", id: instanceId, key: "material", value: crdtStr(materialKey) });
32405
32512
  set(applyLegacyResult(result));
32406
32513
  },
32407
32514
  setJointState: (jointId, jointState) => {
32408
32515
  const engine = get()._crdtEngine;
32409
- const result = engine.set_joint_state(jointId, jointState);
32516
+ const result = applyCommand(engine, { type: "set_joint_state", id: jointId, state: jointState });
32410
32517
  set(applyApiResult(result));
32411
32518
  },
32412
32519
  createPartDef: (partId, name) => {
@@ -32417,7 +32524,7 @@ var init_document_store = __esm({
32417
32524
  };
32418
32525
  if (name)
32419
32526
  input.name = name;
32420
- const result = engine.add_feature(JSON.stringify(input));
32527
+ const result = applyCommand(engine, { type: "add_feature", feature: input });
32421
32528
  set(applyApiResult(result));
32422
32529
  return result.createdFeatureId ?? null;
32423
32530
  },
@@ -32431,7 +32538,7 @@ var init_document_store = __esm({
32431
32538
  input.name = name;
32432
32539
  if (transform2)
32433
32540
  input.transform = JSON.stringify(transform2);
32434
- const result = engine.add_feature(JSON.stringify(input));
32541
+ const result = applyCommand(engine, { type: "add_feature", feature: input });
32435
32542
  set(applyApiResult(result));
32436
32543
  return result.createdFeatureId ?? "";
32437
32544
  },
@@ -32453,7 +32560,7 @@ var init_document_store = __esm({
32453
32560
  const axis = jk.axis;
32454
32561
  input.axis = [axis.x, axis.y, axis.z];
32455
32562
  }
32456
- const result = engine.add_feature(JSON.stringify(input));
32563
+ const result = applyCommand(engine, { type: "add_feature", feature: input });
32457
32564
  set(applyApiResult(result));
32458
32565
  return result.createdFeatureId ?? "";
32459
32566
  },
@@ -32466,16 +32573,16 @@ var init_document_store = __esm({
32466
32573
  const pi = f.params.parent_instance;
32467
32574
  const ci = f.params.child_instance;
32468
32575
  if (pi && pi.FeatureRef === instanceId || ci && ci.FeatureRef === instanceId) {
32469
- engine.delete_feature_by_id(f.id);
32576
+ applyCommand(engine, { type: "delete_feature", id: f.id });
32470
32577
  }
32471
32578
  }
32472
32579
  }
32473
- const result = engine.delete_feature_by_id(instanceId);
32580
+ const result = applyCommand(engine, { type: "delete_feature", id: instanceId });
32474
32581
  set(applyApiResult(result));
32475
32582
  },
32476
32583
  deleteJoint: (jointId) => {
32477
32584
  const engine = get()._crdtEngine;
32478
- const result = engine.delete_feature_by_id(jointId);
32585
+ const result = applyCommand(engine, { type: "delete_feature", id: jointId });
32479
32586
  set(applyApiResult(result));
32480
32587
  },
32481
32588
  setGroundInstance: (instanceId) => {
@@ -32486,15 +32593,15 @@ var init_document_store = __esm({
32486
32593
  const features = JSON.parse(featuresJson);
32487
32594
  const oldGround = features.find((f) => f.kind === "instance" && f.id !== instanceId);
32488
32595
  if (oldGround) {
32489
- engine.set_param(oldGround.id, "is_ground", JSON.stringify(crdtBool(false)));
32596
+ applyCommand(engine, { type: "set_param", id: oldGround.id, key: "is_ground", value: crdtBool(false) });
32490
32597
  }
32491
32598
  }
32492
- const result = engine.set_param(instanceId, "is_ground", JSON.stringify(crdtBool(true)));
32599
+ const result = applyCommand(engine, { type: "set_param", id: instanceId, key: "is_ground", value: crdtBool(true) });
32493
32600
  set(applyLegacyResult(result));
32494
32601
  },
32495
32602
  renameInstance: (instanceId, name) => {
32496
32603
  const engine = get()._crdtEngine;
32497
- const result = engine.set_param(instanceId, "name", JSON.stringify(crdtStr(name)));
32604
+ const result = applyCommand(engine, { type: "set_param", id: instanceId, key: "name", value: crdtStr(name) });
32498
32605
  set(applyLegacyResult(result));
32499
32606
  },
32500
32607
  setDocumentMeta: (id, name) => {
@@ -32552,9 +32659,18 @@ var init_document_store = __esm({
32552
32659
  setTransientEval: (active) => {
32553
32660
  set({ isTransientEval: active });
32554
32661
  },
32662
+ applyTool: (tool, args) => {
32663
+ const engine = get()._crdtEngine;
32664
+ if (!engine)
32665
+ return null;
32666
+ const envelope = applyToolCall(engine, tool, args);
32667
+ if (envelope?.ok)
32668
+ set(applyApiResult(envelope.result));
32669
+ return envelope;
32670
+ },
32555
32671
  setPartVisible: (partId, visible) => {
32556
32672
  const engine = get()._crdtEngine;
32557
- const result = engine.set_visible(partId, visible);
32673
+ const result = applyCommand(engine, { type: "set_visible", id: partId, visible });
32558
32674
  set(applyApiResult(result));
32559
32675
  },
32560
32676
  reorderPart: (partId, newIndex) => {
@@ -32566,13 +32682,7 @@ var init_document_store = __esm({
32566
32682
  const oldIndex = state.parts.findIndex((p) => p.id === partId);
32567
32683
  if (oldIndex === -1 || oldIndex === newIndex)
32568
32684
  return;
32569
- const featuresJson = engine.get_ordered_features_json();
32570
- const features = JSON.parse(featuresJson);
32571
- const others = features.filter((f) => f.id !== partId);
32572
- const beforeId = newIndex > 0 ? others[newIndex - 1]?.id ?? "" : "";
32573
- const afterId = newIndex < others.length ? others[newIndex]?.id ?? "" : "";
32574
- const positionJson = engine.compute_position_between(beforeId, afterId);
32575
- const result = engine.move_feature(partId, positionJson);
32685
+ const result = applyCommand(engine, { type: "reorder", id: partId, index: newIndex });
32576
32686
  set(applyLegacyResult(result));
32577
32687
  },
32578
32688
  // Analyze mode: studies live in a singleton "analysis-studies" CRDT
@@ -32582,7 +32692,7 @@ var init_document_store = __esm({
32582
32692
  const state = get();
32583
32693
  const engine = state._crdtEngine;
32584
32694
  const fid = getOrCreateAnalysisStudiesFeature(state);
32585
- engine.set_param(fid, "studies", JSON.stringify(crdtStr(JSON.stringify(studies))));
32695
+ applyCommand(engine, { type: "set_param", id: fid, key: "studies", value: crdtStr(JSON.stringify(studies)) });
32586
32696
  const doc = JSON.parse(engine.get_document_json());
32587
32697
  set({ document: doc, isDirty: true });
32588
32698
  },
@@ -32592,15 +32702,15 @@ var init_document_store = __esm({
32592
32702
  const engine = state._crdtEngine;
32593
32703
  const fid = getOrCreateSceneFeature(state);
32594
32704
  if (settings.environment)
32595
- engine.set_param(fid, "environment", JSON.stringify(crdtStr(JSON.stringify(settings.environment))));
32705
+ applyCommand(engine, { type: "set_param", id: fid, key: "environment", value: crdtStr(JSON.stringify(settings.environment)) });
32596
32706
  if (settings.lights)
32597
- engine.set_param(fid, "lights", JSON.stringify(crdtStr(JSON.stringify(settings.lights))));
32707
+ applyCommand(engine, { type: "set_param", id: fid, key: "lights", value: crdtStr(JSON.stringify(settings.lights)) });
32598
32708
  if (settings.background)
32599
- engine.set_param(fid, "background", JSON.stringify(crdtStr(JSON.stringify(settings.background))));
32709
+ applyCommand(engine, { type: "set_param", id: fid, key: "background", value: crdtStr(JSON.stringify(settings.background)) });
32600
32710
  if (settings.postProcessing)
32601
- engine.set_param(fid, "post_processing", JSON.stringify(crdtStr(JSON.stringify(settings.postProcessing))));
32711
+ applyCommand(engine, { type: "set_param", id: fid, key: "post_processing", value: crdtStr(JSON.stringify(settings.postProcessing)) });
32602
32712
  if (settings.cameraPresets)
32603
- engine.set_param(fid, "camera_presets", JSON.stringify(crdtStr(JSON.stringify(settings.cameraPresets))));
32713
+ applyCommand(engine, { type: "set_param", id: fid, key: "camera_presets", value: crdtStr(JSON.stringify(settings.cameraPresets)) });
32604
32714
  const doc = JSON.parse(engine.get_document_json());
32605
32715
  set({ document: doc, isDirty: true });
32606
32716
  },
@@ -32609,11 +32719,11 @@ var init_document_store = __esm({
32609
32719
  const engine = state._crdtEngine;
32610
32720
  const fid = getOrCreateDrawingFeature(state);
32611
32721
  if (settings.titleBlock)
32612
- engine.set_param(fid, "title_block", JSON.stringify(crdtStr(JSON.stringify(settings.titleBlock))));
32722
+ applyCommand(engine, { type: "set_param", id: fid, key: "title_block", value: crdtStr(JSON.stringify(settings.titleBlock)) });
32613
32723
  if (settings.sections)
32614
- engine.set_param(fid, "sections", JSON.stringify(crdtStr(JSON.stringify(settings.sections))));
32724
+ applyCommand(engine, { type: "set_param", id: fid, key: "sections", value: crdtStr(JSON.stringify(settings.sections)) });
32615
32725
  if (settings.showBom !== void 0)
32616
- engine.set_param(fid, "show_bom", JSON.stringify(crdtStr(JSON.stringify(settings.showBom))));
32726
+ applyCommand(engine, { type: "set_param", id: fid, key: "show_bom", value: crdtStr(JSON.stringify(settings.showBom)) });
32617
32727
  const doc = JSON.parse(engine.get_document_json());
32618
32728
  set({ document: doc, isDirty: true });
32619
32729
  },
@@ -32621,7 +32731,7 @@ var init_document_store = __esm({
32621
32731
  const state = get();
32622
32732
  const engine = state._crdtEngine;
32623
32733
  const fid = getOrCreateSceneFeature(state);
32624
- engine.set_param(fid, "environment", JSON.stringify(crdtStr(JSON.stringify(environment))));
32734
+ applyCommand(engine, { type: "set_param", id: fid, key: "environment", value: crdtStr(JSON.stringify(environment)) });
32625
32735
  const doc = JSON.parse(engine.get_document_json());
32626
32736
  set({ document: doc, isDirty: true });
32627
32737
  },
@@ -32629,7 +32739,7 @@ var init_document_store = __esm({
32629
32739
  const state = get();
32630
32740
  const engine = state._crdtEngine;
32631
32741
  const fid = getOrCreateSceneFeature(state);
32632
- engine.set_param(fid, "lights", JSON.stringify(crdtStr(JSON.stringify(lights))));
32742
+ applyCommand(engine, { type: "set_param", id: fid, key: "lights", value: crdtStr(JSON.stringify(lights)) });
32633
32743
  const doc = JSON.parse(engine.get_document_json());
32634
32744
  set({ document: doc, isDirty: true });
32635
32745
  },
@@ -32638,7 +32748,7 @@ var init_document_store = __esm({
32638
32748
  const engine = state._crdtEngine;
32639
32749
  const lights = [...state.document.scene?.lights ?? [], light];
32640
32750
  const fid = getOrCreateSceneFeature(state);
32641
- engine.set_param(fid, "lights", JSON.stringify(crdtStr(JSON.stringify(lights))));
32751
+ applyCommand(engine, { type: "set_param", id: fid, key: "lights", value: crdtStr(JSON.stringify(lights)) });
32642
32752
  const doc = JSON.parse(engine.get_document_json());
32643
32753
  set({ document: doc, isDirty: true });
32644
32754
  },
@@ -32647,7 +32757,7 @@ var init_document_store = __esm({
32647
32757
  const engine = state._crdtEngine;
32648
32758
  const lights = (state.document.scene?.lights ?? []).filter((l) => l.id !== lightId);
32649
32759
  const fid = getOrCreateSceneFeature(state);
32650
- engine.set_param(fid, "lights", JSON.stringify(crdtStr(JSON.stringify(lights))));
32760
+ applyCommand(engine, { type: "set_param", id: fid, key: "lights", value: crdtStr(JSON.stringify(lights)) });
32651
32761
  const doc = JSON.parse(engine.get_document_json());
32652
32762
  set({ document: doc, isDirty: true });
32653
32763
  },
@@ -32656,7 +32766,7 @@ var init_document_store = __esm({
32656
32766
  const engine = state._crdtEngine;
32657
32767
  const lights = (state.document.scene?.lights ?? []).map((l) => l.id === lightId ? { ...l, ...updates } : l);
32658
32768
  const fid = getOrCreateSceneFeature(state);
32659
- engine.set_param(fid, "lights", JSON.stringify(crdtStr(JSON.stringify(lights))));
32769
+ applyCommand(engine, { type: "set_param", id: fid, key: "lights", value: crdtStr(JSON.stringify(lights)) });
32660
32770
  const doc = JSON.parse(engine.get_document_json());
32661
32771
  set({ document: doc, isDirty: true });
32662
32772
  },
@@ -32664,7 +32774,7 @@ var init_document_store = __esm({
32664
32774
  const state = get();
32665
32775
  const engine = state._crdtEngine;
32666
32776
  const fid = getOrCreateSceneFeature(state);
32667
- engine.set_param(fid, "background", JSON.stringify(crdtStr(JSON.stringify(background))));
32777
+ applyCommand(engine, { type: "set_param", id: fid, key: "background", value: crdtStr(JSON.stringify(background)) });
32668
32778
  const doc = JSON.parse(engine.get_document_json());
32669
32779
  set({ document: doc, isDirty: true });
32670
32780
  },
@@ -32672,7 +32782,7 @@ var init_document_store = __esm({
32672
32782
  const state = get();
32673
32783
  const engine = state._crdtEngine;
32674
32784
  const fid = getOrCreateSceneFeature(state);
32675
- engine.set_param(fid, "post_processing", JSON.stringify(crdtStr(JSON.stringify(postProcessing))));
32785
+ applyCommand(engine, { type: "set_param", id: fid, key: "post_processing", value: crdtStr(JSON.stringify(postProcessing)) });
32676
32786
  const doc = JSON.parse(engine.get_document_json());
32677
32787
  set({ document: doc, isDirty: true });
32678
32788
  },
@@ -32681,7 +32791,7 @@ var init_document_store = __esm({
32681
32791
  const engine = state._crdtEngine;
32682
32792
  const presets = [...state.document.scene?.cameraPresets ?? [], preset];
32683
32793
  const fid = getOrCreateSceneFeature(state);
32684
- engine.set_param(fid, "camera_presets", JSON.stringify(crdtStr(JSON.stringify(presets))));
32794
+ applyCommand(engine, { type: "set_param", id: fid, key: "camera_presets", value: crdtStr(JSON.stringify(presets)) });
32685
32795
  const doc = JSON.parse(engine.get_document_json());
32686
32796
  set({ document: doc, isDirty: true });
32687
32797
  },
@@ -32690,7 +32800,7 @@ var init_document_store = __esm({
32690
32800
  const engine = state._crdtEngine;
32691
32801
  const presets = (state.document.scene?.cameraPresets ?? []).filter((p) => p.id !== presetId);
32692
32802
  const fid = getOrCreateSceneFeature(state);
32693
- engine.set_param(fid, "camera_presets", JSON.stringify(crdtStr(JSON.stringify(presets))));
32803
+ applyCommand(engine, { type: "set_param", id: fid, key: "camera_presets", value: crdtStr(JSON.stringify(presets)) });
32694
32804
  const doc = JSON.parse(engine.get_document_json());
32695
32805
  set({ document: doc, isDirty: true });
32696
32806
  },
@@ -34581,11 +34691,6 @@ var init_translations = __esm({
34581
34691
  "modal.fork.description": "P\u0159ihlaste se a vytvo\u0159te si vlastn\xED upravitelnou kopii. Va\u0161e \xFApravy se nedotknou origin\xE1lu \u2014 z\xEDsk\xE1te \u010Derstvou kopii ve sv\xE9m \xFA\u010Dtu.",
34582
34692
  "modal.fork.keep_viewing": "Pokra\u010Dovat v prohl\xED\u017Een\xED",
34583
34693
  "modal.fork.signin": "P\u0159ihl\xE1sit se a vytvo\u0159it kopii",
34584
- "modal.recents.title": "Ned\xE1vn\xE9 soubory",
34585
- "modal.recents.clear": "Vymazat",
34586
- "modal.recents.clear_tooltip": "Vymazat ned\xE1vn\xE9 soubory",
34587
- "modal.recents.empty": "Zat\xEDm \u017E\xE1dn\xE9 ned\xE1vn\xE9 soubory.",
34588
- "modal.recents.cant_open": "Nelze otev\u0159\xEDt {name}",
34589
34694
  "palette.placeholder": "Zadejte p\u0159\xEDkaz nebo popi\u0161te, co vytvo\u0159it...",
34590
34695
  "palette.title": "Paleta p\u0159\xEDkaz\u016F",
34591
34696
  "palette.generating": "Generov\xE1n\xED...",
@@ -34928,11 +35033,6 @@ var init_translations = __esm({
34928
35033
  "modal.fork.description": "Melde dich an, um eine eigene bearbeitbare Kopie zu erstellen. Deine \xC4nderungen wirken sich nicht auf das Original aus \u2014 du erh\xE4ltst einen neuen Fork in deinem Konto.",
34929
35034
  "modal.fork.keep_viewing": "Weiter ansehen",
34930
35035
  "modal.fork.signin": "Anmelden zum Forken",
34931
- "modal.recents.title": "Zuletzt verwendete Dateien",
34932
- "modal.recents.clear": "Leeren",
34933
- "modal.recents.clear_tooltip": "Zuletzt verwendete Dateien leeren",
34934
- "modal.recents.empty": "Noch keine zuletzt verwendeten Dateien.",
34935
- "modal.recents.cant_open": "{name} konnte nicht ge\xF6ffnet werden",
34936
35036
  "palette.placeholder": "Befehl eingeben oder beschreiben, was erstellt werden soll...",
34937
35037
  "palette.title": "Befehlspalette",
34938
35038
  "palette.generating": "Wird generiert...",
@@ -35277,11 +35377,6 @@ var init_translations = __esm({
35277
35377
  "modal.fork.description": "Sign in to create your own editable copy. Your edits won't touch the original \u2014 you'll get a fresh fork in your account.",
35278
35378
  "modal.fork.keep_viewing": "Keep viewing",
35279
35379
  "modal.fork.signin": "Sign in to fork",
35280
- "modal.recents.title": "Recent Files",
35281
- "modal.recents.clear": "Clear",
35282
- "modal.recents.clear_tooltip": "Clear recent files",
35283
- "modal.recents.empty": "No recent files yet.",
35284
- "modal.recents.cant_open": "Could not open {name}",
35285
35380
  "palette.placeholder": "Type a command or describe what to create...",
35286
35381
  "palette.title": "Command Palette",
35287
35382
  "palette.generating": "Generating...",
@@ -35624,11 +35719,6 @@ var init_translations = __esm({
35624
35719
  "modal.fork.description": "Inicia sesi\xF3n para crear tu propia copia editable. Tus cambios no afectar\xE1n al original \u2014 obtendr\xE1s una bifurcaci\xF3n nueva en tu cuenta.",
35625
35720
  "modal.fork.keep_viewing": "Seguir viendo",
35626
35721
  "modal.fork.signin": "Inicia sesi\xF3n para bifurcar",
35627
- "modal.recents.title": "Archivos recientes",
35628
- "modal.recents.clear": "Borrar",
35629
- "modal.recents.clear_tooltip": "Borrar archivos recientes",
35630
- "modal.recents.empty": "A\xFAn no hay archivos recientes.",
35631
- "modal.recents.cant_open": "No se pudo abrir {name}",
35632
35722
  "palette.placeholder": "Escribe un comando o describe qu\xE9 crear...",
35633
35723
  "palette.title": "Paleta de comandos",
35634
35724
  "palette.generating": "Generando...",
@@ -35971,11 +36061,6 @@ var init_translations = __esm({
35971
36061
  "modal.fork.description": "Connectez-vous pour cr\xE9er votre propre copie modifiable. Vos modifications n'affecteront pas l'original \u2014 vous obtiendrez une nouvelle bifurcation dans votre compte.",
35972
36062
  "modal.fork.keep_viewing": "Continuer \xE0 voir",
35973
36063
  "modal.fork.signin": "Se connecter pour bifurquer",
35974
- "modal.recents.title": "Fichiers r\xE9cents",
35975
- "modal.recents.clear": "Effacer",
35976
- "modal.recents.clear_tooltip": "Effacer les fichiers r\xE9cents",
35977
- "modal.recents.empty": "Aucun fichier r\xE9cent.",
35978
- "modal.recents.cant_open": "Impossible d'ouvrir {name}",
35979
36064
  "palette.placeholder": "Tapez une commande ou d\xE9crivez ce que vous voulez cr\xE9er...",
35980
36065
  "palette.title": "Palette de commandes",
35981
36066
  "palette.generating": "G\xE9n\xE9ration en cours...",
@@ -36318,11 +36403,6 @@ var init_translations = __esm({
36318
36403
  "modal.fork.description": "Accedi per creare la tua copia modificabile. Le tue modifiche non toccheranno l'originale \u2014 otterrai un nuovo fork nel tuo account.",
36319
36404
  "modal.fork.keep_viewing": "Continua a visualizzare",
36320
36405
  "modal.fork.signin": "Accedi per duplicare",
36321
- "modal.recents.title": "File Recenti",
36322
- "modal.recents.clear": "Cancella",
36323
- "modal.recents.clear_tooltip": "Cancella file recenti",
36324
- "modal.recents.empty": "Nessun file recente.",
36325
- "modal.recents.cant_open": "Impossibile aprire {name}",
36326
36406
  "palette.placeholder": "Digita un comando o descrivi cosa creare...",
36327
36407
  "palette.title": "Tavolozza Comandi",
36328
36408
  "palette.generating": "Generazione in corso...",
@@ -36665,11 +36745,6 @@ var init_translations = __esm({
36665
36745
  "modal.fork.description": "\u30B5\u30A4\u30F3\u30A4\u30F3\u3057\u3066\u7DE8\u96C6\u53EF\u80FD\u306A\u30B3\u30D4\u30FC\u3092\u4F5C\u6210\u3057\u307E\u3057\u3087\u3046\u3002\u7DE8\u96C6\u5185\u5BB9\u306F\u5143\u306E\u30D5\u30A1\u30A4\u30EB\u306B\u306F\u5F71\u97FF\u3057\u307E\u305B\u3093 \u2014 \u304A\u4F7F\u3044\u306E\u30A2\u30AB\u30A6\u30F3\u30C8\u306B\u65B0\u3057\u3044\u30D5\u30A9\u30FC\u30AF\u304C\u4F5C\u6210\u3055\u308C\u307E\u3059\u3002",
36666
36746
  "modal.fork.keep_viewing": "\u8868\u793A\u3092\u7D9A\u3051\u308B",
36667
36747
  "modal.fork.signin": "\u30B5\u30A4\u30F3\u30A4\u30F3\u3057\u3066\u30D5\u30A9\u30FC\u30AF",
36668
- "modal.recents.title": "\u6700\u8FD1\u306E\u30D5\u30A1\u30A4\u30EB",
36669
- "modal.recents.clear": "\u30AF\u30EA\u30A2",
36670
- "modal.recents.clear_tooltip": "\u6700\u8FD1\u306E\u30D5\u30A1\u30A4\u30EB\u3092\u30AF\u30EA\u30A2",
36671
- "modal.recents.empty": "\u6700\u8FD1\u306E\u30D5\u30A1\u30A4\u30EB\u306F\u307E\u3060\u3042\u308A\u307E\u305B\u3093\u3002",
36672
- "modal.recents.cant_open": "{name} \u3092\u958B\u3051\u307E\u305B\u3093\u3067\u3057\u305F",
36673
36748
  "palette.placeholder": "\u30B3\u30DE\u30F3\u30C9\u3092\u5165\u529B\u3059\u308B\u304B\u3001\u4F5C\u6210\u3059\u308B\u5185\u5BB9\u3092\u8A18\u8FF0...",
36674
36749
  "palette.title": "\u30B3\u30DE\u30F3\u30C9\u30D1\u30EC\u30C3\u30C8",
36675
36750
  "palette.generating": "\u751F\u6210\u4E2D...",
@@ -37012,11 +37087,6 @@ var init_translations = __esm({
37012
37087
  "modal.fork.description": "\uB85C\uADF8\uC778\uD558\uC5EC \uD3B8\uC9D1 \uAC00\uB2A5\uD55C \uC0AC\uBCF8\uC744 \uB9CC\uB4DC\uC138\uC694. \uD3B8\uC9D1 \uB0B4\uC6A9\uC740 \uC6D0\uBCF8\uC5D0 \uC601\uD5A5\uC744 \uC8FC\uC9C0 \uC54A\uC73C\uBA70, \uACC4\uC815\uC5D0 \uC0C8 \uD3EC\uD06C\uAC00 \uC0DD\uC131\uB429\uB2C8\uB2E4.",
37013
37088
  "modal.fork.keep_viewing": "\uACC4\uC18D \uBCF4\uAE30",
37014
37089
  "modal.fork.signin": "\uD3EC\uD06C\uD558\uB824\uBA74 \uB85C\uADF8\uC778",
37015
- "modal.recents.title": "\uCD5C\uADFC \uD30C\uC77C",
37016
- "modal.recents.clear": "\uC9C0\uC6B0\uAE30",
37017
- "modal.recents.clear_tooltip": "\uCD5C\uADFC \uD30C\uC77C \uC9C0\uC6B0\uAE30",
37018
- "modal.recents.empty": "\uC544\uC9C1 \uCD5C\uADFC \uD30C\uC77C\uC774 \uC5C6\uC2B5\uB2C8\uB2E4.",
37019
- "modal.recents.cant_open": "{name}\uC744(\uB97C) \uC5F4 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4",
37020
37090
  "palette.placeholder": "\uBA85\uB839\uC744 \uC785\uB825\uD558\uAC70\uB098 \uB9CC\uB4E4 \uB0B4\uC6A9\uC744 \uC124\uBA85\uD558\uC138\uC694...",
37021
37091
  "palette.title": "\uBA85\uB839 \uD314\uB808\uD2B8",
37022
37092
  "palette.generating": "\uC0DD\uC131 \uC911...",
@@ -37359,11 +37429,6 @@ var init_translations = __esm({
37359
37429
  "modal.fork.description": "Meld je aan om je eigen bewerkbare kopie te maken. Je wijzigingen raken het origineel niet \u2014 je krijgt een nieuwe fork in je account.",
37360
37430
  "modal.fork.keep_viewing": "Blijven bekijken",
37361
37431
  "modal.fork.signin": "Meld je aan om te forken",
37362
- "modal.recents.title": "Recente bestanden",
37363
- "modal.recents.clear": "Wissen",
37364
- "modal.recents.clear_tooltip": "Recente bestanden wissen",
37365
- "modal.recents.empty": "Nog geen recente bestanden.",
37366
- "modal.recents.cant_open": "Kon {name} niet openen",
37367
37432
  "palette.placeholder": "Typ een opdracht of beschrijf wat je wilt maken...",
37368
37433
  "palette.title": "Opdrachtenpalet",
37369
37434
  "palette.generating": "Bezig met genereren...",
@@ -37706,11 +37771,6 @@ var init_translations = __esm({
37706
37771
  "modal.fork.description": "Zaloguj si\u0119, aby utworzy\u0107 w\u0142asn\u0105 edytowaln\u0105 kopi\u0119. Twoje zmiany nie wp\u0142yn\u0105 na orygina\u0142 \u2014 otrzymasz \u015Bwie\u017C\u0105 kopi\u0119 na swoim koncie.",
37707
37772
  "modal.fork.keep_viewing": "Kontynuuj przegl\u0105danie",
37708
37773
  "modal.fork.signin": "Zaloguj si\u0119, aby utworzy\u0107 kopi\u0119",
37709
- "modal.recents.title": "Ostatnie pliki",
37710
- "modal.recents.clear": "Wyczy\u015B\u0107",
37711
- "modal.recents.clear_tooltip": "Wyczy\u015B\u0107 ostatnie pliki",
37712
- "modal.recents.empty": "Brak ostatnich plik\xF3w.",
37713
- "modal.recents.cant_open": "Nie mo\u017Cna otworzy\u0107 {name}",
37714
37774
  "palette.placeholder": "Wpisz polecenie lub opisz, co utworzy\u0107...",
37715
37775
  "palette.title": "Paleta polece\u0144",
37716
37776
  "palette.generating": "Generowanie...",
@@ -38053,11 +38113,6 @@ var init_translations = __esm({
38053
38113
  "modal.fork.description": "Entre para criar sua pr\xF3pria c\xF3pia edit\xE1vel. Suas edi\xE7\xF5es n\xE3o afetar\xE3o o original \u2014 voc\xEA ter\xE1 uma nova bifurca\xE7\xE3o em sua conta.",
38054
38114
  "modal.fork.keep_viewing": "Continuar visualizando",
38055
38115
  "modal.fork.signin": "Entre para bifurcar",
38056
- "modal.recents.title": "Arquivos Recentes",
38057
- "modal.recents.clear": "Limpar",
38058
- "modal.recents.clear_tooltip": "Limpar arquivos recentes",
38059
- "modal.recents.empty": "Nenhum arquivo recente ainda.",
38060
- "modal.recents.cant_open": "N\xE3o foi poss\xEDvel abrir {name}",
38061
38116
  "palette.placeholder": "Digite um comando ou descreva o que criar...",
38062
38117
  "palette.title": "Paleta de Comandos",
38063
38118
  "palette.generating": "Gerando...",
@@ -38400,11 +38455,6 @@ var init_translations = __esm({
38400
38455
  "modal.fork.description": "\u0412\u043E\u0439\u0434\u0438\u0442\u0435, \u0447\u0442\u043E\u0431\u044B \u0441\u043E\u0437\u0434\u0430\u0442\u044C \u0441\u043E\u0431\u0441\u0442\u0432\u0435\u043D\u043D\u0443\u044E \u0440\u0435\u0434\u0430\u043A\u0442\u0438\u0440\u0443\u0435\u043C\u0443\u044E \u043A\u043E\u043F\u0438\u044E. \u0412\u0430\u0448\u0438 \u043F\u0440\u0430\u0432\u043A\u0438 \u043D\u0435 \u0437\u0430\u0442\u0440\u043E\u043D\u0443\u0442 \u043E\u0440\u0438\u0433\u0438\u043D\u0430\u043B \u2014 \u0432\u044B \u043F\u043E\u043B\u0443\u0447\u0438\u0442\u0435 \u043D\u043E\u0432\u0443\u044E \u043A\u043E\u043F\u0438\u044E \u0432 \u0441\u0432\u043E\u0451\u043C \u0430\u043A\u043A\u0430\u0443\u043D\u0442\u0435.",
38401
38456
  "modal.fork.keep_viewing": "\u041F\u0440\u043E\u0434\u043E\u043B\u0436\u0438\u0442\u044C \u043F\u0440\u043E\u0441\u043C\u043E\u0442\u0440",
38402
38457
  "modal.fork.signin": "\u0412\u043E\u0439\u0442\u0438 \u0438 \u0441\u043E\u0437\u0434\u0430\u0442\u044C \u043A\u043E\u043F\u0438\u044E",
38403
- "modal.recents.title": "\u041D\u0435\u0434\u0430\u0432\u043D\u0438\u0435 \u0444\u0430\u0439\u043B\u044B",
38404
- "modal.recents.clear": "\u041E\u0447\u0438\u0441\u0442\u0438\u0442\u044C",
38405
- "modal.recents.clear_tooltip": "\u041E\u0447\u0438\u0441\u0442\u0438\u0442\u044C \u043D\u0435\u0434\u0430\u0432\u043D\u0438\u0435 \u0444\u0430\u0439\u043B\u044B",
38406
- "modal.recents.empty": "\u041F\u043E\u043A\u0430 \u043D\u0435\u0442 \u043D\u0435\u0434\u0430\u0432\u043D\u0438\u0445 \u0444\u0430\u0439\u043B\u043E\u0432.",
38407
- "modal.recents.cant_open": "\u041D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u043E\u0442\u043A\u0440\u044B\u0442\u044C {name}",
38408
38458
  "palette.placeholder": "\u0412\u0432\u0435\u0434\u0438\u0442\u0435 \u043A\u043E\u043C\u0430\u043D\u0434\u0443 \u0438\u043B\u0438 \u043E\u043F\u0438\u0448\u0438\u0442\u0435, \u0447\u0442\u043E \u0441\u043E\u0437\u0434\u0430\u0442\u044C...",
38409
38459
  "palette.title": "\u041F\u0430\u043B\u0438\u0442\u0440\u0430 \u043A\u043E\u043C\u0430\u043D\u0434",
38410
38460
  "palette.generating": "\u0413\u0435\u043D\u0435\u0440\u0430\u0446\u0438\u044F...",
@@ -38747,11 +38797,6 @@ var init_translations = __esm({
38747
38797
  "modal.fork.description": "Kendi d\xFCzenlenebilir kopyan\u0131z\u0131 olu\u015Fturmak i\xE7in giri\u015F yap\u0131n. D\xFCzenlemeleriniz orijinali etkilemeyecek \u2014 hesab\u0131n\u0131zda yeni bir \xE7atal alacaks\u0131n\u0131z.",
38748
38798
  "modal.fork.keep_viewing": "G\xF6r\xFCnt\xFClemeye devam et",
38749
38799
  "modal.fork.signin": "\xC7atallamak i\xE7in giri\u015F yap",
38750
- "modal.recents.title": "Son Dosyalar",
38751
- "modal.recents.clear": "Temizle",
38752
- "modal.recents.clear_tooltip": "Son dosyalar\u0131 temizle",
38753
- "modal.recents.empty": "Hen\xFCz son dosya yok.",
38754
- "modal.recents.cant_open": "{name} a\xE7\u0131lamad\u0131",
38755
38800
  "palette.placeholder": "Bir komut yaz\u0131n veya ne olu\u015Fturmak istedi\u011Finizi tan\u0131mlay\u0131n...",
38756
38801
  "palette.title": "Komut Paleti",
38757
38802
  "palette.generating": "Olu\u015Fturuluyor...",
@@ -39094,11 +39139,6 @@ var init_translations = __esm({
39094
39139
  "modal.fork.description": "\u767B\u5F55\u4EE5\u521B\u5EFA\u4F60\u81EA\u5DF1\u7684\u53EF\u7F16\u8F91\u526F\u672C\u3002\u4F60\u7684\u4FEE\u6539\u4E0D\u4F1A\u5F71\u54CD\u539F\u6587\u6863\u2014\u2014\u4F60\u5C06\u5728\u81EA\u5DF1\u7684\u8D26\u6237\u4E2D\u83B7\u5F97\u4E00\u4EFD\u65B0\u7684\u526F\u672C\u3002",
39095
39140
  "modal.fork.keep_viewing": "\u7EE7\u7EED\u67E5\u770B",
39096
39141
  "modal.fork.signin": "\u767B\u5F55\u4EE5\u521B\u5EFA\u526F\u672C",
39097
- "modal.recents.title": "\u6700\u8FD1\u6587\u4EF6",
39098
- "modal.recents.clear": "\u6E05\u9664",
39099
- "modal.recents.clear_tooltip": "\u6E05\u9664\u6700\u8FD1\u6587\u4EF6",
39100
- "modal.recents.empty": "\u6682\u65E0\u6700\u8FD1\u6587\u4EF6\u3002",
39101
- "modal.recents.cant_open": "\u65E0\u6CD5\u6253\u5F00 {name}",
39102
39142
  "palette.placeholder": "\u8F93\u5165\u547D\u4EE4\u6216\u63CF\u8FF0\u8981\u521B\u5EFA\u7684\u5185\u5BB9...",
39103
39143
  "palette.title": "\u547D\u4EE4\u9762\u677F",
39104
39144
  "palette.generating": "\u6B63\u5728\u751F\u6210...",
@@ -39441,11 +39481,6 @@ var init_translations = __esm({
39441
39481
  "modal.fork.description": "\u767B\u5165\u4EE5\u5EFA\u7ACB\u60A8\u81EA\u5DF1\u7684\u53EF\u7DE8\u8F2F\u526F\u672C\u3002\u60A8\u7684\u7DE8\u8F2F\u4E0D\u6703\u5F71\u97FF\u539F\u59CB\u6587\u4EF6\uFF0C\u60A8\u5C07\u5728\u5E33\u6236\u4E2D\u53D6\u5F97\u5168\u65B0\u7684\u5206\u652F\u526F\u672C\u3002",
39442
39482
  "modal.fork.keep_viewing": "\u7E7C\u7E8C\u6AA2\u8996",
39443
39483
  "modal.fork.signin": "\u767B\u5165\u4EE5\u8907\u88FD\u5206\u652F",
39444
- "modal.recents.title": "\u6700\u8FD1\u7684\u6A94\u6848",
39445
- "modal.recents.clear": "\u6E05\u9664",
39446
- "modal.recents.clear_tooltip": "\u6E05\u9664\u6700\u8FD1\u7684\u6A94\u6848",
39447
- "modal.recents.empty": "\u5C1A\u7121\u6700\u8FD1\u7684\u6A94\u6848\u3002",
39448
- "modal.recents.cant_open": "\u7121\u6CD5\u958B\u555F {name}",
39449
39484
  "palette.placeholder": "\u8F38\u5165\u547D\u4EE4\u6216\u63CF\u8FF0\u8981\u5EFA\u7ACB\u7684\u5167\u5BB9\u2026",
39450
39485
  "palette.title": "\u547D\u4EE4\u9762\u677F",
39451
39486
  "palette.generating": "\u7522\u751F\u4E2D\u2026",
@@ -41430,9 +41465,7 @@ var init_camera_framing = __esm({
41430
41465
  var init_executors = __esm({
41431
41466
  "../core/dist/commands/executors.js"() {
41432
41467
  "use strict";
41433
- init_registry2();
41434
41468
  init_engine_store();
41435
- init_dist2();
41436
41469
  init_dist();
41437
41470
  init_camera_framing();
41438
41471
  }
@@ -41878,6 +41911,48 @@ var init_CHANGELOG = __esm({
41878
41911
  "run_erc"
41879
41912
  ]
41880
41913
  },
41914
+ {
41915
+ id: "2026-10-20-remove-tauri-desktop",
41916
+ version: "0.10.0",
41917
+ date: "2026-10-20",
41918
+ category: "breaking",
41919
+ title: "Tauri desktop app removed",
41920
+ summary: "The Tauri desktop app (.dmg/.msi/.AppImage) is discontinued. Use vcad.io in the browser, or the native SwiftUI Mac app in apple/VcadApp on macOS.",
41921
+ features: [
41922
+ "desktop",
41923
+ "app"
41924
+ ],
41925
+ breaking: {
41926
+ description: "No more desktop installers or auto-updates. Desktop-only features are gone: native menus, context menus, file dialogs and recent files, OS notifications, the vcad:// deep links and desktop magic-link sign-in, and the built-in Bambu printer bridge.",
41927
+ migration: "Use https://vcad.io (printing works through the local relay at 127.0.0.1:7878) or build apple/VcadApp with build-ffi.sh and bundle.sh."
41928
+ }
41929
+ },
41930
+ {
41931
+ id: "2026-10-20-pcb3d-kernel-ratsnest",
41932
+ version: "undefined",
41933
+ date: "2026-10-20",
41934
+ category: "fix",
41935
+ title: "3D PCB ratsnest matches the 2D view and autorouter",
41936
+ summary: "The 3D board view now draws the kernel's minimum-spanning-tree ratsnest instead of a TS approximation that hid a whole net once any trace on it existed.",
41937
+ features: [
41938
+ "electronics",
41939
+ "pcb"
41940
+ ]
41941
+ },
41942
+ {
41943
+ id: "2026-10-20-lossless-import",
41944
+ version: "undefined",
41945
+ date: "2026-10-20",
41946
+ category: "fix",
41947
+ title: "Opening older documents keeps everything",
41948
+ summary: "Opening an older .vcad file no longer drops PCB boards, schematics, parameters, imported meshes, part inertials and colliders, or operations the editor has no tool for.",
41949
+ features: [
41950
+ "documents",
41951
+ "import",
41952
+ "electronics",
41953
+ "assembly"
41954
+ ]
41955
+ },
41881
41956
  {
41882
41957
  id: "2026-10-20-live-part-stock-check",
41883
41958
  version: "0.10.0",
@@ -41936,6 +42011,31 @@ var init_CHANGELOG = __esm({
41936
42011
  "get_footprint"
41937
42012
  ]
41938
42013
  },
42014
+ {
42015
+ id: "2026-10-20-collab-order-and-exact-floats",
42016
+ version: "undefined",
42017
+ date: "2026-10-20",
42018
+ category: "fix",
42019
+ title: "Collaborators see the same part order; exact reloads",
42020
+ summary: "Parts added at the same moment by two collaborators now order identically for both; one edit is one undo step; reloading a document no longer nudges dimensions by a rounding bit.",
42021
+ features: [
42022
+ "collaboration",
42023
+ "undo",
42024
+ "documents"
42025
+ ]
42026
+ },
42027
+ {
42028
+ id: "2026-10-20-ai-update-targets-owner",
42029
+ version: "undefined",
42030
+ date: "2026-10-20",
42031
+ category: "fix",
42032
+ title: "AI edits change the part you asked for",
42033
+ summary: "AI update calls now change the part that owns the given node instead of the first part in the document, and bulk material changes refuse unknown parts instead of half-applying.",
42034
+ features: [
42035
+ "ai",
42036
+ "chat"
42037
+ ]
42038
+ },
41939
42039
  {
41940
42040
  id: "2026-10-19-plane-stub-drc-exemption",
41941
42041
  version: "0.10.0",
@@ -86821,8 +86921,8 @@ var init_server3 = __esm({
86821
86921
  init_order_feed();
86822
86922
  init_animate();
86823
86923
  PKG_VERSION = (() => {
86824
- if ("0.10.0-main.100") {
86825
- return "0.10.0-main.100";
86924
+ if ("0.10.0-main.107") {
86925
+ return "0.10.0-main.107";
86826
86926
  }
86827
86927
  try {
86828
86928
  const req = createRequire2(import.meta.url);
@@ -86831,8 +86931,8 @@ var init_server3 = __esm({
86831
86931
  return "0.0.0";
86832
86932
  }
86833
86933
  })();
86834
- BUILD_SHA = "fa4b74e6a0f3daf8a17ee8ab575ba38d826443c7";
86835
- BUILD_TIME = "2026-10-20T15:49:21.597Z";
86934
+ BUILD_SHA = "a463c0d111f8f432469d77dd4b9038fd370f6801";
86935
+ BUILD_TIME = "2026-10-20T21:08:32.781Z";
86836
86936
  SHORT_SHA = BUILD_SHA === "unknown" ? "unknown" : BUILD_SHA.slice(0, 7);
86837
86937
  VERSION_WITH_BUILD = SHORT_SHA === "unknown" ? PKG_VERSION : `${PKG_VERSION}+${SHORT_SHA}`;
86838
86938
  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.100",
3
+ "version": "0.10.0-main.107",
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": "fa4b74e6a0f3daf8a17ee8ab575ba38d826443c7",
23
- "builtAt": "2026-10-20T15:49:21.597Z"
22
+ "sha": "a463c0d111f8f432469d77dd4b9038fd370f6801",
23
+ "builtAt": "2026-10-20T21:08:32.781Z"
24
24
  }
25
25
  }
Binary file