@wix/mcp 1.0.83 → 1.0.85
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 +10 -1
- package/build/cjs/index.cjs +645 -176
- package/build/cjs/toolkit.cjs +27 -8
- package/build/dts/code-mode/index.d.ts +7 -0
- package/build/dts/code-mode/index.js +14 -10
- package/build/dts/docs/get-to-know.js +17 -1
- package/build/dts/index.d.ts +1 -1
- package/build/dts/site-widget-tools/suggested-domain-tool/index.js +16 -5
- package/build/dts/toolkit-entry.d.cts +8 -0
- package/build/dts/toolkit-entry.d.ts +8 -0
- package/build/dts/toolkit.d.ts +3 -0
- package/build/dts/toolkit.js +3 -1
- package/build/dts/wixel/wixel-session-tools.d.ts +43 -0
- package/build/dts/wixel/wixel-session-tools.js +701 -198
- package/build/esm/index.js +645 -176
- package/build/esm/toolkit.js +27 -8
- package/package.json +2 -2
package/build/esm/toolkit.js
CHANGED
|
@@ -13916,7 +13916,16 @@ ${skillsContent}`
|
|
|
13916
13916
|
] : await Promise.all(
|
|
13917
13917
|
baseDocs.filter((doc) => doc.url === RECIPES_INDEX_URL).map(fetchDoc)
|
|
13918
13918
|
);
|
|
13919
|
-
const
|
|
13919
|
+
const recipeNotes = !skillsContent?.includes("Dashboard Navigation") ? [] : [
|
|
13920
|
+
await fetchDoc({
|
|
13921
|
+
action: "text",
|
|
13922
|
+
title: "Recipe Notes",
|
|
13923
|
+
content: dedent_default`
|
|
13924
|
+
- **Navigation recipes** (the *Dashboard Navigation* family) build direct manage.wix.com URLs. If your environment provides dedicated navigation tools, use those to perform the actual navigation — opening a recipe-built URL forces a full page refresh. Use the recipe URLs for composing a link to hand the user, or for navigating when no dedicated tool exists.
|
|
13925
|
+
`
|
|
13926
|
+
})
|
|
13927
|
+
];
|
|
13928
|
+
const contents = [...baseContents, ...recipesContents, ...recipeNotes];
|
|
13920
13929
|
const dynamicContext = await dynamicContextPromise;
|
|
13921
13930
|
const parts = [
|
|
13922
13931
|
...contents.filter(
|
|
@@ -16438,11 +16447,13 @@ function validateExecuteCode(code) {
|
|
|
16438
16447
|
}
|
|
16439
16448
|
|
|
16440
16449
|
// src/code-mode/index.ts
|
|
16450
|
+
var defaultCodeModeFetch = (url, init) => fetch(url, init);
|
|
16441
16451
|
var SEARCH_TOOL_NAME = "SearchWixAPISpec";
|
|
16442
16452
|
var EXECUTE_TOOL_NAME = "ExecuteWixAPI";
|
|
16443
16453
|
function addSearchCodeModeTool(server, options) {
|
|
16444
16454
|
const {
|
|
16445
16455
|
codeModeBaseUrl,
|
|
16456
|
+
codeModeFetch,
|
|
16446
16457
|
authStrategy,
|
|
16447
16458
|
disableTools = [],
|
|
16448
16459
|
toolDescriptions,
|
|
@@ -16457,12 +16468,14 @@ function addSearchCodeModeTool(server, options) {
|
|
|
16457
16468
|
codeModeBaseUrl,
|
|
16458
16469
|
description,
|
|
16459
16470
|
maxResponseSize,
|
|
16460
|
-
authStrategy
|
|
16471
|
+
authStrategy,
|
|
16472
|
+
codeModeFetch
|
|
16461
16473
|
);
|
|
16462
16474
|
}
|
|
16463
16475
|
function addExecuteCodeModeTool(server, options) {
|
|
16464
16476
|
const {
|
|
16465
16477
|
codeModeBaseUrl,
|
|
16478
|
+
codeModeFetch,
|
|
16466
16479
|
authStrategy,
|
|
16467
16480
|
visitor,
|
|
16468
16481
|
disableTools = [],
|
|
@@ -16474,6 +16487,7 @@ function addExecuteCodeModeTool(server, options) {
|
|
|
16474
16487
|
}
|
|
16475
16488
|
addExecuteTool(server, {
|
|
16476
16489
|
codeModeBaseUrl,
|
|
16490
|
+
codeModeFetch,
|
|
16477
16491
|
authStrategy,
|
|
16478
16492
|
visitor,
|
|
16479
16493
|
toolDescriptions,
|
|
@@ -16488,7 +16502,7 @@ async function resolveLoopbackAuthorization(authStrategy) {
|
|
|
16488
16502
|
return void 0;
|
|
16489
16503
|
}
|
|
16490
16504
|
}
|
|
16491
|
-
function registerSearchTool(server, codeModeBaseUrl, description, maxResponseSize, authStrategy) {
|
|
16505
|
+
function registerSearchTool(server, codeModeBaseUrl, description, maxResponseSize, authStrategy, codeModeFetch = defaultCodeModeFetch) {
|
|
16492
16506
|
const searchUrl = `${codeModeBaseUrl}/api/code-mode/search`;
|
|
16493
16507
|
server.tool(
|
|
16494
16508
|
SEARCH_TOOL_NAME,
|
|
@@ -16508,7 +16522,7 @@ function registerSearchTool(server, codeModeBaseUrl, description, maxResponseSiz
|
|
|
16508
16522
|
);
|
|
16509
16523
|
try {
|
|
16510
16524
|
const authorization3 = await resolveLoopbackAuthorization(authStrategy);
|
|
16511
|
-
const resp = await
|
|
16525
|
+
const resp = await codeModeFetch(searchUrl, {
|
|
16512
16526
|
method: "POST",
|
|
16513
16527
|
headers: {
|
|
16514
16528
|
"Content-Type": "application/json",
|
|
@@ -16559,8 +16573,8 @@ function registerSearchTool(server, codeModeBaseUrl, description, maxResponseSiz
|
|
|
16559
16573
|
}
|
|
16560
16574
|
);
|
|
16561
16575
|
}
|
|
16562
|
-
async function postExecute(executeUrl, body, authorization3) {
|
|
16563
|
-
const resp = await
|
|
16576
|
+
async function postExecute(executeUrl, body, authorization3, codeModeFetch = defaultCodeModeFetch) {
|
|
16577
|
+
const resp = await codeModeFetch(executeUrl, {
|
|
16564
16578
|
method: "POST",
|
|
16565
16579
|
headers: {
|
|
16566
16580
|
"Content-Type": "application/json",
|
|
@@ -16602,6 +16616,7 @@ function formatExecuteResult(data, maxResponseSize, reportBi) {
|
|
|
16602
16616
|
function addExecuteTool(server, options) {
|
|
16603
16617
|
const {
|
|
16604
16618
|
codeModeBaseUrl,
|
|
16619
|
+
codeModeFetch,
|
|
16605
16620
|
authStrategy,
|
|
16606
16621
|
visitor,
|
|
16607
16622
|
toolDescriptions,
|
|
@@ -16690,7 +16705,8 @@ function addExecuteTool(server, options) {
|
|
|
16690
16705
|
accountId: accountHeaders?.["wix-account-id"],
|
|
16691
16706
|
siteAuthContext
|
|
16692
16707
|
},
|
|
16693
|
-
visitor ? visitorToken : accountHeaders?.Authorization ?? siteHeaders?.Authorization
|
|
16708
|
+
visitor ? visitorToken : accountHeaders?.Authorization ?? siteHeaders?.Authorization,
|
|
16709
|
+
codeModeFetch
|
|
16694
16710
|
);
|
|
16695
16711
|
if (data.authErrorStatus && visitor) {
|
|
16696
16712
|
return executeErrorResult(
|
|
@@ -18704,7 +18720,8 @@ function createWixToolkit(options) {
|
|
|
18704
18720
|
toolDescriptions,
|
|
18705
18721
|
toolHints,
|
|
18706
18722
|
maxResponseSize,
|
|
18707
|
-
codeModeBaseUrl = "https://mcp.wix.com"
|
|
18723
|
+
codeModeBaseUrl = "https://mcp.wix.com",
|
|
18724
|
+
codeModeFetch
|
|
18708
18725
|
} = api;
|
|
18709
18726
|
const effectiveToolDescriptions = {
|
|
18710
18727
|
...descriptionsWithoutReadme,
|
|
@@ -18728,6 +18745,7 @@ function createWixToolkit(options) {
|
|
|
18728
18745
|
if (requestedTools.has("SearchWixAPISpec") && !disableTools?.includes("SearchWixAPISpec")) {
|
|
18729
18746
|
addSearchCodeModeTool(server, {
|
|
18730
18747
|
codeModeBaseUrl,
|
|
18748
|
+
codeModeFetch,
|
|
18731
18749
|
authStrategy,
|
|
18732
18750
|
disableTools,
|
|
18733
18751
|
toolDescriptions: effectiveToolDescriptions,
|
|
@@ -18737,6 +18755,7 @@ function createWixToolkit(options) {
|
|
|
18737
18755
|
if (requestedTools.has("ExecuteWixAPI") && !disableTools?.includes("ExecuteWixAPI")) {
|
|
18738
18756
|
addExecuteCodeModeTool(server, {
|
|
18739
18757
|
codeModeBaseUrl,
|
|
18758
|
+
codeModeFetch,
|
|
18740
18759
|
authStrategy,
|
|
18741
18760
|
disableTools,
|
|
18742
18761
|
toolDescriptions: effectiveToolDescriptions,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wix/mcp",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.85",
|
|
4
4
|
"description": "A Model Context Protocol server for Wix AI tools",
|
|
5
5
|
"bin": "./build/bin-standalone.js",
|
|
6
6
|
"dependencies": {
|
|
@@ -133,5 +133,5 @@
|
|
|
133
133
|
]
|
|
134
134
|
}
|
|
135
135
|
},
|
|
136
|
-
"falconPackageHash": "
|
|
136
|
+
"falconPackageHash": "fa4f66edf0696bfeabc3430c4fc334d1b036704c758c5d5c65aa2b60"
|
|
137
137
|
}
|