@regressionbot/sdk 2.5.1 → 2.6.0

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
@@ -38,6 +38,20 @@ npm install @regressionbot/sdk
38
38
 
39
39
  ## Migration from 1.x
40
40
 
41
+ ### 2.6.0
42
+
43
+ - **`ProjectConfig.startFailureAlertedAt`** — when the owners were last told a scheduled run
44
+ could not be started, so a lapsed plan isn't mailed about it again every hour.
45
+ - **`approve()`, `approvePage()` and `rejectPage()` type `warning`, `note` and (one page only)
46
+ `baselineAdvanced` and the echoed `url`/`variantName`.** The API has always sent these when
47
+ there was no stored baseline to advance into; only the type was missing them.
48
+ - **`JobStatus.intentProvided` is no longer optional.** The API always computes it; this was a
49
+ type-accuracy fix, not a behavior change.
50
+ - **`generateAiSummary()` and `JobAiSummary` are now marked `@deprecated`.** There is no
51
+ production endpoint behind `POST /job/{jobId}/ai-summary` — the AI-summary Lambda is invoked
52
+ only internally by the run pipeline, so this call has always thrown a 404. Summaries are
53
+ generated automatically and asynchronously; read them from `getSummary()`.
54
+
41
55
  2.0.0 re-types the SDK against what the API actually returns, taken from the
42
56
  orchestrator's implementation rather than from a spec that had drifted in both
43
57
  directions. Most of the breakage is caught by the compiler. One is not:
@@ -290,12 +304,12 @@ if (summary.regressions.length > 0) {
290
304
  }
291
305
  }
292
306
  }
293
-
294
- // Or trigger RegressionBot summary generation on-demand for a completed job:
295
- const aiResult = await job.generateAiSummary();
296
- console.log(`Generated summaries for ${aiResult.summaries.length} regressions.`);
297
307
  ```
298
308
 
309
+ `generateAiSummary()` is deprecated and does not work against the current API — there is no
310
+ on-demand endpoint. Summaries are always generated automatically; wait for them with
311
+ `{ waitForSummaries: true }` as above.
312
+
299
313
  ### Reading exactly what changed
300
314
 
301
315
  `changes` is computed by diffing the two documents, so unlike the prose summary it is
package/dist/index.d.ts CHANGED
@@ -130,6 +130,10 @@ export declare class JobHandle {
130
130
  private decidePage;
131
131
  /**
132
132
  * Generate AI summaries on-demand for all regressions in a completed job.
133
+ *
134
+ * @deprecated No production endpoint backs this — `POST /job/{jobId}/ai-summary` is not
135
+ * attached to the API Gateway, so this throws a 404. RegressionBot summaries are generated
136
+ * automatically and asynchronously; read them from `getSummary()` once the job completes.
133
137
  */
134
138
  generateAiSummary(): Promise<JobAiSummary>;
135
139
  /**
package/dist/index.js CHANGED
@@ -268,6 +268,10 @@ class JobHandle {
268
268
  }
269
269
  /**
270
270
  * Generate AI summaries on-demand for all regressions in a completed job.
271
+ *
272
+ * @deprecated No production endpoint backs this — `POST /job/{jobId}/ai-summary` is not
273
+ * attached to the API Gateway, so this throws a 404. RegressionBot summaries are generated
274
+ * automatically and asynchronously; read them from `getSummary()` once the job completes.
271
275
  */
272
276
  async generateAiSummary() {
273
277
  return this.sdk._request(`/job/${encodeURIComponent(this.jobId)}/ai-summary`, 'POST');
package/dist/types.d.ts CHANGED
@@ -79,6 +79,11 @@ export interface ProjectConfig {
79
79
  * summaries are skipped for those runs.
80
80
  */
81
81
  scheduleKeyId?: string;
82
+ /**
83
+ * When the owners were last told this project's scheduled run could not be started.
84
+ * Keeps a lapsed plan from mailing them once an hour.
85
+ */
86
+ startFailureAlertedAt?: string;
82
87
  /** When the scheduler last started a run. The next run is due one interval after this. */
83
88
  lastScheduledRunAt?: string;
84
89
  /** The standing intent scheduled runs are judged against. Absent means scheduled runs are not judged. */
@@ -508,8 +513,8 @@ export interface JobStatus {
508
513
  baseOrigin?: string;
509
514
  executionTime: number;
510
515
  createdAt: string;
511
- /** Whether the run carried an intent. Without one no page gets a verdict. */
512
- intentProvided?: boolean;
516
+ /** Whether the run carried an intent. Without one no page gets a verdict. Always computed. */
517
+ intentProvided: boolean;
513
518
  /** Whether this run compared two live origins or one origin against a stored baseline. */
514
519
  comparisonMode?: 'live-vs-live' | 'managed';
515
520
  /** Page-checks the run made, and how many finished. Mirrors `progress`. */
@@ -620,7 +625,21 @@ export interface ApproveResult {
620
625
  conflictedUrls?: string[];
621
626
  /** One page only: what approvePage or rejectPage wrote on that page's result. */
622
627
  triageStatus?: 'APPROVED' | 'REJECTED';
628
+ /** Set when there was no stored baseline to advance into — the decision was still recorded. */
629
+ warning?: 'NO_BASELINE';
630
+ /** Explains `warning` when present. */
631
+ note?: string;
632
+ /** One page only, and only when `warning` is `'NO_BASELINE'`: always `false`. */
633
+ baselineAdvanced?: boolean;
634
+ /** One page only: echoes the page that was decided. */
635
+ url?: string;
636
+ /** One page only: echoes the page that was decided. */
637
+ variantName?: string;
623
638
  }
639
+ /** @deprecated No production endpoint backs this. The AI-summary Lambda is invoked only
640
+ * internally by the run pipeline and is never attached to the API Gateway, so
641
+ * `generateAiSummary()` gets a 404. RegressionBot summaries are generated automatically and
642
+ * asynchronously — read them from `getSummary()` once the job completes. */
624
643
  export interface JobAiSummary {
625
644
  message: string;
626
645
  jobId: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@regressionbot/sdk",
3
- "version": "2.5.1",
3
+ "version": "2.6.0",
4
4
  "description": "The official SDK for regressionbot.com - the simplest way to automate visual regression testing.",
5
5
  "homepage": "https://regressionbot.com",
6
6
  "repository": {