@wix/ditto-codegen-public 1.0.513 → 1.0.515

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/README.md CHANGED
@@ -6,7 +6,7 @@ Standalone, publishable build of codegen (`@wix/ditto-codegen`): a single esbuil
6
6
 
7
7
  1. Cleans `dist/` and `assets/`.
8
8
  2. Copies `../codegen/src/opencode-integration/opencode-tools` (always-on tools and the `env-tools/` subdir) to `dist/opencode-tools`.
9
- 3. Copies the `assets/` dir of every workspace package matching `codegen-*-plugin*` (the checkpoint and feature-vibe plugins) into one flat `assets/` dir. Plugin factories read these via `__dirname/../assets/`, which resolves to this package's `assets/` once bundled. Same-named files from different plugins overwrite each other.
9
+ 3. Copies the `assets/` dir of every workspace package matching `codegen-*-plugin*` (the checkpoint plugin) into one flat `assets/` dir. Plugin factories read these via `__dirname/../assets/`, which resolves to this package's `assets/` once bundled. Same-named files from different plugins overwrite each other.
10
10
  4. Bundles `dist/index.js` of `../codegen` (so `@wix/ditto-codegen` must be built first, via turbo) into `dist/out.js` for Node 22 with `esbuild` kept external. `SKILLS_OVERRIDE_BRANCH`, if set at build time, is baked in.
11
11
 
12
12
  Published files: `dist` and `assets`.
package/dist/out.js CHANGED
@@ -14160,362 +14160,6 @@ var require_dist8 = __commonJS({
14160
14160
  }
14161
14161
  });
14162
14162
 
14163
- // ../../node_modules/@wix/ambassador-viewer-v1-feature-vibe-project/cjs/build/http.impl.js
14164
- var require_http_impl3 = __commonJS({
14165
- "../../node_modules/@wix/ambassador-viewer-v1-feature-vibe-project/cjs/build/http.impl.js"(exports2) {
14166
- "use strict";
14167
- Object.defineProperty(exports2, "__esModule", { value: true });
14168
- exports2.generateCode = generateCode;
14169
- exports2.getGeneratedCodeJobStatus = getGeneratedCodeJobStatus;
14170
- exports2.save = save;
14171
- exports2.getProjectStatus = getProjectStatus;
14172
- var metro_runtime_1 = require_build();
14173
- var ambassador_1 = require_ambassador_index();
14174
- var metro_runtime_2 = require_build();
14175
- var _codeGenerationTask = {
14176
- createdAt: "google.protobuf.Timestamp",
14177
- updatedAt: "google.protobuf.Timestamp"
14178
- };
14179
- var _generateCodeRequest = {};
14180
- var _generateCodeResponse = {};
14181
- var _getGeneratedCodeJobStatusRequest = {};
14182
- var _getGeneratedCodeJobStatusResponse = { tasks: "_codeGenerationTask" };
14183
- var _getProjectStatusRequest = {};
14184
- var _getProjectStatusResponse = {};
14185
- var _saveRequest = {};
14186
- var _saveResponse = {};
14187
- function resolveWixViewerV1FeatureVibeUrl(opts) {
14188
- var domainToMappings = {
14189
- "editor._base_domain_": [
14190
- {
14191
- srcPath: "/_api/custom-component-orchestrator",
14192
- destPath: ""
14193
- }
14194
- ],
14195
- "blocks._base_domain_": [
14196
- {
14197
- srcPath: "/_api/custom-component-orchestrator",
14198
- destPath: ""
14199
- }
14200
- ],
14201
- "create.editorx": [
14202
- {
14203
- srcPath: "/_api/custom-component-orchestrator",
14204
- destPath: ""
14205
- }
14206
- ],
14207
- "bo._base_domain_": [
14208
- {
14209
- srcPath: "/_api/custom-component-orchestrator",
14210
- destPath: ""
14211
- }
14212
- ],
14213
- "wixbo.ai": [
14214
- {
14215
- srcPath: "/_api/custom-component-orchestrator",
14216
- destPath: ""
14217
- }
14218
- ],
14219
- "wix-bo.com": [
14220
- {
14221
- srcPath: "/_api/custom-component-orchestrator",
14222
- destPath: ""
14223
- }
14224
- ],
14225
- "manage._base_domain_": [
14226
- {
14227
- srcPath: "/_api/custom-component-orchestrator",
14228
- destPath: ""
14229
- }
14230
- ]
14231
- };
14232
- return (0, metro_runtime_2.resolveUrl)(Object.assign(opts, { domainToMappings }));
14233
- }
14234
- function generateCode(payload) {
14235
- var _a = (0, ambassador_1.serializer)(_generateCodeRequest, {}), toReq = _a.toJSON, fromReq = _a.fromJSON;
14236
- var fromRes = (0, ambassador_1.serializer)(_generateCodeResponse, {}).fromJSON;
14237
- function __generateCode(_a2) {
14238
- var host = _a2.host;
14239
- var serializedData = toReq(payload);
14240
- var metadata = {
14241
- entityFqdn: "wix.viewer.v1.feature_vibe_project",
14242
- method: "POST",
14243
- methodFqn: "wix.viewer.v1.FeatureVibe.GenerateCode",
14244
- migrationOptions: {
14245
- optInTransformResponse: true
14246
- },
14247
- url: resolveWixViewerV1FeatureVibeUrl({
14248
- protoPath: "/v1/feature-vibe/generate-code",
14249
- data: serializedData,
14250
- host
14251
- }),
14252
- data: serializedData,
14253
- transformResponse: fromRes
14254
- };
14255
- return metadata;
14256
- }
14257
- __generateCode.fromReq = fromReq;
14258
- __generateCode.__isAmbassador = true;
14259
- return __generateCode;
14260
- }
14261
- function getGeneratedCodeJobStatus(payload) {
14262
- var _a = (0, ambassador_1.serializer)(_getGeneratedCodeJobStatusRequest, {}), toReq = _a.toJSON, fromReq = _a.fromJSON;
14263
- var fromRes = (0, ambassador_1.serializer)(_getGeneratedCodeJobStatusResponse, {
14264
- _codeGenerationTask
14265
- }).fromJSON;
14266
- function __getGeneratedCodeJobStatus(_a2) {
14267
- var host = _a2.host;
14268
- var serializedData = toReq(payload);
14269
- var metadata = {
14270
- entityFqdn: "wix.viewer.v1.feature_vibe_project",
14271
- method: "GET",
14272
- methodFqn: "wix.viewer.v1.FeatureVibe.GetGeneratedCodeJobStatus",
14273
- migrationOptions: {
14274
- optInTransformResponse: true
14275
- },
14276
- url: resolveWixViewerV1FeatureVibeUrl({
14277
- protoPath: "/v1/feature-vibe/generated-code-job-status/{codegenJobId}",
14278
- data: serializedData,
14279
- host
14280
- }),
14281
- params: (0, metro_runtime_1.toURLSearchParams)(serializedData),
14282
- transformResponse: fromRes
14283
- };
14284
- return metadata;
14285
- }
14286
- __getGeneratedCodeJobStatus.fromReq = fromReq;
14287
- __getGeneratedCodeJobStatus.__isAmbassador = true;
14288
- return __getGeneratedCodeJobStatus;
14289
- }
14290
- function save(payload) {
14291
- var _a = (0, ambassador_1.serializer)(_saveRequest, {}), toReq = _a.toJSON, fromReq = _a.fromJSON;
14292
- var fromRes = (0, ambassador_1.serializer)(_saveResponse, {}).fromJSON;
14293
- function __save(_a2) {
14294
- var host = _a2.host;
14295
- var serializedData = toReq(payload);
14296
- var metadata = {
14297
- entityFqdn: "wix.viewer.v1.feature_vibe_project",
14298
- method: "POST",
14299
- methodFqn: "wix.viewer.v1.FeatureVibe.Save",
14300
- migrationOptions: {
14301
- optInTransformResponse: true
14302
- },
14303
- url: resolveWixViewerV1FeatureVibeUrl({
14304
- protoPath: "/v1/feature-vibe/save",
14305
- data: serializedData,
14306
- host
14307
- }),
14308
- data: serializedData,
14309
- transformResponse: fromRes
14310
- };
14311
- return metadata;
14312
- }
14313
- __save.fromReq = fromReq;
14314
- __save.__isAmbassador = true;
14315
- return __save;
14316
- }
14317
- function getProjectStatus(payload) {
14318
- var _a = (0, ambassador_1.serializer)(_getProjectStatusRequest, {}), toReq = _a.toJSON, fromReq = _a.fromJSON;
14319
- var fromRes = (0, ambassador_1.serializer)(_getProjectStatusResponse, {}).fromJSON;
14320
- function __getProjectStatus(_a2) {
14321
- var host = _a2.host;
14322
- var serializedData = toReq(payload);
14323
- var metadata = {
14324
- entityFqdn: "wix.viewer.v1.feature_vibe_project",
14325
- method: "GET",
14326
- methodFqn: "wix.viewer.v1.FeatureVibe.GetProjectStatus",
14327
- migrationOptions: {
14328
- optInTransformResponse: true
14329
- },
14330
- url: resolveWixViewerV1FeatureVibeUrl({
14331
- protoPath: "/v1/feature-vibe/project-status",
14332
- data: serializedData,
14333
- host
14334
- }),
14335
- params: (0, metro_runtime_1.toURLSearchParams)(serializedData),
14336
- transformResponse: fromRes
14337
- };
14338
- return metadata;
14339
- }
14340
- __getProjectStatus.fromReq = fromReq;
14341
- __getProjectStatus.__isAmbassador = true;
14342
- return __getProjectStatus;
14343
- }
14344
- }
14345
- });
14346
-
14347
- // ../codegen-feature-vibe-plugin/dist/feature-vibe-save.js
14348
- var require_feature_vibe_save = __commonJS({
14349
- "../codegen-feature-vibe-plugin/dist/feature-vibe-save.js"(exports2) {
14350
- "use strict";
14351
- Object.defineProperty(exports2, "__esModule", { value: true });
14352
- exports2.featureVibePluginFactory = void 0;
14353
- var fs_1 = require("fs");
14354
- var path_12 = require("path");
14355
- var http_1 = require_http_impl3();
14356
- var http_client_1 = require_index_node();
14357
- var FALLBACK_COMMIT_MESSAGE = "Auto-save";
14358
- var SET_COMMIT_MESSAGE_TOOL = "set-commit-message";
14359
- var MAX_COMMIT_MESSAGE_LENGTH = 1e3;
14360
- var TRUNCATION_SUFFIX = "\u2026";
14361
- var FEATURE_VIBE_BASE_URL = "https://editor.wix.com";
14362
- var ASSETS_DIR = (0, path_12.join)(__dirname, "..", "assets");
14363
- var readAsset = (name) => (0, fs_1.readFileSync)((0, path_12.join)(ASSETS_DIR, name), "utf-8");
14364
- var buildSaveRules = () => [
14365
- {
14366
- filename: "save-commit-message.md",
14367
- content: readAsset("commit-message-rule.md")
14368
- }
14369
- ];
14370
- var buildSaveTools = () => [
14371
- {
14372
- filename: "set-commit-message.ts",
14373
- source: readAsset("set-commit-message.ts")
14374
- }
14375
- ];
14376
- var truncateCommitMessage = (message) => {
14377
- if (message.length <= MAX_COMMIT_MESSAGE_LENGTH)
14378
- return message;
14379
- return message.slice(0, MAX_COMMIT_MESSAGE_LENGTH - TRUNCATION_SUFFIX.length) + TRUNCATION_SUFFIX;
14380
- };
14381
- var wasAuthorizationHeaderSent = (requestHeaders) => {
14382
- if (typeof requestHeaders !== "object" || requestHeaders === null)
14383
- return false;
14384
- return Object.keys(requestHeaders).some((key) => key.toLowerCase() === "authorization");
14385
- };
14386
- var callSave = async (client, job, commitMessage, logger) => {
14387
- try {
14388
- const resp = await client.request((0, http_1.save)({
14389
- appId: job.projectId,
14390
- jobId: job.jobId,
14391
- commitMessage: truncateCommitMessage(commitMessage)
14392
- }));
14393
- return { status: resp.status, data: resp.data };
14394
- } catch (error) {
14395
- if (http_client_1.HttpClient.isHttpError(error)) {
14396
- logger.error("[FeatureVibeSave] Save request failed", {
14397
- projectId: job.projectId,
14398
- jobId: job.jobId,
14399
- requestId: error.requestId || void 0,
14400
- method: error.config?.method?.toUpperCase(),
14401
- url: error.config?.url,
14402
- status: error.response?.status,
14403
- statusText: error.response?.statusText,
14404
- code: error.code,
14405
- message: error.message,
14406
- data: error.response?.data,
14407
- authorizationHeaderSent: wasAuthorizationHeaderSent(error.config?.headers)
14408
- });
14409
- }
14410
- throw error;
14411
- }
14412
- };
14413
- var readToolCommitMessage = (input) => {
14414
- if (typeof input !== "object" || input === null)
14415
- return void 0;
14416
- const value = input.commitMessage;
14417
- if (typeof value !== "string")
14418
- return void 0;
14419
- const trimmed = value.trim();
14420
- return trimmed.length > 0 ? trimmed : void 0;
14421
- };
14422
- var featureVibePluginFactory = (ctx) => {
14423
- const { host, job } = ctx;
14424
- const accessToken = host.auth.getAccessToken();
14425
- const featureVibeHttpClient = (0, http_client_1.createHttpClient)({
14426
- baseURL: FEATURE_VIBE_BASE_URL,
14427
- headers: accessToken ? { Authorization: `Bearer ${accessToken}` } : {}
14428
- });
14429
- let outcome;
14430
- let capturedCommitMessage;
14431
- const commitSave = async (commitMessage) => {
14432
- if (!job)
14433
- return;
14434
- try {
14435
- const { status, data } = await callSave(featureVibeHttpClient, job, commitMessage, host.logger);
14436
- outcome = { status: "created" };
14437
- host.logger.info("[FeatureVibeSave] save triggered", {
14438
- projectId: job.projectId,
14439
- commitMessage,
14440
- status,
14441
- data
14442
- });
14443
- } catch (error) {
14444
- outcome = { status: "failed", error };
14445
- host.logger.error("[FeatureVibeSave] save failed", {
14446
- projectId: job.projectId,
14447
- error: error instanceof Error ? error.message : String(error)
14448
- });
14449
- throw error;
14450
- }
14451
- };
14452
- return {
14453
- name: "feature-vibe-save",
14454
- rules: buildSaveRules(),
14455
- tools: buildSaveTools(),
14456
- async onToolUse({ tool, state }) {
14457
- if (state.status === "error")
14458
- return;
14459
- if (tool !== SET_COMMIT_MESSAGE_TOOL)
14460
- return;
14461
- const message = readToolCommitMessage(state.input);
14462
- if (message)
14463
- capturedCommitMessage = message;
14464
- },
14465
- async onFlowEnd({ codegenFailed }) {
14466
- if (outcome?.status === "failed")
14467
- throw outcome.error;
14468
- if (outcome?.status === "created")
14469
- return;
14470
- if (codegenFailed)
14471
- return;
14472
- const commitMessage = capturedCommitMessage ?? FALLBACK_COMMIT_MESSAGE;
14473
- await commitSave(commitMessage);
14474
- }
14475
- };
14476
- };
14477
- exports2.featureVibePluginFactory = featureVibePluginFactory;
14478
- }
14479
- });
14480
-
14481
- // ../codegen-feature-vibe-plugin/dist/index.js
14482
- var require_dist9 = __commonJS({
14483
- "../codegen-feature-vibe-plugin/dist/index.js"(exports2) {
14484
- "use strict";
14485
- Object.defineProperty(exports2, "__esModule", { value: true });
14486
- exports2.featureVibePluginFactory = void 0;
14487
- var feature_vibe_save_1 = require_feature_vibe_save();
14488
- Object.defineProperty(exports2, "featureVibePluginFactory", { enumerable: true, get: function() {
14489
- return feature_vibe_save_1.featureVibePluginFactory;
14490
- } });
14491
- }
14492
- });
14493
-
14494
- // ../codegen-harmony-config/dist/index.js
14495
- var require_dist10 = __commonJS({
14496
- "../codegen-harmony-config/dist/index.js"(exports2) {
14497
- "use strict";
14498
- Object.defineProperty(exports2, "__esModule", { value: true });
14499
- exports2.harmonyCodegenConfig = void 0;
14500
- var codegen_feature_vibe_plugin_1 = require_dist9();
14501
- var codegen_common_logic_1 = require_dist5();
14502
- exports2.harmonyCodegenConfig = {
14503
- environmentIdentity: codegen_common_logic_1.SITE_ENVIRONMENT_IDENTITY,
14504
- codegenRules: [
14505
- ...codegen_common_logic_1.SITE_CODEGEN_RULES,
14506
- { filename: "telemetry-rules.md", content: codegen_common_logic_1.TELEMETRY_RULES }
14507
- ],
14508
- askRules: [{ filename: "telemetry-ask-rules.md", content: codegen_common_logic_1.TELEMETRY_RULES }],
14509
- gitConflictsRules: [],
14510
- decisionCheckers: [],
14511
- plugins: [codegen_feature_vibe_plugin_1.featureVibePluginFactory],
14512
- toolPolicies: codegen_common_logic_1.SITE_POLICIES,
14513
- chargingMode: "app",
14514
- requiredPermissions: true
14515
- };
14516
- }
14517
- });
14518
-
14519
14163
  // dist/opencode-integration/rules/shared-rules.js
14520
14164
  var require_shared_rules = __commonJS({
14521
14165
  "dist/opencode-integration/rules/shared-rules.js"(exports2) {
@@ -14972,7 +14616,6 @@ var require_environments = __commonJS({
14972
14616
  var types_1 = require_types_impl();
14973
14617
  var codegen_app_builder_config_1 = require_dist6();
14974
14618
  var codegen_studio_2_config_1 = require_dist8();
14975
- var codegen_harmony_config_1 = require_dist10();
14976
14619
  var codegen_rules_1 = require_codegen_rules();
14977
14620
  var ask_rules_1 = require_ask_rules();
14978
14621
  var git_conflicts_rules_1 = require_git_conflicts_rules();
@@ -15006,8 +14649,7 @@ var require_environments = __commonJS({
15006
14649
  };
15007
14650
  var SUPPORTED_ENVIRONMENTS = [
15008
14651
  types_1.Environment.APP_BUILDER,
15009
- types_1.Environment.STUDIO_2,
15010
- types_1.Environment.HARMONY
14652
+ types_1.Environment.STUDIO_2
15011
14653
  ];
15012
14654
  function getValidatedCodegenEnvironment() {
15013
14655
  const environment = process.env.CODEGEN_ENVIRONMENT;
@@ -15029,11 +14671,6 @@ var require_environments = __commonJS({
15029
14671
  ...codegen_studio_2_config_1.studio2CodegenConfig,
15030
14672
  plugins: [...codegen_studio_2_config_1.studio2CodegenConfig.plugins, telemetry_tools_1.telemetryToolsPluginFactory]
15031
14673
  });
15032
- case types_1.Environment.HARMONY:
15033
- return withSharedRules({
15034
- ...codegen_harmony_config_1.harmonyCodegenConfig,
15035
- plugins: [...codegen_harmony_config_1.harmonyCodegenConfig.plugins, telemetry_tools_1.telemetryToolsPluginFactory]
15036
- });
15037
14674
  case types_1.Environment.APP_BUILDER:
15038
14675
  return withSharedRules({
15039
14676
  ...codegen_app_builder_config_1.appBuilderCodegenConfig,
@@ -125540,7 +125177,7 @@ var require_bi_logger_factory = __commonJS({
125540
125177
  });
125541
125178
 
125542
125179
  // ../../node_modules/@wix/wix-bi-logger-client/dist/index.js
125543
- var require_dist11 = __commonJS({
125180
+ var require_dist9 = __commonJS({
125544
125181
  "../../node_modules/@wix/wix-bi-logger-client/dist/index.js"(exports2, module2) {
125545
125182
  "use strict";
125546
125183
  var BiLoggerClientFactory = require_bi_logger_factory();
@@ -128140,7 +127777,7 @@ var require_src3 = __commonJS({
128140
127777
  Object.defineProperty(exports2, "__esModule", { value: true });
128141
127778
  exports2.StandaloneNodeLogger = void 0;
128142
127779
  var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports));
128143
- var wix_bi_logger_client_1 = tslib_1.__importDefault(require_dist11());
127780
+ var wix_bi_logger_client_1 = tslib_1.__importDefault(require_dist9());
128144
127781
  var http_client_1 = require_index_node2();
128145
127782
  var defaultOptions = {
128146
127783
  baseUrl: process.env.BI_BASE_URL || "https://frog.wix.com",
@@ -130124,12 +129761,13 @@ var require_fetch_scheduler = __commonJS({
130124
129761
  "dist/jobs/fetch-scheduler.js"(exports2) {
130125
129762
  "use strict";
130126
129763
  Object.defineProperty(exports2, "__esModule", { value: true });
130127
- exports2.FetchScheduler = exports2.MAX_AWAITED_JOB_IDS = exports2.MAX_MISSING_JOB_RECHECKS = exports2.ERROR_BACKOFF_MS = exports2.POST_JOB_INTERVAL_MS = exports2.MIN_FETCH_INTERVAL_MS = void 0;
129764
+ exports2.FetchScheduler = exports2.MAX_AWAITED_JOB_IDS = exports2.MAX_MISSING_JOB_RECHECKS = exports2.MAX_ERROR_BACKOFF_MS = exports2.ERROR_BACKOFF_MS = exports2.POST_JOB_INTERVAL_MS = exports2.MIN_FETCH_INTERVAL_MS = void 0;
130128
129765
  var logger_12 = require_logger();
130129
129766
  var utils_12 = require_utils9();
130130
129767
  exports2.MIN_FETCH_INTERVAL_MS = 1e3;
130131
129768
  exports2.POST_JOB_INTERVAL_MS = 3e3;
130132
129769
  exports2.ERROR_BACKOFF_MS = 5e3;
129770
+ exports2.MAX_ERROR_BACKOFF_MS = 6e4;
130133
129771
  exports2.MAX_MISSING_JOB_RECHECKS = 3;
130134
129772
  exports2.MAX_AWAITED_JOB_IDS = 4;
130135
129773
  var FetchScheduler = class {
@@ -130140,6 +129778,7 @@ var require_fetch_scheduler = __commonJS({
130140
129778
  this.stopped = false;
130141
129779
  this.nextFetchNotBefore = 0;
130142
129780
  this.interval = 0;
129781
+ this.consecutiveFailures = 0;
130143
129782
  this.awaitedJobIds = /* @__PURE__ */ new Map();
130144
129783
  }
130145
129784
  start() {
@@ -130205,12 +129844,18 @@ var require_fetch_scheduler = __commonJS({
130205
129844
  if (job.id)
130206
129845
  this.awaitedJobIds.delete(job.id);
130207
129846
  }
130208
- if (jobs.length > 0)
129847
+ if (jobs.length > 0) {
129848
+ this.consecutiveFailures = 0;
130209
129849
  return jobs[0];
130210
- if (this.awaitedJobIds.size === 0)
129850
+ }
129851
+ if (this.awaitedJobIds.size === 0) {
129852
+ this.consecutiveFailures = 0;
130211
129853
  return null;
129854
+ }
130212
129855
  try {
130213
- return await this.claimNudgedJob();
129856
+ const claimed = await this.claimNudgedJob();
129857
+ this.consecutiveFailures = 0;
129858
+ return claimed;
130214
129859
  } catch (error) {
130215
129860
  this.recordDebt("Nudged job lookup failed", error);
130216
129861
  return null;
@@ -130219,6 +129864,7 @@ var require_fetch_scheduler = __commonJS({
130219
129864
  async attemptJob(job) {
130220
129865
  try {
130221
129866
  await this.deps.runJob(job);
129867
+ this.consecutiveFailures = 0;
130222
129868
  this.schedule(exports2.POST_JOB_INTERVAL_MS);
130223
129869
  } catch (error) {
130224
129870
  this.recordDebt("Job run failed", error);
@@ -130257,9 +129903,13 @@ var require_fetch_scheduler = __commonJS({
130257
129903
  }
130258
129904
  /** Nobody else will retry. We already answered the caller 200. */
130259
129905
  recordDebt(what, error) {
130260
- logger_12.logger.error(`[JobFetch] ${what}`, { error: (0, utils_12.errorStack)(error) });
129906
+ this.consecutiveFailures += 1;
129907
+ logger_12.logger.error(`[JobFetch] ${what}`, {
129908
+ error: (0, utils_12.errorStack)(error),
129909
+ consecutiveFailures: this.consecutiveFailures
129910
+ });
130261
129911
  this.checkAgain = true;
130262
- this.schedule(exports2.ERROR_BACKOFF_MS);
129912
+ this.schedule(Math.min(exports2.ERROR_BACKOFF_MS * 2 ** (this.consecutiveFailures - 1), exports2.MAX_ERROR_BACKOFF_MS));
130263
129913
  }
130264
129914
  async throttle() {
130265
129915
  const wait = Math.min(this.nextFetchNotBefore - Date.now(), this.interval);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wix/ditto-codegen-public",
3
- "version": "1.0.513",
3
+ "version": "1.0.515",
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": "475e2a29b1f4beda4c171471b7e732f3809db39c0b31da65ca9a9752"
32
+ "falconPackageHash": "c5140d1b372c5e46ac8711b10e3bcc084f0e3aac277666ef8406b5a0"
33
33
  }
@@ -1,3 +0,0 @@
1
- COMMIT MESSAGE:
2
- First thing, before writing any code, call the `set-commit-message` tool. See its description for format and length.
3
- Your code is saved to the site automatically when your run ends, with that message. You cannot see or check the save, so do not say you cannot confirm it.
@@ -1,23 +0,0 @@
1
- import { tool } from "@opencode-ai/plugin";
2
-
3
- export default tool({
4
- description:
5
- "Set the commit message for this codegen run. The message becomes the " +
6
- "subject of a real `git commit -m` for the run, visible to " +
7
- "non-technical users in their checkpoint history. Call this once, as " +
8
- "the first thing you do, before writing any code.",
9
- args: {
10
- commitMessage: tool.schema
11
- .string()
12
- .min(1)
13
- .describe(
14
- "One-line summary of the user's request. " +
15
- 'Imperative mood (e.g. "Add", "Fix", "Update"). ' +
16
- "No trailing period, no quotes, no prefix. " +
17
- "Ideally under 150 characters.",
18
- ),
19
- },
20
- async execute(args) {
21
- return `Commit message set: ${args.commitMessage}`;
22
- },
23
- });