@wix/ditto-codegen-public 1.0.472 → 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.
Files changed (2) hide show
  1. package/dist/out.js +24 -3
  2. package/package.json +2 -2
package/dist/out.js CHANGED
@@ -14378,7 +14378,7 @@ var require_site = __commonJS({
14378
14378
  "../codegen-common-logic/dist/tool-policies/site.js"(exports2) {
14379
14379
  "use strict";
14380
14380
  Object.defineProperty(exports2, "__esModule", { value: true });
14381
- 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;
14382
14382
  exports2.STORES_VERSIONING_POLICY = {
14383
14383
  type: "read",
14384
14384
  mode: "prepend",
@@ -14391,9 +14391,20 @@ var require_site = __commonJS({
14391
14391
  blockedExtensionTypes: ["DATA_COLLECTION"],
14392
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.`
14393
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
+ };
14394
14404
  exports2.SITE_POLICIES = [
14395
14405
  exports2.STORES_VERSIONING_POLICY,
14396
- exports2.SITE_DATA_COLLECTION_GENERATE_POLICY
14406
+ exports2.SITE_DATA_COLLECTION_GENERATE_POLICY,
14407
+ exports2.SITE_PACKAGE_LOCK_POLICY
14397
14408
  ];
14398
14409
  }
14399
14410
  });
@@ -14939,7 +14950,7 @@ ${environmentIdentity}`;
14939
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).
14940
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.`;
14941
14952
  function buildFileOperationsRules(multiEditContextClause) {
14942
- 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\`.
14943
14954
  - File operations \u2014 pick the BATCH tool whenever you have 2+ files; the single-file variants are 5\u201310\xD7 slower:
14944
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.
14945
14956
  - \`batch-read\` to read N files in one call. NEVER call \`read\` more than once per turn \u2014 use batch-read instead.
@@ -24082,6 +24093,7 @@ var require_tool_policies3 = __commonJS({
24082
24093
  commandFragments,
24083
24094
  message
24084
24095
  }));
24096
+ const commandBlocks = emitKind("commandBlock", ({ commandFragments, message }) => ({ commandFragments, message }));
24085
24097
  const skillPrepends = emitKind("skillContent", ({ skillNames, message }) => ({
24086
24098
  skillNames,
24087
24099
  message
@@ -24091,6 +24103,7 @@ const BLOCK_READS = ${emitReads("block")};
24091
24103
  const PREPEND_READS = ${emitReads("prepend")};
24092
24104
  const GENERATE_POLICIES = ${generatePolicies};
24093
24105
  const COMMAND_PREPENDS = ${commandPrepends};
24106
+ const COMMAND_BLOCKS = ${commandBlocks};
24094
24107
  const SKILL_PREPENDS = ${skillPrepends};
24095
24108
  // Appended once after every prepend banner (see OVERRIDE_AUTHORITY_NOTE):
24096
24109
  // part of the override contract, so no policy can ship without it.
@@ -24131,6 +24144,14 @@ export const ToolPolicies = async () => ({
24131
24144
  )[0];
24132
24145
  if (blocked) throw new Error(blocked.message);
24133
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
+
24134
24155
  if (GENERATE_POLICIES.length === 0) return;
24135
24156
  if (input.tool === "${"wix-generate"}" && Array.isArray(args.extensions)) {
24136
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.472",
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": "84b0cfe2378ce074540cb35f691a391df6b55997ff33fdcda28a5a8d"
32
+ "falconPackageHash": "d57aed781560712e54702652eaf61c531616393b40b98cca45a25e11"
33
33
  }