@wix/ditto-codegen-public 1.0.182 → 1.0.183
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 +64 -13
- package/package.json +2 -2
package/dist/out.js
CHANGED
|
@@ -36825,6 +36825,7 @@ var require_SystemPromptBuilder = __commonJS({
|
|
|
36825
36825
|
var CommonSections;
|
|
36826
36826
|
(function(CommonSections2) {
|
|
36827
36827
|
CommonSections2["ROLE"] = "role";
|
|
36828
|
+
CommonSections2["OUTPUT_CONSTRAINTS"] = "output_constraints";
|
|
36828
36829
|
CommonSections2["CONTEXT_EXPLANATION"] = "context_explanation";
|
|
36829
36830
|
CommonSections2["CORE_PRINCIPLES"] = "core_principles";
|
|
36830
36831
|
CommonSections2["CORE_KNOWLEDGE"] = "core_knowledge";
|
|
@@ -36838,12 +36839,13 @@ var require_SystemPromptBuilder = __commonJS({
|
|
|
36838
36839
|
[CommonSections.ROLE]: 1,
|
|
36839
36840
|
[CommonSections.CONTEXT_EXPLANATION]: 2,
|
|
36840
36841
|
[CommonSections.CORE_PRINCIPLES]: 3,
|
|
36841
|
-
[CommonSections.
|
|
36842
|
-
[CommonSections.
|
|
36843
|
-
[CommonSections.
|
|
36844
|
-
[CommonSections.
|
|
36845
|
-
[CommonSections.
|
|
36846
|
-
[CommonSections.
|
|
36842
|
+
[CommonSections.OUTPUT_CONSTRAINTS]: 4,
|
|
36843
|
+
[CommonSections.CORE_KNOWLEDGE]: 5,
|
|
36844
|
+
[CommonSections.IMPLEMENTATION_PATTERNS]: 6,
|
|
36845
|
+
[CommonSections.IMPLEMENTATION_GUIDELINES]: 7,
|
|
36846
|
+
[CommonSections.AUTHENTICATION_ELEVATION_REQUIREMENT]: 8,
|
|
36847
|
+
[CommonSections.API_DOCS]: 9,
|
|
36848
|
+
[CommonSections.EXAMPLES]: 10
|
|
36847
36849
|
};
|
|
36848
36850
|
var GeneralAgentType;
|
|
36849
36851
|
(function(GeneralAgentType2) {
|
|
@@ -65294,6 +65296,50 @@ var require_core_principles = __commonJS({
|
|
|
65294
65296
|
}
|
|
65295
65297
|
});
|
|
65296
65298
|
|
|
65299
|
+
// dist/system-prompts/system-prompt-builders/utils/output-constraints.js
|
|
65300
|
+
var require_output_constraints = __commonJS({
|
|
65301
|
+
"dist/system-prompts/system-prompt-builders/utils/output-constraints.js"(exports2) {
|
|
65302
|
+
"use strict";
|
|
65303
|
+
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
65304
|
+
exports2.outputConstraints = void 0;
|
|
65305
|
+
var outputConstraints = () => `<token_limits>
|
|
65306
|
+
CRITICAL: Your max output is ~10,000 tokens. You MUST plan your response to stay well under this limit.
|
|
65307
|
+
- If making a large file (>300 lines), split it into multiple smaller files with imports.
|
|
65308
|
+
- If editing a large section (>100 lines), break it into multiple smaller edit operations.
|
|
65309
|
+
- Count your output before responding - if it seems too long, reduce scope and prioritize.
|
|
65310
|
+
</token_limits>
|
|
65311
|
+
|
|
65312
|
+
<brevity_rules>
|
|
65313
|
+
IMPORTANT: Minimize output tokens while maintaining quality and correctness.
|
|
65314
|
+
- Do NOT add README.md, documentation files, or markdown files unless explicitly requested.
|
|
65315
|
+
- Do NOT add excessive comments in code - only add comments where truly necessary for clarity.
|
|
65316
|
+
- Do NOT re-output unchanged files or duplicate existing code.
|
|
65317
|
+
- Do NOT generate placeholder code like "// TODO: implement" - provide working implementations.
|
|
65318
|
+
- Only output files that are directly required for the task.
|
|
65319
|
+
</brevity_rules>
|
|
65320
|
+
|
|
65321
|
+
<modular_code_strategy>
|
|
65322
|
+
When generating substantial code, split into multiple smaller files with imports:
|
|
65323
|
+
- Extract utilities/helpers into separate files
|
|
65324
|
+
- Separate types/interfaces into dedicated type files
|
|
65325
|
+
- Keep each component/function focused (~50-100 lines max)
|
|
65326
|
+
|
|
65327
|
+
Example structure instead of one large file:
|
|
65328
|
+
components/MyFeature/MyFeature.tsx (main component)
|
|
65329
|
+
components/MyFeature/types.ts (interfaces/types)
|
|
65330
|
+
components/MyFeature/utils.ts (helper functions)
|
|
65331
|
+
</modular_code_strategy>
|
|
65332
|
+
|
|
65333
|
+
<iteration_efficiency>
|
|
65334
|
+
When iterating on existing code:
|
|
65335
|
+
- Only include files that actually need changes.
|
|
65336
|
+
- Prefer 'edit' operation with precise oldString/newString replacements.
|
|
65337
|
+
- If response would exceed limits, complete the most critical part first.
|
|
65338
|
+
</iteration_efficiency>`;
|
|
65339
|
+
exports2.outputConstraints = outputConstraints;
|
|
65340
|
+
}
|
|
65341
|
+
});
|
|
65342
|
+
|
|
65297
65343
|
// dist/system-prompts/system-prompt-builders/CodeGenerationSystemPromptBuilder.js
|
|
65298
65344
|
var require_CodeGenerationSystemPromptBuilder = __commonJS({
|
|
65299
65345
|
"dist/system-prompts/system-prompt-builders/CodeGenerationSystemPromptBuilder.js"(exports2) {
|
|
@@ -65307,6 +65353,7 @@ var require_CodeGenerationSystemPromptBuilder = __commonJS({
|
|
|
65307
65353
|
var apiDocLoader_1 = require_apiDocLoader();
|
|
65308
65354
|
var use_elevate_1 = require_use_elevate();
|
|
65309
65355
|
var core_principles_1 = require_core_principles();
|
|
65356
|
+
var output_constraints_1 = require_output_constraints();
|
|
65310
65357
|
var CodeGenerationSystemPromptBuilder = class extends SystemPromptBuilder_1.SystemPromptBuilder {
|
|
65311
65358
|
constructor(params) {
|
|
65312
65359
|
super(params);
|
|
@@ -65328,6 +65375,10 @@ ${(0, error_handling_1.errorHandling)()}`;
|
|
|
65328
65375
|
this.withSection(SystemPromptBuilder_1.CommonSections.CORE_PRINCIPLES, content);
|
|
65329
65376
|
return this;
|
|
65330
65377
|
}
|
|
65378
|
+
withOutputConstraints() {
|
|
65379
|
+
this.withSection(SystemPromptBuilder_1.CommonSections.OUTPUT_CONSTRAINTS, (0, output_constraints_1.outputConstraints)());
|
|
65380
|
+
return this;
|
|
65381
|
+
}
|
|
65331
65382
|
withApiDocs() {
|
|
65332
65383
|
if (this.apiNames.length === 0 && !this.useData && !this.useIteration) {
|
|
65333
65384
|
return this;
|
|
@@ -65364,7 +65415,7 @@ var require_dashboard_page_prompt = __commonJS({
|
|
|
65364
65415
|
apiNames,
|
|
65365
65416
|
useData,
|
|
65366
65417
|
useIteration
|
|
65367
|
-
}).withRole(dashboard_page_instructions_1.dashboardPageInstructions.role).withSection("dashboard_page_extension_files_and_code", dashboard_page_instructions_1.dashboardPageInstructions.filesAndCode).withSection("wds_provider_usage", dashboard_page_instructions_1.dashboardPageInstructions.wdsProviderUsage).withSection("hard_constraints", dashboard_page_instructions_1.dashboardPageInstructions.hardConstraints).withSection("api_references", dashboard_page_instructions_1.dashboardPageInstructions.apiReferences).withSection("wds_reference", dashboard_page_instructions_1.dashboardPageInstructions.wdsReference()).withContextExplanation().withApiDocs().withCorePrinciples().withImplementationGuidelines(dashboard_page_instructions_1.dashboardPageInstructions.typescriptQualityGuidelines).withExamples();
|
|
65418
|
+
}).withRole(dashboard_page_instructions_1.dashboardPageInstructions.role).withSection("dashboard_page_extension_files_and_code", dashboard_page_instructions_1.dashboardPageInstructions.filesAndCode).withSection("wds_provider_usage", dashboard_page_instructions_1.dashboardPageInstructions.wdsProviderUsage).withSection("hard_constraints", dashboard_page_instructions_1.dashboardPageInstructions.hardConstraints).withSection("api_references", dashboard_page_instructions_1.dashboardPageInstructions.apiReferences).withSection("wds_reference", dashboard_page_instructions_1.dashboardPageInstructions.wdsReference()).withContextExplanation().withApiDocs().withCorePrinciples().withOutputConstraints().withImplementationGuidelines(dashboard_page_instructions_1.dashboardPageInstructions.typescriptQualityGuidelines).withExamples();
|
|
65368
65419
|
if (useData) {
|
|
65369
65420
|
systemPrompt.withSection("data_prompt", dashboard_page_instructions_1.dashboardPageInstructions.dataPrompt);
|
|
65370
65421
|
}
|
|
@@ -65766,7 +65817,7 @@ var require_site_component_prompt = __commonJS({
|
|
|
65766
65817
|
apiNames,
|
|
65767
65818
|
useData,
|
|
65768
65819
|
useIteration
|
|
65769
|
-
}).withRole(site_component_instructions_1.siteComponentInstructions.role).withContextExplanation().withCorePrinciples().withImplementationGuidelines(site_component_instructions_1.siteComponentInstructions.implementationGuidelines).withApiDocs().withExamples();
|
|
65820
|
+
}).withRole(site_component_instructions_1.siteComponentInstructions.role).withContextExplanation().withCorePrinciples().withOutputConstraints().withImplementationGuidelines(site_component_instructions_1.siteComponentInstructions.implementationGuidelines).withApiDocs().withExamples();
|
|
65770
65821
|
return siteComponentPromptBuilder.compose();
|
|
65771
65822
|
};
|
|
65772
65823
|
exports2.siteComponentPrompt = siteComponentPrompt;
|
|
@@ -65915,7 +65966,7 @@ var require_custom_element_prompt = __commonJS({
|
|
|
65915
65966
|
apiNames,
|
|
65916
65967
|
useData,
|
|
65917
65968
|
useIteration
|
|
65918
|
-
}).withRole(custom_element_instructions_1.customElementInstructions.role).withContextExplanation().withCorePrinciples().withImplementationGuidelines(custom_element_instructions_1.customElementInstructions.implementationGuidelines).withSection("wds_reference", custom_element_instructions_1.customElementInstructions.wdsReference()).withApiDocs().withExamples();
|
|
65969
|
+
}).withRole(custom_element_instructions_1.customElementInstructions.role).withContextExplanation().withCorePrinciples().withOutputConstraints().withImplementationGuidelines(custom_element_instructions_1.customElementInstructions.implementationGuidelines).withSection("wds_reference", custom_element_instructions_1.customElementInstructions.wdsReference()).withApiDocs().withExamples();
|
|
65919
65970
|
if (useData) {
|
|
65920
65971
|
systemPrompt.withSection("implementation_requirements", custom_element_instructions_1.customElementInstructions.implementationRequirements);
|
|
65921
65972
|
}
|
|
@@ -66149,7 +66200,7 @@ var require_service_plugin_prompt = __commonJS({
|
|
|
66149
66200
|
apiNames,
|
|
66150
66201
|
useData,
|
|
66151
66202
|
useIteration
|
|
66152
|
-
}).withRole(service_plugin_instructions_1.servicePluginInstructions.role).withContextExplanation().withImplementationPatterns(service_plugin_instructions_1.servicePluginInstructions.implementationPatterns).withImplementationGuidelines(service_plugin_instructions_1.servicePluginInstructions.implementationGuidelines).withCorePrinciples().withAuthenticationElevationRequirement().withApiDocs().withExamples().withSection("available_service_plugins", servicePluginDocs);
|
|
66203
|
+
}).withRole(service_plugin_instructions_1.servicePluginInstructions.role).withContextExplanation().withImplementationPatterns(service_plugin_instructions_1.servicePluginInstructions.implementationPatterns).withImplementationGuidelines(service_plugin_instructions_1.servicePluginInstructions.implementationGuidelines).withCorePrinciples().withOutputConstraints().withAuthenticationElevationRequirement().withApiDocs().withExamples().withSection("available_service_plugins", servicePluginDocs);
|
|
66153
66204
|
if (servicePluginDocs) {
|
|
66154
66205
|
servicePluginPromptBuilder.withSection("available_service_plugins", servicePluginDocs);
|
|
66155
66206
|
}
|
|
@@ -66268,7 +66319,7 @@ var require_backend_event_prompt = __commonJS({
|
|
|
66268
66319
|
apiNames,
|
|
66269
66320
|
useData,
|
|
66270
66321
|
useIteration
|
|
66271
|
-
}).withRole(backend_event_instructions_1.backendEventInstructions.role).withContextExplanation().withCorePrinciples().withImplementationPatterns(backend_event_instructions_1.backendEventInstructions.implementationPatterns).withImplementationGuidelines(backend_event_instructions_1.backendEventInstructions.implementationGuidelines).withAuthenticationElevationRequirement().withApiDocs().withExamples();
|
|
66322
|
+
}).withRole(backend_event_instructions_1.backendEventInstructions.role).withContextExplanation().withCorePrinciples().withOutputConstraints().withImplementationPatterns(backend_event_instructions_1.backendEventInstructions.implementationPatterns).withImplementationGuidelines(backend_event_instructions_1.backendEventInstructions.implementationGuidelines).withAuthenticationElevationRequirement().withApiDocs().withExamples();
|
|
66272
66323
|
return backendEventPromptBuilder.compose();
|
|
66273
66324
|
};
|
|
66274
66325
|
exports2.backendEventPrompt = backendEventPrompt;
|
|
@@ -66425,7 +66476,7 @@ var require_backend_api_prompt = __commonJS({
|
|
|
66425
66476
|
apiNames,
|
|
66426
66477
|
useData,
|
|
66427
66478
|
useIteration
|
|
66428
|
-
}).withRole(backend_api_instructions_1.backendApiInstructions.role).withContextExplanation().withCorePrinciples().withImplementationGuidelines(backend_api_instructions_1.backendApiInstructions.implementationGuidelines).withCoreKnowledge(backend_api_instructions_1.backendApiInstructions.coreKnowledge).withApiDocs().withExamples();
|
|
66479
|
+
}).withRole(backend_api_instructions_1.backendApiInstructions.role).withContextExplanation().withCorePrinciples().withOutputConstraints().withImplementationGuidelines(backend_api_instructions_1.backendApiInstructions.implementationGuidelines).withCoreKnowledge(backend_api_instructions_1.backendApiInstructions.coreKnowledge).withApiDocs().withExamples();
|
|
66429
66480
|
return systemPrompt.compose();
|
|
66430
66481
|
};
|
|
66431
66482
|
exports2.backendApiPrompt = backendApiPrompt;
|
|
@@ -66699,7 +66750,7 @@ ${(0, dynamicParameters_1.dynamicParametersPrompt)()}` : embedded_script_instruc
|
|
|
66699
66750
|
apiNames,
|
|
66700
66751
|
useData,
|
|
66701
66752
|
useIteration
|
|
66702
|
-
}).withRole(embedded_script_instructions_1.embeddedScriptInstructions.role).withContextExplanation().withSection("embedded_script_extension_files_and_code", embedded_script_instructions_1.embeddedScriptInstructions.embeddedScriptFilesAndCode).withImplementationGuidelines(embeddedScriptImplementationGuidelines).withImplementationPatterns(embedded_script_instructions_1.embeddedScriptInstructions.embeddedScriptImplementationPatterns).withCorePrinciples().withApiDocs().withExamples();
|
|
66753
|
+
}).withRole(embedded_script_instructions_1.embeddedScriptInstructions.role).withContextExplanation().withSection("embedded_script_extension_files_and_code", embedded_script_instructions_1.embeddedScriptInstructions.embeddedScriptFilesAndCode).withImplementationGuidelines(embeddedScriptImplementationGuidelines).withImplementationPatterns(embedded_script_instructions_1.embeddedScriptInstructions.embeddedScriptImplementationPatterns).withCorePrinciples().withOutputConstraints().withApiDocs().withExamples();
|
|
66703
66754
|
return systemPrompt.compose();
|
|
66704
66755
|
};
|
|
66705
66756
|
exports2.embeddedScriptPrompt = embeddedScriptPrompt;
|
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.183",
|
|
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": "
|
|
27
|
+
"falconPackageHash": "4dda91599e3e7aacc90417a2c99a0c0c293c409b3a4ac6293f97cae0"
|
|
28
28
|
}
|