@wix/ditto-codegen-public 1.0.471 → 1.0.473
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 +43 -4
- package/package.json +2 -2
package/dist/out.js
CHANGED
|
@@ -14249,6 +14249,22 @@ If \`promptVariant\` is any other value, it is the legacy import pipeline's payl
|
|
|
14249
14249
|
}
|
|
14250
14250
|
});
|
|
14251
14251
|
|
|
14252
|
+
// ../codegen-common-logic/dist/rules/code-edits-scope.js
|
|
14253
|
+
var require_code_edits_scope = __commonJS({
|
|
14254
|
+
"../codegen-common-logic/dist/rules/code-edits-scope.js"(exports2) {
|
|
14255
|
+
"use strict";
|
|
14256
|
+
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
14257
|
+
exports2.CODE_EDITS_SCOPE_RULES = void 0;
|
|
14258
|
+
exports2.CODE_EDITS_SCOPE_RULES = `# Code Edits Scope Rules
|
|
14259
|
+
|
|
14260
|
+
When the request lists specific extensions to generate (each with a type), alongside a broader description of the feature:
|
|
14261
|
+
|
|
14262
|
+
1. **The list is the complete scope.** Generate exactly the listed extensions, of the stated types, each covering only what its item describes. Do not add extensions or behavior that no item asks for.
|
|
14263
|
+
2. **The broader description is background, not a task.** The parts of it that no item covers are built elsewhere in the flow (for example as native elements on the page). Do not implement them, even when the request reads as if your extensions should deliver the whole feature.
|
|
14264
|
+
3. **Report only what you built.** The final message describes the listed items, not the feature as a whole.`;
|
|
14265
|
+
}
|
|
14266
|
+
});
|
|
14267
|
+
|
|
14252
14268
|
// ../codegen-common-logic/dist/rules/site-data-layer.js
|
|
14253
14269
|
var require_site_data_layer = __commonJS({
|
|
14254
14270
|
"../codegen-common-logic/dist/rules/site-data-layer.js"(exports2) {
|
|
@@ -14328,6 +14344,7 @@ var require_rules = __commonJS({
|
|
|
14328
14344
|
};
|
|
14329
14345
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
14330
14346
|
__exportStar2(require_brik_import(), exports2);
|
|
14347
|
+
__exportStar2(require_code_edits_scope(), exports2);
|
|
14331
14348
|
__exportStar2(require_site_data_layer(), exports2);
|
|
14332
14349
|
__exportStar2(require_stores_catalog_version(), exports2);
|
|
14333
14350
|
__exportStar2(require_vertical_installation(), exports2);
|
|
@@ -14361,7 +14378,7 @@ var require_site = __commonJS({
|
|
|
14361
14378
|
"../codegen-common-logic/dist/tool-policies/site.js"(exports2) {
|
|
14362
14379
|
"use strict";
|
|
14363
14380
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
14364
|
-
exports2.SITE_POLICIES = exports2.SITE_DATA_COLLECTION_GENERATE_POLICY = exports2.STORES_VERSIONING_POLICY = void 0;
|
|
14381
|
+
exports2.SITE_POLICIES = exports2.SITE_PACKAGE_LOCK_POLICY = exports2.SITE_DATA_COLLECTION_GENERATE_POLICY = exports2.STORES_VERSIONING_POLICY = void 0;
|
|
14365
14382
|
exports2.STORES_VERSIONING_POLICY = {
|
|
14366
14383
|
type: "read",
|
|
14367
14384
|
mode: "prepend",
|
|
@@ -14374,9 +14391,20 @@ var require_site = __commonJS({
|
|
|
14374
14391
|
blockedExtensionTypes: ["DATA_COLLECTION"],
|
|
14375
14392
|
message: `BLOCKED: DATA_COLLECTION extensions are not scaffolded in this environment. Invoke the wix-site-data-collection skill to create or change collections. Do not retry with wix generate.`
|
|
14376
14393
|
};
|
|
14394
|
+
exports2.SITE_PACKAGE_LOCK_POLICY = {
|
|
14395
|
+
type: "commandBlock",
|
|
14396
|
+
commandFragments: [
|
|
14397
|
+
"--package-lock=false",
|
|
14398
|
+
"--package-lock false",
|
|
14399
|
+
"--no-package-lock",
|
|
14400
|
+
"npm_config_package_lock=false"
|
|
14401
|
+
],
|
|
14402
|
+
message: `BLOCKED: do not disable the package lockfile (--package-lock=false, --package-lock false, --no-package-lock). Run the install without it; if the packages are heavy, install them in several smaller commands (the sandbox has a memory limit).`
|
|
14403
|
+
};
|
|
14377
14404
|
exports2.SITE_POLICIES = [
|
|
14378
14405
|
exports2.STORES_VERSIONING_POLICY,
|
|
14379
|
-
exports2.SITE_DATA_COLLECTION_GENERATE_POLICY
|
|
14406
|
+
exports2.SITE_DATA_COLLECTION_GENERATE_POLICY,
|
|
14407
|
+
exports2.SITE_PACKAGE_LOCK_POLICY
|
|
14380
14408
|
];
|
|
14381
14409
|
}
|
|
14382
14410
|
});
|
|
@@ -14536,7 +14564,8 @@ var require_dist8 = __commonJS({
|
|
|
14536
14564
|
environmentIdentity: codegen_common_logic_1.SITE_ENVIRONMENT_IDENTITY,
|
|
14537
14565
|
codegenRules: [
|
|
14538
14566
|
...codegen_common_logic_1.SITE_CODEGEN_RULES,
|
|
14539
|
-
{ filename: "brik-import-rules.md", content: codegen_common_logic_1.BRIK_IMPORT_RULES }
|
|
14567
|
+
{ filename: "brik-import-rules.md", content: codegen_common_logic_1.BRIK_IMPORT_RULES },
|
|
14568
|
+
{ filename: "code-edits-scope-rules.md", content: codegen_common_logic_1.CODE_EDITS_SCOPE_RULES }
|
|
14540
14569
|
],
|
|
14541
14570
|
askRules: [],
|
|
14542
14571
|
gitConflictsRules: [],
|
|
@@ -14921,7 +14950,7 @@ ${environmentIdentity}`;
|
|
|
14921
14950
|
- List any manual setup the user must still do for the feature to work, as short "next steps" (e.g. installing a dependent app or enabling a dashboard setting).
|
|
14922
14951
|
- Be honest: if you didn't fully build what was asked (e.g. stored data but didn't send it), say so. Keep it short.`;
|
|
14923
14952
|
function buildFileOperationsRules(multiEditContextClause) {
|
|
14924
|
-
return `- Package dependencies \u2014 \`npm install <pkg>\` any package not already in \`package.json\` BEFORE the first \`validate\` (do NOT wait for \`TS2307\`); install all needed packages in ONE command. Do NOT hand-edit \`package.json\` for deps unless npm cannot be used.
|
|
14953
|
+
return `- Package dependencies \u2014 \`npm install <pkg>\` any package not already in \`package.json\` BEFORE the first \`validate\` (do NOT wait for \`TS2307\`); install all needed packages in ONE command, except heavy ones: the sandbox has a memory limit and an install that exceeds it kills the machine and loses the whole run, so install those in several smaller commands. Do NOT hand-edit \`package.json\` for deps unless npm cannot be used. Never pass \`--package-lock=false\`.
|
|
14925
14954
|
- File operations \u2014 pick the BATCH tool whenever you have 2+ files; the single-file variants are 5\u201310\xD7 slower:
|
|
14926
14955
|
- \`batch-write\` to create N new files in one call. NEVER call \`write\` more than once per turn \u2014 use batch-write instead. \`write\` is reserved for single-file creation.
|
|
14927
14956
|
- \`batch-read\` to read N files in one call. NEVER call \`read\` more than once per turn \u2014 use batch-read instead.
|
|
@@ -24064,6 +24093,7 @@ var require_tool_policies3 = __commonJS({
|
|
|
24064
24093
|
commandFragments,
|
|
24065
24094
|
message
|
|
24066
24095
|
}));
|
|
24096
|
+
const commandBlocks = emitKind("commandBlock", ({ commandFragments, message }) => ({ commandFragments, message }));
|
|
24067
24097
|
const skillPrepends = emitKind("skillContent", ({ skillNames, message }) => ({
|
|
24068
24098
|
skillNames,
|
|
24069
24099
|
message
|
|
@@ -24073,6 +24103,7 @@ const BLOCK_READS = ${emitReads("block")};
|
|
|
24073
24103
|
const PREPEND_READS = ${emitReads("prepend")};
|
|
24074
24104
|
const GENERATE_POLICIES = ${generatePolicies};
|
|
24075
24105
|
const COMMAND_PREPENDS = ${commandPrepends};
|
|
24106
|
+
const COMMAND_BLOCKS = ${commandBlocks};
|
|
24076
24107
|
const SKILL_PREPENDS = ${skillPrepends};
|
|
24077
24108
|
// Appended once after every prepend banner (see OVERRIDE_AUTHORITY_NOTE):
|
|
24078
24109
|
// part of the override contract, so no policy can ship without it.
|
|
@@ -24113,6 +24144,14 @@ export const ToolPolicies = async () => ({
|
|
|
24113
24144
|
)[0];
|
|
24114
24145
|
if (blocked) throw new Error(blocked.message);
|
|
24115
24146
|
|
|
24147
|
+
if (input.tool === "${"bash"}" && typeof args.command === "string") {
|
|
24148
|
+
const command = args.command.replace(/\\s+/g, " ");
|
|
24149
|
+
const blockedCommand = COMMAND_BLOCKS.find((policy) =>
|
|
24150
|
+
policy.commandFragments.some((fragment) => command.includes(fragment)),
|
|
24151
|
+
);
|
|
24152
|
+
if (blockedCommand) throw new Error(blockedCommand.message);
|
|
24153
|
+
}
|
|
24154
|
+
|
|
24116
24155
|
if (GENERATE_POLICIES.length === 0) return;
|
|
24117
24156
|
if (input.tool === "${"wix-generate"}" && Array.isArray(args.extensions)) {
|
|
24118
24157
|
for (const extension of args.extensions) {
|
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.473",
|
|
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": "d57aed781560712e54702652eaf61c531616393b40b98cca45a25e11"
|
|
33
33
|
}
|