@blazediff/agent 0.0.1
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/JUDGING.md +60 -0
- package/LICENSE.md +21 -0
- package/MASKING.md +86 -0
- package/README.md +136 -0
- package/SKILL.md +93 -0
- package/dist/cli.js +3205 -0
- package/dist/index.d.mts +281 -0
- package/dist/index.d.ts +281 -0
- package/dist/index.js +1889 -0
- package/dist/index.mjs +1865 -0
- package/package.json +65 -0
package/dist/index.d.mts
ADDED
|
@@ -0,0 +1,281 @@
|
|
|
1
|
+
import { BoundingBox, InterpretResult } from '@blazediff/core-native';
|
|
2
|
+
|
|
3
|
+
type VerdictLabel = "regression-likely" | "intentional-likely" | "noise-likely" | "ambiguous";
|
|
4
|
+
type VerdictAction = "investigate" | "rewrite-if-intended" | "ignore-or-rewrite";
|
|
5
|
+
interface Verdict {
|
|
6
|
+
label: VerdictLabel;
|
|
7
|
+
headline: string;
|
|
8
|
+
rationale: string[];
|
|
9
|
+
action: VerdictAction;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
declare const STABILITY_HOOKS_VERSION = 1;
|
|
13
|
+
interface RegionSummary {
|
|
14
|
+
bbox: BoundingBox;
|
|
15
|
+
pixelCount: number;
|
|
16
|
+
percentage: number;
|
|
17
|
+
changeType: string;
|
|
18
|
+
confidence: number;
|
|
19
|
+
}
|
|
20
|
+
interface Viewport {
|
|
21
|
+
width: number;
|
|
22
|
+
height: number;
|
|
23
|
+
}
|
|
24
|
+
interface WaitForSelector {
|
|
25
|
+
selector: string;
|
|
26
|
+
timeoutMs?: number;
|
|
27
|
+
}
|
|
28
|
+
type WaitFor = "networkidle" | "fonts" | WaitForSelector;
|
|
29
|
+
interface ManifestEntry {
|
|
30
|
+
id: string;
|
|
31
|
+
url: string;
|
|
32
|
+
viewport: Viewport;
|
|
33
|
+
auth: null | "required";
|
|
34
|
+
waitFor: WaitFor[];
|
|
35
|
+
mask: string[];
|
|
36
|
+
fullPage?: boolean;
|
|
37
|
+
baselinePath: string;
|
|
38
|
+
captureHash: string;
|
|
39
|
+
createdBy: "agent" | "human";
|
|
40
|
+
createdAt: string;
|
|
41
|
+
}
|
|
42
|
+
interface Manifest {
|
|
43
|
+
version: 1;
|
|
44
|
+
configHash: string;
|
|
45
|
+
stabilityHooksVersion: number;
|
|
46
|
+
entries: ManifestEntry[];
|
|
47
|
+
}
|
|
48
|
+
interface DevServerConfig {
|
|
49
|
+
command: string;
|
|
50
|
+
port: number;
|
|
51
|
+
cwd?: string;
|
|
52
|
+
readyTimeoutMs?: number;
|
|
53
|
+
}
|
|
54
|
+
interface AgentConfig {
|
|
55
|
+
devServer: DevServerConfig | null;
|
|
56
|
+
framework?: string;
|
|
57
|
+
packageManager?: "npm" | "pnpm" | "yarn" | "bun";
|
|
58
|
+
baseUrl?: string;
|
|
59
|
+
}
|
|
60
|
+
interface CaptureOptions {
|
|
61
|
+
id: string;
|
|
62
|
+
url: string;
|
|
63
|
+
viewport?: Viewport;
|
|
64
|
+
mask?: string[];
|
|
65
|
+
waitFor?: WaitFor[];
|
|
66
|
+
fullPage?: boolean;
|
|
67
|
+
mode: "baseline" | "actual";
|
|
68
|
+
}
|
|
69
|
+
interface DiscoveredRoute {
|
|
70
|
+
url: string;
|
|
71
|
+
source: "next-manifest" | "sitemap" | "crawl";
|
|
72
|
+
auth?: "required";
|
|
73
|
+
}
|
|
74
|
+
interface CheckReport {
|
|
75
|
+
createdAt: string;
|
|
76
|
+
totalEntries: number;
|
|
77
|
+
passed: number;
|
|
78
|
+
failed: number;
|
|
79
|
+
pendingJudgments: number;
|
|
80
|
+
results: CheckResult[];
|
|
81
|
+
}
|
|
82
|
+
interface CheckResult {
|
|
83
|
+
id: string;
|
|
84
|
+
url: string;
|
|
85
|
+
status: "pass" | "fail" | "missing-baseline" | "stale-baseline" | "needs-judgment";
|
|
86
|
+
diffCount?: number;
|
|
87
|
+
diffPercentage?: number;
|
|
88
|
+
severity?: string;
|
|
89
|
+
regions?: RegionSummary[];
|
|
90
|
+
verdict?: Verdict;
|
|
91
|
+
diffPath?: string;
|
|
92
|
+
actualPath?: string;
|
|
93
|
+
baselinePath?: string;
|
|
94
|
+
message?: string;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
interface CaptureResult {
|
|
98
|
+
id: string;
|
|
99
|
+
outputPath: string;
|
|
100
|
+
mode: "baseline" | "actual";
|
|
101
|
+
bytes: number;
|
|
102
|
+
}
|
|
103
|
+
declare function captureScreenshot(baseUrl: string, opts: CaptureOptions, cwd?: string): Promise<CaptureResult>;
|
|
104
|
+
|
|
105
|
+
interface BrowsersInstallOptions {
|
|
106
|
+
check?: boolean;
|
|
107
|
+
}
|
|
108
|
+
interface BrowsersInstallResult {
|
|
109
|
+
installed: boolean;
|
|
110
|
+
executablePath: string | null;
|
|
111
|
+
cliPath: string;
|
|
112
|
+
}
|
|
113
|
+
declare function installBrowsers(opts?: BrowsersInstallOptions): Promise<BrowsersInstallResult>;
|
|
114
|
+
|
|
115
|
+
interface CaptureRouteInput {
|
|
116
|
+
id: string;
|
|
117
|
+
url: string;
|
|
118
|
+
mask?: string[];
|
|
119
|
+
viewport?: Viewport;
|
|
120
|
+
waitFor?: WaitFor[];
|
|
121
|
+
fullPage?: boolean;
|
|
122
|
+
mode?: "baseline" | "actual";
|
|
123
|
+
}
|
|
124
|
+
interface RunCapturesOptions {
|
|
125
|
+
baseUrl: string;
|
|
126
|
+
routes: CaptureRouteInput[];
|
|
127
|
+
mode?: "baseline" | "actual";
|
|
128
|
+
writeManifest?: boolean;
|
|
129
|
+
cwd?: string;
|
|
130
|
+
}
|
|
131
|
+
interface CaptureRouteResult {
|
|
132
|
+
id: string;
|
|
133
|
+
url: string;
|
|
134
|
+
mode: "baseline" | "actual";
|
|
135
|
+
ok: boolean;
|
|
136
|
+
outputPath?: string;
|
|
137
|
+
bytes?: number;
|
|
138
|
+
error?: string;
|
|
139
|
+
}
|
|
140
|
+
interface RunCapturesReport {
|
|
141
|
+
total: number;
|
|
142
|
+
succeeded: number;
|
|
143
|
+
failed: number;
|
|
144
|
+
manifestUpdates: number;
|
|
145
|
+
results: CaptureRouteResult[];
|
|
146
|
+
}
|
|
147
|
+
declare function runCaptures(opts: RunCapturesOptions): Promise<RunCapturesReport>;
|
|
148
|
+
|
|
149
|
+
interface JudgeInput {
|
|
150
|
+
entry: ManifestEntry;
|
|
151
|
+
baselinePath: string;
|
|
152
|
+
actualPath: string;
|
|
153
|
+
diffPath?: string;
|
|
154
|
+
regions?: RegionSummary[];
|
|
155
|
+
diffPercentage?: number;
|
|
156
|
+
severity?: string;
|
|
157
|
+
heuristicVerdict: Verdict;
|
|
158
|
+
}
|
|
159
|
+
type JudgmentRequestRegion = RegionSummary;
|
|
160
|
+
type JudgeOutput = {
|
|
161
|
+
kind: "judged";
|
|
162
|
+
verdict: Verdict;
|
|
163
|
+
rationale?: string;
|
|
164
|
+
confidence?: number;
|
|
165
|
+
} | {
|
|
166
|
+
kind: "deferred";
|
|
167
|
+
requestPath: string;
|
|
168
|
+
};
|
|
169
|
+
interface Judge {
|
|
170
|
+
readonly name: string;
|
|
171
|
+
judge(input: JudgeInput, cwd: string): Promise<JudgeOutput>;
|
|
172
|
+
}
|
|
173
|
+
type JudgeBackend = "none" | "host";
|
|
174
|
+
|
|
175
|
+
interface ApplyJudgmentsResult {
|
|
176
|
+
report: CheckReport;
|
|
177
|
+
applied: string[];
|
|
178
|
+
missing: string[];
|
|
179
|
+
invalid: string[];
|
|
180
|
+
}
|
|
181
|
+
declare function applyJudgments(cwd?: string): Promise<ApplyJudgmentsResult>;
|
|
182
|
+
|
|
183
|
+
interface JudgmentRequest {
|
|
184
|
+
id: string;
|
|
185
|
+
url: string;
|
|
186
|
+
status: CheckResult["status"];
|
|
187
|
+
diffPercentage?: number;
|
|
188
|
+
severity?: string;
|
|
189
|
+
regions?: RegionSummary[];
|
|
190
|
+
paths: {
|
|
191
|
+
baseline?: string;
|
|
192
|
+
actual?: string;
|
|
193
|
+
diff?: string;
|
|
194
|
+
locator?: string;
|
|
195
|
+
tiles?: string;
|
|
196
|
+
};
|
|
197
|
+
heuristicVerdict?: Verdict;
|
|
198
|
+
manifestEntry: {
|
|
199
|
+
viewport: ManifestEntry["viewport"];
|
|
200
|
+
mask: ManifestEntry["mask"];
|
|
201
|
+
waitFor: ManifestEntry["waitFor"];
|
|
202
|
+
fullPage?: boolean;
|
|
203
|
+
};
|
|
204
|
+
signature: string;
|
|
205
|
+
message?: string;
|
|
206
|
+
instructions?: string;
|
|
207
|
+
createdAt: string;
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
declare function resolveJudge(backend: JudgeBackend): Judge;
|
|
211
|
+
|
|
212
|
+
interface CheckOptions {
|
|
213
|
+
baseUrl: string;
|
|
214
|
+
cwd?: string;
|
|
215
|
+
threshold?: number;
|
|
216
|
+
concurrency?: number;
|
|
217
|
+
emitDiffPng?: boolean;
|
|
218
|
+
junitPath?: string;
|
|
219
|
+
judge?: JudgeBackend;
|
|
220
|
+
}
|
|
221
|
+
declare function runCheck(opts: CheckOptions): Promise<CheckReport>;
|
|
222
|
+
|
|
223
|
+
declare function loadConfig(cwd?: string): Promise<AgentConfig | null>;
|
|
224
|
+
declare function saveConfig(config: AgentConfig, cwd?: string): Promise<void>;
|
|
225
|
+
declare function configHash(config: AgentConfig): string;
|
|
226
|
+
declare function resolveBaseUrl(config: AgentConfig | null, override?: string): string;
|
|
227
|
+
|
|
228
|
+
interface DiffOptions {
|
|
229
|
+
threshold?: number;
|
|
230
|
+
antialiasing?: boolean;
|
|
231
|
+
emitDiffPng?: boolean;
|
|
232
|
+
}
|
|
233
|
+
interface DiffOutcome {
|
|
234
|
+
id: string;
|
|
235
|
+
baselinePath: string;
|
|
236
|
+
actualPath: string;
|
|
237
|
+
diffPath?: string;
|
|
238
|
+
match: boolean;
|
|
239
|
+
reason?: "pixel-diff" | "layout-diff" | "file-not-exists";
|
|
240
|
+
diffCount?: number;
|
|
241
|
+
diffPercentage?: number;
|
|
242
|
+
interpretation?: InterpretResult;
|
|
243
|
+
}
|
|
244
|
+
declare function diffEntry(id: string, baselinePath: string, actualPath: string, opts?: DiffOptions, cwd?: string): Promise<DiffOutcome>;
|
|
245
|
+
|
|
246
|
+
interface DiscoverOptions {
|
|
247
|
+
baseUrl: string;
|
|
248
|
+
cwd?: string;
|
|
249
|
+
maxRoutes?: number;
|
|
250
|
+
skipCrawl?: boolean;
|
|
251
|
+
}
|
|
252
|
+
declare function discover(opts: DiscoverOptions): Promise<DiscoveredRoute[]>;
|
|
253
|
+
|
|
254
|
+
interface RunOptions {
|
|
255
|
+
baseUrl: string;
|
|
256
|
+
cwd?: string;
|
|
257
|
+
threshold?: number;
|
|
258
|
+
concurrency?: number;
|
|
259
|
+
emitDiffPng?: boolean;
|
|
260
|
+
junitPath?: string;
|
|
261
|
+
judge?: JudgeBackend;
|
|
262
|
+
}
|
|
263
|
+
declare function runGraph(opts: RunOptions): Promise<CheckReport>;
|
|
264
|
+
|
|
265
|
+
declare function loadManifest(cwd?: string): Promise<Manifest | null>;
|
|
266
|
+
declare function saveManifest(manifest: Manifest, cwd?: string): Promise<void>;
|
|
267
|
+
|
|
268
|
+
declare const paths: (cwd?: string) => {
|
|
269
|
+
root: string;
|
|
270
|
+
config: string;
|
|
271
|
+
manifest: string;
|
|
272
|
+
baselines: string;
|
|
273
|
+
actual: string;
|
|
274
|
+
judgments: string;
|
|
275
|
+
summary: string;
|
|
276
|
+
gitignore: string;
|
|
277
|
+
serverLog: string;
|
|
278
|
+
serverPid: string;
|
|
279
|
+
};
|
|
280
|
+
|
|
281
|
+
export { type AgentConfig, type ApplyJudgmentsResult, type BrowsersInstallOptions, type BrowsersInstallResult, type CaptureOptions, type CaptureRouteInput, type CaptureRouteResult, type CheckReport, type CheckResult, type DevServerConfig, type DiffOptions, type DiffOutcome, type DiscoveredRoute, type Judge, type JudgeBackend, type JudgeInput, type JudgeOutput, type JudgmentRequest, type JudgmentRequestRegion, type Manifest, type ManifestEntry, type RegionSummary, type RunCapturesOptions, type RunCapturesReport, type RunOptions, STABILITY_HOOKS_VERSION, type Verdict, type VerdictAction, type VerdictLabel, type Viewport, type WaitFor, type WaitForSelector, applyJudgments, captureScreenshot, configHash, diffEntry, discover, installBrowsers, loadConfig, loadManifest, paths, resolveBaseUrl, resolveJudge, runCaptures, runCheck, runGraph, saveConfig, saveManifest };
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,281 @@
|
|
|
1
|
+
import { BoundingBox, InterpretResult } from '@blazediff/core-native';
|
|
2
|
+
|
|
3
|
+
type VerdictLabel = "regression-likely" | "intentional-likely" | "noise-likely" | "ambiguous";
|
|
4
|
+
type VerdictAction = "investigate" | "rewrite-if-intended" | "ignore-or-rewrite";
|
|
5
|
+
interface Verdict {
|
|
6
|
+
label: VerdictLabel;
|
|
7
|
+
headline: string;
|
|
8
|
+
rationale: string[];
|
|
9
|
+
action: VerdictAction;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
declare const STABILITY_HOOKS_VERSION = 1;
|
|
13
|
+
interface RegionSummary {
|
|
14
|
+
bbox: BoundingBox;
|
|
15
|
+
pixelCount: number;
|
|
16
|
+
percentage: number;
|
|
17
|
+
changeType: string;
|
|
18
|
+
confidence: number;
|
|
19
|
+
}
|
|
20
|
+
interface Viewport {
|
|
21
|
+
width: number;
|
|
22
|
+
height: number;
|
|
23
|
+
}
|
|
24
|
+
interface WaitForSelector {
|
|
25
|
+
selector: string;
|
|
26
|
+
timeoutMs?: number;
|
|
27
|
+
}
|
|
28
|
+
type WaitFor = "networkidle" | "fonts" | WaitForSelector;
|
|
29
|
+
interface ManifestEntry {
|
|
30
|
+
id: string;
|
|
31
|
+
url: string;
|
|
32
|
+
viewport: Viewport;
|
|
33
|
+
auth: null | "required";
|
|
34
|
+
waitFor: WaitFor[];
|
|
35
|
+
mask: string[];
|
|
36
|
+
fullPage?: boolean;
|
|
37
|
+
baselinePath: string;
|
|
38
|
+
captureHash: string;
|
|
39
|
+
createdBy: "agent" | "human";
|
|
40
|
+
createdAt: string;
|
|
41
|
+
}
|
|
42
|
+
interface Manifest {
|
|
43
|
+
version: 1;
|
|
44
|
+
configHash: string;
|
|
45
|
+
stabilityHooksVersion: number;
|
|
46
|
+
entries: ManifestEntry[];
|
|
47
|
+
}
|
|
48
|
+
interface DevServerConfig {
|
|
49
|
+
command: string;
|
|
50
|
+
port: number;
|
|
51
|
+
cwd?: string;
|
|
52
|
+
readyTimeoutMs?: number;
|
|
53
|
+
}
|
|
54
|
+
interface AgentConfig {
|
|
55
|
+
devServer: DevServerConfig | null;
|
|
56
|
+
framework?: string;
|
|
57
|
+
packageManager?: "npm" | "pnpm" | "yarn" | "bun";
|
|
58
|
+
baseUrl?: string;
|
|
59
|
+
}
|
|
60
|
+
interface CaptureOptions {
|
|
61
|
+
id: string;
|
|
62
|
+
url: string;
|
|
63
|
+
viewport?: Viewport;
|
|
64
|
+
mask?: string[];
|
|
65
|
+
waitFor?: WaitFor[];
|
|
66
|
+
fullPage?: boolean;
|
|
67
|
+
mode: "baseline" | "actual";
|
|
68
|
+
}
|
|
69
|
+
interface DiscoveredRoute {
|
|
70
|
+
url: string;
|
|
71
|
+
source: "next-manifest" | "sitemap" | "crawl";
|
|
72
|
+
auth?: "required";
|
|
73
|
+
}
|
|
74
|
+
interface CheckReport {
|
|
75
|
+
createdAt: string;
|
|
76
|
+
totalEntries: number;
|
|
77
|
+
passed: number;
|
|
78
|
+
failed: number;
|
|
79
|
+
pendingJudgments: number;
|
|
80
|
+
results: CheckResult[];
|
|
81
|
+
}
|
|
82
|
+
interface CheckResult {
|
|
83
|
+
id: string;
|
|
84
|
+
url: string;
|
|
85
|
+
status: "pass" | "fail" | "missing-baseline" | "stale-baseline" | "needs-judgment";
|
|
86
|
+
diffCount?: number;
|
|
87
|
+
diffPercentage?: number;
|
|
88
|
+
severity?: string;
|
|
89
|
+
regions?: RegionSummary[];
|
|
90
|
+
verdict?: Verdict;
|
|
91
|
+
diffPath?: string;
|
|
92
|
+
actualPath?: string;
|
|
93
|
+
baselinePath?: string;
|
|
94
|
+
message?: string;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
interface CaptureResult {
|
|
98
|
+
id: string;
|
|
99
|
+
outputPath: string;
|
|
100
|
+
mode: "baseline" | "actual";
|
|
101
|
+
bytes: number;
|
|
102
|
+
}
|
|
103
|
+
declare function captureScreenshot(baseUrl: string, opts: CaptureOptions, cwd?: string): Promise<CaptureResult>;
|
|
104
|
+
|
|
105
|
+
interface BrowsersInstallOptions {
|
|
106
|
+
check?: boolean;
|
|
107
|
+
}
|
|
108
|
+
interface BrowsersInstallResult {
|
|
109
|
+
installed: boolean;
|
|
110
|
+
executablePath: string | null;
|
|
111
|
+
cliPath: string;
|
|
112
|
+
}
|
|
113
|
+
declare function installBrowsers(opts?: BrowsersInstallOptions): Promise<BrowsersInstallResult>;
|
|
114
|
+
|
|
115
|
+
interface CaptureRouteInput {
|
|
116
|
+
id: string;
|
|
117
|
+
url: string;
|
|
118
|
+
mask?: string[];
|
|
119
|
+
viewport?: Viewport;
|
|
120
|
+
waitFor?: WaitFor[];
|
|
121
|
+
fullPage?: boolean;
|
|
122
|
+
mode?: "baseline" | "actual";
|
|
123
|
+
}
|
|
124
|
+
interface RunCapturesOptions {
|
|
125
|
+
baseUrl: string;
|
|
126
|
+
routes: CaptureRouteInput[];
|
|
127
|
+
mode?: "baseline" | "actual";
|
|
128
|
+
writeManifest?: boolean;
|
|
129
|
+
cwd?: string;
|
|
130
|
+
}
|
|
131
|
+
interface CaptureRouteResult {
|
|
132
|
+
id: string;
|
|
133
|
+
url: string;
|
|
134
|
+
mode: "baseline" | "actual";
|
|
135
|
+
ok: boolean;
|
|
136
|
+
outputPath?: string;
|
|
137
|
+
bytes?: number;
|
|
138
|
+
error?: string;
|
|
139
|
+
}
|
|
140
|
+
interface RunCapturesReport {
|
|
141
|
+
total: number;
|
|
142
|
+
succeeded: number;
|
|
143
|
+
failed: number;
|
|
144
|
+
manifestUpdates: number;
|
|
145
|
+
results: CaptureRouteResult[];
|
|
146
|
+
}
|
|
147
|
+
declare function runCaptures(opts: RunCapturesOptions): Promise<RunCapturesReport>;
|
|
148
|
+
|
|
149
|
+
interface JudgeInput {
|
|
150
|
+
entry: ManifestEntry;
|
|
151
|
+
baselinePath: string;
|
|
152
|
+
actualPath: string;
|
|
153
|
+
diffPath?: string;
|
|
154
|
+
regions?: RegionSummary[];
|
|
155
|
+
diffPercentage?: number;
|
|
156
|
+
severity?: string;
|
|
157
|
+
heuristicVerdict: Verdict;
|
|
158
|
+
}
|
|
159
|
+
type JudgmentRequestRegion = RegionSummary;
|
|
160
|
+
type JudgeOutput = {
|
|
161
|
+
kind: "judged";
|
|
162
|
+
verdict: Verdict;
|
|
163
|
+
rationale?: string;
|
|
164
|
+
confidence?: number;
|
|
165
|
+
} | {
|
|
166
|
+
kind: "deferred";
|
|
167
|
+
requestPath: string;
|
|
168
|
+
};
|
|
169
|
+
interface Judge {
|
|
170
|
+
readonly name: string;
|
|
171
|
+
judge(input: JudgeInput, cwd: string): Promise<JudgeOutput>;
|
|
172
|
+
}
|
|
173
|
+
type JudgeBackend = "none" | "host";
|
|
174
|
+
|
|
175
|
+
interface ApplyJudgmentsResult {
|
|
176
|
+
report: CheckReport;
|
|
177
|
+
applied: string[];
|
|
178
|
+
missing: string[];
|
|
179
|
+
invalid: string[];
|
|
180
|
+
}
|
|
181
|
+
declare function applyJudgments(cwd?: string): Promise<ApplyJudgmentsResult>;
|
|
182
|
+
|
|
183
|
+
interface JudgmentRequest {
|
|
184
|
+
id: string;
|
|
185
|
+
url: string;
|
|
186
|
+
status: CheckResult["status"];
|
|
187
|
+
diffPercentage?: number;
|
|
188
|
+
severity?: string;
|
|
189
|
+
regions?: RegionSummary[];
|
|
190
|
+
paths: {
|
|
191
|
+
baseline?: string;
|
|
192
|
+
actual?: string;
|
|
193
|
+
diff?: string;
|
|
194
|
+
locator?: string;
|
|
195
|
+
tiles?: string;
|
|
196
|
+
};
|
|
197
|
+
heuristicVerdict?: Verdict;
|
|
198
|
+
manifestEntry: {
|
|
199
|
+
viewport: ManifestEntry["viewport"];
|
|
200
|
+
mask: ManifestEntry["mask"];
|
|
201
|
+
waitFor: ManifestEntry["waitFor"];
|
|
202
|
+
fullPage?: boolean;
|
|
203
|
+
};
|
|
204
|
+
signature: string;
|
|
205
|
+
message?: string;
|
|
206
|
+
instructions?: string;
|
|
207
|
+
createdAt: string;
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
declare function resolveJudge(backend: JudgeBackend): Judge;
|
|
211
|
+
|
|
212
|
+
interface CheckOptions {
|
|
213
|
+
baseUrl: string;
|
|
214
|
+
cwd?: string;
|
|
215
|
+
threshold?: number;
|
|
216
|
+
concurrency?: number;
|
|
217
|
+
emitDiffPng?: boolean;
|
|
218
|
+
junitPath?: string;
|
|
219
|
+
judge?: JudgeBackend;
|
|
220
|
+
}
|
|
221
|
+
declare function runCheck(opts: CheckOptions): Promise<CheckReport>;
|
|
222
|
+
|
|
223
|
+
declare function loadConfig(cwd?: string): Promise<AgentConfig | null>;
|
|
224
|
+
declare function saveConfig(config: AgentConfig, cwd?: string): Promise<void>;
|
|
225
|
+
declare function configHash(config: AgentConfig): string;
|
|
226
|
+
declare function resolveBaseUrl(config: AgentConfig | null, override?: string): string;
|
|
227
|
+
|
|
228
|
+
interface DiffOptions {
|
|
229
|
+
threshold?: number;
|
|
230
|
+
antialiasing?: boolean;
|
|
231
|
+
emitDiffPng?: boolean;
|
|
232
|
+
}
|
|
233
|
+
interface DiffOutcome {
|
|
234
|
+
id: string;
|
|
235
|
+
baselinePath: string;
|
|
236
|
+
actualPath: string;
|
|
237
|
+
diffPath?: string;
|
|
238
|
+
match: boolean;
|
|
239
|
+
reason?: "pixel-diff" | "layout-diff" | "file-not-exists";
|
|
240
|
+
diffCount?: number;
|
|
241
|
+
diffPercentage?: number;
|
|
242
|
+
interpretation?: InterpretResult;
|
|
243
|
+
}
|
|
244
|
+
declare function diffEntry(id: string, baselinePath: string, actualPath: string, opts?: DiffOptions, cwd?: string): Promise<DiffOutcome>;
|
|
245
|
+
|
|
246
|
+
interface DiscoverOptions {
|
|
247
|
+
baseUrl: string;
|
|
248
|
+
cwd?: string;
|
|
249
|
+
maxRoutes?: number;
|
|
250
|
+
skipCrawl?: boolean;
|
|
251
|
+
}
|
|
252
|
+
declare function discover(opts: DiscoverOptions): Promise<DiscoveredRoute[]>;
|
|
253
|
+
|
|
254
|
+
interface RunOptions {
|
|
255
|
+
baseUrl: string;
|
|
256
|
+
cwd?: string;
|
|
257
|
+
threshold?: number;
|
|
258
|
+
concurrency?: number;
|
|
259
|
+
emitDiffPng?: boolean;
|
|
260
|
+
junitPath?: string;
|
|
261
|
+
judge?: JudgeBackend;
|
|
262
|
+
}
|
|
263
|
+
declare function runGraph(opts: RunOptions): Promise<CheckReport>;
|
|
264
|
+
|
|
265
|
+
declare function loadManifest(cwd?: string): Promise<Manifest | null>;
|
|
266
|
+
declare function saveManifest(manifest: Manifest, cwd?: string): Promise<void>;
|
|
267
|
+
|
|
268
|
+
declare const paths: (cwd?: string) => {
|
|
269
|
+
root: string;
|
|
270
|
+
config: string;
|
|
271
|
+
manifest: string;
|
|
272
|
+
baselines: string;
|
|
273
|
+
actual: string;
|
|
274
|
+
judgments: string;
|
|
275
|
+
summary: string;
|
|
276
|
+
gitignore: string;
|
|
277
|
+
serverLog: string;
|
|
278
|
+
serverPid: string;
|
|
279
|
+
};
|
|
280
|
+
|
|
281
|
+
export { type AgentConfig, type ApplyJudgmentsResult, type BrowsersInstallOptions, type BrowsersInstallResult, type CaptureOptions, type CaptureRouteInput, type CaptureRouteResult, type CheckReport, type CheckResult, type DevServerConfig, type DiffOptions, type DiffOutcome, type DiscoveredRoute, type Judge, type JudgeBackend, type JudgeInput, type JudgeOutput, type JudgmentRequest, type JudgmentRequestRegion, type Manifest, type ManifestEntry, type RegionSummary, type RunCapturesOptions, type RunCapturesReport, type RunOptions, STABILITY_HOOKS_VERSION, type Verdict, type VerdictAction, type VerdictLabel, type Viewport, type WaitFor, type WaitForSelector, applyJudgments, captureScreenshot, configHash, diffEntry, discover, installBrowsers, loadConfig, loadManifest, paths, resolveBaseUrl, resolveJudge, runCaptures, runCheck, runGraph, saveConfig, saveManifest };
|