@wix/ditto-codegen-public 1.0.269 → 1.0.271
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 -35
- package/package.json +2 -2
package/dist/out.js
CHANGED
|
@@ -48704,7 +48704,7 @@ var require_constants6 = __commonJS({
|
|
|
48704
48704
|
exports2.isMcpTool = isMcpTool;
|
|
48705
48705
|
exports2.normalizeFilePath = normalizeFilePath;
|
|
48706
48706
|
exports2.isExtensionsFile = isExtensionsFile;
|
|
48707
|
-
exports2.
|
|
48707
|
+
exports2.detectExtension = detectExtension;
|
|
48708
48708
|
exports2.toTitleCase = toTitleCase;
|
|
48709
48709
|
exports2.extractExtensionName = extractExtensionName;
|
|
48710
48710
|
exports2.getWrittenContent = getWrittenContent;
|
|
@@ -48751,13 +48751,13 @@ var require_constants6 = __commonJS({
|
|
|
48751
48751
|
function isExtensionsFile(filePath) {
|
|
48752
48752
|
return EXTENSION_FILE_PATTERN.test(filePath);
|
|
48753
48753
|
}
|
|
48754
|
-
function
|
|
48755
|
-
if (content.includes("genericExtension(") && content.includes("
|
|
48756
|
-
return "collection";
|
|
48754
|
+
function detectExtension(content) {
|
|
48755
|
+
if (content.includes("genericExtension(") && content.includes("DATA_COMPONENT")) {
|
|
48756
|
+
return { extensionType: "dataCollection", label: "collection" };
|
|
48757
48757
|
}
|
|
48758
|
-
for (const [
|
|
48759
|
-
if (content.includes(`extensions.${
|
|
48760
|
-
return label;
|
|
48758
|
+
for (const [extensionType, label] of Object.entries(exports2.BUILDER_TO_EXTENSION_LABEL)) {
|
|
48759
|
+
if (content.includes(`extensions.${extensionType}(`)) {
|
|
48760
|
+
return { extensionType, label };
|
|
48761
48761
|
}
|
|
48762
48762
|
}
|
|
48763
48763
|
return null;
|
|
@@ -49087,7 +49087,10 @@ var require_extension_handler = __commonJS({
|
|
|
49087
49087
|
var constants_1 = require_constants6();
|
|
49088
49088
|
var ExtensionTaskHandler = class {
|
|
49089
49089
|
constructor() {
|
|
49090
|
-
this.extensionTasksCreated = /* @__PURE__ */ new
|
|
49090
|
+
this.extensionTasksCreated = /* @__PURE__ */ new Map();
|
|
49091
|
+
}
|
|
49092
|
+
getExtensionTypesCreated() {
|
|
49093
|
+
return Array.from(this.extensionTasksCreated.values());
|
|
49091
49094
|
}
|
|
49092
49095
|
/** Inspects a write/edit event; if it targets an extension file, creates a tracked sub-task. */
|
|
49093
49096
|
async handle(tool2, state, ctx) {
|
|
@@ -49097,14 +49100,15 @@ var require_extension_handler = __commonJS({
|
|
|
49097
49100
|
const content = (0, constants_1.getWrittenContent)(tool2, state);
|
|
49098
49101
|
if (!content)
|
|
49099
49102
|
return;
|
|
49100
|
-
const
|
|
49101
|
-
if (!
|
|
49103
|
+
const extension = (0, constants_1.detectExtension)(content);
|
|
49104
|
+
if (!extension)
|
|
49102
49105
|
return;
|
|
49103
49106
|
const normalizedPath = (0, constants_1.normalizeFilePath)(filePath);
|
|
49104
49107
|
if (this.extensionTasksCreated.has(normalizedPath))
|
|
49105
49108
|
return;
|
|
49109
|
+
this.extensionTasksCreated.set(normalizedPath, extension.extensionType);
|
|
49106
49110
|
await this.completeInitTask(ctx);
|
|
49107
|
-
await this.createExtensionTask(normalizedPath,
|
|
49111
|
+
await this.createExtensionTask(normalizedPath, extension.label, filePath, ctx);
|
|
49108
49112
|
}
|
|
49109
49113
|
/** Completes the INIT_CODEGEN task once the extension tasks are created. */
|
|
49110
49114
|
async completeInitTask(ctx) {
|
|
@@ -49131,7 +49135,6 @@ var require_extension_handler = __commonJS({
|
|
|
49131
49135
|
const extensionName = (0, constants_1.extractExtensionName)(originalPath);
|
|
49132
49136
|
const description = `Creating ${extensionName} ${extensionType}`;
|
|
49133
49137
|
const extensionKey = `ext-${normalizedPath}`;
|
|
49134
|
-
this.extensionTasksCreated.add(normalizedPath);
|
|
49135
49138
|
ctx.taskCounter++;
|
|
49136
49139
|
const taskId = `${jobContext.taskId}-ext-${ctx.taskCounter}`;
|
|
49137
49140
|
const extensionFolder = normalizedPath.substring(0, normalizedPath.lastIndexOf("/") + 1);
|
|
@@ -49249,6 +49252,9 @@ var require_task_tracker = __commonJS({
|
|
|
49249
49252
|
getSkillsUsed() {
|
|
49250
49253
|
return Array.from(this.skillsUsed);
|
|
49251
49254
|
}
|
|
49255
|
+
getExtensionsCreated() {
|
|
49256
|
+
return this.extensionHandler.getExtensionTypesCreated();
|
|
49257
|
+
}
|
|
49252
49258
|
getJobContext() {
|
|
49253
49259
|
if (!this.store?.jobId || !this.store?.taskId) {
|
|
49254
49260
|
return null;
|
|
@@ -49462,7 +49468,8 @@ var require_result_builder = __commonJS({
|
|
|
49462
49468
|
requiredPermissions: [],
|
|
49463
49469
|
filesChanged: (0, parser_1.parseFilesChanged)(stdout),
|
|
49464
49470
|
usage: (0, parser_1.parseUsageStats)(stdout),
|
|
49465
|
-
skillsUsed: []
|
|
49471
|
+
skillsUsed: [],
|
|
49472
|
+
extensionsCreated: []
|
|
49466
49473
|
};
|
|
49467
49474
|
}
|
|
49468
49475
|
function createSuccessResult(code, stdout, stderr, startTime) {
|
|
@@ -49480,7 +49487,8 @@ var require_result_builder = __commonJS({
|
|
|
49480
49487
|
requiredPermissions: (0, parser_1.parseRequiredPermissions)(stdout),
|
|
49481
49488
|
filesChanged: (0, parser_1.parseFilesChanged)(stdout),
|
|
49482
49489
|
usage: (0, parser_1.parseUsageStats)(stdout),
|
|
49483
|
-
skillsUsed: []
|
|
49490
|
+
skillsUsed: [],
|
|
49491
|
+
extensionsCreated: []
|
|
49484
49492
|
};
|
|
49485
49493
|
}
|
|
49486
49494
|
function createSpawnErrorResult(errorMessage, stdout, stderr, startTime) {
|
|
@@ -49497,7 +49505,8 @@ var require_result_builder = __commonJS({
|
|
|
49497
49505
|
requiredPermissions: [],
|
|
49498
49506
|
filesChanged: [],
|
|
49499
49507
|
usage: (0, parser_1.createEmptyUsageStats)(),
|
|
49500
|
-
skillsUsed: []
|
|
49508
|
+
skillsUsed: [],
|
|
49509
|
+
extensionsCreated: []
|
|
49501
49510
|
};
|
|
49502
49511
|
}
|
|
49503
49512
|
}
|
|
@@ -49607,6 +49616,7 @@ var require_executor = __commonJS({
|
|
|
49607
49616
|
let accumulatedStdout = "";
|
|
49608
49617
|
let accumulatedUsage = (0, parser_1.createEmptyUsageStats)();
|
|
49609
49618
|
const accumulatedSkills = [];
|
|
49619
|
+
const accumulatedExtensions = [];
|
|
49610
49620
|
let currentPrompt = options.prompt;
|
|
49611
49621
|
for (let attempt = 1; attempt <= MAX_RETRIES; attempt++) {
|
|
49612
49622
|
if (attempt > 1) {
|
|
@@ -49618,6 +49628,7 @@ var require_executor = __commonJS({
|
|
|
49618
49628
|
accumulatedStdout += result.stdout;
|
|
49619
49629
|
accumulatedUsage = (0, parser_1.mergeUsageStats)(accumulatedUsage, result.usage);
|
|
49620
49630
|
accumulatedSkills.push(...result.skillsUsed);
|
|
49631
|
+
accumulatedExtensions.push(...result.extensionsCreated);
|
|
49621
49632
|
const errorMsg = result.error?.message.toLowerCase() ?? "";
|
|
49622
49633
|
const isRetryableFailure = !result.success && errorMsg.includes("idle timeout");
|
|
49623
49634
|
if (result.success || !isRetryableFailure) {
|
|
@@ -49625,7 +49636,8 @@ var require_executor = __commonJS({
|
|
|
49625
49636
|
...result,
|
|
49626
49637
|
filesChanged: (0, parser_1.parseFilesChanged)(accumulatedStdout),
|
|
49627
49638
|
usage: accumulatedUsage,
|
|
49628
|
-
skillsUsed: accumulatedSkills
|
|
49639
|
+
skillsUsed: accumulatedSkills,
|
|
49640
|
+
extensionsCreated: accumulatedExtensions
|
|
49629
49641
|
};
|
|
49630
49642
|
logger_12.logger.info((0, parser_1.formatUsageStats)(finalResult2.usage));
|
|
49631
49643
|
return finalResult2;
|
|
@@ -49643,7 +49655,8 @@ var require_executor = __commonJS({
|
|
|
49643
49655
|
...lastResult,
|
|
49644
49656
|
filesChanged: (0, parser_1.parseFilesChanged)(accumulatedStdout),
|
|
49645
49657
|
usage: accumulatedUsage,
|
|
49646
|
-
skillsUsed: Array.from(accumulatedSkills)
|
|
49658
|
+
skillsUsed: Array.from(accumulatedSkills),
|
|
49659
|
+
extensionsCreated: accumulatedExtensions
|
|
49647
49660
|
};
|
|
49648
49661
|
logger_12.logger.info((0, parser_1.formatUsageStats)(finalResult.usage));
|
|
49649
49662
|
return finalResult;
|
|
@@ -49678,6 +49691,7 @@ var require_executor = __commonJS({
|
|
|
49678
49691
|
await taskTracker.failRemainingTasks(result.error?.message || "Code generation failed");
|
|
49679
49692
|
}
|
|
49680
49693
|
result.skillsUsed = taskTracker.getSkillsUsed();
|
|
49694
|
+
result.extensionsCreated = taskTracker.getExtensionsCreated();
|
|
49681
49695
|
resolve3(result);
|
|
49682
49696
|
};
|
|
49683
49697
|
const ctx = {
|
|
@@ -49723,7 +49737,8 @@ var require_executor = __commonJS({
|
|
|
49723
49737
|
requiredPermissions: [],
|
|
49724
49738
|
filesChanged: [],
|
|
49725
49739
|
usage: (0, parser_1.createEmptyUsageStats)(),
|
|
49726
|
-
skillsUsed: []
|
|
49740
|
+
skillsUsed: [],
|
|
49741
|
+
extensionsCreated: []
|
|
49727
49742
|
});
|
|
49728
49743
|
}
|
|
49729
49744
|
});
|
|
@@ -49856,12 +49871,7 @@ var require_OpenCodeOrchestrator = __commonJS({
|
|
|
49856
49871
|
this.emitEvent("opencode:done", { durationMs });
|
|
49857
49872
|
this.emitEvent("finish:code-generation", { outputPath, durationMs });
|
|
49858
49873
|
this.emitEvent("finish", { outputPath, durationMs });
|
|
49859
|
-
return
|
|
49860
|
-
requiredPermissions: result.requiredPermissions,
|
|
49861
|
-
filesChanged: result.filesChanged,
|
|
49862
|
-
usage: result.usage,
|
|
49863
|
-
skillsUsed: result.skillsUsed
|
|
49864
|
-
};
|
|
49874
|
+
return result;
|
|
49865
49875
|
}
|
|
49866
49876
|
};
|
|
49867
49877
|
exports2.OpenCodeOrchestrator = OpenCodeOrchestrator;
|
|
@@ -74799,7 +74809,7 @@ var require_SitePluginAgent = __commonJS({
|
|
|
74799
74809
|
- Event page custom content
|
|
74800
74810
|
- Blog post page enhancements
|
|
74801
74811
|
- **Slot System**: Site plugins are placed in predefined slots within existing Wix business solution pages. Each slot is identified by an appDefinitionId, widgetId, and slotId. Site owners can add plugins to slots using the plugin explorer in Wix editors.
|
|
74802
|
-
- **Settings Panel**: Site plugins have a built-in settings panel in the Wix Editor for per-instance configuration using widget.getProp/setProp. Similar to Site Widgets, the panel handles configuration without needing a separate Dashboard Page.
|
|
74812
|
+
- **Settings Panel**: Site plugins have a built-in settings panel in the Wix Editor for per-instance configuration using widget.getProp/setProp. Similar to Site Widgets, the panel handles configuration without needing a separate Dashboard Page. **Exception: Checkout page and side cart plugins may not support automatic addition upon installation \u2014 these MUST include a Dashboard Page for plugin placement management.**
|
|
74803
74813
|
- **When to Choose**: When you need to extend existing Wix business solution pages (Stores, Bookings, eCommerce, Events, Blog) with custom UI in predefined slot positions. Unlike Site Widgets (which can be placed anywhere), Site Plugins are designed for specific integration points within Wix business apps.
|
|
74804
74814
|
|
|
74805
74815
|
**Common Placement Areas:**
|
|
@@ -74822,7 +74832,8 @@ var require_SitePluginAgent = __commonJS({
|
|
|
74822
74832
|
- \u2705 Want to add contextual UI to predefined slots within business app pages
|
|
74823
74833
|
- \u2705 Building product page enhancements, booking page extensions, or checkout integrations
|
|
74824
74834
|
- \u2705 Need to integrate with the specific page context (e.g., current product, current booking)
|
|
74825
|
-
- \u2705 Want to leverage the slot-based plugin explorer for site owners
|
|
74835
|
+
- \u2705 Want to leverage the slot-based plugin explorer for site owners
|
|
74836
|
+
- \u26A0\uFE0F If targeting checkout or side cart slots, ALSO include a DASHBOARD_PAGE for plugin placement management (auto-add may not work for these slots)`;
|
|
74826
74837
|
};
|
|
74827
74838
|
exports2.getSitePluginDecisionGuide = getSitePluginDecisionGuide;
|
|
74828
74839
|
}
|
|
@@ -74960,7 +74971,7 @@ var require_commonUseCasesGuide = __commonJS({
|
|
|
74960
74971
|
| Product reviews on product page | Site Plugins | Predefined slots in product pages | Reviews are contextually tied to each product \u2192 Site Plugin, not Site Widget |
|
|
74961
74972
|
| Product page enhancements | Site Plugins | Predefined slots in business pages | Contextual integration with Stores, Bookings, etc. |
|
|
74962
74973
|
| Booking page extensions | Site Plugins | Predefined slots in business pages | Extend existing Wix business solution pages |
|
|
74963
|
-
| Checkout upsells | Site Plugins
|
|
74974
|
+
| Checkout upsells | Site Plugins + Dashboard Page | Predefined slots in eCommerce pages | Checkout/side cart plugins need Dashboard Page for plugin placement management |
|
|
74964
74975
|
| App-specific data storage | Data Collections | CMS data layer | Structured data for app extensions to read/write |
|
|
74965
74976
|
| Per-product fees/rules | Dashboard Page + Service Plugin + Data Collection | Admin + checkout + data | Dashboard manages rules, Data Collection stores them, Service Plugin reads at checkout |`;
|
|
74966
74977
|
const comparisonGuide = `
|
|
@@ -97077,7 +97088,8 @@ var require_opencode_init = __commonJS({
|
|
|
97077
97088
|
operation: file2.operation
|
|
97078
97089
|
}))
|
|
97079
97090
|
}),
|
|
97080
|
-
Job_skills_used: result.skillsUsed.join(",")
|
|
97091
|
+
Job_skills_used: result.skillsUsed.join(","),
|
|
97092
|
+
Job_extensions_created: result.extensionsCreated.join(",")
|
|
97081
97093
|
});
|
|
97082
97094
|
jobLog.info(`[OpenCode Init] Completed opencode init task: jobId=${jobId}, taskId=${taskId}`);
|
|
97083
97095
|
} catch (error48) {
|
|
@@ -97157,12 +97169,7 @@ var require_OpenCodeIterationOrchestrator = __commonJS({
|
|
|
97157
97169
|
}
|
|
97158
97170
|
this.emitEvent("opencode:done", { durationMs });
|
|
97159
97171
|
this.emitEvent("finish:iteration", { outputPath, durationMs });
|
|
97160
|
-
return
|
|
97161
|
-
requiredPermissions: result.requiredPermissions,
|
|
97162
|
-
filesChanged: result.filesChanged,
|
|
97163
|
-
usage: result.usage,
|
|
97164
|
-
skillsUsed: result.skillsUsed
|
|
97165
|
-
};
|
|
97172
|
+
return result;
|
|
97166
97173
|
}
|
|
97167
97174
|
};
|
|
97168
97175
|
exports2.OpenCodeIterationOrchestrator = OpenCodeIterationOrchestrator;
|
|
@@ -97238,7 +97245,8 @@ var require_opencode_iterate = __commonJS({
|
|
|
97238
97245
|
Task_cost: Math.round(result.usage.cost * 1e6),
|
|
97239
97246
|
Task_status: ditto_codegen_types_12.Status.COMPLETED,
|
|
97240
97247
|
Agent_output: JSON.stringify(taskOutput),
|
|
97241
|
-
Job_skills_used: result.skillsUsed.join(",")
|
|
97248
|
+
Job_skills_used: result.skillsUsed.join(","),
|
|
97249
|
+
Job_extensions_created: result.extensionsCreated.join(",")
|
|
97242
97250
|
});
|
|
97243
97251
|
jobLog.info("[OpenCode Iterate] Completed task");
|
|
97244
97252
|
} catch (error48) {
|
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.271",
|
|
4
4
|
"description": "AI-powered Wix CLI app generator - standalone executable",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"build": "node build.mjs",
|
|
@@ -28,5 +28,5 @@
|
|
|
28
28
|
"@wix/ditto-codegen": "1.0.0",
|
|
29
29
|
"esbuild": "^0.27.2"
|
|
30
30
|
},
|
|
31
|
-
"falconPackageHash": "
|
|
31
|
+
"falconPackageHash": "5e66bc6cd3605cebf462ead450ef7cf9f7de5afe6047e83538b3d004"
|
|
32
32
|
}
|