@wix/mcp 1.0.94 → 1.0.95
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/README.md +2 -2
- package/build/bin-standalone.js +1116 -321
- package/build/cjs/index.cjs +2813 -1147
- package/build/cjs/toolkit.cjs +1788 -362
- package/build/dts/api-call/headless-release.d.ts +56 -0
- package/build/dts/api-call/headless-release.js +135 -0
- package/build/dts/api-call/index.d.ts +9 -1
- package/build/dts/api-call/index.js +13 -7
- package/build/dts/api-call/site-files.d.ts +14 -0
- package/build/dts/api-call/site-files.js +106 -10
- package/build/dts/api-call/upload-headless-website-files.d.ts +88 -5
- package/build/dts/api-call/upload-headless-website-files.js +473 -20
- package/build/dts/api-call/upload-image-tool.d.ts +2 -0
- package/build/dts/api-call/upload-image-tool.js +8 -4
- package/build/dts/bin.d.ts +1 -1
- package/build/dts/bin.js +3 -1
- package/build/dts/code-mode/index.d.ts +6 -1
- package/build/dts/code-mode/index.js +30 -10
- package/build/dts/code-mode/truncate-response.js +5 -1
- package/build/dts/config/default-config.d.ts +35 -5
- package/build/dts/config/default-config.js +334 -178
- package/build/dts/config/file-params.d.ts +22 -0
- package/build/dts/config/file-params.js +24 -0
- package/build/dts/config/param-descriptions.d.ts +14 -2
- package/build/dts/config/param-descriptions.js +33 -14
- package/build/dts/constants.d.ts +1 -0
- package/build/dts/constants.js +1 -0
- package/build/dts/docs/docs.d.ts +12 -1
- package/build/dts/docs/docs.js +210 -42
- package/build/dts/docs/fetch-article.d.ts +21 -0
- package/build/dts/docs/fetch-article.js +66 -4
- package/build/dts/docs/get-to-know.d.ts +7 -2
- package/build/dts/docs/get-to-know.js +36 -14
- package/build/dts/docs/mintlify-docs.d.ts +121 -0
- package/build/dts/docs/mintlify-docs.js +391 -0
- package/build/dts/docs/semanticSearch.d.ts +2 -1
- package/build/dts/docs/semanticSearch.js +14 -7
- package/build/dts/docs/start-deploy-website.d.ts +7 -6
- package/build/dts/docs/start-deploy-website.js +13 -8
- package/build/dts/docs/start-headless-build.d.ts +8 -10
- package/build/dts/docs/start-headless-build.js +14 -28
- package/build/dts/index.d.ts +2 -2
- package/build/dts/index.js +2 -2
- package/build/dts/infra/redact-personal-data.d.ts +4 -0
- package/build/dts/infra/redact-personal-data.js +79 -0
- package/build/dts/site-widget-tools/constants.d.ts +49 -1
- package/build/dts/site-widget-tools/constants.js +64 -7
- package/build/dts/site-widget-tools/index.d.ts +1 -0
- package/build/dts/site-widget-tools/index.js +1 -0
- package/build/dts/site-widget-tools/pick-images-tool/index.d.ts +14 -0
- package/build/dts/site-widget-tools/pick-images-tool/index.js +138 -0
- package/build/dts/site-widget-tools/search-site-templates-tool/index.js +16 -2
- package/build/dts/site-widget-tools/site-builder-tool/index.js +22 -2
- package/build/dts/site-widget-tools/site-creation-tool/index.d.ts +7 -1
- package/build/dts/site-widget-tools/site-creation-tool/index.js +22 -51
- package/build/dts/site-widget-tools/suggested-domain-tool/index.js +6 -3
- package/build/dts/support/index.d.ts +4 -0
- package/build/dts/support/index.js +13 -7
- package/build/dts/toolkit-entry.d.cts +15 -10
- package/build/dts/toolkit-entry.d.ts +15 -10
- package/build/dts/toolkit.d.ts +2 -2
- package/build/dts/toolkit.js +14 -7
- package/build/dts/wix-mcp-server.d.ts +10 -1
- package/build/dts/wix-mcp-server.js +25 -7
- package/build/dts/wixel/constants.d.ts +8 -1
- package/build/dts/wixel/constants.js +8 -1
- package/build/dts/wixel/index.d.ts +1 -1
- package/build/dts/wixel/index.js +2 -2
- package/build/dts/wixel/wixel-a2a-client.d.ts +83 -0
- package/build/dts/wixel/wixel-a2a-client.js +166 -0
- package/build/dts/wixel/wixel-bi.d.ts +2 -1
- package/build/dts/wixel/wixel-bi.js +2 -1
- package/build/dts/wixel/{external-agent-api.d.ts → wixel-session-entries.d.ts} +11 -33
- package/build/dts/wixel/{external-agent-api.js → wixel-session-entries.js} +33 -54
- package/build/dts/wixel/wixel-session-tools.d.ts +21 -26
- package/build/dts/wixel/wixel-session-tools.js +494 -599
- package/build/esm/index.js +2824 -1170
- package/build/esm/toolkit.js +1786 -360
- package/package.json +4 -4
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { RESOURCE_MIME_TYPE } from '@modelcontextprotocol/ext-apps/server';
|
|
3
|
+
import { rethrowIfUnauthorized } from '../../auth/index.js';
|
|
4
|
+
import { getWidgetHtml } from '../../widget-manifest.js';
|
|
5
|
+
import { withJsonContent } from '../../tool-utils.js';
|
|
6
|
+
import { WixFetchError } from '../../wix-fetch-error.js';
|
|
7
|
+
import { defaultToolDescriptions } from '../../config/default-config.js';
|
|
8
|
+
import { MEDIA_UPLOAD_URL_TOOL_NAME, PICK_IMAGES_TOOL_NAME } from '../constants.js';
|
|
9
|
+
const PICK_IMAGES_WIDGET_URI = 'ui://widget/pick-images.html';
|
|
10
|
+
// The widget uploads each picked file from the user's browser straight to the
|
|
11
|
+
// Media Manager upload URL, so upload.wixmp.com must be reachable from it.
|
|
12
|
+
const PICK_IMAGES_CSP = {
|
|
13
|
+
connectDomains: [
|
|
14
|
+
'https://upload.wixmp.com',
|
|
15
|
+
'https://static.parastorage.com'
|
|
16
|
+
],
|
|
17
|
+
resourceDomains: [
|
|
18
|
+
'https://static.wixstatic.com',
|
|
19
|
+
'https://static.parastorage.com',
|
|
20
|
+
'data:',
|
|
21
|
+
'blob:'
|
|
22
|
+
]
|
|
23
|
+
};
|
|
24
|
+
const PICKER_OPEN_TEXT = "An image picker is open in the chat. The user selects images there; they upload to the site's Media Manager, and a message with each image's media ID and URL follows. Reply with one short sentence and wait for that message. If your client shows no picker, send the images with UploadImageToWixSite as imageBase64, or ask the user for public URLs.";
|
|
25
|
+
const siteIdSchema = z
|
|
26
|
+
.string()
|
|
27
|
+
.uuid('siteId must be a valid Wix site ID (UUID)');
|
|
28
|
+
/**
|
|
29
|
+
* Exists only because Claude can't hand a file to a tool: recheck when it can (see
|
|
30
|
+
* config/file-params.ts), and drop or narrow this then.
|
|
31
|
+
*
|
|
32
|
+
* The image picker for clients that can't hand a file to a tool (Claude): the user
|
|
33
|
+
* picks images in a widget, which uploads them from the browser to the site's Media
|
|
34
|
+
* Manager through upload URLs from the app-only CreateWixMediaUploadUrl tool.
|
|
35
|
+
*/
|
|
36
|
+
export function addPickImagesTools(server, strategy, options) {
|
|
37
|
+
server.registerResource(`${PICK_IMAGES_TOOL_NAME}_RESOURCE`, PICK_IMAGES_WIDGET_URI, {}, async (uri) => ({
|
|
38
|
+
contents: [
|
|
39
|
+
{
|
|
40
|
+
uri: uri.href,
|
|
41
|
+
_meta: { ui: { csp: PICK_IMAGES_CSP } },
|
|
42
|
+
mimeType: RESOURCE_MIME_TYPE,
|
|
43
|
+
text: getWidgetHtml({
|
|
44
|
+
widgetId: 'pickImages',
|
|
45
|
+
props: { renderMcpApps: true }
|
|
46
|
+
})
|
|
47
|
+
}
|
|
48
|
+
]
|
|
49
|
+
}));
|
|
50
|
+
server.registerTool(PICK_IMAGES_TOOL_NAME, {
|
|
51
|
+
title: 'Pick Images to Upload to Wix',
|
|
52
|
+
description: options?.toolDescriptions?.[PICK_IMAGES_TOOL_NAME] ??
|
|
53
|
+
defaultToolDescriptions[PICK_IMAGES_TOOL_NAME],
|
|
54
|
+
inputSchema: {
|
|
55
|
+
siteId: siteIdSchema.describe('The site whose Media Manager receives the images.')
|
|
56
|
+
},
|
|
57
|
+
_meta: {
|
|
58
|
+
ui: {
|
|
59
|
+
resourceUri: PICK_IMAGES_WIDGET_URI,
|
|
60
|
+
visibility: ['app', 'model']
|
|
61
|
+
}
|
|
62
|
+
},
|
|
63
|
+
annotations: {
|
|
64
|
+
readOnlyHint: false,
|
|
65
|
+
destructiveHint: false,
|
|
66
|
+
openWorldHint: true
|
|
67
|
+
}
|
|
68
|
+
}, async ({ siteId }, { setToolBiParams }) => {
|
|
69
|
+
setToolBiParams({ siteId });
|
|
70
|
+
return withJsonContent({
|
|
71
|
+
content: [{ type: 'text', text: PICKER_OPEN_TEXT }],
|
|
72
|
+
structuredContent: { siteId },
|
|
73
|
+
_meta: { widgetPayload: { siteId } }
|
|
74
|
+
});
|
|
75
|
+
});
|
|
76
|
+
server.registerTool(MEDIA_UPLOAD_URL_TOOL_NAME, {
|
|
77
|
+
title: 'Create Wix Media Upload URL',
|
|
78
|
+
description: `Used by the ${PICK_IMAGES_TOOL_NAME} widget: returns a one-time URL the widget uploads one picked image to. Not for direct use.`,
|
|
79
|
+
inputSchema: {
|
|
80
|
+
siteId: siteIdSchema,
|
|
81
|
+
fileName: z.string().min(1).max(200),
|
|
82
|
+
mimeType: z
|
|
83
|
+
.string()
|
|
84
|
+
.regex(/^image\//, 'Only images can be uploaded here'),
|
|
85
|
+
sizeInBytes: z.number().int().positive().optional()
|
|
86
|
+
},
|
|
87
|
+
_meta: { ui: { visibility: ['app'] } },
|
|
88
|
+
annotations: {
|
|
89
|
+
readOnlyHint: false,
|
|
90
|
+
destructiveHint: false,
|
|
91
|
+
openWorldHint: true
|
|
92
|
+
}
|
|
93
|
+
}, async ({ siteId, fileName, mimeType, sizeInBytes }, { setToolBiParams }) => {
|
|
94
|
+
setToolBiParams({ siteId });
|
|
95
|
+
try {
|
|
96
|
+
const authHeaders = await strategy.getSiteAuthHeaders(siteId);
|
|
97
|
+
const res = await fetch('https://www.wixapis.com/site-media/v1/files/generate-upload-url', {
|
|
98
|
+
method: 'POST',
|
|
99
|
+
headers: { ...authHeaders, 'Content-Type': 'application/json' },
|
|
100
|
+
body: JSON.stringify({
|
|
101
|
+
mimeType,
|
|
102
|
+
fileName,
|
|
103
|
+
...(sizeInBytes ? { sizeInBytes: String(sizeInBytes) } : {})
|
|
104
|
+
})
|
|
105
|
+
});
|
|
106
|
+
if (!res.ok) {
|
|
107
|
+
throw new WixFetchError(res.status, res.statusText, await res.text());
|
|
108
|
+
}
|
|
109
|
+
const { uploadUrl } = (await res.json());
|
|
110
|
+
if (!uploadUrl) {
|
|
111
|
+
throw new Error('Wix returned no upload URL');
|
|
112
|
+
}
|
|
113
|
+
// The URL is a one-time upload grant: never in the text content, which BI
|
|
114
|
+
// records as the result preview. _meta carries it for hosts that drop
|
|
115
|
+
// structuredContent.
|
|
116
|
+
return {
|
|
117
|
+
content: [{ type: 'text', text: 'Upload URL created.' }],
|
|
118
|
+
structuredContent: { uploadUrl },
|
|
119
|
+
_meta: { uploadUrl }
|
|
120
|
+
};
|
|
121
|
+
}
|
|
122
|
+
catch (error) {
|
|
123
|
+
rethrowIfUnauthorized(error);
|
|
124
|
+
await strategy.enforceValidWixToken?.(error);
|
|
125
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
126
|
+
return {
|
|
127
|
+
isError: true,
|
|
128
|
+
content: [
|
|
129
|
+
{
|
|
130
|
+
type: 'text',
|
|
131
|
+
text: `Failed to create an upload URL: ${message}`
|
|
132
|
+
}
|
|
133
|
+
]
|
|
134
|
+
};
|
|
135
|
+
}
|
|
136
|
+
});
|
|
137
|
+
}
|
|
138
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -6,7 +6,7 @@ import { Type, TemplateBuilder } from '@wix/ambassador-funnel-templates-gallery-
|
|
|
6
6
|
import { getWidgetHtml } from '../../widget-manifest.js';
|
|
7
7
|
import { RESOURCE_MIME_TYPE } from '@modelcontextprotocol/ext-apps/server';
|
|
8
8
|
import { defaultToolDescriptions } from '../../config/default-config.js';
|
|
9
|
-
import { SEARCH_SITE_TEMPLATES_TOOL_NAME, CREATE_SITE_FROM_TEMPLATE_TOOL_NAME, SITE_WIDGET_MCP_CSP, OPEN_AI_SITE_WIDGET_CSP } from '../constants.js';
|
|
9
|
+
import { EDITOR_NOT_REQUESTED_MESSAGE, NOT_REQUESTED_WIDGET_PAYLOAD, SEARCH_SITE_TEMPLATES_TOOL_NAME, CREATE_SITE_FROM_TEMPLATE_TOOL_NAME, SITE_WIDGET_MCP_CSP, OPEN_AI_SITE_WIDGET_CSP } from '../constants.js';
|
|
10
10
|
import { withJsonContent } from '../../tool-utils.js';
|
|
11
11
|
// baseURL pins the host so the ambassador resolves to the public template-search
|
|
12
12
|
// endpoint: https://www.wix.com/_api/template-cms-view-service/view/v2/templates/search
|
|
@@ -69,7 +69,11 @@ export function addSearchSiteTemplatesTool(server, _authStrategy, options) {
|
|
|
69
69
|
.min(1)
|
|
70
70
|
.max(MAX_TEMPLATE_RESULTS)
|
|
71
71
|
.optional()
|
|
72
|
-
.describe(`Maximum number of templates to return (capped at ${MAX_TEMPLATE_RESULTS}).`)
|
|
72
|
+
.describe(`Maximum number of templates to return (capped at ${MAX_TEMPLATE_RESULTS}).`),
|
|
73
|
+
templatesExplicitlyRequested: z
|
|
74
|
+
.boolean()
|
|
75
|
+
.optional()
|
|
76
|
+
.describe("Did the user, in their own words or their answer to your question, ask for a template, Wix Studio, or the Classic Editor by name? Wanting Wix's editor, or to design the site themselves, is not that: ask them how to start first. Nor are a site's business, features or look.")
|
|
73
77
|
},
|
|
74
78
|
_meta: {
|
|
75
79
|
ui: {
|
|
@@ -86,6 +90,16 @@ export function addSearchSiteTemplatesTool(server, _authStrategy, options) {
|
|
|
86
90
|
idempotentHint: true
|
|
87
91
|
}
|
|
88
92
|
}, async (args, { panorama }) => {
|
|
93
|
+
// Only an explicit false is refused: clients that hold the previous definition never send the flag.
|
|
94
|
+
if (args.templatesExplicitlyRequested === false) {
|
|
95
|
+
return withJsonContent({
|
|
96
|
+
content: [
|
|
97
|
+
{ type: 'text', text: EDITOR_NOT_REQUESTED_MESSAGE }
|
|
98
|
+
],
|
|
99
|
+
structuredContent: { success: false, status: 'not_requested' },
|
|
100
|
+
_meta: { widgetPayload: NOT_REQUESTED_WIDGET_PAYLOAD }
|
|
101
|
+
});
|
|
102
|
+
}
|
|
89
103
|
const limit = args.limit ?? MAX_TEMPLATE_RESULTS;
|
|
90
104
|
console.log(`[${SEARCH_SITE_TEMPLATES_TOOL_NAME}] 🚀 tool invoked`, {
|
|
91
105
|
builder: args.builder,
|
|
@@ -2,7 +2,7 @@ import { z } from 'zod';
|
|
|
2
2
|
import { createHttpClient } from '@wix/http-client';
|
|
3
3
|
import { getWidgetHtml } from '../../widget-manifest.js';
|
|
4
4
|
import { RESOURCE_MIME_TYPE } from '@modelcontextprotocol/ext-apps/server';
|
|
5
|
-
import { SITE_BUILDER_TOOL_NAME, SITE_WIDGET_MCP_CSP, OPEN_AI_SITE_WIDGET_CSP, OPENAI_WIDGET_MIME_TYPE } from '../constants.js';
|
|
5
|
+
import { EDITOR_NOT_REQUESTED_MESSAGE, NOT_REQUESTED_WIDGET_PAYLOAD, SITE_BUILDER_TOOL_NAME, SITE_WIDGET_MCP_CSP, OPEN_AI_SITE_WIDGET_CSP, OPENAI_WIDGET_MIME_TYPE } from '../constants.js';
|
|
6
6
|
import { defaultToolDescriptions } from '../../config/default-config.js';
|
|
7
7
|
import { withJsonContent } from '../../tool-utils.js';
|
|
8
8
|
const httpClient = createHttpClient();
|
|
@@ -67,7 +67,11 @@ export function addCreateSiteWidgetTool(server, authStrategy, options) {
|
|
|
67
67
|
suggestedSiteName: z
|
|
68
68
|
.string()
|
|
69
69
|
.optional()
|
|
70
|
-
.describe('You must provide this on every call, including updates to an existing job, in English. A short name for the site: the business name the user gave, or one you derive from the site prompt.')
|
|
70
|
+
.describe('You must provide this on every call, including updates to an existing job, in English. A short name for the site: the business name the user gave, or one you derive from the site prompt.'),
|
|
71
|
+
wixEditorExplicitlyRequested: z
|
|
72
|
+
.boolean()
|
|
73
|
+
.optional()
|
|
74
|
+
.describe("Did the user, in their own words or their answer to your question, ask for the Wix Harmony Editor, or for Wix to design the site? Wanting Wix's editor, or to design the site themselves, is not that: ask them how to start first. Nor are a site's business, features or look.")
|
|
71
75
|
},
|
|
72
76
|
_meta: toolDefinitionMeta,
|
|
73
77
|
annotations: {
|
|
@@ -77,6 +81,22 @@ export function addCreateSiteWidgetTool(server, authStrategy, options) {
|
|
|
77
81
|
}
|
|
78
82
|
}, async (args, { setToolBiParams, panorama }) => {
|
|
79
83
|
const isAnonymous = authStrategy.isAnonymous?.() ?? false;
|
|
84
|
+
// A new build runs unless the agent says the user did not ask for it. Only an explicit
|
|
85
|
+
// false is refused: clients that hold the previous definition never send the flag, and
|
|
86
|
+
// resuming a job does not ask again.
|
|
87
|
+
if (!args.jobId && args.wixEditorExplicitlyRequested === false) {
|
|
88
|
+
return withJsonContent({
|
|
89
|
+
content: [
|
|
90
|
+
{ type: 'text', text: EDITOR_NOT_REQUESTED_MESSAGE }
|
|
91
|
+
],
|
|
92
|
+
structuredContent: {
|
|
93
|
+
success: false,
|
|
94
|
+
status: 'not_requested',
|
|
95
|
+
jobId: null
|
|
96
|
+
},
|
|
97
|
+
_meta: { widgetPayload: NOT_REQUESTED_WIDGET_PAYLOAD }
|
|
98
|
+
});
|
|
99
|
+
}
|
|
80
100
|
console.log(`[${SITE_BUILDER_TOOL_NAME}] 🚀 tool invoked`, {
|
|
81
101
|
...args,
|
|
82
102
|
isAnonymous
|
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
import { McpAuthenticationStrategy } from '../../auth/index.js';
|
|
2
2
|
import { WixMcpServer } from '../../wix-mcp-server.js';
|
|
3
3
|
import { SiteWidgetToolOptions } from '../site-builder-tool/index.js';
|
|
4
|
-
/**
|
|
4
|
+
/**
|
|
5
|
+
* WixSiteCreation no longer opens a chooser. It keeps its name, so a client that still holds
|
|
6
|
+
* the previous definition never gets "tool not found", and it answers with where a new site
|
|
7
|
+
* goes: written in code and uploaded. Its definition carries no widget. The widget resource
|
|
8
|
+
* stays registered for clients whose frozen definition still points at it (ChatGPT until
|
|
9
|
+
* OpenAI approves this one); it renders a one-line card with a button that restarts the turn.
|
|
10
|
+
*/
|
|
5
11
|
export declare function addWixSiteCreationTool(server: WixMcpServer, _authStrategy: McpAuthenticationStrategy, options?: SiteWidgetToolOptions): void;
|
|
6
12
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,27 +1,22 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { v4 as uuidv4 } from 'uuid';
|
|
3
2
|
import { getWidgetHtml } from '../../widget-manifest.js';
|
|
4
3
|
import { RESOURCE_MIME_TYPE } from '@modelcontextprotocol/ext-apps/server';
|
|
5
|
-
import { WIX_SITE_CREATION_TOOL_NAME, SITE_WIDGET_MCP_CSP, OPEN_AI_SITE_WIDGET_CSP,
|
|
4
|
+
import { WIX_SITE_CREATION_TOOL_NAME, SITE_WIDGET_MCP_CSP, OPEN_AI_SITE_WIDGET_CSP, SITE_CREATION_ROUTE_MESSAGE } from '../constants.js';
|
|
6
5
|
import { defaultToolDescriptions } from '../../config/default-config.js';
|
|
7
6
|
import { withJsonContent } from '../../tool-utils.js';
|
|
8
7
|
const WIX_SITE_CREATION_WIDGET_URI = 'ui://widget/wix-site-creation.html';
|
|
9
|
-
/**
|
|
8
|
+
/**
|
|
9
|
+
* WixSiteCreation no longer opens a chooser. It keeps its name, so a client that still holds
|
|
10
|
+
* the previous definition never gets "tool not found", and it answers with where a new site
|
|
11
|
+
* goes: written in code and uploaded. Its definition carries no widget. The widget resource
|
|
12
|
+
* stays registered for clients whose frozen definition still points at it (ChatGPT until
|
|
13
|
+
* OpenAI approves this one); it renders a one-line card with a button that restarts the turn.
|
|
14
|
+
*/
|
|
10
15
|
export function addWixSiteCreationTool(server, _authStrategy, options) {
|
|
11
|
-
const toolDefinitionMeta = {
|
|
12
|
-
ui: {
|
|
13
|
-
resourceUri: WIX_SITE_CREATION_WIDGET_URI,
|
|
14
|
-
visibility: ['app', 'model']
|
|
15
|
-
},
|
|
16
|
-
securitySchemes: [{ type: 'oauth2', scopes: ['offline_access'] }],
|
|
17
|
-
'openai/toolInvocation/invoking': 'Opening site creation...',
|
|
18
|
-
'openai/toolInvocation/invoked': 'Ready',
|
|
19
|
-
'openai/outputTemplate': WIX_SITE_CREATION_WIDGET_URI
|
|
20
|
-
};
|
|
21
16
|
const resourceMeta = {
|
|
22
17
|
ui: { csp: SITE_WIDGET_MCP_CSP },
|
|
23
18
|
'openai/widgetCSP': OPEN_AI_SITE_WIDGET_CSP,
|
|
24
|
-
'openai/widgetDescription': '
|
|
19
|
+
'openai/widgetDescription': 'Says the site is being built here in chat, with a button that continues the conversation.'
|
|
25
20
|
};
|
|
26
21
|
server.registerResource(`${WIX_SITE_CREATION_TOOL_NAME}_RESOURCE`, WIX_SITE_CREATION_WIDGET_URI, {}, async (uri) => {
|
|
27
22
|
console.log(`[${WIX_SITE_CREATION_TOOL_NAME}] Resource requested`, {
|
|
@@ -46,25 +41,23 @@ export function addWixSiteCreationTool(server, _authStrategy, options) {
|
|
|
46
41
|
title: 'Wix Site Creation',
|
|
47
42
|
description: options?.toolDescriptions?.[WIX_SITE_CREATION_TOOL_NAME] ??
|
|
48
43
|
defaultToolDescriptions[WIX_SITE_CREATION_TOOL_NAME],
|
|
44
|
+
// The previous definition's parameters, all optional, so a call made from it still validates.
|
|
49
45
|
inputSchema: {
|
|
50
46
|
query: z
|
|
51
|
-
.string()
|
|
52
|
-
.min(1)
|
|
53
|
-
.describe('The few most important keywords describing the site, used to search templates — e.g. "yoga studio", "wedding photographer".'),
|
|
54
|
-
sitePrompt: z
|
|
55
|
-
.string()
|
|
56
|
-
.min(1)
|
|
57
|
-
.describe('The prompt to build the site. If not provided, the user will be asked to provide a prompt.'),
|
|
58
|
-
suggestedSiteName: z
|
|
59
47
|
.string()
|
|
60
48
|
.optional()
|
|
61
|
-
.describe('
|
|
62
|
-
|
|
49
|
+
.describe('A few keywords describing the site.'),
|
|
50
|
+
sitePrompt: z
|
|
63
51
|
.string()
|
|
64
52
|
.optional()
|
|
65
|
-
.describe(
|
|
53
|
+
.describe('A description of the site.'),
|
|
54
|
+
suggestedSiteName: z.string().optional().describe('A site name.'),
|
|
55
|
+
customActions: z.string().optional().describe('Unused.'),
|
|
56
|
+
editorChosen: z.boolean().optional().describe('Unused.')
|
|
57
|
+
},
|
|
58
|
+
_meta: {
|
|
59
|
+
securitySchemes: [{ type: 'oauth2', scopes: ['offline_access'] }]
|
|
66
60
|
},
|
|
67
|
-
_meta: toolDefinitionMeta,
|
|
68
61
|
annotations: {
|
|
69
62
|
readOnlyHint: true,
|
|
70
63
|
destructiveHint: false,
|
|
@@ -72,34 +65,12 @@ export function addWixSiteCreationTool(server, _authStrategy, options) {
|
|
|
72
65
|
idempotentHint: true
|
|
73
66
|
}
|
|
74
67
|
}, async (args) => {
|
|
75
|
-
console.log(`[${WIX_SITE_CREATION_TOOL_NAME}]
|
|
68
|
+
console.log(`[${WIX_SITE_CREATION_TOOL_NAME}] routed to the code path`, {
|
|
76
69
|
query: args.query
|
|
77
70
|
});
|
|
78
|
-
const widgetPayload = {
|
|
79
|
-
query: args.query,
|
|
80
|
-
sitePrompt: args.sitePrompt,
|
|
81
|
-
suggestedSiteName: args.suggestedSiteName,
|
|
82
|
-
viewUUID: uuidv4(),
|
|
83
|
-
extras: server.getWidgetExtras()
|
|
84
|
-
};
|
|
85
|
-
// Reply instruction: a fixed SHAPE (question + the two options + a "Next up:" line) built
|
|
86
|
-
// from the query (site type) and the inferred customActions, with the two option lines left
|
|
87
|
-
// for the model to tailor to the industry. Returned as-is; the tool description also
|
|
88
|
-
// instructs the model to write it out (both are load-bearing). Microsoft Copilot gets the
|
|
89
|
-
// message without the preamble: its safety filter blocks the reply otherwise.
|
|
90
|
-
const message = buildSiteCreationSelectorMessage(args.query, args.customActions, { plain: server.isMicrosoftCopilotClient() });
|
|
91
71
|
return withJsonContent({
|
|
92
|
-
content: [
|
|
93
|
-
|
|
94
|
-
type: 'text',
|
|
95
|
-
text: message
|
|
96
|
-
}
|
|
97
|
-
],
|
|
98
|
-
structuredContent: {
|
|
99
|
-
success: true,
|
|
100
|
-
query: args.query
|
|
101
|
-
},
|
|
102
|
-
_meta: { widgetPayload }
|
|
72
|
+
content: [{ type: 'text', text: SITE_CREATION_ROUTE_MESSAGE }],
|
|
73
|
+
structuredContent: { success: true, route: 'code' }
|
|
103
74
|
});
|
|
104
75
|
});
|
|
105
76
|
}
|
|
@@ -31,11 +31,14 @@ export function addSuggestedDomainTool(server, authStrategy) {
|
|
|
31
31
|
server.registerTool(GET_SUGGESTED_DOMAINS_TOOL_NAME, {
|
|
32
32
|
title: 'Get Suggested Domains',
|
|
33
33
|
description: dedent `
|
|
34
|
-
Suggests
|
|
34
|
+
Suggests domain name ideas for a business, brand, or Wix site. Returns a list of domain names related to the input.
|
|
35
35
|
|
|
36
|
-
Call this when the user
|
|
36
|
+
Call this when the user:
|
|
37
|
+
- asks for domain name ideas in general, e.g. "domain ideas for a bakery"
|
|
38
|
+
- wants to find a domain for their site, new or existing
|
|
39
|
+
- wants alternatives or variations of a domain name, e.g. "something similar to mybakery.com"
|
|
37
40
|
|
|
38
|
-
Provide either a free-text \`query\` (
|
|
41
|
+
Provide either a free-text \`query\` (e.g. "pancakes business", "modern yoga studio") OR a \`siteId\` to base the suggestions on that site's name. At least one of them is required.
|
|
39
42
|
|
|
40
43
|
Present the returned domains to the user as a short list. This tool only suggests domains — it does not purchase or connect them.
|
|
41
44
|
`,
|
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
import { WixMcpServer } from '../wix-mcp-server.js';
|
|
2
2
|
import { McpAuthenticationStrategy } from '../auth/index.js';
|
|
3
|
+
/** Sends one issue to Wix's feedback channel. */
|
|
4
|
+
export declare const REPORT_ISSUE_TOOL_NAME = "ReportIssueToWix";
|
|
5
|
+
/** The tool's former name, still honored in disableTools and toolDescriptions. */
|
|
6
|
+
export declare const LEGACY_REPORT_ISSUE_TOOL_NAME = "SupportAndFeedback";
|
|
3
7
|
export declare function addSupportTool(server: WixMcpServer, strategy: McpAuthenticationStrategy, disableTools?: string[], toolDescriptions?: Record<string, string>): void;
|
|
4
8
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -7,19 +7,25 @@ import { rethrowIfUnauthorized } from '../auth/index.js';
|
|
|
7
7
|
// mcp-serverless /feedback web function — relays the message to the
|
|
8
8
|
// #mcp-user-feedback Slack channel, attributed to the calling user.
|
|
9
9
|
const FEEDBACK_API_URL = 'https://www.wixapis.com/mcp-serverless/v1/feedback';
|
|
10
|
+
/** Sends one issue to Wix's feedback channel. */
|
|
11
|
+
export const REPORT_ISSUE_TOOL_NAME = 'ReportIssueToWix';
|
|
12
|
+
/** The tool's former name, still honored in disableTools and toolDescriptions. */
|
|
13
|
+
export const LEGACY_REPORT_ISSUE_TOOL_NAME = 'SupportAndFeedback';
|
|
10
14
|
export function addSupportTool(server, strategy, disableTools = [], toolDescriptions) {
|
|
11
|
-
if (disableTools.includes(
|
|
15
|
+
if (disableTools.includes(REPORT_ISSUE_TOOL_NAME) ||
|
|
16
|
+
disableTools.includes(LEGACY_REPORT_ISSUE_TOOL_NAME)) {
|
|
12
17
|
return;
|
|
13
18
|
}
|
|
14
|
-
server.tool(
|
|
15
|
-
|
|
16
|
-
|
|
19
|
+
server.tool(REPORT_ISSUE_TOOL_NAME, toolDescriptions?.[REPORT_ISSUE_TOOL_NAME] ??
|
|
20
|
+
toolDescriptions?.[LEGACY_REPORT_ISSUE_TOOL_NAME] ??
|
|
21
|
+
defaultToolDescriptions.ReportIssueToWix, (() => {
|
|
22
|
+
const d = desc('ReportIssueToWix');
|
|
17
23
|
return {
|
|
18
24
|
message: z.string().describe(d.message),
|
|
19
25
|
requestId: z.string().optional().describe(d.requestId)
|
|
20
26
|
};
|
|
21
27
|
})(), { readOnlyHint: false, destructiveHint: false, openWorldHint: false }, async ({ message, requestId }, { httpClient, setToolBiParams }) => {
|
|
22
|
-
logger.log(`[
|
|
28
|
+
logger.log(`[ReportIssueToWix] sending report${requestId ? `, requestId=${requestId}` : ''}`);
|
|
23
29
|
const fullMessage = requestId
|
|
24
30
|
? `${message}\n\nrequest id: ${requestId}`
|
|
25
31
|
: message;
|
|
@@ -37,7 +43,7 @@ export function addSupportTool(server, strategy, disableTools = [], toolDescript
|
|
|
37
43
|
content: [
|
|
38
44
|
{
|
|
39
45
|
type: 'text',
|
|
40
|
-
text: '
|
|
46
|
+
text: 'Report sent to Wix. Let the user know it was delivered — note that reports cannot be replied to or tracked.'
|
|
41
47
|
}
|
|
42
48
|
]
|
|
43
49
|
};
|
|
@@ -55,7 +61,7 @@ export function addSupportTool(server, strategy, disableTools = [], toolDescript
|
|
|
55
61
|
}
|
|
56
62
|
}
|
|
57
63
|
setToolBiParams({ requestId: feedbackRequestId });
|
|
58
|
-
const errorMessage = `Failed to send
|
|
64
|
+
const errorMessage = `Failed to send the report to Wix: ${error}.${errorDetails}${feedbackRequestId ? ` Request ID: ${feedbackRequestId}` : ''}`;
|
|
59
65
|
logger.error(errorMessage);
|
|
60
66
|
throw new Error(errorMessage);
|
|
61
67
|
}
|
|
@@ -107,7 +107,8 @@ declare const VALID_DOCS_TOOLS: readonly [
|
|
|
107
107
|
"VELO",
|
|
108
108
|
"BUSINESS_SOLUTIONS",
|
|
109
109
|
"CLI",
|
|
110
|
-
"OVERVIEW"
|
|
110
|
+
"OVERVIEW",
|
|
111
|
+
"HELP_CENTER"
|
|
111
112
|
];
|
|
112
113
|
export type DocsTool = (typeof VALID_DOCS_TOOLS)[number];
|
|
113
114
|
/**
|
|
@@ -151,16 +152,27 @@ export interface DocsToolsOptions {
|
|
|
151
152
|
commitHash?: string;
|
|
152
153
|
/** Tags to filter skills by (e.g. ['velo', 'cms']) */
|
|
153
154
|
skillsTags?: string[];
|
|
155
|
+
/** Append the management recipes list (every recipe by area, each a link to its article) to the end of WixREADME, for every client. Default true; false leaves it out, and the README then points at the wix-manage skill and the public list only. */
|
|
156
|
+
readmeRecipesIndexEnabled?: boolean;
|
|
154
157
|
/** Enable dynamic context fetch */
|
|
155
158
|
dynamicContextEnabled?: boolean;
|
|
156
159
|
/** Enable partner context section in dynamic context output */
|
|
157
160
|
partnerContextEnabled?: boolean;
|
|
161
|
+
/** GetSiteContext renders the site's companion app. Off by default: only Aria (via the toolkit) needs it. */
|
|
162
|
+
includeCompanionApp?: boolean;
|
|
158
163
|
/** @deprecated Only CreateWixBusinessGuide read it, and that tool was removed; ignored. */
|
|
159
164
|
cliEnabled?: boolean | (() => boolean);
|
|
160
165
|
/** Use the new platformized semantic search API (POST /v1/docs/search) instead of the legacy GET endpoint */
|
|
161
166
|
usePlatformizedSearch?: boolean;
|
|
162
167
|
/** Use the platformized menu browse API (POST /v1/docs/menu/browse) instead of scraping the legacy get-menu-content markdown. Falls back to legacy on transport errors. */
|
|
163
168
|
usePlatformizedBrowse?: boolean;
|
|
169
|
+
/**
|
|
170
|
+
* The Mintlify docs site (see ./mintlify-docs.ts). Off by default.
|
|
171
|
+
* `'mintlify'`: REST and SDK search read the Mintlify KBs, and articles are
|
|
172
|
+
* read from Mintlify's `.md`. `'mintlify-links'`: search reads today's KBs and
|
|
173
|
+
* resolves the links in tool output to the Mintlify site.
|
|
174
|
+
*/
|
|
175
|
+
docsSite?: string;
|
|
164
176
|
}
|
|
165
177
|
export interface ToolHintsConfig {
|
|
166
178
|
readOnlyHint?: boolean;
|
|
@@ -258,8 +270,8 @@ export interface WixToolkitApiConfig {
|
|
|
258
270
|
toolHints?: Record<string, ToolHintsConfig>;
|
|
259
271
|
/**
|
|
260
272
|
* Max response size in chars before truncation. Applies to CallWixSiteAPI/
|
|
261
|
-
* ListWixSites/ManageWixSite (default: 50,000)
|
|
262
|
-
* SearchWixAPISpec (default:
|
|
273
|
+
* ListWixSites/ManageWixSite (default: 50,000), ExecuteWixAPI (default:
|
|
274
|
+
* 100,000) and SearchWixAPISpec (default: 64,000). Always clamped to a hard ceiling
|
|
263
275
|
* regardless of what's requested here — see MAX_ALLOWED_RESPONSE_CHARS.
|
|
264
276
|
*/
|
|
265
277
|
maxResponseSize?: number;
|
|
@@ -416,13 +428,6 @@ export declare const SYSTEM_REMINDER: string;
|
|
|
416
428
|
*/
|
|
417
429
|
export declare const defaultToolDescriptions: Record<string, string>;
|
|
418
430
|
export declare const executeCodeModeToolDescriptions: Record<string, string>;
|
|
419
|
-
/**
|
|
420
|
-
* Default readme docs - content for WixREADME tool response.
|
|
421
|
-
* Assumes both ExecuteWixAPI and SearchWixAPISpec are available (execute-and-search mode).
|
|
422
|
-
*
|
|
423
|
-
* Joined rather than interpolated into one `dedent` — `dedent` reads indentation from the literal
|
|
424
|
-
* parts only, so a multi-line interpolation gets flattened.
|
|
425
|
-
*/
|
|
426
431
|
export declare const defaultReadmeDocs: ReadmeDocConfig$1[];
|
|
427
432
|
/**
|
|
428
433
|
* Merge base config with overrides
|
|
@@ -107,7 +107,8 @@ declare const VALID_DOCS_TOOLS: readonly [
|
|
|
107
107
|
"VELO",
|
|
108
108
|
"BUSINESS_SOLUTIONS",
|
|
109
109
|
"CLI",
|
|
110
|
-
"OVERVIEW"
|
|
110
|
+
"OVERVIEW",
|
|
111
|
+
"HELP_CENTER"
|
|
111
112
|
];
|
|
112
113
|
export type DocsTool = (typeof VALID_DOCS_TOOLS)[number];
|
|
113
114
|
/**
|
|
@@ -151,16 +152,27 @@ export interface DocsToolsOptions {
|
|
|
151
152
|
commitHash?: string;
|
|
152
153
|
/** Tags to filter skills by (e.g. ['velo', 'cms']) */
|
|
153
154
|
skillsTags?: string[];
|
|
155
|
+
/** Append the management recipes list (every recipe by area, each a link to its article) to the end of WixREADME, for every client. Default true; false leaves it out, and the README then points at the wix-manage skill and the public list only. */
|
|
156
|
+
readmeRecipesIndexEnabled?: boolean;
|
|
154
157
|
/** Enable dynamic context fetch */
|
|
155
158
|
dynamicContextEnabled?: boolean;
|
|
156
159
|
/** Enable partner context section in dynamic context output */
|
|
157
160
|
partnerContextEnabled?: boolean;
|
|
161
|
+
/** GetSiteContext renders the site's companion app. Off by default: only Aria (via the toolkit) needs it. */
|
|
162
|
+
includeCompanionApp?: boolean;
|
|
158
163
|
/** @deprecated Only CreateWixBusinessGuide read it, and that tool was removed; ignored. */
|
|
159
164
|
cliEnabled?: boolean | (() => boolean);
|
|
160
165
|
/** Use the new platformized semantic search API (POST /v1/docs/search) instead of the legacy GET endpoint */
|
|
161
166
|
usePlatformizedSearch?: boolean;
|
|
162
167
|
/** Use the platformized menu browse API (POST /v1/docs/menu/browse) instead of scraping the legacy get-menu-content markdown. Falls back to legacy on transport errors. */
|
|
163
168
|
usePlatformizedBrowse?: boolean;
|
|
169
|
+
/**
|
|
170
|
+
* The Mintlify docs site (see ./mintlify-docs.ts). Off by default.
|
|
171
|
+
* `'mintlify'`: REST and SDK search read the Mintlify KBs, and articles are
|
|
172
|
+
* read from Mintlify's `.md`. `'mintlify-links'`: search reads today's KBs and
|
|
173
|
+
* resolves the links in tool output to the Mintlify site.
|
|
174
|
+
*/
|
|
175
|
+
docsSite?: string;
|
|
164
176
|
}
|
|
165
177
|
export interface ToolHintsConfig {
|
|
166
178
|
readOnlyHint?: boolean;
|
|
@@ -258,8 +270,8 @@ export interface WixToolkitApiConfig {
|
|
|
258
270
|
toolHints?: Record<string, ToolHintsConfig>;
|
|
259
271
|
/**
|
|
260
272
|
* Max response size in chars before truncation. Applies to CallWixSiteAPI/
|
|
261
|
-
* ListWixSites/ManageWixSite (default: 50,000)
|
|
262
|
-
* SearchWixAPISpec (default:
|
|
273
|
+
* ListWixSites/ManageWixSite (default: 50,000), ExecuteWixAPI (default:
|
|
274
|
+
* 100,000) and SearchWixAPISpec (default: 64,000). Always clamped to a hard ceiling
|
|
263
275
|
* regardless of what's requested here — see MAX_ALLOWED_RESPONSE_CHARS.
|
|
264
276
|
*/
|
|
265
277
|
maxResponseSize?: number;
|
|
@@ -416,13 +428,6 @@ export declare const SYSTEM_REMINDER: string;
|
|
|
416
428
|
*/
|
|
417
429
|
export declare const defaultToolDescriptions: Record<string, string>;
|
|
418
430
|
export declare const executeCodeModeToolDescriptions: Record<string, string>;
|
|
419
|
-
/**
|
|
420
|
-
* Default readme docs - content for WixREADME tool response.
|
|
421
|
-
* Assumes both ExecuteWixAPI and SearchWixAPISpec are available (execute-and-search mode).
|
|
422
|
-
*
|
|
423
|
-
* Joined rather than interpolated into one `dedent` — `dedent` reads indentation from the literal
|
|
424
|
-
* parts only, so a multi-line interpolation gets flattened.
|
|
425
|
-
*/
|
|
426
431
|
export declare const defaultReadmeDocs: ReadmeDocConfig$1[];
|
|
427
432
|
/**
|
|
428
433
|
* Merge base config with overrides
|
package/build/dts/toolkit.d.ts
CHANGED
|
@@ -107,8 +107,8 @@ export interface WixToolkitApiConfig {
|
|
|
107
107
|
toolHints?: Record<string, ToolHintsConfig>;
|
|
108
108
|
/**
|
|
109
109
|
* Max response size in chars before truncation. Applies to CallWixSiteAPI/
|
|
110
|
-
* ListWixSites/ManageWixSite (default: 50,000)
|
|
111
|
-
* SearchWixAPISpec (default:
|
|
110
|
+
* ListWixSites/ManageWixSite (default: 50,000), ExecuteWixAPI (default:
|
|
111
|
+
* 100,000) and SearchWixAPISpec (default: 64,000). Always clamped to a hard ceiling
|
|
112
112
|
* regardless of what's requested here — see MAX_ALLOWED_RESPONSE_CHARS.
|
|
113
113
|
*/
|
|
114
114
|
maxResponseSize?: number;
|
package/build/dts/toolkit.js
CHANGED
|
@@ -42,6 +42,7 @@ import { createBiLogger } from './infra/bi-logger.js';
|
|
|
42
42
|
import { DEV_ENVIRONMENTS, getEnvironment } from './infra/environment.js';
|
|
43
43
|
import { logger } from './infra/logger.js';
|
|
44
44
|
import { createToolBiEvent, extractText, formatToolResultAdditionalFields } from './infra/tool-bi.js';
|
|
45
|
+
import { serializeToolParamsForBi } from './infra/redact-personal-data.js';
|
|
45
46
|
/**
|
|
46
47
|
* Normalize auth config into a McpAuthenticationStrategy.
|
|
47
48
|
*/
|
|
@@ -177,6 +178,7 @@ export function createWixToolkit(options) {
|
|
|
177
178
|
readmeDocs,
|
|
178
179
|
authStrategy,
|
|
179
180
|
dynamicContextEnabled: true,
|
|
181
|
+
includeCompanionApp: true,
|
|
180
182
|
// README-free defaults first so consumer overrides still win.
|
|
181
183
|
toolDescriptions: {
|
|
182
184
|
...descriptionsWithoutReadme,
|
|
@@ -189,6 +191,7 @@ export function createWixToolkit(options) {
|
|
|
189
191
|
addDocsTools(server, undefined, {
|
|
190
192
|
authStrategy,
|
|
191
193
|
dynamicContextEnabled: true,
|
|
194
|
+
includeCompanionApp: true,
|
|
192
195
|
toolDescriptions: descriptionsWithoutReadme
|
|
193
196
|
});
|
|
194
197
|
}
|
|
@@ -214,7 +217,9 @@ export function createWixToolkit(options) {
|
|
|
214
217
|
authStrategy,
|
|
215
218
|
disableTools,
|
|
216
219
|
toolDescriptions: effectiveToolDescriptions,
|
|
217
|
-
maxResponseSize
|
|
220
|
+
maxResponseSize,
|
|
221
|
+
// The connection's docs site (`docs.docsSite`) applies to spec search too.
|
|
222
|
+
docsSite: docs?.docsSite
|
|
218
223
|
});
|
|
219
224
|
}
|
|
220
225
|
if (requestedTools.has('ExecuteWixAPI') &&
|
|
@@ -309,7 +314,7 @@ export function createWixToolkit(options) {
|
|
|
309
314
|
biLogger.updateDefaults({ _uuid: '' });
|
|
310
315
|
panorama.transaction(toolName).start({
|
|
311
316
|
toolInvocationId,
|
|
312
|
-
params:
|
|
317
|
+
params: serializeToolParamsForBi(mergedArgs)
|
|
313
318
|
});
|
|
314
319
|
}
|
|
315
320
|
const startTime = performance.now();
|
|
@@ -327,7 +332,8 @@ export function createWixToolkit(options) {
|
|
|
327
332
|
else {
|
|
328
333
|
additionalFields = formatToolResultAdditionalFields(cbResult, {
|
|
329
334
|
returnedRows: toolBiParams.returnedRows,
|
|
330
|
-
originalLength: toolBiParams.originalLength
|
|
335
|
+
originalLength: toolBiParams.originalLength,
|
|
336
|
+
upload: toolBiParams.upload
|
|
331
337
|
}, { name: clientName });
|
|
332
338
|
}
|
|
333
339
|
// Panorama: finish or report error
|
|
@@ -342,7 +348,7 @@ export function createWixToolkit(options) {
|
|
|
342
348
|
context: {
|
|
343
349
|
toolName,
|
|
344
350
|
toolInvocationId,
|
|
345
|
-
params:
|
|
351
|
+
params: serializeToolParamsForBi(mergedArgs),
|
|
346
352
|
error: JSON.stringify(cbResult, null, 2)
|
|
347
353
|
}
|
|
348
354
|
});
|
|
@@ -361,7 +367,7 @@ export function createWixToolkit(options) {
|
|
|
361
367
|
context: {
|
|
362
368
|
toolName,
|
|
363
369
|
toolInvocationId,
|
|
364
|
-
params:
|
|
370
|
+
params: serializeToolParamsForBi(mergedArgs),
|
|
365
371
|
error: errorBody
|
|
366
372
|
}
|
|
367
373
|
});
|
|
@@ -394,7 +400,7 @@ export function createWixToolkit(options) {
|
|
|
394
400
|
errorBody,
|
|
395
401
|
toolInvocationId,
|
|
396
402
|
toolName,
|
|
397
|
-
params:
|
|
403
|
+
params: serializeToolParamsForBi(mergedArgs),
|
|
398
404
|
origin: nodeEnv,
|
|
399
405
|
sessionId,
|
|
400
406
|
executionResult: toolSucceeded ? 'Success' : 'Error',
|
|
@@ -447,7 +453,8 @@ export function createWixToolkit(options) {
|
|
|
447
453
|
const httpClient = new HttpClient();
|
|
448
454
|
return ((await getDynamicContext(authStrategy, httpClient, defaults, {
|
|
449
455
|
partnerContextEnabled: true,
|
|
450
|
-
includeAccountContext: true
|
|
456
|
+
includeAccountContext: true,
|
|
457
|
+
includeCompanionApp: true
|
|
451
458
|
})) || null);
|
|
452
459
|
}
|
|
453
460
|
catch {
|