bambu-printer-mcp 1.1.34 → 1.1.36
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 +2 -2
- package/dist/printers/bambu.d.ts +0 -4
- package/dist/printers/bambu.js +0 -16
- package/package.json +1 -2
- package/src/printers/bambu.ts +0 -21
package/README.md
CHANGED
|
@@ -326,7 +326,7 @@ Bambu Lab printers do not use a conventional REST API. Instead, they expose two
|
|
|
326
326
|
|
|
327
327
|
### What this fork fixes
|
|
328
328
|
|
|
329
|
-
This package works around two protocol-level issues in the
|
|
329
|
+
This package works around two protocol-level issues in the `bambu-js` library it previously used, and no longer depends on `bambu-js` at all: file transfers and listings use `basic-ftp` directly, and printer commands use `bambu-node`.
|
|
330
330
|
|
|
331
331
|
**Bug 1: FTP double-path error in bambu-js.**
|
|
332
332
|
|
|
@@ -1115,7 +1115,7 @@ Slice an STL or 3MF file using an external slicer and return the path to the out
|
|
|
1115
1115
|
|
|
1116
1116
|
**FULU/Orca CLI safety:** from 1.1.11, these backends require the exact model/nozzle preset from the selected installation and stop on profile preparation failures. A process override cannot bypass that gate. See [configuration and validation limits](https://github.com/DMontgomery40/bambu-printer-mcp/blob/main/docs/FULU.md#fulu-and-orca-cli-safety-limit).
|
|
1117
1117
|
|
|
1118
|
-
**OrcaSlicer CLI transforms:** OrcaSlicer 2.4.2's CLI segfaults when `scale` or `rotate_x`/`rotate_y` moves an object below the bed while arranging, which is the default for STL input. For STL input with `orcaslicer` or `orcaslicer-bambulab`, the server applies `scale` and the rotations to a copy of the mesh in the CLI's order and leaves those flags out. For 3MF input it refuses `scale` above 1, `rotate_x` or `rotate_y` together with `arrange: true`. `repetitions` copies an STL with Orca's `--clone-objects`. `clone_objects` takes one total count, because the CLI counts copies per loaded file. With `arrange: false`, an STL that is not already on the plate fails to slice. A failure names the slicer's own reason.
|
|
1118
|
+
**OrcaSlicer CLI transforms:** OrcaSlicer 2.4.2's CLI segfaults when `scale` or `rotate_x`/`rotate_y` moves an object below the bed while arranging, which is the default for STL input. OrcaSlicer fixed this after 2.4.2 in [#14415](https://github.com/OrcaSlicer/OrcaSlicer/pull/14415), first released in 2.5.0-alpha. For STL input with `orcaslicer` or `orcaslicer-bambulab`, the server applies `scale` and the rotations to a copy of the mesh in the CLI's order and leaves those flags out. For 3MF input it refuses `scale` above 1, `rotate_x` or `rotate_y` together with `arrange: true`. `repetitions` copies an STL with Orca's `--clone-objects`. `clone_objects` takes one total count, because the CLI counts copies per loaded file. With `arrange: false`, an STL that is not already on the plate fails to slice. A failure names the slicer's own reason.
|
|
1119
1119
|
|
|
1120
1120
|
`slicer_path` and `slicer_profile` fall back to the `SLICER_PATH` and `SLICER_PROFILE` environment variables when omitted. Per-call `slicer_path` overrides require `MCP_ALLOW_EXECUTABLE_ARG=1`.
|
|
1121
1121
|
|
package/dist/printers/bambu.d.ts
CHANGED
|
@@ -113,10 +113,6 @@ export declare class BambuImplementation {
|
|
|
113
113
|
files: string[];
|
|
114
114
|
directories: Record<string, string[]>;
|
|
115
115
|
}>;
|
|
116
|
-
getFile(host: string, serial: string, token: string, filename: string): Promise<{
|
|
117
|
-
name: string;
|
|
118
|
-
exists: boolean;
|
|
119
|
-
}>;
|
|
120
116
|
uploadFile(host: string, serial: string, token: string, filePath: string, filename: string, print: boolean, bambuModel?: string, upload?: (snapshot: string, destination: string, assertActive: () => void) => Promise<void>): Promise<{
|
|
121
117
|
status: string;
|
|
122
118
|
uploaded: boolean;
|
package/dist/printers/bambu.js
CHANGED
|
@@ -12,7 +12,6 @@ import { bridgeAmsMapping2Entry, bridgeAmsMappingValue, externalTrayForNozzle, d
|
|
|
12
12
|
import { describeHmsKey, hiddenHmsKeys, hiddenHmsNotices, reportedHmsKey, unchippedNozzles, validatePrinterState, manualHeatingRequirements } from "../safety/printer-state.js";
|
|
13
13
|
import { withPrinterOperation, withPrintSnapshot, uniquePrintName, normalizedRemotePath, cancelPendingPrinterOperations } from "../safety/artifact.js";
|
|
14
14
|
import { Client as FTPClient } from "basic-ftp";
|
|
15
|
-
import { BambuPrinter } from "bambu-js";
|
|
16
15
|
import * as mqtt from "mqtt";
|
|
17
16
|
import { BambuClient, GCodeFileCommand, GCodeLineCommand, PushAllCommand, UpdateFanCommand, UpdateLightCommand, UpdateStateCommand, } from "bambu-node";
|
|
18
17
|
/**
|
|
@@ -1256,21 +1255,6 @@ export class BambuImplementation {
|
|
|
1256
1255
|
directories: filesByDirectory,
|
|
1257
1256
|
};
|
|
1258
1257
|
}
|
|
1259
|
-
async getFile(host, serial, token, filename) {
|
|
1260
|
-
const printer = new BambuPrinter(host, serial, token);
|
|
1261
|
-
const normalized = filename.replace(/^\/+/, "");
|
|
1262
|
-
const directory = path.posix.dirname(normalized) === "." ? "cache" : path.posix.dirname(normalized);
|
|
1263
|
-
const baseName = path.posix.basename(normalized);
|
|
1264
|
-
let exists = false;
|
|
1265
|
-
await printer.manipulateFiles(async (context) => {
|
|
1266
|
-
const entries = await context.readDir(directory);
|
|
1267
|
-
exists = entries.includes(baseName);
|
|
1268
|
-
});
|
|
1269
|
-
return {
|
|
1270
|
-
name: `${directory}/${baseName}`,
|
|
1271
|
-
exists,
|
|
1272
|
-
};
|
|
1273
|
-
}
|
|
1274
1258
|
async uploadFile(host, serial, token, filePath, filename, print, bambuModel, upload) {
|
|
1275
1259
|
const remotePath = normalizedRemotePath(filename);
|
|
1276
1260
|
if (!print) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "bambu-printer-mcp",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.36",
|
|
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": {
|
|
@@ -49,7 +49,6 @@
|
|
|
49
49
|
"license": "GPL-2.0",
|
|
50
50
|
"dependencies": {
|
|
51
51
|
"@modelcontextprotocol/sdk": "^1.32.1",
|
|
52
|
-
"bambu-js": "^2.2.2",
|
|
53
52
|
"bambu-node": "3.22.21",
|
|
54
53
|
"basic-ftp": "^6.2.3",
|
|
55
54
|
"dotenv": "^16.3.1",
|
package/src/printers/bambu.ts
CHANGED
|
@@ -12,7 +12,6 @@ import { bridgeAmsMapping2Entry, bridgeAmsMappingValue, externalTrayForNozzle, d
|
|
|
12
12
|
import { describeHmsKey, hiddenHmsKeys, hiddenHmsNotices, reportedHmsKey, unchippedNozzles, validatePrinterState, manualHeatingRequirements, type PrinterStateRequirements } from "../safety/printer-state.js";
|
|
13
13
|
import { withPrinterOperation, withPrintSnapshot, uniquePrintName, normalizedRemotePath, cancelPendingPrinterOperations } from "../safety/artifact.js";
|
|
14
14
|
import { Client as FTPClient } from "basic-ftp";
|
|
15
|
-
import { BambuPrinter } from "bambu-js";
|
|
16
15
|
import * as mqtt from "mqtt";
|
|
17
16
|
import {
|
|
18
17
|
BambuClient,
|
|
@@ -1453,26 +1452,6 @@ export class BambuImplementation {
|
|
|
1453
1452
|
};
|
|
1454
1453
|
}
|
|
1455
1454
|
|
|
1456
|
-
async getFile(host: string, serial: string, token: string, filename: string) {
|
|
1457
|
-
const printer = new BambuPrinter(host, serial, token);
|
|
1458
|
-
|
|
1459
|
-
const normalized = filename.replace(/^\/+/, "");
|
|
1460
|
-
const directory = path.posix.dirname(normalized) === "." ? "cache" : path.posix.dirname(normalized);
|
|
1461
|
-
const baseName = path.posix.basename(normalized);
|
|
1462
|
-
|
|
1463
|
-
let exists = false;
|
|
1464
|
-
|
|
1465
|
-
await printer.manipulateFiles(async (context) => {
|
|
1466
|
-
const entries = await context.readDir(directory);
|
|
1467
|
-
exists = entries.includes(baseName);
|
|
1468
|
-
});
|
|
1469
|
-
|
|
1470
|
-
return {
|
|
1471
|
-
name: `${directory}/${baseName}`,
|
|
1472
|
-
exists,
|
|
1473
|
-
};
|
|
1474
|
-
}
|
|
1475
|
-
|
|
1476
1455
|
async uploadFile(
|
|
1477
1456
|
host: string, serial: string, token: string, filePath: string,
|
|
1478
1457
|
filename: string, print: boolean, bambuModel?: string,
|