@wix/mcp 1.0.79 → 1.0.80
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 +22 -8
- package/build/cjs/index.cjs +362 -101
- package/build/cjs/toolkit.cjs +31 -14
- package/build/dts/account-tools/get-profile-tool.d.ts +5 -0
- package/build/dts/account-tools/get-profile-tool.js +49 -0
- package/build/dts/config/default-config.d.ts +2 -2
- package/build/dts/config/default-config.js +11 -7
- package/build/dts/index.d.ts +1 -0
- package/build/dts/index.js +1 -0
- package/build/dts/toolkit-entry.d.cts +2 -0
- package/build/dts/toolkit-entry.d.ts +2 -0
- package/build/dts/toolkit.d.ts +2 -0
- package/build/dts/toolkit.js +14 -20
- package/build/esm/index.js +277 -43
- package/build/esm/toolkit.js +31 -14
- package/package.json +3 -2
package/build/esm/index.js
CHANGED
|
@@ -11069,17 +11069,6 @@ var require_axios6 = __commonJS({
|
|
|
11069
11069
|
}
|
|
11070
11070
|
});
|
|
11071
11071
|
|
|
11072
|
-
// ../../node_modules/@wix/metro-runtime/es/build/serializer/domain.js
|
|
11073
|
-
var ConverterType;
|
|
11074
|
-
var init_domain = __esm({
|
|
11075
|
-
"../../node_modules/@wix/metro-runtime/es/build/serializer/domain.js"() {
|
|
11076
|
-
(function(ConverterType2) {
|
|
11077
|
-
ConverterType2[ConverterType2["TO_JSON"] = 0] = "TO_JSON";
|
|
11078
|
-
ConverterType2[ConverterType2["FROM_JSON"] = 1] = "FROM_JSON";
|
|
11079
|
-
})(ConverterType = ConverterType || (ConverterType = {}));
|
|
11080
|
-
}
|
|
11081
|
-
});
|
|
11082
|
-
|
|
11083
11072
|
// ../../node_modules/@wix/metro-runtime/es/build/serialization/utils.js
|
|
11084
11073
|
function parseLeanSchemaRef(renderedSchemaName = "") {
|
|
11085
11074
|
const [typeOrName, schemaName] = getSchemaNameAndType(renderedSchemaName);
|
|
@@ -11147,24 +11136,27 @@ function resolveDomain(host) {
|
|
|
11147
11136
|
return resolvedHost.replace(REGEX_CAPTURE_DOMAINS, "._base_domain_").replace(REGEX_CAPTURE_API_DOMAINS, "._api_base_domain_").replace(REGEX_CAPTURE_DEV_WIX_CODE_DOMAIN, "*.dev.wix-code.com");
|
|
11148
11137
|
}
|
|
11149
11138
|
function fixHostExceptions(host) {
|
|
11150
|
-
return host
|
|
11139
|
+
return HOST_ALIASES[host] ?? host;
|
|
11151
11140
|
}
|
|
11152
11141
|
function resolveMappingsByDomain(domain, domainToMappings) {
|
|
11153
11142
|
const mappings = domainToMappings[domain];
|
|
11154
11143
|
if (mappings) {
|
|
11155
11144
|
return mappings;
|
|
11156
11145
|
}
|
|
11157
|
-
const
|
|
11158
|
-
if (!
|
|
11146
|
+
const matchedMappings = resolveRootDomain(domain, domainToMappings) ?? resolveWildcardDomain(domain, domainToMappings);
|
|
11147
|
+
if (!matchedMappings) {
|
|
11148
|
+
if (isBaseDomain(domain)) {
|
|
11149
|
+
const wwwMappings = domainToMappings[WWW_BASE_DOMAIN];
|
|
11150
|
+
if (wwwMappings) {
|
|
11151
|
+
return wwwMappings;
|
|
11152
|
+
}
|
|
11153
|
+
}
|
|
11159
11154
|
const userMappings = domainToMappings[USER_DOMAIN];
|
|
11160
11155
|
if (userMappings) {
|
|
11161
11156
|
return userMappings;
|
|
11162
11157
|
}
|
|
11163
|
-
if (isBaseDomain(domain)) {
|
|
11164
|
-
return domainToMappings[wwwBaseDomain];
|
|
11165
|
-
}
|
|
11166
11158
|
}
|
|
11167
|
-
return
|
|
11159
|
+
return matchedMappings ?? [];
|
|
11168
11160
|
}
|
|
11169
11161
|
function resolveRootDomain(domain, domainToMappings) {
|
|
11170
11162
|
return Object.entries(domainToMappings).find(([entryDomain]) => {
|
|
@@ -11172,6 +11164,22 @@ function resolveRootDomain(domain, domainToMappings) {
|
|
|
11172
11164
|
return rooDomainSegments.join(".") === entryDomain;
|
|
11173
11165
|
})?.[1];
|
|
11174
11166
|
}
|
|
11167
|
+
function resolveWildcardDomain(domain, domainToMappings) {
|
|
11168
|
+
const matchingEntries = Object.entries(domainToMappings).filter(([entryDomain]) => matchesWildcardDomain(domain, entryDomain));
|
|
11169
|
+
const [mostSpecificEntry] = matchingEntries.sort(([entryDomainA], [entryDomainB]) => entryDomainB.length - entryDomainA.length);
|
|
11170
|
+
if (!mostSpecificEntry) {
|
|
11171
|
+
return void 0;
|
|
11172
|
+
}
|
|
11173
|
+
const [, mappings] = mostSpecificEntry;
|
|
11174
|
+
return mappings;
|
|
11175
|
+
}
|
|
11176
|
+
function matchesWildcardDomain(domain, entryDomain) {
|
|
11177
|
+
if (!entryDomain.startsWith(WILDCARD_PREFIX)) {
|
|
11178
|
+
return false;
|
|
11179
|
+
}
|
|
11180
|
+
const suffix = entryDomain.slice(WILDCARD_PREFIX.length - 1);
|
|
11181
|
+
return domain.length > suffix.length && domain.endsWith(suffix);
|
|
11182
|
+
}
|
|
11175
11183
|
function resolvePath(protoPath, mappings) {
|
|
11176
11184
|
const mapping = mappings?.find((m2) => protoPath.startsWith(m2.destPath));
|
|
11177
11185
|
if (!mapping) {
|
|
@@ -11182,19 +11190,30 @@ function resolvePath(protoPath, mappings) {
|
|
|
11182
11190
|
function isBaseDomain(domain) {
|
|
11183
11191
|
return !!domain.match(/\._base_domain_$/);
|
|
11184
11192
|
}
|
|
11185
|
-
var USER_DOMAIN, DOMAINS, WIX_API_DOMAINS, DEV_WIX_CODE_DOMAIN, REGEX_CAPTURE_PROTO_FIELD, REGEX_CAPTURE_DOMAINS, REGEX_CAPTURE_API_DOMAINS, REGEX_CAPTURE_DEV_WIX_CODE_DOMAIN
|
|
11193
|
+
var USER_DOMAIN, WWW_BASE_DOMAIN, WILDCARD_PREFIX, DOMAINS, WIX_API_DOMAINS, DEV_WIX_CODE_DOMAIN, HOST_ALIASES, REGEX_CAPTURE_PROTO_FIELD, REGEX_CAPTURE_DOMAINS, REGEX_CAPTURE_API_DOMAINS, REGEX_CAPTURE_DEV_WIX_CODE_DOMAIN;
|
|
11186
11194
|
var init_url_resolver = __esm({
|
|
11187
11195
|
"../../node_modules/@wix/metro-runtime/es/build/url-resolver.js"() {
|
|
11188
11196
|
init_utils2();
|
|
11189
11197
|
USER_DOMAIN = "_";
|
|
11198
|
+
WWW_BASE_DOMAIN = "www._base_domain_";
|
|
11199
|
+
WILDCARD_PREFIX = "*.";
|
|
11190
11200
|
DOMAINS = ["wix.com", "editorx.com"];
|
|
11191
|
-
WIX_API_DOMAINS = [
|
|
11201
|
+
WIX_API_DOMAINS = [
|
|
11202
|
+
"42.wixprod.net",
|
|
11203
|
+
"uw2-edt-1.wixprod.net",
|
|
11204
|
+
"virginia-edt.wixprod.net"
|
|
11205
|
+
];
|
|
11192
11206
|
DEV_WIX_CODE_DOMAIN = "dev.wix-code.com";
|
|
11207
|
+
HOST_ALIASES = {
|
|
11208
|
+
// payments.base44.com runs customised Business Manager, which needs to work exactly the same as normal BM on manage.wix.com
|
|
11209
|
+
"payments.base44.com": "manage.wix.com",
|
|
11210
|
+
// https://system-kb.wixanswers.com/kb/en/article/editorx-domains-matching-to-wixcom
|
|
11211
|
+
"create.editorx.com": "editor.editorx.com"
|
|
11212
|
+
};
|
|
11193
11213
|
REGEX_CAPTURE_PROTO_FIELD = /{(.*)}/;
|
|
11194
11214
|
REGEX_CAPTURE_DOMAINS = new RegExp(`\\.(${DOMAINS.join("|")})$`);
|
|
11195
11215
|
REGEX_CAPTURE_API_DOMAINS = new RegExp(`\\.(${WIX_API_DOMAINS.join("|")})$`);
|
|
11196
11216
|
REGEX_CAPTURE_DEV_WIX_CODE_DOMAIN = new RegExp(`.*\\.${DEV_WIX_CODE_DOMAIN}$`);
|
|
11197
|
-
wwwBaseDomain = "www._base_domain_";
|
|
11198
11217
|
}
|
|
11199
11218
|
});
|
|
11200
11219
|
|
|
@@ -11303,6 +11322,17 @@ var init_build = __esm({
|
|
|
11303
11322
|
}
|
|
11304
11323
|
});
|
|
11305
11324
|
|
|
11325
|
+
// ../../node_modules/@wix/metro-runtime/es/build/serializer/domain.js
|
|
11326
|
+
var ConverterType;
|
|
11327
|
+
var init_domain = __esm({
|
|
11328
|
+
"../../node_modules/@wix/metro-runtime/es/build/serializer/domain.js"() {
|
|
11329
|
+
(function(ConverterType2) {
|
|
11330
|
+
ConverterType2[ConverterType2["TO_JSON"] = 0] = "TO_JSON";
|
|
11331
|
+
ConverterType2[ConverterType2["FROM_JSON"] = 1] = "FROM_JSON";
|
|
11332
|
+
})(ConverterType || (ConverterType = {}));
|
|
11333
|
+
}
|
|
11334
|
+
});
|
|
11335
|
+
|
|
11306
11336
|
// ../../node_modules/@wix/metro-runtime/es/build/serializer/serializer.js
|
|
11307
11337
|
function schemaSerializer(rootSchema, depSchemas = {}, converterSets) {
|
|
11308
11338
|
return function serialize(json = {}, converterType) {
|
|
@@ -30816,7 +30846,7 @@ var DISCOVERY_FLOWS = [
|
|
|
30816
30846
|
"- METHOD CODE EXAMPLE BASED: BrowseWixRESTDocsMenu() or SearchWixRESTDocumentation() -> find relevant method -> read method article using ReadFullDocsArticle() to get method code examples -> call API using CallWixSiteAPI() based on the method code examples",
|
|
30817
30847
|
"- FULL SCHEMA BASED: BrowseWixRESTDocsMenu() or SearchWixRESTDocumentation() -> find relevant method -> read method article using ReadFullDocsArticle() -> no method code examples found -> inspect the method schema using SearchWixAPISpec or ReadFullDocsMethodSchema -> call API using CallWixSiteAPI() based on the schema"
|
|
30818
30848
|
];
|
|
30819
|
-
function buildSystemReminderGuidelines(includeReadme) {
|
|
30849
|
+
function buildSystemReminderGuidelines(includeReadme, includeImageUploadGuidance) {
|
|
30820
30850
|
const exception = includeReadme ? "**Exception:** " : "";
|
|
30821
30851
|
const lines = [];
|
|
30822
30852
|
if (includeReadme) {
|
|
@@ -30828,9 +30858,13 @@ function buildSystemReminderGuidelines(includeReadme) {
|
|
|
30828
30858
|
);
|
|
30829
30859
|
}
|
|
30830
30860
|
lines.push(
|
|
30831
|
-
`${exception}If the user asks to list, show, or find their Wix sites, ${includeReadme ? "skip WixREADME and " : ""}call ListWixSites directly
|
|
30832
|
-
`${exception}If the user wants to upload local or attached image files to a Wix site, skip ${includeReadme ? "WixREADME and " : ""}all docs/schema/API flows \u2014 call UploadImageToWixSite directly. Do NOT use ExecuteWixAPI, SearchWixAPISpec, or any Media Manager REST API for image uploads.`
|
|
30861
|
+
`${exception}If the user asks to list, show, or find their Wix sites, ${includeReadme ? "skip WixREADME and " : ""}call ListWixSites directly.`
|
|
30833
30862
|
);
|
|
30863
|
+
if (includeImageUploadGuidance) {
|
|
30864
|
+
lines.push(
|
|
30865
|
+
`${exception}If the user wants to upload local or attached image files to a Wix site, skip ${includeReadme ? "WixREADME and " : ""}all docs/schema/API flows \u2014 call UploadImageToWixSite directly. Do NOT use ExecuteWixAPI, SearchWixAPISpec, or any Media Manager REST API for image uploads.`
|
|
30866
|
+
);
|
|
30867
|
+
}
|
|
30834
30868
|
if (includeReadme) {
|
|
30835
30869
|
lines.push(
|
|
30836
30870
|
"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."
|
|
@@ -30857,9 +30891,15 @@ function buildSystemReminderFlows(includeReadme) {
|
|
|
30857
30891
|
lines.push(...DISCOVERY_FLOWS);
|
|
30858
30892
|
return lines.join("\n");
|
|
30859
30893
|
}
|
|
30860
|
-
var SYSTEM_REMINDER_GUIDELINES = buildSystemReminderGuidelines(
|
|
30861
|
-
|
|
30862
|
-
|
|
30894
|
+
var SYSTEM_REMINDER_GUIDELINES = buildSystemReminderGuidelines(
|
|
30895
|
+
true,
|
|
30896
|
+
true
|
|
30897
|
+
);
|
|
30898
|
+
function buildSystemReminder(includeReadme, includeImageUploadGuidance = true) {
|
|
30899
|
+
const guidelines = buildSystemReminderGuidelines(
|
|
30900
|
+
includeReadme,
|
|
30901
|
+
includeImageUploadGuidance
|
|
30902
|
+
);
|
|
30863
30903
|
const flows = buildSystemReminderFlows(includeReadme);
|
|
30864
30904
|
return dedent_default`
|
|
30865
30905
|
<agent-mandatory-instructions>
|
|
@@ -31070,8 +31110,11 @@ var executeWixApiDescription = dedent_default`
|
|
|
31070
31110
|
|
|
31071
31111
|
${EXECUTE_WIX_API_MULTI_SITE_EXAMPLE}
|
|
31072
31112
|
`;
|
|
31073
|
-
function buildToolDescriptions(includeReadme) {
|
|
31074
|
-
const reminder = buildSystemReminder(
|
|
31113
|
+
function buildToolDescriptions(includeReadme, includeImageUploadGuidance = true) {
|
|
31114
|
+
const reminder = buildSystemReminder(
|
|
31115
|
+
includeReadme,
|
|
31116
|
+
includeImageUploadGuidance
|
|
31117
|
+
);
|
|
31075
31118
|
return {
|
|
31076
31119
|
WixREADME: dedent_default`
|
|
31077
31120
|
# Tool: WixREADME
|
|
@@ -31122,6 +31165,7 @@ function buildToolDescriptions(includeReadme) {
|
|
|
31122
31165
|
**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.
|
|
31123
31166
|
${reminder}
|
|
31124
31167
|
`,
|
|
31168
|
+
get_profile: "Returns the authenticated user's email address",
|
|
31125
31169
|
GetSiteContext: dedent_default`
|
|
31126
31170
|
Fetches deep context for a specific Wix site and returns it as structured markdown.
|
|
31127
31171
|
|
|
@@ -34346,6 +34390,192 @@ request id: ${requestId}` : message;
|
|
|
34346
34390
|
);
|
|
34347
34391
|
}
|
|
34348
34392
|
|
|
34393
|
+
// ../../node_modules/@wix/ambassador-identity-account-v1-user/es/build/http.impl.js
|
|
34394
|
+
init_build();
|
|
34395
|
+
init_ambassador_index();
|
|
34396
|
+
init_build();
|
|
34397
|
+
var _getTeamMemberRequest = {};
|
|
34398
|
+
var _getTeamMemberResponse = { user: "_user" };
|
|
34399
|
+
var _user = { joinedAt: "google.protobuf.Timestamp" };
|
|
34400
|
+
function resolveComWixpressAccountApiTeamServiceUrl(opts) {
|
|
34401
|
+
const domainToMappings = {
|
|
34402
|
+
"api._api_base_domain_": [
|
|
34403
|
+
{
|
|
34404
|
+
srcPath: "/account-server",
|
|
34405
|
+
destPath: ""
|
|
34406
|
+
}
|
|
34407
|
+
],
|
|
34408
|
+
"www._base_domain_": [
|
|
34409
|
+
{
|
|
34410
|
+
srcPath: "/_api/account-server",
|
|
34411
|
+
destPath: ""
|
|
34412
|
+
}
|
|
34413
|
+
],
|
|
34414
|
+
"manage._base_domain_": [
|
|
34415
|
+
{
|
|
34416
|
+
srcPath: "/_api/account-server",
|
|
34417
|
+
destPath: ""
|
|
34418
|
+
},
|
|
34419
|
+
{
|
|
34420
|
+
srcPath: "/account-server",
|
|
34421
|
+
destPath: ""
|
|
34422
|
+
}
|
|
34423
|
+
],
|
|
34424
|
+
"premium._base_domain_": [
|
|
34425
|
+
{
|
|
34426
|
+
srcPath: "/_api/account-server",
|
|
34427
|
+
destPath: ""
|
|
34428
|
+
}
|
|
34429
|
+
],
|
|
34430
|
+
"editor._base_domain_": [
|
|
34431
|
+
{
|
|
34432
|
+
srcPath: "/_api/account-server",
|
|
34433
|
+
destPath: ""
|
|
34434
|
+
}
|
|
34435
|
+
],
|
|
34436
|
+
"blocks._base_domain_": [
|
|
34437
|
+
{
|
|
34438
|
+
srcPath: "/_api/account-server",
|
|
34439
|
+
destPath: ""
|
|
34440
|
+
}
|
|
34441
|
+
],
|
|
34442
|
+
"create.editorx": [
|
|
34443
|
+
{
|
|
34444
|
+
srcPath: "/_api/account-server",
|
|
34445
|
+
destPath: ""
|
|
34446
|
+
}
|
|
34447
|
+
],
|
|
34448
|
+
"bo._base_domain_": [
|
|
34449
|
+
{
|
|
34450
|
+
srcPath: "/account-server",
|
|
34451
|
+
destPath: ""
|
|
34452
|
+
}
|
|
34453
|
+
],
|
|
34454
|
+
"wixbo.ai": [
|
|
34455
|
+
{
|
|
34456
|
+
srcPath: "/account-server",
|
|
34457
|
+
destPath: ""
|
|
34458
|
+
}
|
|
34459
|
+
],
|
|
34460
|
+
"wix-bo.com": [
|
|
34461
|
+
{
|
|
34462
|
+
srcPath: "/account-server",
|
|
34463
|
+
destPath: ""
|
|
34464
|
+
}
|
|
34465
|
+
],
|
|
34466
|
+
"www.wixapis.com": [
|
|
34467
|
+
{
|
|
34468
|
+
srcPath: "/accounts",
|
|
34469
|
+
destPath: ""
|
|
34470
|
+
},
|
|
34471
|
+
{
|
|
34472
|
+
srcPath: "/accounts/v1/accounts",
|
|
34473
|
+
destPath: "/v1/accounts"
|
|
34474
|
+
},
|
|
34475
|
+
{
|
|
34476
|
+
srcPath: "/accounts/v1/account",
|
|
34477
|
+
destPath: "/v1/account"
|
|
34478
|
+
}
|
|
34479
|
+
],
|
|
34480
|
+
"users._base_domain_": [
|
|
34481
|
+
{
|
|
34482
|
+
srcPath: "/_api/account-server",
|
|
34483
|
+
destPath: ""
|
|
34484
|
+
}
|
|
34485
|
+
],
|
|
34486
|
+
"*.dev.wix-code.com": [
|
|
34487
|
+
{
|
|
34488
|
+
srcPath: "/_api/account-server",
|
|
34489
|
+
destPath: ""
|
|
34490
|
+
}
|
|
34491
|
+
],
|
|
34492
|
+
"twins._base_domain_": [
|
|
34493
|
+
{
|
|
34494
|
+
srcPath: "/_api/account-server",
|
|
34495
|
+
destPath: ""
|
|
34496
|
+
}
|
|
34497
|
+
]
|
|
34498
|
+
};
|
|
34499
|
+
return resolveUrl(Object.assign(opts, { domainToMappings }));
|
|
34500
|
+
}
|
|
34501
|
+
function getTeamMember(payload) {
|
|
34502
|
+
const { toJSON: toReq, fromJSON: fromReq } = serializer(_getTeamMemberRequest, {});
|
|
34503
|
+
const { fromJSON: fromRes } = serializer(_getTeamMemberResponse, { _user });
|
|
34504
|
+
function __getTeamMember({ host }) {
|
|
34505
|
+
const serializedData = toReq(payload);
|
|
34506
|
+
const metadata = {
|
|
34507
|
+
entityFqdn: "wix.identity.account.v1.user",
|
|
34508
|
+
method: "GET",
|
|
34509
|
+
methodFqn: "com.wixpress.account.api.TeamService.getTeamMember",
|
|
34510
|
+
migrationOptions: {
|
|
34511
|
+
optInTransformResponse: true
|
|
34512
|
+
},
|
|
34513
|
+
url: resolveComWixpressAccountApiTeamServiceUrl({
|
|
34514
|
+
protoPath: "/v1/team/members",
|
|
34515
|
+
data: serializedData,
|
|
34516
|
+
host
|
|
34517
|
+
}),
|
|
34518
|
+
params: toURLSearchParams(serializedData),
|
|
34519
|
+
transformResponse: fromRes
|
|
34520
|
+
};
|
|
34521
|
+
return metadata;
|
|
34522
|
+
}
|
|
34523
|
+
__getTeamMember.fromReq = fromReq;
|
|
34524
|
+
__getTeamMember.__isAmbassador = true;
|
|
34525
|
+
return __getTeamMember;
|
|
34526
|
+
}
|
|
34527
|
+
|
|
34528
|
+
// src/account-tools/get-profile-tool.ts
|
|
34529
|
+
var WIX_APIS_BASE_URL = "https://www.wixapis.com";
|
|
34530
|
+
var GET_PROFILE_TOOL_NAME = "get_profile";
|
|
34531
|
+
function addGetProfileTool(server, authStrategy, disableTools = [], toolDescriptions, toolHints) {
|
|
34532
|
+
if (disableTools.includes(GET_PROFILE_TOOL_NAME)) {
|
|
34533
|
+
return;
|
|
34534
|
+
}
|
|
34535
|
+
const cache = {};
|
|
34536
|
+
const hints = toolHints?.[GET_PROFILE_TOOL_NAME];
|
|
34537
|
+
server.tool(
|
|
34538
|
+
GET_PROFILE_TOOL_NAME,
|
|
34539
|
+
toolDescriptions?.[GET_PROFILE_TOOL_NAME] ?? defaultToolDescriptions[GET_PROFILE_TOOL_NAME],
|
|
34540
|
+
{},
|
|
34541
|
+
{
|
|
34542
|
+
readOnlyHint: hints?.readOnlyHint ?? true,
|
|
34543
|
+
destructiveHint: hints?.destructiveHint ?? false,
|
|
34544
|
+
openWorldHint: hints?.openWorldHint ?? false
|
|
34545
|
+
},
|
|
34546
|
+
async () => {
|
|
34547
|
+
const profilePromise = cache.profilePromise ??= (async () => {
|
|
34548
|
+
const accountAuthHeaders = await authStrategy.getAccountAuthHeaders();
|
|
34549
|
+
const httpClient6 = createHttpClient2({
|
|
34550
|
+
baseURL: WIX_APIS_BASE_URL,
|
|
34551
|
+
headers: accountAuthHeaders
|
|
34552
|
+
});
|
|
34553
|
+
const response = await httpClient6.request(getTeamMember({}));
|
|
34554
|
+
const email2 = response.data.user?.email;
|
|
34555
|
+
if (!email2) {
|
|
34556
|
+
throw new Error("The current Wix user profile has no email address.");
|
|
34557
|
+
}
|
|
34558
|
+
return { email: email2 };
|
|
34559
|
+
})();
|
|
34560
|
+
const profile = await profilePromise.catch(async (error2) => {
|
|
34561
|
+
cache.profilePromise = void 0;
|
|
34562
|
+
rethrowIfUnauthorized(error2);
|
|
34563
|
+
await authStrategy.enforceValidWixToken?.(error2);
|
|
34564
|
+
throw error2;
|
|
34565
|
+
});
|
|
34566
|
+
return {
|
|
34567
|
+
content: [
|
|
34568
|
+
{
|
|
34569
|
+
type: "text",
|
|
34570
|
+
text: profile.email
|
|
34571
|
+
}
|
|
34572
|
+
],
|
|
34573
|
+
structuredContent: profile
|
|
34574
|
+
};
|
|
34575
|
+
}
|
|
34576
|
+
);
|
|
34577
|
+
}
|
|
34578
|
+
|
|
34349
34579
|
// ../../node_modules/@wix/bi-logger-wix-code-data/dist/esm/v2/index.js
|
|
34350
34580
|
function siteCreatedUsingWixMcpSrc39Evid1608(params) {
|
|
34351
34581
|
return { evid: 1608, src: 39, endpoint: "", params };
|
|
@@ -34589,7 +34819,7 @@ function listPublishedSiteUrls(payload) {
|
|
|
34589
34819
|
}
|
|
34590
34820
|
|
|
34591
34821
|
// src/site-widget-tools/utils.ts
|
|
34592
|
-
var
|
|
34822
|
+
var WIX_APIS_BASE_URL2 = "https://www.wixapis.com";
|
|
34593
34823
|
async function publishSite2({
|
|
34594
34824
|
siteAuthorization,
|
|
34595
34825
|
siteId,
|
|
@@ -34599,7 +34829,7 @@ async function publishSite2({
|
|
|
34599
34829
|
Authorization: `Bearer ${siteAuthorization}`,
|
|
34600
34830
|
"wix-site-id": siteId
|
|
34601
34831
|
};
|
|
34602
|
-
const httpClient6 = createHttpClient2({ baseURL:
|
|
34832
|
+
const httpClient6 = createHttpClient2({ baseURL: WIX_APIS_BASE_URL2, headers });
|
|
34603
34833
|
const response = await httpClient6.request(publishSite({}));
|
|
34604
34834
|
if (response.status !== 200) {
|
|
34605
34835
|
console.error(`[publishSite] Failed to publish site for job ${jobId}`, {
|
|
@@ -41496,10 +41726,10 @@ async function buildHarmonySite({
|
|
|
41496
41726
|
}
|
|
41497
41727
|
|
|
41498
41728
|
// src/site-widget-tools/suggested-domain-tool/index.ts
|
|
41499
|
-
var
|
|
41729
|
+
var WIX_APIS_BASE_URL3 = "https://www.wixapis.com";
|
|
41500
41730
|
async function fetchSiteDisplayName(siteAuthorization, siteId) {
|
|
41501
41731
|
const response = await fetch(
|
|
41502
|
-
`${
|
|
41732
|
+
`${WIX_APIS_BASE_URL3}/site-properties/v4/properties`,
|
|
41503
41733
|
{
|
|
41504
41734
|
headers: {
|
|
41505
41735
|
Authorization: siteAuthorization,
|
|
@@ -41623,7 +41853,7 @@ function addSuggestedDomainTool(server, authStrategy) {
|
|
|
41623
41853
|
}
|
|
41624
41854
|
}
|
|
41625
41855
|
const response = await fetch(
|
|
41626
|
-
`${
|
|
41856
|
+
`${WIX_APIS_BASE_URL3}/domain-search/v2/suggest-domains?${params}`,
|
|
41627
41857
|
{
|
|
41628
41858
|
method: "GET",
|
|
41629
41859
|
headers: {
|
|
@@ -42564,7 +42794,7 @@ function getEditorUrls(payload) {
|
|
|
42564
42794
|
}
|
|
42565
42795
|
|
|
42566
42796
|
// src/site-widget-tools/create-site-from-template-tool/index.ts
|
|
42567
|
-
var
|
|
42797
|
+
var WIX_APIS_BASE_URL4 = "https://www.wixapis.com";
|
|
42568
42798
|
var CREATE_SITE_FROM_TEMPLATE_WIDGET_URI = "ui://widget/create-site-from-template.html";
|
|
42569
42799
|
function addCreateSiteFromTemplateTool(server, authStrategy, options) {
|
|
42570
42800
|
const resourceMeta = {
|
|
@@ -42696,7 +42926,7 @@ function addCreateSiteFromTemplateTool(server, authStrategy, options) {
|
|
|
42696
42926
|
}
|
|
42697
42927
|
async function createSiteFromTemplate(templateId, accountHeaders) {
|
|
42698
42928
|
const accountHttpClient = createHttpClient2({
|
|
42699
|
-
baseURL:
|
|
42929
|
+
baseURL: WIX_APIS_BASE_URL4,
|
|
42700
42930
|
headers: accountHeaders
|
|
42701
42931
|
});
|
|
42702
42932
|
const response = await accountHttpClient.request(
|
|
@@ -42732,7 +42962,7 @@ async function publishCreatedSite(siteId, siteHeaders, panorama) {
|
|
|
42732
42962
|
async function fetchEditorUrls(siteId, siteHeaders, panorama) {
|
|
42733
42963
|
try {
|
|
42734
42964
|
const siteHttpClient = createHttpClient2({
|
|
42735
|
-
baseURL:
|
|
42965
|
+
baseURL: WIX_APIS_BASE_URL4,
|
|
42736
42966
|
headers: {
|
|
42737
42967
|
...siteHeaders,
|
|
42738
42968
|
"wix-site-id": siteHeaders["wix-site-id"] ?? siteId
|
|
@@ -45721,13 +45951,13 @@ function createWixToolkit(options) {
|
|
|
45721
45951
|
clientName,
|
|
45722
45952
|
hooks,
|
|
45723
45953
|
conversationId,
|
|
45724
|
-
includeReadmeMentions = false
|
|
45954
|
+
includeReadmeMentions = false,
|
|
45955
|
+
includeImageUploadGuidance = false
|
|
45725
45956
|
} = options;
|
|
45726
45957
|
const authStrategy = normalizeAuth(auth);
|
|
45727
45958
|
const executeWixApiRequested = isExecuteWixApiRequested(api);
|
|
45728
|
-
|
|
45959
|
+
const descriptionsWithoutReadme = buildToolDescriptions(includeReadmeMentions, includeImageUploadGuidance);
|
|
45729
45960
|
if (!includeReadmeMentions) {
|
|
45730
|
-
descriptionsWithoutReadme = buildToolDescriptions(false);
|
|
45731
45961
|
delete descriptionsWithoutReadme.WixREADME;
|
|
45732
45962
|
}
|
|
45733
45963
|
const sessionId = v4_default();
|
|
@@ -45744,13 +45974,16 @@ function createWixToolkit(options) {
|
|
|
45744
45974
|
authStrategy,
|
|
45745
45975
|
dynamicContextEnabled: true,
|
|
45746
45976
|
// README-free defaults first so consumer overrides still win.
|
|
45747
|
-
toolDescriptions:
|
|
45977
|
+
toolDescriptions: {
|
|
45978
|
+
...descriptionsWithoutReadme,
|
|
45979
|
+
...docsOptions.toolDescriptions
|
|
45980
|
+
}
|
|
45748
45981
|
});
|
|
45749
45982
|
} else {
|
|
45750
45983
|
addDocsTools(server, void 0, {
|
|
45751
45984
|
authStrategy,
|
|
45752
45985
|
dynamicContextEnabled: true,
|
|
45753
|
-
|
|
45986
|
+
toolDescriptions: descriptionsWithoutReadme
|
|
45754
45987
|
});
|
|
45755
45988
|
}
|
|
45756
45989
|
if (api) {
|
|
@@ -45763,7 +45996,7 @@ function createWixToolkit(options) {
|
|
|
45763
45996
|
maxResponseSize,
|
|
45764
45997
|
codeModeBaseUrl = "https://mcp.wix.com"
|
|
45765
45998
|
} = api;
|
|
45766
|
-
const effectiveToolDescriptions =
|
|
45999
|
+
const effectiveToolDescriptions = {
|
|
45767
46000
|
...descriptionsWithoutReadme,
|
|
45768
46001
|
...executeWixApiRequested ? executeCodeModeToolDescriptions : {},
|
|
45769
46002
|
...toolDescriptions
|
|
@@ -46013,6 +46246,7 @@ export {
|
|
|
46013
46246
|
addDocsTools,
|
|
46014
46247
|
addEditSiteWidgetTool,
|
|
46015
46248
|
addExecuteCodeModeTool,
|
|
46249
|
+
addGetProfileTool,
|
|
46016
46250
|
addGetWixelAssetTool,
|
|
46017
46251
|
addGetWixelJobStatusTool,
|
|
46018
46252
|
addGetWixelProjectAssetsTool,
|
package/build/esm/toolkit.js
CHANGED
|
@@ -12085,7 +12085,7 @@ var DISCOVERY_FLOWS = [
|
|
|
12085
12085
|
"- METHOD CODE EXAMPLE BASED: BrowseWixRESTDocsMenu() or SearchWixRESTDocumentation() -> find relevant method -> read method article using ReadFullDocsArticle() to get method code examples -> call API using CallWixSiteAPI() based on the method code examples",
|
|
12086
12086
|
"- FULL SCHEMA BASED: BrowseWixRESTDocsMenu() or SearchWixRESTDocumentation() -> find relevant method -> read method article using ReadFullDocsArticle() -> no method code examples found -> inspect the method schema using SearchWixAPISpec or ReadFullDocsMethodSchema -> call API using CallWixSiteAPI() based on the schema"
|
|
12087
12087
|
];
|
|
12088
|
-
function buildSystemReminderGuidelines(includeReadme) {
|
|
12088
|
+
function buildSystemReminderGuidelines(includeReadme, includeImageUploadGuidance) {
|
|
12089
12089
|
const exception = includeReadme ? "**Exception:** " : "";
|
|
12090
12090
|
const lines = [];
|
|
12091
12091
|
if (includeReadme) {
|
|
@@ -12097,9 +12097,13 @@ function buildSystemReminderGuidelines(includeReadme) {
|
|
|
12097
12097
|
);
|
|
12098
12098
|
}
|
|
12099
12099
|
lines.push(
|
|
12100
|
-
`${exception}If the user asks to list, show, or find their Wix sites, ${includeReadme ? "skip WixREADME and " : ""}call ListWixSites directly
|
|
12101
|
-
`${exception}If the user wants to upload local or attached image files to a Wix site, skip ${includeReadme ? "WixREADME and " : ""}all docs/schema/API flows \u2014 call UploadImageToWixSite directly. Do NOT use ExecuteWixAPI, SearchWixAPISpec, or any Media Manager REST API for image uploads.`
|
|
12100
|
+
`${exception}If the user asks to list, show, or find their Wix sites, ${includeReadme ? "skip WixREADME and " : ""}call ListWixSites directly.`
|
|
12102
12101
|
);
|
|
12102
|
+
if (includeImageUploadGuidance) {
|
|
12103
|
+
lines.push(
|
|
12104
|
+
`${exception}If the user wants to upload local or attached image files to a Wix site, skip ${includeReadme ? "WixREADME and " : ""}all docs/schema/API flows \u2014 call UploadImageToWixSite directly. Do NOT use ExecuteWixAPI, SearchWixAPISpec, or any Media Manager REST API for image uploads.`
|
|
12105
|
+
);
|
|
12106
|
+
}
|
|
12103
12107
|
if (includeReadme) {
|
|
12104
12108
|
lines.push(
|
|
12105
12109
|
"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."
|
|
@@ -12126,9 +12130,15 @@ function buildSystemReminderFlows(includeReadme) {
|
|
|
12126
12130
|
lines.push(...DISCOVERY_FLOWS);
|
|
12127
12131
|
return lines.join("\n");
|
|
12128
12132
|
}
|
|
12129
|
-
var SYSTEM_REMINDER_GUIDELINES = buildSystemReminderGuidelines(
|
|
12130
|
-
|
|
12131
|
-
|
|
12133
|
+
var SYSTEM_REMINDER_GUIDELINES = buildSystemReminderGuidelines(
|
|
12134
|
+
true,
|
|
12135
|
+
true
|
|
12136
|
+
);
|
|
12137
|
+
function buildSystemReminder(includeReadme, includeImageUploadGuidance = true) {
|
|
12138
|
+
const guidelines = buildSystemReminderGuidelines(
|
|
12139
|
+
includeReadme,
|
|
12140
|
+
includeImageUploadGuidance
|
|
12141
|
+
);
|
|
12132
12142
|
const flows = buildSystemReminderFlows(includeReadme);
|
|
12133
12143
|
return dedent_default`
|
|
12134
12144
|
<agent-mandatory-instructions>
|
|
@@ -12339,8 +12349,11 @@ var executeWixApiDescription = dedent_default`
|
|
|
12339
12349
|
|
|
12340
12350
|
${EXECUTE_WIX_API_MULTI_SITE_EXAMPLE}
|
|
12341
12351
|
`;
|
|
12342
|
-
function buildToolDescriptions(includeReadme) {
|
|
12343
|
-
const reminder = buildSystemReminder(
|
|
12352
|
+
function buildToolDescriptions(includeReadme, includeImageUploadGuidance = true) {
|
|
12353
|
+
const reminder = buildSystemReminder(
|
|
12354
|
+
includeReadme,
|
|
12355
|
+
includeImageUploadGuidance
|
|
12356
|
+
);
|
|
12344
12357
|
return {
|
|
12345
12358
|
WixREADME: dedent_default`
|
|
12346
12359
|
# Tool: WixREADME
|
|
@@ -12391,6 +12404,7 @@ function buildToolDescriptions(includeReadme) {
|
|
|
12391
12404
|
**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.
|
|
12392
12405
|
${reminder}
|
|
12393
12406
|
`,
|
|
12407
|
+
get_profile: "Returns the authenticated user's email address",
|
|
12394
12408
|
GetSiteContext: dedent_default`
|
|
12395
12409
|
Fetches deep context for a specific Wix site and returns it as structured markdown.
|
|
12396
12410
|
|
|
@@ -17783,13 +17797,13 @@ function createWixToolkit(options) {
|
|
|
17783
17797
|
clientName,
|
|
17784
17798
|
hooks,
|
|
17785
17799
|
conversationId,
|
|
17786
|
-
includeReadmeMentions = false
|
|
17800
|
+
includeReadmeMentions = false,
|
|
17801
|
+
includeImageUploadGuidance = false
|
|
17787
17802
|
} = options;
|
|
17788
17803
|
const authStrategy = normalizeAuth(auth);
|
|
17789
17804
|
const executeWixApiRequested = isExecuteWixApiRequested(api);
|
|
17790
|
-
|
|
17805
|
+
const descriptionsWithoutReadme = buildToolDescriptions(includeReadmeMentions, includeImageUploadGuidance);
|
|
17791
17806
|
if (!includeReadmeMentions) {
|
|
17792
|
-
descriptionsWithoutReadme = buildToolDescriptions(false);
|
|
17793
17807
|
delete descriptionsWithoutReadme.WixREADME;
|
|
17794
17808
|
}
|
|
17795
17809
|
const sessionId = v4_default();
|
|
@@ -17806,13 +17820,16 @@ function createWixToolkit(options) {
|
|
|
17806
17820
|
authStrategy,
|
|
17807
17821
|
dynamicContextEnabled: true,
|
|
17808
17822
|
// README-free defaults first so consumer overrides still win.
|
|
17809
|
-
toolDescriptions:
|
|
17823
|
+
toolDescriptions: {
|
|
17824
|
+
...descriptionsWithoutReadme,
|
|
17825
|
+
...docsOptions.toolDescriptions
|
|
17826
|
+
}
|
|
17810
17827
|
});
|
|
17811
17828
|
} else {
|
|
17812
17829
|
addDocsTools(server, void 0, {
|
|
17813
17830
|
authStrategy,
|
|
17814
17831
|
dynamicContextEnabled: true,
|
|
17815
|
-
|
|
17832
|
+
toolDescriptions: descriptionsWithoutReadme
|
|
17816
17833
|
});
|
|
17817
17834
|
}
|
|
17818
17835
|
if (api) {
|
|
@@ -17825,7 +17842,7 @@ function createWixToolkit(options) {
|
|
|
17825
17842
|
maxResponseSize,
|
|
17826
17843
|
codeModeBaseUrl = "https://mcp.wix.com"
|
|
17827
17844
|
} = api;
|
|
17828
|
-
const effectiveToolDescriptions =
|
|
17845
|
+
const effectiveToolDescriptions = {
|
|
17829
17846
|
...descriptionsWithoutReadme,
|
|
17830
17847
|
...executeWixApiRequested ? executeCodeModeToolDescriptions : {},
|
|
17831
17848
|
...toolDescriptions
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wix/mcp",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.80",
|
|
4
4
|
"description": "A Model Context Protocol server for Wix AI tools",
|
|
5
5
|
"bin": "./build/bin-standalone.js",
|
|
6
6
|
"dependencies": {
|
|
@@ -29,6 +29,7 @@
|
|
|
29
29
|
"@wix/ambassador-editorurls-v2-editor-urls": "^1.0.43",
|
|
30
30
|
"@wix/ambassador-funnel-templates-gallery-v2-template": "^1.0.90",
|
|
31
31
|
"@wix/ambassador-genie-chat-service-v1-no-entity": "^1.0.130",
|
|
32
|
+
"@wix/ambassador-identity-account-v1-user": "^1.0.7",
|
|
32
33
|
"@wix/ambassador-metasite-api-v1-meta-site": "^1.0.133",
|
|
33
34
|
"@wix/ambassador-site-actions-v1-site-actions": "^1.0.55",
|
|
34
35
|
"@wix/ambassador-urls-api-v2-published-site-urls": "^1.0.31",
|
|
@@ -132,5 +133,5 @@
|
|
|
132
133
|
]
|
|
133
134
|
}
|
|
134
135
|
},
|
|
135
|
-
"falconPackageHash": "
|
|
136
|
+
"falconPackageHash": "2841f7992b059d939012b492dc7d764ed583d4c9dc157d9aaf2859ad"
|
|
136
137
|
}
|