@regressionbot/sdk 2.5.0 → 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 +26 -4
- package/dist/index.d.ts +4 -0
- package/dist/index.js +4 -0
- package/dist/types.d.ts +25 -5
- package/package.json +1 -1
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:
|
|
@@ -74,6 +88,14 @@ the builder, intent-aware verdicts, environment gates, baseline policies, and
|
|
|
74
88
|
scheduling. `scheduleHourUtc` needs API 2.7.0 or later — on an older API the
|
|
75
89
|
field is accepted and ignored, and the schedule stays anchored to its first run.
|
|
76
90
|
|
|
91
|
+
### 2.5.1
|
|
92
|
+
|
|
93
|
+
- **`ProjectConfig.aiPromptInstructions` and `aiSummaryThreshold` are now marked
|
|
94
|
+
`@deprecated`.** The API itself has deprecated both — DOM-engine results (2026-09-28 on)
|
|
95
|
+
never read `aiPromptInstructions`, and are summarised whenever they changed regardless of
|
|
96
|
+
`aiSummaryThreshold`. Both are still typed and still round-trip; only the doc comments
|
|
97
|
+
changed.
|
|
98
|
+
|
|
77
99
|
### 2.5.0
|
|
78
100
|
|
|
79
101
|
- **`updateProject()` now returns `baselinesInvalidated`.** The API has always sent it
|
|
@@ -282,12 +304,12 @@ if (summary.regressions.length > 0) {
|
|
|
282
304
|
}
|
|
283
305
|
}
|
|
284
306
|
}
|
|
285
|
-
|
|
286
|
-
// Or trigger RegressionBot summary generation on-demand for a completed job:
|
|
287
|
-
const aiResult = await job.generateAiSummary();
|
|
288
|
-
console.log(`Generated summaries for ${aiResult.summaries.length} regressions.`);
|
|
289
307
|
```
|
|
290
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
|
+
|
|
291
313
|
### Reading exactly what changed
|
|
292
314
|
|
|
293
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
|
@@ -57,9 +57,9 @@ export interface ProjectConfig {
|
|
|
57
57
|
};
|
|
58
58
|
/** Pages captured in parallel, 1–20. Absent means the API's default of 4. */
|
|
59
59
|
concurrency?: number;
|
|
60
|
-
/**
|
|
60
|
+
/** @deprecated Fed only the screenshot-reading AI, which DOM-engine results (2026-09-28 on) never reach. No longer in the dashboard. */
|
|
61
61
|
aiPromptInstructions?: string;
|
|
62
|
-
/**
|
|
62
|
+
/** @deprecated DOM-engine results (2026-09-28 on) are summarised whenever they changed, so this floor only affects older results. */
|
|
63
63
|
aiSummaryThreshold?: number;
|
|
64
64
|
/**
|
|
65
65
|
* `approved` (default): a person accepts a run and its captures become the baseline.
|
|
@@ -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. */
|
|
@@ -134,8 +139,9 @@ export interface ProjectConfigUpdate {
|
|
|
134
139
|
* take the API's default of 4 — the load lands on the site being captured.
|
|
135
140
|
*/
|
|
136
141
|
concurrency?: number;
|
|
137
|
-
/** Max 1000 characters. */
|
|
142
|
+
/** @deprecated Fed only the screenshot-reading AI, which DOM-engine results (2026-09-28 on) never reach. No longer in the dashboard. Max 1000 characters. */
|
|
138
143
|
aiPromptInstructions?: string;
|
|
144
|
+
/** @deprecated DOM-engine results (2026-09-28 on) are summarised whenever they changed, so this floor only affects older results. */
|
|
139
145
|
aiSummaryThreshold?: number;
|
|
140
146
|
baselinePolicy?: BaselinePolicy;
|
|
141
147
|
/**
|
|
@@ -507,8 +513,8 @@ export interface JobStatus {
|
|
|
507
513
|
baseOrigin?: string;
|
|
508
514
|
executionTime: number;
|
|
509
515
|
createdAt: string;
|
|
510
|
-
/** Whether the run carried an intent. Without one no page gets a verdict. */
|
|
511
|
-
intentProvided
|
|
516
|
+
/** Whether the run carried an intent. Without one no page gets a verdict. Always computed. */
|
|
517
|
+
intentProvided: boolean;
|
|
512
518
|
/** Whether this run compared two live origins or one origin against a stored baseline. */
|
|
513
519
|
comparisonMode?: 'live-vs-live' | 'managed';
|
|
514
520
|
/** Page-checks the run made, and how many finished. Mirrors `progress`. */
|
|
@@ -619,7 +625,21 @@ export interface ApproveResult {
|
|
|
619
625
|
conflictedUrls?: string[];
|
|
620
626
|
/** One page only: what approvePage or rejectPage wrote on that page's result. */
|
|
621
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;
|
|
622
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. */
|
|
623
643
|
export interface JobAiSummary {
|
|
624
644
|
message: string;
|
|
625
645
|
jobId: string;
|
package/package.json
CHANGED