bambu-printer-mcp 1.1.66 → 1.1.68

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.
@@ -0,0 +1,384 @@
1
+ /** What these tools reach outside the server: tests replace every field. */
2
+ export type SetupSystem = {
3
+ platform: NodeJS.Platform;
4
+ home: string;
5
+ /** Where staged downloads and installer output go before they are checked. */
6
+ tmp: string;
7
+ uid: number;
8
+ /** The working directory dotenv read `.env` from when the server started. */
9
+ cwd: string;
10
+ run(file: string, args: string[], options?: {
11
+ env?: NodeJS.ProcessEnv;
12
+ timeoutMs?: number;
13
+ cwd?: string;
14
+ signal?: AbortSignal;
15
+ }): Promise<{
16
+ stdout: string;
17
+ }>;
18
+ download(url: string, signal?: AbortSignal): Promise<Buffer>;
19
+ /** Whether something accepts a TCP connection on host:port within a second. */
20
+ listening(host: string, port: number): Promise<boolean>;
21
+ /** Installed Autodesk Fusion apps found by bundle identifier (Spotlight). */
22
+ fusionByBundleId(): Promise<string[]>;
23
+ };
24
+ /**
25
+ * What a setup subprocess (uvx and the Blender package it runs, tar, launchctl) may see: the basic login
26
+ * environment, uv's own settings and the Blender bridge's, never printer access codes or other server secrets,
27
+ * as the Blender bridge's own environment.
28
+ */
29
+ export declare function setupEnvironment(env?: NodeJS.ProcessEnv): NodeJS.ProcessEnv;
30
+ export declare const defaultSetupSystem: SetupSystem;
31
+ /** The add-on's own default port; BLENDER_HOST and BLENDER_PORT move it, as they do for the Blender MCP server. */
32
+ export declare const BLENDER_ADDON_DEFAULT_PORT = 9876;
33
+ /** The running add-on's answer to get_addon_status, as far as setup needs it. */
34
+ export type BlenderAddonHandshake = {
35
+ up_to_date?: boolean;
36
+ protocol_version?: number | null;
37
+ expected_protocol_version?: number;
38
+ blender_version?: string | null;
39
+ };
40
+ /** get_addon_status's result, structured or as JSON text; a failed call throws with the add-on's own words. */
41
+ export declare function parseAddonHandshake(reply: {
42
+ isError?: boolean;
43
+ structuredContent?: unknown;
44
+ content?: {
45
+ type: string;
46
+ text?: string;
47
+ }[];
48
+ }): BlenderAddonHandshake | undefined;
49
+ export type BlenderSetupReport = {
50
+ /** False when the configured bridge isn't the upstream MCP for Blender package run with uvx; see reason. */
51
+ supported: boolean;
52
+ reason?: "not-configured" | "custom-command" | "custom-package";
53
+ package?: string;
54
+ package_version?: string;
55
+ /** The add-on protocol the configured package needs. */
56
+ expected_protocol?: number;
57
+ /** Something answers on the add-on's port: Blender is running with the add-on started. */
58
+ listening: boolean;
59
+ /** The running add-on's handshake; null when it doesn't report one or couldn't be read (see live_error). Only read while listening. */
60
+ live?: BlenderAddonHandshake | null;
61
+ /** Why the running add-on's handshake couldn't be read. */
62
+ live_error?: string;
63
+ /** The add-on file Blender loads, and its protocol (null when the file has none). */
64
+ target?: {
65
+ path: string;
66
+ protocol: number | null;
67
+ } | null;
68
+ /** Why there is no target. */
69
+ target_problem?: "not-installed" | "several-modules";
70
+ /** What the person can do, in plain words, when the add-on can't be checked or updated here (reason, target_problem). */
71
+ message?: string;
72
+ /** The installed file's protocol is what the package expects. */
73
+ current?: boolean;
74
+ /** Set by update. */
75
+ replaced?: boolean;
76
+ backup?: string;
77
+ };
78
+ /** One add-on module per Blender version folder; other versions are separate installs. */
79
+ export declare function selectBlenderAddonTarget(files: {
80
+ path?: unknown;
81
+ protocol?: unknown;
82
+ }[], blenderVersion?: string | null): {
83
+ target: {
84
+ path: string;
85
+ protocol: number | null;
86
+ };
87
+ } | {
88
+ problem: "not-installed" | "several-modules";
89
+ };
90
+ export declare class BlenderAddonSetup {
91
+ /** The running add-on's get_addon_status through this server's Blender bridge; undefined when it has none. */
92
+ private readonly handshake;
93
+ private readonly system;
94
+ private readonly env;
95
+ constructor(
96
+ /** The running add-on's get_addon_status through this server's Blender bridge; undefined when it has none. */
97
+ handshake: () => Promise<BlenderAddonHandshake | undefined>, system?: SetupSystem, env?: NodeJS.ProcessEnv);
98
+ private inspect;
99
+ /** What is installed, what the package expects, and what the running add-on says. Changes nothing. */
100
+ check(): Promise<BlenderSetupReport>;
101
+ /**
102
+ * Replaces the installed add-on file with the one the configured package's own installer stages, pinned to the
103
+ * inspected version. The existing file must be a regular local MCP for Blender add-on; the staged one must carry
104
+ * the expected protocol. The old file is kept as a backup next to it, and the new one is renamed into place.
105
+ * Blender keeps running the add-on it loaded until it is re-enabled or restarted.
106
+ */
107
+ /** `signal` ends the request: the installer is stopped and nothing is replaced once it is aborted. */
108
+ update(signal?: AbortSignal): Promise<BlenderSetupReport>;
109
+ private readonly serial;
110
+ private replace;
111
+ }
112
+ export declare const BLENDER_SETUP_OUTPUT_SCHEMA: {
113
+ readonly type: "object";
114
+ readonly properties: {
115
+ readonly supported: {
116
+ readonly type: "boolean";
117
+ readonly description: "The configured bridge is the upstream MCP for Blender package run with uvx, so this tool can check and update its add-on.";
118
+ };
119
+ readonly reason: {
120
+ readonly type: "string";
121
+ readonly enum: readonly ["not-configured", "custom-command", "custom-package"];
122
+ };
123
+ readonly package: {
124
+ readonly type: "string";
125
+ readonly description: "The package as BLENDER_MCP_ARGS names it.";
126
+ };
127
+ readonly package_version: {
128
+ readonly type: "string";
129
+ };
130
+ readonly expected_protocol: {
131
+ readonly type: "integer";
132
+ readonly description: "The add-on protocol the package needs.";
133
+ };
134
+ readonly listening: {
135
+ readonly type: "boolean";
136
+ readonly description: "The add-on answers on BLENDER_HOST:BLENDER_PORT (default localhost:9876): Blender is running with it started.";
137
+ };
138
+ readonly live: {
139
+ readonly type: readonly ["object", "null"];
140
+ readonly description: "The running add-on's get_addon_status (up_to_date, protocol_version, expected_protocol_version, blender_version); null when it has none or it couldn't be read. Only while listening.";
141
+ };
142
+ readonly live_error: {
143
+ readonly type: "string";
144
+ readonly description: "Why the running add-on's handshake couldn't be read.";
145
+ };
146
+ readonly target: {
147
+ readonly type: readonly ["object", "null"];
148
+ readonly properties: {
149
+ readonly path: {
150
+ readonly type: "string";
151
+ };
152
+ readonly protocol: {
153
+ readonly type: readonly ["integer", "null"];
154
+ };
155
+ };
156
+ readonly required: readonly ["path", "protocol"];
157
+ readonly description: "The add-on file Blender loads (for the running Blender's version, when it reports one).";
158
+ };
159
+ readonly target_problem: {
160
+ readonly type: "string";
161
+ readonly enum: readonly ["not-installed", "several-modules"];
162
+ };
163
+ readonly message: {
164
+ readonly type: "string";
165
+ readonly description: "What the person can do, in plain words, when the add-on can't be checked or updated here (with reason or target_problem). Clients show it as it is.";
166
+ };
167
+ readonly current: {
168
+ readonly type: "boolean";
169
+ readonly description: "The installed file carries the expected protocol. A running Blender may still have the old add-on loaded: see live.";
170
+ };
171
+ readonly replaced: {
172
+ readonly type: "boolean";
173
+ readonly description: "update: the file was replaced. Blender runs the new add-on once it is re-enabled or Blender restarts.";
174
+ };
175
+ readonly backup: {
176
+ readonly type: "string";
177
+ readonly description: "update: the previous add-on file, kept next to it.";
178
+ };
179
+ };
180
+ readonly required: readonly ["supported", "listening"];
181
+ };
182
+ /** The add-in and server commit Counterpart's Fusion design passes were accepted on (document binding, PRD §8.9). */
183
+ export declare const FUSION_ADDIN_REPOSITORY = "DMontgomery40/fusion360-mcp-server";
184
+ export declare const FUSION_ADDIN_COMMIT = "86a3016a5a5b4a705228acc2f3b75aff7dcfd758";
185
+ /** SHA-256 of every file in the add-in (`addon/`) at that commit. Setup installs nothing else. */
186
+ export declare const FUSION_ADDIN_FILES: Readonly<Record<string, string>>;
187
+ export type FusionAddinPin = {
188
+ repository: string;
189
+ commit: string;
190
+ files: Readonly<Record<string, string>>;
191
+ };
192
+ export declare const FUSION_ADDIN_PIN: FusionAddinPin;
193
+ /** A login agent that gives Fusion the add-in's port however Fusion is opened (a GUI app never reads this .env). */
194
+ export declare const FUSION_PORT_AGENT_LABEL = "com.scantomake.mac.fusion-port";
195
+ export type FusionSetupReport = {
196
+ platform: string;
197
+ /** Setup installs on macOS only. */
198
+ supported: boolean;
199
+ fusion: {
200
+ installed: boolean;
201
+ path: string | null;
202
+ };
203
+ pin: {
204
+ repository: string;
205
+ commit: string;
206
+ };
207
+ addin: {
208
+ path: string;
209
+ installed: boolean;
210
+ matches_pin: boolean;
211
+ run_on_startup: boolean;
212
+ };
213
+ port: number;
214
+ port_agent: {
215
+ path: string;
216
+ installed: boolean;
217
+ };
218
+ /** FUSION_MCP_COMMAND is set for this server. */
219
+ configured: boolean;
220
+ /** The .env this server read at start, when there is one. */
221
+ env_file: string | null;
222
+ /** Add-in at the pin, port agent installed and the bridge configured. Fusion itself may still need opening. */
223
+ ready: boolean;
224
+ /** When not ready: what is missing and what to do, in plain words clients show as they are. */
225
+ message?: string;
226
+ /** Set by install. */
227
+ installed?: {
228
+ addin: "installed" | "already-current";
229
+ port_agent: "installed" | "already-current";
230
+ env: "written" | "already-configured" | "no-env-file";
231
+ env_backup?: string;
232
+ };
233
+ };
234
+ export declare class FusionAddinSetup {
235
+ /** FUSION_MCP_PORT, as the bridge resolves it. */
236
+ private readonly port;
237
+ /** The bridge arguments for the pinned server, written with the add-in so the two always match. */
238
+ private readonly serverArgs;
239
+ private readonly system;
240
+ private readonly env;
241
+ private readonly pin;
242
+ constructor(
243
+ /** FUSION_MCP_PORT, as the bridge resolves it. */
244
+ port: () => number,
245
+ /** The bridge arguments for the pinned server, written with the add-in so the two always match. */
246
+ serverArgs: readonly string[], system?: SetupSystem, env?: NodeJS.ProcessEnv, pin?: FusionAddinPin);
247
+ private get addinsFolder();
248
+ private get addinFolder();
249
+ private get portAgent();
250
+ private findFusion;
251
+ /** Each pinned file at its pinned bytes; the manifest may carry only setup's runOnStartup change. Fusion's own caches are ignored. */
252
+ private installedMatchesPin;
253
+ private portAgentPlist;
254
+ /**
255
+ * The agent is installed when it sets this port and launchd has it loaded in the login session: a file whose load
256
+ * failed is installed again. An agent written for another port is replaced by install.
257
+ */
258
+ private portAgentInstalled;
259
+ /** What is installed. Changes nothing. */
260
+ check(): Promise<FusionSetupReport>;
261
+ /** The pinned add-in, downloaded and checked file by file: every entry a regular file or folder, nothing extra, nothing missing. */
262
+ private downloadAddin;
263
+ private installAddin;
264
+ /** Writes the agent and loads it in the person's login session, where its RunAtLoad sets FUSION_MCP_PORT. */
265
+ private installPortAgent;
266
+ /**
267
+ * Adds the bridge settings this server is missing to its own .env, after a copy of the file. A configured
268
+ * FUSION_MCP_COMMAND is kept with its arguments: it may be a reviewed local runtime. The running server takes
269
+ * the new settings at once.
270
+ */
271
+ private writeSettings;
272
+ /** Installs the pinned add-in set to run on startup, the port login item, and this server's missing bridge settings. */
273
+ /** `signal` ends the request: the download and tar are stopped, and nothing more is written once it is aborted. */
274
+ install(signal?: AbortSignal): Promise<FusionSetupReport>;
275
+ private readonly serial;
276
+ private installMissing;
277
+ }
278
+ export declare const FUSION_SETUP_OUTPUT_SCHEMA: {
279
+ readonly type: "object";
280
+ readonly properties: {
281
+ readonly platform: {
282
+ readonly type: "string";
283
+ };
284
+ readonly supported: {
285
+ readonly type: "boolean";
286
+ readonly description: "Setup installs on macOS only.";
287
+ };
288
+ readonly fusion: {
289
+ readonly type: "object";
290
+ readonly properties: {
291
+ readonly installed: {
292
+ readonly type: "boolean";
293
+ };
294
+ readonly path: {
295
+ readonly type: readonly ["string", "null"];
296
+ };
297
+ };
298
+ readonly required: readonly ["installed", "path"];
299
+ };
300
+ readonly pin: {
301
+ readonly type: "object";
302
+ readonly properties: {
303
+ readonly repository: {
304
+ readonly type: "string";
305
+ };
306
+ readonly commit: {
307
+ readonly type: "string";
308
+ };
309
+ };
310
+ readonly required: readonly ["repository", "commit"];
311
+ };
312
+ readonly addin: {
313
+ readonly type: "object";
314
+ readonly properties: {
315
+ readonly path: {
316
+ readonly type: "string";
317
+ };
318
+ readonly installed: {
319
+ readonly type: "boolean";
320
+ };
321
+ readonly matches_pin: {
322
+ readonly type: "boolean";
323
+ };
324
+ readonly run_on_startup: {
325
+ readonly type: "boolean";
326
+ };
327
+ };
328
+ readonly required: readonly ["path", "installed", "matches_pin", "run_on_startup"];
329
+ };
330
+ readonly port: {
331
+ readonly type: "integer";
332
+ };
333
+ readonly port_agent: {
334
+ readonly type: "object";
335
+ readonly properties: {
336
+ readonly path: {
337
+ readonly type: "string";
338
+ };
339
+ readonly installed: {
340
+ readonly type: "boolean";
341
+ };
342
+ };
343
+ readonly required: readonly ["path", "installed"];
344
+ };
345
+ readonly configured: {
346
+ readonly type: "boolean";
347
+ readonly description: "FUSION_MCP_COMMAND is set for this server.";
348
+ };
349
+ readonly env_file: {
350
+ readonly type: readonly ["string", "null"];
351
+ readonly description: "The .env this server read at start, when there is one.";
352
+ };
353
+ readonly ready: {
354
+ readonly type: "boolean";
355
+ readonly description: "The add-in is at the pin and runs on startup, the port login item is installed and the bridge is configured. Fusion may still need opening: see fusion_mcp_status.";
356
+ };
357
+ readonly message: {
358
+ readonly type: "string";
359
+ readonly description: "When not ready: what is missing and what to do, in plain words. Clients show it as it is.";
360
+ };
361
+ readonly installed: {
362
+ readonly type: "object";
363
+ readonly description: "install: what it did.";
364
+ readonly properties: {
365
+ readonly addin: {
366
+ readonly type: "string";
367
+ readonly enum: readonly ["installed", "already-current"];
368
+ };
369
+ readonly port_agent: {
370
+ readonly type: "string";
371
+ readonly enum: readonly ["installed", "already-current"];
372
+ };
373
+ readonly env: {
374
+ readonly type: "string";
375
+ readonly enum: readonly ["written", "already-configured", "no-env-file"];
376
+ };
377
+ readonly env_backup: {
378
+ readonly type: "string";
379
+ };
380
+ };
381
+ };
382
+ };
383
+ readonly required: readonly ["platform", "supported", "fusion", "pin", "addin", "port", "port_agent", "configured", "env_file", "ready"];
384
+ };