@wix/ditto-codegen-public 1.0.467 → 1.0.468
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.
|
@@ -10,6 +10,36 @@ const execFileAsync = promisify(execFile);
|
|
|
10
10
|
const FEEDBACK_API_URL = "https://www.wixapis.com/mcp-serverless/v1/feedback";
|
|
11
11
|
const FEEDBACK_TIMEOUT_MS = 15_000;
|
|
12
12
|
|
|
13
|
+
const WIX_MCP_TOOLS = [
|
|
14
|
+
"SearchWixSDKDocumentation",
|
|
15
|
+
"ReadFullDocsArticle",
|
|
16
|
+
"ReadFullDocsMethodSchema",
|
|
17
|
+
"SearchWixAPISpec",
|
|
18
|
+
"BrowseWixRESTDocsMenu",
|
|
19
|
+
"CallWixSiteAPI",
|
|
20
|
+
"ExecuteWixAPI",
|
|
21
|
+
];
|
|
22
|
+
|
|
23
|
+
// Lookbehind rather than \b so opencode's "wix-mcp_<tool>" form matches too.
|
|
24
|
+
const WIX_DOCS_CITATION_RE = new RegExp(
|
|
25
|
+
`dev\\.wix\\.com|(?<![A-Za-z0-9])(?:${WIX_MCP_TOOLS.join("|")})\\b`,
|
|
26
|
+
);
|
|
27
|
+
|
|
28
|
+
const OUT_OF_SCOPE_RE = /\.md\b|\bskills?\b|@wix\/(?:patterns|design-system)\b/i;
|
|
29
|
+
|
|
30
|
+
export const MISSING_CITATION_REPLY =
|
|
31
|
+
"Not sent: the report doesn't cite a dev.wix.com URL or the wix-mcp tool you called " +
|
|
32
|
+
"(e.g. SearchWixSDKDocumentation, ReadFullDocsMethodSchema). Only wix-mcp and " +
|
|
33
|
+
"dev.wix.com docs problems belong here — skill references, skill scripts, docs in " +
|
|
34
|
+
"node_modules, and your own code are out of scope. If it is a wix-mcp problem, resend " +
|
|
35
|
+
"with the citation; otherwise continue your task.";
|
|
36
|
+
|
|
37
|
+
export const OUT_OF_SCOPE_REPLY =
|
|
38
|
+
"Not sent: the report mentions a skill, a .md reference, or @wix/patterns / " +
|
|
39
|
+
"@wix/design-system docs — none of those are wix-mcp or dev.wix.com docs problems. If " +
|
|
40
|
+
"part of it is a wix-mcp or dev.wix.com problem, resend only that part without " +
|
|
41
|
+
"mentioning them; otherwise continue your task.";
|
|
42
|
+
|
|
13
43
|
async function getWixAccessToken(): Promise<string> {
|
|
14
44
|
const { stdout } = await execFileAsync("wix", ["token", "--json"], {
|
|
15
45
|
timeout: 30_000,
|
|
@@ -39,10 +69,11 @@ export default tool({
|
|
|
39
69
|
"tools to the Wix MCP team: a search whose top results were off-target, a docs article " +
|
|
40
70
|
"or example that is wrong or missing the fields you needed, a method schema that " +
|
|
41
71
|
"doesn't match the installed SDK types, or a wix-mcp tool error. Include cases you " +
|
|
42
|
-
"recovered from. Do NOT report skill references (SKILL.md, references/*.md),
|
|
43
|
-
"docs in node_modules, your own mistakes, or the user's request —
|
|
44
|
-
"issues. Every report must cite the wix-mcp tool or dev.wix.com
|
|
45
|
-
"at most ONCE per task, covering every friction point you've
|
|
72
|
+
"recovered from. Do NOT report skill references (SKILL.md, references/*.md), skill " +
|
|
73
|
+
"scripts, package docs in node_modules, your own mistakes, or the user's request — " +
|
|
74
|
+
"those aren't wix-mcp issues. Every report must cite the wix-mcp tool or dev.wix.com " +
|
|
75
|
+
"URL involved. Call it at most ONCE per task, covering every friction point you've " +
|
|
76
|
+
"hit so far.",
|
|
46
77
|
args: {
|
|
47
78
|
message: tool.schema
|
|
48
79
|
.string()
|
|
@@ -63,6 +94,13 @@ export default tool({
|
|
|
63
94
|
),
|
|
64
95
|
},
|
|
65
96
|
async execute(args) {
|
|
97
|
+
if (!WIX_DOCS_CITATION_RE.test(args.message)) {
|
|
98
|
+
return MISSING_CITATION_REPLY;
|
|
99
|
+
}
|
|
100
|
+
if (OUT_OF_SCOPE_RE.test(args.message)) {
|
|
101
|
+
return OUT_OF_SCOPE_REPLY;
|
|
102
|
+
}
|
|
103
|
+
|
|
66
104
|
const message = [
|
|
67
105
|
buildProvenance(),
|
|
68
106
|
args.message,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wix/ditto-codegen-public",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.468",
|
|
4
4
|
"description": "AI-powered Wix CLI app generator - standalone executable",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"build": "node build.mjs",
|
|
@@ -29,5 +29,5 @@
|
|
|
29
29
|
"esbuild": "^0.27.2",
|
|
30
30
|
"vitest": "^4.0.16"
|
|
31
31
|
},
|
|
32
|
-
"falconPackageHash": "
|
|
32
|
+
"falconPackageHash": "a6a62e94e0a4a64426b44c65e0586dcf2965cb540f379be948120c0e"
|
|
33
33
|
}
|