import type { ReportGeneratorInfo } from "../branding/types.js"; export type { ReportGeneratorInfo } from "../branding/types.js"; /** Canonical SiteLens Reports schema version. */ export declare const REPORT_SCHEMA_VERSION: 1; export declare const REPORT_PRODUCT: "SiteLens Reports"; export type ReportProfileId = "summary" | "investigation" | "full"; export type ReportStatus = "passed" | "warning" | "failed" | "error" | "partial"; export type ReportType = "local-flow-run" | "local-qa-run" | "local-scenario-run" | "visual-comparison" | "aggregate"; export interface ReportSourceRef { kind: "local-run" | "action-log" | "raw-viewport" | "compare" | "observation" | "inventory" | "scenario"; runId?: string; path?: string; stepIndex?: number; field?: string; } export interface ReportAssetRef { relativePath: string; mimeType: string; sha256?: string; } export interface ReportSummaryBlock { status: ReportStatus; stepTotal?: number; stepPassed?: number; stepFailed?: number; assertionsTotal?: number; assertionsPassed?: number; assertionsFailed?: number; networkTotal?: number; networkFailed?: number; consoleIssueCount?: number; networkIssueCount?: number; screenshotCount?: number; childTotal?: number; childPassed?: number; childFailed?: number; childWarning?: number; notes?: string[]; nextRecommendedAction?: string; completion?: "complete" | "partial" | "aborted"; } export interface ReportEnvironment { browserChannel?: string; viewports?: string[]; authMode?: string; settleWaitMs?: number; readiness?: { gotoWaitUntil?: string; overallStatus?: string; readySelector?: string; readyText?: string; readyTimeoutMs?: number; timedOutViewports?: string[]; unevaluatedViewports?: string[]; }; } export interface ReportStep { index: number; viewport?: string; kind: "action" | "assert" | "network"; type: string; targetDescription: string; status: "passed" | "failed"; error?: string; expected?: string; actual?: string; screenshot?: { label: string; relativePath: string; url?: string; }; network?: { url: string; method: string; status?: number; durationMs?: number; bodyPreview?: string; }; storage?: { storage: string; operation: string; keysAffected: string[]; pageUrl: string; }; source: ReportSourceRef; } export interface ReportAssertion { stepIndex: number; type: string; status: "passed" | "failed"; expected?: string; actual?: string; error?: string; source: ReportSourceRef; } export interface ReportScreenshot { id: string; label?: string; role: "checkpoint" | "viewport" | "diff" | "other"; asset: ReportAssetRef; /** Soft presentation derivatives; `asset` remains the canonical original for comparison. */ derivatives?: { annotated?: ReportAssetRef; thumbnail?: ReportAssetRef; }; viewport?: string; url?: string; width?: number; height?: number; source: ReportSourceRef; } /** First-class visual comparison evidence (ingested from compare sidecars — not recomputed). */ export interface ReportVisualComparison { id: string; label?: string; status: "passed" | "failed" | "changed" | "same" | "dimensions_changed" | "missing_pair" | "unknown"; changedPercent?: number; changedPixelCount?: number; totalPixelCount?: number; thresholdPercent?: number; dimensionsMatch?: boolean; baseline?: ReportAssetRef; current?: ReportAssetRef; diff?: ReportAssetRef; baselineDimensions?: { width: number; height: number; }; currentDimensions?: { width: number; height: number; }; source: ReportSourceRef; } export interface ReportNetworkEvidence { stepIndex?: number; url: string; method?: string; status?: number; failure?: string; bodyPreview?: string; source: ReportSourceRef; } export interface ReportConsoleEvidence { type: string; text: string; viewport?: string; source: ReportSourceRef; } export interface ReportError { message: string; phase?: string; source?: ReportSourceRef; } /** * Findings summary sourced from `diagnostics.json` (BrowserDiagnosticsEngine, sitelens-observe). * Optional/additive — schema version 1 readers must tolerate its absence (report predates * Phase G) or presence (report has no diagnostics findings, `findings: []`). */ export type ReportDiagnosticSeverity = "info" | "warning" | "error" | "critical"; export interface ReportDiagnosticFindingRef { findingId: string; ruleId: string; severity: ReportDiagnosticSeverity; title: string; summary?: string; category?: string; stepId?: string; boundaryId?: string; recommendedActions?: Array<{ id: string; label: string; detail?: string; }>; source: ReportSourceRef; } export interface ReportDiagnosticsBlock { /** `DIAGNOSTICS_SCHEMA_VERSION` from `@sitelensapi/observe` at the time diagnostics.json was written. */ schemaVersion?: number; generatedAt?: string; findingCount: number; droppedFindingCount?: number; findings: ReportDiagnosticFindingRef[]; source: ReportSourceRef; } export type ReportGeographicProxyType = "datacenter" | "residential"; export type ReportGeographicVerificationStatus = "verified" | "mismatch" | "unverified"; export type ReportGeographicOutcome = "captured" | "failed" | "error"; /** Public geographic exit metadata. Proxy credentials are not part of this block. */ export interface ReportGeographicSide { requestedCountry: string | null; observedCountry: string | null; proxyType: ReportGeographicProxyType | null; verificationStatus: ReportGeographicVerificationStatus | null; outcome: ReportGeographicOutcome | null; /** True only when an exit country code was observed. */ exitChecked: boolean; } export interface ReportGeographicBlock { countriesRequested: (string | null)[]; countriesObserved: (string | null)[]; sides: ReportGeographicSide[]; } export interface ReportChildRef { index: number; flowId?: string; flowName?: string; flowRef?: string; status: ReportStatus; runId?: string; reportId?: string; /** Portable relative path from the suite report directory to the child report.json */ reportPath?: string; testedUrl?: string; error?: string; artifactDirRelative?: string; } export interface ReportSensitivityMetadata { level: "public-demo" | "internal" | "restricted"; redactionApplied: boolean; containsScreenshots: boolean; containsNetworkPreviews: boolean; warnings: string[]; } export interface ReportSourceEvidenceIndex { localRunId?: string; summaryPath?: string; rawPath?: string; actionLogPath?: string; inventoryPath?: string; /** Present when a `diagnostics.json` (BrowserDiagnosticsEngine) was ingested. */ diagnosticsPath?: string; evidenceRootRelative?: string; } /** Reserved for future diagram renderers — not populated in Phase 1. */ export interface ReportDiagram { id: string; kind: string; title: string; nodes: Array<{ id: string; label: string; role?: string; }>; edges: Array<{ from: string; to: string; label?: string; }>; source: ReportSourceRef; } /** Reserved for future chart renderers — not populated in Phase 1. */ export interface ReportChart { id: string; kind: string; title: string; series: Array<{ name: string; points: Array<{ x: string; y: number; }>; }>; source: ReportSourceRef; } export interface SiteLensReportV1 { schemaVersion: typeof REPORT_SCHEMA_VERSION; product: typeof REPORT_PRODUCT; reportType: ReportType; profile: ReportProfileId; title: string; description?: string; generatedAt: string; generator: ReportGeneratorInfo; identity: { reportId: string; runId?: string; scenarioId?: string; flowId?: string; flowName?: string; workspaceHint?: string; }; status: ReportStatus; summary: ReportSummaryBlock; environment?: ReportEnvironment; timing?: { startedAt?: string; finishedAt?: string; durationMs?: number; }; pages?: { testedUrl?: string; finalUrl?: string; titles?: string[]; httpStatus?: number | null; }; steps?: ReportStep[]; assertions?: ReportAssertion[]; screenshots?: ReportScreenshot[]; visualComparisons?: ReportVisualComparison[]; network?: ReportNetworkEvidence[]; console?: ReportConsoleEvidence[]; errors?: ReportError[]; /** Optional (schema-additive since Phase G) — browser diagnostics engine findings. */ diagnostics?: ReportDiagnosticsBlock; /** Optional geographic exit metadata from capture. Absent on reports that predate it. */ geographic?: ReportGeographicBlock; children?: ReportChildRef[]; diagrams?: ReportDiagram[]; charts?: ReportChart[]; sensitivity: ReportSensitivityMetadata; sourceEvidence: ReportSourceEvidenceIndex; } //# sourceMappingURL=report-v1.d.ts.map