@wix/mcp 1.0.14 → 1.0.16

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.
@@ -15064,9 +15064,14 @@ var runSemanticSearchAndFormat = async ({
15064
15064
  // src/docs/docs.ts
15065
15065
  import { captureException } from "@sentry/node";
15066
15066
 
15067
+ // src/constants.ts
15068
+ var RAW_DOCS_API_URL = "https://dev.wix.com/rawdocs/api";
15069
+ var GET_ARTICLE_CONTENT_URL = `${RAW_DOCS_API_URL}/get-article-content`;
15070
+ var PORTAL_INDEX_URL = `${RAW_DOCS_API_URL}/portal-index`;
15071
+
15067
15072
  // src/docs/fetch-article.ts
15068
15073
  async function fetchArticleContentFromDigor(httpClient, articleUrl, mode, stripHeader = false) {
15069
- const url = new URL(`https://dev.wix.com/digor/api/get-article-content`);
15074
+ const url = new URL(GET_ARTICLE_CONTENT_URL);
15070
15075
  url.searchParams.set("articleUrl", articleUrl);
15071
15076
  const schema = mode === "methodSchema" ? "true" : "false";
15072
15077
  url.searchParams.set("schema", schema);
@@ -16420,6 +16425,7 @@ var WixMcpServer = class extends McpServer {
16420
16425
  } finally {
16421
16426
  const endTime = performance.now();
16422
16427
  const duration = Math.round(endTime - startTime);
16428
+ const clientName = this.server.getClientVersion()?.name;
16423
16429
  if (!isDevEnvironment) {
16424
16430
  if (this.getUserId) {
16425
16431
  const userId = this.getUserId();
@@ -16429,14 +16435,15 @@ var WixMcpServer = class extends McpServer {
16429
16435
  }
16430
16436
  this.biLogger.report(
16431
16437
  (0, import_v2.wixMcpRequestSrc39Evid1607)({
16438
+ clientName,
16439
+ duration,
16440
+ errorBody,
16432
16441
  toolInvocationId,
16433
16442
  toolName,
16434
16443
  params: JSON.stringify(argsBeforeExtra),
16435
16444
  origin: this.nodeEnv,
16436
- duration,
16437
16445
  sessionId: this.sessionId,
16438
- executionResult: toolSucceeded ? "Success" : "Error",
16439
- errorBody
16446
+ executionResult: toolSucceeded ? "Success" : "Error"
16440
16447
  })
16441
16448
  );
16442
16449
  }
@@ -16450,9 +16457,7 @@ var WixMcpServer = class extends McpServer {
16450
16457
 
16451
16458
  // src/resources/docs.ts
16452
16459
  var getPortalIndex = async (portalName) => {
16453
- const response = await fetch(
16454
- `https://dev.wix.com/digor/api/portal-index?portalName=${portalName}`
16455
- );
16460
+ const response = await fetch(`${PORTAL_INDEX_URL}?portalName=${portalName}`);
16456
16461
  const data = await response.json();
16457
16462
  return data;
16458
16463
  };
@@ -16471,7 +16476,7 @@ var addPortalResources = async (server2, portalName) => {
16471
16476
  logger.log(`fetching resource ${uri2}`);
16472
16477
  const docsURL = uri2.toString().replace("wix-docs://", "https://dev.wix.com/docs/");
16473
16478
  const response = await fetch(
16474
- `https://dev.wix.com/digor/api/get-article-content?articleUrl=${encodeURIComponent(docsURL)}`
16479
+ `${GET_ARTICLE_CONTENT_URL}?articleUrl=${encodeURIComponent(docsURL)}`
16475
16480
  );
16476
16481
  const data = await response.json();
16477
16482
  return {