@wix/mcp 1.0.13 → 1.0.15

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,4 @@
1
+ export declare const RAW_DOCS_API_URL = "https://dev.wix.com/rawdocs/api";
2
+ export declare const GET_ARTICLE_CONTENT_URL = "https://dev.wix.com/rawdocs/api/get-article-content";
3
+ export declare const PORTAL_INDEX_URL = "https://dev.wix.com/rawdocs/api/portal-index";
4
+ //# sourceMappingURL=constants.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../src/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,gBAAgB,oCAAoC,CAAC;AAClE,eAAO,MAAM,uBAAuB,wDAA4C,CAAC;AACjF,eAAO,MAAM,gBAAgB,iDAAqC,CAAC"}
@@ -0,0 +1,4 @@
1
+ export const RAW_DOCS_API_URL = 'https://dev.wix.com/rawdocs/api';
2
+ export const GET_ARTICLE_CONTENT_URL = `${RAW_DOCS_API_URL}/get-article-content`;
3
+ export const PORTAL_INDEX_URL = `${RAW_DOCS_API_URL}/portal-index`;
4
+ //# sourceMappingURL=constants.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../src/constants.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,gBAAgB,GAAG,iCAAiC,CAAC;AAClE,MAAM,CAAC,MAAM,uBAAuB,GAAG,GAAG,gBAAgB,sBAAsB,CAAC;AACjF,MAAM,CAAC,MAAM,gBAAgB,GAAG,GAAG,gBAAgB,eAAe,CAAC"}
@@ -1,3 +1,3 @@
1
1
  import { HttpClient } from '@wix/http-client';
2
- export declare function fetchArticleContent(httpClient: HttpClient, articleUrl: string, mode: 'article' | 'methodSchema' | 'raw'): Promise<string>;
2
+ export declare function fetchArticleContent(httpClient: HttpClient, articleUrl: string, mode: 'article' | 'methodSchema' | 'raw', stripHeader?: boolean): Promise<string>;
3
3
  //# sourceMappingURL=fetch-article.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"fetch-article.d.ts","sourceRoot":"","sources":["../../../src/docs/fetch-article.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAuB9C,wBAAsB,mBAAmB,CACvC,UAAU,EAAE,UAAU,EACtB,UAAU,EAAE,MAAM,EAClB,IAAI,EAAE,SAAS,GAAG,cAAc,GAAG,KAAK,mBAQzC"}
1
+ {"version":3,"file":"fetch-article.d.ts","sourceRoot":"","sources":["../../../src/docs/fetch-article.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAoC9C,wBAAsB,mBAAmB,CACvC,UAAU,EAAE,UAAU,EACtB,UAAU,EAAE,MAAM,EAClB,IAAI,EAAE,SAAS,GAAG,cAAc,GAAG,KAAK,EACxC,WAAW,GAAE,OAAe,mBAa7B"}
@@ -1,20 +1,28 @@
1
1
  import { logger } from '../infra/logger.js';
2
- async function fetchArticleContentFromDigor(httpClient, articleUrl, mode) {
3
- // https://dev.wix.com/digor/api/get-article-content?articleUrl=https://dev.wix.com/docs/rest/business-solutions/blog/draft-posts/create-draft-post&schema=true
4
- const url = new URL(`https://dev.wix.com/digor/api/get-article-content`);
2
+ import { GET_ARTICLE_CONTENT_URL } from '../constants.js';
3
+ async function fetchArticleContentFromDigor(httpClient, articleUrl, mode, stripHeader = false) {
4
+ // https://dev.wix.com/rawdocs/api/get-article-content?articleUrl=https://dev.wix.com/docs/rest/business-solutions/blog/draft-posts/create-draft-post&schema=true
5
+ const url = new URL(GET_ARTICLE_CONTENT_URL);
5
6
  url.searchParams.set('articleUrl', articleUrl);
6
7
  const schema = mode === 'methodSchema' ? 'true' : 'false';
7
8
  url.searchParams.set('schema', schema);
8
9
  logger.log(`Fetching resource from docs ${url.toString()}`);
9
10
  const { data } = await httpClient.get(url.toString());
10
11
  logger.log(`Fetched resource from docs: ${data.articleContent}`);
12
+ const headerDivider = '## Article Content:'; // after the header, the content starts
13
+ if (stripHeader) {
14
+ const headerIndex = data.articleContent.indexOf(headerDivider);
15
+ if (headerIndex !== -1) {
16
+ return data.articleContent.substring(headerIndex + headerDivider.length);
17
+ }
18
+ }
11
19
  return data.articleContent;
12
20
  }
13
- export async function fetchArticleContent(httpClient, articleUrl, mode) {
21
+ export async function fetchArticleContent(httpClient, articleUrl, mode, stripHeader = false) {
14
22
  if (mode === 'raw') {
15
23
  const { data: doc } = await httpClient.get(articleUrl);
16
24
  return doc;
17
25
  }
18
- return fetchArticleContentFromDigor(httpClient, articleUrl, mode);
26
+ return fetchArticleContentFromDigor(httpClient, articleUrl, mode, stripHeader);
19
27
  }
20
28
  //# sourceMappingURL=fetch-article.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"fetch-article.js","sourceRoot":"","sources":["../../../src/docs/fetch-article.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAE5C,KAAK,UAAU,4BAA4B,CACzC,UAAsB,EACtB,UAAkB,EAClB,IAAgC;IAEhC,+JAA+J;IAC/J,MAAM,GAAG,GAAG,IAAI,GAAG,CAAC,mDAAmD,CAAC,CAAC;IACzE,GAAG,CAAC,YAAY,CAAC,GAAG,CAAC,YAAY,EAAE,UAAU,CAAC,CAAC;IAC/C,MAAM,MAAM,GAAG,IAAI,KAAK,cAAc,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO,CAAC;IAC1D,GAAG,CAAC,YAAY,CAAC,GAAG,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC;IAEvC,MAAM,CAAC,GAAG,CAAC,+BAA+B,GAAG,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC;IAE5D,MAAM,EAAE,IAAI,EAAE,GAAG,MAAM,UAAU,CAAC,GAAG,CAAC,GAAG,CAAC,QAAQ,EAAE,CAAC,CAAC;IAEtD,MAAM,CAAC,GA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AC,GAAG,CAAC,+BAA+B,IAAI,CAAC,cAAc,EAAE,CAAC,CAAC;IAEjE,MAAM,aAAa,GAAG,qBAAqB,CAAC,CAAC,uCAAuC;IAEpF,IAAI,WAAW,EAAE,CAAC;QAChB,MAAM,WAAW,GAAG,IAAI,CAAC,cAAc,CAAC,OAAO,CAAC,aAAa,CAAC,CAAC;QAC/D,IAAI,WAAW,KAAK,CAAC,CAAC,EAAE,CAAC;YACvB,OAAO,IAAI,CAAC,cAAc,CAAC,SAAS,CAClC,WAAW,GAAG,aAAa,CAAC,MAAM,CACzB,CAAC;QACd,CAAC;IACH,CAAC;IAED,OAAO,IAAI,CAAC,cAAwB,CAAC;AACvC,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,mBAAmB,CACvC,UAAsB,EACtB,UAAkB,EAClB,IAAwC,EACxC,cAAuB,KAAK;IAE5B,IAAI,IAAI,KAAK,KAAK,EAAE,CAAC;QACnB,MAAM,EAAE,IAAI,EAAE,GAAG,EAAE,GAAG,MAAM,UAAU,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC;QACvD,OAAO,GAAa,CAAC;IACvB,CAAC;IAED,OAAO,4BAA4B,CACjC,UAAU,EACV,UAAU,EACV,IAAI,EACJ,WAAW,CACZ,CAAC;AACJ,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"get-to-know.d.ts","sourceRoot":"","sources":["../../../src/docs/get-to-know.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AA6BpD,eAAO,MAAM,+BAA+B,yEAAyE,CAAC;AAEtH,wBAAsB,iBAAiB,CAAC,MAAM,EAAE,YAAY,iBA4B3D"}
1
+ {"version":3,"file":"get-to-know.d.ts","sourceRoot":"","sources":["../../../src/docs/get-to-know.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AA8DpD,eAAO,MAAM,+BAA+B,yEAC4B,CAAC;AAEzE,wBAAsB,iBAAiB,CAAC,MAAM,EAAE,YAAY,iBAwC3D"}
@@ -1,41 +1,80 @@
1
1
  import { fetchArticleContent } from './fetch-article.js';
2
2
  const docURLs = [
3
3
  {
4
- url: 'https://dev.wix.com/docs/picasso/wix-ai-docs/index/get-to-know-wix-llm-instructions'
4
+ url: 'https://dev.wix.com/docs/picasso/wix-ai-docs/index/get-to-know-wix-llm-instructions',
5
+ action: 'include'
5
6
  },
6
7
  {
7
- url: 'https://dev.wix.com/docs/picasso/wix-ai-docs/index/wix-concepts'
8
+ url: 'https://dev.wix.com/docs/picasso/wix-ai-docs/index/wix-concepts',
9
+ action: 'include'
8
10
  },
9
11
  {
10
- url: 'https://dev.wix.com/docs/picasso/wix-ai-docs/index/wix-business-solutions'
12
+ url: 'https://dev.wix.com/docs/picasso/wix-ai-docs/index/wix-business-solutions',
13
+ action: 'index',
14
+ title: 'Wix Business Solutions',
15
+ description: `This document provides an overview of the all business solutions available in Wix.
16
+
17
+ Use this document under the following scenarios:
18
+ 1. The user asks general questions about Wix business solutions.
19
+ 2. The user asks about a specific business solution, and you want to provide a high-level overview of it.
20
+ 3. The user looks for a specific business solution, and you want to provide a list of all available solutions.
21
+
22
+ Please note that this is a large document. Only use it for the scenarios mentioned above.`
11
23
  },
12
24
  {
13
- url: 'https://dev.wix.com/docs/picasso/wix-ai-docs/index/wix-business-solutions-recipes'
25
+ url: 'https://dev.wix.com/docs/picasso/wix-ai-docs/index/wix-business-solutions-recipes',
26
+ action: 'include'
14
27
  }
15
28
  ];
16
- const DESCRIPTION = `**Tool Name:** WixREADME
17
- **Description for LLM:**
18
- "**Mandatory First Action for Wix Tasks.** This tool, 'WixREADME', MUST be executed at the very beginning of any process involving Wix functionalities. It provides the indispensable foundational Wix ecosystem context, global setup details, and current best practices.
29
+ const DESCRIPTION = `# Tool: WixREADME
30
+
31
+ **Directive:** \`WixREADME\` is the **MANDATORY FIRST STEP** for all Wix-related tasks. Its output (including relevant linked documents) provides foundational context for all other Wix tools. Adherence to this protocol is **NON-NEGOTIABLE**.
32
+
33
+ **Operational Protocol (Strictly Sequential):**
34
+
35
+ 1. **Execute \`WixREADME\`:**
36
+ * **Action:** Invoke \`WixREADME\`.
37
+ * **Constraint:** MUST complete successfully. NO other Wix tool before this.
38
+
39
+ 2. **Process \`WixREADME\` Output (Link Identification & Relevance Assessment):**
40
+ * **A. Identify Candidate Links:** Scan \`WixREADME\` output. Extract *only* URLs found within \`<urls>{urls}</urls>\` tags. Ignore all other URLs.
41
+ * **B. Assess Relevance:** For EACH candidate URL from (A), assess its relevance to the **current user's specific prompt/task**.
42
+ * **Outcome:** A list of *relevant* document URLs. If no links are found in \`<urls>\` tags or none are deemed relevant, note this and proceed to Step 4.
19
43
 
20
- **Operational Rule:** Your processing protocol for any Wix-related task dictates that 'WixREADME' is successfully invoked and its output comprehensively analyzed BEFORE any other Wix-specific tool (such as 'ReadFullDocsArticle' or 'SearchX..') is considered or used. This is a non-negotiable prerequisite.
44
+ 3. **Fetch Relevant Documents (via \`ReadFullDocsArticle\`):**
45
+ * **Condition:** ONLY if Step 2B identified one or more *relevant* URLs.
46
+ * **Action:** For EACH *relevant* URL, invoke \`ReadFullDocsArticle\` to fetch its full content.
47
+ * **Constraint:** All *relevant* documents MUST be fetched before Step 4.
21
48
 
22
- **Function:** Acts as the sole authoritative source for Wix global operational standards and session initialization. Its output is essential for the correct and safe execution of all subsequent Wix-related actions. All other Wix tools are designed to rely on the information it provides."
49
+ 4. **Proceed with Other Wix Tools:**
50
+ * **Condition:** ONLY after completing Steps 1, 2, and 3 (if Step 3 was applicable).
51
+ * **Action:** Use other Wix tools as needed, utilizing the full context from \`WixREADME\` and fetched relevant documents.
23
52
 
24
- **Next Steps:** After executing 'WixREADME', relevant information from the README may include links to other documents. You MUST use the 'ReadFullDocsArticle' tool to fetch the full content of these documents. This is a critical step to ensure you have all necessary information before proceeding with any other Wix tools.
25
- `;
26
- export const WixREADME_DEPENDENT_DESCRIPTION = `**Dependency:** Must be used after 'WixREADME' has successfully run.`;
53
+ **Summary of Critical Rules:**
54
+ * \`WixREADME\` is **ALWAYS FIRST**.
55
+ * Analyze \`WixREADME\` output: Extract links *only* from \`<urls>{urls}</urls>\` tags.
56
+ * Assess relevance of *each* extracted link against the user's current task.
57
+ * Fetch **ONLY RELEVANT** linked documents using \`ReadFullDocsArticle\` before any other Wix tool.
58
+ * **FAILURE TO FOLLOW THIS EXACT SEQUENCE WILL LEAD TO ERRORS.** Strict adherence is mandatory.`;
59
+ export const WixREADME_DEPENDENT_DESCRIPTION = "**Dependency:** Must be used after 'WixREADME' has successfully run.";
27
60
  export async function addGetToKnowTools(server) {
28
61
  server.tool('WixREADME', DESCRIPTION, async ({ httpClient }) => {
29
62
  try {
30
- const contents = await Promise.all(docURLs.map(async ({ url }) => {
31
- const content = await fetchArticleContent(httpClient, url, 'article');
32
- return content;
33
- }));
34
- return {
35
- content: contents.map((content) => ({
63
+ const contents = await Promise.all(docURLs.map(async ({ url, action, description, title }) => {
64
+ if (action === 'index') {
65
+ return {
66
+ type: 'text',
67
+ text: `## ${title}\n\n<urls>\n${url}\n</urls>\n\n${description}`
68
+ };
69
+ }
70
+ const content = await fetchArticleContent(httpClient, url, 'article', true);
71
+ return {
36
72
  type: 'text',
37
73
  text: content
38
- }))
74
+ };
75
+ }));
76
+ return {
77
+ content: contents
39
78
  };
40
79
  }
41
80
  catch (error) {
@@ -1 +1 @@
1
- {"version":3,"file":"get-to-know.js","sourceRoot":"","sources":["../../../src/docs/get-to-know.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAEzD,MAAM,OAAO,GAAG;IACd;QACE,GAAG,EAAE,qFAAqF;KAC3F;IACD;QACE,GAAG,EAAE,iEAAiE;KACvE;IACD;QACE,GAAG,EAAE,2EAA2E;KACjF;IACD;QACE,GAAG,EAAE,mFAAmF;KACzF;CACF,CAAC;AAEF,MAAM,WAAW,GAAG;;;;;;;;;CASnB,CAAC;AAEF,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AAC,CAAC;AACL,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"docs.d.ts","sourceRoot":"","sources":["../../../src/resources/docs.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAmDpE,eAAO,MAAM,gBAAgB,GAC3B,QAAQ,SAAS,EACjB,SAAS,MAAM,EAAE,kBAUlB,CAAC"}
1
+ {"version":3,"file":"docs.d.ts","sourceRoot":"","sources":["../../../src/resources/docs.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAkDpE,eAAO,MAAM,gBAAgB,GAC3B,QAAQ,SAAS,EACjB,SAAS,MAAM,EAAE,kBAUlB,CAAC"}
@@ -1,6 +1,7 @@
1
1
  import { logger } from '../infra/logger.js';
2
+ import { GET_ARTICLE_CONTENT_URL, PORTAL_INDEX_URL } from '../constants.js';
2
3
  const getPortalIndex = async (portalName) => {
3
- const response = await fetch(`https://dev.wix.com/digor/api/portal-index?portalName=${portalName}`);
4
+ const response = await fetch(`${PORTAL_INDEX_URL}?portalName=${portalName}`);
4
5
  const data = await response.json();
5
6
  return data;
6
7
  };
@@ -19,7 +20,7 @@ const addPortalResources = async (server, portalName) => {
19
20
  const docsURL = uri
20
21
  .toString()
21
22
  .replace('wix-docs://', 'https://dev.wix.com/docs/');
22
- const response = await fetch(`https://dev.wix.com/digor/api/get-article-content?articleUrl=${encodeURIComponent(docsURL)}`);
23
+ const response = await fetch(`${GET_ARTICLE_CONTENT_URL}?articleUrl=${encodeURIComponent(docsURL)}`);
23
24
  const data = await response.json();
24
25
  return {
25
26
  contents: [
@@ -1 +1 @@
1
- {"version":3,"file":"docs.js","sourceRoot":"","sources":["../../../src/resources/docs.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAE5C,MAAM,cAAc,GAAG,KAAK,EAAE,UAAkB,EAAE,EAAE;IAClD,MAAM,QAAQ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