@wix/ditto-codegen-public 1.0.487 → 1.0.489
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/dist/out.js +30 -6
- package/package.json +2 -2
package/dist/out.js
CHANGED
|
@@ -13812,14 +13812,15 @@ var require_vertical_installation = __commonJS({
|
|
|
13812
13812
|
|
|
13813
13813
|
Code written against a Wix app this site doesn't have compiles, saves, and then does nothing.
|
|
13814
13814
|
|
|
13815
|
-
For
|
|
13815
|
+
For any code that imports or calls a Wix vertical SDK (Stores, eCommerce, Bookings, Restaurants, Pricing Plans, Gift Cards, Blog, Events, Portfolio, Members Area, Forms, Loyalty Program, Donations):
|
|
13816
13816
|
|
|
13817
13817
|
1. **You MUST invoke the \`wix-site-installed-apps\` skill before your FIRST write of any kind** \u2014 not merely before the vertical code itself. The build workflow tells you to write each piece as soon as it is ready, so a dashboard shell written before you reach the vertical part is still work rule 2 will make you undo. Name the apps this request needs, by product name; ask in one call and reuse the answer.
|
|
13818
13818
|
2. **If any app comes back \`installed: false\`, STOP. Write no code at all** \u2014 not for that app, and not for the rest of the request either. Your reply is **one** short message to the site owner, naming the app and which parts of the request you did not attempt, and nothing else. Write the outcome, never the mechanism: no rule, no skill, no check or verdict, no app id or endpoint, and no sentence announcing that you are stopping \u2014 the user doesn't know what any of that is, and reading it as an error is the likeliest outcome. \\"Wix Events isn't installed on your site, so I couldn't build the upcoming-events page. Install Wix Events from your dashboard, then ask again and I'll build it.\\" \u2014 that shape, once. **If you have already created or modified files in this session, undo those changes before replying \u2014 path by path, naming each file you wrote, never a bulk revert of the working tree (\`git clean\`, \`git checkout .\`, \`git reset --hard\`, or any "discard all changes"), which also destroys work that was there before you** \u2014 a half-built app that saves is worse than either outcome this rule chooses between.
|
|
13819
13819
|
3. **Do not soften rule 2.** No partial build, no stub, no CMS collection standing in for the app, no "for when they install it" path, and no offering to build the parts that would work. The site owner installs the app, then asks again. **Where the OUTPUT MESSAGE instruction says to build the feature and list installing a dependent app as a "next step", this rule wins** \u2014 for a missing app there is no build, so there is no next step to list against it.
|
|
13820
13820
|
4. **\`installed: null\`, or the check itself failing: build, and say the app may need installing.** A verdict you can't trust never stops anything. The exception is a \`null\` carrying \`"reason":"not-installable"\` \u2014 the check refuses that name because there is no app behind it to install: build, and name nothing. Some plain \`null\`s are platform features with nothing to install either \u2014 contacts, coupons, automations and triggered emails, login and logged-in-only gating \u2014 so build and name nothing for those too.
|
|
13821
13821
|
5. **This outranks the plan.** A blueprint summary or extension description naming a missing app was written without knowing the site; rule 2 wins, and your reply says which planned parts you left unbuilt.
|
|
13822
|
-
6. **
|
|
13822
|
+
6. **Self-contained components are not gated.** A component that only displays content the site owner edits (static plans, prices, text, images) imports no vertical SDK, needs no app, and is never blocked by rules 1-5, even when its topic is an app's ("pricing plans", "product card"). The same holds when the request says the user declined installing the app and wants a custom or self-contained component: skip the check, build it with editable static content and no vertical SDK import, and say in your reply that it is not connected to the app.
|
|
13823
|
+
7. **Never install an app** \u2014 it adds pages, a cart, and checkout to the user's live site.
|
|
13823
13824
|
|
|
13824
13825
|
CMS is exempt: \`wix-site-data-collection\` installs it, so CMS work is never blocked and CMS is never named as missing.
|
|
13825
13826
|
|
|
@@ -15433,6 +15434,16 @@ var require_config = __commonJS({
|
|
|
15433
15434
|
function usesOpenAiProvider() {
|
|
15434
15435
|
return (0, model_knobs_1.isOpenAiModel)((0, model_knobs_1.getModel)()) || (0, model_knobs_1.isOpenAiModel)((0, model_knobs_1.getSmallModel)());
|
|
15435
15436
|
}
|
|
15437
|
+
function getModelStubs(provider) {
|
|
15438
|
+
const prefix = `${provider}/`;
|
|
15439
|
+
const stubs = {};
|
|
15440
|
+
for (const model of [(0, model_knobs_1.getModel)(), (0, model_knobs_1.getSmallModel)()]) {
|
|
15441
|
+
if (model.startsWith(prefix)) {
|
|
15442
|
+
stubs[model.slice(prefix.length)] = {};
|
|
15443
|
+
}
|
|
15444
|
+
}
|
|
15445
|
+
return stubs;
|
|
15446
|
+
}
|
|
15436
15447
|
function usesGoogleProvider() {
|
|
15437
15448
|
return (0, model_knobs_1.isGoogleModel)((0, model_knobs_1.getModel)()) || (0, model_knobs_1.isGoogleModel)((0, model_knobs_1.getSmallModel)());
|
|
15438
15449
|
}
|
|
@@ -15474,6 +15485,7 @@ var require_config = __commonJS({
|
|
|
15474
15485
|
// authorize the project.
|
|
15475
15486
|
...currentAccessToken ? { Authorization: `Bearer ${currentAccessToken}` } : {}
|
|
15476
15487
|
};
|
|
15488
|
+
const anthropicModels = getModelStubs("anthropic");
|
|
15477
15489
|
const provider = {
|
|
15478
15490
|
anthropic: {
|
|
15479
15491
|
options: {
|
|
@@ -15481,7 +15493,8 @@ var require_config = __commonJS({
|
|
|
15481
15493
|
cacheControl: true,
|
|
15482
15494
|
headers,
|
|
15483
15495
|
chunkTimeout: exports2.PROVIDER_CHUNK_TIMEOUT_MS
|
|
15484
|
-
}
|
|
15496
|
+
},
|
|
15497
|
+
...Object.keys(anthropicModels).length > 0 ? { models: anthropicModels } : {}
|
|
15485
15498
|
}
|
|
15486
15499
|
};
|
|
15487
15500
|
if (usesOpenAiProvider()) {
|
|
@@ -15494,7 +15507,8 @@ var require_config = __commonJS({
|
|
|
15494
15507
|
baseURL: getOpenAiBaseUrl(projectId),
|
|
15495
15508
|
headers,
|
|
15496
15509
|
chunkTimeout: exports2.PROVIDER_CHUNK_TIMEOUT_MS
|
|
15497
|
-
}
|
|
15510
|
+
},
|
|
15511
|
+
models: getModelStubs("openai")
|
|
15498
15512
|
};
|
|
15499
15513
|
}
|
|
15500
15514
|
if (usesGoogleProvider()) {
|
|
@@ -15517,7 +15531,8 @@ var require_config = __commonJS({
|
|
|
15517
15531
|
"gemini-3.1-flash-lite": {},
|
|
15518
15532
|
"gemini-2.5-pro": {},
|
|
15519
15533
|
"gemini-2.5-flash": {},
|
|
15520
|
-
"gemini-2.5-flash-lite": {}
|
|
15534
|
+
"gemini-2.5-flash-lite": {},
|
|
15535
|
+
...getModelStubs("google")
|
|
15521
15536
|
}
|
|
15522
15537
|
};
|
|
15523
15538
|
}
|
|
@@ -17838,7 +17853,16 @@ var require_executor = __commonJS({
|
|
|
17838
17853
|
}
|
|
17839
17854
|
function buildArgs(prompt, continueSession) {
|
|
17840
17855
|
const sessionArgs = continueSession ? ["--continue"] : [];
|
|
17841
|
-
return [
|
|
17856
|
+
return [
|
|
17857
|
+
"run",
|
|
17858
|
+
...sessionArgs,
|
|
17859
|
+
"--print-logs",
|
|
17860
|
+
"--log-level",
|
|
17861
|
+
"ERROR",
|
|
17862
|
+
"--format",
|
|
17863
|
+
"json",
|
|
17864
|
+
prompt
|
|
17865
|
+
];
|
|
17842
17866
|
}
|
|
17843
17867
|
async function executeOpenCodeOnce(options, attempt, maxAttempts, toolUsage) {
|
|
17844
17868
|
const { prompt, outputPath, projectId, onStdout, onStderr, continueSession = false } = options;
|
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.489",
|
|
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": "853b9e26470e7afdebf67dbb7bb22cb74c11133bb6bbfe053aebbfc3"
|
|
33
33
|
}
|