@wix/mcp 1.0.31 → 1.0.32
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.
- package/build/bin-standalone.js +65 -19
- package/build/bin-standalone.js.map +3 -3
- package/build/cjs/index.cjs +350 -23
- package/build/cjs/index.cjs.map +4 -4
- package/build/dts/bin.js +3 -1
- package/build/dts/bin.js.map +1 -1
- package/build/dts/config/default-config.d.ts +1 -0
- package/build/dts/config/default-config.d.ts.map +1 -1
- package/build/dts/config/default-config.js +27 -4
- package/build/dts/config/default-config.js.map +1 -1
- package/build/dts/docs/docs.d.ts +2 -0
- package/build/dts/docs/docs.d.ts.map +1 -1
- package/build/dts/docs/docs.js +10 -2
- package/build/dts/docs/docs.js.map +1 -1
- package/build/dts/docs/get-to-know.d.ts +12 -1
- package/build/dts/docs/get-to-know.d.ts.map +1 -1
- package/build/dts/docs/get-to-know.js +20 -8
- package/build/dts/docs/get-to-know.js.map +1 -1
- package/build/dts/docs/get-to-know.test.d.ts +2 -0
- package/build/dts/docs/get-to-know.test.d.ts.map +1 -0
- package/build/dts/docs/get-to-know.test.js +89 -0
- package/build/dts/docs/get-to-know.test.js.map +1 -0
- package/build/dts/site-widget-tools/site-builder-tool/index.d.ts +4 -0
- package/build/dts/site-widget-tools/site-builder-tool/index.d.ts.map +1 -1
- package/build/dts/site-widget-tools/site-builder-tool/index.js +22 -1
- package/build/dts/site-widget-tools/site-builder-tool/index.js.map +1 -1
- package/build/dts/toolkit.d.ts +11 -2
- package/build/dts/toolkit.d.ts.map +1 -1
- package/build/dts/toolkit.js +15 -3
- package/build/dts/toolkit.js.map +1 -1
- package/build/esm/index.js +346 -19
- package/build/esm/index.js.map +4 -4
- package/package.json +3 -2
package/build/bin-standalone.js
CHANGED
|
@@ -3616,9 +3616,9 @@ var require_dist2 = __commonJS({
|
|
|
3616
3616
|
}
|
|
3617
3617
|
});
|
|
3618
3618
|
|
|
3619
|
-
// ../../node_modules
|
|
3619
|
+
// ../../node_modules/https-proxy-agent/dist/parse-proxy-response.js
|
|
3620
3620
|
var require_parse_proxy_response = __commonJS({
|
|
3621
|
-
"../../node_modules
|
|
3621
|
+
"../../node_modules/https-proxy-agent/dist/parse-proxy-response.js"(exports) {
|
|
3622
3622
|
"use strict";
|
|
3623
3623
|
var __importDefault2 = exports && exports.__importDefault || function(mod) {
|
|
3624
3624
|
return mod && mod.__esModule ? mod : { "default": mod };
|
|
@@ -3712,9 +3712,9 @@ var require_parse_proxy_response = __commonJS({
|
|
|
3712
3712
|
}
|
|
3713
3713
|
});
|
|
3714
3714
|
|
|
3715
|
-
// ../../node_modules
|
|
3715
|
+
// ../../node_modules/https-proxy-agent/dist/index.js
|
|
3716
3716
|
var require_dist3 = __commonJS({
|
|
3717
|
-
"../../node_modules
|
|
3717
|
+
"../../node_modules/https-proxy-agent/dist/index.js"(exports) {
|
|
3718
3718
|
"use strict";
|
|
3719
3719
|
var __createBinding2 = exports && exports.__createBinding || (Object.create ? (function(o, m, k, k2) {
|
|
3720
3720
|
if (k2 === void 0) k2 = k;
|
|
@@ -10742,6 +10742,8 @@ var SYSTEM_REMINDER = dedent_default`
|
|
|
10742
10742
|
</goal>
|
|
10743
10743
|
<guidelines>
|
|
10744
10744
|
if the WixREADME tool is available to you, YOU MUST USE IT AT THE BEGINNING OF ANY CONVERSATION and then continue with calling the other tools and calling the Wix APIs until the task is completed.
|
|
10745
|
+
**Exception:** If the user asks to create, build, or generate a new Wix site/website, skip WixREADME and call WixSiteBuilder directly if it is available.
|
|
10746
|
+
**Exception:** If the user asks to list, show, or find their Wix sites, skip WixREADME and call ListWixSites directly.
|
|
10745
10747
|
If the WixREADME tool is not available to you, you should use the other flows as described without using the WixREADME tool until the task is completed.
|
|
10746
10748
|
If the user prompt / task is an instruction to do something in Wix, You should not tell the user what Docs to read or what API to call, your task is to do the work and complete the task in minimal steps and time with minimal back and forth with the user, unless absolutely necessary.
|
|
10747
10749
|
</guidelines>
|
|
@@ -10784,6 +10786,7 @@ var defaultToolDescriptions = {
|
|
|
10784
10786
|
`,
|
|
10785
10787
|
CallWixSiteAPI: dedent_default`
|
|
10786
10788
|
Call Wix apis on a business or site. Use this to create, read, update, and delete data and other Wix entities in your Wix site.
|
|
10789
|
+
**Prefer using the "ListWixSites" tool when the user asks to list or show their sites.** Only use this tool for site listing if the user needs advanced filtering or specific site details beyond what ListWixSites provides.
|
|
10787
10790
|
For POST/PATCH/PUT requests, pass the request body as a JSON object in the "body" parameter with all the required fields and values as described in the API schema, code examples, or docs you retrieved (e.g. body: {"name": "value", "nested": {"key": "value"}}).
|
|
10788
10791
|
The API endpoint url param MUST ALWAYS be taken from the conversation context.
|
|
10789
10792
|
By conversation context we mean the endpoint url was given in the user prompt OR got into the conversation context by the "WixREADME" tool OR by the "SearchWixRESTDocumentation" tool OR by the "BrowseWixRESTDocsMenu" tool OR by the "ReadFullDocsArticle" tool.
|
|
@@ -10796,7 +10799,11 @@ var defaultToolDescriptions = {
|
|
|
10796
10799
|
${SYSTEM_REMINDER}
|
|
10797
10800
|
`,
|
|
10798
10801
|
ListWixSites: dedent_default`
|
|
10799
|
-
|
|
10802
|
+
**Use this tool whenever the user asks to list, show, get, or find their Wix sites.** This is the dedicated tool for listing Wix sites for the current user. By default it returns all sites, but you can filter by name.
|
|
10803
|
+
|
|
10804
|
+
**Do NOT use WixREADME before this tool.** When the user asks to list their sites, call this tool directly — no need to read documentation first.
|
|
10805
|
+
|
|
10806
|
+
**Prefer this tool over CallWixSiteAPI for listing sites.** Call this tool directly — it already knows the correct API and handles everything needed. Only fall back to CallWixSiteAPI if the user needs advanced filtering or specific site details beyond what this tool provides.
|
|
10800
10807
|
${SYSTEM_REMINDER}
|
|
10801
10808
|
`,
|
|
10802
10809
|
ManageWixSite: dedent_default`
|
|
@@ -10838,6 +10845,15 @@ var defaultToolDescriptions = {
|
|
|
10838
10845
|
- Site Properties: "https://dev.wix.com/docs/api-reference/business-management/site-properties"
|
|
10839
10846
|
${SYSTEM_REMINDER}
|
|
10840
10847
|
`,
|
|
10848
|
+
WixSiteBuilder: dedent_default`
|
|
10849
|
+
**PRIMARY tool for creating/building/generating a Wix site or website.** This is the preferred and recommended way to create a new Wix site. Use this tool whenever the user asks to build, create, or generate a site/website/application. Do NOT use CreateWixBusinessGuide for site creation — use this tool instead.
|
|
10850
|
+
|
|
10851
|
+
**Do NOT use WixREADME or SearchWixRESTDocumentation before this tool.** When the user asks to build, create, or generate a site, call this tool directly. It handles everything needed for site creation.
|
|
10852
|
+
|
|
10853
|
+
**IMPORTANT: You MUST call this tool to build the site.** Do NOT suggest HTML code, prompt templates, or alternative approaches instead of actually building the site. When a user asks to create a site, your job is to call this tool and build it — not to describe how to build it or suggest alternatives.
|
|
10854
|
+
|
|
10855
|
+
**IMPORTANT: The sitePrompt must be under 6000 characters.** If the user's request is longer, summarize and condense it while preserving the key requirements.
|
|
10856
|
+
`,
|
|
10841
10857
|
CreateWixBusinessGuide: dedent_default`
|
|
10842
10858
|
Provides comprehensive documentation for creating a new Wix Business (i.e site, app, etc.)
|
|
10843
10859
|
|
|
@@ -11133,7 +11149,12 @@ var defaultReadmeDocs = [
|
|
|
11133
11149
|
|
|
11134
11150
|
<flow-description>
|
|
11135
11151
|
Wix MCP Site Management Flows:
|
|
11136
|
-
|
|
11152
|
+
|
|
11153
|
+
Site Creation flow (highest priority for site creation requests):
|
|
11154
|
+
1. User asks to create, build, or generate a Wix site/website,
|
|
11155
|
+
2. Call the "WixSiteBuilder" tool directly with the user's prompt. Do NOT call WixREADME first.
|
|
11156
|
+
3. Do NOT suggest HTML code or alternative approaches — actually build the site.
|
|
11157
|
+
|
|
11137
11158
|
"Recipe" based flow (The most preferred flow):
|
|
11138
11159
|
1. User asks you to do something,
|
|
11139
11160
|
2. You use the "WixREADME" tool to get the context, it will return a list of "recipes" which are essentially Wix docs articles that describe how to do something in Wix.
|
|
@@ -11190,7 +11211,16 @@ var defaultReadmeDocs = [
|
|
|
11190
11211
|
];
|
|
11191
11212
|
|
|
11192
11213
|
// src/docs/get-to-know.ts
|
|
11193
|
-
|
|
11214
|
+
import { getDynamicContext } from "@wix/dynamic-context-enricher";
|
|
11215
|
+
async function addGetToKnowTools({
|
|
11216
|
+
server: server2,
|
|
11217
|
+
disableTools = [],
|
|
11218
|
+
toolDescriptions,
|
|
11219
|
+
readmeDocs,
|
|
11220
|
+
authStrategy,
|
|
11221
|
+
picassoPortalUrl,
|
|
11222
|
+
dynamicContextEnabled
|
|
11223
|
+
}) {
|
|
11194
11224
|
if (disableTools.includes("WixREADME")) {
|
|
11195
11225
|
return;
|
|
11196
11226
|
}
|
|
@@ -11201,6 +11231,7 @@ async function addGetToKnowTools(server2, disableTools = [], toolDescriptions, r
|
|
|
11201
11231
|
{},
|
|
11202
11232
|
{ readOnlyHint: true, destructiveHint: false, openWorldHint: false },
|
|
11203
11233
|
async (_, { httpClient }) => {
|
|
11234
|
+
const { siteId, siteName } = _;
|
|
11204
11235
|
const contents = await Promise.all(
|
|
11205
11236
|
docsToUse.map(
|
|
11206
11237
|
async ({
|
|
@@ -11297,12 +11328,23 @@ Failed to fetch content: ${errorMsg}`
|
|
|
11297
11328
|
}
|
|
11298
11329
|
)
|
|
11299
11330
|
);
|
|
11300
|
-
const
|
|
11301
|
-
|
|
11302
|
-
);
|
|
11303
|
-
const
|
|
11331
|
+
const filter = {};
|
|
11332
|
+
if (siteId) filter.siteId = siteId;
|
|
11333
|
+
if (siteName) filter.siteName = siteName;
|
|
11334
|
+
const dynamicContext = dynamicContextEnabled && authStrategy ? await getDynamicContext(
|
|
11335
|
+
authStrategy,
|
|
11336
|
+
httpClient,
|
|
11337
|
+
Object.keys(filter).length ? filter : void 0
|
|
11338
|
+
) : "";
|
|
11339
|
+
const parts = [
|
|
11340
|
+
...contents.filter(
|
|
11341
|
+
(item) => item !== null
|
|
11342
|
+
).map((item) => item.text),
|
|
11343
|
+
...dynamicContext ? [dynamicContext] : []
|
|
11344
|
+
];
|
|
11345
|
+
const text = parts.join("\n\n");
|
|
11304
11346
|
return {
|
|
11305
|
-
content: [{ type: "text", text
|
|
11347
|
+
content: [{ type: "text", text }]
|
|
11306
11348
|
};
|
|
11307
11349
|
}
|
|
11308
11350
|
);
|
|
@@ -11522,18 +11564,20 @@ var addDocsTools = (server2, allowedTools = [
|
|
|
11522
11564
|
toolDescriptions,
|
|
11523
11565
|
readmeDocs,
|
|
11524
11566
|
authStrategy,
|
|
11525
|
-
picassoPortalUrl
|
|
11567
|
+
picassoPortalUrl,
|
|
11568
|
+
dynamicContextEnabled
|
|
11526
11569
|
} = options;
|
|
11527
11570
|
const getDescription = (toolName, defaultDesc) => toolDescriptions?.[toolName] ?? defaultDesc;
|
|
11528
11571
|
if (getToKnowWixEnabled && !disableTools?.includes("WixREADME")) {
|
|
11529
|
-
addGetToKnowTools(
|
|
11530
|
-
server2,
|
|
11531
|
-
disableTools || [],
|
|
11572
|
+
addGetToKnowTools({
|
|
11573
|
+
server: server2,
|
|
11574
|
+
disableTools: disableTools || [],
|
|
11532
11575
|
toolDescriptions,
|
|
11533
11576
|
readmeDocs,
|
|
11534
11577
|
authStrategy,
|
|
11535
|
-
picassoPortalUrl
|
|
11536
|
-
|
|
11578
|
+
picassoPortalUrl,
|
|
11579
|
+
dynamicContextEnabled
|
|
11580
|
+
});
|
|
11537
11581
|
}
|
|
11538
11582
|
if (createWixBusinessGuideEnabled && !disableTools?.includes("CreateWixBusinessGuide")) {
|
|
11539
11583
|
addCreateWixBusinessGuideTools(
|
|
@@ -13238,11 +13282,13 @@ var hasGetToKnowWix = activeTools.includes("GET_TO_KNOW_WIX");
|
|
|
13238
13282
|
var hasCreateWixBusinessGuide = activeTools.includes(
|
|
13239
13283
|
"CREATE_WIX_BUSINESS_GUIDE"
|
|
13240
13284
|
);
|
|
13285
|
+
var hasDynamicContext = Boolean(parsedArgs["dynamicContext"]);
|
|
13241
13286
|
if (docsTools.length > 0 || hasGetToKnowWix || hasCreateWixBusinessGuide) {
|
|
13242
13287
|
logger.log("Adding docs tools:", docsTools);
|
|
13243
13288
|
addDocsTools(server, docsTools, {
|
|
13244
13289
|
getToKnowWixEnabled: hasGetToKnowWix,
|
|
13245
|
-
createWixBusinessGuideEnabled: hasCreateWixBusinessGuide
|
|
13290
|
+
createWixBusinessGuideEnabled: hasCreateWixBusinessGuide,
|
|
13291
|
+
dynamicContextEnabled: hasDynamicContext
|
|
13246
13292
|
});
|
|
13247
13293
|
}
|
|
13248
13294
|
if (activeTools.includes("VELO_README")) {
|