@wix/mcp 1.0.8 → 1.0.10
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 +99 -95
- package/build/bin-standalone.js +98 -34
- package/build/bin-standalone.js.map +4 -4
- package/build/cjs/index.cjs +24140 -0
- package/build/cjs/index.cjs.map +7 -0
- package/build/{api-call → dts/api-call}/index.d.ts +1 -0
- package/build/dts/api-call/index.d.ts.map +1 -0
- package/build/{api-call → dts/api-call}/index.js +1 -0
- package/build/dts/api-call/index.js.map +1 -0
- package/build/{auth → dts/auth}/index.d.ts +1 -0
- package/build/dts/auth/index.d.ts.map +1 -0
- package/build/dts/auth/index.js +2 -0
- package/build/dts/auth/index.js.map +1 -0
- package/build/{bin.d.ts → dts/bin.d.ts} +2 -1
- package/build/dts/bin.d.ts.map +1 -0
- package/build/{bin.js → dts/bin.js} +11 -1
- package/build/dts/bin.js.map +1 -0
- package/build/{cli-tools → dts/cli-tools}/cli.d.ts +1 -0
- package/build/dts/cli-tools/cli.d.ts.map +1 -0
- package/build/{cli-tools → dts/cli-tools}/cli.js +1 -0
- package/build/dts/cli-tools/cli.js.map +1 -0
- package/build/{cli-tools → dts/cli-tools}/utils.d.ts +1 -0
- package/build/dts/cli-tools/utils.d.ts.map +1 -0
- package/build/{cli-tools → dts/cli-tools}/utils.js +1 -0
- package/build/dts/cli-tools/utils.js.map +1 -0
- package/build/{docs → dts/docs}/docs.d.ts +1 -0
- package/build/dts/docs/docs.d.ts.map +1 -0
- package/build/{docs → dts/docs}/docs.js +2 -11
- package/build/dts/docs/docs.js.map +1 -0
- package/build/dts/docs/fetch-article.d.ts +3 -0
- package/build/dts/docs/fetch-article.d.ts.map +1 -0
- package/build/dts/docs/fetch-article.js +20 -0
- package/build/dts/docs/fetch-article.js.map +1 -0
- package/build/dts/docs/get-to-know.d.ts +3 -0
- package/build/dts/docs/get-to-know.d.ts.map +1 -0
- package/build/dts/docs/get-to-know.js +42 -0
- package/build/dts/docs/get-to-know.js.map +1 -0
- package/build/{docs → dts/docs}/long-content.d.ts +1 -0
- package/build/dts/docs/long-content.d.ts.map +1 -0
- package/build/{docs → dts/docs}/long-content.js +1 -0
- package/build/dts/docs/long-content.js.map +1 -0
- package/build/{docs → dts/docs}/semanticSearch.d.ts +1 -0
- package/build/dts/docs/semanticSearch.d.ts.map +1 -0
- package/build/{docs → dts/docs}/semanticSearch.js +1 -0
- package/build/dts/docs/semanticSearch.js.map +1 -0
- package/build/dts/docs/semanticSearch.test.d.ts +2 -0
- package/build/dts/docs/semanticSearch.test.d.ts.map +1 -0
- package/build/{docs → dts/docs}/semanticSearch.test.js +1 -0
- package/build/dts/docs/semanticSearch.test.js.map +1 -0
- package/build/{index.d.ts → dts/index.d.ts} +2 -0
- package/build/dts/index.d.ts.map +1 -0
- package/build/{index.js → dts/index.js} +2 -0
- package/build/dts/index.js.map +1 -0
- package/build/{infra → dts/infra}/bi-logger.d.ts +1 -0
- package/build/dts/infra/bi-logger.d.ts.map +1 -0
- package/build/{infra → dts/infra}/bi-logger.js +1 -0
- package/build/dts/infra/bi-logger.js.map +1 -0
- package/build/{infra → dts/infra}/environment.d.ts +1 -0
- package/build/dts/infra/environment.d.ts.map +1 -0
- package/build/{infra → dts/infra}/environment.js +1 -0
- package/build/dts/infra/environment.js.map +1 -0
- package/build/{infra → dts/infra}/logger.d.ts +1 -0
- package/build/dts/infra/logger.d.ts.map +1 -0
- package/build/{infra → dts/infra}/logger.js +1 -0
- package/build/dts/infra/logger.js.map +1 -0
- package/build/{infra → dts/infra}/panorama.d.ts +1 -0
- package/build/dts/infra/panorama.d.ts.map +1 -0
- package/build/{infra → dts/infra}/panorama.js +1 -0
- package/build/dts/infra/panorama.js.map +1 -0
- package/build/dts/infra/sentry.d.ts +2 -0
- package/build/dts/infra/sentry.d.ts.map +1 -0
- package/build/{infra → dts/infra}/sentry.js +1 -0
- package/build/dts/infra/sentry.js.map +1 -0
- package/build/{interactive-command-tools → dts/interactive-command-tools}/eventually.d.ts +1 -0
- package/build/dts/interactive-command-tools/eventually.d.ts.map +1 -0
- package/build/{interactive-command-tools → dts/interactive-command-tools}/eventually.js +1 -0
- package/build/dts/interactive-command-tools/eventually.js.map +1 -0
- package/build/{interactive-command-tools → dts/interactive-command-tools}/handleStdout.d.ts +1 -0
- package/build/dts/interactive-command-tools/handleStdout.d.ts.map +1 -0
- package/build/{interactive-command-tools → dts/interactive-command-tools}/handleStdout.js +1 -0
- package/build/dts/interactive-command-tools/handleStdout.js.map +1 -0
- package/build/{interactive-command-tools → dts/interactive-command-tools}/interactive-command-utils.d.ts +1 -0
- package/build/dts/interactive-command-tools/interactive-command-utils.d.ts.map +1 -0
- package/build/{interactive-command-tools → dts/interactive-command-tools}/interactive-command-utils.js +1 -0
- package/build/dts/interactive-command-tools/interactive-command-utils.js.map +1 -0
- package/build/{resources → dts/resources}/docs.d.ts +1 -0
- package/build/dts/resources/docs.d.ts.map +1 -0
- package/build/{resources → dts/resources}/docs.js +1 -0
- package/build/dts/resources/docs.js.map +1 -0
- package/build/{support → dts/support}/index.d.ts +1 -0
- package/build/dts/support/index.d.ts.map +1 -0
- package/build/{support → dts/support}/index.js +1 -0
- package/build/dts/support/index.js.map +1 -0
- package/build/{tool-utils.d.ts → dts/tool-utils.d.ts} +1 -0
- package/build/dts/tool-utils.d.ts.map +1 -0
- package/build/{tool-utils.js → dts/tool-utils.js} +1 -0
- package/build/dts/tool-utils.js.map +1 -0
- package/build/dts/tool-utils.spec.d.ts +2 -0
- package/build/dts/tool-utils.spec.d.ts.map +1 -0
- package/build/{tool-utils.spec.js → dts/tool-utils.spec.js} +1 -0
- package/build/dts/tool-utils.spec.js.map +1 -0
- package/build/{wix-mcp-server.d.ts → dts/wix-mcp-server.d.ts} +1 -0
- package/build/dts/wix-mcp-server.d.ts.map +1 -0
- package/build/{wix-mcp-server.js → dts/wix-mcp-server.js} +1 -0
- package/build/dts/wix-mcp-server.js.map +1 -0
- package/build/{index-standalone.js → esm/index.js} +59 -10
- package/build/{index-standalone.js.map → esm/index.js.map} +4 -4
- package/package.json +8 -5
- package/build/auth/index.js +0 -1
- package/build/docs/semanticSearch.test.d.ts +0 -1
- package/build/infra/sentry.d.ts +0 -1
- package/build/tool-utils.spec.d.ts +0 -1
package/README.md
CHANGED
|
@@ -1,164 +1,169 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Wix MCP
|
|
2
2
|
|
|
3
|
-
##
|
|
3
|
+
## Installation & Usage
|
|
4
4
|
|
|
5
|
+
### From npm Package
|
|
6
|
+
|
|
7
|
+
```sh
|
|
8
|
+
npx @wix/mcp
|
|
5
9
|
```
|
|
6
|
-
|
|
7
|
-
|
|
10
|
+
|
|
11
|
+
### Local Development
|
|
12
|
+
|
|
13
|
+
1. Clone the repository
|
|
14
|
+
2. Install dependencies
|
|
15
|
+
3. Build the project
|
|
16
|
+
|
|
17
|
+
Run locally with:
|
|
18
|
+
|
|
19
|
+
```sh
|
|
20
|
+
npx /Users/absolute/path/to/repo/dir/.
|
|
8
21
|
```
|
|
9
22
|
|
|
10
|
-
|
|
23
|
+
Or directly with Node:
|
|
24
|
+
|
|
25
|
+
```sh
|
|
26
|
+
node /Users/absolute/path/to/build/bin-standalone.js
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
## Configuration Options
|
|
30
|
+
|
|
31
|
+
### Tool Selection
|
|
11
32
|
|
|
12
|
-
|
|
33
|
+
Enable specific standard tools (all enabled by default):
|
|
13
34
|
|
|
14
35
|
```
|
|
15
|
-
|
|
16
|
-
args: ["/Users/absolute/path/to/repo/dir/."]
|
|
36
|
+
--tools=WDS,REST,SDK,WIX_HEADLESS,BUILD_APPS
|
|
17
37
|
```
|
|
18
38
|
|
|
39
|
+
### Experimental Tools
|
|
40
|
+
|
|
41
|
+
Enable experimental tools (disabled by default):
|
|
42
|
+
|
|
19
43
|
```
|
|
20
|
-
|
|
21
|
-
args: ["/Users/absolute/path/to/build/bin.js"]
|
|
44
|
+
--experimental=WIX_API,CLI_COMMAND
|
|
22
45
|
```
|
|
23
46
|
|
|
24
|
-
|
|
47
|
+
### CLI Mode
|
|
25
48
|
|
|
26
|
-
|
|
27
|
-
`--tools=WDS,REST,SDK,WIX_HEADLESS,BUILD_APPS` - specify which standard tools to enable (if not specified, all standard tools are enabled)
|
|
49
|
+
Specify CLI mode:
|
|
28
50
|
|
|
29
|
-
|
|
30
|
-
|
|
51
|
+
```
|
|
52
|
+
--cli=wix-one
|
|
53
|
+
```
|
|
31
54
|
|
|
32
|
-
###
|
|
33
|
-
`--cli=wix-one` - specifies to use Wix One CLI mode (if not specified, default CLI mode is used)
|
|
55
|
+
### Logger
|
|
34
56
|
|
|
35
|
-
|
|
36
|
-
`--logger=mcp` - log to MCP server (default)
|
|
37
|
-
`--logger=file` - log to file (in `~/wix-mcp-log.txt`)
|
|
57
|
+
Set logging output:
|
|
38
58
|
|
|
39
|
-
|
|
59
|
+
- `--logger=mcp` (default, logs to MCP server)
|
|
60
|
+
- `--logger=file` (logs to `~/wix-mcp-log.txt`)
|
|
40
61
|
|
|
41
|
-
|
|
42
|
-
- `WDS`: Wix Design System Documentation tools (MCP tool: `SearchWixWDSDocumentation`)
|
|
43
|
-
- `REST`: Wix REST API Documentation tools (MCP tool: `SearchWixRESTDocumentation`)
|
|
44
|
-
- `SDK`: Wix SDK Documentation tools (MCP tool: `SearchWixSDKDocumentation`)
|
|
45
|
-
- `BUILD_APPS`: Build Apps Documentation tools (MCP tool: `SearchBuildAppsDocumentation`)
|
|
46
|
-
- `WIX_HEADLESS`: Wix Headless Documentation tools (MCP tool: `SearchWixHeadlessDocumentation`)
|
|
62
|
+
### Tool Reference
|
|
47
63
|
|
|
48
|
-
|
|
49
|
-
- `
|
|
50
|
-
- `
|
|
64
|
+
**Standard Tools:**
|
|
65
|
+
- `WDS`: Wix Design System Documentation (`SearchWixWDSDocumentation`)
|
|
66
|
+
- `REST`: Wix REST API Documentation (`SearchWixRESTDocumentation`)
|
|
67
|
+
- `SDK`: Wix SDK Documentation (`SearchWixSDKDocumentation`)
|
|
68
|
+
- `BUILD_APPS`: Build Apps Documentation (`SearchBuildAppsDocumentation`)
|
|
69
|
+
- `WIX_HEADLESS`: Wix Headless Documentation (`SearchWixHeadlessDocumentation`)
|
|
51
70
|
|
|
52
|
-
|
|
71
|
+
**Experimental Tools:**
|
|
72
|
+
- `WIX_API`: Wix API tools (`CallWixAPI`)
|
|
73
|
+
- `CLI_COMMAND`: CLI commands for Wix apps (`RunWixCliCommand`)
|
|
53
74
|
|
|
54
|
-
|
|
75
|
+
> Experimental tools are in early development and may have limited functionality or breaking changes. They must be explicitly enabled with `--experimental`.
|
|
55
76
|
|
|
56
|
-
|
|
77
|
+
## Resources
|
|
57
78
|
|
|
58
|
-
The resource feature provides access to Wix documentation
|
|
79
|
+
The resource feature provides access to Wix documentation via the MCP server:
|
|
59
80
|
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
81
|
+
- Fetches documentation indexes from specified Wix portals
|
|
82
|
+
- Makes documentation articles available as resources
|
|
83
|
+
- Allows fetching article content using the MCP protocol
|
|
63
84
|
|
|
64
|
-
Resources
|
|
65
|
-
It's exactly parallel to the real docs url, for example:
|
|
66
|
-
Docs URL: https://dev.wix.com/docs/picasso/wix-ai-docs/best-practices/sdk-best-practices
|
|
67
|
-
Resource URI: wix-docs://picasso/wix-ai-docs/best-practices/sdk-best-practices
|
|
85
|
+
Resources use the `wix-docs://` URI scheme, which maps to Wix Docs URLs:
|
|
68
86
|
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
to load all docs from the portal as resources
|
|
87
|
+
- Docs URL: `https://dev.wix.com/docs/...`
|
|
88
|
+
- Resource URI: `wix-docs://...`
|
|
72
89
|
|
|
90
|
+
To load all docs from a portal:
|
|
73
91
|
|
|
74
|
-
|
|
92
|
+
```
|
|
93
|
+
--portals=<docs-portal-name>
|
|
94
|
+
```
|
|
75
95
|
|
|
76
|
-
## Cursor
|
|
96
|
+
## Cursor Integration
|
|
77
97
|
|
|
78
|
-
|
|
98
|
+
### MCP Docs
|
|
79
99
|
|
|
80
|
-
|
|
100
|
+
See: https://docs.cursor.com/context/model-context-protocol
|
|
81
101
|
|
|
82
|
-
|
|
102
|
+
### Configuration (`~/.cursor/mcp.json`)
|
|
83
103
|
|
|
84
|
-
|
|
104
|
+
#### Using npm package
|
|
85
105
|
|
|
86
|
-
```
|
|
106
|
+
```json
|
|
87
107
|
{
|
|
88
108
|
"mcpServers": {
|
|
89
109
|
"wix-local-mcp": {
|
|
90
110
|
"command": "npx",
|
|
91
|
-
"args": [
|
|
92
|
-
"-y",
|
|
93
|
-
"@wix/mcp"
|
|
94
|
-
]
|
|
111
|
+
"args": ["-y", "@wix/mcp"]
|
|
95
112
|
}
|
|
96
113
|
}
|
|
97
114
|
}
|
|
98
115
|
```
|
|
99
116
|
|
|
100
|
-
|
|
101
|
-
|
|
117
|
+
#### Using local build
|
|
118
|
+
|
|
119
|
+
```json
|
|
102
120
|
{
|
|
103
121
|
"mcpServers": {
|
|
104
122
|
"wix-local-mcp": {
|
|
105
123
|
"command": "npx",
|
|
106
|
-
"args": [
|
|
107
|
-
"/Users/absolute/path/to/repo/dir/."
|
|
108
|
-
]
|
|
124
|
+
"args": ["/Users/absolute/path/to/repo/dir/."]
|
|
109
125
|
}
|
|
110
126
|
}
|
|
111
127
|
}
|
|
112
128
|
```
|
|
113
129
|
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
1. clone
|
|
117
|
-
2. build
|
|
130
|
+
#### Using Node
|
|
118
131
|
|
|
119
|
-
```
|
|
132
|
+
```json
|
|
120
133
|
{
|
|
121
134
|
"mcpServers": {
|
|
122
135
|
"wix-local-mcp": {
|
|
123
136
|
"command": "node",
|
|
124
|
-
"args": [
|
|
125
|
-
"/Users/absolute/path/to/build/bin.js"
|
|
126
|
-
]
|
|
137
|
+
"args": ["/Users/absolute/path/to/build/bin-standalone.js"]
|
|
127
138
|
}
|
|
128
139
|
}
|
|
129
140
|
}
|
|
130
141
|
```
|
|
131
142
|
|
|
132
|
-
|
|
143
|
+
## Troubleshooting
|
|
133
144
|
|
|
134
|
-
|
|
135
|
-
-
|
|
136
|
-
-
|
|
137
|
-
-
|
|
138
|
-
-
|
|
139
|
-
-
|
|
140
|
-
- make sure build files have permissions for cursor to access
|
|
141
|
-
- log should be written to `~/wix-mcp-log.txt`
|
|
142
|
-
- add .env file with `WIX_COOKIE=` to avoid rate limits on SDK tool use
|
|
145
|
+
- Check logs from Claude Desktop or Cursor
|
|
146
|
+
- For Node/fnm/nvm errors: ensure the latest Node version is set as default
|
|
147
|
+
- For npx errors: use `-y` and the correct npm registry
|
|
148
|
+
- Try specifying the full path to Node
|
|
149
|
+
- Try using Bun and `index.ts` directly
|
|
150
|
+
- Ensure build files have appropriate permissions
|
|
143
151
|
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
"PATH": "<path-to-your-nvm-node-version>/bin"
|
|
155
|
-
}
|
|
156
|
-
}
|
|
152
|
+
### NVM Example Fix
|
|
153
|
+
|
|
154
|
+
```json
|
|
155
|
+
"wix-mcp-remote-prod": {
|
|
156
|
+
"command": "npx",
|
|
157
|
+
"args": ["-y", "@wix/mcp-remote", "https://mcp.wix.com/sse"],
|
|
158
|
+
"env": {
|
|
159
|
+
"PATH": "<path-to-your-nvm-node-version>/bin"
|
|
160
|
+
}
|
|
161
|
+
}
|
|
157
162
|
```
|
|
158
163
|
|
|
159
|
-
|
|
164
|
+
### FNM Example Fix
|
|
160
165
|
|
|
161
|
-
```
|
|
166
|
+
```json
|
|
162
167
|
{
|
|
163
168
|
"mcpServers": {
|
|
164
169
|
"wix-mcp-remote-prod": {
|
|
@@ -172,5 +177,4 @@ https://docs.cursor.com/context/model-context-protocol
|
|
|
172
177
|
}
|
|
173
178
|
```
|
|
174
179
|
|
|
175
|
-
|
|
176
|
-
|
|
180
|
+
> Node 20 is required to build.
|
package/build/bin-standalone.js
CHANGED
|
@@ -5341,16 +5341,15 @@ var require_browser = __commonJS({
|
|
|
5341
5341
|
}
|
|
5342
5342
|
});
|
|
5343
5343
|
|
|
5344
|
-
// ../../node_modules/
|
|
5344
|
+
// ../../node_modules/has-flag/index.js
|
|
5345
5345
|
var require_has_flag = __commonJS({
|
|
5346
|
-
"../../node_modules/
|
|
5346
|
+
"../../node_modules/has-flag/index.js"(exports, module) {
|
|
5347
5347
|
"use strict";
|
|
5348
|
-
module.exports = (flag, argv) => {
|
|
5349
|
-
argv = argv || process.argv;
|
|
5348
|
+
module.exports = (flag, argv = process.argv) => {
|
|
5350
5349
|
const prefix = flag.startsWith("-") ? "" : flag.length === 1 ? "-" : "--";
|
|
5351
|
-
const
|
|
5352
|
-
const
|
|
5353
|
-
return
|
|
5350
|
+
const position = argv.indexOf(prefix + flag);
|
|
5351
|
+
const terminatorPosition = argv.indexOf("--");
|
|
5352
|
+
return position !== -1 && (terminatorPosition === -1 || position < terminatorPosition);
|
|
5354
5353
|
};
|
|
5355
5354
|
}
|
|
5356
5355
|
});
|
|
@@ -5360,16 +5359,23 @@ var require_supports_color = __commonJS({
|
|
|
5360
5359
|
"../../node_modules/supports-color/index.js"(exports, module) {
|
|
5361
5360
|
"use strict";
|
|
5362
5361
|
var os = __require("os");
|
|
5362
|
+
var tty = __require("tty");
|
|
5363
5363
|
var hasFlag = require_has_flag();
|
|
5364
|
-
var env = process
|
|
5364
|
+
var { env } = process;
|
|
5365
5365
|
var forceColor;
|
|
5366
|
-
if (hasFlag("no-color") || hasFlag("no-colors") || hasFlag("color=false")) {
|
|
5367
|
-
forceColor =
|
|
5366
|
+
if (hasFlag("no-color") || hasFlag("no-colors") || hasFlag("color=false") || hasFlag("color=never")) {
|
|
5367
|
+
forceColor = 0;
|
|
5368
5368
|
} else if (hasFlag("color") || hasFlag("colors") || hasFlag("color=true") || hasFlag("color=always")) {
|
|
5369
|
-
forceColor =
|
|
5369
|
+
forceColor = 1;
|
|
5370
5370
|
}
|
|
5371
5371
|
if ("FORCE_COLOR" in env) {
|
|
5372
|
-
|
|
5372
|
+
if (env.FORCE_COLOR === "true") {
|
|
5373
|
+
forceColor = 1;
|
|
5374
|
+
} else if (env.FORCE_COLOR === "false") {
|
|
5375
|
+
forceColor = 0;
|
|
5376
|
+
} else {
|
|
5377
|
+
forceColor = env.FORCE_COLOR.length === 0 ? 1 : Math.min(parseInt(env.FORCE_COLOR, 10), 3);
|
|
5378
|
+
}
|
|
5373
5379
|
}
|
|
5374
5380
|
function translateLevel(level) {
|
|
5375
5381
|
if (level === 0) {
|
|
@@ -5382,8 +5388,8 @@ var require_supports_color = __commonJS({
|
|
|
5382
5388
|
has16m: level >= 3
|
|
5383
5389
|
};
|
|
5384
5390
|
}
|
|
5385
|
-
function supportsColor(
|
|
5386
|
-
if (forceColor ===
|
|
5391
|
+
function supportsColor(haveStream, streamIsTTY) {
|
|
5392
|
+
if (forceColor === 0) {
|
|
5387
5393
|
return 0;
|
|
5388
5394
|
}
|
|
5389
5395
|
if (hasFlag("color=16m") || hasFlag("color=full") || hasFlag("color=truecolor")) {
|
|
@@ -5392,19 +5398,22 @@ var require_supports_color = __commonJS({
|
|
|
5392
5398
|
if (hasFlag("color=256")) {
|
|
5393
5399
|
return 2;
|
|
5394
5400
|
}
|
|
5395
|
-
if (
|
|
5401
|
+
if (haveStream && !streamIsTTY && forceColor === void 0) {
|
|
5396
5402
|
return 0;
|
|
5397
5403
|
}
|
|
5398
|
-
const min = forceColor
|
|
5404
|
+
const min = forceColor || 0;
|
|
5405
|
+
if (env.TERM === "dumb") {
|
|
5406
|
+
return min;
|
|
5407
|
+
}
|
|
5399
5408
|
if (process.platform === "win32") {
|
|
5400
5409
|
const osRelease = os.release().split(".");
|
|
5401
|
-
if (Number(
|
|
5410
|
+
if (Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) {
|
|
5402
5411
|
return Number(osRelease[2]) >= 14931 ? 3 : 2;
|
|
5403
5412
|
}
|
|
5404
5413
|
return 1;
|
|
5405
5414
|
}
|
|
5406
5415
|
if ("CI" in env) {
|
|
5407
|
-
if (["TRAVIS", "CIRCLECI", "APPVEYOR", "GITLAB_CI"].some((sign) => sign in env) || env.CI_NAME === "codeship") {
|
|
5416
|
+
if (["TRAVIS", "CIRCLECI", "APPVEYOR", "GITLAB_CI", "GITHUB_ACTIONS", "BUILDKITE"].some((sign) => sign in env) || env.CI_NAME === "codeship") {
|
|
5408
5417
|
return 1;
|
|
5409
5418
|
}
|
|
5410
5419
|
return min;
|
|
@@ -5433,19 +5442,16 @@ var require_supports_color = __commonJS({
|
|
|
5433
5442
|
if ("COLORTERM" in env) {
|
|
5434
5443
|
return 1;
|
|
5435
5444
|
}
|
|
5436
|
-
if (env.TERM === "dumb") {
|
|
5437
|
-
return min;
|
|
5438
|
-
}
|
|
5439
5445
|
return min;
|
|
5440
5446
|
}
|
|
5441
5447
|
function getSupportLevel(stream) {
|
|
5442
|
-
const level = supportsColor(stream);
|
|
5448
|
+
const level = supportsColor(stream, stream && stream.isTTY);
|
|
5443
5449
|
return translateLevel(level);
|
|
5444
5450
|
}
|
|
5445
5451
|
module.exports = {
|
|
5446
5452
|
supportsColor: getSupportLevel,
|
|
5447
|
-
stdout:
|
|
5448
|
-
stderr:
|
|
5453
|
+
stdout: translateLevel(supportsColor(true, tty.isatty(1))),
|
|
5454
|
+
stderr: translateLevel(supportsColor(true, tty.isatty(2)))
|
|
5449
5455
|
};
|
|
5450
5456
|
}
|
|
5451
5457
|
});
|
|
@@ -15001,6 +15007,27 @@ var runSemanticSearchAndFormat = async ({
|
|
|
15001
15007
|
|
|
15002
15008
|
// src/docs/docs.ts
|
|
15003
15009
|
import { captureException } from "@sentry/node";
|
|
15010
|
+
|
|
15011
|
+
// src/docs/fetch-article.ts
|
|
15012
|
+
async function fetchArticleContentFromDigor(httpClient, articleUrl, mode) {
|
|
15013
|
+
const url = new URL(`https://dev.wix.com/digor/api/get-article-content`);
|
|
15014
|
+
url.searchParams.set("articleUrl", articleUrl);
|
|
15015
|
+
const schema = mode === "methodSchema" ? "true" : "false";
|
|
15016
|
+
url.searchParams.set("schema", schema);
|
|
15017
|
+
logger.log(`Fetching resource from docs ${url.toString()}`);
|
|
15018
|
+
const { data } = await httpClient.get(url.toString());
|
|
15019
|
+
logger.log(`Fetched resource from docs: ${data.articleContent}`);
|
|
15020
|
+
return data.articleContent;
|
|
15021
|
+
}
|
|
15022
|
+
async function fetchArticleContent(httpClient, articleUrl, mode) {
|
|
15023
|
+
if (mode === "raw") {
|
|
15024
|
+
const { data: doc } = await httpClient.get(articleUrl);
|
|
15025
|
+
return doc;
|
|
15026
|
+
}
|
|
15027
|
+
return fetchArticleContentFromDigor(httpClient, articleUrl, mode);
|
|
15028
|
+
}
|
|
15029
|
+
|
|
15030
|
+
// src/docs/docs.ts
|
|
15004
15031
|
var VALID_DOCS_TOOLS = [
|
|
15005
15032
|
"WDS",
|
|
15006
15033
|
"REST",
|
|
@@ -15455,15 +15482,44 @@ var addDocsTools = (server2, allowedTools = [
|
|
|
15455
15482
|
}
|
|
15456
15483
|
);
|
|
15457
15484
|
};
|
|
15458
|
-
|
|
15459
|
-
|
|
15460
|
-
|
|
15461
|
-
|
|
15462
|
-
|
|
15463
|
-
|
|
15464
|
-
|
|
15465
|
-
|
|
15466
|
-
|
|
15485
|
+
|
|
15486
|
+
// src/docs/get-to-know.ts
|
|
15487
|
+
var defaultDocUrl = "https://dev.wix.com/docs/picasso/wix-ai-docs/rules/get-to-know-wix-llm-instructions";
|
|
15488
|
+
var DESCRIPTION = `\u{1F534} **REQUIRED FIRST STEP for all Wix tasks.** This tool is the primary guide for the Wix ecosystem, offering global setup instructions and current best practices.
|
|
15489
|
+
|
|
15490
|
+
**Rule: ALWAYS run this tool successfully BEFORE any other Wix-specific action (e.g., doc searches, API calls, coding). NO EXCEPTIONS.** Failing to do so will likely cause errors.
|
|
15491
|
+
|
|
15492
|
+
The information from this tool is foundational and MUST inform all subsequent Wix actions.
|
|
15493
|
+
|
|
15494
|
+
**Instructions for user requests:**
|
|
15495
|
+
|
|
15496
|
+
1. **Identify Wix concepts** relevant to the query (refer to ReadMe).
|
|
15497
|
+
2. **Read best practices:** For each concept, if a \`<best-practices>{url}</best-practices>\` document exists in ReadMe, use 'ReadFullDocsArticle' to access it.
|
|
15498
|
+
3. **Search:** If more information is needed, use 'SearchX' tools.`;
|
|
15499
|
+
async function addGetToKnowTools(server2, docUrl) {
|
|
15500
|
+
server2.tool("WixREADME", DESCRIPTION, async ({ httpClient }) => {
|
|
15501
|
+
try {
|
|
15502
|
+
const doc = docUrl ? await fetchArticleContent(httpClient, docUrl, "raw") : await fetchArticleContent(httpClient, defaultDocUrl, "article");
|
|
15503
|
+
return {
|
|
15504
|
+
content: [
|
|
15505
|
+
{
|
|
15506
|
+
type: "text",
|
|
15507
|
+
text: doc
|
|
15508
|
+
}
|
|
15509
|
+
]
|
|
15510
|
+
};
|
|
15511
|
+
} catch (error) {
|
|
15512
|
+
return {
|
|
15513
|
+
isError: true,
|
|
15514
|
+
content: [
|
|
15515
|
+
{
|
|
15516
|
+
type: "text",
|
|
15517
|
+
text: `Error fetching the document: ${error.message}`
|
|
15518
|
+
}
|
|
15519
|
+
]
|
|
15520
|
+
};
|
|
15521
|
+
}
|
|
15522
|
+
});
|
|
15467
15523
|
}
|
|
15468
15524
|
|
|
15469
15525
|
// src/cli-tools/cli.ts
|
|
@@ -16268,7 +16324,11 @@ var addDocsResources = async (server2, portals) => {
|
|
|
16268
16324
|
|
|
16269
16325
|
// src/bin.ts
|
|
16270
16326
|
var PUBLIC_TOOLS = [...VALID_DOCS_TOOLS];
|
|
16271
|
-
var EXPERIMENTAL_TOOLS = [
|
|
16327
|
+
var EXPERIMENTAL_TOOLS = [
|
|
16328
|
+
"WIX_API",
|
|
16329
|
+
"CLI_COMMAND",
|
|
16330
|
+
"GET_TO_KNOW_WIX"
|
|
16331
|
+
];
|
|
16272
16332
|
var DEFAULT_TOOLS = [...VALID_DOCS_TOOLS];
|
|
16273
16333
|
var parsedArgs = minimist(process.argv.slice(2));
|
|
16274
16334
|
function parseExperimentalArg() {
|
|
@@ -16342,6 +16402,10 @@ if (cliTools.length > 0) {
|
|
|
16342
16402
|
logger.log("Adding cli tools:", cliTools, "isWixOne:", isWixOne);
|
|
16343
16403
|
addCliTools(server, cliTools, isWixOne);
|
|
16344
16404
|
}
|
|
16405
|
+
if (activeTools.includes("GET_TO_KNOW_WIX")) {
|
|
16406
|
+
const docUrl = parsedArgs["get-to-know-wix-url"];
|
|
16407
|
+
await addGetToKnowTools(server, docUrl);
|
|
16408
|
+
}
|
|
16345
16409
|
try {
|
|
16346
16410
|
const portals = parsedArgs["portals"]?.split(",") || [];
|
|
16347
16411
|
if (portals.length > 0) {
|