vibecode-anything 0.0.0-stage → 0.4.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/LICENSE +21 -0
- package/README.md +407 -2
- package/dist/cli.d.ts +2 -0
- package/dist/cli.js +2519 -0
- package/dist/core/adapters.d.ts +31 -0
- package/dist/core/adapters.js +478 -0
- package/dist/core/agent-adapter.d.ts +67 -0
- package/dist/core/agent-adapter.js +312 -0
- package/dist/core/anti-cheat.d.ts +6 -0
- package/dist/core/anti-cheat.js +372 -0
- package/dist/core/badge.d.ts +18 -0
- package/dist/core/badge.js +360 -0
- package/dist/core/cache.d.ts +47 -0
- package/dist/core/cache.js +403 -0
- package/dist/core/ci-export.d.ts +35 -0
- package/dist/core/ci-export.js +796 -0
- package/dist/core/ci-formats.d.ts +21 -0
- package/dist/core/ci-formats.js +388 -0
- package/dist/core/client-codegen.d.ts +36 -0
- package/dist/core/client-codegen.js +2538 -0
- package/dist/core/compose.d.ts +71 -0
- package/dist/core/compose.js +1088 -0
- package/dist/core/diff.d.ts +10 -0
- package/dist/core/diff.js +207 -0
- package/dist/core/docs-export.d.ts +37 -0
- package/dist/core/docs-export.js +2706 -0
- package/dist/core/doctor.d.ts +70 -0
- package/dist/core/doctor.js +525 -0
- package/dist/core/errors.d.ts +32 -0
- package/dist/core/errors.js +81 -0
- package/dist/core/exec.d.ts +38 -0
- package/dist/core/exec.js +336 -0
- package/dist/core/fixtures.d.ts +153 -0
- package/dist/core/fixtures.js +2245 -0
- package/dist/core/format.d.ts +77 -0
- package/dist/core/format.js +632 -0
- package/dist/core/fs-snapshot.d.ts +37 -0
- package/dist/core/fs-snapshot.js +216 -0
- package/dist/core/graphql-export.d.ts +34 -0
- package/dist/core/graphql-export.js +2482 -0
- package/dist/core/har-export.d.ts +29 -0
- package/dist/core/har-export.js +988 -0
- package/dist/core/html-report.d.ts +27 -0
- package/dist/core/html-report.js +1535 -0
- package/dist/core/http-export.d.ts +31 -0
- package/dist/core/http-export.js +726 -0
- package/dist/core/impact.d.ts +80 -0
- package/dist/core/impact.js +1412 -0
- package/dist/core/lint.d.ts +38 -0
- package/dist/core/lint.js +1111 -0
- package/dist/core/load-export.d.ts +37 -0
- package/dist/core/load-export.js +1813 -0
- package/dist/core/mcp-export.d.ts +35 -0
- package/dist/core/mcp-export.js +1736 -0
- package/dist/core/mock-server.d.ts +47 -0
- package/dist/core/mock-server.js +1722 -0
- package/dist/core/openapi-export.d.ts +44 -0
- package/dist/core/openapi-export.js +1074 -0
- package/dist/core/parity.d.ts +14 -0
- package/dist/core/parity.js +173 -0
- package/dist/core/playwright-exporter.d.ts +23 -0
- package/dist/core/playwright-exporter.js +1343 -0
- package/dist/core/png.d.ts +7 -0
- package/dist/core/png.js +339 -0
- package/dist/core/regression.d.ts +54 -0
- package/dist/core/regression.js +529 -0
- package/dist/core/responsive.d.ts +86 -0
- package/dist/core/responsive.js +606 -0
- package/dist/core/run.d.ts +74 -0
- package/dist/core/run.js +696 -0
- package/dist/core/scheduler.d.ts +24 -0
- package/dist/core/scheduler.js +162 -0
- package/dist/core/schema-export.d.ts +29 -0
- package/dist/core/schema-export.js +2215 -0
- package/dist/core/schema.d.ts +18 -0
- package/dist/core/schema.js +1057 -0
- package/dist/core/security.d.ts +233 -0
- package/dist/core/security.js +1839 -0
- package/dist/core/server-export.d.ts +38 -0
- package/dist/core/server-export.js +3198 -0
- package/dist/core/slices.d.ts +24 -0
- package/dist/core/slices.js +294 -0
- package/dist/core/spec-writer.d.ts +9 -0
- package/dist/core/spec-writer.js +1202 -0
- package/dist/core/store.d.ts +26 -0
- package/dist/core/store.js +217 -0
- package/dist/core/target-map.d.ts +34 -0
- package/dist/core/target-map.js +262 -0
- package/dist/core/test-exporter.d.ts +25 -0
- package/dist/core/test-exporter.js +1918 -0
- package/dist/core/types.d.ts +919 -0
- package/dist/core/types.js +4 -0
- package/dist/core/visual-semantic.d.ts +67 -0
- package/dist/core/visual-semantic.js +673 -0
- package/dist/core/visual.d.ts +34 -0
- package/dist/core/visual.js +508 -0
- package/dist/core/watch.d.ts +78 -0
- package/dist/core/watch.js +495 -0
- package/dist/core/yaml.d.ts +5 -0
- package/dist/core/yaml.js +1009 -0
- package/dist/diagnostics/diagnose.d.ts +53 -0
- package/dist/diagnostics/diagnose.js +1083 -0
- package/dist/diagnostics/flake.d.ts +71 -0
- package/dist/diagnostics/flake.js +608 -0
- package/dist/diagnostics/mutation-audit.d.ts +69 -0
- package/dist/diagnostics/mutation-audit.js +769 -0
- package/dist/diagnostics/spatial.d.ts +42 -0
- package/dist/diagnostics/spatial.js +346 -0
- package/dist/diagnostics/trends.d.ts +122 -0
- package/dist/diagnostics/trends.js +1190 -0
- package/dist/discovery/discover.d.ts +111 -0
- package/dist/discovery/discover.js +2017 -0
- package/dist/discovery/lock.d.ts +116 -0
- package/dist/discovery/lock.js +1505 -0
- package/dist/discovery/routes.d.ts +36 -0
- package/dist/discovery/routes.js +1494 -0
- package/dist/discovery/test-importer.d.ts +92 -0
- package/dist/discovery/test-importer.js +4952 -0
- package/dist/index.d.ts +123 -0
- package/dist/index.js +99 -0
- package/dist/ingestors/api-collections.d.ts +28 -0
- package/dist/ingestors/api-collections.js +2335 -0
- package/dist/ingestors/api-repo.d.ts +6 -0
- package/dist/ingestors/api-repo.js +1120 -0
- package/dist/ingestors/asyncapi.d.ts +26 -0
- package/dist/ingestors/asyncapi.js +2105 -0
- package/dist/ingestors/bridges.d.ts +5 -0
- package/dist/ingestors/bridges.js +1264 -0
- package/dist/ingestors/cli.d.ts +10 -0
- package/dist/ingestors/cli.js +454 -0
- package/dist/ingestors/curl.d.ts +14 -0
- package/dist/ingestors/curl.js +1024 -0
- package/dist/ingestors/graphql.d.ts +56 -0
- package/dist/ingestors/graphql.js +1852 -0
- package/dist/ingestors/http-file.d.ts +20 -0
- package/dist/ingestors/http-file.js +923 -0
- package/dist/ingestors/image.d.ts +2 -0
- package/dist/ingestors/image.js +147 -0
- package/dist/ingestors/index.d.ts +5 -0
- package/dist/ingestors/index.js +577 -0
- package/dist/ingestors/openrpc.d.ts +29 -0
- package/dist/ingestors/openrpc.js +1807 -0
- package/dist/ingestors/proto.d.ts +47 -0
- package/dist/ingestors/proto.js +2690 -0
- package/dist/ingestors/trace.d.ts +10 -0
- package/dist/ingestors/trace.js +599 -0
- package/dist/ingestors/video.d.ts +50 -0
- package/dist/ingestors/video.js +655 -0
- package/dist/ingestors/web.d.ts +40 -0
- package/dist/ingestors/web.js +839 -0
- package/dist/mcp/server.d.ts +2 -0
- package/dist/mcp/server.js +3969 -0
- package/dist/oracles/api-repo.d.ts +2 -0
- package/dist/oracles/api-repo.js +286 -0
- package/dist/oracles/cli.d.ts +2 -0
- package/dist/oracles/cli.js +205 -0
- package/dist/oracles/http-workflow.d.ts +68 -0
- package/dist/oracles/http-workflow.js +828 -0
- package/dist/oracles/image.d.ts +2 -0
- package/dist/oracles/image.js +429 -0
- package/dist/oracles/index.d.ts +6 -0
- package/dist/oracles/index.js +320 -0
- package/dist/oracles/perf-budget.d.ts +90 -0
- package/dist/oracles/perf-budget.js +1329 -0
- package/dist/oracles/stream.d.ts +94 -0
- package/dist/oracles/stream.js +1268 -0
- package/dist/oracles/ui-states.d.ts +49 -0
- package/dist/oracles/ui-states.js +894 -0
- package/dist/oracles/video.d.ts +21 -0
- package/dist/oracles/video.js +627 -0
- package/dist/oracles/web.d.ts +2 -0
- package/dist/oracles/web.js +871 -0
- package/dist/plugins/builtins.d.ts +12 -0
- package/dist/plugins/builtins.js +1052 -0
- package/dist/plugins/registry.d.ts +86 -0
- package/dist/plugins/registry.js +554 -0
- package/dist/setup/index.d.ts +7 -0
- package/dist/setup/index.js +298 -0
- package/package.json +54 -4
- package/skills/vibecode-anything/SKILL.md +75 -0
|
@@ -0,0 +1,919 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared TypeScript types and interfaces for vibecode-anything.
|
|
3
|
+
*/
|
|
4
|
+
import type { HttpWorkflowStep, HttpWorkflowStepExpected } from "../oracles/http-workflow.js";
|
|
5
|
+
import type { StreamEventExpectation } from "../oracles/stream.js";
|
|
6
|
+
import type { PluginRegistry } from "../plugins/registry.js";
|
|
7
|
+
import type { ContractFixtures, FixtureRunSummary } from "./fixtures.js";
|
|
8
|
+
import type { TargetMap } from "./target-map.js";
|
|
9
|
+
import type { VerifyMode, WcagLevel } from "./visual-semantic.js";
|
|
10
|
+
export type { ContractFixtures, FixtureRunSummary, VerifyMode, WcagLevel };
|
|
11
|
+
export type Domain = "cli" | "web" | "image" | "video" | "api" | "repo";
|
|
12
|
+
export type IngestDomain = Domain | "script" | "url" | "rea" | "cli-anything" | "postman" | "curl" | "graphql" | "http-file" | "insomnia" | "bruno" | "asyncapi" | "proto" | "openrpc";
|
|
13
|
+
export type InvariantSeverity = "hard" | "soft";
|
|
14
|
+
export type InvariantType = "command" | "web_route" | "web_flow" | "web_network" | "web_ui_states" | "image_layout" | "image_perceptual" | "video_timeline" | "http" | "http_workflow" | "http_stream" | "ws_protocol" | "perf_budget" | "repo_exports" | "plugin_svg_a11y" | "plugin_state_file" | `plugin_${string}`;
|
|
15
|
+
export type SoftGateMode = "warn" | "fail";
|
|
16
|
+
export type NormalizeMode = "crlf" | "ansi" | "timestamps" | "paths" | "trim";
|
|
17
|
+
export type InvariantStatus = "pass" | "fail" | "skipped" | "warn" | "error";
|
|
18
|
+
export type GateStatus = "pass" | "pass_with_warnings" | "fail" | "incomplete";
|
|
19
|
+
export type NextAction = "none" | "fix_hard_invariants_first" | "add_or_enable_invariants_or_adapters" | "review_soft_warnings";
|
|
20
|
+
export type ErrorCode = "CONTRACT_INVALID" | "CONTRACT_NOT_FOUND" | "ADAPTER_MISSING" | "ADAPTER_DEGRADED" | "TARGET_MISSING" | "EXEC_TIMEOUT" | "UNSUPPORTED_FORMAT" | "BRIDGE_FORMAT_ERROR" | "CONFIG_INVALID" | "NOT_FOUND" | "EXEC_ERROR" | "CONTRACT_TAMPERED" | "INTERNAL_ERROR" | "PARSE_WARNING" | "READ_WARNING" | "BRIDGE_FORMAT_WARNING" | "UNKNOWN_CLIENT";
|
|
21
|
+
export interface VibecodeErrorOptions {
|
|
22
|
+
adapter?: string;
|
|
23
|
+
installHint?: string;
|
|
24
|
+
fallbackHint?: string;
|
|
25
|
+
details?: unknown;
|
|
26
|
+
}
|
|
27
|
+
/** Structured diagnostic envelope shared across modules, CLI, and MCP. */
|
|
28
|
+
export interface Diagnostic {
|
|
29
|
+
code: string;
|
|
30
|
+
message: string;
|
|
31
|
+
adapter?: string;
|
|
32
|
+
installHint?: string;
|
|
33
|
+
fallbackHint?: string;
|
|
34
|
+
details?: unknown;
|
|
35
|
+
}
|
|
36
|
+
export interface ValidationError {
|
|
37
|
+
path: string;
|
|
38
|
+
message: string;
|
|
39
|
+
}
|
|
40
|
+
export interface ValidationResult {
|
|
41
|
+
ok: boolean;
|
|
42
|
+
errors: ValidationError[];
|
|
43
|
+
}
|
|
44
|
+
export interface JsonSchema {
|
|
45
|
+
type?: string | string[];
|
|
46
|
+
nullable?: boolean;
|
|
47
|
+
format?: string;
|
|
48
|
+
const?: unknown;
|
|
49
|
+
enum?: unknown[];
|
|
50
|
+
minLength?: number;
|
|
51
|
+
maxLength?: number;
|
|
52
|
+
pattern?: string;
|
|
53
|
+
minimum?: number;
|
|
54
|
+
maximum?: number;
|
|
55
|
+
exclusiveMinimum?: number;
|
|
56
|
+
exclusiveMaximum?: number;
|
|
57
|
+
multipleOf?: number;
|
|
58
|
+
minItems?: number;
|
|
59
|
+
maxItems?: number;
|
|
60
|
+
uniqueItems?: boolean;
|
|
61
|
+
items?: JsonSchema | JsonSchema[];
|
|
62
|
+
minProperties?: number;
|
|
63
|
+
maxProperties?: number;
|
|
64
|
+
required?: string[];
|
|
65
|
+
properties?: Record<string, JsonSchema>;
|
|
66
|
+
additionalProperties?: boolean | JsonSchema;
|
|
67
|
+
allOf?: JsonSchema[];
|
|
68
|
+
anyOf?: JsonSchema[];
|
|
69
|
+
oneOf?: JsonSchema[];
|
|
70
|
+
not?: JsonSchema;
|
|
71
|
+
$ref?: string;
|
|
72
|
+
example?: unknown;
|
|
73
|
+
default?: unknown;
|
|
74
|
+
[key: string]: unknown;
|
|
75
|
+
}
|
|
76
|
+
export interface JsonPathAssertion {
|
|
77
|
+
path: string;
|
|
78
|
+
equals?: unknown;
|
|
79
|
+
matches?: string;
|
|
80
|
+
}
|
|
81
|
+
export interface JsonPathQueryResult {
|
|
82
|
+
found: boolean;
|
|
83
|
+
value: unknown;
|
|
84
|
+
}
|
|
85
|
+
export interface RgbaImage {
|
|
86
|
+
width: number;
|
|
87
|
+
height: number;
|
|
88
|
+
data: Uint8Array;
|
|
89
|
+
}
|
|
90
|
+
export interface DecodedImage extends RgbaImage {
|
|
91
|
+
format: string;
|
|
92
|
+
backend: "png-native" | "sharp";
|
|
93
|
+
}
|
|
94
|
+
export interface ImageDimensions {
|
|
95
|
+
format: "png" | "jpeg" | "webp";
|
|
96
|
+
width: number;
|
|
97
|
+
height: number;
|
|
98
|
+
}
|
|
99
|
+
export interface PaletteEntry {
|
|
100
|
+
hex: string;
|
|
101
|
+
weight: number;
|
|
102
|
+
}
|
|
103
|
+
export interface BBox {
|
|
104
|
+
x: number;
|
|
105
|
+
y: number;
|
|
106
|
+
w: number;
|
|
107
|
+
h: number;
|
|
108
|
+
}
|
|
109
|
+
export interface LayoutRegion {
|
|
110
|
+
id: string;
|
|
111
|
+
bbox: BBox;
|
|
112
|
+
kind?: "text_band" | "media_block" | "ui_chrome";
|
|
113
|
+
}
|
|
114
|
+
export interface MatchedRegion {
|
|
115
|
+
refId: string;
|
|
116
|
+
candId: string;
|
|
117
|
+
iou: number;
|
|
118
|
+
}
|
|
119
|
+
export interface TypographyBand {
|
|
120
|
+
level: "display" | "heading" | "body" | "caption";
|
|
121
|
+
estimatedHeightPx: number;
|
|
122
|
+
bandCount: number;
|
|
123
|
+
}
|
|
124
|
+
export interface Viewport {
|
|
125
|
+
width: number;
|
|
126
|
+
height: number;
|
|
127
|
+
}
|
|
128
|
+
export interface DiffLinesOptions {
|
|
129
|
+
context?: number;
|
|
130
|
+
maxLines?: number;
|
|
131
|
+
}
|
|
132
|
+
export interface DiffLinesResult {
|
|
133
|
+
identical: boolean;
|
|
134
|
+
added: number;
|
|
135
|
+
removed: number;
|
|
136
|
+
truncated: boolean;
|
|
137
|
+
unified: string;
|
|
138
|
+
}
|
|
139
|
+
export interface JsonSubsetDiff {
|
|
140
|
+
path: string;
|
|
141
|
+
expected: unknown;
|
|
142
|
+
actual: unknown;
|
|
143
|
+
}
|
|
144
|
+
export interface CommandExecOptions {
|
|
145
|
+
stdin?: string | null;
|
|
146
|
+
env?: Record<string, string | undefined>;
|
|
147
|
+
cwd?: string;
|
|
148
|
+
timeoutMs?: number;
|
|
149
|
+
shell?: boolean;
|
|
150
|
+
}
|
|
151
|
+
export interface CommandExecResult {
|
|
152
|
+
exitCode: number | null;
|
|
153
|
+
signal: NodeJS.Signals | null;
|
|
154
|
+
stdout: string;
|
|
155
|
+
stderr: string;
|
|
156
|
+
timedOut: boolean;
|
|
157
|
+
durationMs: number;
|
|
158
|
+
error: Error | null;
|
|
159
|
+
}
|
|
160
|
+
export interface WorkspacePaths {
|
|
161
|
+
rootDir: string;
|
|
162
|
+
contractPath: string;
|
|
163
|
+
reportPath: string;
|
|
164
|
+
artifactsDir: string;
|
|
165
|
+
cacheDir: string;
|
|
166
|
+
specPath: string;
|
|
167
|
+
holdoutsPath: string;
|
|
168
|
+
legacyHoldoutsPath?: string;
|
|
169
|
+
reportHtmlPath?: string;
|
|
170
|
+
historyPath?: string;
|
|
171
|
+
}
|
|
172
|
+
export interface AdapterProbeEntry {
|
|
173
|
+
available: boolean;
|
|
174
|
+
installHint: string;
|
|
175
|
+
version?: string;
|
|
176
|
+
path?: string;
|
|
177
|
+
source?: "playwright" | "playwright-core";
|
|
178
|
+
packagePath?: string;
|
|
179
|
+
browserPath?: string;
|
|
180
|
+
browserName?: string;
|
|
181
|
+
}
|
|
182
|
+
export interface AdapterProbeResults {
|
|
183
|
+
playwright: AdapterProbeEntry;
|
|
184
|
+
ffmpeg: AdapterProbeEntry;
|
|
185
|
+
ffprobe: AdapterProbeEntry;
|
|
186
|
+
sharp: AdapterProbeEntry;
|
|
187
|
+
}
|
|
188
|
+
export interface SubtitleCue {
|
|
189
|
+
startMs: number;
|
|
190
|
+
endMs: number;
|
|
191
|
+
text: string;
|
|
192
|
+
}
|
|
193
|
+
export interface FfmpegFrame {
|
|
194
|
+
path: string;
|
|
195
|
+
timestampMs: number;
|
|
196
|
+
}
|
|
197
|
+
export interface FfmpegAdapter {
|
|
198
|
+
ffmpeg?: string;
|
|
199
|
+
ffprobe?: string;
|
|
200
|
+
probeDuration(src: string): number | null;
|
|
201
|
+
probeScenes(src: string, sceneThreshold: number, maxFrames: number, options?: {
|
|
202
|
+
crop?: string;
|
|
203
|
+
}): number[] | null;
|
|
204
|
+
extractFrames(src: string, timestampsMs: number[], outDir: string, options?: {
|
|
205
|
+
crop?: string;
|
|
206
|
+
}): FfmpegFrame[];
|
|
207
|
+
}
|
|
208
|
+
export interface ExtractedVideoState {
|
|
209
|
+
id: string;
|
|
210
|
+
timestampMs: number;
|
|
211
|
+
path: string;
|
|
212
|
+
img: DecodedImage;
|
|
213
|
+
dHash: string;
|
|
214
|
+
palette: PaletteEntry[];
|
|
215
|
+
regions: LayoutRegion[];
|
|
216
|
+
subtitleCue: string | null;
|
|
217
|
+
}
|
|
218
|
+
export interface VideoTransition {
|
|
219
|
+
from: string;
|
|
220
|
+
to: string;
|
|
221
|
+
changedRegion: BBox;
|
|
222
|
+
minDeltaSSIM: number;
|
|
223
|
+
eventHint: string;
|
|
224
|
+
audioCue: string | null;
|
|
225
|
+
subtitleCue: string | null;
|
|
226
|
+
}
|
|
227
|
+
export interface ContractGenerator {
|
|
228
|
+
name: string;
|
|
229
|
+
version: string;
|
|
230
|
+
adapter: string;
|
|
231
|
+
}
|
|
232
|
+
export interface ContractSource {
|
|
233
|
+
id: string;
|
|
234
|
+
kind: string;
|
|
235
|
+
ref: string;
|
|
236
|
+
meta: Record<string, unknown>;
|
|
237
|
+
}
|
|
238
|
+
export interface ContractTarget {
|
|
239
|
+
name: string;
|
|
240
|
+
domains: Domain[];
|
|
241
|
+
sources: ContractSource[];
|
|
242
|
+
}
|
|
243
|
+
export interface ContractArtifacts {
|
|
244
|
+
root: string;
|
|
245
|
+
files: Record<string, string>;
|
|
246
|
+
}
|
|
247
|
+
export interface ParityThresholdDefaults {
|
|
248
|
+
minSSIM: number;
|
|
249
|
+
maxPixelDiffRatio: number;
|
|
250
|
+
colorDelta: number;
|
|
251
|
+
minLayoutIoU: number;
|
|
252
|
+
minPaletteSimilarity: number;
|
|
253
|
+
stateMatchFloor: number;
|
|
254
|
+
minMotionRegionIoU: number;
|
|
255
|
+
}
|
|
256
|
+
export interface ParityThresholds {
|
|
257
|
+
hardBehavioralParity: number;
|
|
258
|
+
softPerceptualParity: number;
|
|
259
|
+
softGateMode: SoftGateMode;
|
|
260
|
+
defaults: ParityThresholdDefaults;
|
|
261
|
+
}
|
|
262
|
+
export interface WebLandmark {
|
|
263
|
+
tag: string;
|
|
264
|
+
required?: boolean;
|
|
265
|
+
textContains?: string;
|
|
266
|
+
}
|
|
267
|
+
export interface WebInteractiveLandmark {
|
|
268
|
+
role: string;
|
|
269
|
+
tag: string;
|
|
270
|
+
name?: string;
|
|
271
|
+
}
|
|
272
|
+
export interface FsEffectEntry {
|
|
273
|
+
path: string;
|
|
274
|
+
status: "created" | "modified" | "deleted";
|
|
275
|
+
sha256?: string;
|
|
276
|
+
size?: number;
|
|
277
|
+
preview?: string;
|
|
278
|
+
}
|
|
279
|
+
export interface AntiCheatReport {
|
|
280
|
+
status: "clean" | "suspected";
|
|
281
|
+
reasons: string[];
|
|
282
|
+
}
|
|
283
|
+
export interface WebBoundingBox {
|
|
284
|
+
selector?: string;
|
|
285
|
+
id?: string;
|
|
286
|
+
bbox: BBox;
|
|
287
|
+
}
|
|
288
|
+
export interface WebFlowStep {
|
|
289
|
+
action: string;
|
|
290
|
+
selector?: string;
|
|
291
|
+
value?: unknown;
|
|
292
|
+
key?: string;
|
|
293
|
+
url?: string;
|
|
294
|
+
path?: string;
|
|
295
|
+
waitUntil?: "load" | "domcontentloaded" | "networkidle" | "commit";
|
|
296
|
+
timeoutMs?: number;
|
|
297
|
+
text?: string;
|
|
298
|
+
[key: string]: unknown;
|
|
299
|
+
}
|
|
300
|
+
export interface InvariantStep {
|
|
301
|
+
action?: string;
|
|
302
|
+
selector?: string;
|
|
303
|
+
value?: unknown;
|
|
304
|
+
key?: string;
|
|
305
|
+
url?: string;
|
|
306
|
+
path?: string;
|
|
307
|
+
waitUntil?: "load" | "domcontentloaded" | "networkidle" | "commit";
|
|
308
|
+
timeoutMs?: number;
|
|
309
|
+
text?: string;
|
|
310
|
+
id?: string;
|
|
311
|
+
method?: string;
|
|
312
|
+
query?: Record<string, string | number | boolean>;
|
|
313
|
+
headers?: Record<string, string>;
|
|
314
|
+
body?: unknown;
|
|
315
|
+
extract?: Record<string, string>;
|
|
316
|
+
expected?: HttpWorkflowStepExpected;
|
|
317
|
+
json?: unknown;
|
|
318
|
+
code?: number;
|
|
319
|
+
textExact?: string;
|
|
320
|
+
textContains?: string;
|
|
321
|
+
jsonSchema?: JsonSchema;
|
|
322
|
+
jsonSubset?: unknown;
|
|
323
|
+
jsonPaths?: JsonPathAssertion[];
|
|
324
|
+
}
|
|
325
|
+
export interface WebDomAssertion {
|
|
326
|
+
selector: string;
|
|
327
|
+
count?: number;
|
|
328
|
+
minCount?: number;
|
|
329
|
+
}
|
|
330
|
+
export interface WebNetworkExpectation {
|
|
331
|
+
method?: string;
|
|
332
|
+
pathPattern?: string;
|
|
333
|
+
path?: string;
|
|
334
|
+
status?: number;
|
|
335
|
+
contentType?: string;
|
|
336
|
+
jsonSchema?: JsonSchema;
|
|
337
|
+
}
|
|
338
|
+
export interface RepoExportEntry {
|
|
339
|
+
name: string;
|
|
340
|
+
kind: string;
|
|
341
|
+
}
|
|
342
|
+
export interface VideoStateExpected {
|
|
343
|
+
id: string;
|
|
344
|
+
timestampMs?: number;
|
|
345
|
+
keyframeArtifact: string;
|
|
346
|
+
dHash?: string;
|
|
347
|
+
palette?: PaletteEntry[];
|
|
348
|
+
regions?: LayoutRegion[];
|
|
349
|
+
subtitleCue?: string | null;
|
|
350
|
+
required?: boolean;
|
|
351
|
+
}
|
|
352
|
+
export interface VideoTransitionExpected {
|
|
353
|
+
from: string;
|
|
354
|
+
to: string;
|
|
355
|
+
changedRegion?: BBox;
|
|
356
|
+
minDeltaSSIM?: number;
|
|
357
|
+
eventHint?: string;
|
|
358
|
+
audioCue?: string | null;
|
|
359
|
+
subtitleCue?: string | null;
|
|
360
|
+
}
|
|
361
|
+
export interface ImageDimensionsExpected {
|
|
362
|
+
width?: number;
|
|
363
|
+
height?: number;
|
|
364
|
+
aspectRatio?: number;
|
|
365
|
+
aspectRatioTolerance?: number;
|
|
366
|
+
}
|
|
367
|
+
export interface InvariantInput {
|
|
368
|
+
kind?: "http" | "command";
|
|
369
|
+
runs?: number;
|
|
370
|
+
warmupRuns?: number;
|
|
371
|
+
args?: string[];
|
|
372
|
+
stdin?: string | null;
|
|
373
|
+
env?: Record<string, string | undefined>;
|
|
374
|
+
cwd?: string;
|
|
375
|
+
timeoutMs?: number;
|
|
376
|
+
shell?: boolean;
|
|
377
|
+
path?: string;
|
|
378
|
+
urlPath?: string;
|
|
379
|
+
startPath?: string;
|
|
380
|
+
triggerPath?: string;
|
|
381
|
+
viewport?: Viewport;
|
|
382
|
+
waitUntil?: string;
|
|
383
|
+
steps?: Array<WebFlowStep | InvariantStep>;
|
|
384
|
+
finallySteps?: HttpWorkflowStep[];
|
|
385
|
+
vars?: Record<string, string>;
|
|
386
|
+
cookieJar?: boolean;
|
|
387
|
+
format?: "sse" | "ndjson" | "auto";
|
|
388
|
+
maxBytes?: number;
|
|
389
|
+
maxEvents?: number;
|
|
390
|
+
maxMessageBytes?: number;
|
|
391
|
+
method?: string;
|
|
392
|
+
headers?: Record<string, string>;
|
|
393
|
+
query?: Record<string, string | number | boolean>;
|
|
394
|
+
body?: unknown;
|
|
395
|
+
modulePath?: string;
|
|
396
|
+
language?: string;
|
|
397
|
+
referenceArtifact?: string;
|
|
398
|
+
orderMode?: string;
|
|
399
|
+
perceptualOnly?: boolean;
|
|
400
|
+
dimensions?: ImageDimensionsExpected;
|
|
401
|
+
fsDiff?: boolean;
|
|
402
|
+
storageState?: string;
|
|
403
|
+
ignorePaths?: string[];
|
|
404
|
+
[key: string]: unknown;
|
|
405
|
+
}
|
|
406
|
+
export interface InvariantExpected {
|
|
407
|
+
exitCode?: number | number[];
|
|
408
|
+
stdoutExact?: string | null;
|
|
409
|
+
stdoutContains?: string[];
|
|
410
|
+
stdoutNotContains?: string[];
|
|
411
|
+
stdoutRegex?: string[];
|
|
412
|
+
stderrExact?: string | null;
|
|
413
|
+
stderrContains?: string[];
|
|
414
|
+
goldenStdout?: string | null;
|
|
415
|
+
normalize?: NormalizeMode[];
|
|
416
|
+
jsonSchema?: JsonSchema;
|
|
417
|
+
jsonSubset?: unknown;
|
|
418
|
+
jsonPaths?: JsonPathAssertion[];
|
|
419
|
+
status?: number | number[];
|
|
420
|
+
maxLatencyMs?: number;
|
|
421
|
+
maxP50Ms?: number;
|
|
422
|
+
maxP95Ms?: number;
|
|
423
|
+
maxP99Ms?: number;
|
|
424
|
+
maxMeanMs?: number;
|
|
425
|
+
maxDurationMs?: number;
|
|
426
|
+
maxBytes?: number;
|
|
427
|
+
minBytes?: number;
|
|
428
|
+
maxErrorRate?: number;
|
|
429
|
+
minEvents?: number;
|
|
430
|
+
maxEvents?: number;
|
|
431
|
+
forbidMalformedEvents?: boolean;
|
|
432
|
+
terminalEvent?: StreamEventExpectation;
|
|
433
|
+
orderedEvents?: StreamEventExpectation[];
|
|
434
|
+
closeCode?: number;
|
|
435
|
+
bodyExact?: string;
|
|
436
|
+
bodyContains?: string | string[];
|
|
437
|
+
headers?: Record<string, string>;
|
|
438
|
+
titleContains?: string;
|
|
439
|
+
landmarks?: WebLandmark[];
|
|
440
|
+
boundingBoxes?: WebBoundingBox[];
|
|
441
|
+
finalUrlIncludes?: string;
|
|
442
|
+
visibleText?: string[];
|
|
443
|
+
hiddenText?: string[];
|
|
444
|
+
domAssertions?: WebDomAssertion[];
|
|
445
|
+
networkCalls?: WebNetworkExpectation[];
|
|
446
|
+
noConsoleErrors?: boolean;
|
|
447
|
+
noUncaughtExceptions?: boolean;
|
|
448
|
+
dimensions?: ImageDimensionsExpected;
|
|
449
|
+
nonBlank?: boolean;
|
|
450
|
+
palette?: PaletteEntry[];
|
|
451
|
+
regions?: LayoutRegion[];
|
|
452
|
+
typographyHierarchy?: TypographyBand[];
|
|
453
|
+
referenceHash?: string | null;
|
|
454
|
+
durationMs?: number;
|
|
455
|
+
states?: VideoStateExpected[];
|
|
456
|
+
transitions?: VideoTransitionExpected[];
|
|
457
|
+
filesPresent?: string[];
|
|
458
|
+
exports?: RepoExportEntry[];
|
|
459
|
+
assertions?: unknown[];
|
|
460
|
+
fsEffects?: FsEffectEntry[];
|
|
461
|
+
interactiveLandmarks?: WebInteractiveLandmark[];
|
|
462
|
+
noPageErrors?: boolean;
|
|
463
|
+
noServerErrors?: boolean;
|
|
464
|
+
wcagLevel?: WcagLevel;
|
|
465
|
+
responsiveViewports?: Array<{
|
|
466
|
+
name: string;
|
|
467
|
+
width: number;
|
|
468
|
+
height: number;
|
|
469
|
+
}>;
|
|
470
|
+
requireViewBox?: boolean;
|
|
471
|
+
requireAccessibleName?: boolean;
|
|
472
|
+
minElements?: number;
|
|
473
|
+
requiredIds?: string[];
|
|
474
|
+
[key: string]: unknown;
|
|
475
|
+
}
|
|
476
|
+
export interface InvariantTolerance {
|
|
477
|
+
minSSIM?: number;
|
|
478
|
+
maxPixelDiffRatio?: number;
|
|
479
|
+
colorDelta?: number;
|
|
480
|
+
minLayoutIoU?: number;
|
|
481
|
+
minPaletteSimilarity?: number;
|
|
482
|
+
stateMatchFloor?: number;
|
|
483
|
+
minKeyframeSSIM?: number;
|
|
484
|
+
maxHammingDistance?: number;
|
|
485
|
+
minMotionRegionIoU?: number;
|
|
486
|
+
[key: string]: unknown;
|
|
487
|
+
}
|
|
488
|
+
export interface Invariant {
|
|
489
|
+
id: string;
|
|
490
|
+
domain: Domain;
|
|
491
|
+
type: InvariantType;
|
|
492
|
+
severity: InvariantSeverity;
|
|
493
|
+
description: string;
|
|
494
|
+
tags: string[];
|
|
495
|
+
sourceId?: string;
|
|
496
|
+
holdout?: boolean;
|
|
497
|
+
holdoutHint?: string;
|
|
498
|
+
input: InvariantInput;
|
|
499
|
+
expected: InvariantExpected;
|
|
500
|
+
tolerance: InvariantTolerance;
|
|
501
|
+
}
|
|
502
|
+
export type SliceStatus = "pending" | "in_progress" | "passed" | "failed" | "skipped";
|
|
503
|
+
export interface ContractSlice {
|
|
504
|
+
id: string;
|
|
505
|
+
title: string;
|
|
506
|
+
description?: string;
|
|
507
|
+
invariantIds: string[];
|
|
508
|
+
dependsOn?: string[];
|
|
509
|
+
status: SliceStatus;
|
|
510
|
+
lastVerifiedAt?: string;
|
|
511
|
+
lastScore?: number;
|
|
512
|
+
notes?: string;
|
|
513
|
+
}
|
|
514
|
+
export interface SliceSummaryItem {
|
|
515
|
+
id: string;
|
|
516
|
+
title: string;
|
|
517
|
+
status: SliceStatus;
|
|
518
|
+
invariantCount: number;
|
|
519
|
+
dependsOn: string[];
|
|
520
|
+
lastVerifiedAt?: string;
|
|
521
|
+
lastScore?: number;
|
|
522
|
+
}
|
|
523
|
+
export interface SliceSummary {
|
|
524
|
+
total: number;
|
|
525
|
+
passed: number;
|
|
526
|
+
failed: number;
|
|
527
|
+
inProgress: number;
|
|
528
|
+
pending: number;
|
|
529
|
+
skipped: number;
|
|
530
|
+
completionRatio: number;
|
|
531
|
+
nextSlice: string | null;
|
|
532
|
+
slices: SliceSummaryItem[];
|
|
533
|
+
}
|
|
534
|
+
export interface ContractV02 {
|
|
535
|
+
schemaVersion: string;
|
|
536
|
+
createdAt: string;
|
|
537
|
+
generator: ContractGenerator;
|
|
538
|
+
target: ContractTarget;
|
|
539
|
+
artifacts: ContractArtifacts;
|
|
540
|
+
thresholds: ParityThresholds;
|
|
541
|
+
invariants: Invariant[];
|
|
542
|
+
slices?: ContractSlice[];
|
|
543
|
+
fixtures?: ContractFixtures;
|
|
544
|
+
}
|
|
545
|
+
export interface InvariantResult {
|
|
546
|
+
id: string;
|
|
547
|
+
type: InvariantType | string;
|
|
548
|
+
severity: InvariantSeverity;
|
|
549
|
+
status: InvariantStatus;
|
|
550
|
+
score: number;
|
|
551
|
+
failures?: string[];
|
|
552
|
+
reason?: string;
|
|
553
|
+
diff?: Record<string, unknown>;
|
|
554
|
+
metrics?: Record<string, unknown>;
|
|
555
|
+
diagnostic?: Diagnostic;
|
|
556
|
+
durationMs?: number;
|
|
557
|
+
repro?: string;
|
|
558
|
+
}
|
|
559
|
+
export interface OracleInvariantOutcome {
|
|
560
|
+
status: InvariantStatus;
|
|
561
|
+
score: number;
|
|
562
|
+
failures?: string[];
|
|
563
|
+
reason?: string;
|
|
564
|
+
diff?: Record<string, unknown>;
|
|
565
|
+
metrics?: Record<string, unknown>;
|
|
566
|
+
diagnostic?: Diagnostic;
|
|
567
|
+
}
|
|
568
|
+
export interface ParityReport {
|
|
569
|
+
schemaVersion: string;
|
|
570
|
+
timestamp: string;
|
|
571
|
+
passed: number;
|
|
572
|
+
total: number;
|
|
573
|
+
parity: number;
|
|
574
|
+
compositeScore: number;
|
|
575
|
+
hard: {
|
|
576
|
+
passed: number;
|
|
577
|
+
failed: number;
|
|
578
|
+
skipped: number;
|
|
579
|
+
evaluated: number;
|
|
580
|
+
total: number;
|
|
581
|
+
parity: number;
|
|
582
|
+
};
|
|
583
|
+
soft: {
|
|
584
|
+
passed: number;
|
|
585
|
+
warned: number;
|
|
586
|
+
failed: number;
|
|
587
|
+
skipped: number;
|
|
588
|
+
evaluated: number;
|
|
589
|
+
total: number;
|
|
590
|
+
meanScore: number;
|
|
591
|
+
parity: number;
|
|
592
|
+
};
|
|
593
|
+
gate: {
|
|
594
|
+
passed: boolean;
|
|
595
|
+
status: GateStatus;
|
|
596
|
+
exitCode: number;
|
|
597
|
+
reasons: string[];
|
|
598
|
+
};
|
|
599
|
+
nextAction: NextAction;
|
|
600
|
+
antiCheat?: AntiCheatReport;
|
|
601
|
+
fixtureSummary?: FixtureRunSummary;
|
|
602
|
+
results: InvariantResult[];
|
|
603
|
+
}
|
|
604
|
+
export interface CliProbeSpec {
|
|
605
|
+
name?: string;
|
|
606
|
+
args: string[];
|
|
607
|
+
stdin?: string;
|
|
608
|
+
env?: Record<string, string | undefined>;
|
|
609
|
+
expected?: InvariantExpected;
|
|
610
|
+
}
|
|
611
|
+
export interface WebRouteOption {
|
|
612
|
+
path?: string;
|
|
613
|
+
viewport?: Viewport;
|
|
614
|
+
waitUntil?: string;
|
|
615
|
+
id?: string;
|
|
616
|
+
titleContains?: string;
|
|
617
|
+
}
|
|
618
|
+
export interface WebFlowOption {
|
|
619
|
+
id?: string;
|
|
620
|
+
description?: string;
|
|
621
|
+
startPath?: string;
|
|
622
|
+
viewport?: Viewport;
|
|
623
|
+
steps?: WebFlowStep[];
|
|
624
|
+
expected?: InvariantExpected;
|
|
625
|
+
}
|
|
626
|
+
export interface ApiEndpointOption {
|
|
627
|
+
id?: string;
|
|
628
|
+
method?: string;
|
|
629
|
+
path?: string;
|
|
630
|
+
url?: string;
|
|
631
|
+
headers?: Record<string, string>;
|
|
632
|
+
query?: Record<string, string | number | boolean>;
|
|
633
|
+
body?: unknown;
|
|
634
|
+
expectedStatus?: number | number[];
|
|
635
|
+
jsonSchema?: JsonSchema;
|
|
636
|
+
jsonPaths?: JsonPathAssertion[];
|
|
637
|
+
timeoutMs?: number;
|
|
638
|
+
}
|
|
639
|
+
export interface IngestOptions {
|
|
640
|
+
domain?: IngestDomain | string;
|
|
641
|
+
source?: string;
|
|
642
|
+
name?: string;
|
|
643
|
+
cwd?: string;
|
|
644
|
+
probes?: Array<string | CliProbeSpec> | string | CliProbeSpec;
|
|
645
|
+
routes?: Array<string | WebRouteOption>;
|
|
646
|
+
flow?: WebFlowOption | null;
|
|
647
|
+
endpoints?: Array<string | ApiEndpointOption> | null;
|
|
648
|
+
endpointsFile?: string;
|
|
649
|
+
baseUrl?: string;
|
|
650
|
+
includeMutating?: boolean;
|
|
651
|
+
offline?: boolean;
|
|
652
|
+
sceneThreshold?: number;
|
|
653
|
+
maxFrames?: number;
|
|
654
|
+
defaults?: Record<string, unknown>;
|
|
655
|
+
forceManifest?: boolean;
|
|
656
|
+
noSpec?: boolean;
|
|
657
|
+
crawlDepth?: number;
|
|
658
|
+
holdoutRoutes?: string[];
|
|
659
|
+
crop?: string;
|
|
660
|
+
env?: Record<string, string>;
|
|
661
|
+
fsDiff?: boolean;
|
|
662
|
+
headers?: Record<string, string>;
|
|
663
|
+
storageState?: string;
|
|
664
|
+
fromCommands?: string;
|
|
665
|
+
fromHar?: string;
|
|
666
|
+
fromTests?: string;
|
|
667
|
+
}
|
|
668
|
+
export interface IngestResult {
|
|
669
|
+
domain: Domain;
|
|
670
|
+
sources: ContractSource[];
|
|
671
|
+
artifacts: ContractArtifacts;
|
|
672
|
+
invariants: Invariant[];
|
|
673
|
+
warnings: Diagnostic[];
|
|
674
|
+
specPath?: string;
|
|
675
|
+
}
|
|
676
|
+
export interface HttpResponseObservation {
|
|
677
|
+
status: number;
|
|
678
|
+
headers: Record<string, string>;
|
|
679
|
+
text: string;
|
|
680
|
+
json: unknown;
|
|
681
|
+
}
|
|
682
|
+
export interface FetchRouteObservation {
|
|
683
|
+
status: number;
|
|
684
|
+
title: string;
|
|
685
|
+
landmarks: WebLandmark[];
|
|
686
|
+
html: string;
|
|
687
|
+
headers?: Record<string, string>;
|
|
688
|
+
}
|
|
689
|
+
export interface PlaywrightResponseLike {
|
|
690
|
+
url(): string;
|
|
691
|
+
status(): number;
|
|
692
|
+
request(): {
|
|
693
|
+
method(): string;
|
|
694
|
+
};
|
|
695
|
+
headers(): Record<string, string>;
|
|
696
|
+
}
|
|
697
|
+
export interface PlaywrightConsoleMessageLike {
|
|
698
|
+
type(): string;
|
|
699
|
+
text(): string;
|
|
700
|
+
}
|
|
701
|
+
export interface PlaywrightPageLike {
|
|
702
|
+
goto(url: string, options?: {
|
|
703
|
+
waitUntil?: string;
|
|
704
|
+
timeout?: number;
|
|
705
|
+
}): Promise<PlaywrightResponseLike | null>;
|
|
706
|
+
title(): Promise<string>;
|
|
707
|
+
$$eval<R>(selector: string, pageFunction: (elements: Element[]) => R): Promise<R>;
|
|
708
|
+
$eval<R>(selector: string, pageFunction: (element: Element) => R): Promise<R>;
|
|
709
|
+
screenshot(options?: {
|
|
710
|
+
path?: string;
|
|
711
|
+
fullPage?: boolean;
|
|
712
|
+
}): Promise<Buffer>;
|
|
713
|
+
close?(): Promise<void>;
|
|
714
|
+
fill(selector: string, value: string): Promise<void>;
|
|
715
|
+
click(selector: string): Promise<void>;
|
|
716
|
+
press(selector: string, key: string): Promise<void>;
|
|
717
|
+
selectOption(selector: string, value: unknown): Promise<unknown>;
|
|
718
|
+
waitForFunction?<Arg>(pageFunction: (arg: Arg) => unknown, arg: Arg, options?: {
|
|
719
|
+
timeout?: number;
|
|
720
|
+
}): Promise<unknown>;
|
|
721
|
+
waitForTimeout?(timeout: number): Promise<void>;
|
|
722
|
+
waitForSelector(selector: string, options?: {
|
|
723
|
+
timeout?: number;
|
|
724
|
+
}): Promise<unknown>;
|
|
725
|
+
waitForLoadState?(state?: "load" | "domcontentloaded" | "networkidle", options?: {
|
|
726
|
+
timeout?: number;
|
|
727
|
+
}): Promise<void>;
|
|
728
|
+
setExtraHTTPHeaders?(headers: Record<string, string>): Promise<void>;
|
|
729
|
+
setViewportSize?(viewport: Viewport): Promise<void>;
|
|
730
|
+
content?(): Promise<string>;
|
|
731
|
+
url?(): string;
|
|
732
|
+
evaluate<R>(pageFunction: () => R): Promise<R>;
|
|
733
|
+
on?(event: "response", listener: (res: PlaywrightResponseLike) => void): void;
|
|
734
|
+
on?(event: "console", listener: (msg: PlaywrightConsoleMessageLike) => void): void;
|
|
735
|
+
on?(event: "pageerror", listener: (err: Error) => void): void;
|
|
736
|
+
__networkCalls?: Array<{
|
|
737
|
+
method: string;
|
|
738
|
+
pathPattern: string;
|
|
739
|
+
status: number;
|
|
740
|
+
contentType?: string;
|
|
741
|
+
}>;
|
|
742
|
+
__consoleErrors?: string[];
|
|
743
|
+
__pageErrors?: string[];
|
|
744
|
+
}
|
|
745
|
+
export interface PlaywrightLaunchOptions {
|
|
746
|
+
headless?: boolean;
|
|
747
|
+
executablePath?: string;
|
|
748
|
+
args?: string[];
|
|
749
|
+
}
|
|
750
|
+
export interface PlaywrightContextOptions {
|
|
751
|
+
viewport?: Viewport;
|
|
752
|
+
extraHTTPHeaders?: Record<string, string>;
|
|
753
|
+
storageState?: string;
|
|
754
|
+
}
|
|
755
|
+
export interface PlaywrightContextLike {
|
|
756
|
+
newPage(): Promise<PlaywrightPageLike>;
|
|
757
|
+
close(): Promise<void>;
|
|
758
|
+
}
|
|
759
|
+
export interface PlaywrightBrowserLike {
|
|
760
|
+
newPage(options?: PlaywrightContextOptions): Promise<PlaywrightPageLike>;
|
|
761
|
+
newContext?(options?: PlaywrightContextOptions): Promise<PlaywrightContextLike>;
|
|
762
|
+
close(): Promise<void>;
|
|
763
|
+
}
|
|
764
|
+
export interface PlaywrightLike {
|
|
765
|
+
version?: string;
|
|
766
|
+
chromium: {
|
|
767
|
+
launch(options?: PlaywrightLaunchOptions): Promise<PlaywrightBrowserLike>;
|
|
768
|
+
};
|
|
769
|
+
}
|
|
770
|
+
export interface SharpPipelineLike {
|
|
771
|
+
ensureAlpha(): SharpPipelineLike;
|
|
772
|
+
raw(): SharpPipelineLike;
|
|
773
|
+
toBuffer(options: {
|
|
774
|
+
resolveWithObject: true;
|
|
775
|
+
}): Promise<{
|
|
776
|
+
data: Buffer | Uint8Array;
|
|
777
|
+
info: {
|
|
778
|
+
width: number;
|
|
779
|
+
height: number;
|
|
780
|
+
};
|
|
781
|
+
}>;
|
|
782
|
+
}
|
|
783
|
+
export type SharpLike = (input: Buffer) => SharpPipelineLike;
|
|
784
|
+
export interface IngestDeps {
|
|
785
|
+
tmpDir?: string;
|
|
786
|
+
timeoutMs?: number;
|
|
787
|
+
sharp?: SharpLike | null;
|
|
788
|
+
playwright?: PlaywrightLike | null;
|
|
789
|
+
ffmpegAdapter?: FfmpegAdapter | null;
|
|
790
|
+
fetchRoute?: (url: string, viewport?: Viewport, timeoutMs?: number, headers?: Record<string, string>) => Promise<FetchRouteObservation>;
|
|
791
|
+
fetchJson?: (url: string, options?: {
|
|
792
|
+
method?: string;
|
|
793
|
+
headers?: Record<string, string>;
|
|
794
|
+
body?: unknown;
|
|
795
|
+
timeoutMs?: number;
|
|
796
|
+
}) => Promise<HttpResponseObservation>;
|
|
797
|
+
}
|
|
798
|
+
export type IngestorFn = (options?: IngestOptions, deps?: IngestDeps) => Promise<IngestResult>;
|
|
799
|
+
export interface VerifyOptions {
|
|
800
|
+
target: string;
|
|
801
|
+
strict?: boolean;
|
|
802
|
+
mode?: VerifyMode;
|
|
803
|
+
concurrency?: number;
|
|
804
|
+
pluginRegistry?: PluginRegistry;
|
|
805
|
+
invariantIds?: string[];
|
|
806
|
+
sliceIds?: string[];
|
|
807
|
+
cwd?: string;
|
|
808
|
+
revealHoldouts?: boolean;
|
|
809
|
+
useCache?: boolean;
|
|
810
|
+
}
|
|
811
|
+
export interface OracleContext {
|
|
812
|
+
target: string;
|
|
813
|
+
/** Optional per-domain target overrides (e.g. { web: "http://localhost:3000", cli: "./bin/app" }). */
|
|
814
|
+
targets?: TargetMap;
|
|
815
|
+
/** Runtime workflow variables (secrets); never cached, always redacted from outputs. */
|
|
816
|
+
vars?: Record<string, string>;
|
|
817
|
+
cwd?: string;
|
|
818
|
+
contract?: ContractV02;
|
|
819
|
+
artifactsDir?: string;
|
|
820
|
+
cacheDir?: string;
|
|
821
|
+
strict?: boolean;
|
|
822
|
+
mode?: VerifyMode;
|
|
823
|
+
concurrency?: number;
|
|
824
|
+
pluginRegistry?: PluginRegistry;
|
|
825
|
+
invariantIds?: string[];
|
|
826
|
+
viewport?: Viewport;
|
|
827
|
+
currentInvariantId?: string;
|
|
828
|
+
runtimeCache?: Record<string, unknown>;
|
|
829
|
+
revealHoldouts?: boolean;
|
|
830
|
+
useCache?: boolean;
|
|
831
|
+
headers?: Record<string, string>;
|
|
832
|
+
storageState?: string;
|
|
833
|
+
skipFixtures?: boolean;
|
|
834
|
+
allowFixtureCommands?: boolean;
|
|
835
|
+
}
|
|
836
|
+
export interface VerifyDeps {
|
|
837
|
+
sharp?: SharpLike | null;
|
|
838
|
+
playwright?: PlaywrightLike | null;
|
|
839
|
+
ffmpegAdapter?: FfmpegAdapter | null;
|
|
840
|
+
fetchImpl?: typeof fetch;
|
|
841
|
+
fetchRoute?: (url: string, timeoutMs?: number, headers?: Record<string, string>) => Promise<FetchRouteObservation>;
|
|
842
|
+
fetchWithTimeout?: (url: string, options?: {
|
|
843
|
+
method?: string;
|
|
844
|
+
headers?: Record<string, string>;
|
|
845
|
+
body?: unknown;
|
|
846
|
+
timeoutMs?: number;
|
|
847
|
+
}) => Promise<HttpResponseObservation>;
|
|
848
|
+
}
|
|
849
|
+
export type OracleFn = (invariant: Invariant, ctx: OracleContext, deps?: VerifyDeps) => Promise<OracleInvariantOutcome>;
|
|
850
|
+
export interface McpTextContent {
|
|
851
|
+
type: "text";
|
|
852
|
+
text: string;
|
|
853
|
+
}
|
|
854
|
+
export interface McpToolResult<T = unknown> {
|
|
855
|
+
content: McpTextContent[];
|
|
856
|
+
structuredContent: T;
|
|
857
|
+
isError?: boolean;
|
|
858
|
+
}
|
|
859
|
+
export interface McpServerDeps {
|
|
860
|
+
probeAdapters?: () => Promise<AdapterProbeResults>;
|
|
861
|
+
ingestDeps?: IngestDeps;
|
|
862
|
+
verifyDeps?: VerifyDeps;
|
|
863
|
+
}
|
|
864
|
+
export interface McpServerOptions {
|
|
865
|
+
cwd?: string;
|
|
866
|
+
stdin?: NodeJS.ReadableStream;
|
|
867
|
+
stdout?: NodeJS.WritableStream;
|
|
868
|
+
stderr?: NodeJS.WritableStream;
|
|
869
|
+
deps?: McpServerDeps;
|
|
870
|
+
}
|
|
871
|
+
export interface McpServerInstance {
|
|
872
|
+
start(): void;
|
|
873
|
+
handleMessage(msg: unknown): Promise<unknown>;
|
|
874
|
+
rootDir: string;
|
|
875
|
+
}
|
|
876
|
+
export type SetupScope = "project" | "global";
|
|
877
|
+
export interface SetupOptions {
|
|
878
|
+
clients?: string | string[];
|
|
879
|
+
scope?: SetupScope | string;
|
|
880
|
+
local?: boolean;
|
|
881
|
+
dryRun?: boolean;
|
|
882
|
+
cwd?: string;
|
|
883
|
+
homeDir?: string;
|
|
884
|
+
antigravityDir?: string;
|
|
885
|
+
}
|
|
886
|
+
export interface SetupChange {
|
|
887
|
+
client: string;
|
|
888
|
+
kind: "mcp" | "skill";
|
|
889
|
+
path: string;
|
|
890
|
+
action: "create" | "update" | "unchanged";
|
|
891
|
+
}
|
|
892
|
+
export interface SetupWarning {
|
|
893
|
+
code: string;
|
|
894
|
+
message: string;
|
|
895
|
+
client: string;
|
|
896
|
+
supported: string[];
|
|
897
|
+
}
|
|
898
|
+
export interface SetupReport {
|
|
899
|
+
ok: boolean;
|
|
900
|
+
dryRun: boolean;
|
|
901
|
+
scope: SetupScope;
|
|
902
|
+
local: boolean;
|
|
903
|
+
clients: string[];
|
|
904
|
+
server: {
|
|
905
|
+
command: string;
|
|
906
|
+
args: string[];
|
|
907
|
+
};
|
|
908
|
+
skillSource: string;
|
|
909
|
+
summary: {
|
|
910
|
+
created: number;
|
|
911
|
+
updated: number;
|
|
912
|
+
unchanged: number;
|
|
913
|
+
written: number;
|
|
914
|
+
warnings: number;
|
|
915
|
+
};
|
|
916
|
+
changes: SetupChange[];
|
|
917
|
+
written: string[];
|
|
918
|
+
warnings: SetupWarning[];
|
|
919
|
+
}
|