bambu-printer-mcp 1.1.62 → 1.1.64
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 +8 -0
- package/dist/counterpart/discovery.d.ts +85 -0
- package/dist/counterpart/discovery.js +119 -0
- package/dist/counterpart/filaments.d.ts +307 -0
- package/dist/counterpart/filaments.js +273 -0
- package/dist/counterpart/remote.d.ts +47 -0
- package/dist/counterpart/remote.js +141 -0
- package/dist/counterpart/setup.d.ts +292 -0
- package/dist/counterpart/setup.js +91 -0
- package/dist/counterpart/sliced-file.d.ts +31 -0
- package/dist/counterpart/sliced-file.js +110 -0
- package/dist/index.js +145 -4
- package/dist/safety/printer-state.d.ts +1 -0
- package/dist/safety/printer-state.js +1 -1
- package/dist/slicer/slice-cache.d.ts +28 -0
- package/dist/slicer/slice-cache.js +178 -0
- package/dist/stl/stl-manipulator.js +15 -1
- package/dist/tool-annotations.js +3 -0
- package/package.json +1 -1
- package/src/counterpart/discovery.ts +111 -0
- package/src/counterpart/filaments.ts +297 -0
- package/src/counterpart/remote.ts +160 -0
- package/src/counterpart/setup.ts +127 -0
- package/src/counterpart/sliced-file.ts +115 -0
- package/src/index.ts +138 -4
- package/src/safety/printer-state.ts +1 -1
- package/src/slicer/slice-cache.ts +171 -0
- package/src/stl/stl-manipulator.ts +13 -1
- package/src/tool-annotations.ts +3 -0
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
import fs from "node:fs";
|
|
2
|
+
import { loadSafe3mfArchive, readBoundedPrintFile } from "../safety/archive.js";
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* What a client shows about a sliced file, read here so it never parses slicer formats itself (Counterpart PRD
|
|
6
|
+
* §8.0 item 9): the selected plate's estimate and slice settings, and how many printable plates the file has.
|
|
7
|
+
* Bambu Studio and OrcaSlicer 3MFs carry them in Metadata/slice_info.config, project_settings.config and the
|
|
8
|
+
* plate's G-code header; a G-code file in its own header and footer comments. Anything not found is left out.
|
|
9
|
+
*/
|
|
10
|
+
export interface SlicedFileFacts {
|
|
11
|
+
plate_count?: number;
|
|
12
|
+
estimate?: { seconds?: number; grams?: number };
|
|
13
|
+
settings: { layer_height_mm?: number; sparse_infill_percent?: number; wall_loops?: number; layer_count?: number };
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
const number = (value: unknown): number | undefined => {
|
|
17
|
+
const parsed = typeof value === "number" ? value : typeof value === "string" ? Number.parseFloat(value) : NaN;
|
|
18
|
+
return Number.isFinite(parsed) && parsed >= 0 ? parsed : undefined;
|
|
19
|
+
};
|
|
20
|
+
const first = (value: unknown) => Array.isArray(value) ? value[0] : value;
|
|
21
|
+
const defined = <T extends Record<string, unknown>>(value: T): T =>
|
|
22
|
+
Object.fromEntries(Object.entries(value).filter(([, item]) => item !== undefined)) as T;
|
|
23
|
+
|
|
24
|
+
function headerSettings(text: string): SlicedFileFacts["settings"] {
|
|
25
|
+
const read = (pattern: RegExp) => number(text.match(pattern)?.[1]);
|
|
26
|
+
const layers = read(/^;\s*(?:total layer number|total layers count|LAYER_COUNT)\s*[:=]\s*(\d+)/im);
|
|
27
|
+
const walls = read(/^;\s*(?:wall_loops|perimeters)\s*=\s*(\d+)/im);
|
|
28
|
+
return defined({
|
|
29
|
+
layer_height_mm: read(/^;\s*layer_height\s*=\s*([\d.]+)/im),
|
|
30
|
+
sparse_infill_percent: read(/^;\s*(?:sparse_infill_density|fill_density)\s*=\s*([\d.]+)%/im),
|
|
31
|
+
wall_loops: walls === undefined ? undefined : Math.trunc(walls),
|
|
32
|
+
layer_count: layers ? Math.trunc(layers) : undefined,
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
/** The facts of a sliced 3MF or G-code file for one zero-based plate; what can't be read is left out, never an error. */
|
|
37
|
+
export async function slicedFileFacts(filePath: string, plateIndex = 0): Promise<SlicedFileFacts> {
|
|
38
|
+
try { return await readFacts(filePath, plateIndex); } catch { return { settings: {} }; }
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
async function readFacts(filePath: string, plateIndex: number): Promise<SlicedFileFacts> {
|
|
42
|
+
const head = Buffer.alloc(4);
|
|
43
|
+
const handle = await fs.promises.open(filePath, "r");
|
|
44
|
+
try { await handle.read(head, 0, 4, 0); } finally { await handle.close(); }
|
|
45
|
+
if (head[0] !== 0x50 || head[1] !== 0x4b) {
|
|
46
|
+
// G-code: PrusaSlicer and Orca write their settings in a footer, others in a header; read both ends.
|
|
47
|
+
const stat = await fs.promises.stat(filePath);
|
|
48
|
+
const size = 256 * 1024;
|
|
49
|
+
const read = async (start: number) => {
|
|
50
|
+
const buffer = Buffer.alloc(Math.min(size, stat.size));
|
|
51
|
+
const file = await fs.promises.open(filePath, "r");
|
|
52
|
+
try { await file.read(buffer, 0, buffer.length, start); } finally { await file.close(); }
|
|
53
|
+
return buffer.toString("latin1");
|
|
54
|
+
};
|
|
55
|
+
return { plate_count: 1, settings: headerSettings(`${await read(0)}\n${await read(Math.max(0, stat.size - size))}`) };
|
|
56
|
+
}
|
|
57
|
+
const zip = await loadSafe3mfArchive(await readBoundedPrintFile(filePath));
|
|
58
|
+
const plates = new Set(Object.keys(zip.files).flatMap(name => /^Metadata\/plate_([1-9]\d*)\.gcode$/.exec(name)?.[1] ?? []));
|
|
59
|
+
const text = async (name: string) => zip.file(name)?.async("string");
|
|
60
|
+
let settings: SlicedFileFacts["settings"] = {};
|
|
61
|
+
const project = await text("Metadata/project_settings.config");
|
|
62
|
+
if (project) {
|
|
63
|
+
try {
|
|
64
|
+
const values = JSON.parse(project) as Record<string, unknown>;
|
|
65
|
+
const infill = String(first(values.sparse_infill_density) ?? "");
|
|
66
|
+
const walls = number(first(values.wall_loops));
|
|
67
|
+
settings = defined({
|
|
68
|
+
layer_height_mm: number(first(values.layer_height)),
|
|
69
|
+
sparse_infill_percent: infill === "" ? undefined : number(infill.replace("%", "")),
|
|
70
|
+
wall_loops: walls === undefined ? undefined : Math.trunc(walls),
|
|
71
|
+
});
|
|
72
|
+
} catch { /* the settings stay unknown */ }
|
|
73
|
+
}
|
|
74
|
+
// Only the plate G-code's header, never the whole (often hundreds of MB) as a string.
|
|
75
|
+
const gcode = await zip.file(`Metadata/plate_${plateIndex + 1}.gcode`)?.async("nodebuffer");
|
|
76
|
+
// The project settings are authoritative; the plate's G-code header adds the layer count.
|
|
77
|
+
if (gcode) settings = { ...headerSettings(gcode.subarray(0, 64 * 1024).toString("latin1")), ...settings };
|
|
78
|
+
let estimate: SlicedFileFacts["estimate"];
|
|
79
|
+
const info = await text("Metadata/slice_info.config");
|
|
80
|
+
const plate = info?.match(/<plate(?:\s[^>]*)?>[\s\S]*?<\/plate>/g)
|
|
81
|
+
?.find(block => new RegExp(`<metadata\\s+key=["']index["']\\s+value=["']${plateIndex + 1}["']`).test(block));
|
|
82
|
+
if (plate) {
|
|
83
|
+
const value = (key: string) => {
|
|
84
|
+
const found = plate.match(new RegExp(`<metadata\\s+key=["']${key}["']\\s+value=["']([^"']+)["']`))?.[1];
|
|
85
|
+
const parsed = found && /^\d+(?:\.\d+)?$/.test(found) ? Number(found) : undefined;
|
|
86
|
+
return parsed !== undefined && parsed > 0 ? parsed : undefined;
|
|
87
|
+
};
|
|
88
|
+
const seconds = value("prediction"), grams = value("weight");
|
|
89
|
+
if (seconds !== undefined || grams !== undefined) estimate = defined({ seconds, grams });
|
|
90
|
+
}
|
|
91
|
+
return { ...(plates.size ? { plate_count: plates.size } : {}), ...(estimate ? { estimate } : {}), settings };
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
/**
|
|
95
|
+
* Bambu Studio's (or OrcaSlicer's) verdict on a slice, from its result.json: whether it failed, its own words
|
|
96
|
+
* (the error and every plate's warning, verbatim), and how many plates it sliced.
|
|
97
|
+
*/
|
|
98
|
+
export interface SlicerReport { failed: boolean; message?: string; plate_count?: number }
|
|
99
|
+
|
|
100
|
+
const clean = (text: string) => text.replace(/\r\n?/g, "\n").replace(/[\x00-\x09\x0b-\x1f\x7f]/g, " ").trim();
|
|
101
|
+
|
|
102
|
+
export function slicerReport(result: unknown): SlicerReport | undefined {
|
|
103
|
+
if (!result || typeof result !== "object" || Array.isArray(result)) return undefined;
|
|
104
|
+
const value = result as { return_code?: unknown; error_string?: unknown; sliced_plates?: unknown };
|
|
105
|
+
const plates = Array.isArray(value.sliced_plates) ? value.sliced_plates as Record<string, unknown>[] : [];
|
|
106
|
+
const ids = plates.map(plate => plate && typeof plate === "object" ? plate.id : undefined);
|
|
107
|
+
const plateCount = ids.length && ids.every(id => typeof id === "number" && Number.isSafeInteger(id) && id > 0) ? new Set(ids).size : undefined;
|
|
108
|
+
const warnings = plates.map(plate => plate && typeof plate.warning_message === "string" ? clean(plate.warning_message) : "").filter(Boolean);
|
|
109
|
+
// Anything but the slicer's success code fails closed, a missing one included.
|
|
110
|
+
const failed = value.return_code !== 0;
|
|
111
|
+
const error = typeof value.error_string === "string" ? clean(value.error_string) : "";
|
|
112
|
+
const words = [...new Set([...(failed && error ? [error] : []), ...warnings])].join("\n").slice(0, 2000);
|
|
113
|
+
if (failed) return { failed, message: words || `The slicer could not slice this model (return code ${String(value.return_code)}).` };
|
|
114
|
+
return { failed, ...(words ? { message: words } : {}), ...(plateCount ? { plate_count: plateCount } : {}) };
|
|
115
|
+
}
|
package/src/index.ts
CHANGED
|
@@ -1,6 +1,17 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {CAMERA_STREAM_TOOLS} from "./printers/camera-tools.js";
|
|
3
3
|
import { withAnnotations } from "./tool-annotations.js";
|
|
4
|
+
import { withRemote } from "./counterpart/remote.js";
|
|
5
|
+
import { slicedFileFacts, slicerReport } from "./counterpart/sliced-file.js";
|
|
6
|
+
|
|
7
|
+
/** The slicer's verdict beside its result.json (`slicer_report`). */
|
|
8
|
+
function reportOf(result: unknown): { slicer_report?: ReturnType<typeof slicerReport> } {
|
|
9
|
+
const report = slicerReport(result);
|
|
10
|
+
return report ? { slicer_report: report } : {};
|
|
11
|
+
}
|
|
12
|
+
function withSlicerReport<T extends { slicer_result?: unknown }>(sliced: T): T & { slicer_report?: ReturnType<typeof slicerReport> } {
|
|
13
|
+
return { ...sliced, ...reportOf(sliced.slicer_result) };
|
|
14
|
+
}
|
|
4
15
|
|
|
5
16
|
import { Server } from "@modelcontextprotocol/sdk/server/index.js";
|
|
6
17
|
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
|
|
@@ -60,6 +71,9 @@ import { isDualNozzleModel } from "./safety/limits.js";
|
|
|
60
71
|
import { withPrinterOperation, withPrintSnapshot, uniquePrintName } from "./safety/artifact.js";
|
|
61
72
|
import { detectProfilesRoot } from "./slicer/profile-flatten.js";
|
|
62
73
|
import { bambuPrinterInfo, bambuSliceCapabilities } from "./counterpart/info.js";
|
|
74
|
+
import { DISCOVER_OUTPUT_SCHEMA, discoverBambu } from "./counterpart/discovery.js";
|
|
75
|
+
import { SETUP_FIELDS_OUTPUT_SCHEMA, bambuSetupFields, slicerSetup, type SlicerSetup } from "./counterpart/setup.js";
|
|
76
|
+
import { PROPOSE_FILAMENTS_INPUT_PROPERTIES, PROPOSE_FILAMENTS_OUTPUT_SCHEMA, NO_COLOUR_NAMES, bambuTrayLabel, loadColourNames, proposeFilaments, spoolName, type ColourNames, type ProposalTray } from "./counterpart/filaments.js";
|
|
63
77
|
import { DESIGN_PROMPTS, FDM_CAPABILITY_GUIDANCE, FDM_CAPABILITY_RESOURCE, FDM_CAPABILITY_URI, SERVER_INSTRUCTIONS } from "./design-guidance.js";
|
|
64
78
|
import { bambuProgress, offlineProgress } from "./counterpart/progress.js";
|
|
65
79
|
import { makeCounterpart3mf } from "./counterpart/make-3mf.js";
|
|
@@ -135,6 +149,7 @@ const SERVER_INFO = {
|
|
|
135
149
|
/** Tools that declare an outputSchema: they always return structuredContent, and errors carry none. */
|
|
136
150
|
const OUTPUT_SCHEMA_TOOLS = new Set([
|
|
137
151
|
"counterpart_printer_info", "counterpart_print_progress", "counterpart_make_3mf",
|
|
152
|
+
"counterpart_discover_printers", "counterpart_setup_fields", "counterpart_propose_filaments",
|
|
138
153
|
"fusion_mcp_status", "fusion_mcp_new_design", "fusion_mcp_export",
|
|
139
154
|
"camera_stream_start", "camera_frame", "camera_stream_stop",
|
|
140
155
|
]);
|
|
@@ -318,6 +333,10 @@ type PrinterFilamentInventory = {
|
|
|
318
333
|
profile_resolution: "exact-model-nozzle" | "model" | "generic" | "unresolved";
|
|
319
334
|
match_confidence: "high" | "medium" | "low" | "none";
|
|
320
335
|
display_name: string;
|
|
336
|
+
/** Where the tray sits, as Bambu Studio labels it ("A2"). */
|
|
337
|
+
label: string | null;
|
|
338
|
+
/** The spool as a person names it: Bambu's colour name and product ("Sunflower Yellow PLA Basic"). */
|
|
339
|
+
spool_name: string | null;
|
|
321
340
|
profile_candidates: string[];
|
|
322
341
|
}>;
|
|
323
342
|
recommended: {
|
|
@@ -335,6 +354,44 @@ const COLLAR_CHARM_POLICY = getCollarCharmRolePolicy();
|
|
|
335
354
|
|
|
336
355
|
let filamentProfileIndexCache: FilamentProfileIndex | null = null;
|
|
337
356
|
|
|
357
|
+
/** The configured slicer's BBL filament profile folder, when the slicer configuration resolves. */
|
|
358
|
+
function filamentProfileDirectory(): string | undefined {
|
|
359
|
+
try {
|
|
360
|
+
const { slicerType, slicerPath } = resolveSlicerConfig(undefined);
|
|
361
|
+
return path.join(detectProfilesRoot(slicerPath, slicerType), "BBL", "filament");
|
|
362
|
+
} catch { return undefined; }
|
|
363
|
+
}
|
|
364
|
+
/** An executable path, or a bare command found on PATH. */
|
|
365
|
+
function executableExists(command: string): boolean {
|
|
366
|
+
if (!command) return false;
|
|
367
|
+
if (command.includes("/") || command.includes("\\")) return fs.existsSync(command);
|
|
368
|
+
return (process.env.PATH ?? "").split(path.delimiter).some(dir => dir && fs.existsSync(path.join(dir, command)));
|
|
369
|
+
}
|
|
370
|
+
/** A Bambu profile tree: BBL's machine profiles, or Orca's packed BBL.opc. */
|
|
371
|
+
function bblProfilesAt(root: string): boolean {
|
|
372
|
+
return fs.existsSync(path.join(root, "BBL", "machine")) || fs.existsSync(path.join(root, "BBL.opc"));
|
|
373
|
+
}
|
|
374
|
+
/** The slicer this server would run now and the settings that choose it, for counterpart_setup_fields. */
|
|
375
|
+
function slicerSetupNow(): SlicerSetup {
|
|
376
|
+
let config: { slicerType: string; slicerPath: string };
|
|
377
|
+
try { config = resolveSlicerConfig(undefined); } catch { config = { slicerType: String(DEFAULT_SLICER_TYPE), slicerPath: "" }; }
|
|
378
|
+
if (config.slicerType === "orca-slicer-api") return slicerSetup({ types: SLICER_TYPES, type: config.slicerType, found: Boolean(process.env.SLICER_API_URL), remote: true });
|
|
379
|
+
const bbl = ["bambustudio", "orcaslicer", "orcaslicer-bambulab"].includes(config.slicerType);
|
|
380
|
+
let profilesRoot: string | undefined;
|
|
381
|
+
try { profilesRoot = bbl ? detectProfilesRoot(config.slicerPath, config.slicerType) : undefined; } catch { profilesRoot = undefined; }
|
|
382
|
+
return slicerSetup({ types: SLICER_TYPES, type: config.slicerType, path: config.slicerPath, found: executableExists(config.slicerPath),
|
|
383
|
+
...(bbl ? { profilesFound: Boolean(profilesRoot && bblProfilesAt(profilesRoot)), ...(profilesRoot ? { profilesRoot } : {}) } : {}) });
|
|
384
|
+
}
|
|
385
|
+
let colourNamesCache: ColourNames | null = null;
|
|
386
|
+
/** Bambu Studio's own colour names for its filaments, read once from the configured slicer's profiles. */
|
|
387
|
+
function colourNames(): ColourNames {
|
|
388
|
+
if (colourNamesCache) return colourNamesCache;
|
|
389
|
+
const names = loadColourNames(filamentProfileDirectory());
|
|
390
|
+
// A slicer installed later still names its colours: only a table that loaded is kept.
|
|
391
|
+
if (names !== NO_COLOUR_NAMES) colourNamesCache = names;
|
|
392
|
+
return names;
|
|
393
|
+
}
|
|
394
|
+
|
|
338
395
|
function buildFilamentProfileIndex(): FilamentProfileIndex {
|
|
339
396
|
const byName = new Map<string, string>();
|
|
340
397
|
const baseNameByFilamentId = new Map<string, string>();
|
|
@@ -501,6 +558,9 @@ function normalizePrinterFilamentInventory(
|
|
|
501
558
|
profile_resolution: profileResolution.resolution,
|
|
502
559
|
match_confidence: matchConfidence,
|
|
503
560
|
display_name: displayParts.length > 0 ? displayParts.join(" ") : "empty/unknown",
|
|
561
|
+
label: amsId !== null && trayId !== null ? bambuTrayLabel(amsId, trayId) : null,
|
|
562
|
+
spool_name: trayType ? spoolName(traySubBrands || trayType,
|
|
563
|
+
trayInfoIdx && trayColor ? colourNames().spool(trayInfoIdx, trayColor) : undefined) : null,
|
|
504
564
|
profile_candidates: profileResolution.paths,
|
|
505
565
|
});
|
|
506
566
|
}
|
|
@@ -3416,6 +3476,44 @@ class BambuPrinterMCPServer {
|
|
|
3416
3476
|
},
|
|
3417
3477
|
outputSchema: PRINTER_INFO_OUTPUT_SCHEMA
|
|
3418
3478
|
},
|
|
3479
|
+
{
|
|
3480
|
+
name: "counterpart_discover_printers",
|
|
3481
|
+
description: "Counterpart contract (counterpart/1): Bambu printers on the local network, from their own SSDP announcements (UDP 2021), with serial, model (as bambu_model names it), name and firmware. Listens for duration_ms (default 4000). network is \"unavailable\" when another app holds the port. Never connects to or authenticates with a printer.",
|
|
3482
|
+
inputSchema: {
|
|
3483
|
+
type: "object",
|
|
3484
|
+
properties: { duration_ms: { type: "integer", minimum: 500, maximum: 15000, description: "How long to listen (default 4000)." } },
|
|
3485
|
+
additionalProperties: false
|
|
3486
|
+
},
|
|
3487
|
+
outputSchema: DISCOVER_OUTPUT_SCHEMA
|
|
3488
|
+
},
|
|
3489
|
+
{
|
|
3490
|
+
name: "counterpart_setup_fields",
|
|
3491
|
+
description: "Counterpart contract (counterpart/1): the printers this server drives and the settings it reads for each, by .env variable name (first canonical, then aliases): label, hint, whether required, the model choices and the model each serial-number prefix names. Pass serial to get the model it names. Sends nothing to a printer and returns no configured values.",
|
|
3492
|
+
inputSchema: {
|
|
3493
|
+
type: "object",
|
|
3494
|
+
properties: { serial: { type: "string", maxLength: 64, description: "A Bambu serial number: model is the one it names, when known." } },
|
|
3495
|
+
additionalProperties: false
|
|
3496
|
+
},
|
|
3497
|
+
outputSchema: SETUP_FIELDS_OUTPUT_SCHEMA
|
|
3498
|
+
},
|
|
3499
|
+
{
|
|
3500
|
+
name: "counterpart_propose_filaments",
|
|
3501
|
+
description: "Counterpart contract (counterpart/1): which loaded AMS spool prints each of a model's colours, before slicing. Reads the live AMS once. trays lists the spools a person may choose (label like \"A2\", a person-readable name, colour, material, feed). proposal gives each filament its nearest spool in OKLab colour with the asked-for material preferred, and a verdict: same-colour, closest (that colour isn't loaded; note says so), no-colour or none. One print feeds from one source. Pass chosen to check the person's spools against what is loaded now; mapping then lists every filament slot's spool (painted slots included), and problems says why a choice can't print.",
|
|
3502
|
+
inputSchema: {
|
|
3503
|
+
type: "object",
|
|
3504
|
+
properties: {
|
|
3505
|
+
...PROPOSE_FILAMENTS_INPUT_PROPERTIES,
|
|
3506
|
+
bambu_model: { type: "string", description: "Printer model; defaults to BAMBU_MODEL. Selects the filament profiles that decide which spools can slice." },
|
|
3507
|
+
nozzle_diameter: { type: "string", description: "Nozzle diameter (default NOZZLE_DIAMETER or 0.4)." },
|
|
3508
|
+
host: { type: "string", description: "Hostname or IP of the printer (default: value from env)" },
|
|
3509
|
+
bambu_serial: { type: "string", description: "Serial number (default: value from env)" },
|
|
3510
|
+
bambu_token: { type: "string", description: "Access token (default: value from env); never returned." }
|
|
3511
|
+
},
|
|
3512
|
+
required: ["filaments"],
|
|
3513
|
+
additionalProperties: false
|
|
3514
|
+
},
|
|
3515
|
+
outputSchema: PROPOSE_FILAMENTS_OUTPUT_SCHEMA
|
|
3516
|
+
},
|
|
3419
3517
|
{
|
|
3420
3518
|
name: "counterpart_print_route",
|
|
3421
3519
|
description: "Counterpart contract (counterpart/1): how this server reaches the printer for prints and for Stop/Pause/Resume. route is \"lan\" (the local network through FULU's BambuNetwork bridge, or the configured X2D native or Bambu Connect mode), \"cloud\" (Bambu Cloud through FULU's bridge) or \"developer\" (the local network straight to a printer in LAN Only + Developer Mode, whose Pause, Resume and Stop need no Bambu app). options lists each with its label, whether it can be chosen here (and why not) and what controls do on it; choices lists the ids that can be chosen. mode and type are BAMBU_DEFAULT_CONNECTION_MODE and BAMBU_DEFAULT_CONNECTION_TYPE as resolved. Pass route to change it: the change applies to the next print and control at once, and is saved to the .env file in this server's working directory when that file exists (savedTo; null otherwise). Sends nothing to the printer.",
|
|
@@ -3529,7 +3627,7 @@ class BambuPrinterMCPServer {
|
|
|
3529
3627
|
},
|
|
3530
3628
|
outputSchema: FUSION_EXPORT_OUTPUT_SCHEMA
|
|
3531
3629
|
}
|
|
3532
|
-
].map(withAnnotations)
|
|
3630
|
+
].map(withAnnotations).map(withRemote)
|
|
3533
3631
|
};
|
|
3534
3632
|
});
|
|
3535
3633
|
|
|
@@ -3676,6 +3774,8 @@ class BambuPrinterMCPServer {
|
|
|
3676
3774
|
artifact: { sha256: inspection.sha256, byte_length: byteLength, file_format: path.extname(snapshot).toLowerCase() === ".3mf" ? "3mf" : "gcode" },
|
|
3677
3775
|
selection: { bambu_model: model, plate_index: plateIndex, ...(nozzles === undefined ? {} : { nozzle_diameters: nozzles }), ...(bedType === undefined ? {} : { bed_type: bedType }) },
|
|
3678
3776
|
inspection,
|
|
3777
|
+
// The plate's estimate and slice settings, and the file's plate count, read here so clients don't parse slicer files.
|
|
3778
|
+
sliced: await slicedFileFacts(snapshot, plateIndex),
|
|
3679
3779
|
...(preview ? { preview } : {}),
|
|
3680
3780
|
};
|
|
3681
3781
|
});
|
|
@@ -4457,8 +4557,9 @@ class BambuPrinterMCPServer {
|
|
|
4457
4557
|
sliceBambuOptions
|
|
4458
4558
|
);
|
|
4459
4559
|
await progressNotifications;
|
|
4460
|
-
// The text stays the sliced file's path; slicer_result is the slicer's own result.json, verbatim
|
|
4461
|
-
|
|
4560
|
+
// The text stays the sliced file's path; slicer_result is the slicer's own result.json, verbatim, and
|
|
4561
|
+
// slicer_report its verdict and words, so clients don't read the slicer's format.
|
|
4562
|
+
return { content: [{ type: "text", text: sliced.path }], structuredContent: withSlicerReport(sliced) };
|
|
4462
4563
|
}
|
|
4463
4564
|
|
|
4464
4565
|
case "print_3mf": {
|
|
@@ -4819,6 +4920,39 @@ class BambuPrinterMCPServer {
|
|
|
4819
4920
|
);
|
|
4820
4921
|
break;
|
|
4821
4922
|
|
|
4923
|
+
case "counterpart_discover_printers": {
|
|
4924
|
+
const requested = Number(args?.duration_ms);
|
|
4925
|
+
const found = await discoverBambu(Number.isFinite(requested) ? requested : 4000);
|
|
4926
|
+
// Only models bambu_model accepts: the X1 (serial 00W) has none, so it stays unset.
|
|
4927
|
+
result = { contract: "counterpart/1", network: found.state, printers: found.printers.map(({ model, ...printer }) =>
|
|
4928
|
+
({ ...printer, ...(model && (VALID_BAMBU_MODELS as readonly string[]).includes(model) ? { model } : {}) })) };
|
|
4929
|
+
break;
|
|
4930
|
+
}
|
|
4931
|
+
|
|
4932
|
+
case "counterpart_setup_fields":
|
|
4933
|
+
result = bambuSetupFields({ server: SERVER_INFO, models: VALID_BAMBU_MODELS, slicer: slicerSetupNow(), ...(typeof args?.serial === "string" ? { serial: args.serial } : {}) });
|
|
4934
|
+
break;
|
|
4935
|
+
|
|
4936
|
+
case "counterpart_propose_filaments": {
|
|
4937
|
+
const requestedModel = (String(args?.bambu_model ?? DEFAULT_BAMBU_MODEL ?? "")).trim().toLowerCase();
|
|
4938
|
+
const normalizedModel = requestedModel ? validateBambuModel(requestedModel) : undefined;
|
|
4939
|
+
const inventory = await this.getResolvedPrinterFilamentInventory(host, bambuSerial, bambuToken, normalizedModel,
|
|
4940
|
+
String(args?.nozzle_diameter || DEFAULT_NOZZLE_DIAMETER));
|
|
4941
|
+
const trays: ProposalTray[] = inventory.trays.flatMap(tray => {
|
|
4942
|
+
const colour = normalizeRgbColor(tray.tray_color);
|
|
4943
|
+
if (!tray.loaded || tray.slot === null || !colour || !tray.tray_type || !tray.label) return [];
|
|
4944
|
+
// print_3mf's tray value: an AMS-HT unit (id 128 and up, one tray) is its unit id, not ams_id × 4 + tray.
|
|
4945
|
+
const slot = tray.ams_id !== null && tray.ams_id >= 128 ? tray.ams_id : tray.slot;
|
|
4946
|
+
return [{ slot, label: tray.label, name: tray.spool_name ?? tray.tray_type, colour: `#${colour.toUpperCase()}`,
|
|
4947
|
+
material: tray.tray_type, filamentId: tray.tray_info_idx ?? "", feed: "ams", sliceable: Boolean(tray.resolved_profile_path),
|
|
4948
|
+
...(tray.resolved_profile_path ? { profile: tray.resolved_profile_path } : {}) }];
|
|
4949
|
+
});
|
|
4950
|
+
result = proposeFilaments({ trays, filaments: Array.isArray(args?.filaments) ? args.filaments : [],
|
|
4951
|
+
...(Array.isArray(args?.painted) ? { painted: args.painted } : {}), ...(Array.isArray(args?.chosen) ? { chosen: args.chosen } : {}),
|
|
4952
|
+
sliced: args?.sliced === true, names: colourNames() });
|
|
4953
|
+
break;
|
|
4954
|
+
}
|
|
4955
|
+
|
|
4822
4956
|
case "counterpart_printer_info":
|
|
4823
4957
|
result = bambuPrinterInfo({ server: SERVER_INFO, host, serial: bambuSerial, model: this.displayModel(args, bambuSerial), slicerType: normalizeSlicerType(DEFAULT_SLICER_TYPE) });
|
|
4824
4958
|
break;
|
|
@@ -4918,7 +5052,7 @@ class BambuPrinterMCPServer {
|
|
|
4918
5052
|
tool: name,
|
|
4919
5053
|
...(error instanceof PrinterRefusal ? { code: error.code } : {}),
|
|
4920
5054
|
// The slicer's own result.json; the message starts with its error_string and warnings.
|
|
4921
|
-
...(error instanceof SlicerRunError && error.slicerResult ? { slicer_result: error.slicerResult } : {}),
|
|
5055
|
+
...(error instanceof SlicerRunError && error.slicerResult ? { slicer_result: error.slicerResult, ...reportOf(error.slicerResult) } : {}),
|
|
4922
5056
|
};
|
|
4923
5057
|
|
|
4924
5058
|
// MCP clients validate structuredContent against a declared outputSchema even on
|
|
@@ -4,7 +4,7 @@ import { BambuClient, GetVersionCommand, PushAllCommand } from "bambu-node";
|
|
|
4
4
|
import { isDualNozzleModel, normalizeMaterial, normalizeModel } from "./limits.js";
|
|
5
5
|
|
|
6
6
|
const MAX_REPORT_AGE_MS = 15_000;
|
|
7
|
-
const MODEL_IDS: Record<string, string> = {
|
|
7
|
+
export const MODEL_IDS: Record<string, string> = {
|
|
8
8
|
O1C: "H2C", O1C2: "H2C", O1D: "H2D", O1E: "H2D Pro", O1S: "H2S", N6: "X2D",
|
|
9
9
|
N2S: "A1", A1M: "A1 Mini", C11: "P1P", C12: "P1S", C13: "X1E", "BL-P001": "X1C", "BL-P002": "X1",
|
|
10
10
|
};
|
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
import { createHash } from "node:crypto";
|
|
2
|
+
import fs from "node:fs";
|
|
3
|
+
import os from "node:os";
|
|
4
|
+
import path from "node:path";
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Finished slices kept for reuse: slicing the same model the same way again (Print Again, or Print after a
|
|
8
|
+
* client's estimate) restores the slicer's outputs instead of running it. A slicer run is identified by exactly
|
|
9
|
+
* what it was given: the slicer executable (its path, size and modification time, so an update slices again),
|
|
10
|
+
* this server's version, and its full argument list, with every input file replaced by its content hash and every
|
|
11
|
+
* output location by a placeholder. Profiles, filament files, the model and generated override files are all
|
|
12
|
+
* arguments, so editing any of them slices again. A run whose arguments name any other directory (its contents
|
|
13
|
+
* can't be hashed) is never cached, nor is a failed slice. Presets the slicer finds by itself, not named in its
|
|
14
|
+
* arguments (its own bundled system presets), count through the executable: a slicer update slices again.
|
|
15
|
+
*
|
|
16
|
+
* SLICE_CACHE=off turns it off; SLICE_CACHE_DIR moves it (default ~/.cache/<package name>/slices). The newest
|
|
17
|
+
* SLICE_CACHE_ENTRIES (default 16) slices are kept.
|
|
18
|
+
*/
|
|
19
|
+
export interface SlicerRun {
|
|
20
|
+
command: string;
|
|
21
|
+
args: string[];
|
|
22
|
+
/** What the slicer writes, kept and restored: files, or directories it fills. */
|
|
23
|
+
outputs: string[];
|
|
24
|
+
/** Folders it writes into that aren't kept as a whole (an --outputdir shared with other files). */
|
|
25
|
+
locations?: string[];
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
const KEY_VERSION = 1;
|
|
29
|
+
/** This server's package name and version: a new release slices again. */
|
|
30
|
+
const PACKAGE = (() => {
|
|
31
|
+
try {
|
|
32
|
+
const value = JSON.parse(fs.readFileSync(new URL("../../package.json", import.meta.url), "utf8")) as { name?: unknown; version?: unknown };
|
|
33
|
+
return { name: String(value.name ?? "printer-mcp"), version: String(value.version ?? "") };
|
|
34
|
+
} catch {
|
|
35
|
+
return { name: "printer-mcp", version: "" };
|
|
36
|
+
}
|
|
37
|
+
})();
|
|
38
|
+
|
|
39
|
+
function enabled(): boolean {
|
|
40
|
+
return !/^(?:off|0|false|no)$/i.test(process.env.SLICE_CACHE ?? "");
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
export function sliceCacheRoot(): string {
|
|
44
|
+
return process.env.SLICE_CACHE_DIR || path.join(os.homedir(), ".cache", PACKAGE.name, "slices");
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
function entriesKept(): number {
|
|
48
|
+
const value = Number(process.env.SLICE_CACHE_ENTRIES);
|
|
49
|
+
return Number.isInteger(value) && value > 0 ? value : 16;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
async function fileHash(file: string): Promise<string> {
|
|
53
|
+
const hash = createHash("sha256");
|
|
54
|
+
for await (const chunk of fs.createReadStream(file)) hash.update(chunk as Buffer);
|
|
55
|
+
return hash.digest("hex");
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
function onPath(command: string): string | undefined {
|
|
59
|
+
if (path.isAbsolute(command) || command.includes("/") || command.includes("\\")) return path.resolve(command);
|
|
60
|
+
for (const dir of (process.env.PATH ?? "").split(path.delimiter)) {
|
|
61
|
+
if (!dir) continue;
|
|
62
|
+
const candidate = path.join(dir, command);
|
|
63
|
+
try { if (fs.statSync(candidate).isFile()) return candidate; } catch { /* next */ }
|
|
64
|
+
}
|
|
65
|
+
return undefined;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
/** The run's cache key, or undefined when it can't be identified exactly (then it is never cached). */
|
|
69
|
+
export async function sliceCacheKey(run: SlicerRun): Promise<string | undefined> {
|
|
70
|
+
if (!enabled()) return undefined;
|
|
71
|
+
// Never a reason for a slice to fail: anything unreadable means this run isn't kept.
|
|
72
|
+
try { return await keyOf(run); } catch { return undefined; }
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
async function keyOf(run: SlicerRun): Promise<string | undefined> {
|
|
76
|
+
const executable = onPath(run.command);
|
|
77
|
+
if (!executable) return undefined;
|
|
78
|
+
let binary: fs.Stats;
|
|
79
|
+
try { binary = await fs.promises.stat(executable); } catch { return undefined; }
|
|
80
|
+
const outputs = run.outputs.map(output => path.resolve(output));
|
|
81
|
+
const places = [...outputs, ...(run.locations ?? []).map(location => path.resolve(location))];
|
|
82
|
+
const part = async (value: string): Promise<string | undefined> => {
|
|
83
|
+
if (!value || value.startsWith("-")) return value;
|
|
84
|
+
// A relative path is a file to the slicer too (resolved against this process's directory, as it is).
|
|
85
|
+
const resolved = path.resolve(value);
|
|
86
|
+
// An output or output folder itself: where this run writes, whatever it is called.
|
|
87
|
+
const exact = places.indexOf(resolved);
|
|
88
|
+
if (exact >= 0) return `<output ${exact}>`;
|
|
89
|
+
// A file staged inside an output folder (a generated profile, a transformed mesh) is an input: its bytes count.
|
|
90
|
+
const root = places.findIndex(place => resolved.startsWith(place + path.sep));
|
|
91
|
+
let info: fs.Stats | undefined;
|
|
92
|
+
try { info = await fs.promises.stat(resolved); } catch { info = undefined; }
|
|
93
|
+
const named = root >= 0 ? `<output ${root}>${resolved.slice(places[root].length)}` : path.isAbsolute(value) ? resolved : value;
|
|
94
|
+
// A file is its bytes (and its extension, which tells the slicer what it is), not its often random name.
|
|
95
|
+
if (info?.isFile()) return `file${path.extname(resolved).toLowerCase()}#${await fileHash(resolved)}`;
|
|
96
|
+
// A folder's contents can't be hashed: such a run is never cached.
|
|
97
|
+
if (info?.isDirectory()) return undefined;
|
|
98
|
+
return named;
|
|
99
|
+
};
|
|
100
|
+
const args: string[] = [];
|
|
101
|
+
for (const arg of run.args) {
|
|
102
|
+
const parts: string[] = [];
|
|
103
|
+
for (const piece of arg.split(";")) {
|
|
104
|
+
const value = await part(piece);
|
|
105
|
+
if (value === undefined) return undefined;
|
|
106
|
+
parts.push(value);
|
|
107
|
+
}
|
|
108
|
+
args.push(parts.join(";"));
|
|
109
|
+
}
|
|
110
|
+
return createHash("sha256").update(JSON.stringify({ v: KEY_VERSION, server: PACKAGE,
|
|
111
|
+
slicer: { path: fs.realpathSync(executable), size: binary.size, mtimeMs: binary.mtimeMs }, args })).digest("hex");
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
async function touch(target: string, at: Date): Promise<void> {
|
|
115
|
+
const info = await fs.promises.stat(target);
|
|
116
|
+
if (info.isDirectory()) for (const name of await fs.promises.readdir(target)) await touch(path.join(target, name), at);
|
|
117
|
+
await fs.promises.utimes(target, at, at);
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
/** Puts a kept slice's outputs where this run would write them; false when there is none. */
|
|
121
|
+
export async function restoreSlice(key: string, run: SlicerRun): Promise<boolean> {
|
|
122
|
+
const entry = path.join(sliceCacheRoot(), key);
|
|
123
|
+
try {
|
|
124
|
+
const meta = JSON.parse(await fs.promises.readFile(path.join(entry, "meta.json"), "utf8")) as { outputs?: unknown; saved?: unknown };
|
|
125
|
+
if (meta.outputs !== run.outputs.length || !Array.isArray(meta.saved)) return false;
|
|
126
|
+
const saved = new Set(meta.saved.filter((index): index is number => typeof index === "number"));
|
|
127
|
+
// Every output the slicer wrote must still be there, or this is no slice at all.
|
|
128
|
+
for (const index of saved) if (!fs.existsSync(path.join(entry, String(index)))) return false;
|
|
129
|
+
const now = new Date();
|
|
130
|
+
for (const [index, output] of run.outputs.entries()) {
|
|
131
|
+
if (!saved.has(index)) continue; // the slicer didn't write this one
|
|
132
|
+
await fs.promises.mkdir(path.dirname(output), { recursive: true });
|
|
133
|
+
await fs.promises.cp(path.join(entry, String(index)), output, { recursive: true, force: true });
|
|
134
|
+
// Fresh timestamps on every restored file: a result.json must read as written by this run.
|
|
135
|
+
await touch(output, now);
|
|
136
|
+
}
|
|
137
|
+
await fs.promises.utimes(entry, now, now);
|
|
138
|
+
return true;
|
|
139
|
+
} catch {
|
|
140
|
+
return false;
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
/** Keeps a finished slice's outputs, whole or not at all; a failure to keep it never fails the slice. */
|
|
145
|
+
export async function keepSlice(key: string, run: SlicerRun): Promise<void> {
|
|
146
|
+
const root = sliceCacheRoot();
|
|
147
|
+
try {
|
|
148
|
+
await fs.promises.mkdir(root, { recursive: true, mode: 0o700 });
|
|
149
|
+
const staging = await fs.promises.mkdtemp(path.join(root, ".staging-"));
|
|
150
|
+
try {
|
|
151
|
+
const saved: number[] = [];
|
|
152
|
+
for (const [index, output] of run.outputs.entries()) {
|
|
153
|
+
if (!fs.existsSync(output)) continue;
|
|
154
|
+
await fs.promises.cp(output, path.join(staging, String(index)), { recursive: true });
|
|
155
|
+
saved.push(index);
|
|
156
|
+
}
|
|
157
|
+
await fs.promises.writeFile(path.join(staging, "meta.json"), JSON.stringify({ outputs: run.outputs.length, saved, keptAt: new Date().toISOString() }));
|
|
158
|
+
await fs.promises.rm(path.join(root, key), { recursive: true, force: true });
|
|
159
|
+
await fs.promises.rename(staging, path.join(root, key));
|
|
160
|
+
} finally {
|
|
161
|
+
await fs.promises.rm(staging, { recursive: true, force: true });
|
|
162
|
+
}
|
|
163
|
+
const entries = await Promise.all((await fs.promises.readdir(root)).filter(name => /^[0-9a-f]{64}$/.test(name))
|
|
164
|
+
.map(async name => ({ name, at: (await fs.promises.stat(path.join(root, name))).mtimeMs })));
|
|
165
|
+
for (const old of entries.sort((a, b) => b.at - a.at).slice(entriesKept())) {
|
|
166
|
+
await fs.promises.rm(path.join(root, old.name), { recursive: true, force: true });
|
|
167
|
+
}
|
|
168
|
+
} catch (error) {
|
|
169
|
+
console.error(`Could not keep this slice for reuse: ${error instanceof Error ? error.message : String(error)}`);
|
|
170
|
+
}
|
|
171
|
+
}
|
|
@@ -10,6 +10,7 @@ import { promisify } from 'util';
|
|
|
10
10
|
import { EventEmitter } from 'events';
|
|
11
11
|
import * as crypto from 'crypto';
|
|
12
12
|
import { execFile } from 'child_process';
|
|
13
|
+
import { keepSlice, restoreSlice, sliceCacheKey } from '../slicer/slice-cache.js';
|
|
13
14
|
import { flattenForCli, detectProfilesRoot, resolveBblMachineProfile } from '../slicer/profile-flatten.js';
|
|
14
15
|
import { applyProcessOverrides, type ProcessOverrides } from '../slicer/process-overrides.js';
|
|
15
16
|
import { profileJsonFiles } from '../slicer/profile-files.js';
|
|
@@ -2020,7 +2021,17 @@ export class STLManipulator extends EventEmitter {
|
|
|
2020
2021
|
throw new Error(`Unsupported slicer type: ${slicerType}`);
|
|
2021
2022
|
}
|
|
2022
2023
|
|
|
2023
|
-
|
|
2024
|
+
// The Bambu-compatible CLI's slice, kept for reuse: the same model sliced the same way again is restored,
|
|
2025
|
+
// and every check below still runs on it (slice-cache.ts).
|
|
2026
|
+
const cacheRun = cliResult && slicerType !== 'orca-slicer-api'
|
|
2027
|
+
? { command: slicerPath, args, outputs: [outputFilePath, cliResult.resultPath], locations: [path.dirname(cliResult.resultPath)] } : undefined;
|
|
2028
|
+
const cacheKey = cacheRun ? await sliceCacheKey(cacheRun) : undefined;
|
|
2029
|
+
const restored = !!cacheKey && await restoreSlice(cacheKey, cacheRun!);
|
|
2030
|
+
if (restored) {
|
|
2031
|
+
if (progressCallback) progressCallback(90, 'Reusing the same slice of this model');
|
|
2032
|
+
console.error(`Reusing slice ${cacheKey} for: ${slicerPath} ${args.join(' ')}`);
|
|
2033
|
+
}
|
|
2034
|
+
if (slicerType !== 'orca-slicer-api' && !restored) {
|
|
2024
2035
|
if (progressCallback) progressCallback(20, `Executing slicer: ${slicerPath} ${args.join(' ')}`);
|
|
2025
2036
|
console.error(`Executing: ${slicerPath} ${args.join(' ')}`);
|
|
2026
2037
|
|
|
@@ -2078,6 +2089,7 @@ export class STLManipulator extends EventEmitter {
|
|
|
2078
2089
|
if (typeof slicerResult?.return_code === "number" && slicerResult.return_code !== 0) {
|
|
2079
2090
|
throw new SlicerRunError(`Slicer failed: the slicer exited with code 0, but its result.json reports return_code ${slicerResult.return_code}.`, slicerResult);
|
|
2080
2091
|
}
|
|
2092
|
+
if (cacheKey && !restored && fs.existsSync(outputFilePath)) await keepSlice(cacheKey, cacheRun!);
|
|
2081
2093
|
|
|
2082
2094
|
if (!fs.existsSync(outputFilePath)) {
|
|
2083
2095
|
throw new SlicerRunError(`Slicer finished but output file not found: ${outputFilePath}`, slicerResult);
|
package/src/tool-annotations.ts
CHANGED
|
@@ -40,6 +40,8 @@ export const TOOL_ANNOTATIONS: Record<string, ToolAnnotations> = {
|
|
|
40
40
|
resolve_3mf_ams_slots: READ_OUTSIDE, // reads the live AMS inventory
|
|
41
41
|
list_printer_files: READ_OUTSIDE,
|
|
42
42
|
counterpart_print_progress: READ_OUTSIDE,
|
|
43
|
+
counterpart_discover_printers: READ_OUTSIDE, // listens for the printers' own SSDP announcements
|
|
44
|
+
counterpart_propose_filaments: READ_OUTSIDE, // reads the live AMS inventory
|
|
43
45
|
// connect: true starts the bridge agent, which writes its configuration and device identity and can replace certificates.
|
|
44
46
|
bambu_network_bridge_status: hints(false, true, true, true),
|
|
45
47
|
camera_frame: READ_OUTSIDE,
|
|
@@ -56,6 +58,7 @@ export const TOOL_ANNOTATIONS: Record<string, ToolAnnotations> = {
|
|
|
56
58
|
list_templates: READ_LOCAL,
|
|
57
59
|
get_slice_settings: LOCAL_OUTPUT, // a 3MF's settings are extracted to a fixed file in the temporary directory
|
|
58
60
|
counterpart_printer_info: READ_LOCAL, // configuration and capabilities; sends nothing to the printer
|
|
61
|
+
counterpart_setup_fields: READ_LOCAL, // the settings this server reads; no configured values
|
|
59
62
|
|
|
60
63
|
// Local outputs in the server's temporary directory
|
|
61
64
|
extend_stl_base: LOCAL_OUTPUT,
|