mcp-3d-printer-server 1.0.2 → 1.2.1

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.
@@ -1,9 +1,10 @@
1
- import { PrinterImplementation, BambuPrinterStore } from "../types.js";
1
+ import { PrinterImplementation } from "../types.js";
2
2
  interface BambuPrintOptionsInternal {
3
3
  projectName: string;
4
4
  filePath: string;
5
5
  useAMS?: boolean;
6
6
  plateIndex?: number;
7
+ bedType?: string;
7
8
  bedLeveling?: boolean;
8
9
  flowCalibration?: boolean;
9
10
  vibrationCalibration?: boolean;
@@ -13,30 +14,40 @@ interface BambuPrintOptionsInternal {
13
14
  md5?: string;
14
15
  }
15
16
  export declare class BambuImplementation extends PrinterImplementation {
16
- private bambuPrinterStore;
17
- private mqttClients;
18
- private mqttConnectionPromises;
19
- constructor(apiClient: any, bambuPrinterStore: BambuPrinterStore);
20
- private getBambuPrinterForFTP;
21
- private getMqttClient;
22
- disconnectAllMqtt(): Promise<void>;
17
+ private printerStore;
18
+ constructor(apiClient: any);
19
+ private getPrinter;
20
+ private resolveProjectFileMetadata;
23
21
  getStatus(host: string, port: string, apiKey: string): Promise<any>;
24
22
  print3mf(host: string, serial: string, token: string, options: BambuPrintOptionsInternal): Promise<any>;
25
23
  cancelJob(host: string, port: string, apiKey: string): Promise<any>;
26
- setTemperature(host: string, port: string, apiKey: string, component: string, temperature: number): Promise<void>;
24
+ setTemperature(host: string, port: string, apiKey: string, component: string, temperature: number): Promise<{
25
+ status: string;
26
+ message: string;
27
+ command: string;
28
+ }>;
27
29
  getFiles(host: string, port: string, apiKey: string): Promise<{
28
30
  files: string[];
31
+ directories: Record<string, string[]>;
29
32
  }>;
30
33
  getFile(host: string, port: string, apiKey: string, filename: string): Promise<{
31
34
  name: string;
32
35
  exists: boolean;
33
36
  }>;
34
- uploadFile(host: string, port: string, apiKey: string, filePath: string, filename: string, print: boolean): Promise<{
37
+ uploadFile(host: string, port: string, apiKey: string, filePath: string, filename: string, print: boolean): Promise<Record<string, unknown>>;
38
+ startJob(host: string, port: string, apiKey: string, filename: string): Promise<{
35
39
  status: string;
36
40
  message: string;
41
+ file: string;
37
42
  }>;
38
- startJob(host: string, port: string, apiKey: string, filename: string): Promise<void>;
39
- private publishMqttCommand;
43
+ /**
44
+ * Upload a file to the printer via FTP using basic-ftp directly.
45
+ * Bypasses bambu-js's sendFile which has a double-path bug (ensureDir CDs
46
+ * into the target directory, then uploadFrom uses the full relative path
47
+ * again, resulting in e.g. /cache/cache/file.3mf).
48
+ */
49
+ private ftpUpload;
40
50
  private extractBambuCredentials;
51
+ disconnectAll(): Promise<void>;
41
52
  }
42
53
  export {};