@wix/mcp 1.0.93 → 1.0.95

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 (84) hide show
  1. package/README.md +2 -2
  2. package/build/bin-standalone.js +1200 -455
  3. package/build/cjs/index.cjs +3237 -1264
  4. package/build/cjs/toolkit.cjs +2177 -469
  5. package/build/dts/api-call/headless-release.d.ts +56 -0
  6. package/build/dts/api-call/headless-release.js +135 -0
  7. package/build/dts/api-call/index.d.ts +9 -1
  8. package/build/dts/api-call/index.js +19 -10
  9. package/build/dts/api-call/site-files.d.ts +42 -0
  10. package/build/dts/api-call/site-files.js +290 -0
  11. package/build/dts/api-call/upload-headless-website-files.d.ts +118 -0
  12. package/build/dts/api-call/upload-headless-website-files.js +624 -0
  13. package/build/dts/api-call/upload-image-tool.d.ts +2 -0
  14. package/build/dts/api-call/upload-image-tool.js +8 -4
  15. package/build/dts/bin.d.ts +1 -1
  16. package/build/dts/bin.js +4 -5
  17. package/build/dts/code-mode/attachments.js +1 -1
  18. package/build/dts/code-mode/index.d.ts +6 -1
  19. package/build/dts/code-mode/index.js +47 -13
  20. package/build/dts/code-mode/truncate-response.js +5 -1
  21. package/build/dts/config/default-config.d.ts +35 -9
  22. package/build/dts/config/default-config.js +348 -207
  23. package/build/dts/config/file-params.d.ts +22 -0
  24. package/build/dts/config/file-params.js +24 -0
  25. package/build/dts/config/param-descriptions.d.ts +14 -2
  26. package/build/dts/config/param-descriptions.js +34 -15
  27. package/build/dts/constants.d.ts +1 -0
  28. package/build/dts/constants.js +1 -0
  29. package/build/dts/docs/docs.d.ts +16 -3
  30. package/build/dts/docs/docs.js +211 -39
  31. package/build/dts/docs/fetch-article.d.ts +21 -0
  32. package/build/dts/docs/fetch-article.js +70 -5
  33. package/build/dts/docs/get-to-know.d.ts +7 -2
  34. package/build/dts/docs/get-to-know.js +37 -15
  35. package/build/dts/docs/mintlify-docs.d.ts +121 -0
  36. package/build/dts/docs/mintlify-docs.js +391 -0
  37. package/build/dts/docs/semanticSearch.d.ts +2 -1
  38. package/build/dts/docs/semanticSearch.js +14 -7
  39. package/build/dts/docs/start-deploy-website.d.ts +7 -6
  40. package/build/dts/docs/start-deploy-website.js +13 -8
  41. package/build/dts/docs/start-headless-build.d.ts +17 -0
  42. package/build/dts/docs/start-headless-build.js +60 -0
  43. package/build/dts/graphql/index.js +3 -1
  44. package/build/dts/import-claude-design-tool/index.js +2 -2
  45. package/build/dts/index.d.ts +3 -2
  46. package/build/dts/index.js +3 -2
  47. package/build/dts/infra/redact-personal-data.d.ts +4 -0
  48. package/build/dts/infra/redact-personal-data.js +79 -0
  49. package/build/dts/site-widget-tools/constants.d.ts +49 -1
  50. package/build/dts/site-widget-tools/constants.js +64 -7
  51. package/build/dts/site-widget-tools/index.d.ts +1 -0
  52. package/build/dts/site-widget-tools/index.js +1 -0
  53. package/build/dts/site-widget-tools/pick-images-tool/index.d.ts +14 -0
  54. package/build/dts/site-widget-tools/pick-images-tool/index.js +138 -0
  55. package/build/dts/site-widget-tools/search-site-templates-tool/index.js +33 -9
  56. package/build/dts/site-widget-tools/site-builder-tool/index.js +22 -2
  57. package/build/dts/site-widget-tools/site-creation-tool/index.d.ts +7 -1
  58. package/build/dts/site-widget-tools/site-creation-tool/index.js +22 -51
  59. package/build/dts/site-widget-tools/suggested-domain-tool/index.js +6 -3
  60. package/build/dts/support/index.d.ts +4 -0
  61. package/build/dts/support/index.js +13 -7
  62. package/build/dts/toolkit-entry.d.cts +19 -12
  63. package/build/dts/toolkit-entry.d.ts +19 -12
  64. package/build/dts/toolkit.d.ts +2 -2
  65. package/build/dts/toolkit.js +23 -7
  66. package/build/dts/wix-mcp-server.d.ts +11 -0
  67. package/build/dts/wix-mcp-server.js +28 -6
  68. package/build/dts/wixel/constants.d.ts +8 -1
  69. package/build/dts/wixel/constants.js +8 -1
  70. package/build/dts/wixel/index.d.ts +1 -1
  71. package/build/dts/wixel/index.js +2 -2
  72. package/build/dts/wixel/wixel-a2a-client.d.ts +83 -0
  73. package/build/dts/wixel/wixel-a2a-client.js +166 -0
  74. package/build/dts/wixel/wixel-bi.d.ts +2 -1
  75. package/build/dts/wixel/wixel-bi.js +2 -1
  76. package/build/dts/wixel/{external-agent-api.d.ts → wixel-session-entries.d.ts} +11 -33
  77. package/build/dts/wixel/{external-agent-api.js → wixel-session-entries.js} +33 -54
  78. package/build/dts/wixel/wixel-session-tools.d.ts +21 -26
  79. package/build/dts/wixel/wixel-session-tools.js +494 -599
  80. package/build/esm/index.js +3335 -1376
  81. package/build/esm/toolkit.js +2273 -565
  82. package/package.json +4 -4
  83. package/build/dts/docs/create-site-guide.d.ts +0 -3
  84. package/build/dts/docs/create-site-guide.js +0 -109
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wix/mcp",
3
- "version": "1.0.93",
3
+ "version": "1.0.95",
4
4
  "description": "A Model Context Protocol server for Wix AI tools",
5
5
  "bin": "./build/bin-standalone.js",
6
6
  "dependencies": {
@@ -37,13 +37,13 @@
37
37
  "@wix/ambassador-wixel-slides-v1-no-entity-wixel-agent": "^1.0.48",
38
38
  "@wix/ambassador-www-asset-v1-asset": "^1.0.60",
39
39
  "@wix/ambassador-www-project-v1-project": "^1.0.44",
40
- "@wix/ambassador-www-wixel-agent-v1-external-agent": "^1.0.7",
40
+ "@wix/ambassador-www-wixel-agent-v1-agent-to-agent": "^1.0.11",
41
41
  "@wix/bi-logger-api-infra-data": "^1.151.0",
42
42
  "@wix/bi-logger-dev-tools-data": "^1.164.0",
43
43
  "@wix/bi-logger-wix-code-data": "^1.485.0",
44
44
  "@wix/common-widget-types": "^1.77.0",
45
45
  "@wix/design-system": "^1.256.2",
46
- "@wix/dynamic-context-enricher": "0.1.4",
46
+ "@wix/dynamic-context-enricher": "0.1.6",
47
47
  "@wix/http-client": "^2.85.0",
48
48
  "@wix/panorama-client-node": "^3.253.0",
49
49
  "@wix/standalone-node-bi-logger": "^1.7.24",
@@ -133,5 +133,5 @@
133
133
  ]
134
134
  }
135
135
  },
136
- "falconPackageHash": "416cbd091ed4f59d7a920a4a98434246c6a211bf9c981dd78ad9a627"
136
+ "falconPackageHash": "46b1c15cdaa59b4fa0e59ea87d65a46d8d3f1995933a6e58dcc7f7c9"
137
137
  }
@@ -1,3 +0,0 @@
1
- import { WixMcpServer } from '../wix-mcp-server.js';
2
- export declare function addCreateWixBusinessGuideTools(server: WixMcpServer, disableTools?: string[], toolDescriptions?: Record<string, string>, cliEnabled?: boolean | (() => boolean)): Promise<void>;
3
- //# sourceMappingURL=create-site-guide.d.ts.map
@@ -1,109 +0,0 @@
1
- import { z } from 'zod';
2
- import { fetchArticleContent } from './fetch-article.js';
3
- import { defaultToolDescriptions } from '../config/default-config.js';
4
- function isHeadlessRequest(prompt) {
5
- return !!prompt && /headless/i.test(prompt);
6
- }
7
- const HEADLESS_NON_CLI_INSTRUCTIONS = `# Creating a Wix Headless Site
8
-
9
- Wix Headless sites require the **Wix CLI** and cannot be created from the Wix dashboard or via REST API alone. Let the user know they need to set up a local development environment with the Wix CLI before proceeding.
10
-
11
- ## Prerequisites
12
- - Node.js 18+
13
- - A terminal / command-line environment
14
-
15
- ## Steps to Get Started
16
-
17
- 1. **Install and authenticate the Wix CLI:**
18
- \`\`\`
19
- npx @wix/cli login
20
- \`\`\`
21
- 2. **Follow the quick-start guide:** https://dev.wix.com/docs/go-headless
22
- 3. **For a complete orchestrated setup** (commerce, CMS, bookings, identity), use the Wix Headless skill: https://www.wix-headless.dev/skill.md`;
23
- const HEADLESS_CLI_INSTRUCTIONS = `# Creating a Wix Headless Site (CLI Flow)
24
-
25
- Follow these steps using the \`RunWixCliCommand\` tool to scaffold and configure a Wix Headless site.
26
-
27
- ## Before You Start
28
- Ask the user:
29
- 1. What is the brand/site name?
30
- 2. Which local directory should the project be created in?
31
-
32
- ## Steps
33
-
34
- ### Step 1 — Authenticate (if not already done)
35
- Run: \`npx @wix/cli login\`
36
- Skip if the user is already authenticated.
37
-
38
- ### Step 2 — Scaffold the project
39
- Use a Wix headless starter template. Ask the user which starter they prefer, or use the default Next.js starter. Follow the scaffolding instructions at: https://dev.wix.com/docs/go-headless
40
-
41
- ### Step 3 — Install dependencies
42
- Run: \`npm install\` in the project directory.
43
-
44
- ### Step 4 — Pull environment variables
45
- Run: \`npx @wix/cli env pull\`
46
- This writes the \`.env.local\` file with the site's environment variables.
47
-
48
- ### Step 5 — Build and verify
49
- Run: \`npx @wix/cli build\`
50
-
51
- ### Step 6 — Release (optional)
52
- Run: \`npx @wix/cli release\` to deploy.
53
-
54
- ## Full Orchestration
55
- For a complete multi-wave headless setup (commerce, CMS, bookings, design system, content seeding), refer to the Wix Headless skill: https://www.wix-headless.dev/skill.md
56
-
57
- Use \`RunWixCliCommand\` for each CLI step above.`;
58
- const CREATE_SITE_DOCS = [
59
- {
60
- url: 'https://dev.wix.com/docs/kb-only/MCP_REST_RECIPES_KB_ID/TRAIN_create_a_new_site_from_template',
61
- title: 'How to Create a New Wix Site',
62
- nextSteps: '\n\n**Next Steps:** Use the ManageWixSite tool to make the API call for creating the Wix site.'
63
- },
64
- {
65
- url: 'https://dev.wix.com/docs/kb-only/MCP_REST_RECIPES_KB_ID/TRAIN_wix.devcenter.apps.installer.v1.AppsInstallerService.InstallApp',
66
- title: 'How to Install App on a Wix Site',
67
- nextSteps: '\n\n**Next Steps:** Use the CallWixSiteAPI tool to make the API call for installing apps on the Wix site.'
68
- }
69
- ];
70
- export async function addCreateWixBusinessGuideTools(server, disableTools = [], toolDescriptions, cliEnabled = false) {
71
- if (disableTools.includes('CreateWixBusinessGuide')) {
72
- return;
73
- }
74
- server.tool('CreateWixBusinessGuide', toolDescriptions?.['CreateWixBusinessGuide'] ??
75
- defaultToolDescriptions.CreateWixBusinessGuide, {
76
- userPrompt: z
77
- .string()
78
- .optional()
79
- .describe('The user prompt that triggered this tool')
80
- }, { readOnlyHint: true, destructiveHint: false, openWorldHint: false }, async (args, { httpClient }) => {
81
- if (isHeadlessRequest(args.userPrompt)) {
82
- const isCli = typeof cliEnabled === 'function' ? cliEnabled() : cliEnabled;
83
- const text = isCli
84
- ? HEADLESS_CLI_INSTRUCTIONS
85
- : HEADLESS_NON_CLI_INSTRUCTIONS;
86
- return { content: [{ type: 'text', text }] };
87
- }
88
- try {
89
- const contents = await Promise.all(CREATE_SITE_DOCS.map(async ({ url, title, nextSteps }) => {
90
- const articleContent = await fetchArticleContent(httpClient, url, 'article', true);
91
- const fullContent = `# ${title}\n\n${articleContent}${nextSteps}`;
92
- return { type: 'text', text: fullContent };
93
- }));
94
- return { content: contents };
95
- }
96
- catch (error) {
97
- return {
98
- isError: true,
99
- content: [
100
- {
101
- type: 'text',
102
- text: `Error fetching create site documentation: ${error.message}`
103
- }
104
- ]
105
- };
106
- }
107
- });
108
- }
109
- //# sourceMappingURL=create-site-guide.js.map