@wix/ditto-codegen-public 1.0.281 → 1.0.283

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 +34 -4
  2. package/package.json +2 -2
package/dist/out.js CHANGED
@@ -12072,6 +12072,7 @@ var require_parser = __commonJS({
12072
12072
  exports2.createEmptyUsageStats = createEmptyUsageStats;
12073
12073
  exports2.parseUsageStats = parseUsageStats;
12074
12074
  exports2.mergeUsageStats = mergeUsageStats;
12075
+ exports2.hasSessionError = hasSessionError;
12075
12076
  exports2.formatUsageStats = formatUsageStats;
12076
12077
  var ditto_codegen_types_12 = require_dist4();
12077
12078
  var types_1 = require_types4();
@@ -12199,6 +12200,32 @@ var require_parser = __commonJS({
12199
12200
  stepCount: a.stepCount + b.stepCount
12200
12201
  };
12201
12202
  }
12203
+ function hasSessionError(output) {
12204
+ const lines = output.split("\n");
12205
+ let foundError = false;
12206
+ let lastStepFinishReason;
12207
+ for (const line of lines) {
12208
+ if (!line.trim())
12209
+ continue;
12210
+ const event = (0, types_1.tryParseJson)(line);
12211
+ if (!event)
12212
+ continue;
12213
+ if (event.type === "error") {
12214
+ foundError = true;
12215
+ } else if (event.type === "tool_use") {
12216
+ const toolEvent = event;
12217
+ if (toolEvent.part?.state?.status === "error") {
12218
+ foundError = true;
12219
+ }
12220
+ } else if (event.type === "step_finish") {
12221
+ const stepEvent = event;
12222
+ lastStepFinishReason = stepEvent.part?.reason;
12223
+ }
12224
+ }
12225
+ if (lastStepFinishReason === "stop")
12226
+ return false;
12227
+ return foundError;
12228
+ }
12202
12229
  function formatUsageStats(stats) {
12203
12230
  const lines = [
12204
12231
  `\u{1F4CA} Usage Summary:`,
@@ -12816,8 +12843,10 @@ var require_executor = __commonJS({
12816
12843
  accumulatedSkills.push(...result.skillsUsed);
12817
12844
  accumulatedExtensions.push(...result.extensionsCreated);
12818
12845
  const errorMsg = result.error?.message.toLowerCase() ?? "";
12819
- const isRetryableFailure = !result.success && errorMsg.includes("idle timeout");
12820
- if (result.success || !isRetryableFailure) {
12846
+ const isIdleTimeout = !result.success && errorMsg.includes("idle timeout");
12847
+ const isSessionError = (0, parser_1.hasSessionError)(result.stdout);
12848
+ const isRetryableFailure = isIdleTimeout || isSessionError;
12849
+ if (!isRetryableFailure) {
12821
12850
  const finalResult2 = {
12822
12851
  ...result,
12823
12852
  filesChanged: (0, parser_1.parseFilesChanged)(accumulatedStdout),
@@ -12830,7 +12859,8 @@ var require_executor = __commonJS({
12830
12859
  return finalResult2;
12831
12860
  }
12832
12861
  lastResult = result;
12833
- logger_12.logger.warn("[OpenCode] Attempt failed due to idle timeout, will retry", {
12862
+ const reason = isSessionError ? "session error" : "idle timeout";
12863
+ logger_12.logger.warn(`[OpenCode] Attempt failed due to ${reason}, will retry`, {
12834
12864
  attempt,
12835
12865
  maxRetries: MAX_RETRIES
12836
12866
  });
@@ -17686,7 +17716,7 @@ var require_opencode_init = __commonJS({
17686
17716
  const preDecisionResult = await (0, pre_run_decision_1.runPreDecisionCheck)(localJobContext.jobId, { blueprint }, [pre_run_decision_1.checkSiteUIDecision]);
17687
17717
  finalBlueprint = preDecisionResult.modifiedBlueprint ?? blueprint;
17688
17718
  if (preDecisionResult.decisionsApplied.length > 0) {
17689
- jobLog.info(`[OpenCode Init] Applied ${preDecisionResult.decisionsApplied.length} pre-decision(s)`);
17719
+ jobLog.info(`[OpenCode Init] Applied ${preDecisionResult.decisionsApplied.length} pre-decision(s). Final blueprint: ${JSON.stringify(finalBlueprint)}`);
17690
17720
  }
17691
17721
  }
17692
17722
  const orchestrator = new OpenCodeOrchestrator_1.OpenCodeOrchestrator();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wix/ditto-codegen-public",
3
- "version": "1.0.281",
3
+ "version": "1.0.283",
4
4
  "description": "AI-powered Wix CLI app generator - standalone executable",
5
5
  "scripts": {
6
6
  "build": "node build.mjs",
@@ -27,5 +27,5 @@
27
27
  "@wix/ditto-codegen": "1.0.0",
28
28
  "esbuild": "^0.27.2"
29
29
  },
30
- "falconPackageHash": "e39b88437d896c3bb1ea1dc7fe24ba49aa713d1c4f0da324bbed24e9"
30
+ "falconPackageHash": "c5209065639e84ea359b21481b35c511095eb616c45795962d8c8b69"
31
31
  }