@webiny/mcp 6.1.0-beta.1 → 6.1.0-beta.2

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 (77) hide show
  1. package/agents/claude.d.ts +2 -0
  2. package/agents/claude.js +6 -0
  3. package/agents/claude.js.map +1 -1
  4. package/agents/cline.d.ts +2 -0
  5. package/agents/cline.js +6 -0
  6. package/agents/cline.js.map +1 -1
  7. package/agents/copilot.d.ts +2 -0
  8. package/agents/copilot.js +7 -0
  9. package/agents/copilot.js.map +1 -1
  10. package/agents/cursor.d.ts +2 -0
  11. package/agents/cursor.js +6 -0
  12. package/agents/cursor.js.map +1 -1
  13. package/agents/discover.d.ts +3 -0
  14. package/agents/discover.js +29 -0
  15. package/agents/discover.js.map +1 -0
  16. package/agents/instructions.d.ts +3 -1
  17. package/agents/instructions.js +15 -2
  18. package/agents/instructions.js.map +1 -1
  19. package/agents/kiro.d.ts +2 -0
  20. package/agents/kiro.js +6 -0
  21. package/agents/kiro.js.map +1 -1
  22. package/agents/opencode.d.ts +2 -0
  23. package/agents/opencode.js +7 -0
  24. package/agents/opencode.js.map +1 -1
  25. package/agents/types.d.ts +16 -0
  26. package/agents/types.js +3 -0
  27. package/agents/types.js.map +1 -0
  28. package/agents/windsurf.d.ts +2 -0
  29. package/agents/windsurf.js +6 -0
  30. package/agents/windsurf.js.map +1 -1
  31. package/cli/ConfigureMcp.js +21 -6
  32. package/cli/ConfigureMcp.js.map +1 -1
  33. package/package.json +3 -3
  34. package/skills/admin/admin-architect/SKILL.md +188 -0
  35. package/skills/admin/admin-permissions/SKILL.md +159 -0
  36. package/skills/api/api-architect/SKILL.md +548 -60
  37. package/skills/api/event-handler-pattern/SKILL.md +191 -23
  38. package/skills/api/graphql-api/SKILL.md +227 -31
  39. package/skills/api/permissions/SKILL.md +291 -0
  40. package/skills/api/use-case-pattern/SKILL.md +347 -12
  41. package/skills/api/v5-to-v6-migration/SKILL.md +416 -0
  42. package/skills/generated/admin/SKILL.md +1 -1
  43. package/skills/generated/admin/aco/SKILL.md +1 -1
  44. package/skills/generated/admin/build-params/SKILL.md +1 -1
  45. package/skills/generated/admin/cms/SKILL.md +1 -1
  46. package/skills/generated/admin/configs/SKILL.md +1 -1
  47. package/skills/generated/admin/env-config/SKILL.md +1 -1
  48. package/skills/generated/admin/form/SKILL.md +1 -1
  49. package/skills/generated/admin/graphql-client/SKILL.md +1 -1
  50. package/skills/generated/admin/lexical/SKILL.md +1 -1
  51. package/skills/generated/admin/local-storage/SKILL.md +1 -1
  52. package/skills/generated/admin/router/SKILL.md +1 -1
  53. package/skills/generated/admin/security/SKILL.md +1 -1
  54. package/skills/generated/admin/tenancy/SKILL.md +1 -1
  55. package/skills/generated/admin/ui/SKILL.md +1 -1
  56. package/skills/generated/admin/website-builder/SKILL.md +1 -1
  57. package/skills/generated/api/SKILL.md +1 -1
  58. package/skills/generated/api/aco/SKILL.md +1 -1
  59. package/skills/generated/api/build-params/SKILL.md +1 -1
  60. package/skills/generated/api/cms/SKILL.md +1 -1
  61. package/skills/generated/api/event-publisher/SKILL.md +1 -1
  62. package/skills/generated/api/file-manager/SKILL.md +1 -1
  63. package/skills/generated/api/graphql/SKILL.md +1 -1
  64. package/skills/generated/api/key-value-store/SKILL.md +1 -1
  65. package/skills/generated/api/logger/SKILL.md +1 -1
  66. package/skills/generated/api/opensearch/SKILL.md +1 -1
  67. package/skills/generated/api/scheduler/SKILL.md +1 -1
  68. package/skills/generated/api/security/SKILL.md +1 -1
  69. package/skills/generated/api/system/SKILL.md +1 -1
  70. package/skills/generated/api/tasks/SKILL.md +1 -1
  71. package/skills/generated/api/tenancy/SKILL.md +1 -1
  72. package/skills/generated/api/tenant-manager/SKILL.md +1 -1
  73. package/skills/generated/api/website-builder/SKILL.md +1 -1
  74. package/skills/generated/cli/SKILL.md +1 -1
  75. package/skills/generated/cli/command/SKILL.md +1 -1
  76. package/skills/generated/extensions/SKILL.md +1 -1
  77. package/skills/generated/infra/SKILL.md +1 -1
@@ -7,6 +7,8 @@
7
7
  * Docs: https://docs.anthropic.com/en/docs/claude-code/mcp
8
8
  */
9
9
  import type { IUi } from "../ui.js";
10
+ import type { AgentPreset } from "./types.js";
11
+ export declare const preset: AgentPreset;
10
12
  interface InitParams {
11
13
  ui: IUi;
12
14
  cwd: string;
package/agents/claude.js CHANGED
@@ -9,6 +9,12 @@
9
9
 
10
10
  import { join } from "path";
11
11
  import { writeMcpConfig, writeHintFile, webinyHintBlock, printDone } from "./shared.js";
12
+ export const preset = {
13
+ slug: "claude",
14
+ displayName: "Claude Code",
15
+ configFile: ".mcp.json",
16
+ hintFile: "CLAUDE.md"
17
+ };
12
18
  export async function init({
13
19
  ui,
14
20
  cwd
@@ -1 +1 @@
1
- {"version":3,"names":["join","writeMcpConfig","writeHintFile","webinyHintBlock","printDone","init","ui","cwd","info","configPath","hintPath","content","heading"],"sources":["claude.ts"],"sourcesContent":["/**\n * Agent adapter: Claude Code\n *\n * MCP config : .mcp.json (project-level, checked into git)\n * Hint file : CLAUDE.md (Claude Code reads this automatically each session)\n *\n * Docs: https://docs.anthropic.com/en/docs/claude-code/mcp\n */\n\nimport { join } from \"path\";\nimport type { IUi } from \"../ui.js\";\nimport { writeMcpConfig, writeHintFile, webinyHintBlock, printDone } from \"./shared.js\";\n\ninterface InitParams {\n ui: IUi;\n cwd: string;\n}\n\nexport async function init({ ui, cwd }: InitParams): Promise<void> {\n ui.info(\"Setting up for Claude Code...\");\n\n writeMcpConfig({\n ui,\n configPath: join(cwd, \".mcp.json\")\n });\n\n writeHintFile({\n ui,\n hintPath: join(cwd, \"CLAUDE.md\"),\n content: webinyHintBlock({ heading: \"## Webiny\" })\n });\n\n printDone({ ui });\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,IAAI,QAAQ,MAAM;AAE3B,SAASC,cAAc,EAAEC,aAAa,EAAEC,eAAe,EAAEC,SAAS;AAOlE,OAAO,eAAeC,IAAIA,CAAC;EAAEC,EAAE;EAAEC;AAAgB,CAAC,EAAiB;EAC/DD,EAAE,CAACE,IAAI,CAAC,+BAA+B,CAAC;EAExCP,cAAc,CAAC;IACXK,EAAE;IACFG,UAAU,EAAET,IAAI,CAACO,GAAG,EAAE,WAAW;EACrC,CAAC,CAAC;EAEFL,aAAa,CAAC;IACVI,EAAE;IACFI,QAAQ,EAAEV,IAAI,CAACO,GAAG,EAAE,WAAW,CAAC;IAChCI,OAAO,EAAER,eAAe,CAAC;MAAES,OAAO,EAAE;IAAY,CAAC;EACrD,CAAC,CAAC;EAEFR,SAAS,CAAC;IAAEE;EAAG,CAAC,CAAC;AACrB","ignoreList":[]}
1
+ {"version":3,"names":["join","writeMcpConfig","writeHintFile","webinyHintBlock","printDone","preset","slug","displayName","configFile","hintFile","init","ui","cwd","info","configPath","hintPath","content","heading"],"sources":["claude.ts"],"sourcesContent":["/**\n * Agent adapter: Claude Code\n *\n * MCP config : .mcp.json (project-level, checked into git)\n * Hint file : CLAUDE.md (Claude Code reads this automatically each session)\n *\n * Docs: https://docs.anthropic.com/en/docs/claude-code/mcp\n */\n\nimport { join } from \"path\";\nimport type { IUi } from \"../ui.js\";\nimport type { AgentPreset } from \"./types.js\";\nimport { writeMcpConfig, writeHintFile, webinyHintBlock, printDone } from \"./shared.js\";\n\nexport const preset: AgentPreset = {\n slug: \"claude\",\n displayName: \"Claude Code\",\n configFile: \".mcp.json\",\n hintFile: \"CLAUDE.md\"\n};\n\ninterface InitParams {\n ui: IUi;\n cwd: string;\n}\n\nexport async function init({ ui, cwd }: InitParams): Promise<void> {\n ui.info(\"Setting up for Claude Code...\");\n\n writeMcpConfig({\n ui,\n configPath: join(cwd, \".mcp.json\")\n });\n\n writeHintFile({\n ui,\n hintPath: join(cwd, \"CLAUDE.md\"),\n content: webinyHintBlock({ heading: \"## Webiny\" })\n });\n\n printDone({ ui });\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,IAAI,QAAQ,MAAM;AAG3B,SAASC,cAAc,EAAEC,aAAa,EAAEC,eAAe,EAAEC,SAAS;AAElE,OAAO,MAAMC,MAAmB,GAAG;EAC/BC,IAAI,EAAE,QAAQ;EACdC,WAAW,EAAE,aAAa;EAC1BC,UAAU,EAAE,WAAW;EACvBC,QAAQ,EAAE;AACd,CAAC;AAOD,OAAO,eAAeC,IAAIA,CAAC;EAAEC,EAAE;EAAEC;AAAgB,CAAC,EAAiB;EAC/DD,EAAE,CAACE,IAAI,CAAC,+BAA+B,CAAC;EAExCZ,cAAc,CAAC;IACXU,EAAE;IACFG,UAAU,EAAEd,IAAI,CAACY,GAAG,EAAE,WAAW;EACrC,CAAC,CAAC;EAEFV,aAAa,CAAC;IACVS,EAAE;IACFI,QAAQ,EAAEf,IAAI,CAACY,GAAG,EAAE,WAAW,CAAC;IAChCI,OAAO,EAAEb,eAAe,CAAC;MAAEc,OAAO,EAAE;IAAY,CAAC;EACrD,CAAC,CAAC;EAEFb,SAAS,CAAC;IAAEO;EAAG,CAAC,CAAC;AACrB","ignoreList":[]}
package/agents/cline.d.ts CHANGED
@@ -9,6 +9,8 @@
9
9
  * Docs: https://docs.cline.bot/mcp-servers/configuring-mcp-servers
10
10
  */
11
11
  import type { IUi } from "../ui.js";
12
+ import type { AgentPreset } from "./types.js";
13
+ export declare const preset: AgentPreset;
12
14
  interface InitParams {
13
15
  ui: IUi;
14
16
  cwd: string;
package/agents/cline.js CHANGED
@@ -11,6 +11,12 @@
11
11
 
12
12
  import { join } from "path";
13
13
  import { writeMcpConfig, printDone } from "./shared.js";
14
+ export const preset = {
15
+ slug: "cline",
16
+ displayName: "Cline",
17
+ configFile: ".vscode/cline_mcp_settings.json",
18
+ hintNote: "system prompt in settings"
19
+ };
14
20
  export async function init({
15
21
  ui,
16
22
  cwd
@@ -1 +1 @@
1
- {"version":3,"names":["join","writeMcpConfig","printDone","init","ui","cwd","info","configPath","extra"],"sources":["cline.ts"],"sourcesContent":["/**\n * Agent adapter: Cline\n *\n * MCP config : .vscode/cline_mcp_settings.json (project-level)\n *\n * Cline reads instructions from its system prompt in settings,\n * so we only write the MCP config file.\n *\n * Docs: https://docs.cline.bot/mcp-servers/configuring-mcp-servers\n */\n\nimport { join } from \"path\";\nimport type { IUi } from \"../ui.js\";\nimport { writeMcpConfig, printDone } from \"./shared.js\";\n\ninterface InitParams {\n ui: IUi;\n cwd: string;\n}\n\nexport async function init({ ui, cwd }: InitParams): Promise<void> {\n ui.info(\"Setting up for Cline...\");\n\n writeMcpConfig({\n ui,\n configPath: join(cwd, \".vscode\", \"cline_mcp_settings.json\")\n });\n\n printDone({\n ui,\n extra: \"Add Webiny instructions to Cline's system prompt in settings manually.\"\n });\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,IAAI,QAAQ,MAAM;AAE3B,SAASC,cAAc,EAAEC,SAAS;AAOlC,OAAO,eAAeC,IAAIA,CAAC;EAAEC,EAAE;EAAEC;AAAgB,CAAC,EAAiB;EAC/DD,EAAE,CAACE,IAAI,CAAC,yBAAyB,CAAC;EAElCL,cAAc,CAAC;IACXG,EAAE;IACFG,UAAU,EAAEP,IAAI,CAACK,GAAG,EAAE,SAAS,EAAE,yBAAyB;EAC9D,CAAC,CAAC;EAEFH,SAAS,CAAC;IACNE,EAAE;IACFI,KAAK,EAAE;EACX,CAAC,CAAC;AACN","ignoreList":[]}
1
+ {"version":3,"names":["join","writeMcpConfig","printDone","preset","slug","displayName","configFile","hintNote","init","ui","cwd","info","configPath","extra"],"sources":["cline.ts"],"sourcesContent":["/**\n * Agent adapter: Cline\n *\n * MCP config : .vscode/cline_mcp_settings.json (project-level)\n *\n * Cline reads instructions from its system prompt in settings,\n * so we only write the MCP config file.\n *\n * Docs: https://docs.cline.bot/mcp-servers/configuring-mcp-servers\n */\n\nimport { join } from \"path\";\nimport type { IUi } from \"../ui.js\";\nimport type { AgentPreset } from \"./types.js\";\nimport { writeMcpConfig, printDone } from \"./shared.js\";\n\nexport const preset: AgentPreset = {\n slug: \"cline\",\n displayName: \"Cline\",\n configFile: \".vscode/cline_mcp_settings.json\",\n hintNote: \"system prompt in settings\"\n};\n\ninterface InitParams {\n ui: IUi;\n cwd: string;\n}\n\nexport async function init({ ui, cwd }: InitParams): Promise<void> {\n ui.info(\"Setting up for Cline...\");\n\n writeMcpConfig({\n ui,\n configPath: join(cwd, \".vscode\", \"cline_mcp_settings.json\")\n });\n\n printDone({\n ui,\n extra: \"Add Webiny instructions to Cline's system prompt in settings manually.\"\n });\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,IAAI,QAAQ,MAAM;AAG3B,SAASC,cAAc,EAAEC,SAAS;AAElC,OAAO,MAAMC,MAAmB,GAAG;EAC/BC,IAAI,EAAE,OAAO;EACbC,WAAW,EAAE,OAAO;EACpBC,UAAU,EAAE,iCAAiC;EAC7CC,QAAQ,EAAE;AACd,CAAC;AAOD,OAAO,eAAeC,IAAIA,CAAC;EAAEC,EAAE;EAAEC;AAAgB,CAAC,EAAiB;EAC/DD,EAAE,CAACE,IAAI,CAAC,yBAAyB,CAAC;EAElCV,cAAc,CAAC;IACXQ,EAAE;IACFG,UAAU,EAAEZ,IAAI,CAACU,GAAG,EAAE,SAAS,EAAE,yBAAyB;EAC9D,CAAC,CAAC;EAEFR,SAAS,CAAC;IACNO,EAAE;IACFI,KAAK,EAAE;EACX,CAAC,CAAC;AACN","ignoreList":[]}
@@ -9,6 +9,8 @@
9
9
  * Docs: https://code.visualstudio.com/docs/copilot/chat/mcp-servers
10
10
  */
11
11
  import type { IUi } from "../ui.js";
12
+ import type { AgentPreset } from "./types.js";
13
+ export declare const preset: AgentPreset;
12
14
  interface InitParams {
13
15
  ui: IUi;
14
16
  cwd: string;
package/agents/copilot.js CHANGED
@@ -12,6 +12,13 @@
12
12
  import { join, dirname } from "path";
13
13
  import { readFileSync, writeFileSync, existsSync, mkdirSync } from "fs";
14
14
  import { writeHintFile, webinyHintBlock, printDone } from "./shared.js";
15
+ export const preset = {
16
+ slug: "copilot",
17
+ displayName: "Copilot / VS Code",
18
+ configFile: ".vscode/mcp.json",
19
+ configNote: "uses 'servers', not 'mcpServers'",
20
+ hintFile: ".github/copilot-instructions.md"
21
+ };
15
22
  function writeCopilotMcpConfig(ui, configPath) {
16
23
  const dir = dirname(configPath);
17
24
  if (!existsSync(dir)) {
@@ -1 +1 @@
1
- {"version":3,"names":["join","dirname","readFileSync","writeFileSync","existsSync","mkdirSync","writeHintFile","webinyHintBlock","printDone","writeCopilotMcpConfig","ui","configPath","dir","recursive","entry","command","args","config","servers","JSON","parse","warning","webiny","info","stringify","success","init","cwd","hintPath","content","heading"],"sources":["copilot.ts"],"sourcesContent":["/**\n * Agent adapter: GitHub Copilot / VS Code\n *\n * MCP config : .vscode/mcp.json (project-level)\n * Hint file : .github/copilot-instructions.md\n *\n * Note: VS Code uses \"servers\" as the top-level key, not \"mcpServers\".\n *\n * Docs: https://code.visualstudio.com/docs/copilot/chat/mcp-servers\n */\n\nimport { join, dirname } from \"path\";\nimport { readFileSync, writeFileSync, existsSync, mkdirSync } from \"fs\";\nimport type { IUi } from \"../ui.js\";\nimport { writeHintFile, webinyHintBlock, printDone } from \"./shared.js\";\n\ninterface InitParams {\n ui: IUi;\n cwd: string;\n}\n\nfunction writeCopilotMcpConfig(ui: IUi, configPath: string): boolean {\n const dir = dirname(configPath);\n if (!existsSync(dir)) {\n mkdirSync(dir, { recursive: true });\n }\n\n const entry = { command: \"npx\", args: [\"webiny-mcp\", \"serve\"] };\n let config: { servers: Record<string, unknown> } = { servers: {} };\n\n if (existsSync(configPath)) {\n try {\n config = JSON.parse(readFileSync(configPath, \"utf8\"));\n config.servers ??= {};\n } catch {\n ui.warning(`Could not parse %s — will overwrite.`, configPath);\n }\n }\n\n if (config.servers.webiny) {\n ui.info(`${configPath} already has a %s entry — skipping.`, \"webiny\");\n return false;\n }\n\n config.servers.webiny = entry;\n writeFileSync(configPath, JSON.stringify(config, null, 2) + \"\\n\");\n ui.success(`Registered Webiny MCP server in %s`, configPath);\n return true;\n}\n\nexport async function init({ ui, cwd }: InitParams): Promise<void> {\n ui.info(\"Setting up for GitHub Copilot (VS Code)...\");\n\n writeCopilotMcpConfig(ui, join(cwd, \".vscode\", \"mcp.json\"));\n\n writeHintFile({\n ui,\n hintPath: join(cwd, \".github\", \"copilot-instructions.md\"),\n content: webinyHintBlock({ heading: \"## Webiny\" })\n });\n\n printDone({ ui });\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,IAAI,EAAEC,OAAO,QAAQ,MAAM;AACpC,SAASC,YAAY,EAAEC,aAAa,EAAEC,UAAU,EAAEC,SAAS,QAAQ,IAAI;AAEvE,SAASC,aAAa,EAAEC,eAAe,EAAEC,SAAS;AAOlD,SAASC,qBAAqBA,CAACC,EAAO,EAAEC,UAAkB,EAAW;EACjE,MAAMC,GAAG,GAAGX,OAAO,CAACU,UAAU,CAAC;EAC/B,IAAI,CAACP,UAAU,CAACQ,GAAG,CAAC,EAAE;IAClBP,SAAS,CAACO,GAAG,EAAE;MAAEC,SAAS,EAAE;IAAK,CAAC,CAAC;EACvC;EAEA,MAAMC,KAAK,GAAG;IAAEC,OAAO,EAAE,KAAK;IAAEC,IAAI,EAAE,CAAC,YAAY,EAAE,OAAO;EAAE,CAAC;EAC/D,IAAIC,MAA4C,GAAG;IAAEC,OAAO,EAAE,CAAC;EAAE,CAAC;EAElE,IAAId,UAAU,CAACO,UAAU,CAAC,EAAE;IACxB,IAAI;MACAM,MAAM,GAAGE,IAAI,CAACC,KAAK,CAAClB,YAAY,CAACS,UAAU,EAAE,MAAM,CAAC,CAAC;MACrDM,MAAM,CAACC,OAAO,KAAK,CAAC,CAAC;IACzB,CAAC,CAAC,MAAM;MACJR,EAAE,CAACW,OAAO,CAAC,sCAAsC,EAAEV,UAAU,CAAC;IAClE;EACJ;EAEA,IAAIM,MAAM,CAACC,OAAO,CAACI,MAAM,EAAE;IACvBZ,EAAE,CAACa,IAAI,CAAC,GAAGZ,UAAU,qCAAqC,EAAE,QAAQ,CAAC;IACrE,OAAO,KAAK;EAChB;EAEAM,MAAM,CAACC,OAAO,CAACI,MAAM,GAAGR,KAAK;EAC7BX,aAAa,CAACQ,UAAU,EAAEQ,IAAI,CAACK,SAAS,CAACP,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC,GAAG,IAAI,CAAC;EACjEP,EAAE,CAACe,OAAO,CAAC,oCAAoC,EAAEd,UAAU,CAAC;EAC5D,OAAO,IAAI;AACf;AAEA,OAAO,eAAee,IAAIA,CAAC;EAAEhB,EAAE;EAAEiB;AAAgB,CAAC,EAAiB;EAC/DjB,EAAE,CAACa,IAAI,CAAC,4CAA4C,CAAC;EAErDd,qBAAqB,CAACC,EAAE,EAAEV,IAAI,CAAC2B,GAAG,EAAE,SAAS,EAAE,UAAU,CAAC,CAAC;EAE3DrB,aAAa,CAAC;IACVI,EAAE;IACFkB,QAAQ,EAAE5B,IAAI,CAAC2B,GAAG,EAAE,SAAS,EAAE,yBAAyB,CAAC;IACzDE,OAAO,EAAEtB,eAAe,CAAC;MAAEuB,OAAO,EAAE;IAAY,CAAC;EACrD,CAAC,CAAC;EAEFtB,SAAS,CAAC;IAAEE;EAAG,CAAC,CAAC;AACrB","ignoreList":[]}
1
+ {"version":3,"names":["join","dirname","readFileSync","writeFileSync","existsSync","mkdirSync","writeHintFile","webinyHintBlock","printDone","preset","slug","displayName","configFile","configNote","hintFile","writeCopilotMcpConfig","ui","configPath","dir","recursive","entry","command","args","config","servers","JSON","parse","warning","webiny","info","stringify","success","init","cwd","hintPath","content","heading"],"sources":["copilot.ts"],"sourcesContent":["/**\n * Agent adapter: GitHub Copilot / VS Code\n *\n * MCP config : .vscode/mcp.json (project-level)\n * Hint file : .github/copilot-instructions.md\n *\n * Note: VS Code uses \"servers\" as the top-level key, not \"mcpServers\".\n *\n * Docs: https://code.visualstudio.com/docs/copilot/chat/mcp-servers\n */\n\nimport { join, dirname } from \"path\";\nimport { readFileSync, writeFileSync, existsSync, mkdirSync } from \"fs\";\nimport type { IUi } from \"../ui.js\";\nimport type { AgentPreset } from \"./types.js\";\nimport { writeHintFile, webinyHintBlock, printDone } from \"./shared.js\";\n\nexport const preset: AgentPreset = {\n slug: \"copilot\",\n displayName: \"Copilot / VS Code\",\n configFile: \".vscode/mcp.json\",\n configNote: \"uses 'servers', not 'mcpServers'\",\n hintFile: \".github/copilot-instructions.md\"\n};\n\ninterface InitParams {\n ui: IUi;\n cwd: string;\n}\n\nfunction writeCopilotMcpConfig(ui: IUi, configPath: string): boolean {\n const dir = dirname(configPath);\n if (!existsSync(dir)) {\n mkdirSync(dir, { recursive: true });\n }\n\n const entry = { command: \"npx\", args: [\"webiny-mcp\", \"serve\"] };\n let config: { servers: Record<string, unknown> } = { servers: {} };\n\n if (existsSync(configPath)) {\n try {\n config = JSON.parse(readFileSync(configPath, \"utf8\"));\n config.servers ??= {};\n } catch {\n ui.warning(`Could not parse %s — will overwrite.`, configPath);\n }\n }\n\n if (config.servers.webiny) {\n ui.info(`${configPath} already has a %s entry — skipping.`, \"webiny\");\n return false;\n }\n\n config.servers.webiny = entry;\n writeFileSync(configPath, JSON.stringify(config, null, 2) + \"\\n\");\n ui.success(`Registered Webiny MCP server in %s`, configPath);\n return true;\n}\n\nexport async function init({ ui, cwd }: InitParams): Promise<void> {\n ui.info(\"Setting up for GitHub Copilot (VS Code)...\");\n\n writeCopilotMcpConfig(ui, join(cwd, \".vscode\", \"mcp.json\"));\n\n writeHintFile({\n ui,\n hintPath: join(cwd, \".github\", \"copilot-instructions.md\"),\n content: webinyHintBlock({ heading: \"## Webiny\" })\n });\n\n printDone({ ui });\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,IAAI,EAAEC,OAAO,QAAQ,MAAM;AACpC,SAASC,YAAY,EAAEC,aAAa,EAAEC,UAAU,EAAEC,SAAS,QAAQ,IAAI;AAGvE,SAASC,aAAa,EAAEC,eAAe,EAAEC,SAAS;AAElD,OAAO,MAAMC,MAAmB,GAAG;EAC/BC,IAAI,EAAE,SAAS;EACfC,WAAW,EAAE,mBAAmB;EAChCC,UAAU,EAAE,kBAAkB;EAC9BC,UAAU,EAAE,kCAAkC;EAC9CC,QAAQ,EAAE;AACd,CAAC;AAOD,SAASC,qBAAqBA,CAACC,EAAO,EAAEC,UAAkB,EAAW;EACjE,MAAMC,GAAG,GAAGjB,OAAO,CAACgB,UAAU,CAAC;EAC/B,IAAI,CAACb,UAAU,CAACc,GAAG,CAAC,EAAE;IAClBb,SAAS,CAACa,GAAG,EAAE;MAAEC,SAAS,EAAE;IAAK,CAAC,CAAC;EACvC;EAEA,MAAMC,KAAK,GAAG;IAAEC,OAAO,EAAE,KAAK;IAAEC,IAAI,EAAE,CAAC,YAAY,EAAE,OAAO;EAAE,CAAC;EAC/D,IAAIC,MAA4C,GAAG;IAAEC,OAAO,EAAE,CAAC;EAAE,CAAC;EAElE,IAAIpB,UAAU,CAACa,UAAU,CAAC,EAAE;IACxB,IAAI;MACAM,MAAM,GAAGE,IAAI,CAACC,KAAK,CAACxB,YAAY,CAACe,UAAU,EAAE,MAAM,CAAC,CAAC;MACrDM,MAAM,CAACC,OAAO,KAAK,CAAC,CAAC;IACzB,CAAC,CAAC,MAAM;MACJR,EAAE,CAACW,OAAO,CAAC,sCAAsC,EAAEV,UAAU,CAAC;IAClE;EACJ;EAEA,IAAIM,MAAM,CAACC,OAAO,CAACI,MAAM,EAAE;IACvBZ,EAAE,CAACa,IAAI,CAAC,GAAGZ,UAAU,qCAAqC,EAAE,QAAQ,CAAC;IACrE,OAAO,KAAK;EAChB;EAEAM,MAAM,CAACC,OAAO,CAACI,MAAM,GAAGR,KAAK;EAC7BjB,aAAa,CAACc,UAAU,EAAEQ,IAAI,CAACK,SAAS,CAACP,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC,GAAG,IAAI,CAAC;EACjEP,EAAE,CAACe,OAAO,CAAC,oCAAoC,EAAEd,UAAU,CAAC;EAC5D,OAAO,IAAI;AACf;AAEA,OAAO,eAAee,IAAIA,CAAC;EAAEhB,EAAE;EAAEiB;AAAgB,CAAC,EAAiB;EAC/DjB,EAAE,CAACa,IAAI,CAAC,4CAA4C,CAAC;EAErDd,qBAAqB,CAACC,EAAE,EAAEhB,IAAI,CAACiC,GAAG,EAAE,SAAS,EAAE,UAAU,CAAC,CAAC;EAE3D3B,aAAa,CAAC;IACVU,EAAE;IACFkB,QAAQ,EAAElC,IAAI,CAACiC,GAAG,EAAE,SAAS,EAAE,yBAAyB,CAAC;IACzDE,OAAO,EAAE5B,eAAe,CAAC;MAAE6B,OAAO,EAAE;IAAY,CAAC;EACrD,CAAC,CAAC;EAEF5B,SAAS,CAAC;IAAEQ;EAAG,CAAC,CAAC;AACrB","ignoreList":[]}
@@ -7,6 +7,8 @@
7
7
  * Docs: https://docs.cursor.com/context/model-context-protocol
8
8
  */
9
9
  import type { IUi } from "../ui.js";
10
+ import type { AgentPreset } from "./types.js";
11
+ export declare const preset: AgentPreset;
10
12
  interface InitParams {
11
13
  ui: IUi;
12
14
  cwd: string;
package/agents/cursor.js CHANGED
@@ -9,6 +9,12 @@
9
9
 
10
10
  import { join } from "path";
11
11
  import { writeMcpConfig, writeHintFile, webinyHintBlock, printDone } from "./shared.js";
12
+ export const preset = {
13
+ slug: "cursor",
14
+ displayName: "Cursor",
15
+ configFile: ".cursor/mcp.json",
16
+ hintFile: ".cursor/rules/*.mdc"
17
+ };
12
18
  export async function init({
13
19
  ui,
14
20
  cwd
@@ -1 +1 @@
1
- {"version":3,"names":["join","writeMcpConfig","writeHintFile","webinyHintBlock","printDone","init","ui","cwd","info","configPath","hintPath","content","heading"],"sources":["cursor.ts"],"sourcesContent":["/**\n * Agent adapter: Cursor\n *\n * MCP config : .cursor/mcp.json (project-level)\n * Hint file : .cursor/rules/webiny.mdc\n *\n * Docs: https://docs.cursor.com/context/model-context-protocol\n */\n\nimport { join } from \"path\";\nimport type { IUi } from \"../ui.js\";\nimport { writeMcpConfig, writeHintFile, webinyHintBlock, printDone } from \"./shared.js\";\n\ninterface InitParams {\n ui: IUi;\n cwd: string;\n}\n\nexport async function init({ ui, cwd }: InitParams): Promise<void> {\n ui.info(\"Setting up for Cursor...\");\n\n writeMcpConfig({\n ui,\n configPath: join(cwd, \".cursor\", \"mcp.json\")\n });\n\n writeHintFile({\n ui,\n hintPath: join(cwd, \".cursor\", \"rules\", \"webiny.mdc\"),\n content: webinyHintBlock({ heading: \"# Webiny\" })\n });\n\n printDone({ ui });\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,IAAI,QAAQ,MAAM;AAE3B,SAASC,cAAc,EAAEC,aAAa,EAAEC,eAAe,EAAEC,SAAS;AAOlE,OAAO,eAAeC,IAAIA,CAAC;EAAEC,EAAE;EAAEC;AAAgB,CAAC,EAAiB;EAC/DD,EAAE,CAACE,IAAI,CAAC,0BAA0B,CAAC;EAEnCP,cAAc,CAAC;IACXK,EAAE;IACFG,UAAU,EAAET,IAAI,CAACO,GAAG,EAAE,SAAS,EAAE,UAAU;EAC/C,CAAC,CAAC;EAEFL,aAAa,CAAC;IACVI,EAAE;IACFI,QAAQ,EAAEV,IAAI,CAACO,GAAG,EAAE,SAAS,EAAE,OAAO,EAAE,YAAY,CAAC;IACrDI,OAAO,EAAER,eAAe,CAAC;MAAES,OAAO,EAAE;IAAW,CAAC;EACpD,CAAC,CAAC;EAEFR,SAAS,CAAC;IAAEE;EAAG,CAAC,CAAC;AACrB","ignoreList":[]}
1
+ {"version":3,"names":["join","writeMcpConfig","writeHintFile","webinyHintBlock","printDone","preset","slug","displayName","configFile","hintFile","init","ui","cwd","info","configPath","hintPath","content","heading"],"sources":["cursor.ts"],"sourcesContent":["/**\n * Agent adapter: Cursor\n *\n * MCP config : .cursor/mcp.json (project-level)\n * Hint file : .cursor/rules/webiny.mdc\n *\n * Docs: https://docs.cursor.com/context/model-context-protocol\n */\n\nimport { join } from \"path\";\nimport type { IUi } from \"../ui.js\";\nimport type { AgentPreset } from \"./types.js\";\nimport { writeMcpConfig, writeHintFile, webinyHintBlock, printDone } from \"./shared.js\";\n\nexport const preset: AgentPreset = {\n slug: \"cursor\",\n displayName: \"Cursor\",\n configFile: \".cursor/mcp.json\",\n hintFile: \".cursor/rules/*.mdc\"\n};\n\ninterface InitParams {\n ui: IUi;\n cwd: string;\n}\n\nexport async function init({ ui, cwd }: InitParams): Promise<void> {\n ui.info(\"Setting up for Cursor...\");\n\n writeMcpConfig({\n ui,\n configPath: join(cwd, \".cursor\", \"mcp.json\")\n });\n\n writeHintFile({\n ui,\n hintPath: join(cwd, \".cursor\", \"rules\", \"webiny.mdc\"),\n content: webinyHintBlock({ heading: \"# Webiny\" })\n });\n\n printDone({ ui });\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,IAAI,QAAQ,MAAM;AAG3B,SAASC,cAAc,EAAEC,aAAa,EAAEC,eAAe,EAAEC,SAAS;AAElE,OAAO,MAAMC,MAAmB,GAAG;EAC/BC,IAAI,EAAE,QAAQ;EACdC,WAAW,EAAE,QAAQ;EACrBC,UAAU,EAAE,kBAAkB;EAC9BC,QAAQ,EAAE;AACd,CAAC;AAOD,OAAO,eAAeC,IAAIA,CAAC;EAAEC,EAAE;EAAEC;AAAgB,CAAC,EAAiB;EAC/DD,EAAE,CAACE,IAAI,CAAC,0BAA0B,CAAC;EAEnCZ,cAAc,CAAC;IACXU,EAAE;IACFG,UAAU,EAAEd,IAAI,CAACY,GAAG,EAAE,SAAS,EAAE,UAAU;EAC/C,CAAC,CAAC;EAEFV,aAAa,CAAC;IACVS,EAAE;IACFI,QAAQ,EAAEf,IAAI,CAACY,GAAG,EAAE,SAAS,EAAE,OAAO,EAAE,YAAY,CAAC;IACrDI,OAAO,EAAEb,eAAe,CAAC;MAAEc,OAAO,EAAE;IAAW,CAAC;EACpD,CAAC,CAAC;EAEFb,SAAS,CAAC;IAAEO;EAAG,CAAC,CAAC;AACrB","ignoreList":[]}
@@ -0,0 +1,3 @@
1
+ import type { AgentPreset, AgentModule } from "./types.js";
2
+ export declare function discoverAgents(): Promise<Map<string, AgentModule>>;
3
+ export declare function discoverPresets(): Promise<AgentPreset[]>;
@@ -0,0 +1,29 @@
1
+ import { readdirSync } from "fs";
2
+ import { fileURLToPath } from "url";
3
+ import { dirname, join } from "path";
4
+ let cache = null;
5
+ export async function discoverAgents() {
6
+ if (cache) {
7
+ return cache;
8
+ }
9
+ const agentsDir = dirname(fileURLToPath(import.meta.url));
10
+ const files = readdirSync(agentsDir).filter(f => f.endsWith(".js") && !f.endsWith(".d.ts") && !f.endsWith(".js.map"));
11
+ const agents = new Map();
12
+ for (const file of files) {
13
+ const mod = await import(join(agentsDir, file));
14
+ if (mod.preset && typeof mod.init === "function") {
15
+ agents.set(mod.preset.slug, {
16
+ preset: mod.preset,
17
+ init: mod.init
18
+ });
19
+ }
20
+ }
21
+ cache = agents;
22
+ return agents;
23
+ }
24
+ export async function discoverPresets() {
25
+ const agents = await discoverAgents();
26
+ return Array.from(agents.values()).map(a => a.preset);
27
+ }
28
+
29
+ //# sourceMappingURL=discover.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["readdirSync","fileURLToPath","dirname","join","cache","discoverAgents","agentsDir","import","meta","url","files","filter","f","endsWith","agents","Map","file","mod","preset","init","set","slug","discoverPresets","Array","from","values","map","a"],"sources":["discover.ts"],"sourcesContent":["import { readdirSync } from \"fs\";\nimport { fileURLToPath } from \"url\";\nimport { dirname, join } from \"path\";\nimport type { AgentPreset, AgentModule } from \"./types.js\";\n\nlet cache: Map<string, AgentModule> | null = null;\n\nexport async function discoverAgents(): Promise<Map<string, AgentModule>> {\n if (cache) {\n return cache;\n }\n\n const agentsDir = dirname(fileURLToPath(import.meta.url));\n const files = readdirSync(agentsDir).filter(\n f => f.endsWith(\".js\") && !f.endsWith(\".d.ts\") && !f.endsWith(\".js.map\")\n );\n\n const agents = new Map<string, AgentModule>();\n\n for (const file of files) {\n const mod = await import(join(agentsDir, file));\n if (mod.preset && typeof mod.init === \"function\") {\n agents.set(mod.preset.slug, { preset: mod.preset, init: mod.init });\n }\n }\n\n cache = agents;\n return agents;\n}\n\nexport async function discoverPresets(): Promise<AgentPreset[]> {\n const agents = await discoverAgents();\n return Array.from(agents.values()).map(a => a.preset);\n}\n"],"mappings":"AAAA,SAASA,WAAW,QAAQ,IAAI;AAChC,SAASC,aAAa,QAAQ,KAAK;AACnC,SAASC,OAAO,EAAEC,IAAI,QAAQ,MAAM;AAGpC,IAAIC,KAAsC,GAAG,IAAI;AAEjD,OAAO,eAAeC,cAAcA,CAAA,EAAsC;EACtE,IAAID,KAAK,EAAE;IACP,OAAOA,KAAK;EAChB;EAEA,MAAME,SAAS,GAAGJ,OAAO,CAACD,aAAa,CAACM,MAAM,CAACC,IAAI,CAACC,GAAG,CAAC,CAAC;EACzD,MAAMC,KAAK,GAAGV,WAAW,CAACM,SAAS,CAAC,CAACK,MAAM,CACvCC,CAAC,IAAIA,CAAC,CAACC,QAAQ,CAAC,KAAK,CAAC,IAAI,CAACD,CAAC,CAACC,QAAQ,CAAC,OAAO,CAAC,IAAI,CAACD,CAAC,CAACC,QAAQ,CAAC,SAAS,CAC3E,CAAC;EAED,MAAMC,MAAM,GAAG,IAAIC,GAAG,CAAsB,CAAC;EAE7C,KAAK,MAAMC,IAAI,IAAIN,KAAK,EAAE;IACtB,MAAMO,GAAG,GAAG,MAAM,MAAM,CAACd,IAAI,CAACG,SAAS,EAAEU,IAAI,CAAC,CAAC;IAC/C,IAAIC,GAAG,CAACC,MAAM,IAAI,OAAOD,GAAG,CAACE,IAAI,KAAK,UAAU,EAAE;MAC9CL,MAAM,CAACM,GAAG,CAACH,GAAG,CAACC,MAAM,CAACG,IAAI,EAAE;QAAEH,MAAM,EAAED,GAAG,CAACC,MAAM;QAAEC,IAAI,EAAEF,GAAG,CAACE;MAAK,CAAC,CAAC;IACvE;EACJ;EAEAf,KAAK,GAAGU,MAAM;EACd,OAAOA,MAAM;AACjB;AAEA,OAAO,eAAeQ,eAAeA,CAAA,EAA2B;EAC5D,MAAMR,MAAM,GAAG,MAAMT,cAAc,CAAC,CAAC;EACrC,OAAOkB,KAAK,CAACC,IAAI,CAACV,MAAM,CAACW,MAAM,CAAC,CAAC,CAAC,CAACC,GAAG,CAACC,CAAC,IAAIA,CAAC,CAACT,MAAM,CAAC;AACzD","ignoreList":[]}
@@ -3,5 +3,7 @@
3
3
  *
4
4
  * Prints a clear, copy-paste-friendly guide for wiring up the Webiny MCP
5
5
  * server in any agent not covered by the built-in adapters.
6
+ *
7
+ * The agent tables are auto-generated from preset metadata.
6
8
  */
7
- export declare function printInstructions(): void;
9
+ export declare function printInstructions(): Promise<void>;
@@ -3,11 +3,24 @@
3
3
  *
4
4
  * Prints a clear, copy-paste-friendly guide for wiring up the Webiny MCP
5
5
  * server in any agent not covered by the built-in adapters.
6
+ *
7
+ * The agent tables are auto-generated from preset metadata.
6
8
  */
7
9
 
8
- export function printInstructions() {
9
- const lines = ["", "╔══════════════════════════════════════════════════════════════════╗", "║ Webiny MCP Server — Manual Setup Guide ║", "╚══════════════════════════════════════════════════════════════════╝", "", "The Webiny MCP server works with any agent that supports the Model", "Context Protocol (MCP) over stdio transport.", "", "── Step 1: Register the MCP server ───────────────────────────────", "", "Most agents accept a JSON config file. Add the following entry:", "", ' "webiny": {', ' "command": "npx",', ' "args": ["webiny-mcp", "serve"]', " }", "", "Where this config lives depends on your agent:", "", " Agent Config file", " ───────────────── ──────────────────────────────────────", " Claude Code .mcp.json (project root)", " Cursor .cursor/mcp.json (project root)", " Windsurf .windsurf/mcp.json (project root)", " Copilot/VS Code .vscode/mcp.json (note: uses 'servers', not 'mcpServers')", " Cline .vscode/cline_mcp_settings.json", " OpenCode opencode.json (project root, uses 'mcp' not 'mcpServers')", " Zed ~/.config/zed/settings.json (under 'context_servers')", " Claude Desktop ~/Library/Application Support/Claude/claude_desktop_config.json", " or %APPDATA%\\Claude\\claude_desktop_config.json (Windows)", "", "Full example (the most common shape):", "", " {", ' "mcpServers": {', ' "webiny": {', ' "command": "npx",', ' "args": ["webiny-mcp", "serve"]', " }", " }", " }", "", "── Step 2: Tell your agent about the MCP tools ───────────────────", "", "Add the following to your agent's instruction / rules file so it", "knows to reach for the Webiny tools automatically:", "", " ## Webiny", " This project uses the Webiny framework.", " A `webiny` MCP server is available.", " When helping with Webiny-related tasks:", " 1. Call `list_webiny_skills` to see available skills.", " 2. Call `get_webiny_skill` with the relevant topic before writing code.", "", "Where this instruction file lives:", "", " Agent Instruction file", " ───────────────── ──────────────────────────────────────", " Claude Code CLAUDE.md (project root)", " OpenCode AGENTS.md (project root)", " Cursor .cursor/rules/*.mdc", " Windsurf .windsurf/rules/*.md", " Copilot/VS Code .github/copilot-instructions.md", " Cline system prompt in settings", " Zed system prompt in settings", "", "── Step 3: Verify the server starts ──────────────────────────────", "", "Test it with the MCP Inspector before relying on it in your agent:", "", " npx @modelcontextprotocol/inspector npx webiny-mcp server", "", "Connect, click 'List Tools', and confirm you see:", " • list_webiny_skills", " • get_webiny_skill", "", "── Need a built-in adapter for your agent? ───────────────────────", "", "Open an issue or PR at: https://github.com/webiny/webiny-js", "The adapter just needs to write the right config file — see", "mcp/agents/claude.ts as a reference (~20 lines).", ""];
10
+ import { discoverPresets } from "./discover.js";
11
+ export async function printInstructions() {
12
+ const presets = await discoverPresets();
13
+ const configRows = presets.map(p => {
14
+ const note = p.configNote ? ` (${p.configNote})` : "";
15
+ return formatRow(p.displayName, p.configFile + note);
16
+ });
17
+ const hintRows = presets.filter(p => p.hintFile).map(p => formatRow(p.displayName, p.hintFile));
18
+ presets.filter(p => !p.hintFile && p.hintNote).forEach(p => hintRows.push(formatRow(p.displayName, p.hintNote)));
19
+ const lines = ["", "╔══════════════════════════════════════════════════════════════════╗", "║ Webiny MCP Server — Manual Setup Guide ║", "╚══════════════════════════════════════════════════════════════════╝", "", "The Webiny MCP server works with any agent that supports the Model", "Context Protocol (MCP) over stdio transport.", "", "── Step 1: Register the MCP server ───────────────────────────────", "", "Most agents accept a JSON config file. Add the following entry:", "", ' "webiny": {', ' "command": "npx",', ' "args": ["webiny-mcp", "serve"]', " }", "", "Where this config lives depends on your agent:", "", " Agent Config file", " ───────────────── ──────────────────────────────────────", ...configRows, "", "Full example (the most common shape):", "", " {", ' "mcpServers": {', ' "webiny": {', ' "command": "npx",', ' "args": ["webiny-mcp", "serve"]', " }", " }", " }", "", "── Step 2: Tell your agent about the MCP tools ───────────────────", "", "Add the following to your agent's instruction / rules file so it", "knows to reach for the Webiny tools automatically:", "", " ## Webiny", " This project uses the Webiny framework.", " A `webiny` MCP server is available.", " When helping with Webiny-related tasks:", " 1. Call `list_webiny_skills` to see available skills.", " 2. Call `get_webiny_skill` with the relevant topic before writing code.", "", "Where this instruction file lives:", "", " Agent Instruction file", " ───────────────── ──────────────────────────────────────", ...hintRows, "", "── Step 3: Verify the server starts ──────────────────────────────", "", "Test it with the MCP Inspector before relying on it in your agent:", "", " npx @modelcontextprotocol/inspector npx webiny-mcp server", "", "Connect, click 'List Tools', and confirm you see:", " • list_webiny_skills", " • get_webiny_skill", "", "── Need a built-in adapter for your agent? ───────────────────────", "", "Open an issue or PR at: https://github.com/webiny/webiny-js", "The adapter just needs to write the right config file — see", "mcp/agents/claude.ts as a reference (~20 lines).", ""];
10
20
  process.stdout.write(lines.join("\n") + "\n");
11
21
  }
22
+ function formatRow(agent, path) {
23
+ return ` ${agent.padEnd(17)} ${path}`;
24
+ }
12
25
 
13
26
  //# sourceMappingURL=instructions.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["printInstructions","lines","process","stdout","write","join"],"sources":["instructions.ts"],"sourcesContent":["/**\n * --instructions / --manual\n *\n * Prints a clear, copy-paste-friendly guide for wiring up the Webiny MCP\n * server in any agent not covered by the built-in adapters.\n */\n\nexport function printInstructions(): void {\n const lines = [\n \"\",\n \"╔══════════════════════════════════════════════════════════════════╗\",\n \"║ Webiny MCP Server — Manual Setup Guide ║\",\n \"╚══════════════════════════════════════════════════════════════════╝\",\n \"\",\n \"The Webiny MCP server works with any agent that supports the Model\",\n \"Context Protocol (MCP) over stdio transport.\",\n \"\",\n \"── Step 1: Register the MCP server ───────────────────────────────\",\n \"\",\n \"Most agents accept a JSON config file. Add the following entry:\",\n \"\",\n ' \"webiny\": {',\n ' \"command\": \"npx\",',\n ' \"args\": [\"webiny-mcp\", \"serve\"]',\n \" }\",\n \"\",\n \"Where this config lives depends on your agent:\",\n \"\",\n \" Agent Config file\",\n \" ───────────────── ──────────────────────────────────────\",\n \" Claude Code .mcp.json (project root)\",\n \" Cursor .cursor/mcp.json (project root)\",\n \" Windsurf .windsurf/mcp.json (project root)\",\n \" Copilot/VS Code .vscode/mcp.json (note: uses 'servers', not 'mcpServers')\",\n \" Cline .vscode/cline_mcp_settings.json\",\n \" OpenCode opencode.json (project root, uses 'mcp' not 'mcpServers')\",\n \" Zed ~/.config/zed/settings.json (under 'context_servers')\",\n \" Claude Desktop ~/Library/Application Support/Claude/claude_desktop_config.json\",\n \" or %APPDATA%\\\\Claude\\\\claude_desktop_config.json (Windows)\",\n \"\",\n \"Full example (the most common shape):\",\n \"\",\n \" {\",\n ' \"mcpServers\": {',\n ' \"webiny\": {',\n ' \"command\": \"npx\",',\n ' \"args\": [\"webiny-mcp\", \"serve\"]',\n \" }\",\n \" }\",\n \" }\",\n \"\",\n \"── Step 2: Tell your agent about the MCP tools ───────────────────\",\n \"\",\n \"Add the following to your agent's instruction / rules file so it\",\n \"knows to reach for the Webiny tools automatically:\",\n \"\",\n \" ## Webiny\",\n \" This project uses the Webiny framework.\",\n \" A `webiny` MCP server is available.\",\n \" When helping with Webiny-related tasks:\",\n \" 1. Call `list_webiny_skills` to see available skills.\",\n \" 2. Call `get_webiny_skill` with the relevant topic before writing code.\",\n \"\",\n \"Where this instruction file lives:\",\n \"\",\n \" Agent Instruction file\",\n \" ───────────────── ──────────────────────────────────────\",\n \" Claude Code CLAUDE.md (project root)\",\n \" OpenCode AGENTS.md (project root)\",\n \" Cursor .cursor/rules/*.mdc\",\n \" Windsurf .windsurf/rules/*.md\",\n \" Copilot/VS Code .github/copilot-instructions.md\",\n \" Cline system prompt in settings\",\n \" Zed system prompt in settings\",\n \"\",\n \"── Step 3: Verify the server starts ──────────────────────────────\",\n \"\",\n \"Test it with the MCP Inspector before relying on it in your agent:\",\n \"\",\n \" npx @modelcontextprotocol/inspector npx webiny-mcp server\",\n \"\",\n \"Connect, click 'List Tools', and confirm you see:\",\n \" • list_webiny_skills\",\n \" • get_webiny_skill\",\n \"\",\n \"── Need a built-in adapter for your agent? ───────────────────────\",\n \"\",\n \"Open an issue or PR at: https://github.com/webiny/webiny-js\",\n \"The adapter just needs to write the right config file — see\",\n \"mcp/agents/claude.ts as a reference (~20 lines).\",\n \"\"\n ];\n\n process.stdout.write(lines.join(\"\\n\") + \"\\n\");\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;;AAEA,OAAO,SAASA,iBAAiBA,CAAA,EAAS;EACtC,MAAMC,KAAK,GAAG,CACV,EAAE,EACF,sEAAsE,EACtE,qEAAqE,EACrE,sEAAsE,EACtE,EAAE,EACF,oEAAoE,EACpE,8CAA8C,EAC9C,EAAE,EACF,oEAAoE,EACpE,EAAE,EACF,iEAAiE,EACjE,EAAE,EACF,eAAe,EACf,uBAAuB,EACvB,qCAAqC,EACrC,KAAK,EACL,EAAE,EACF,gDAAgD,EAChD,EAAE,EACF,kCAAkC,EAClC,6DAA6D,EAC7D,8DAA8D,EAC9D,8DAA8D,EAC9D,8DAA8D,EAC9D,wFAAwF,EACxF,sDAAsD,EACtD,2FAA2F,EAC3F,6EAA6E,EAC7E,sFAAsF,EACtF,kFAAkF,EAClF,EAAE,EACF,uCAAuC,EACvC,EAAE,EACF,KAAK,EACL,qBAAqB,EACrB,mBAAmB,EACnB,2BAA2B,EAC3B,yCAAyC,EACzC,SAAS,EACT,OAAO,EACP,KAAK,EACL,EAAE,EACF,oEAAoE,EACpE,EAAE,EACF,kEAAkE,EAClE,oDAAoD,EACpD,EAAE,EACF,aAAa,EACb,2CAA2C,EAC3C,uCAAuC,EACvC,2CAA2C,EAC3C,yDAAyD,EACzD,2EAA2E,EAC3E,EAAE,EACF,oCAAoC,EACpC,EAAE,EACF,uCAAuC,EACvC,6DAA6D,EAC7D,8DAA8D,EAC9D,8DAA8D,EAC9D,0CAA0C,EAC1C,2CAA2C,EAC3C,sDAAsD,EACtD,gDAAgD,EAChD,gDAAgD,EAChD,EAAE,EACF,oEAAoE,EACpE,EAAE,EACF,oEAAoE,EACpE,EAAE,EACF,6DAA6D,EAC7D,EAAE,EACF,mDAAmD,EACnD,wBAAwB,EACxB,sBAAsB,EACtB,EAAE,EACF,oEAAoE,EACpE,EAAE,EACF,6DAA6D,EAC7D,6DAA6D,EAC7D,kDAAkD,EAClD,EAAE,CACL;EAEDC,OAAO,CAACC,MAAM,CAACC,KAAK,CAACH,KAAK,CAACI,IAAI,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC;AACjD","ignoreList":[]}
1
+ {"version":3,"names":["discoverPresets","printInstructions","presets","configRows","map","p","note","configNote","formatRow","displayName","configFile","hintRows","filter","hintFile","hintNote","forEach","push","lines","process","stdout","write","join","agent","path","padEnd"],"sources":["instructions.ts"],"sourcesContent":["/**\n * --instructions / --manual\n *\n * Prints a clear, copy-paste-friendly guide for wiring up the Webiny MCP\n * server in any agent not covered by the built-in adapters.\n *\n * The agent tables are auto-generated from preset metadata.\n */\n\nimport { discoverPresets } from \"./discover.js\";\n\nexport async function printInstructions(): Promise<void> {\n const presets = await discoverPresets();\n\n const configRows = presets.map(p => {\n const note = p.configNote ? ` (${p.configNote})` : \"\";\n return formatRow(p.displayName, p.configFile + note);\n });\n\n const hintRows = presets\n .filter(p => p.hintFile)\n .map(p => formatRow(p.displayName, p.hintFile!));\n presets\n .filter(p => !p.hintFile && p.hintNote)\n .forEach(p => hintRows.push(formatRow(p.displayName, p.hintNote!)));\n\n const lines = [\n \"\",\n \"╔══════════════════════════════════════════════════════════════════╗\",\n \"║ Webiny MCP Server — Manual Setup Guide ║\",\n \"╚══════════════════════════════════════════════════════════════════╝\",\n \"\",\n \"The Webiny MCP server works with any agent that supports the Model\",\n \"Context Protocol (MCP) over stdio transport.\",\n \"\",\n \"── Step 1: Register the MCP server ───────────────────────────────\",\n \"\",\n \"Most agents accept a JSON config file. Add the following entry:\",\n \"\",\n ' \"webiny\": {',\n ' \"command\": \"npx\",',\n ' \"args\": [\"webiny-mcp\", \"serve\"]',\n \" }\",\n \"\",\n \"Where this config lives depends on your agent:\",\n \"\",\n \" Agent Config file\",\n \" ───────────────── ──────────────────────────────────────\",\n ...configRows,\n \"\",\n \"Full example (the most common shape):\",\n \"\",\n \" {\",\n ' \"mcpServers\": {',\n ' \"webiny\": {',\n ' \"command\": \"npx\",',\n ' \"args\": [\"webiny-mcp\", \"serve\"]',\n \" }\",\n \" }\",\n \" }\",\n \"\",\n \"── Step 2: Tell your agent about the MCP tools ───────────────────\",\n \"\",\n \"Add the following to your agent's instruction / rules file so it\",\n \"knows to reach for the Webiny tools automatically:\",\n \"\",\n \" ## Webiny\",\n \" This project uses the Webiny framework.\",\n \" A `webiny` MCP server is available.\",\n \" When helping with Webiny-related tasks:\",\n \" 1. Call `list_webiny_skills` to see available skills.\",\n \" 2. Call `get_webiny_skill` with the relevant topic before writing code.\",\n \"\",\n \"Where this instruction file lives:\",\n \"\",\n \" Agent Instruction file\",\n \" ───────────────── ──────────────────────────────────────\",\n ...hintRows,\n \"\",\n \"── Step 3: Verify the server starts ──────────────────────────────\",\n \"\",\n \"Test it with the MCP Inspector before relying on it in your agent:\",\n \"\",\n \" npx @modelcontextprotocol/inspector npx webiny-mcp server\",\n \"\",\n \"Connect, click 'List Tools', and confirm you see:\",\n \" • list_webiny_skills\",\n \" • get_webiny_skill\",\n \"\",\n \"── Need a built-in adapter for your agent? ───────────────────────\",\n \"\",\n \"Open an issue or PR at: https://github.com/webiny/webiny-js\",\n \"The adapter just needs to write the right config file — see\",\n \"mcp/agents/claude.ts as a reference (~20 lines).\",\n \"\"\n ];\n\n process.stdout.write(lines.join(\"\\n\") + \"\\n\");\n}\n\nfunction formatRow(agent: string, path: string): string {\n return ` ${agent.padEnd(17)} ${path}`;\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,eAAe;AAExB,OAAO,eAAeC,iBAAiBA,CAAA,EAAkB;EACrD,MAAMC,OAAO,GAAG,MAAMF,eAAe,CAAC,CAAC;EAEvC,MAAMG,UAAU,GAAGD,OAAO,CAACE,GAAG,CAACC,CAAC,IAAI;IAChC,MAAMC,IAAI,GAAGD,CAAC,CAACE,UAAU,GAAG,MAAMF,CAAC,CAACE,UAAU,GAAG,GAAG,EAAE;IACtD,OAAOC,SAAS,CAACH,CAAC,CAACI,WAAW,EAAEJ,CAAC,CAACK,UAAU,GAAGJ,IAAI,CAAC;EACxD,CAAC,CAAC;EAEF,MAAMK,QAAQ,GAAGT,OAAO,CACnBU,MAAM,CAACP,CAAC,IAAIA,CAAC,CAACQ,QAAQ,CAAC,CACvBT,GAAG,CAACC,CAAC,IAAIG,SAAS,CAACH,CAAC,CAACI,WAAW,EAAEJ,CAAC,CAACQ,QAAS,CAAC,CAAC;EACpDX,OAAO,CACFU,MAAM,CAACP,CAAC,IAAI,CAACA,CAAC,CAACQ,QAAQ,IAAIR,CAAC,CAACS,QAAQ,CAAC,CACtCC,OAAO,CAACV,CAAC,IAAIM,QAAQ,CAACK,IAAI,CAACR,SAAS,CAACH,CAAC,CAACI,WAAW,EAAEJ,CAAC,CAACS,QAAS,CAAC,CAAC,CAAC;EAEvE,MAAMG,KAAK,GAAG,CACV,EAAE,EACF,sEAAsE,EACtE,qEAAqE,EACrE,sEAAsE,EACtE,EAAE,EACF,oEAAoE,EACpE,8CAA8C,EAC9C,EAAE,EACF,oEAAoE,EACpE,EAAE,EACF,iEAAiE,EACjE,EAAE,EACF,eAAe,EACf,uBAAuB,EACvB,qCAAqC,EACrC,KAAK,EACL,EAAE,EACF,gDAAgD,EAChD,EAAE,EACF,kCAAkC,EAClC,6DAA6D,EAC7D,GAAGd,UAAU,EACb,EAAE,EACF,uCAAuC,EACvC,EAAE,EACF,KAAK,EACL,qBAAqB,EACrB,mBAAmB,EACnB,2BAA2B,EAC3B,yCAAyC,EACzC,SAAS,EACT,OAAO,EACP,KAAK,EACL,EAAE,EACF,oEAAoE,EACpE,EAAE,EACF,kEAAkE,EAClE,oDAAoD,EACpD,EAAE,EACF,aAAa,EACb,2CAA2C,EAC3C,uCAAuC,EACvC,2CAA2C,EAC3C,yDAAyD,EACzD,2EAA2E,EAC3E,EAAE,EACF,oCAAoC,EACpC,EAAE,EACF,uCAAuC,EACvC,6DAA6D,EAC7D,GAAGQ,QAAQ,EACX,EAAE,EACF,oEAAoE,EACpE,EAAE,EACF,oEAAoE,EACpE,EAAE,EACF,6DAA6D,EAC7D,EAAE,EACF,mDAAmD,EACnD,wBAAwB,EACxB,sBAAsB,EACtB,EAAE,EACF,oEAAoE,EACpE,EAAE,EACF,6DAA6D,EAC7D,6DAA6D,EAC7D,kDAAkD,EAClD,EAAE,CACL;EAEDO,OAAO,CAACC,MAAM,CAACC,KAAK,CAACH,KAAK,CAACI,IAAI,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC;AACjD;AAEA,SAASb,SAASA,CAACc,KAAa,EAAEC,IAAY,EAAU;EACpD,OAAO,KAAKD,KAAK,CAACE,MAAM,CAAC,EAAE,CAAC,KAAKD,IAAI,EAAE;AAC3C","ignoreList":[]}
package/agents/kiro.d.ts CHANGED
@@ -7,6 +7,8 @@
7
7
  * Docs: https://docs.anthropic.com/en/docs/claude-code/mcp
8
8
  */
9
9
  import type { IUi } from "../ui.js";
10
+ import type { AgentPreset } from "./types.js";
11
+ export declare const preset: AgentPreset;
10
12
  interface InitParams {
11
13
  ui: IUi;
12
14
  cwd: string;
package/agents/kiro.js CHANGED
@@ -9,6 +9,12 @@
9
9
 
10
10
  import { join } from "path";
11
11
  import { writeMcpConfig, writeHintFile, webinyHintBlock, printDone } from "./shared.js";
12
+ export const preset = {
13
+ slug: "kiro",
14
+ displayName: "Kiro",
15
+ configFile: ".kiro/settings/mcp.json",
16
+ hintFile: "AGENTS.md"
17
+ };
12
18
  export async function init({
13
19
  ui,
14
20
  cwd
@@ -1 +1 @@
1
- {"version":3,"names":["join","writeMcpConfig","writeHintFile","webinyHintBlock","printDone","init","ui","cwd","info","configPath","hintPath","content","heading"],"sources":["kiro.ts"],"sourcesContent":["/**\n * Agent adapter: Kiro\n *\n * MCP config : .kiro/settings/mcp.json (project-level, checked into git)\n * Hint file : AGENTS.md (Claude Code reads this automatically each session)\n *\n * Docs: https://docs.anthropic.com/en/docs/claude-code/mcp\n */\n\nimport { join } from \"path\";\nimport type { IUi } from \"../ui.js\";\nimport { writeMcpConfig, writeHintFile, webinyHintBlock, printDone } from \"./shared.js\";\n\ninterface InitParams {\n ui: IUi;\n cwd: string;\n}\n\nexport async function init({ ui, cwd }: InitParams): Promise<void> {\n ui.info(\"Setting up for Kiro...\");\n\n writeMcpConfig({\n ui,\n configPath: join(cwd, \".kiro/settings/mcp.json\")\n });\n\n writeHintFile({\n ui,\n hintPath: join(cwd, \"AGENTS.md\"),\n content: webinyHintBlock({ heading: \"## Webiny\" })\n });\n\n printDone({ ui });\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,IAAI,QAAQ,MAAM;AAE3B,SAASC,cAAc,EAAEC,aAAa,EAAEC,eAAe,EAAEC,SAAS;AAOlE,OAAO,eAAeC,IAAIA,CAAC;EAAEC,EAAE;EAAEC;AAAgB,CAAC,EAAiB;EAC/DD,EAAE,CAACE,IAAI,CAAC,wBAAwB,CAAC;EAEjCP,cAAc,CAAC;IACXK,EAAE;IACFG,UAAU,EAAET,IAAI,CAACO,GAAG,EAAE,yBAAyB;EACnD,CAAC,CAAC;EAEFL,aAAa,CAAC;IACVI,EAAE;IACFI,QAAQ,EAAEV,IAAI,CAACO,GAAG,EAAE,WAAW,CAAC;IAChCI,OAAO,EAAER,eAAe,CAAC;MAAES,OAAO,EAAE;IAAY,CAAC;EACrD,CAAC,CAAC;EAEFR,SAAS,CAAC;IAAEE;EAAG,CAAC,CAAC;AACrB","ignoreList":[]}
1
+ {"version":3,"names":["join","writeMcpConfig","writeHintFile","webinyHintBlock","printDone","preset","slug","displayName","configFile","hintFile","init","ui","cwd","info","configPath","hintPath","content","heading"],"sources":["kiro.ts"],"sourcesContent":["/**\n * Agent adapter: Kiro\n *\n * MCP config : .kiro/settings/mcp.json (project-level, checked into git)\n * Hint file : AGENTS.md (Claude Code reads this automatically each session)\n *\n * Docs: https://docs.anthropic.com/en/docs/claude-code/mcp\n */\n\nimport { join } from \"path\";\nimport type { IUi } from \"../ui.js\";\nimport type { AgentPreset } from \"./types.js\";\nimport { writeMcpConfig, writeHintFile, webinyHintBlock, printDone } from \"./shared.js\";\n\nexport const preset: AgentPreset = {\n slug: \"kiro\",\n displayName: \"Kiro\",\n configFile: \".kiro/settings/mcp.json\",\n hintFile: \"AGENTS.md\"\n};\n\ninterface InitParams {\n ui: IUi;\n cwd: string;\n}\n\nexport async function init({ ui, cwd }: InitParams): Promise<void> {\n ui.info(\"Setting up for Kiro...\");\n\n writeMcpConfig({\n ui,\n configPath: join(cwd, \".kiro/settings/mcp.json\")\n });\n\n writeHintFile({\n ui,\n hintPath: join(cwd, \"AGENTS.md\"),\n content: webinyHintBlock({ heading: \"## Webiny\" })\n });\n\n printDone({ ui });\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,IAAI,QAAQ,MAAM;AAG3B,SAASC,cAAc,EAAEC,aAAa,EAAEC,eAAe,EAAEC,SAAS;AAElE,OAAO,MAAMC,MAAmB,GAAG;EAC/BC,IAAI,EAAE,MAAM;EACZC,WAAW,EAAE,MAAM;EACnBC,UAAU,EAAE,yBAAyB;EACrCC,QAAQ,EAAE;AACd,CAAC;AAOD,OAAO,eAAeC,IAAIA,CAAC;EAAEC,EAAE;EAAEC;AAAgB,CAAC,EAAiB;EAC/DD,EAAE,CAACE,IAAI,CAAC,wBAAwB,CAAC;EAEjCZ,cAAc,CAAC;IACXU,EAAE;IACFG,UAAU,EAAEd,IAAI,CAACY,GAAG,EAAE,yBAAyB;EACnD,CAAC,CAAC;EAEFV,aAAa,CAAC;IACVS,EAAE;IACFI,QAAQ,EAAEf,IAAI,CAACY,GAAG,EAAE,WAAW,CAAC;IAChCI,OAAO,EAAEb,eAAe,CAAC;MAAEc,OAAO,EAAE;IAAY,CAAC;EACrD,CAAC,CAAC;EAEFb,SAAS,CAAC;IAAEO;EAAG,CAAC,CAAC;AACrB","ignoreList":[]}
@@ -14,6 +14,8 @@
14
14
  * Docs: https://opencode.ai/docs/mcp-servers/
15
15
  */
16
16
  import type { IUi } from "../ui.js";
17
+ import type { AgentPreset } from "./types.js";
18
+ export declare const preset: AgentPreset;
17
19
  interface InitParams {
18
20
  ui: IUi;
19
21
  cwd: string;
@@ -17,6 +17,13 @@
17
17
  import { readFileSync, writeFileSync, existsSync } from "fs";
18
18
  import { join } from "path";
19
19
  import { writeHintFile, webinyHintBlock, printDone } from "./shared.js";
20
+ export const preset = {
21
+ slug: "opencode",
22
+ displayName: "OpenCode",
23
+ configFile: "opencode.json",
24
+ configNote: "uses 'mcp' not 'mcpServers'",
25
+ hintFile: "AGENTS.md"
26
+ };
20
27
  export async function init({
21
28
  ui,
22
29
  cwd
@@ -1 +1 @@
1
- {"version":3,"names":["readFileSync","writeFileSync","existsSync","join","writeHintFile","webinyHintBlock","printDone","init","ui","cwd","info","writeOpenCodeMcpConfig","configPath","hintPath","content","heading","entry","type","command","enabled","config","$schema","mcp","JSON","parse","warning","webiny","stringify","success"],"sources":["opencode.ts"],"sourcesContent":["/**\n * Agent adapter: OpenCode\n *\n * MCP config : opencode.json (project root)\n * Hint file : AGENTS.md (OpenCode reads this automatically each session)\n *\n * OpenCode uses a different MCP config shape than other agents:\n * {\n * \"mcp\": {\n * \"webiny\": { \"type\": \"local\", \"command\": [\"npx\", \"webiny\", \"mcp-server\"], \"enabled\": true }\n * }\n * }\n *\n * Docs: https://opencode.ai/docs/mcp-servers/\n */\n\nimport { readFileSync, writeFileSync, existsSync } from \"fs\";\nimport { join } from \"path\";\nimport type { IUi } from \"../ui.js\";\nimport { writeHintFile, webinyHintBlock, printDone } from \"./shared.js\";\n\ninterface InitParams {\n ui: IUi;\n cwd: string;\n}\n\nexport async function init({ ui, cwd }: InitParams): Promise<void> {\n ui.info(\"Setting up for OpenCode...\");\n\n writeOpenCodeMcpConfig({ ui, configPath: join(cwd, \"opencode.json\") });\n\n writeHintFile({\n ui,\n hintPath: join(cwd, \"AGENTS.md\"),\n content: webinyHintBlock({ heading: \"## Webiny\" })\n });\n\n printDone({ ui });\n}\n\n// ---------------------------------------------------------------------------\n// OpenCode-specific MCP config writer\n// ---------------------------------------------------------------------------\n\ninterface WriteOpenCodeMcpConfigParams {\n ui: IUi;\n configPath: string;\n}\n\nfunction writeOpenCodeMcpConfig({ ui, configPath }: WriteOpenCodeMcpConfigParams): boolean {\n const entry = {\n type: \"local\",\n command: [\"npx\", \"webiny-mcp\", \"serve\", \"--additional-skills=./my-skills\"],\n enabled: true\n };\n\n let config: { $schema?: string; mcp: Record<string, unknown> } = {\n $schema: \"https://opencode.ai/config.json\",\n mcp: {}\n };\n\n if (existsSync(configPath)) {\n try {\n config = JSON.parse(readFileSync(configPath, \"utf8\"));\n config.mcp ??= {};\n } catch {\n ui.warning(`Could not parse %s — will overwrite.`, configPath);\n }\n }\n\n if (config.mcp.webiny) {\n ui.info(`%s already has a %s entry — skipping.`, configPath, \"webiny\");\n return false;\n }\n\n config.mcp.webiny = entry;\n writeFileSync(configPath, JSON.stringify(config, null, 2) + \"\\n\");\n ui.success(`Registered Webiny MCP server in %s`, configPath);\n return true;\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,YAAY,EAAEC,aAAa,EAAEC,UAAU,QAAQ,IAAI;AAC5D,SAASC,IAAI,QAAQ,MAAM;AAE3B,SAASC,aAAa,EAAEC,eAAe,EAAEC,SAAS;AAOlD,OAAO,eAAeC,IAAIA,CAAC;EAAEC,EAAE;EAAEC;AAAgB,CAAC,EAAiB;EAC/DD,EAAE,CAACE,IAAI,CAAC,4BAA4B,CAAC;EAErCC,sBAAsB,CAAC;IAAEH,EAAE;IAAEI,UAAU,EAAET,IAAI,CAACM,GAAG,EAAE,eAAe;EAAE,CAAC,CAAC;EAEtEL,aAAa,CAAC;IACVI,EAAE;IACFK,QAAQ,EAAEV,IAAI,CAACM,GAAG,EAAE,WAAW,CAAC;IAChCK,OAAO,EAAET,eAAe,CAAC;MAAEU,OAAO,EAAE;IAAY,CAAC;EACrD,CAAC,CAAC;EAEFT,SAAS,CAAC;IAAEE;EAAG,CAAC,CAAC;AACrB;;AAEA;AACA;AACA;;AAOA,SAASG,sBAAsBA,CAAC;EAAEH,EAAE;EAAEI;AAAyC,CAAC,EAAW;EACvF,MAAMI,KAAK,GAAG;IACVC,IAAI,EAAE,OAAO;IACbC,OAAO,EAAE,CAAC,KAAK,EAAE,YAAY,EAAE,OAAO,EAAE,iCAAiC,CAAC;IAC1EC,OAAO,EAAE;EACb,CAAC;EAED,IAAIC,MAA0D,GAAG;IAC7DC,OAAO,EAAE,iCAAiC;IAC1CC,GAAG,EAAE,CAAC;EACV,CAAC;EAED,IAAIpB,UAAU,CAACU,UAAU,CAAC,EAAE;IACxB,IAAI;MACAQ,MAAM,GAAGG,IAAI,CAACC,KAAK,CAACxB,YAAY,CAACY,UAAU,EAAE,MAAM,CAAC,CAAC;MACrDQ,MAAM,CAACE,GAAG,KAAK,CAAC,CAAC;IACrB,CAAC,CAAC,MAAM;MACJd,EAAE,CAACiB,OAAO,CAAC,sCAAsC,EAAEb,UAAU,CAAC;IAClE;EACJ;EAEA,IAAIQ,MAAM,CAACE,GAAG,CAACI,MAAM,EAAE;IACnBlB,EAAE,CAACE,IAAI,CAAC,uCAAuC,EAAEE,UAAU,EAAE,QAAQ,CAAC;IACtE,OAAO,KAAK;EAChB;EAEAQ,MAAM,CAACE,GAAG,CAACI,MAAM,GAAGV,KAAK;EACzBf,aAAa,CAACW,UAAU,EAAEW,IAAI,CAACI,SAAS,CAACP,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC,GAAG,IAAI,CAAC;EACjEZ,EAAE,CAACoB,OAAO,CAAC,oCAAoC,EAAEhB,UAAU,CAAC;EAC5D,OAAO,IAAI;AACf","ignoreList":[]}
1
+ {"version":3,"names":["readFileSync","writeFileSync","existsSync","join","writeHintFile","webinyHintBlock","printDone","preset","slug","displayName","configFile","configNote","hintFile","init","ui","cwd","info","writeOpenCodeMcpConfig","configPath","hintPath","content","heading","entry","type","command","enabled","config","$schema","mcp","JSON","parse","warning","webiny","stringify","success"],"sources":["opencode.ts"],"sourcesContent":["/**\n * Agent adapter: OpenCode\n *\n * MCP config : opencode.json (project root)\n * Hint file : AGENTS.md (OpenCode reads this automatically each session)\n *\n * OpenCode uses a different MCP config shape than other agents:\n * {\n * \"mcp\": {\n * \"webiny\": { \"type\": \"local\", \"command\": [\"npx\", \"webiny\", \"mcp-server\"], \"enabled\": true }\n * }\n * }\n *\n * Docs: https://opencode.ai/docs/mcp-servers/\n */\n\nimport { readFileSync, writeFileSync, existsSync } from \"fs\";\nimport { join } from \"path\";\nimport type { IUi } from \"../ui.js\";\nimport type { AgentPreset } from \"./types.js\";\nimport { writeHintFile, webinyHintBlock, printDone } from \"./shared.js\";\n\nexport const preset: AgentPreset = {\n slug: \"opencode\",\n displayName: \"OpenCode\",\n configFile: \"opencode.json\",\n configNote: \"uses 'mcp' not 'mcpServers'\",\n hintFile: \"AGENTS.md\"\n};\n\ninterface InitParams {\n ui: IUi;\n cwd: string;\n}\n\nexport async function init({ ui, cwd }: InitParams): Promise<void> {\n ui.info(\"Setting up for OpenCode...\");\n\n writeOpenCodeMcpConfig({ ui, configPath: join(cwd, \"opencode.json\") });\n\n writeHintFile({\n ui,\n hintPath: join(cwd, \"AGENTS.md\"),\n content: webinyHintBlock({ heading: \"## Webiny\" })\n });\n\n printDone({ ui });\n}\n\n// ---------------------------------------------------------------------------\n// OpenCode-specific MCP config writer\n// ---------------------------------------------------------------------------\n\ninterface WriteOpenCodeMcpConfigParams {\n ui: IUi;\n configPath: string;\n}\n\nfunction writeOpenCodeMcpConfig({ ui, configPath }: WriteOpenCodeMcpConfigParams): boolean {\n const entry = {\n type: \"local\",\n command: [\"npx\", \"webiny-mcp\", \"serve\", \"--additional-skills=./my-skills\"],\n enabled: true\n };\n\n let config: { $schema?: string; mcp: Record<string, unknown> } = {\n $schema: \"https://opencode.ai/config.json\",\n mcp: {}\n };\n\n if (existsSync(configPath)) {\n try {\n config = JSON.parse(readFileSync(configPath, \"utf8\"));\n config.mcp ??= {};\n } catch {\n ui.warning(`Could not parse %s — will overwrite.`, configPath);\n }\n }\n\n if (config.mcp.webiny) {\n ui.info(`%s already has a %s entry — skipping.`, configPath, \"webiny\");\n return false;\n }\n\n config.mcp.webiny = entry;\n writeFileSync(configPath, JSON.stringify(config, null, 2) + \"\\n\");\n ui.success(`Registered Webiny MCP server in %s`, configPath);\n return true;\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,YAAY,EAAEC,aAAa,EAAEC,UAAU,QAAQ,IAAI;AAC5D,SAASC,IAAI,QAAQ,MAAM;AAG3B,SAASC,aAAa,EAAEC,eAAe,EAAEC,SAAS;AAElD,OAAO,MAAMC,MAAmB,GAAG;EAC/BC,IAAI,EAAE,UAAU;EAChBC,WAAW,EAAE,UAAU;EACvBC,UAAU,EAAE,eAAe;EAC3BC,UAAU,EAAE,6BAA6B;EACzCC,QAAQ,EAAE;AACd,CAAC;AAOD,OAAO,eAAeC,IAAIA,CAAC;EAAEC,EAAE;EAAEC;AAAgB,CAAC,EAAiB;EAC/DD,EAAE,CAACE,IAAI,CAAC,4BAA4B,CAAC;EAErCC,sBAAsB,CAAC;IAAEH,EAAE;IAAEI,UAAU,EAAEf,IAAI,CAACY,GAAG,EAAE,eAAe;EAAE,CAAC,CAAC;EAEtEX,aAAa,CAAC;IACVU,EAAE;IACFK,QAAQ,EAAEhB,IAAI,CAACY,GAAG,EAAE,WAAW,CAAC;IAChCK,OAAO,EAAEf,eAAe,CAAC;MAAEgB,OAAO,EAAE;IAAY,CAAC;EACrD,CAAC,CAAC;EAEFf,SAAS,CAAC;IAAEQ;EAAG,CAAC,CAAC;AACrB;;AAEA;AACA;AACA;;AAOA,SAASG,sBAAsBA,CAAC;EAAEH,EAAE;EAAEI;AAAyC,CAAC,EAAW;EACvF,MAAMI,KAAK,GAAG;IACVC,IAAI,EAAE,OAAO;IACbC,OAAO,EAAE,CAAC,KAAK,EAAE,YAAY,EAAE,OAAO,EAAE,iCAAiC,CAAC;IAC1EC,OAAO,EAAE;EACb,CAAC;EAED,IAAIC,MAA0D,GAAG;IAC7DC,OAAO,EAAE,iCAAiC;IAC1CC,GAAG,EAAE,CAAC;EACV,CAAC;EAED,IAAI1B,UAAU,CAACgB,UAAU,CAAC,EAAE;IACxB,IAAI;MACAQ,MAAM,GAAGG,IAAI,CAACC,KAAK,CAAC9B,YAAY,CAACkB,UAAU,EAAE,MAAM,CAAC,CAAC;MACrDQ,MAAM,CAACE,GAAG,KAAK,CAAC,CAAC;IACrB,CAAC,CAAC,MAAM;MACJd,EAAE,CAACiB,OAAO,CAAC,sCAAsC,EAAEb,UAAU,CAAC;IAClE;EACJ;EAEA,IAAIQ,MAAM,CAACE,GAAG,CAACI,MAAM,EAAE;IACnBlB,EAAE,CAACE,IAAI,CAAC,uCAAuC,EAAEE,UAAU,EAAE,QAAQ,CAAC;IACtE,OAAO,KAAK;EAChB;EAEAQ,MAAM,CAACE,GAAG,CAACI,MAAM,GAAGV,KAAK;EACzBrB,aAAa,CAACiB,UAAU,EAAEW,IAAI,CAACI,SAAS,CAACP,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC,GAAG,IAAI,CAAC;EACjEZ,EAAE,CAACoB,OAAO,CAAC,oCAAoC,EAAEhB,UAAU,CAAC;EAC5D,OAAO,IAAI;AACf","ignoreList":[]}
@@ -0,0 +1,16 @@
1
+ import type { IUi } from "../ui.js";
2
+ export interface AgentPreset {
3
+ slug: string;
4
+ displayName: string;
5
+ configFile: string;
6
+ configNote?: string;
7
+ hintFile?: string;
8
+ hintNote?: string;
9
+ }
10
+ export interface AgentModule {
11
+ preset: AgentPreset;
12
+ init: (params: {
13
+ ui: IUi;
14
+ cwd: string;
15
+ }) => Promise<void>;
16
+ }
@@ -0,0 +1,3 @@
1
+ export {};
2
+
3
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":[],"sources":["types.ts"],"sourcesContent":["import type { IUi } from \"../ui.js\";\n\nexport interface AgentPreset {\n slug: string;\n displayName: string;\n configFile: string;\n configNote?: string;\n hintFile?: string;\n hintNote?: string;\n}\n\nexport interface AgentModule {\n preset: AgentPreset;\n init: (params: { ui: IUi; cwd: string }) => Promise<void>;\n}\n"],"mappings":"","ignoreList":[]}
@@ -7,6 +7,8 @@
7
7
  * Docs: https://docs.codeium.com/windsurf/mcp
8
8
  */
9
9
  import type { IUi } from "../ui.js";
10
+ import type { AgentPreset } from "./types.js";
11
+ export declare const preset: AgentPreset;
10
12
  interface InitParams {
11
13
  ui: IUi;
12
14
  cwd: string;
@@ -9,6 +9,12 @@
9
9
 
10
10
  import { join } from "path";
11
11
  import { writeMcpConfig, writeHintFile, webinyHintBlock, printDone } from "./shared.js";
12
+ export const preset = {
13
+ slug: "windsurf",
14
+ displayName: "Windsurf",
15
+ configFile: ".windsurf/mcp.json",
16
+ hintFile: ".windsurf/rules/*.md"
17
+ };
12
18
  export async function init({
13
19
  ui,
14
20
  cwd
@@ -1 +1 @@
1
- {"version":3,"names":["join","writeMcpConfig","writeHintFile","webinyHintBlock","printDone","init","ui","cwd","info","configPath","hintPath","content","heading"],"sources":["windsurf.ts"],"sourcesContent":["/**\n * Agent adapter: Windsurf (Codeium)\n *\n * MCP config : .windsurf/mcp.json (project-level)\n * Hint file : .windsurf/rules/webiny.md\n *\n * Docs: https://docs.codeium.com/windsurf/mcp\n */\n\nimport { join } from \"path\";\nimport type { IUi } from \"../ui.js\";\nimport { writeMcpConfig, writeHintFile, webinyHintBlock, printDone } from \"./shared.js\";\n\ninterface InitParams {\n ui: IUi;\n cwd: string;\n}\n\nexport async function init({ ui, cwd }: InitParams): Promise<void> {\n ui.info(\"Setting up for Windsurf...\");\n\n writeMcpConfig({\n ui,\n configPath: join(cwd, \".windsurf\", \"mcp.json\")\n });\n\n writeHintFile({\n ui,\n hintPath: join(cwd, \".windsurf\", \"rules\", \"webiny.md\"),\n content: webinyHintBlock({ heading: \"## Webiny\" })\n });\n\n printDone({ ui });\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,IAAI,QAAQ,MAAM;AAE3B,SAASC,cAAc,EAAEC,aAAa,EAAEC,eAAe,EAAEC,SAAS;AAOlE,OAAO,eAAeC,IAAIA,CAAC;EAAEC,EAAE;EAAEC;AAAgB,CAAC,EAAiB;EAC/DD,EAAE,CAACE,IAAI,CAAC,4BAA4B,CAAC;EAErCP,cAAc,CAAC;IACXK,EAAE;IACFG,UAAU,EAAET,IAAI,CAACO,GAAG,EAAE,WAAW,EAAE,UAAU;EACjD,CAAC,CAAC;EAEFL,aAAa,CAAC;IACVI,EAAE;IACFI,QAAQ,EAAEV,IAAI,CAACO,GAAG,EAAE,WAAW,EAAE,OAAO,EAAE,WAAW,CAAC;IACtDI,OAAO,EAAER,eAAe,CAAC;MAAES,OAAO,EAAE;IAAY,CAAC;EACrD,CAAC,CAAC;EAEFR,SAAS,CAAC;IAAEE;EAAG,CAAC,CAAC;AACrB","ignoreList":[]}
1
+ {"version":3,"names":["join","writeMcpConfig","writeHintFile","webinyHintBlock","printDone","preset","slug","displayName","configFile","hintFile","init","ui","cwd","info","configPath","hintPath","content","heading"],"sources":["windsurf.ts"],"sourcesContent":["/**\n * Agent adapter: Windsurf (Codeium)\n *\n * MCP config : .windsurf/mcp.json (project-level)\n * Hint file : .windsurf/rules/webiny.md\n *\n * Docs: https://docs.codeium.com/windsurf/mcp\n */\n\nimport { join } from \"path\";\nimport type { IUi } from \"../ui.js\";\nimport type { AgentPreset } from \"./types.js\";\nimport { writeMcpConfig, writeHintFile, webinyHintBlock, printDone } from \"./shared.js\";\n\nexport const preset: AgentPreset = {\n slug: \"windsurf\",\n displayName: \"Windsurf\",\n configFile: \".windsurf/mcp.json\",\n hintFile: \".windsurf/rules/*.md\"\n};\n\ninterface InitParams {\n ui: IUi;\n cwd: string;\n}\n\nexport async function init({ ui, cwd }: InitParams): Promise<void> {\n ui.info(\"Setting up for Windsurf...\");\n\n writeMcpConfig({\n ui,\n configPath: join(cwd, \".windsurf\", \"mcp.json\")\n });\n\n writeHintFile({\n ui,\n hintPath: join(cwd, \".windsurf\", \"rules\", \"webiny.md\"),\n content: webinyHintBlock({ heading: \"## Webiny\" })\n });\n\n printDone({ ui });\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,IAAI,QAAQ,MAAM;AAG3B,SAASC,cAAc,EAAEC,aAAa,EAAEC,eAAe,EAAEC,SAAS;AAElE,OAAO,MAAMC,MAAmB,GAAG;EAC/BC,IAAI,EAAE,UAAU;EAChBC,WAAW,EAAE,UAAU;EACvBC,UAAU,EAAE,oBAAoB;EAChCC,QAAQ,EAAE;AACd,CAAC;AAOD,OAAO,eAAeC,IAAIA,CAAC;EAAEC,EAAE;EAAEC;AAAgB,CAAC,EAAiB;EAC/DD,EAAE,CAACE,IAAI,CAAC,4BAA4B,CAAC;EAErCZ,cAAc,CAAC;IACXU,EAAE;IACFG,UAAU,EAAEd,IAAI,CAACY,GAAG,EAAE,WAAW,EAAE,UAAU;EACjD,CAAC,CAAC;EAEFV,aAAa,CAAC;IACVS,EAAE;IACFI,QAAQ,EAAEf,IAAI,CAACY,GAAG,EAAE,WAAW,EAAE,OAAO,EAAE,WAAW,CAAC;IACtDI,OAAO,EAAEb,eAAe,CAAC;MAAEc,OAAO,EAAE;IAAY,CAAC;EACrD,CAAC,CAAC;EAEFb,SAAS,CAAC;IAAEO;EAAG,CAAC,CAAC;AACrB","ignoreList":[]}
@@ -1,5 +1,5 @@
1
1
  import { ConsoleUi } from "../ui.js";
2
- const SUPPORTED = ["claude", "cursor", "windsurf", "copilot", "cline", "opencode", "kiro"];
2
+ import { discoverAgents } from "../agents/discover.js";
3
3
  export async function configureMcp(params = {}) {
4
4
  const ui = params.ui ?? new ConsoleUi();
5
5
  const cwd = params.cwd ?? process.cwd();
@@ -7,19 +7,34 @@ export async function configureMcp(params = {}) {
7
7
  const {
8
8
  printInstructions
9
9
  } = await import("../agents/instructions.js");
10
- printInstructions();
10
+ await printInstructions();
11
11
  return;
12
12
  }
13
- const target = params.agent || "claude";
14
- if (!SUPPORTED.includes(target)) {
13
+ const agents = await discoverAgents();
14
+ const supported = Array.from(agents.keys());
15
+ const target = params.agent;
16
+ if (!target) {
17
+ ui.text("Available agents:");
18
+ ui.emptyLine();
19
+ for (const [slug, {
20
+ preset
21
+ }] of agents) {
22
+ ui.text(` ${slug.padEnd(12)} ${preset.displayName}`);
23
+ }
24
+ ui.emptyLine();
25
+ ui.text("Usage: npx webiny-mcp configure <agent>");
26
+ ui.text("For other agents, run: npx webiny-mcp configure --instructions");
27
+ return;
28
+ }
29
+ if (!agents.has(target)) {
15
30
  ui.error(`Unknown agent "${target}".`);
16
- ui.text(`Supported: ${SUPPORTED.join(", ")}`);
31
+ ui.text(`Supported: ${supported.join(", ")}`);
17
32
  ui.text("For other agents, run: npx webiny-mcp configure --instructions");
18
33
  process.exit(1);
19
34
  }
20
35
  const {
21
36
  init
22
- } = await import(`../agents/${target}.js`);
37
+ } = agents.get(target);
23
38
  await init({
24
39
  ui,
25
40
  cwd
@@ -1 +1 @@
1
- {"version":3,"names":["ConsoleUi","SUPPORTED","configureMcp","params","ui","cwd","process","instructions","printInstructions","target","agent","includes","error","text","join","exit","init"],"sources":["ConfigureMcp.ts"],"sourcesContent":["import type { IUi } from \"../ui.js\";\nimport { ConsoleUi } from \"../ui.js\";\n\nexport interface IConfigureMcpParams {\n agent?: string;\n instructions?: boolean;\n ui?: IUi;\n cwd?: string;\n}\n\nconst SUPPORTED = [\"claude\", \"cursor\", \"windsurf\", \"copilot\", \"cline\", \"opencode\", \"kiro\"];\n\nexport async function configureMcp(params: IConfigureMcpParams = {}): Promise<void> {\n const ui = params.ui ?? new ConsoleUi();\n const cwd = params.cwd ?? process.cwd();\n\n if (params.instructions) {\n const { printInstructions } = await import(\"../agents/instructions.js\");\n printInstructions();\n return;\n }\n\n const target = params.agent || \"claude\";\n\n if (!SUPPORTED.includes(target)) {\n ui.error(`Unknown agent \"${target}\".`);\n ui.text(`Supported: ${SUPPORTED.join(\", \")}`);\n ui.text(\"For other agents, run: npx webiny-mcp configure --instructions\");\n process.exit(1);\n }\n\n const { init } = await import(`../agents/${target}.js`);\n await init({ ui, cwd });\n}\n"],"mappings":"AACA,SAASA,SAAS;AASlB,MAAMC,SAAS,GAAG,CAAC,QAAQ,EAAE,QAAQ,EAAE,UAAU,EAAE,SAAS,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,CAAC;AAE1F,OAAO,eAAeC,YAAYA,CAACC,MAA2B,GAAG,CAAC,CAAC,EAAiB;EAChF,MAAMC,EAAE,GAAGD,MAAM,CAACC,EAAE,IAAI,IAAIJ,SAAS,CAAC,CAAC;EACvC,MAAMK,GAAG,GAAGF,MAAM,CAACE,GAAG,IAAIC,OAAO,CAACD,GAAG,CAAC,CAAC;EAEvC,IAAIF,MAAM,CAACI,YAAY,EAAE;IACrB,MAAM;MAAEC;IAAkB,CAAC,GAAG,MAAM,MAAM,4BAA4B,CAAC;IACvEA,iBAAiB,CAAC,CAAC;IACnB;EACJ;EAEA,MAAMC,MAAM,GAAGN,MAAM,CAACO,KAAK,IAAI,QAAQ;EAEvC,IAAI,CAACT,SAAS,CAACU,QAAQ,CAACF,MAAM,CAAC,EAAE;IAC7BL,EAAE,CAACQ,KAAK,CAAC,kBAAkBH,MAAM,IAAI,CAAC;IACtCL,EAAE,CAACS,IAAI,CAAC,cAAcZ,SAAS,CAACa,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC;IAC7CV,EAAE,CAACS,IAAI,CAAC,gEAAgE,CAAC;IACzEP,OAAO,CAACS,IAAI,CAAC,CAAC,CAAC;EACnB;EAEA,MAAM;IAAEC;EAAK,CAAC,GAAG,MAAM,MAAM,CAAC,aAAaP,MAAM,KAAK,CAAC;EACvD,MAAMO,IAAI,CAAC;IAAEZ,EAAE;IAAEC;EAAI,CAAC,CAAC;AAC3B","ignoreList":[]}
1
+ {"version":3,"names":["ConsoleUi","discoverAgents","configureMcp","params","ui","cwd","process","instructions","printInstructions","agents","supported","Array","from","keys","target","agent","text","emptyLine","slug","preset","padEnd","displayName","has","error","join","exit","init","get"],"sources":["ConfigureMcp.ts"],"sourcesContent":["import type { IUi } from \"../ui.js\";\nimport { ConsoleUi } from \"../ui.js\";\nimport { discoverAgents } from \"../agents/discover.js\";\n\nexport interface IConfigureMcpParams {\n agent?: string;\n instructions?: boolean;\n ui?: IUi;\n cwd?: string;\n}\n\nexport async function configureMcp(params: IConfigureMcpParams = {}): Promise<void> {\n const ui = params.ui ?? new ConsoleUi();\n const cwd = params.cwd ?? process.cwd();\n\n if (params.instructions) {\n const { printInstructions } = await import(\"../agents/instructions.js\");\n await printInstructions();\n return;\n }\n\n const agents = await discoverAgents();\n const supported = Array.from(agents.keys());\n const target = params.agent;\n\n if (!target) {\n ui.text(\"Available agents:\");\n ui.emptyLine();\n for (const [slug, { preset }] of agents) {\n ui.text(` ${slug.padEnd(12)} ${preset.displayName}`);\n }\n ui.emptyLine();\n ui.text(\"Usage: npx webiny-mcp configure <agent>\");\n ui.text(\"For other agents, run: npx webiny-mcp configure --instructions\");\n return;\n }\n\n if (!agents.has(target)) {\n ui.error(`Unknown agent \"${target}\".`);\n ui.text(`Supported: ${supported.join(\", \")}`);\n ui.text(\"For other agents, run: npx webiny-mcp configure --instructions\");\n process.exit(1);\n }\n\n const { init } = agents.get(target)!;\n await init({ ui, cwd });\n}\n"],"mappings":"AACA,SAASA,SAAS;AAClB,SAASC,cAAc;AASvB,OAAO,eAAeC,YAAYA,CAACC,MAA2B,GAAG,CAAC,CAAC,EAAiB;EAChF,MAAMC,EAAE,GAAGD,MAAM,CAACC,EAAE,IAAI,IAAIJ,SAAS,CAAC,CAAC;EACvC,MAAMK,GAAG,GAAGF,MAAM,CAACE,GAAG,IAAIC,OAAO,CAACD,GAAG,CAAC,CAAC;EAEvC,IAAIF,MAAM,CAACI,YAAY,EAAE;IACrB,MAAM;MAAEC;IAAkB,CAAC,GAAG,MAAM,MAAM,4BAA4B,CAAC;IACvE,MAAMA,iBAAiB,CAAC,CAAC;IACzB;EACJ;EAEA,MAAMC,MAAM,GAAG,MAAMR,cAAc,CAAC,CAAC;EACrC,MAAMS,SAAS,GAAGC,KAAK,CAACC,IAAI,CAACH,MAAM,CAACI,IAAI,CAAC,CAAC,CAAC;EAC3C,MAAMC,MAAM,GAAGX,MAAM,CAACY,KAAK;EAE3B,IAAI,CAACD,MAAM,EAAE;IACTV,EAAE,CAACY,IAAI,CAAC,mBAAmB,CAAC;IAC5BZ,EAAE,CAACa,SAAS,CAAC,CAAC;IACd,KAAK,MAAM,CAACC,IAAI,EAAE;MAAEC;IAAO,CAAC,CAAC,IAAIV,MAAM,EAAE;MACrCL,EAAE,CAACY,IAAI,CAAC,KAAKE,IAAI,CAACE,MAAM,CAAC,EAAE,CAAC,IAAID,MAAM,CAACE,WAAW,EAAE,CAAC;IACzD;IACAjB,EAAE,CAACa,SAAS,CAAC,CAAC;IACdb,EAAE,CAACY,IAAI,CAAC,yCAAyC,CAAC;IAClDZ,EAAE,CAACY,IAAI,CAAC,gEAAgE,CAAC;IACzE;EACJ;EAEA,IAAI,CAACP,MAAM,CAACa,GAAG,CAACR,MAAM,CAAC,EAAE;IACrBV,EAAE,CAACmB,KAAK,CAAC,kBAAkBT,MAAM,IAAI,CAAC;IACtCV,EAAE,CAACY,IAAI,CAAC,cAAcN,SAAS,CAACc,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC;IAC7CpB,EAAE,CAACY,IAAI,CAAC,gEAAgE,CAAC;IACzEV,OAAO,CAACmB,IAAI,CAAC,CAAC,CAAC;EACnB;EAEA,MAAM;IAAEC;EAAK,CAAC,GAAGjB,MAAM,CAACkB,GAAG,CAACb,MAAM,CAAE;EACpC,MAAMY,IAAI,CAAC;IAAEtB,EAAE;IAAEC;EAAI,CAAC,CAAC;AAC3B","ignoreList":[]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@webiny/mcp",
3
- "version": "6.1.0-beta.1",
3
+ "version": "6.1.0-beta.2",
4
4
  "type": "module",
5
5
  "main": "./index.js",
6
6
  "bin": {
@@ -25,7 +25,7 @@
25
25
  "devDependencies": {
26
26
  "@types/lodash": "4.17.24",
27
27
  "@types/ncp": "2.0.8",
28
- "@webiny/build-tools": "6.1.0-beta.1",
28
+ "@webiny/build-tools": "6.1.0-beta.2",
29
29
  "execa": "5.1.1",
30
30
  "tsx": "4.21.0",
31
31
  "typescript": "5.9.3"
@@ -33,5 +33,5 @@
33
33
  "scripts": {
34
34
  "prepublishOnly": "bash ./prepublishOnly.sh"
35
35
  },
36
- "gitHead": "3c1293ba17a14f239fb1cbf5d80cd66846849309"
36
+ "gitHead": "7174b414a55fc1c3f4cf38abab69dba5109e7765"
37
37
  }