@wix/ditto-codegen-public 1.0.502 → 1.0.504

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 +29 -7
  2. package/package.json +2 -2
package/dist/out.js CHANGED
@@ -14608,7 +14608,7 @@ var require_model_knobs = __commonJS({
14608
14608
  exports2.getSmallReasoningEffort = getSmallReasoningEffort;
14609
14609
  exports2.hasSmallReasoningEffortOverride = hasSmallReasoningEffortOverride;
14610
14610
  exports2.getOpenAiServiceTier = getOpenAiServiceTier;
14611
- exports2.DEFAULT_MODEL = "openai/gpt-6-sol";
14611
+ exports2.DEFAULT_MODEL = "openai/gpt-6.1-sol";
14612
14612
  exports2.DEFAULT_SMALL_MODEL = "openai/gpt-6-luna";
14613
14613
  var DEFAULT_REASONING_EFFORT = "low";
14614
14614
  var SMALL_MODEL_REASONING_EFFORT = "medium";
@@ -15438,6 +15438,7 @@ When done, summarize each error: message, file, root cause, fix. No diffs.`;
15438
15438
  "openai/gpt-5.6-terra": ["xhigh", "high", "medium", "low"],
15439
15439
  "openai/gpt-6-astra": ["xhigh", "high", "medium", "low"],
15440
15440
  "openai/gpt-6-sol": ["xhigh", "high", "medium", "low"],
15441
+ "openai/gpt-6.1-sol": ["xhigh", "high", "medium", "low"],
15441
15442
  "openai/gpt-6-luna": ["xhigh", "high", "medium", "low"]
15442
15443
  };
15443
15444
  function agentModel(model, opts = {}) {
@@ -16327,6 +16328,7 @@ var require_validation_state = __commonJS({
16327
16328
  Object.defineProperty(exports2, "__esModule", { value: true });
16328
16329
  exports2.VALIDATION_NUDGE = exports2.USER_SOURCE_SCAN = exports2.USER_ATTACHMENTS_LIST = exports2.VALIDATION_STATE_PLUGIN_FILENAME = exports2.VALIDATION_LOADED_EVENT_TYPE = exports2.VALIDATION_STATE_EVENT_TYPE = void 0;
16329
16330
  exports2.isReadOnlyShellCommand = isReadOnlyShellCommand;
16331
+ exports2.validationFailureDetail = validationFailureDetail;
16330
16332
  exports2.buildValidationStateSource = buildValidationStateSource;
16331
16333
  exports2.writeValidationStatePlugin = writeValidationStatePlugin;
16332
16334
  var write_plugin_1 = require_write_plugin();
@@ -16344,6 +16346,17 @@ var require_validation_state = __commonJS({
16344
16346
  exports2.USER_ATTACHMENTS_LIST = ".wix/agentInput/userAttachments.json";
16345
16347
  exports2.USER_SOURCE_SCAN = `${skills_override_12.SKILLS_DIR}/wix-app/scripts/scan-user-source.cjs`;
16346
16348
  exports2.VALIDATION_NUDGE = "Project files need validation. Follow your validation workflow (delegate to codegen-validator if your instructions require it), run validate({ runBuild: true }), and fix any errors before finishing. Your last message is shown to the user: once validation passes, end with a short plain-language summary for them: what changed, and if there is something you could not do, why and what they need to do next. Do not mention validation.";
16349
+ function validationFailureDetail(output) {
16350
+ const MAX_FAILURE_DETAIL_CHARS = 1800;
16351
+ const TRUNCATED_MARKER = "\n[truncated]";
16352
+ if (typeof output !== "string")
16353
+ return void 0;
16354
+ const start = output.search(/^FAILED at/m);
16355
+ if (start === -1)
16356
+ return void 0;
16357
+ const detail = output.slice(start).trim();
16358
+ return detail.length > MAX_FAILURE_DETAIL_CHARS ? detail.slice(0, MAX_FAILURE_DETAIL_CHARS - TRUNCATED_MARKER.length) + TRUNCATED_MARKER : detail;
16359
+ }
16347
16360
  function buildValidationStateSource() {
16348
16361
  return String.raw`// Generated by @wix/ditto-codegen (validation-state). Do not edit.
16349
16362
  const EVENT_TYPE = ${JSON.stringify(exports2.VALIDATION_STATE_EVENT_TYPE)};
@@ -16354,6 +16367,7 @@ const injectCreatedBy = ${detect_1.injectCreatedBy.toString()};
16354
16367
  const prepareCreatedExtensionFiles = ${prepare_created_by_1.prepareCreatedExtensionFiles.toString()};
16355
16368
  const isMissingGitRepository = ${repository_status_1.isMissingGitRepository.toString()};
16356
16369
  const isReadOnlyShellCommand = ${isReadOnlyShellCommand.toString()};
16370
+ const validationFailureDetail = ${validationFailureDetail.toString()};
16357
16371
  const USER_ATTACHMENTS_LIST = ${JSON.stringify(exports2.USER_ATTACHMENTS_LIST)};
16358
16372
  const USER_SOURCE_SCAN = ${JSON.stringify(exports2.USER_SOURCE_SCAN)};
16359
16373
  const changedEditorComponents = ${user_source_port_1.changedEditorComponents.toString()};
@@ -16439,7 +16453,8 @@ export const ValidationState = async ({ client, directory, $ }) => {
16439
16453
  let currentFingerprint = cleanFingerprint;
16440
16454
  let hasValidationFailure = process.env.CODEGEN_REQUIRE_VALIDATION === "1";
16441
16455
  let hasUnvalidatedMutation = false;
16442
- let lastClean;
16456
+ let lastRow;
16457
+ let currentFailure;
16443
16458
  let mutationEpoch = 0;
16444
16459
  let revisionNudges = 0;
16445
16460
  let totalNudges = 0;
@@ -16448,9 +16463,11 @@ export const ValidationState = async ({ client, directory, $ }) => {
16448
16463
  const activeMutations = new Set();
16449
16464
  const key = (input) => input.sessionID + ":" + input.callID;
16450
16465
  const emit = (sessionID, clean) => {
16451
- if (lastClean === clean) return;
16452
- lastClean = clean;
16453
- process.stdout.write(JSON.stringify({ type: EVENT_TYPE, sessionID, clean }) + "\n");
16466
+ const failure = clean ? undefined : currentFailure;
16467
+ const rowKey = JSON.stringify([clean, failure]);
16468
+ if (lastRow === rowKey) return;
16469
+ lastRow = rowKey;
16470
+ process.stdout.write(JSON.stringify({ type: EVENT_TYPE, sessionID, clean, ...(failure ? { failure } : {}) }) + "\n");
16454
16471
  };
16455
16472
  const refresh = async (sessionID) => {
16456
16473
  const fingerprint = await snapshot();
@@ -16487,6 +16504,7 @@ export const ValidationState = async ({ client, directory, $ }) => {
16487
16504
  // discarded that validation. The after hook still compares fingerprints.
16488
16505
  if (input.tool === "bash" && typeof args.command === "string" && isReadOnlyShellCommand(args.command)) return;
16489
16506
  hasUnvalidatedMutation = true;
16507
+ currentFailure = undefined;
16490
16508
  revisionNudges = 0;
16491
16509
  mutationEpoch += 1;
16492
16510
  activeMutations.add(key(input));
@@ -16503,6 +16521,9 @@ export const ValidationState = async ({ client, directory, $ }) => {
16503
16521
  validations.delete(key(input));
16504
16522
  const passed = typeof output.output === "string" && !/^FAILED at/m.test(output.output);
16505
16523
  if (!passed) hasValidationFailure = true;
16524
+ if (input.args?.runBuild === true && epoch !== undefined && epoch === mutationEpoch && activeMutations.size === 0) {
16525
+ currentFailure = passed ? undefined : validationFailureDetail(output.output);
16526
+ }
16506
16527
  if (passed && input.args?.runBuild === true) {
16507
16528
  const fingerprint = await snapshot();
16508
16529
  if (epoch === mutationEpoch && activeMutations.size === 0 && validations.size === 0) {
@@ -16585,7 +16606,7 @@ var require_parser = __commonJS({
16585
16606
  if (event?.type !== validation_state_1.VALIDATION_STATE_EVENT_TYPE || typeof event.sessionID !== "string" || typeof event.clean !== "boolean") {
16586
16607
  continue;
16587
16608
  }
16588
- validationState = event;
16609
+ validationState = typeof event.failure === "string" ? event : { ...event, failure: void 0 };
16589
16610
  }
16590
16611
  return validationState;
16591
16612
  }
@@ -18287,7 +18308,8 @@ var require_session_validation = __commonJS({
18287
18308
  }
18288
18309
  throw new host_validation_1.HostValidationError("agent validation state", "validate({ runBuild: true })", {
18289
18310
  exitCode: 1,
18290
- stderr: "Project files remain unvalidated after the in-session validation reminders."
18311
+ stderr: validationState.failure ? `The last validate({ runBuild: true }) failed and no file changed after it:
18312
+ ${validationState.failure}` : "Project files remain unvalidated after the in-session validation reminders."
18291
18313
  });
18292
18314
  }
18293
18315
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wix/ditto-codegen-public",
3
- "version": "1.0.502",
3
+ "version": "1.0.504",
4
4
  "description": "AI-powered Wix CLI app generator - standalone executable",
5
5
  "scripts": {
6
6
  "build": "node build.mjs",
@@ -29,5 +29,5 @@
29
29
  "esbuild": "^0.27.2",
30
30
  "vitest": "^4.0.16"
31
31
  },
32
- "falconPackageHash": "60edbe5f7cd333e6a1fee879a59b78559f5e63f196806994d0034f31"
32
+ "falconPackageHash": "aaff4b292f969433a252c3409ae065214add5e83b52dfd2c9634273a"
33
33
  }