@wix/ditto-codegen-public 1.0.99 → 1.0.100
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 +106 -33
- package/package.json +2 -2
package/dist/out.js
CHANGED
|
@@ -116677,8 +116677,9 @@ var require_data = __commonJS({
|
|
|
116677
116677
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
116678
116678
|
exports2.cmsPlannerPrompt = void 0;
|
|
116679
116679
|
var types_impl_1 = require_types_impl2();
|
|
116680
|
-
var handlingFeesExample =
|
|
116681
|
-
|
|
116680
|
+
var handlingFeesExample = {
|
|
116681
|
+
operation: "insert",
|
|
116682
|
+
data: {
|
|
116682
116683
|
idSuffix: "handling-fees-rules",
|
|
116683
116684
|
displayName: "Handling Fees Rules",
|
|
116684
116685
|
displayField: "productId",
|
|
@@ -116701,7 +116702,7 @@ var require_data = __commonJS({
|
|
|
116701
116702
|
itemRemove: types_impl_1.AccessLevel.ANYONE
|
|
116702
116703
|
}
|
|
116703
116704
|
}
|
|
116704
|
-
|
|
116705
|
+
};
|
|
116705
116706
|
var cmsPlannerPrompt = () => `
|
|
116706
116707
|
<CMS_PLANNER_SYSTEM_PROMPT>
|
|
116707
116708
|
|
|
@@ -116740,7 +116741,7 @@ Blueprint indicates a handling fees system for products.
|
|
|
116740
116741
|
|
|
116741
116742
|
For the collections field, return:
|
|
116742
116743
|
\`\`\`
|
|
116743
|
-
${JSON.stringify(handlingFeesExample, null, 2)}
|
|
116744
|
+
[${JSON.stringify(handlingFeesExample, null, 2)}]
|
|
116744
116745
|
\`\`\`
|
|
116745
116746
|
</example>
|
|
116746
116747
|
|
|
@@ -116986,6 +116987,99 @@ var require_iteration = __commonJS({
|
|
|
116986
116987
|
"use strict";
|
|
116987
116988
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
116988
116989
|
exports2.iterationModePrompt = void 0;
|
|
116990
|
+
var types_1 = require_types_impl2();
|
|
116991
|
+
var insertExample = {
|
|
116992
|
+
collections: [
|
|
116993
|
+
{
|
|
116994
|
+
operation: "insert",
|
|
116995
|
+
data: {
|
|
116996
|
+
idSuffix: "handling-fees-rules",
|
|
116997
|
+
displayName: "Handling Fees Rules",
|
|
116998
|
+
displayField: "productId",
|
|
116999
|
+
fields: [
|
|
117000
|
+
{
|
|
117001
|
+
key: "productId",
|
|
117002
|
+
displayName: "Product",
|
|
117003
|
+
type: "REFERENCE",
|
|
117004
|
+
referenceOptions: {
|
|
117005
|
+
referencedCollectionId: "Stores/Products"
|
|
117006
|
+
}
|
|
117007
|
+
},
|
|
117008
|
+
{ key: "oversizedFee", displayName: "Oversized Fee", type: "NUMBER" },
|
|
117009
|
+
{ key: "fragileFee", displayName: "Fragile Fee", type: "NUMBER" }
|
|
117010
|
+
],
|
|
117011
|
+
dataPermissions: {
|
|
117012
|
+
itemRead: types_1.AccessLevel.ANYONE,
|
|
117013
|
+
itemInsert: types_1.AccessLevel.ANYONE,
|
|
117014
|
+
itemUpdate: types_1.AccessLevel.ANYONE,
|
|
117015
|
+
itemRemove: types_1.AccessLevel.ANYONE
|
|
117016
|
+
}
|
|
117017
|
+
}
|
|
117018
|
+
}
|
|
117019
|
+
],
|
|
117020
|
+
embeddedScriptParameters: [],
|
|
117021
|
+
// No changes needed - existing ones stay as is
|
|
117022
|
+
apiSpec: void 0
|
|
117023
|
+
// No changes needed - existing spec stays as is
|
|
117024
|
+
};
|
|
117025
|
+
var updateExample = {
|
|
117026
|
+
collections: [
|
|
117027
|
+
{
|
|
117028
|
+
operation: "update",
|
|
117029
|
+
data: {
|
|
117030
|
+
idSuffix: "handling-fees-rules",
|
|
117031
|
+
// make sure to use the same idSuffix as the existing collection
|
|
117032
|
+
displayName: "Handling Fees Rules",
|
|
117033
|
+
displayField: "productId",
|
|
117034
|
+
fields: [
|
|
117035
|
+
{
|
|
117036
|
+
key: "productId",
|
|
117037
|
+
displayName: "Product Id",
|
|
117038
|
+
type: "REFERENCE",
|
|
117039
|
+
referenceOptions: {
|
|
117040
|
+
referencedCollectionId: "Stores/Products"
|
|
117041
|
+
}
|
|
117042
|
+
},
|
|
117043
|
+
{ key: "oversizedFee", displayName: "Oversized Fee", type: "NUMBER" },
|
|
117044
|
+
{ key: "fragileFee", displayName: "Fragile Fee", type: "NUMBER" }
|
|
117045
|
+
],
|
|
117046
|
+
dataPermissions: {
|
|
117047
|
+
itemRead: types_1.AccessLevel.ANYONE,
|
|
117048
|
+
itemInsert: types_1.AccessLevel.ANYONE,
|
|
117049
|
+
itemUpdate: types_1.AccessLevel.ANYONE,
|
|
117050
|
+
itemRemove: types_1.AccessLevel.ANYONE
|
|
117051
|
+
}
|
|
117052
|
+
}
|
|
117053
|
+
}
|
|
117054
|
+
],
|
|
117055
|
+
embeddedScriptParameters: [],
|
|
117056
|
+
// No changes needed - existing ones stay as is
|
|
117057
|
+
apiSpec: void 0
|
|
117058
|
+
// No changes needed - existing spec stays as is
|
|
117059
|
+
};
|
|
117060
|
+
var deleteExample = {
|
|
117061
|
+
collections: [],
|
|
117062
|
+
// No changes needed - no collections to change
|
|
117063
|
+
embeddedScriptParameters: [
|
|
117064
|
+
{
|
|
117065
|
+
operation: "delete",
|
|
117066
|
+
data: {
|
|
117067
|
+
extensionId: "site-popup",
|
|
117068
|
+
parameters: [
|
|
117069
|
+
{
|
|
117070
|
+
key: "productId",
|
|
117071
|
+
displayName: "Product Id",
|
|
117072
|
+
type: "NUMBER",
|
|
117073
|
+
required: true,
|
|
117074
|
+
defaultValue: "123"
|
|
117075
|
+
}
|
|
117076
|
+
]
|
|
117077
|
+
}
|
|
117078
|
+
}
|
|
117079
|
+
],
|
|
117080
|
+
apiSpec: void 0
|
|
117081
|
+
// No changes needed - existing spec stays as is
|
|
117082
|
+
};
|
|
116989
117083
|
var iterationModePrompt = () => `
|
|
116990
117084
|
<ITERATION_MODE>
|
|
116991
117085
|
This is an ITERATION mode planning session. You will receive:
|
|
@@ -117029,36 +117123,15 @@ IMPORTANT PRINCIPLES:
|
|
|
117029
117123
|
- If a resource exists and works fine, simply don't include it in your output
|
|
117030
117124
|
|
|
117031
117125
|
Example 1 - Adding a new collection (existing resources remain unchanged):
|
|
117032
|
-
|
|
117033
|
-
|
|
117034
|
-
{
|
|
117035
|
-
"operation": "insert",
|
|
117036
|
-
"collection": { "id": "new-collection", ... }
|
|
117037
|
-
}
|
|
117038
|
-
],
|
|
117039
|
-
"embeddedScriptParameters": [], // No changes needed - existing ones stay as is
|
|
117040
|
-
"apiSpec": undefined // No changes needed - existing spec stays as is
|
|
117041
|
-
}
|
|
117126
|
+
|
|
117127
|
+
${JSON.stringify(insertExample, null, 2)}
|
|
117042
117128
|
|
|
117043
117129
|
Example 2 - Updating an existing collection:
|
|
117044
|
-
{
|
|
117045
|
-
"collections": [
|
|
117046
|
-
{
|
|
117047
|
-
"operation": "update",
|
|
117048
|
-
"collection": { "id": "existing-collection", ... } // Include full updated collection
|
|
117049
|
-
}
|
|
117050
|
-
]
|
|
117051
|
-
}
|
|
117130
|
+
${JSON.stringify(updateExample, null, 2)}
|
|
117052
117131
|
|
|
117053
117132
|
Example 3 - Deleting a collection (BE VERY CAREFUL):
|
|
117054
|
-
{
|
|
117055
|
-
|
|
117056
|
-
{
|
|
117057
|
-
"operation": "delete",
|
|
117058
|
-
"collection": { "id": "unused-collection", ... } // Collection to remove
|
|
117059
|
-
}
|
|
117060
|
-
]
|
|
117061
|
-
}
|
|
117133
|
+
${JSON.stringify(deleteExample, null, 2)}
|
|
117134
|
+
|
|
117062
117135
|
</ITERATION_MODE>
|
|
117063
117136
|
`;
|
|
117064
117137
|
exports2.iterationModePrompt = iterationModePrompt;
|
|
@@ -117653,7 +117726,7 @@ var require_PlannerAgent = __commonJS({
|
|
|
117653
117726
|
"dist/agents/PlannerAgent.js"(exports2) {
|
|
117654
117727
|
"use strict";
|
|
117655
117728
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
117656
|
-
exports2.PlannerAgent = exports2.ApiSpecOperationSchema = exports2.EmbeddedScriptParametersOperationSchema = exports2.CollectionOperationSchema = void 0;
|
|
117729
|
+
exports2.PlannerAgent = exports2.PlannerOutputSchema = exports2.ApiSpecOperationSchema = exports2.EmbeddedScriptParametersOperationSchema = exports2.CollectionOperationSchema = void 0;
|
|
117657
117730
|
var types_1 = require_types_impl();
|
|
117658
117731
|
var anthropic_1 = require_dist6();
|
|
117659
117732
|
var ai_1 = require_dist10();
|
|
@@ -117677,7 +117750,7 @@ var require_PlannerAgent = __commonJS({
|
|
|
117677
117750
|
operation: OperationEnum,
|
|
117678
117751
|
data: ApiSpecSchema_1.ApiSpecSchema.describe("The API specification")
|
|
117679
117752
|
});
|
|
117680
|
-
|
|
117753
|
+
exports2.PlannerOutputSchema = zod_1.z.object({
|
|
117681
117754
|
collections: zod_1.z.array(exports2.CollectionOperationSchema).default([]).describe("CMS collection operations - only include collections that need to be created, updated, or deleted"),
|
|
117682
117755
|
embeddedScriptParameters: zod_1.z.array(exports2.EmbeddedScriptParametersOperationSchema).default([]).describe("Embedded script parameters operations - only include parameters that need to be created, updated, or deleted"),
|
|
117683
117756
|
apiSpec: exports2.ApiSpecOperationSchema.optional().describe("API specification operation - only include if API spec needs to be created, updated, or deleted")
|
|
@@ -117705,7 +117778,7 @@ ${error}` : ""}
|
|
|
117705
117778
|
`;
|
|
117706
117779
|
const result = await (0, ai_1.generateObject)({
|
|
117707
117780
|
model,
|
|
117708
|
-
schema: PlannerOutputSchema,
|
|
117781
|
+
schema: exports2.PlannerOutputSchema,
|
|
117709
117782
|
messages: [
|
|
117710
117783
|
{
|
|
117711
117784
|
role: "system",
|
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.100",
|
|
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": "f457c38097a659b26277ebc1ee7d884559e900d2dd194cde6726f150"
|
|
28
28
|
}
|