bambu-printer-mcp 1.1.77 → 1.1.78

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/CONTRIBUTORS.md CHANGED
@@ -57,3 +57,5 @@ Special thanks to [FULU Foundation](https://www.fulu.org/), [Louis Rossmann](htt
57
57
  This is community recognition, separate from code authorship in this repository. The optional FULU bridge uses Bambu's networking runtime; see the [FULU setup guide](./docs/FULU.md) for the direct LAN alternative and current validation limits.
58
58
 
59
59
  Thanks to the [MQTT.js contributors](https://github.com/mqttjs/MQTT.js/releases/tag/v5.16.1), [proxy-addr maintainers](https://github.com/jshttp/proxy-addr/releases/tag/v2.0.8), and [source-map-js maintainers](https://github.com/7rulnik/source-map-js) for the reconnect and security fixes incorporated in 1.1.31. This recognizes upstream dependency work separately from authorship in this repository.
60
+
61
+ Thanks to the [OrcaSlicer contributors](https://github.com/OrcaSlicer/OrcaSlicer/releases/tag/v2.5.0) for the published 2.5.0 source and macOS build used to reproduce and validate shared nozzle-flow metadata. This credits upstream software and contracts; it does not claim hardware verification or authorship of this repository’s fix.
@@ -334,6 +334,22 @@ export async function inspectPrintFile(filePath, options) {
334
334
  return undefined;
335
335
  if (entries.length === nozzleDiameters.length)
336
336
  return entries;
337
+ // Orca 2.5 ConfigOptionVector::get_at repeats a singleton volume type.
338
+ // Require the sliced plate's complete physical selection to corroborate
339
+ // it; project defaults alone and the nozzle_flow alias cannot fill gaps.
340
+ if (keys[0] === 'nozzle_volume_type' && dualNozzle && nozzleDiameters.length === 2 && entries.length === 1) {
341
+ const selected = (key) => consistent(metadataValues(headers, [key]), value => {
342
+ const values = normalizedEntries(value);
343
+ return values?.length === 2 ? values : undefined;
344
+ }, `selected ${key.replace(/_/g, ' ')}`);
345
+ const ids = selected('printer_extruder_id');
346
+ const variants = selected('printer_extruder_variant');
347
+ const extruders = selected('extruder_type');
348
+ if (ids.some((id, index) => id !== String(index + 1)) ||
349
+ variants.some((variant, index) => variant !== `${extruders[index]}_${entries[0]}`))
350
+ return undefined;
351
+ return [entries[0], entries[0]];
352
+ }
337
353
  if (!variantRows)
338
354
  return undefined;
339
355
  // Bambu GUI projects may store nozzle types per extruder variant, while
@@ -374,7 +390,8 @@ export async function inspectPrintFile(filePath, options) {
374
390
  return resolved;
375
391
  }, keys[0].replace(/_/g, ' ')) : undefined;
376
392
  };
377
- const nozzleFlows = nozzleMetadata(['nozzle_flow', 'nozzle_volume_type']);
393
+ const flowDeclarations = [nozzleMetadata(['nozzle_flow']), nozzleMetadata(['nozzle_volume_type'])].filter(value => value !== undefined);
394
+ const nozzleFlows = flowDeclarations.length ? consistent(flowDeclarations, normalizedEntries, 'nozzle flow') : undefined;
378
395
  const nozzleTypes = nozzleMetadata(['nozzle_type'], true);
379
396
  const materials = consistent(metadataValues(metadata, ['filament_type']), value => {
380
397
  const values = list(value);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bambu-printer-mcp",
3
- "version": "1.1.77",
3
+ "version": "1.1.78",
4
4
  "description": "MCP server for Bambu Lab 3D printers with STL manipulation, slicing, and print management",
5
5
  "main": "dist/index.js",
6
6
  "repository": {
@@ -274,6 +274,20 @@ export async function inspectPrintFile(filePath: string, options: {model:string;
274
274
  const entries=normalizedEntries(value);
275
275
  if(!entries) return undefined;
276
276
  if(entries.length===nozzleDiameters.length) return entries;
277
+ // Orca 2.5 ConfigOptionVector::get_at repeats a singleton volume type.
278
+ // Require the sliced plate's complete physical selection to corroborate
279
+ // it; project defaults alone and the nozzle_flow alias cannot fill gaps.
280
+ if(keys[0]==='nozzle_volume_type' && dualNozzle && nozzleDiameters.length===2 && entries.length===1) {
281
+ const selected=(key:string)=>consistent(metadataValues(headers,[key]),value=>{
282
+ const values=normalizedEntries(value);return values?.length===2?values:undefined;
283
+ },`selected ${key.replace(/_/g,' ')}`);
284
+ const ids=selected('printer_extruder_id');
285
+ const variants=selected('printer_extruder_variant');
286
+ const extruders=selected('extruder_type');
287
+ if(ids.some((id,index)=>id!==String(index+1)) ||
288
+ variants.some((variant,index)=>variant!==`${extruders[index]}_${entries[0]}`)) return undefined;
289
+ return [entries[0],entries[0]];
290
+ }
277
291
  if(!variantRows) return undefined;
278
292
  // Bambu GUI projects may store nozzle types per extruder variant, while
279
293
  // diameters and selected flow types are per physical extruder. Never truncate
@@ -305,7 +319,8 @@ export async function inspectPrintFile(filePath: string, options: {model:string;
305
319
  return resolved;
306
320
  },keys[0].replace(/_/g,' ')) : undefined;
307
321
  };
308
- const nozzleFlows=nozzleMetadata(['nozzle_flow','nozzle_volume_type']);
322
+ const flowDeclarations=[nozzleMetadata(['nozzle_flow']),nozzleMetadata(['nozzle_volume_type'])].filter(value=>value!==undefined);
323
+ const nozzleFlows=flowDeclarations.length?consistent(flowDeclarations,normalizedEntries,'nozzle flow'):undefined;
309
324
  const nozzleTypes=nozzleMetadata(['nozzle_type'],true);
310
325
  const materials=consistent(metadataValues(metadata,['filament_type']),value=>{
311
326
  const values=list(value);return values.length && values.every(v=>!!normalizeMaterial(v))?values.map(v=>normalizeMaterial(v)!):undefined;