x402-proxy 0.10.7 → 0.10.9

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.
Files changed (90) hide show
  1. package/CHANGELOG.md +23 -1
  2. package/README.md +7 -1
  3. package/dist/Credential-COZQnr1-.js +2055 -0
  4. package/dist/Mcp-CrCEqLqO.js +10 -0
  5. package/dist/Sse-ChldYgU7.js +9742 -0
  6. package/dist/Sse-kCB38G56.js +16482 -0
  7. package/dist/accounts-DsuvWwph.js +232 -0
  8. package/dist/accounts-DzvAlQRn.js +5 -0
  9. package/dist/accounts-IG-Cmrwy.js +229 -0
  10. package/dist/api-CUzmQvTQ.js +2802 -0
  11. package/dist/auth-DTzQmnZ_.js +1196 -0
  12. package/dist/bin/cli.js +585 -242
  13. package/dist/ccip-Bx-zoUCJ.js +240 -0
  14. package/dist/ccip-C2k1DD1T.js +153 -0
  15. package/dist/ccip-C6CQOJYv.js +152 -0
  16. package/dist/ccip-RZzsZ5Mv.js +156 -0
  17. package/dist/chain-CafcHffR.js +1997 -0
  18. package/dist/chain-DwfP5RGZ.js +1968 -0
  19. package/dist/chunk-DBEY4PJZ.js +16 -0
  20. package/dist/chunk-DjEMn6fM.js +36 -0
  21. package/dist/client-Blw2V7LF.js +657 -0
  22. package/dist/client-C37gWJOZ.js +102 -0
  23. package/dist/client-CEc4NYAA.js +6388 -0
  24. package/dist/client-CVDTUY0l.js +5152 -0
  25. package/dist/config-BUQsit4s.js +3 -0
  26. package/dist/config-DR1Fs_wL.js +6600 -0
  27. package/dist/{config-D9wIR3xc.js → config-rvKA3SYT.js} +10 -5
  28. package/dist/decodeFunctionData-DuFcwhC_.js +4510 -0
  29. package/dist/decodeFunctionData-JPOUdvil.js +4394 -0
  30. package/dist/derive-DNUl8LU9.js +9109 -0
  31. package/dist/dist-C2YO6HSQ.js +6581 -0
  32. package/dist/dist-DM5_F3r5.js +4 -0
  33. package/dist/dist-DxJCYyL5.js +1388 -0
  34. package/dist/hashTypedData-BHmP9dBd.js +859 -0
  35. package/dist/hashTypedData-CtEdfx4y.js +846 -0
  36. package/dist/helpers-CuUSw-tH.js +7125 -0
  37. package/dist/hmac-59IlS_by.js +648 -0
  38. package/dist/http-BAtucMbS.js +2060 -0
  39. package/dist/index.d.ts +1903 -9
  40. package/dist/index.js +18006 -50
  41. package/dist/index.node-CxkL0OFh.js +3592 -0
  42. package/dist/index.node-DvmeuZBj.js +3 -0
  43. package/dist/isAddressEqual-BLrd1Hg1.js +9 -0
  44. package/dist/isAddressEqual-DsAqfQOD.js +10 -0
  45. package/dist/localBatchGatewayRequest-C-RPJyDO.js +6260 -0
  46. package/dist/localBatchGatewayRequest-DOdQ9bR7.js +93 -0
  47. package/dist/localBatchGatewayRequest-DQkbZaSy.js +6261 -0
  48. package/dist/parseUnits-CApwcKSD.js +49 -0
  49. package/dist/parseUnits-cMO2udMe.js +48 -0
  50. package/dist/schemas-BxMFYNbH.js +1270 -0
  51. package/dist/secp256k1-BZpiyffY.js +2525 -0
  52. package/dist/secp256k1-BjenrLl5.js +1877 -0
  53. package/dist/secp256k1-CLPUX17u.js +3 -0
  54. package/dist/sendRawTransactionSync-DvSkhZtW.js +3612 -0
  55. package/dist/server-CSq0IuUq.js +565 -0
  56. package/dist/setup-BY4J49Lv.js +1110 -0
  57. package/dist/setup-wMOAgrsN.js +3 -0
  58. package/dist/sha256-FAs0qeni.js +17 -0
  59. package/dist/sha3-CYkWM8Xa.js +195 -0
  60. package/dist/sha3-DbMJRJ3C.js +194 -0
  61. package/dist/sse-B4LLqBQm.js +408 -0
  62. package/dist/status-Bu23RjW6.js +3 -0
  63. package/dist/{status-DihAcUSC.js → status-X21VnGUO.js} +16 -15
  64. package/dist/stdio-BADqxZdZ.js +85 -0
  65. package/dist/streamableHttp-BHkJypcI.js +358 -0
  66. package/dist/tempo-3nttrxgQ.js +17 -0
  67. package/dist/tempo-DER0P-ul.js +18 -0
  68. package/dist/types-BEKUz-Mf.js +1240 -0
  69. package/dist/types-DatK5vR5.js +3 -0
  70. package/dist/utils-BYjkXZDF.js +444 -0
  71. package/dist/utils-SeGHMW9O.js +445 -0
  72. package/dist/wallet-DKVlrR1S.js +3 -0
  73. package/dist/wallet-DSyht15_.js +17759 -0
  74. package/package.json +18 -71
  75. package/dist/config-B_upkJeK.js +0 -66
  76. package/dist/config-Be35NM5s.js +0 -3
  77. package/dist/config-J1m-CWXT.js +0 -27
  78. package/dist/derive-CL6e8K0Z.js +0 -81
  79. package/dist/openclaw/plugin.d.ts +0 -15
  80. package/dist/openclaw/plugin.js +0 -2067
  81. package/dist/openclaw.plugin.json +0 -93
  82. package/dist/setup-CNyMLnM-.js +0 -197
  83. package/dist/setup-DTIxPe58.js +0 -3
  84. package/dist/status-DZlJ4pS7.js +0 -3
  85. package/dist/wallet-B0S-rma9.js +0 -544
  86. package/dist/wallet-DBrVZJqe.js +0 -3
  87. package/openclaw.plugin.json +0 -93
  88. package/skills/SKILL.md +0 -183
  89. package/skills/references/library.md +0 -85
  90. package/skills/references/openclaw-plugin.md +0 -145
@@ -0,0 +1,1388 @@
1
+ #!/usr/bin/env node
2
+ import { i as __toESM } from "./chunk-DjEMn6fM.js";
3
+ import { t as require_dist } from "./dist-C2YO6HSQ.js";
4
+ import { _ as string, a as array, c as discriminatedUnion, f as number, g as record, n as _enum, o as boolean, p as object, u as literal, v as union, y as unknown } from "./schemas-BxMFYNbH.js";
5
+ import { join } from "node:path";
6
+ import { homedir } from "node:os";
7
+ _enum([
8
+ "stdio",
9
+ "http",
10
+ "streamable-http",
11
+ "sse"
12
+ ]);
13
+ /**
14
+ * Stdio transport server configuration.
15
+ * This is the most common format — runs a local process.
16
+ */
17
+ const StdioServerConfig = object({
18
+ command: string().min(1),
19
+ args: array(string()).optional().default([]),
20
+ env: record(string(), string()).optional().default({}),
21
+ transport: literal("stdio").optional().default("stdio"),
22
+ cwd: string().optional(),
23
+ timeout: number().int().positive().optional(),
24
+ description: string().optional()
25
+ });
26
+ /**
27
+ * Remote transport server configuration.
28
+ * Used for HTTP, Streamable HTTP, and SSE servers.
29
+ */
30
+ const RemoteServerConfig = object({
31
+ url: string().url(),
32
+ transport: _enum([
33
+ "http",
34
+ "streamable-http",
35
+ "sse"
36
+ ]).optional(),
37
+ headers: record(string(), string()).optional().default({}),
38
+ timeout: number().int().positive().optional(),
39
+ description: string().optional()
40
+ });
41
+ discriminatedUnion("transport", [
42
+ StdioServerConfig.extend({ transport: literal("stdio") }),
43
+ RemoteServerConfig.extend({ transport: literal("http") }),
44
+ RemoteServerConfig.extend({ transport: literal("streamable-http") }),
45
+ RemoteServerConfig.extend({ transport: literal("sse") })
46
+ ]);
47
+ /**
48
+ * Loose server config — accepts either stdio or remote without requiring
49
+ * an explicit transport field. Uses the presence of `command` vs `url` to
50
+ * determine the type.
51
+ */
52
+ const LooseServerConfig = union([StdioServerConfig, RemoteServerConfig]);
53
+ object({ mcpServers: record(string(), LooseServerConfig) });
54
+ _enum([
55
+ "developer-tools",
56
+ "web",
57
+ "automation",
58
+ "data",
59
+ "search",
60
+ "ai",
61
+ "cloud",
62
+ "communication",
63
+ "design",
64
+ "documentation",
65
+ "devops",
66
+ "utilities",
67
+ "security",
68
+ "gaming"
69
+ ]);
70
+ _enum([
71
+ "node",
72
+ "python",
73
+ "docker",
74
+ "binary"
75
+ ]);
76
+ /**
77
+ * Variables within an argument — keyed by variable name.
78
+ */
79
+ const ArgumentVariableSchema = object({
80
+ description: string().optional(),
81
+ format: _enum([
82
+ "string",
83
+ "number",
84
+ "boolean",
85
+ "filepath"
86
+ ]).optional(),
87
+ isRequired: boolean().optional(),
88
+ isSecret: boolean().optional(),
89
+ default: string().optional(),
90
+ placeholder: string().optional(),
91
+ value: string().optional(),
92
+ choices: array(string()).optional()
93
+ });
94
+ /**
95
+ * A single argument definition — shared between packageArguments and runtimeArguments.
96
+ */
97
+ const ArgumentSchema = object({
98
+ name: string().optional(),
99
+ description: string().optional(),
100
+ value: string().optional(),
101
+ default: string().optional(),
102
+ format: _enum([
103
+ "string",
104
+ "number",
105
+ "boolean",
106
+ "filepath"
107
+ ]).optional(),
108
+ isRequired: boolean().optional(),
109
+ isSecret: boolean().optional(),
110
+ type: _enum(["named", "positional"]).optional(),
111
+ variables: record(string(), ArgumentVariableSchema).optional(),
112
+ isRepeated: boolean().optional(),
113
+ valueHint: string().optional(),
114
+ choices: array(string()).optional(),
115
+ placeholder: string().optional()
116
+ });
117
+ object({
118
+ server: object({
119
+ $schema: string().optional(),
120
+ name: string().min(1),
121
+ description: string(),
122
+ version: string().optional(),
123
+ title: string().optional(),
124
+ websiteUrl: string().optional(),
125
+ repository: object({
126
+ url: string(),
127
+ source: string(),
128
+ id: string().optional(),
129
+ subfolder: string().optional()
130
+ }).optional(),
131
+ icons: array(object({
132
+ src: string(),
133
+ mimeType: string().optional(),
134
+ sizes: union([array(string()), string()]).optional(),
135
+ theme: _enum(["light", "dark"]).optional()
136
+ })).optional(),
137
+ packages: array(object({
138
+ registryType: _enum([
139
+ "npm",
140
+ "pypi",
141
+ "oci",
142
+ "nuget",
143
+ "mcpb"
144
+ ]),
145
+ identifier: string(),
146
+ version: string().optional(),
147
+ runtimeHint: string().optional(),
148
+ transport: object({
149
+ type: _enum([
150
+ "stdio",
151
+ "streamable-http",
152
+ "sse"
153
+ ]),
154
+ url: string().optional()
155
+ }),
156
+ packageArguments: array(ArgumentSchema).optional(),
157
+ runtimeArguments: array(ArgumentSchema).optional(),
158
+ environmentVariables: array(object({
159
+ name: string(),
160
+ description: string().optional(),
161
+ value: string().optional(),
162
+ default: string().optional(),
163
+ format: _enum([
164
+ "string",
165
+ "number",
166
+ "boolean",
167
+ "filepath"
168
+ ]).optional(),
169
+ isRequired: boolean().optional(),
170
+ isSecret: boolean().optional()
171
+ })).optional()
172
+ })).optional(),
173
+ remotes: array(object({
174
+ type: _enum(["streamable-http", "sse"]),
175
+ url: string(),
176
+ headers: array(object({
177
+ name: string(),
178
+ description: string().optional(),
179
+ value: string().optional(),
180
+ default: string().optional(),
181
+ format: _enum([
182
+ "string",
183
+ "number",
184
+ "boolean",
185
+ "filepath"
186
+ ]).optional(),
187
+ isRequired: boolean().optional(),
188
+ isSecret: boolean().optional()
189
+ })).optional(),
190
+ variables: record(string(), object({
191
+ description: string().optional(),
192
+ format: string().optional(),
193
+ default: string().optional()
194
+ })).optional()
195
+ })).optional(),
196
+ _meta: record(string(), unknown()).optional()
197
+ }),
198
+ _meta: record(string(), unknown()).optional().default({})
199
+ });
200
+ const AppId = _enum([
201
+ "claude-desktop",
202
+ "claude-code",
203
+ "vscode",
204
+ "cursor",
205
+ "cline",
206
+ "roo-code",
207
+ "goose",
208
+ "windsurf",
209
+ "opencode",
210
+ "zed",
211
+ "pycharm",
212
+ "codex",
213
+ "gemini-cli",
214
+ "continue",
215
+ "amazon-q",
216
+ "trae",
217
+ "bolt-ai",
218
+ "libre-chat",
219
+ "antigravity"
220
+ ]);
221
+ /**
222
+ * Authentication method for private registries.
223
+ */
224
+ const RegistryAuthMethod = _enum([
225
+ "bearer",
226
+ "basic",
227
+ "header"
228
+ ]);
229
+ /**
230
+ * A registry source definition.
231
+ * Describes where to fetch MCP server definitions from.
232
+ */
233
+ const RegistrySource = object({
234
+ name: string().min(1).regex(/^[a-z0-9-]+$/),
235
+ url: string().url(),
236
+ type: _enum(["public", "private"]).default("public"),
237
+ priority: number().int().nonnegative().default(100)
238
+ });
239
+ object({
240
+ method: RegistryAuthMethod,
241
+ token: string().optional(),
242
+ username: string().optional(),
243
+ headerName: string().optional()
244
+ });
245
+ /**
246
+ * Per-server entry in a project manifest.
247
+ * Allows overriding env vars and specifying app targets.
248
+ */
249
+ const ManifestServerEntry = object({
250
+ env: record(string(), string()).optional(),
251
+ apps: array(AppId).optional(),
252
+ scope: _enum(["project", "global"]).optional(),
253
+ registry: string().optional()
254
+ });
255
+ object({
256
+ servers: record(string(), ManifestServerEntry.or(object({}))),
257
+ registries: array(RegistrySource).optional()
258
+ });
259
+ //#endregion
260
+ //#region node_modules/.pnpm/@getmcp+core@0.10.1/node_modules/@getmcp/core/dist/utils.js
261
+ /**
262
+ * Utility functions for working with canonical MCP server configs.
263
+ */
264
+ /**
265
+ * Type guard: checks if a config is a stdio transport config.
266
+ */
267
+ function isStdioConfig(config) {
268
+ return "command" in config && typeof config.command === "string";
269
+ }
270
+ /**
271
+ * Type guard: checks if a config is a remote transport config.
272
+ */
273
+ function isRemoteConfig(config) {
274
+ return "url" in config && typeof config.url === "string";
275
+ }
276
+ /**
277
+ * Infer the transport type from a server config.
278
+ *
279
+ * For stdio configs, always returns "stdio".
280
+ * For remote configs, uses the explicit `transport` field if set,
281
+ * otherwise infers from the URL (paths containing "/sse" → "sse", else "http").
282
+ */
283
+ function inferTransport(config) {
284
+ if (isStdioConfig(config)) return "stdio";
285
+ if (isRemoteConfig(config)) {
286
+ if (config.transport) return config.transport;
287
+ try {
288
+ const url = new URL(config.url);
289
+ if (/\/sse(\/|\?|&|$)/.test(url.pathname)) return "sse";
290
+ } catch {}
291
+ return "http";
292
+ }
293
+ return "stdio";
294
+ }
295
+ //#endregion
296
+ //#region node_modules/.pnpm/@getmcp+generators@0.10.1/node_modules/@getmcp/generators/dist/base.js
297
+ /**
298
+ * Base class for config generators.
299
+ * Provides common functionality for all app-specific generators.
300
+ */
301
+ let _existsSync = () => false;
302
+ try {
303
+ const fs = process.getBuiltinModule?.("node:fs");
304
+ if (fs) _existsSync = fs.existsSync;
305
+ } catch {}
306
+ const home = homedir();
307
+ const configHome = process.env.XDG_CONFIG_HOME?.trim() || join(home, ".config");
308
+ const appData = process.env.APPDATA?.trim() || join(home, "AppData", "Roaming");
309
+ process.env.LOCALAPPDATA?.trim() || join(home, "AppData", "Local");
310
+ const claudeHome = process.env.CLAUDE_CONFIG_DIR?.trim() || join(home, ".claude");
311
+ const codexHome = process.env.CODEX_HOME?.trim() || join(home, ".codex");
312
+ const INVALID_CONFIG_ERROR = "Invalid config: must have either 'command' or 'url'";
313
+ var BaseGenerator = class {
314
+ /** Root key for the generated config object. Override in subclasses. */
315
+ rootKey = "mcpServers";
316
+ /**
317
+ * Transform a stdio config into the app-specific format.
318
+ * Override in subclasses to customize field mappings.
319
+ */
320
+ transformStdio(config) {
321
+ return toStdioFields(config);
322
+ }
323
+ /**
324
+ * Transform a remote config into the app-specific format.
325
+ * Override in subclasses to customize field mappings.
326
+ */
327
+ transformRemote(config) {
328
+ return toRemoteFields(config);
329
+ }
330
+ generate(serverName, config) {
331
+ let serverConfig;
332
+ if (isStdioConfig(config)) serverConfig = this.transformStdio(config);
333
+ else if (isRemoteConfig(config)) serverConfig = this.transformRemote(config);
334
+ else throw new Error(INVALID_CONFIG_ERROR);
335
+ return { [this.rootKey]: { [serverName]: serverConfig } };
336
+ }
337
+ generateAll(servers) {
338
+ let merged = {};
339
+ for (const [name, config] of Object.entries(servers)) {
340
+ const single = this.generate(name, config);
341
+ merged = deepMerge(merged, single);
342
+ }
343
+ return merged;
344
+ }
345
+ serialize(config) {
346
+ return JSON.stringify(config, null, 2);
347
+ }
348
+ detectInstalled() {
349
+ return false;
350
+ }
351
+ };
352
+ /**
353
+ * Deep merge two objects. Arrays are replaced, not merged.
354
+ */
355
+ const UNSAFE_KEYS = new Set([
356
+ "__proto__",
357
+ "constructor",
358
+ "prototype"
359
+ ]);
360
+ function deepMerge(target, source) {
361
+ const result = { ...target };
362
+ for (const key of Object.keys(source)) {
363
+ if (UNSAFE_KEYS.has(key)) continue;
364
+ const targetVal = target[key];
365
+ const sourceVal = source[key];
366
+ if (isPlainObject(targetVal) && isPlainObject(sourceVal)) result[key] = deepMerge(targetVal, sourceVal);
367
+ else result[key] = sourceVal;
368
+ }
369
+ return result;
370
+ }
371
+ function isPlainObject(val) {
372
+ return typeof val === "object" && val !== null && !Array.isArray(val);
373
+ }
374
+ /**
375
+ * Extract a clean stdio config from a LooseServerConfig.
376
+ * Strips transport field and undefined values.
377
+ */
378
+ function toStdioFields(config) {
379
+ if (!("command" in config)) throw new Error("Expected stdio config but got remote config");
380
+ const result = { command: config.command };
381
+ if (config.args && config.args.length > 0) result.args = config.args;
382
+ if (config.env && Object.keys(config.env).length > 0) result.env = config.env;
383
+ if (config.cwd) result.cwd = config.cwd;
384
+ if (config.timeout) result.timeout = config.timeout;
385
+ if (config.description) result.description = config.description;
386
+ return result;
387
+ }
388
+ /**
389
+ * Extract a clean remote config from a LooseServerConfig.
390
+ * Strips undefined values.
391
+ */
392
+ function toRemoteFields(config) {
393
+ if (!("url" in config)) throw new Error("Expected remote config but got stdio config");
394
+ const result = { url: config.url };
395
+ if (config.transport) result.transport = config.transport;
396
+ if (config.headers && Object.keys(config.headers).length > 0) result.headers = config.headers;
397
+ if (config.timeout) result.timeout = config.timeout;
398
+ if (config.description) result.description = config.description;
399
+ return result;
400
+ }
401
+ //#endregion
402
+ //#region node_modules/.pnpm/@getmcp+generators@0.10.1/node_modules/@getmcp/generators/dist/claude-desktop.js
403
+ /**
404
+ * Claude Desktop config generator.
405
+ *
406
+ * Config file: ~/Library/Application Support/Claude/claude_desktop_config.json (macOS)
407
+ * %AppData%\Claude\claude_desktop_config.json (Windows)
408
+ * Format: { "mcpServers": { "name": { "command", "args", "env" } } }
409
+ *
410
+ * This is essentially a passthrough — the canonical format IS the Claude Desktop format.
411
+ */
412
+ var ClaudeDesktopGenerator = class extends BaseGenerator {
413
+ app = {
414
+ id: "claude-desktop",
415
+ name: "Claude Desktop",
416
+ description: "Anthropic's Claude desktop application",
417
+ configPaths: null,
418
+ globalConfigPaths: {
419
+ darwin: "~/Library/Application Support/Claude/claude_desktop_config.json",
420
+ win32: "%AppData%\\Claude\\claude_desktop_config.json",
421
+ linux: "~/.config/Claude/claude_desktop_config.json"
422
+ },
423
+ configFormat: "json",
424
+ docsUrl: "https://modelcontextprotocol.io/quickstart/user",
425
+ requiresRestart: true
426
+ };
427
+ detectInstalled() {
428
+ switch (process.platform) {
429
+ case "darwin": return _existsSync(join(home, "Library", "Application Support", "Claude"));
430
+ case "win32": return _existsSync(join(appData, "Claude"));
431
+ default: return _existsSync(join(configHome, "Claude"));
432
+ }
433
+ }
434
+ };
435
+ //#endregion
436
+ //#region node_modules/.pnpm/@getmcp+generators@0.10.1/node_modules/@getmcp/generators/dist/claude-code.js
437
+ /**
438
+ * Claude Code (CLI) config generator.
439
+ *
440
+ * Config file: .mcp.json (project scope) or ~/.claude.json (user scope)
441
+ * Format: { "mcpServers": { "name": { "command", "args", "env" } } }
442
+ * CLI: claude mcp add <name> -- <command> [args]
443
+ *
444
+ * Supports stdio, http, sse transports.
445
+ * Supports ${VAR} and ${VAR:-default} env variable syntax.
446
+ *
447
+ * Very similar to Claude Desktop — essentially a passthrough with
448
+ * optional transport type for remote servers.
449
+ */
450
+ var ClaudeCodeGenerator = class extends BaseGenerator {
451
+ app = {
452
+ id: "claude-code",
453
+ name: "Claude Code",
454
+ description: "Anthropic's CLI-based coding agent",
455
+ configPaths: ".mcp.json",
456
+ globalConfigPaths: {
457
+ darwin: "~/.claude.json",
458
+ win32: "%UserProfile%\\.claude.json",
459
+ linux: "~/.claude.json"
460
+ },
461
+ configFormat: "json",
462
+ docsUrl: "https://docs.anthropic.com/en/docs/claude-code/mcp"
463
+ };
464
+ transformRemote(config) {
465
+ const fields = toRemoteFields(config);
466
+ if ("transport" in config && config.transport) {
467
+ fields.type = config.transport;
468
+ delete fields.transport;
469
+ }
470
+ return fields;
471
+ }
472
+ detectInstalled() {
473
+ return _existsSync(claudeHome);
474
+ }
475
+ };
476
+ //#endregion
477
+ //#region node_modules/.pnpm/@getmcp+generators@0.10.1/node_modules/@getmcp/generators/dist/vscode.js
478
+ /**
479
+ * VS Code / GitHub Copilot config generator.
480
+ *
481
+ * Config file: .vscode/mcp.json (workspace) or user-level mcp.json
482
+ * Format: { "servers": { "name": { "type": "stdio", "command", "args", "env" } } }
483
+ *
484
+ * Key differences from canonical:
485
+ * - Root key: "servers" (NOT "mcpServers")
486
+ * - Requires explicit "type" field on every server ("stdio", "http", "sse")
487
+ * - Supports "inputs" array for sensitive data prompting
488
+ * - Supports "envFile" for .env loading
489
+ */
490
+ var VSCodeGenerator = class extends BaseGenerator {
491
+ rootKey = "servers";
492
+ app = {
493
+ id: "vscode",
494
+ name: "VS Code / GitHub Copilot",
495
+ description: "Visual Studio Code with GitHub Copilot MCP integration",
496
+ configPaths: ".vscode/mcp.json",
497
+ globalConfigPaths: null,
498
+ configFormat: "json",
499
+ docsUrl: "https://code.visualstudio.com/docs/copilot/chat/mcp-servers"
500
+ };
501
+ transformStdio(config) {
502
+ return {
503
+ type: "stdio",
504
+ ...toStdioFields(config)
505
+ };
506
+ }
507
+ transformRemote(config) {
508
+ const transport = inferTransport(config);
509
+ const fields = toRemoteFields(config);
510
+ delete fields.transport;
511
+ return {
512
+ type: transport === "streamable-http" ? "http" : transport,
513
+ ...fields
514
+ };
515
+ }
516
+ detectInstalled() {
517
+ switch (process.platform) {
518
+ case "darwin": return _existsSync(join(home, "Library", "Application Support", "Code"));
519
+ case "win32": return _existsSync(join(appData, "Code"));
520
+ default: return _existsSync(join(configHome, "Code"));
521
+ }
522
+ }
523
+ };
524
+ //#endregion
525
+ //#region node_modules/.pnpm/@getmcp+generators@0.10.1/node_modules/@getmcp/generators/dist/cursor.js
526
+ /**
527
+ * Cursor config generator.
528
+ *
529
+ * Config file: .cursor/mcp.json (project) or global settings
530
+ * Format: { "mcpServers": { "name": { "command", "args", "env" } } }
531
+ *
532
+ * Very similar to Claude Desktop — essentially a passthrough.
533
+ * Supports stdio and SSE transports.
534
+ */
535
+ var CursorGenerator = class extends BaseGenerator {
536
+ app = {
537
+ id: "cursor",
538
+ name: "Cursor",
539
+ description: "Cursor AI-powered code editor",
540
+ configPaths: ".cursor/mcp.json",
541
+ globalConfigPaths: {
542
+ darwin: "~/.cursor/mcp.json",
543
+ win32: "%UserProfile%\\.cursor\\mcp.json",
544
+ linux: "~/.cursor/mcp.json"
545
+ },
546
+ configFormat: "json",
547
+ docsUrl: "https://docs.cursor.com/context/model-context-protocol",
548
+ requiresRestart: true
549
+ };
550
+ detectInstalled() {
551
+ return _existsSync(join(home, ".cursor"));
552
+ }
553
+ };
554
+ //#endregion
555
+ //#region node_modules/.pnpm/@getmcp+generators@0.10.1/node_modules/@getmcp/generators/dist/cline.js
556
+ /**
557
+ * Cline config generator.
558
+ *
559
+ * Config file: cline_mcp_settings.json
560
+ * Format: { "mcpServers": { "name": { "command", "args", "env", "alwaysAllow", "disabled" } } }
561
+ *
562
+ * Key differences from canonical:
563
+ * - Extra fields: "alwaysAllow" (string array), "disabled" (boolean)
564
+ * - SSE servers use "url" + "headers" instead of "command"/"args"
565
+ */
566
+ var ClineGenerator = class extends BaseGenerator {
567
+ app = {
568
+ id: "cline",
569
+ name: "Cline",
570
+ description: "AI coding assistant VS Code extension",
571
+ configPaths: null,
572
+ globalConfigPaths: {
573
+ darwin: "~/Library/Application Support/Code/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json",
574
+ win32: "%AppData%\\Code\\User\\globalStorage\\saoudrizwan.claude-dev\\settings\\cline_mcp_settings.json",
575
+ linux: "~/.config/Code/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json"
576
+ },
577
+ configFormat: "json",
578
+ docsUrl: "https://docs.cline.bot/mcp-servers/configuring-mcp-servers"
579
+ };
580
+ transformStdio(config) {
581
+ return {
582
+ ...toStdioFields(config),
583
+ alwaysAllow: [],
584
+ disabled: false
585
+ };
586
+ }
587
+ transformRemote(config) {
588
+ return {
589
+ ...toRemoteFields(config),
590
+ alwaysAllow: [],
591
+ disabled: false
592
+ };
593
+ }
594
+ detectInstalled() {
595
+ const extId = "saoudrizwan.claude-dev";
596
+ switch (process.platform) {
597
+ case "darwin": return _existsSync(join(home, "Library", "Application Support", "Code", "User", "globalStorage", extId));
598
+ case "win32": return _existsSync(join(appData, "Code", "User", "globalStorage", extId));
599
+ default: return _existsSync(join(configHome, "Code", "User", "globalStorage", extId));
600
+ }
601
+ }
602
+ };
603
+ //#endregion
604
+ //#region node_modules/.pnpm/@getmcp+generators@0.10.1/node_modules/@getmcp/generators/dist/roo-code.js
605
+ /**
606
+ * Roo Code config generator.
607
+ *
608
+ * Config file: mcp_settings.json (global) or .roo/mcp.json (project)
609
+ * Format: { "mcpServers": { "name": { "command", "args", "env", ... } } }
610
+ *
611
+ * Key differences from canonical:
612
+ * - Extra fields: "alwaysAllow", "disabled", "timeout", "watchPaths",
613
+ * "disabledTools", "cwd"
614
+ * - Remote servers need explicit "type": "streamable-http" or "type": "sse"
615
+ * - Supports ${env:VARIABLE_NAME} syntax in args
616
+ * - Windows requires "cmd /c npx" wrapper
617
+ */
618
+ var RooCodeGenerator = class extends BaseGenerator {
619
+ app = {
620
+ id: "roo-code",
621
+ name: "Roo Code",
622
+ description: "AI coding assistant VS Code extension (formerly Roo Cline)",
623
+ configPaths: null,
624
+ globalConfigPaths: {
625
+ darwin: "~/Library/Application Support/Code/User/globalStorage/rooveterinaryinc.roo-cline/settings/mcp_settings.json",
626
+ win32: "%AppData%\\Code\\User\\globalStorage\\rooveterinaryinc.roo-cline\\settings\\mcp_settings.json",
627
+ linux: "~/.config/Code/User/globalStorage/rooveterinaryinc.roo-cline/settings/mcp_settings.json"
628
+ },
629
+ configFormat: "json",
630
+ docsUrl: "https://docs.roocode.com/features/mcp/using-mcp-in-roo"
631
+ };
632
+ transformStdio(config) {
633
+ return {
634
+ ...toStdioFields(config),
635
+ alwaysAllow: [],
636
+ disabled: false
637
+ };
638
+ }
639
+ transformRemote(config) {
640
+ const base = toRemoteFields(config);
641
+ const transport = inferTransport(config);
642
+ const { transport: _transport, description: _description, ...rest } = base;
643
+ return {
644
+ type: transport === "http" ? "streamable-http" : transport,
645
+ ...rest,
646
+ alwaysAllow: [],
647
+ disabled: false
648
+ };
649
+ }
650
+ detectInstalled() {
651
+ const extId = "rooveterinaryinc.roo-cline";
652
+ switch (process.platform) {
653
+ case "darwin": return _existsSync(join(home, "Library", "Application Support", "Code", "User", "globalStorage", extId));
654
+ case "win32": return _existsSync(join(appData, "Code", "User", "globalStorage", extId));
655
+ default: return _existsSync(join(configHome, "Code", "User", "globalStorage", extId));
656
+ }
657
+ }
658
+ };
659
+ //#endregion
660
+ //#region node_modules/.pnpm/@getmcp+generators@0.10.1/node_modules/@getmcp/generators/dist/goose.js
661
+ /**
662
+ * Goose config generator.
663
+ *
664
+ * Config file: ~/.config/goose/config.yaml (YAML!)
665
+ * Format:
666
+ * extensions:
667
+ * name:
668
+ * name: Display Name
669
+ * cmd: npx
670
+ * args: [-y, @package/name]
671
+ * enabled: true
672
+ * envs: { "KEY": "value" }
673
+ * type: stdio
674
+ * timeout: 300
675
+ *
676
+ * Key differences from canonical:
677
+ * - YAML format (not JSON)
678
+ * - Root key: "extensions" (not "mcpServers")
679
+ * - "cmd" (not "command")
680
+ * - "envs" (not "env")
681
+ * - Extra fields: "enabled", "timeout" (in seconds), "name" (display name)
682
+ */
683
+ var import_dist = /* @__PURE__ */ __toESM(require_dist(), 1);
684
+ var GooseGenerator = class extends BaseGenerator {
685
+ app = {
686
+ id: "goose",
687
+ name: "Goose",
688
+ description: "Block's autonomous AI coding agent",
689
+ configPaths: null,
690
+ globalConfigPaths: {
691
+ darwin: "~/.config/goose/config.yaml",
692
+ win32: "%AppData%\\goose\\config.yaml",
693
+ linux: "~/.config/goose/config.yaml"
694
+ },
695
+ configFormat: "yaml",
696
+ docsUrl: "https://block.github.io/goose/docs/getting-started/using-extensions"
697
+ };
698
+ generate(serverName, config) {
699
+ let extensionConfig;
700
+ if (isStdioConfig(config)) extensionConfig = {
701
+ name: serverName,
702
+ cmd: config.command,
703
+ ...config.args && config.args.length > 0 ? { args: config.args } : {},
704
+ enabled: true,
705
+ ...config.env && Object.keys(config.env).length > 0 ? { envs: config.env } : {},
706
+ type: "stdio",
707
+ ...config.timeout ? { timeout: Math.ceil(config.timeout / 1e3) } : {},
708
+ ...config.description ? { description: config.description } : {}
709
+ };
710
+ else if (isRemoteConfig(config)) {
711
+ const transport = inferTransport(config);
712
+ extensionConfig = {
713
+ name: serverName,
714
+ uri: config.url,
715
+ enabled: true,
716
+ ...config.headers && Object.keys(config.headers).length > 0 ? { headers: config.headers } : {},
717
+ type: transport,
718
+ ...config.timeout ? { timeout: Math.ceil(config.timeout / 1e3) } : {},
719
+ ...config.description ? { description: config.description } : {}
720
+ };
721
+ } else throw new Error(INVALID_CONFIG_ERROR);
722
+ return { extensions: { [serverName]: extensionConfig } };
723
+ }
724
+ /**
725
+ * Serialize to YAML format using the `yaml` library.
726
+ */
727
+ serialize(config) {
728
+ return import_dist.stringify(config, { indent: 2 });
729
+ }
730
+ detectInstalled() {
731
+ return _existsSync(join(configHome, "goose")) || _existsSync(join(appData, "goose"));
732
+ }
733
+ };
734
+ //#endregion
735
+ //#region node_modules/.pnpm/@getmcp+generators@0.10.1/node_modules/@getmcp/generators/dist/windsurf.js
736
+ /**
737
+ * Windsurf config generator.
738
+ *
739
+ * Config file: ~/.codeium/windsurf/mcp_config.json
740
+ * Format: { "mcpServers": { "name": { "command", "args", "env" } } }
741
+ *
742
+ * Key differences from canonical:
743
+ * - Remote HTTP servers use "serverUrl" (not "url")
744
+ * - Supports ${env:VARIABLE_NAME} interpolation
745
+ * - Has MCP Marketplace and admin whitelist controls
746
+ * - Very similar to Claude Desktop for stdio
747
+ */
748
+ var WindsurfGenerator = class extends BaseGenerator {
749
+ app = {
750
+ id: "windsurf",
751
+ name: "Windsurf",
752
+ description: "Codeium's AI-powered code editor",
753
+ configPaths: null,
754
+ globalConfigPaths: {
755
+ darwin: "~/.codeium/windsurf/mcp_config.json",
756
+ win32: "%UserProfile%\\.codeium\\windsurf\\mcp_config.json",
757
+ linux: "~/.codeium/windsurf/mcp_config.json"
758
+ },
759
+ configFormat: "json",
760
+ docsUrl: "https://docs.windsurf.com/windsurf/cascade/mcp",
761
+ requiresRestart: true
762
+ };
763
+ transformRemote(config) {
764
+ const { url, transport: _transport, ...rest } = toRemoteFields(config);
765
+ return {
766
+ serverUrl: url,
767
+ ...rest
768
+ };
769
+ }
770
+ detectInstalled() {
771
+ return _existsSync(join(home, ".codeium", "windsurf"));
772
+ }
773
+ };
774
+ //#endregion
775
+ //#region node_modules/.pnpm/@getmcp+generators@0.10.1/node_modules/@getmcp/generators/dist/opencode.js
776
+ /**
777
+ * OpenCode config generator.
778
+ *
779
+ * Config file: opencode.json / opencode.jsonc
780
+ * Format:
781
+ * {
782
+ * "$schema": "https://opencode.ai/config.json",
783
+ * "mcp": {
784
+ * "name": {
785
+ * "type": "local",
786
+ * "command": ["npx", "-y", "package"],
787
+ * "environment": { "KEY": "value" },
788
+ * "enabled": true,
789
+ * "timeout": 5000
790
+ * }
791
+ * }
792
+ * }
793
+ *
794
+ * Key differences from canonical:
795
+ * - Root key: "mcp" (not "mcpServers")
796
+ * - "command" is an ARRAY that merges command + args
797
+ * - "environment" (not "env")
798
+ * - Requires explicit "type": "local" | "remote"
799
+ * - Has "enabled" field
800
+ * - Env var syntax: {env:VAR} (no $ prefix)
801
+ */
802
+ var OpenCodeGenerator = class extends BaseGenerator {
803
+ app = {
804
+ id: "opencode",
805
+ name: "OpenCode",
806
+ description: "Open-source AI coding agent by Anomaly",
807
+ configPaths: "opencode.json",
808
+ globalConfigPaths: null,
809
+ configFormat: "jsonc",
810
+ docsUrl: "https://opencode.ai/docs/mcp-servers/"
811
+ };
812
+ generate(serverName, config) {
813
+ let serverConfig;
814
+ if (isStdioConfig(config)) {
815
+ const commandArray = [config.command];
816
+ if (config.args && config.args.length > 0) commandArray.push(...config.args);
817
+ serverConfig = {
818
+ type: "local",
819
+ command: commandArray,
820
+ enabled: true,
821
+ ...config.env && Object.keys(config.env).length > 0 ? { environment: config.env } : {},
822
+ ...config.timeout ? { timeout: config.timeout } : {},
823
+ ...config.description ? { description: config.description } : {}
824
+ };
825
+ } else if (isRemoteConfig(config)) serverConfig = {
826
+ type: "remote",
827
+ url: config.url,
828
+ enabled: true,
829
+ ...config.headers && Object.keys(config.headers).length > 0 ? { headers: config.headers } : {},
830
+ ...config.timeout ? { timeout: config.timeout } : {},
831
+ ...config.description ? { description: config.description } : {}
832
+ };
833
+ else throw new Error(INVALID_CONFIG_ERROR);
834
+ return { mcp: { [serverName]: serverConfig } };
835
+ }
836
+ generateAll(servers) {
837
+ const mcp = {};
838
+ for (const [name, config] of Object.entries(servers)) {
839
+ const mcpSection = this.generate(name, config).mcp;
840
+ Object.assign(mcp, mcpSection);
841
+ }
842
+ return {
843
+ $schema: "https://opencode.ai/config.json",
844
+ mcp
845
+ };
846
+ }
847
+ detectInstalled() {
848
+ return _existsSync(join(configHome, "opencode"));
849
+ }
850
+ };
851
+ //#endregion
852
+ //#region node_modules/.pnpm/@getmcp+generators@0.10.1/node_modules/@getmcp/generators/dist/zed.js
853
+ /**
854
+ * Zed config generator.
855
+ *
856
+ * Config file: settings.json (Zed settings)
857
+ * Format:
858
+ * {
859
+ * "context_servers": {
860
+ * "name": {
861
+ * "command": "...",
862
+ * "args": ["..."],
863
+ * "env": {}
864
+ * }
865
+ * }
866
+ * }
867
+ *
868
+ * Key differences from canonical:
869
+ * - Root key: "context_servers" (not "mcpServers")
870
+ * - Otherwise uses standard command/args/env structure
871
+ * - Remote servers use "url" + "headers"
872
+ * - Also installable via Zed extensions
873
+ */
874
+ var ZedGenerator = class extends BaseGenerator {
875
+ rootKey = "context_servers";
876
+ app = {
877
+ id: "zed",
878
+ name: "Zed",
879
+ description: "High-performance code editor by Zed Industries",
880
+ configPaths: null,
881
+ globalConfigPaths: {
882
+ darwin: "~/.config/zed/settings.json",
883
+ win32: "%AppData%\\Zed\\settings.json",
884
+ linux: "~/.config/zed/settings.json"
885
+ },
886
+ configFormat: "json",
887
+ docsUrl: "https://zed.dev/docs/ai/mcp"
888
+ };
889
+ transformStdio(config) {
890
+ return toStdioFields(config);
891
+ }
892
+ transformRemote(config) {
893
+ if (!("url" in config)) throw new Error("Expected remote config but got stdio config");
894
+ return {
895
+ url: config.url,
896
+ ...config.headers && Object.keys(config.headers).length > 0 ? { headers: config.headers } : {},
897
+ ...config.timeout ? { timeout: config.timeout } : {}
898
+ };
899
+ }
900
+ detectInstalled() {
901
+ switch (process.platform) {
902
+ case "win32": return _existsSync(join(appData, "Zed"));
903
+ default: return _existsSync(join(configHome, "zed"));
904
+ }
905
+ }
906
+ };
907
+ //#endregion
908
+ //#region node_modules/.pnpm/@getmcp+generators@0.10.1/node_modules/@getmcp/generators/dist/pycharm.js
909
+ /**
910
+ * PyCharm config generator.
911
+ *
912
+ * Config: .ai/mcp/mcp.json (project-level) or IDE Settings → Tools → AI Assistant → MCP
913
+ * Format: { "mcpServers": { "name": { "command", "args", "env" } } }
914
+ *
915
+ * PyCharm's AI Assistant accepts MCP server configs in the same JSON format
916
+ * as Claude Desktop — essentially a passthrough. Supports stdio, streamable-http,
917
+ * and SSE transports.
918
+ *
919
+ * PyCharm supports project-level MCP configuration via .ai/mcp/mcp.json,
920
+ * similar to how VS Code uses .vscode/mcp.json. This file is shareable via
921
+ * version control and uses the canonical mcpServers format.
922
+ *
923
+ * Requires the JetBrains AI Assistant plugin:
924
+ * https://plugins.jetbrains.com/plugin/22282-jetbrains-ai-assistant
925
+ *
926
+ * Important: PyCharm must be closed and reopened for config changes to take effect.
927
+ */
928
+ var PyCharmGenerator = class extends BaseGenerator {
929
+ app = {
930
+ id: "pycharm",
931
+ name: "PyCharm",
932
+ description: "JetBrains PyCharm IDE with AI Assistant MCP integration",
933
+ configPaths: ".ai/mcp/mcp.json",
934
+ globalConfigPaths: null,
935
+ configFormat: "json",
936
+ docsUrl: "https://www.jetbrains.com/help/ai-assistant/mcp.html"
937
+ };
938
+ };
939
+ //#endregion
940
+ //#region node_modules/.pnpm/smol-toml@1.6.1/node_modules/smol-toml/dist/stringify.js
941
+ /*!
942
+ * Copyright (c) Squirrel Chat et al., All rights reserved.
943
+ * SPDX-License-Identifier: BSD-3-Clause
944
+ *
945
+ * Redistribution and use in source and binary forms, with or without
946
+ * modification, are permitted provided that the following conditions are met:
947
+ *
948
+ * 1. Redistributions of source code must retain the above copyright notice, this
949
+ * list of conditions and the following disclaimer.
950
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
951
+ * this list of conditions and the following disclaimer in the
952
+ * documentation and/or other materials provided with the distribution.
953
+ * 3. Neither the name of the copyright holder nor the names of its contributors
954
+ * may be used to endorse or promote products derived from this software without
955
+ * specific prior written permission.
956
+ *
957
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
958
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
959
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
960
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
961
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
962
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
963
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
964
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
965
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
966
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
967
+ */
968
+ let BARE_KEY = /^[a-z0-9-_]+$/i;
969
+ function extendedTypeOf(obj) {
970
+ let type = typeof obj;
971
+ if (type === "object") {
972
+ if (Array.isArray(obj)) return "array";
973
+ if (obj instanceof Date) return "date";
974
+ }
975
+ return type;
976
+ }
977
+ function isArrayOfTables(obj) {
978
+ for (let i = 0; i < obj.length; i++) if (extendedTypeOf(obj[i]) !== "object") return false;
979
+ return obj.length != 0;
980
+ }
981
+ function formatString(s) {
982
+ return JSON.stringify(s).replace(/\x7f/g, "\\u007f");
983
+ }
984
+ function stringifyValue(val, type, depth, numberAsFloat) {
985
+ if (depth === 0) throw new Error("Could not stringify the object: maximum object depth exceeded");
986
+ if (type === "number") {
987
+ if (isNaN(val)) return "nan";
988
+ if (val === Infinity) return "inf";
989
+ if (val === -Infinity) return "-inf";
990
+ if (numberAsFloat && Number.isInteger(val)) return val.toFixed(1);
991
+ return val.toString();
992
+ }
993
+ if (type === "bigint" || type === "boolean") return val.toString();
994
+ if (type === "string") return formatString(val);
995
+ if (type === "date") {
996
+ if (isNaN(val.getTime())) throw new TypeError("cannot serialize invalid date");
997
+ return val.toISOString();
998
+ }
999
+ if (type === "object") return stringifyInlineTable(val, depth, numberAsFloat);
1000
+ if (type === "array") return stringifyArray(val, depth, numberAsFloat);
1001
+ }
1002
+ function stringifyInlineTable(obj, depth, numberAsFloat) {
1003
+ let keys = Object.keys(obj);
1004
+ if (keys.length === 0) return "{}";
1005
+ let res = "{ ";
1006
+ for (let i = 0; i < keys.length; i++) {
1007
+ let k = keys[i];
1008
+ if (i) res += ", ";
1009
+ res += BARE_KEY.test(k) ? k : formatString(k);
1010
+ res += " = ";
1011
+ res += stringifyValue(obj[k], extendedTypeOf(obj[k]), depth - 1, numberAsFloat);
1012
+ }
1013
+ return res + " }";
1014
+ }
1015
+ function stringifyArray(array, depth, numberAsFloat) {
1016
+ if (array.length === 0) return "[]";
1017
+ let res = "[ ";
1018
+ for (let i = 0; i < array.length; i++) {
1019
+ if (i) res += ", ";
1020
+ if (array[i] === null || array[i] === void 0) throw new TypeError("arrays cannot contain null or undefined values");
1021
+ res += stringifyValue(array[i], extendedTypeOf(array[i]), depth - 1, numberAsFloat);
1022
+ }
1023
+ return res + " ]";
1024
+ }
1025
+ function stringifyArrayTable(array, key, depth, numberAsFloat) {
1026
+ if (depth === 0) throw new Error("Could not stringify the object: maximum object depth exceeded");
1027
+ let res = "";
1028
+ for (let i = 0; i < array.length; i++) {
1029
+ res += `${res && "\n"}[[${key}]]\n`;
1030
+ res += stringifyTable(0, array[i], key, depth, numberAsFloat);
1031
+ }
1032
+ return res;
1033
+ }
1034
+ function stringifyTable(tableKey, obj, prefix, depth, numberAsFloat) {
1035
+ if (depth === 0) throw new Error("Could not stringify the object: maximum object depth exceeded");
1036
+ let preamble = "";
1037
+ let tables = "";
1038
+ let keys = Object.keys(obj);
1039
+ for (let i = 0; i < keys.length; i++) {
1040
+ let k = keys[i];
1041
+ if (obj[k] !== null && obj[k] !== void 0) {
1042
+ let type = extendedTypeOf(obj[k]);
1043
+ if (type === "symbol" || type === "function") throw new TypeError(`cannot serialize values of type '${type}'`);
1044
+ let key = BARE_KEY.test(k) ? k : formatString(k);
1045
+ if (type === "array" && isArrayOfTables(obj[k])) tables += (tables && "\n") + stringifyArrayTable(obj[k], prefix ? `${prefix}.${key}` : key, depth - 1, numberAsFloat);
1046
+ else if (type === "object") {
1047
+ let tblKey = prefix ? `${prefix}.${key}` : key;
1048
+ tables += (tables && "\n") + stringifyTable(tblKey, obj[k], tblKey, depth - 1, numberAsFloat);
1049
+ } else {
1050
+ preamble += key;
1051
+ preamble += " = ";
1052
+ preamble += stringifyValue(obj[k], type, depth, numberAsFloat);
1053
+ preamble += "\n";
1054
+ }
1055
+ }
1056
+ }
1057
+ if (tableKey && (preamble || !tables)) preamble = preamble ? `[${tableKey}]\n${preamble}` : `[${tableKey}]`;
1058
+ return preamble && tables ? `${preamble}\n${tables}` : preamble || tables;
1059
+ }
1060
+ function stringify(obj, { maxDepth = 1e3, numbersAsFloat = false } = {}) {
1061
+ if (extendedTypeOf(obj) !== "object") throw new TypeError("stringify can only be called with an object");
1062
+ let str = stringifyTable(0, obj, "", maxDepth, numbersAsFloat);
1063
+ if (str[str.length - 1] !== "\n") return str + "\n";
1064
+ return str;
1065
+ }
1066
+ //#endregion
1067
+ //#region node_modules/.pnpm/@getmcp+generators@0.10.1/node_modules/@getmcp/generators/dist/codex.js
1068
+ /**
1069
+ * Codex (OpenAI) config generator.
1070
+ *
1071
+ * Config file: ~/.codex/config.toml (TOML!)
1072
+ * Format:
1073
+ * [mcp_servers.server-name]
1074
+ * command = "npx"
1075
+ * args = ["-y", "@package/name"]
1076
+ *
1077
+ * [mcp_servers.server-name.env]
1078
+ * API_KEY = "value"
1079
+ *
1080
+ * Remote (Streamable HTTP):
1081
+ * [mcp_servers.remote-server]
1082
+ * url = "https://mcp.example.com/mcp"
1083
+ *
1084
+ * [mcp_servers.remote-server.http_headers]
1085
+ * Authorization = "Bearer token"
1086
+ *
1087
+ * Key differences from canonical:
1088
+ * - TOML format (not JSON)
1089
+ * - Root key: "mcp_servers" (not "mcpServers")
1090
+ * - "headers" → "http_headers"
1091
+ * - "timeout" → "startup_timeout_sec" (ms to seconds)
1092
+ * - No explicit "transport" field (Codex auto-detects)
1093
+ */
1094
+ var CodexGenerator = class extends BaseGenerator {
1095
+ app = {
1096
+ id: "codex",
1097
+ name: "Codex",
1098
+ description: "OpenAI's AI coding agent",
1099
+ configPaths: ".codex/config.toml",
1100
+ globalConfigPaths: {
1101
+ darwin: "~/.codex/config.toml",
1102
+ win32: "%UserProfile%\\.codex\\config.toml",
1103
+ linux: "~/.codex/config.toml"
1104
+ },
1105
+ configFormat: "toml",
1106
+ docsUrl: "https://developers.openai.com/codex/mcp/"
1107
+ };
1108
+ generate(serverName, config) {
1109
+ let serverConfig;
1110
+ if (isStdioConfig(config)) serverConfig = {
1111
+ command: config.command,
1112
+ ...config.args && config.args.length > 0 ? { args: config.args } : {},
1113
+ ...config.env && Object.keys(config.env).length > 0 ? { env: config.env } : {},
1114
+ ...config.cwd ? { cwd: config.cwd } : {},
1115
+ ...config.timeout ? { startup_timeout_sec: Math.ceil(config.timeout / 1e3) } : {},
1116
+ ...config.description ? { description: config.description } : {}
1117
+ };
1118
+ else if (isRemoteConfig(config)) serverConfig = {
1119
+ url: config.url,
1120
+ ...config.headers && Object.keys(config.headers).length > 0 ? { http_headers: config.headers } : {},
1121
+ ...config.timeout ? { startup_timeout_sec: Math.ceil(config.timeout / 1e3) } : {},
1122
+ ...config.description ? { description: config.description } : {}
1123
+ };
1124
+ else throw new Error(INVALID_CONFIG_ERROR);
1125
+ return { mcp_servers: { [serverName]: serverConfig } };
1126
+ }
1127
+ /**
1128
+ * Serialize to TOML format using the `smol-toml` library.
1129
+ */
1130
+ serialize(config) {
1131
+ return stringify(config);
1132
+ }
1133
+ detectInstalled() {
1134
+ return _existsSync(codexHome);
1135
+ }
1136
+ };
1137
+ //#endregion
1138
+ //#region node_modules/.pnpm/@getmcp+generators@0.10.1/node_modules/@getmcp/generators/dist/gemini-cli.js
1139
+ /**
1140
+ * Gemini CLI config generator.
1141
+ *
1142
+ * Config file: ~/.gemini/settings.json
1143
+ * Format: { "mcpServers": { "name": { "command", "args", "env" } } }
1144
+ *
1145
+ * Near-passthrough — Gemini CLI uses the same canonical mcpServers format.
1146
+ */
1147
+ var GeminiCliGenerator = class extends BaseGenerator {
1148
+ app = {
1149
+ id: "gemini-cli",
1150
+ name: "Gemini CLI",
1151
+ description: "Google's Gemini CLI agent",
1152
+ configPaths: null,
1153
+ globalConfigPaths: {
1154
+ darwin: "~/.gemini/settings.json",
1155
+ win32: "%UserProfile%\\.gemini\\settings.json",
1156
+ linux: "~/.gemini/settings.json"
1157
+ },
1158
+ configFormat: "json",
1159
+ docsUrl: "https://github.com/google-gemini/gemini-cli"
1160
+ };
1161
+ detectInstalled() {
1162
+ return _existsSync(join(home, ".gemini"));
1163
+ }
1164
+ };
1165
+ //#endregion
1166
+ //#region node_modules/.pnpm/@getmcp+generators@0.10.1/node_modules/@getmcp/generators/dist/continue.js
1167
+ /**
1168
+ * Continue config generator.
1169
+ *
1170
+ * Config file: ~/.continue/config.json
1171
+ * Format: { "mcpServers": { "name": { "command", "args", "env" } } }
1172
+ *
1173
+ * Near-passthrough — Continue uses the same canonical mcpServers format.
1174
+ */
1175
+ var ContinueGenerator = class extends BaseGenerator {
1176
+ app = {
1177
+ id: "continue",
1178
+ name: "Continue",
1179
+ description: "Open-source AI code assistant for VS Code and JetBrains",
1180
+ configPaths: null,
1181
+ globalConfigPaths: {
1182
+ darwin: "~/.continue/config.json",
1183
+ win32: "%UserProfile%\\.continue\\config.json",
1184
+ linux: "~/.continue/config.json"
1185
+ },
1186
+ configFormat: "json",
1187
+ docsUrl: "https://docs.continue.dev/customize/model-providers/mcp"
1188
+ };
1189
+ detectInstalled() {
1190
+ return _existsSync(join(home, ".continue"));
1191
+ }
1192
+ };
1193
+ //#endregion
1194
+ //#region node_modules/.pnpm/@getmcp+generators@0.10.1/node_modules/@getmcp/generators/dist/amazon-q.js
1195
+ /**
1196
+ * Amazon Q Developer config generator.
1197
+ *
1198
+ * Config file: ~/.aws/amazonq/mcp.json
1199
+ * Format: { "mcpServers": { "name": { "command", "args", "env" } } }
1200
+ *
1201
+ * Near-passthrough — Amazon Q uses the same canonical mcpServers format.
1202
+ */
1203
+ var AmazonQGenerator = class extends BaseGenerator {
1204
+ app = {
1205
+ id: "amazon-q",
1206
+ name: "Amazon Q Developer",
1207
+ description: "AWS AI coding assistant",
1208
+ configPaths: null,
1209
+ globalConfigPaths: {
1210
+ darwin: "~/.aws/amazonq/mcp.json",
1211
+ win32: "%UserProfile%\\.aws\\amazonq\\mcp.json",
1212
+ linux: "~/.aws/amazonq/mcp.json"
1213
+ },
1214
+ configFormat: "json",
1215
+ docsUrl: "https://docs.aws.amazon.com/amazonq/latest/qdeveloper-ug/mcp.html"
1216
+ };
1217
+ detectInstalled() {
1218
+ return _existsSync(join(home, ".aws", "amazonq"));
1219
+ }
1220
+ };
1221
+ //#endregion
1222
+ //#region node_modules/.pnpm/@getmcp+generators@0.10.1/node_modules/@getmcp/generators/dist/trae.js
1223
+ /**
1224
+ * Trae config generator.
1225
+ *
1226
+ * Config file: .trae/mcp.json (project-scoped)
1227
+ * Format: { "mcpServers": { "name": { "command", "args", "env" } } }
1228
+ *
1229
+ * Near-passthrough — Trae uses the same canonical mcpServers format.
1230
+ * Project-scoped configuration.
1231
+ */
1232
+ var TraeGenerator = class extends BaseGenerator {
1233
+ app = {
1234
+ id: "trae",
1235
+ name: "Trae",
1236
+ description: "ByteDance's AI-powered IDE",
1237
+ configPaths: ".trae/mcp.json",
1238
+ globalConfigPaths: null,
1239
+ configFormat: "json",
1240
+ docsUrl: "https://docs.trae.ai/ide/model-context-protocol-mcp"
1241
+ };
1242
+ detectInstalled() {
1243
+ return _existsSync(join(home, ".trae"));
1244
+ }
1245
+ };
1246
+ //#endregion
1247
+ //#region node_modules/.pnpm/@getmcp+generators@0.10.1/node_modules/@getmcp/generators/dist/bolt-ai.js
1248
+ /**
1249
+ * Bolt AI config generator.
1250
+ *
1251
+ * Config file: ~/Library/Application Support/BoltAI/mcp_config.json (macOS only)
1252
+ * Format: { "mcpServers": { "name": { "command", "args", "env" } } }
1253
+ *
1254
+ * Near-passthrough — Bolt AI uses the same canonical mcpServers format.
1255
+ * macOS-only application.
1256
+ */
1257
+ var BoltAIGenerator = class extends BaseGenerator {
1258
+ app = {
1259
+ id: "bolt-ai",
1260
+ name: "BoltAI",
1261
+ description: "Native macOS AI chat client",
1262
+ configPaths: null,
1263
+ globalConfigPaths: { darwin: "~/Library/Application Support/BoltAI/mcp_config.json" },
1264
+ configFormat: "json",
1265
+ docsUrl: "https://docs.boltai.com/docs/mcp/overview"
1266
+ };
1267
+ detectInstalled() {
1268
+ if (process.platform !== "darwin") return false;
1269
+ return _existsSync(join(home, "Library", "Application Support", "BoltAI"));
1270
+ }
1271
+ };
1272
+ //#endregion
1273
+ //#region node_modules/.pnpm/@getmcp+generators@0.10.1/node_modules/@getmcp/generators/dist/libre-chat.js
1274
+ /**
1275
+ * LibreChat config generator.
1276
+ *
1277
+ * Config file: librechat.yaml
1278
+ * Format (YAML):
1279
+ * mcpServers:
1280
+ * name:
1281
+ * command: npx
1282
+ * args: [-y, @package/name]
1283
+ * env:
1284
+ * KEY: value
1285
+ *
1286
+ * Key differences from canonical:
1287
+ * - YAML format (not JSON)
1288
+ * - Otherwise uses the same mcpServers root key and field names
1289
+ */
1290
+ var LibreChatGenerator = class extends BaseGenerator {
1291
+ app = {
1292
+ id: "libre-chat",
1293
+ name: "LibreChat",
1294
+ description: "Open-source AI chat platform with multi-provider support",
1295
+ configPaths: "librechat.yaml",
1296
+ globalConfigPaths: null,
1297
+ configFormat: "yaml",
1298
+ docsUrl: "https://www.librechat.ai/docs/configuration/mcp_servers"
1299
+ };
1300
+ /**
1301
+ * Serialize to YAML format.
1302
+ */
1303
+ serialize(config) {
1304
+ return import_dist.stringify(config, { indent: 2 });
1305
+ }
1306
+ };
1307
+ //#endregion
1308
+ //#region node_modules/.pnpm/@getmcp+generators@0.10.1/node_modules/@getmcp/generators/dist/antigravity.js
1309
+ /**
1310
+ * Google Antigravity IDE config generator.
1311
+ *
1312
+ * Config file: ~/.gemini/antigravity/mcp_config.json
1313
+ * Format: { "mcpServers": { "name": { "command", "args", "env" } } }
1314
+ *
1315
+ * Near-passthrough — Antigravity uses the same canonical mcpServers format.
1316
+ */
1317
+ var AntigravityGenerator = class extends BaseGenerator {
1318
+ app = {
1319
+ id: "antigravity",
1320
+ name: "Antigravity",
1321
+ description: "Google's AI-first IDE",
1322
+ configPaths: null,
1323
+ globalConfigPaths: {
1324
+ darwin: "~/.gemini/antigravity/mcp_config.json",
1325
+ win32: "%UserProfile%\\.gemini\\antigravity\\mcp_config.json",
1326
+ linux: "~/.gemini/antigravity/mcp_config.json"
1327
+ },
1328
+ configFormat: "json",
1329
+ docsUrl: "https://antigravity.google/docs/mcp"
1330
+ };
1331
+ detectInstalled() {
1332
+ return _existsSync(join(home, ".gemini", "antigravity"));
1333
+ }
1334
+ };
1335
+ //#endregion
1336
+ //#region node_modules/.pnpm/@getmcp+generators@0.10.1/node_modules/@getmcp/generators/dist/index.js
1337
+ /**
1338
+ * @getmcp/generators
1339
+ *
1340
+ * Config generators that transform canonical MCP server definitions
1341
+ * into app-specific configuration formats for 19 AI applications.
1342
+ */
1343
+ /**
1344
+ * Map of all available generators, keyed by AppId.
1345
+ */
1346
+ const generators = {
1347
+ "claude-desktop": new ClaudeDesktopGenerator(),
1348
+ "claude-code": new ClaudeCodeGenerator(),
1349
+ vscode: new VSCodeGenerator(),
1350
+ cursor: new CursorGenerator(),
1351
+ cline: new ClineGenerator(),
1352
+ "roo-code": new RooCodeGenerator(),
1353
+ goose: new GooseGenerator(),
1354
+ windsurf: new WindsurfGenerator(),
1355
+ opencode: new OpenCodeGenerator(),
1356
+ zed: new ZedGenerator(),
1357
+ pycharm: new PyCharmGenerator(),
1358
+ codex: new CodexGenerator(),
1359
+ "gemini-cli": new GeminiCliGenerator(),
1360
+ continue: new ContinueGenerator(),
1361
+ "amazon-q": new AmazonQGenerator(),
1362
+ trae: new TraeGenerator(),
1363
+ "bolt-ai": new BoltAIGenerator(),
1364
+ "libre-chat": new LibreChatGenerator(),
1365
+ antigravity: new AntigravityGenerator()
1366
+ };
1367
+ /**
1368
+ * Get a generator by app ID.
1369
+ */
1370
+ function getGenerator(appId) {
1371
+ const gen = generators[appId];
1372
+ if (!gen) throw new Error(`No generator found for app: ${appId}`);
1373
+ return gen;
1374
+ }
1375
+ /**
1376
+ * Get all available app IDs.
1377
+ */
1378
+ function getAppIds() {
1379
+ return Object.keys(generators);
1380
+ }
1381
+ /**
1382
+ * Generate config for a specific app from a canonical server definition.
1383
+ */
1384
+ function generateConfig(appId, serverName, config) {
1385
+ return getGenerator(appId).generate(serverName, config);
1386
+ }
1387
+ //#endregion
1388
+ export { deepMerge, generateConfig, generators, getAppIds };