@wix/ditto-codegen-public 1.0.65 → 1.0.67

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 +45 -24
  2. package/package.json +2 -2
package/dist/out.js CHANGED
@@ -120327,7 +120327,7 @@ var require_utils14 = __commonJS({
120327
120327
  content: zod_1.z.string().describe("Complete file content as a string (for JSON files, stringify the object). Required for insert and update operations.").optional()
120328
120328
  });
120329
120329
  exports2.FileSchema = zod_1.z.object({
120330
- files: zod_1.z.array(exports2.FileItemSchema).default([])
120330
+ files: zod_1.z.array(exports2.FileItemSchema).default([]).describe("An array of files")
120331
120331
  });
120332
120332
  var withCaching = (ttl = "5m") => {
120333
120333
  return {
@@ -120752,7 +120752,7 @@ ${examples}
120752
120752
  const userMessage = (0, utils_1.buildUserPromptForCodeGenerationAgent)(params, primaryAction);
120753
120753
  const model = (0, anthropic_1.createAnthropic)({
120754
120754
  apiKey: this.apiKey
120755
- })("claude-sonnet-4-20250514");
120755
+ })("claude-sonnet-4-5-20250929");
120756
120756
  const result = await (0, ai_1.generateObject)({
120757
120757
  model,
120758
120758
  schema: utils_1.FileSchema,
@@ -121101,15 +121101,20 @@ Use dynamic parameters when:
121101
121101
  - Different instances or configurations are needed for different sites
121102
121102
  - Content, styling, or functionality needs to be adjusted through a UI
121103
121103
 
121104
- Do NOT use dynamic parameters when:
121105
- - The script is fully static and requires no configuration
121106
- - All values are hardcoded and never need to change
121104
+ IMPORTANT: If an embedded script extension exists but doesn't need specific dynamic parameters, you should ALWAYS add at least one dynamic parameter: an enable/disable toggle. This allows site owners to control whether the embedded script is active without removing it entirely.
121105
+
121106
+ Example of minimum enable/disable parameter:
121107
+ {
121108
+ "key": "enabled",
121109
+ "displayName": "Enable",
121110
+ "type": "BOOLEAN",
121111
+ "description": "Enable or disable this feature",
121112
+ "required": true,
121113
+ "defaultValue": "true"
121114
+ }
121107
121115
  </when_to_use_dynamic_parameters>
121108
121116
 
121109
121117
  <output_structure>
121110
- Your output must include an array of embeddedScriptParameters. This array can be:
121111
- - Empty array [] if there are no EMBEDDED_SCRIPT extensions in the blueprint or no dynamic parameters are needed
121112
- - Array of embedded script parameter objects if there are EMBEDDED_SCRIPT extensions
121113
121118
 
121114
121119
  Each embedded script parameter object contains:
121115
121120
  - extensionId (string): The name of the embedded script extension these parameters belong to (use the extension.name field)
@@ -121126,8 +121131,6 @@ Each dynamic parameter must include:
121126
121131
 
121127
121132
  Example output structures:
121128
121133
 
121129
- No embedded script extensions:
121130
- []
121131
121134
 
121132
121135
  With embedded script extensions:
121133
121136
  [
@@ -121219,18 +121222,26 @@ Output:
121219
121222
  }
121220
121223
  ]
121221
121224
 
121222
- Example 2 - Static Pixel (no dynamic parameters needed):
121225
+ Example 2 - Static Pixel (minimal dynamic parameters):
121223
121226
  Blueprint: Add a Facebook Pixel with a hardcoded pixel ID
121224
121227
  Extension Name: "facebook-pixel"
121225
- Output: []
121228
+ Output:
121229
+ {
121230
+ "key": "enabled",
121231
+ "displayName": "Enable",
121232
+ "type": "BOOLEAN",
121233
+ "description": "Enable or disable this feature",
121234
+ "required": true,
121235
+ "defaultValue": "true"
121236
+ }
121226
121237
 
121227
121238
  </examples>
121228
121239
 
121229
121240
  <guidelines>
121230
- - If there are NO EMBEDDED_SCRIPT extensions in the blueprint, return an empty array: "embeddedScriptParameters": []
121231
- - If there are EMBEDDED_SCRIPT extensions, ONLY include them if they truly need configurable parameters
121241
+ - If there are EMBEDDED_SCRIPT extensions, you MUST always include at least one parameter per extension
121242
+ - At minimum, every embedded script should have an enable/disable parameter to allow site owners to control activation
121232
121243
  - The extensionId MUST match the exact name of the embedded script extension from the blueprint
121233
- - Only define parameters that truly need to be configurable by the site owner
121244
+ - Define additional parameters only if they truly need to be configurable by the site owner
121234
121245
  - Keep parameter keys descriptive and in lowerCamelCase
121235
121246
  - Provide clear displayName and description for each parameter
121236
121247
  - Set appropriate required flags based on functionality needs
@@ -124971,7 +124982,7 @@ var require_SiteComponentAgent = __commonJS({
124971
124982
  const appName = blueprint?.appName ? `'${blueprint.appName}'` : "";
124972
124983
  const primaryAction = `Customize the Wix CLI site component scaffolding for the app ${appName}`;
124973
124984
  const userMessage = (0, utils_1.buildUserPromptForCodeGenerationAgent)(params, primaryAction);
124974
- const model = (0, anthropic_1.createAnthropic)({ apiKey: this.apiKey })("claude-sonnet-4-20250514");
124985
+ const model = (0, anthropic_1.createAnthropic)({ apiKey: this.apiKey })("claude-sonnet-4-5-20250929");
124975
124986
  const result = await (0, ai_1.generateObject)({
124976
124987
  model,
124977
124988
  schema: utils_1.FileSchema,
@@ -125120,7 +125131,7 @@ ${examples}
125120
125131
  const appName = blueprint?.appName ? `'${blueprint.appName}'` : "";
125121
125132
  const primaryAction = `Customize backend event scaffolding for the app ${appName}`;
125122
125133
  const userMessage = (0, utils_1.buildUserPromptForCodeGenerationAgent)(params, primaryAction);
125123
- const model = (0, anthropic_1.createAnthropic)({ apiKey: this.apiKey })("claude-sonnet-4-20250514");
125134
+ const model = (0, anthropic_1.createAnthropic)({ apiKey: this.apiKey })("claude-sonnet-4-5-20250929");
125124
125135
  const result = await (0, ai_1.generateObject)({
125125
125136
  model,
125126
125137
  schema: utils_1.FileSchema,
@@ -125264,7 +125275,7 @@ var require_BackendApiAgent = __commonJS({
125264
125275
  const systemPrompt = this.buildSystemPrompt();
125265
125276
  const primaryAction = `Create Astro Server Endpoints for the app ${blueprint?.appName}`;
125266
125277
  const userMessage = (0, utils_1.buildUserPromptForCodeGenerationAgent)(params, primaryAction);
125267
- const model = (0, anthropic_1.createAnthropic)({ apiKey: this.apiKey })("claude-sonnet-4-20250514");
125278
+ const model = (0, anthropic_1.createAnthropic)({ apiKey: this.apiKey })("claude-sonnet-4-5-20250929");
125268
125279
  const result = await (0, ai_1.generateObject)({
125269
125280
  model,
125270
125281
  schema: utils_1.FileSchema,
@@ -125708,7 +125719,7 @@ var require_CustomElementAgent = __commonJS({
125708
125719
  const appName = blueprint?.appName ? `'${blueprint.appName}'` : "";
125709
125720
  const primaryAction = `Customize the Wix CLI custom element / site widget scaffolding for the app ${appName}`;
125710
125721
  const userMessage = (0, utils_1.buildUserPromptForCodeGenerationAgent)(params, primaryAction);
125711
- const model = (0, anthropic_1.createAnthropic)({ apiKey: this.apiKey })("claude-sonnet-4-20250514");
125722
+ const model = (0, anthropic_1.createAnthropic)({ apiKey: this.apiKey })("claude-sonnet-4-5-20250929");
125712
125723
  const result = await (0, ai_1.generateObject)({
125713
125724
  model,
125714
125725
  schema: utils_1.FileSchema,
@@ -127271,7 +127282,7 @@ ${examples}
127271
127282
  const appName = blueprint?.appName ? `'${blueprint.appName}'` : "";
127272
127283
  const primaryAction = `Customize the Wix CLI dashboard page scaffolding for the app ${appName}`;
127273
127284
  const userMessage = (0, utils_1.buildUserPromptForCodeGenerationAgent)(params, primaryAction);
127274
- const model = (0, anthropic_1.createAnthropic)({ apiKey: this.apiKey })("claude-sonnet-4-20250514");
127285
+ const model = (0, anthropic_1.createAnthropic)({ apiKey: this.apiKey })("claude-sonnet-4-5-20250929");
127275
127286
  const result = await (0, ai_1.generateObject)({
127276
127287
  model,
127277
127288
  schema: utils_1.FileSchema,
@@ -127513,6 +127524,7 @@ var require_DashboardDecisionAgent = __commonJS({
127513
127524
  var zod_1 = require_zod();
127514
127525
  var autoPatternPrompt_1 = require_autoPatternPrompt();
127515
127526
  var utils_1 = require_utils14();
127527
+ var types_1 = require_types_impl();
127516
127528
  var autoPatternsLlmConfig = zod_1.z.object({
127517
127529
  useAutoPatterns: zod_1.z.boolean(),
127518
127530
  schema: zod_1.z.object({
@@ -127570,9 +127582,18 @@ var require_DashboardDecisionAgent = __commonJS({
127570
127582
  buildSystemPrompt() {
127571
127583
  return (0, autoPatternPrompt_1.autoPatternDecisionPrompt)();
127572
127584
  }
127585
+ shouldNotUseAutoPatterns(params) {
127586
+ const { blueprint, planAndResources } = params;
127587
+ const hasEmbeddedScriptExtension = blueprint?.extensions?.some((ext) => ext.type === types_1.ExtensionType.EMBEDDED_SCRIPT) ?? false;
127588
+ const hasOneDashboardPageExtension = blueprint?.extensions?.filter((ext) => ext.type === types_1.ExtensionType.DASHBOARD_PAGE).length === 1;
127589
+ const shouldImplementEmbeddedScriptParameters = hasOneDashboardPageExtension && hasEmbeddedScriptExtension;
127590
+ if (!planAndResources?.createdCollections?.length || shouldImplementEmbeddedScriptParameters) {
127591
+ return true;
127592
+ }
127593
+ return false;
127594
+ }
127573
127595
  async generate(params) {
127574
- const { planAndResources } = params;
127575
- if (!planAndResources?.createdCollections?.length) {
127596
+ if (this.shouldNotUseAutoPatterns(params)) {
127576
127597
  return {
127577
127598
  useAutoPatterns: false
127578
127599
  };
@@ -128452,7 +128473,7 @@ ${examples}
128452
128473
  const appName = blueprint?.appName ? `'${blueprint.appName}'` : "";
128453
128474
  const primaryAction = `Customize the Wix CLI embedded script scaffolding for the app ${appName}`;
128454
128475
  const userMessage = (0, utils_1.buildUserPromptForCodeGenerationAgent)(params, primaryAction);
128455
- const model = (0, anthropic_1.createAnthropic)({ apiKey: this.apiKey })("claude-sonnet-4-20250514");
128476
+ const model = (0, anthropic_1.createAnthropic)({ apiKey: this.apiKey })("claude-sonnet-4-5-20250929");
128456
128477
  const result = await (0, ai_1.generateObject)({
128457
128478
  model,
128458
128479
  schema: exports2.EmbeddedScriptSchema,
@@ -128831,7 +128852,7 @@ CURRENT FILE CONTENT:
128831
128852
  ${input.content}
128832
128853
 
128833
128854
  Please provide the complete fixed file content that resolves ALL the errors listed above.`;
128834
- const model = (0, anthropic_1.createAnthropic)({ apiKey: this.apiKey })("claude-sonnet-4-20250514");
128855
+ const model = (0, anthropic_1.createAnthropic)({ apiKey: this.apiKey })("claude-sonnet-4-5-20250929");
128835
128856
  try {
128836
128857
  const result = await (0, ai_1.generateObject)({
128837
128858
  model,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wix/ditto-codegen-public",
3
- "version": "1.0.65",
3
+ "version": "1.0.67",
4
4
  "description": "AI-powered Wix CLI app generator - standalone executable",
5
5
  "scripts": {
6
6
  "build": "node build.mjs",
@@ -24,5 +24,5 @@
24
24
  "@wix/ditto-codegen": "1.0.0",
25
25
  "esbuild": "^0.25.9"
26
26
  },
27
- "falconPackageHash": "6750c6cff17349339dffb2a673c6fb3163e22d7cae347615e3ed0e33"
27
+ "falconPackageHash": "cb386c1a3a023a0778effc8158941c8ff0a7592425af5aed16b33854"
28
28
  }