@wix/ditto-codegen-public 1.0.466 → 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/dist/out.js
CHANGED
|
@@ -11724,8 +11724,9 @@ var require_model_knobs = __commonJS({
|
|
|
11724
11724
|
exports2.getSmallReasoningEffort = getSmallReasoningEffort;
|
|
11725
11725
|
exports2.hasSmallReasoningEffortOverride = hasSmallReasoningEffortOverride;
|
|
11726
11726
|
exports2.getOpenAiServiceTier = getOpenAiServiceTier;
|
|
11727
|
-
exports2.DEFAULT_MODEL = "
|
|
11728
|
-
exports2.DEFAULT_SMALL_MODEL = "
|
|
11727
|
+
exports2.DEFAULT_MODEL = "openai/gpt-6-sol";
|
|
11728
|
+
exports2.DEFAULT_SMALL_MODEL = "openai/gpt-6-luna";
|
|
11729
|
+
var DEFAULT_REASONING_EFFORT = "low";
|
|
11729
11730
|
var SMALL_MODEL_REASONING_EFFORT = "medium";
|
|
11730
11731
|
var REASONING_EFFORTS = ["xhigh", "high", "medium", "low"];
|
|
11731
11732
|
var VALID_OPENAI_SERVICE_TIERS = [
|
|
@@ -11763,8 +11764,9 @@ var require_model_knobs = __commonJS({
|
|
|
11763
11764
|
}
|
|
11764
11765
|
function getReasoningEffort() {
|
|
11765
11766
|
const effort = readEnumEnv("CODEGEN_REASONING_EFFORT", REASONING_EFFORTS);
|
|
11766
|
-
if (!effort)
|
|
11767
|
-
return void 0;
|
|
11767
|
+
if (!effort) {
|
|
11768
|
+
return hasModelOverride() || hasSmallModelOverride() ? void 0 : DEFAULT_REASONING_EFFORT;
|
|
11769
|
+
}
|
|
11768
11770
|
if (!isOpenAiModel(getModel()) || !isOpenAiModel(getSmallModel())) {
|
|
11769
11771
|
throw new Error("CODEGEN_REASONING_EFFORT requires BOTH the main and small models to be openai/* \u2014 set CODEGEN_MODEL_OVERRIDE and CODEGEN_SMALL_MODEL_OVERRIDE (reasoning-effort variants are only supported on openai models).");
|
|
11770
11772
|
}
|
|
@@ -14232,7 +14234,7 @@ var require_brik_import = __commonJS({
|
|
|
14232
14234
|
|
|
14233
14235
|
If \`.wix/agentInput/brikMeta.json\` exists AND its \`brikMeta\` object has \`promptVariant\` set to \`skill-v1\`, this job is a Brik tool import: you MUST invoke the \`wix-brik\` skill FIRST and follow it exactly. It owns the import itself - scaffolding the Editor React Component, running the deterministic import script over \`.wix/agentInput/brikImport.json\`, splicing the tool's creative code, then installing dependencies and building plus generating the manifest. Do NOT derive the component's public surface yourself and do NOT re-tune the manifest.
|
|
14234
14236
|
|
|
14235
|
-
The skill does NOT replace step 5 of the workflow: its \`npx wix build\` transpiles without typechecking. Once its DONE WHEN checks pass, still
|
|
14237
|
+
The skill does NOT replace step 5 of the workflow: its \`npx wix build\` transpiles without typechecking. Once its DONE WHEN checks pass, still run step 5 as the workflow says, and fix whatever it reports in your spliced code only - never in the script-written surface.
|
|
14236
14238
|
|
|
14237
14239
|
If \`promptVariant\` is any other value, it is the legacy import pipeline's payload: ignore this rule and follow the job's own instructions.`;
|
|
14238
14240
|
}
|
|
@@ -14934,7 +14936,7 @@ var require_codegen_rules = __commonJS({
|
|
|
14934
14936
|
};
|
|
14935
14937
|
var DIRECT_VALIDATION = {
|
|
14936
14938
|
toolRule: "- `validate` (tsc + build) \u2014 you call it yourself at step 5. Do NOT delegate it.",
|
|
14937
|
-
step: `5. **Validate**: Call \`validate({ runBuild: true })\` yourself \u2014 it typechecks AND builds in a single pass (tsc runs first and fails fast before the build). Fix any errors and re-run until it passes. Pass installDeps: true only if package.json changed and npm install was not already run in this session. Do NOT delegate this to a subagent, and do NOT make a separate tsc-only call first \u2014 the single runBuild pass already fails fast on type errors. Do NOT move on until the build is clean. After the build is clean, if you created or modified an EDITOR_REACT_COMPONENT extension in this task, run \`npx wix generate manifest\` via bash (idempotent).`
|
|
14939
|
+
step: `5. **Validate**: Call \`validate({ runBuild: true })\` yourself \u2014 it typechecks AND builds in a single pass (tsc runs first and fails fast before the build). Fix any errors and re-run until it passes. Pass installDeps: true only if package.json changed and npm install was not already run in this session. Do NOT delegate this to a subagent, and do NOT make a separate tsc-only call first \u2014 the single runBuild pass already fails fast on type errors. NEVER force a green build: no \`as any\`, no \`@ts-ignore\`, no NEW \`@ts-expect-error\`, no switching a correct named import to \`import * as\`, and no changing runtime behaviour (e.g. unwanted \`defaultProps\` values) or deleting the failing code just to satisfy tsc. Do NOT move on until the build is clean. After the build is clean, if you created or modified an EDITOR_REACT_COMPONENT extension in this task, run \`npx wix generate manifest\` via bash (idempotent).`
|
|
14938
14940
|
};
|
|
14939
14941
|
var buildCoreRules = (validation) => `CORE PRINCIPLES:
|
|
14940
14942
|
- Do NOT invent or assume new types, modules, functions, props, events, or imports.
|
|
@@ -14994,7 +14996,7 @@ CRITICAL: Only include permissions you have explicitly seen in the Wix SDK docum
|
|
|
14994
14996
|
|
|
14995
14997
|
The \`required-permissions\` tool records and surfaces permissions to the user automatically \u2014 NEVER mention permissions/scopes (IDs or names) in your output, or tell the user to grant them.`;
|
|
14996
14998
|
function isValidatorSubagentSkipped() {
|
|
14997
|
-
return (0, model_knobs_1.readEnumEnv)("CODEGEN_RULES_NO_VALIDATOR", ["1"])
|
|
14999
|
+
return (0, model_knobs_1.readEnumEnv)("CODEGEN_RULES_NO_VALIDATOR", ["0", "1"]) !== "0";
|
|
14998
15000
|
}
|
|
14999
15001
|
function buildCodegenRules(environmentIdentity) {
|
|
15000
15002
|
const validation = isValidatorSubagentSkipped() ? DIRECT_VALIDATION : DELEGATED_VALIDATION;
|
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
|
}
|