@zigrivers/surface-core 0.1.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.
@@ -0,0 +1,1753 @@
1
+ import { aO as Lens, A as AppType, bY as Target, v as CaptureOptions, bt as Result, C as Capture, bR as SurfaceError, d as ArtifactWriter, q as CaptureBackend, bL as SurfaceConfig, bI as StateStore, bg as ProjectStateSnapshot, p as CaptureArtifactType, aU as ModelAvailability, aq as FrameworkAdapter, av as GateEvaluator, aB as GroundingTool, aI as IssueExporter, aN as KnowledgeSource, bp as ReportRenderer, G as ComponentMap, bC as SourceFileRef, ab as FindingDraft, bk as RedactionRule, c7 as TrackedFindingsDiff, al as FindingsEnvelope, aa as Finding, B as Backlog, ba as PersistedArtifactRef, bn as Report, aM as KnowledgeEntry, bm as RelevanceQuery, c0 as Theme } from './interfaces-OHgLgNLO.js';
2
+ export { a as AppTypeSchema, b as ApplyWaiversInput, c as AriaAttributeSuggestedPatchSchema, e as BacklogEntry, f as BacklogEntrySchema, g as BacklogSchema, h as Baseline, i as BrokenFindingIdentityAssignment, j as BrokenFindingIdentityAssignmentSchema, k as BrokenIdentityDriftResultSchema, r as CaptureConfig, s as CaptureConfigLayerSchema, t as CaptureConfigSchema, y as CitedHeuristicEvidence, z as CitedHeuristicEvidenceSchema, D as CliErrorEnvelope, E as CliExitCode, F as CliExitCodeSchema, I as ConfidenceBand, J as ConfidenceBandSchema, K as ConfidenceCutoffs, L as ConfidenceCutoffsLayerSchema, M as ConfidenceCutoffsSchema, N as ContrastHexSuggestedPatchSchema, O as CreateBaselineInput, P as CreateSurfaceErrorOptions, Q as CreateTrackedFindingInput, R as DEFAULT_FINDINGS_POLICY, S as DEFAULT_SURFACE_CONFIG, U as Depth, V as DepthSchema, W as DiffableTrackedFinding, X as Dimensions, Y as DimensionsSchema, Z as DomEvidence, _ as DomEvidenceSchema, $ as EdgeErrorContext, a0 as EvaluationConfig, a1 as EvaluationConfigLayerSchema, a2 as EvaluationConfigSchema, a3 as EvaluationMethod, a4 as EvaluationMethodSchema, a5 as Evidence, a6 as EvidenceSchema, a7 as ExportTarget, a8 as ExportTargetSchema, ac as FindingDraftSchema, ad as FindingIdentity, ae as FindingIdentityAssignment, af as FindingIdentityAssignmentSchema, ag as FindingIdentityCandidate, ah as FindingIdentityCandidateSchema, ai as FindingIdentitySchema, aj as FindingSchema, ak as FindingStatus, am as FindingsEnvelopeSchema, an as FindingsPolicy, ao as FindingsPolicyLayerSchema, ap as FindingsPolicySchema, at as GateDisposition, aw as GatePolicy, ay as GatePolicyLayerSchema, az as GatePolicySchema, aC as IdentityAnchorKind, aD as IdentityAnchorKindSchema, aE as IdentityDriftResult, aF as IdentityDriftResultSchema, aJ as JUDGED_COVERAGE_UNAVAILABLE_MESSAGE, aR as Location, aS as LocationSchema, aT as McpStructuredError, aV as ModelAvailabilitySchema, aW as ModelCompletionAdapter, aX as ModelLensSkip, aY as ModelLensSkipSchema, aZ as ModelPrompt, a_ as ModelPromptSchema, a$ as ModelProvider, b0 as ModelProviderConfig, b1 as ModelProviderConfigInput, b2 as ModelProviderConfigSchema, b3 as ModelProviderId, b4 as ModelProviderResolution, b5 as ModelRequest, b6 as ModelRequestSchema, b7 as ModelResponse, b8 as ModelResponseSchema, bb as Preset, bc as PresetSchema, bi as Rect, bj as RectSchema, bl as RedactionRuleSchema, bq as ReportingConfig, br as ReportingConfigLayerSchema, bs as ReportingConfigSchema, bu as SURFACE_ERROR_DEFINITIONS, bv as ScreenshotRegionEvidence, bw as ScreenshotRegionEvidenceSchema, bx as SeverityBand, by as SeverityBandSchema, bz as SeverityCutoffs, bA as SeverityCutoffsLayerSchema, bB as SeverityCutoffsSchema, bD as StableFindingIdentityAssignment, bE as StableFindingIdentityAssignmentSchema, bF as StableIdentityDriftResultSchema, bG as Stack, bH as StackSchema, bJ as SuggestedPatch, bK as SuggestedPatchSchema, bM as SurfaceConfigLayer, bN as SurfaceConfigLayerSchema, bO as SurfaceConfigLayers, bP as SurfaceConfigLayersSchema, bQ as SurfaceConfigSchema, bS as SurfaceErrorCode, bT as SurfaceErrorCodeSchema, bU as SurfaceErrorDefinition, bV as SurfaceErrorKind, bW as SurfaceErrorKindSchema, bX as SurfaceErrorSchema, b_ as TargetSizeSuggestedPatchSchema, c2 as ToolResultEvidence, c3 as ToolResultEvidenceSchema, c4 as TrackedFinding, c5 as TrackedFindingHistoryEntry, c6 as TrackedFindingTransition, c8 as TrackedFindingsDiffEntry, c9 as ValidationCheck, ca as Viewport, cd as ViewportSchema, ce as Waiver, cf as applyWaiversToTrackedFindings, cg as assignFindingIdentities, ch as createBaseline, ci as createConfiguredModelProvider, cj as createSurfaceError, ck as createTrackedFinding, cl as createUnavailableModelProvider, cm as deriveFindingIdentity, cn as deriveFindingIdentityCandidate, co as diffTrackedFindings, cp as err, cq as exitCodeForSurfaceError, cr as identityInternalsForTesting, cs as isErr, ct as isOk, cu as isWaiverActive, cv as matchFindingIdentity, cw as modelSkipForLens, cx as ok, cy as resolveModelProviderConfig, cz as resolveSurfaceConfig, cA as scoreFinding, cB as synthesizeBacklog, cC as toCliErrorEnvelope, cD as toMcpError, cE as transitionTrackedFinding } from './interfaces-OHgLgNLO.js';
3
+ import { z } from 'zod';
4
+ import { DestinationStream, Logger } from 'pino';
5
+ import { LockOptions } from 'proper-lockfile';
6
+
7
+ /**
8
+ * Creates the built-in measured accessibility lens from normalized grounding evidence.
9
+ */
10
+ declare function createAccessibilityLens(): Lens;
11
+
12
+ declare const OverlayReleaseTierSchema: z.ZodEnum<{
13
+ gate: "gate";
14
+ committed: "committed";
15
+ should: "should";
16
+ }>;
17
+ type OverlayReleaseTier = z.infer<typeof OverlayReleaseTierSchema>;
18
+ declare const OverlayAcceptanceCriteriaSchema: z.ZodObject<{
19
+ summary: z.ZodString;
20
+ checks: z.ZodArray<z.ZodString>;
21
+ riskSignals: z.ZodArray<z.ZodString>;
22
+ }, z.core.$strict>;
23
+ type OverlayAcceptanceCriteria = z.infer<typeof OverlayAcceptanceCriteriaSchema>;
24
+ declare const AppTypeOverlaySchema: z.ZodObject<{
25
+ appType: z.ZodEnum<{
26
+ generic: "generic";
27
+ "saas-dashboard": "saas-dashboard";
28
+ "e-commerce": "e-commerce";
29
+ marketing: "marketing";
30
+ admin: "admin";
31
+ "content-media": "content-media";
32
+ }>;
33
+ defaultPersona: z.ZodString;
34
+ defaultTask: z.ZodString;
35
+ discoverySignals: z.ZodArray<z.ZodString>;
36
+ label: z.ZodString;
37
+ releaseTier: z.ZodEnum<{
38
+ gate: "gate";
39
+ committed: "committed";
40
+ should: "should";
41
+ }>;
42
+ routeHints: z.ZodArray<z.ZodString>;
43
+ lensCriteria: z.ZodRecord<z.ZodString, z.ZodObject<{
44
+ summary: z.ZodString;
45
+ checks: z.ZodArray<z.ZodString>;
46
+ riskSignals: z.ZodArray<z.ZodString>;
47
+ }, z.core.$strict>>;
48
+ }, z.core.$strict>;
49
+ type AppTypeOverlay = z.infer<typeof AppTypeOverlaySchema>;
50
+ declare const REGISTERED_APP_TYPE_OVERLAYS: readonly ["generic", "saas-dashboard", "e-commerce", "marketing"];
51
+ type RegisteredAppTypeOverlay = (typeof REGISTERED_APP_TYPE_OVERLAYS)[number];
52
+ declare const COMMITTED_WEB_APP_TYPE_OVERLAYS: readonly ["saas-dashboard", "e-commerce", "marketing"];
53
+ declare const APP_TYPE_OVERLAY_YAML_HEADER = "# Generated from packages/core/src/app-type-overlays.ts. Do not edit by hand.";
54
+ declare const APP_TYPE_OVERLAY_REGISTRY: Readonly<Record<"generic" | "saas-dashboard" | "e-commerce" | "marketing", {
55
+ appType: "generic" | "saas-dashboard" | "e-commerce" | "marketing" | "admin" | "content-media";
56
+ defaultPersona: string;
57
+ defaultTask: string;
58
+ discoverySignals: string[];
59
+ label: string;
60
+ releaseTier: "gate" | "committed" | "should";
61
+ routeHints: string[];
62
+ lensCriteria: Record<string, {
63
+ summary: string;
64
+ checks: string[];
65
+ riskSignals: string[];
66
+ }>;
67
+ }>>;
68
+ declare function hasRegisteredAppTypeOverlay(appType: AppType): appType is RegisteredAppTypeOverlay;
69
+ declare function getAppTypeOverlay(appType?: AppType): Readonly<AppTypeOverlay>;
70
+ declare function listAppTypeOverlays(): readonly Readonly<AppTypeOverlay>[];
71
+ declare function serializeAppTypeOverlayToYaml(overlay: AppTypeOverlay): string;
72
+
73
+ type CaptureIdFactory = (target: Target) => string;
74
+ type CaptureClock = () => string;
75
+ type CaptureRandomHex = () => string;
76
+ interface CaptureService {
77
+ capture(target: Target, options: CaptureOptions): Promise<Result<Capture, SurfaceError>>;
78
+ }
79
+ interface CaptureServiceOptions {
80
+ readonly artifactWriter?: ArtifactWriter;
81
+ readonly backends: readonly CaptureBackend[];
82
+ readonly staticFallback: CaptureBackend;
83
+ }
84
+ interface PlaywrightCaptureBackendOptions {
85
+ readonly available?: boolean;
86
+ readonly clock?: CaptureClock;
87
+ readonly idFactory?: CaptureIdFactory;
88
+ readonly loadPlaywright?: () => Promise<unknown>;
89
+ }
90
+ interface AgentBrowserCommandResult {
91
+ readonly exitCode: number;
92
+ readonly stderr: string;
93
+ readonly stdout: string;
94
+ }
95
+ type AgentBrowserCommandRunner = (args: readonly string[]) => Promise<AgentBrowserCommandResult>;
96
+ interface AgentBrowserCaptureBackendOptions {
97
+ readonly available?: boolean;
98
+ readonly clock?: CaptureClock;
99
+ readonly command?: string;
100
+ readonly idFactory?: CaptureIdFactory;
101
+ readonly runCommand?: AgentBrowserCommandRunner;
102
+ readonly sessionName?: string;
103
+ }
104
+ interface StaticCaptureBackendOptions {
105
+ /**
106
+ * Optional trusted source roots for static target refs. When omitted,
107
+ * target refs are treated as trusted local file inputs and may point to
108
+ * any readable image file on disk.
109
+ */
110
+ readonly allowedSourceRoots?: readonly string[];
111
+ readonly clock?: CaptureClock;
112
+ readonly idFactory?: CaptureIdFactory;
113
+ }
114
+ declare function createCaptureService(options: CaptureServiceOptions): CaptureService;
115
+ declare function createPlaywrightCaptureBackend(options?: PlaywrightCaptureBackendOptions): CaptureBackend;
116
+ declare function createAgentBrowserCaptureBackend(options?: AgentBrowserCaptureBackendOptions): CaptureBackend;
117
+ /**
118
+ * Creates the degraded static fallback backend. Static target refs are trusted
119
+ * local file inputs unless allowedSourceRoots is configured. Do not pass
120
+ * attacker-controlled refs without constraining source roots.
121
+ */
122
+ declare function createStaticCaptureBackend(options?: StaticCaptureBackendOptions): CaptureBackend;
123
+ declare function selectCaptureBackend(backends: readonly CaptureBackend[]): CaptureBackend | undefined;
124
+ declare function createDefaultCaptureIdFactory(options?: {
125
+ readonly clock?: CaptureClock;
126
+ readonly randomHex?: CaptureRandomHex;
127
+ }): CaptureIdFactory;
128
+
129
+ type MaybePromise<T> = T | Promise<T>;
130
+ declare const ExecutablePipelineStageIdSchema: z.ZodEnum<{
131
+ capture: "capture";
132
+ validation: "validation";
133
+ accessibility: "accessibility";
134
+ conversion: "conversion";
135
+ persona: "persona";
136
+ routes: "routes";
137
+ content: "content";
138
+ responsiveness: "responsiveness";
139
+ discovery: "discovery";
140
+ heuristic: "heuristic";
141
+ visual: "visual";
142
+ "cognitive-walkthrough": "cognitive-walkthrough";
143
+ innovation: "innovation";
144
+ synthesis: "synthesis";
145
+ }>;
146
+ type ExecutablePipelineStageId = z.infer<typeof ExecutablePipelineStageIdSchema>;
147
+ declare const PipelineStageIdSchema: z.ZodEnum<{
148
+ capture: "capture";
149
+ validation: "validation";
150
+ completed: "completed";
151
+ accessibility: "accessibility";
152
+ conversion: "conversion";
153
+ persona: "persona";
154
+ routes: "routes";
155
+ content: "content";
156
+ responsiveness: "responsiveness";
157
+ discovery: "discovery";
158
+ heuristic: "heuristic";
159
+ visual: "visual";
160
+ "cognitive-walkthrough": "cognitive-walkthrough";
161
+ innovation: "innovation";
162
+ synthesis: "synthesis";
163
+ "pending-completion": "pending-completion";
164
+ }>;
165
+ type PipelineStageId = z.infer<typeof PipelineStageIdSchema>;
166
+ declare const PipelineEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
167
+ type: z.ZodLiteral<"StageAdvanced">;
168
+ runId: z.ZodString;
169
+ stage: z.ZodUnion<readonly [z.ZodEnum<{
170
+ capture: "capture";
171
+ validation: "validation";
172
+ accessibility: "accessibility";
173
+ conversion: "conversion";
174
+ persona: "persona";
175
+ routes: "routes";
176
+ content: "content";
177
+ responsiveness: "responsiveness";
178
+ discovery: "discovery";
179
+ heuristic: "heuristic";
180
+ visual: "visual";
181
+ "cognitive-walkthrough": "cognitive-walkthrough";
182
+ innovation: "innovation";
183
+ synthesis: "synthesis";
184
+ }>, z.ZodLiteral<"finalization">]>;
185
+ sequence: z.ZodNumber;
186
+ }, z.core.$strict>, z.ZodObject<{
187
+ type: z.ZodLiteral<"StageSkipped">;
188
+ runId: z.ZodString;
189
+ stage: z.ZodUnion<readonly [z.ZodEnum<{
190
+ capture: "capture";
191
+ validation: "validation";
192
+ accessibility: "accessibility";
193
+ conversion: "conversion";
194
+ persona: "persona";
195
+ routes: "routes";
196
+ content: "content";
197
+ responsiveness: "responsiveness";
198
+ discovery: "discovery";
199
+ heuristic: "heuristic";
200
+ visual: "visual";
201
+ "cognitive-walkthrough": "cognitive-walkthrough";
202
+ innovation: "innovation";
203
+ synthesis: "synthesis";
204
+ }>, z.ZodLiteral<"finalization">]>;
205
+ reason: z.ZodString;
206
+ sequence: z.ZodNumber;
207
+ }, z.core.$strict>, z.ZodObject<{
208
+ type: z.ZodLiteral<"AuditRunFailed">;
209
+ runId: z.ZodString;
210
+ stage: z.ZodUnion<readonly [z.ZodEnum<{
211
+ capture: "capture";
212
+ validation: "validation";
213
+ accessibility: "accessibility";
214
+ conversion: "conversion";
215
+ persona: "persona";
216
+ routes: "routes";
217
+ content: "content";
218
+ responsiveness: "responsiveness";
219
+ discovery: "discovery";
220
+ heuristic: "heuristic";
221
+ visual: "visual";
222
+ "cognitive-walkthrough": "cognitive-walkthrough";
223
+ innovation: "innovation";
224
+ synthesis: "synthesis";
225
+ }>, z.ZodLiteral<"finalization">]>;
226
+ message: z.ZodString;
227
+ sequence: z.ZodNumber;
228
+ }, z.core.$strict>, z.ZodObject<{
229
+ type: z.ZodLiteral<"AuditRunCompleted">;
230
+ runId: z.ZodString;
231
+ sequence: z.ZodNumber;
232
+ }, z.core.$strict>], "type">;
233
+ type PipelineEvent = z.infer<typeof PipelineEventSchema>;
234
+ type PipelineStageDefinition = {
235
+ readonly id: ExecutablePipelineStageId;
236
+ readonly fr: `FR-PIPE-${number}`;
237
+ readonly minDepth: SurfaceConfig["evaluation"]["depth"];
238
+ readonly presets?: readonly SurfaceConfig["evaluation"]["preset"][];
239
+ };
240
+ type PipelineStageContext = {
241
+ readonly runId: string;
242
+ readonly stage: PipelineStageDefinition;
243
+ readonly config: SurfaceConfig;
244
+ readonly state: ProjectStateSnapshot;
245
+ };
246
+ type PipelineStageHandler = (context: PipelineStageContext) => MaybePromise<Result<unknown, SurfaceError>>;
247
+ type PipelineOrchestratorOptions = {
248
+ readonly stateStore: StateStore;
249
+ readonly handlers: Partial<Record<ExecutablePipelineStageId, PipelineStageHandler>>;
250
+ };
251
+ type PipelineRunInput = {
252
+ readonly runId: string;
253
+ readonly config?: SurfaceConfig;
254
+ };
255
+ type PipelineRunResult = {
256
+ readonly runId: string;
257
+ readonly newlyCompletedStages: readonly ExecutablePipelineStageId[];
258
+ readonly skippedStages: readonly {
259
+ readonly stage: ExecutablePipelineStageId;
260
+ readonly reason: string;
261
+ }[];
262
+ readonly events: readonly PipelineEvent[];
263
+ };
264
+ interface PipelineOrchestrator {
265
+ /**
266
+ * Resume behavior is driven by matching pipeline metadata for the same run and
267
+ * stage plan. Legacy states without metadata, or states from a different plan,
268
+ * restart the active plan from the beginning. Project state stores one active
269
+ * pipeline run at a time; starting a different runId overwrites prior pipeline
270
+ * metadata rather than preserving concurrent run progress. Callers must
271
+ * serialize run() calls per runId; this orchestrator does not provide locking
272
+ * or compare-and-swap protection around StateStore read/write cycles.
273
+ * Pre-stage write failures happen before metadata can reserve a sequence, so
274
+ * those retries intentionally restart event numbering from the last durable
275
+ * metadata snapshot.
276
+ */
277
+ run(input: PipelineRunInput): Promise<Result<PipelineRunResult, SurfaceError>>;
278
+ }
279
+ declare const DEFAULT_PIPELINE_STAGE_DEFINITIONS: readonly [{
280
+ readonly id: "discovery";
281
+ readonly fr: "FR-PIPE-1";
282
+ readonly minDepth: 1;
283
+ }, {
284
+ readonly id: "persona";
285
+ readonly fr: "FR-PIPE-2";
286
+ readonly minDepth: 1;
287
+ }, {
288
+ readonly id: "routes";
289
+ readonly fr: "FR-PIPE-3";
290
+ readonly minDepth: 1;
291
+ }, {
292
+ readonly id: "capture";
293
+ readonly fr: "FR-PIPE-4";
294
+ readonly minDepth: 1;
295
+ }, {
296
+ readonly id: "heuristic";
297
+ readonly fr: "FR-PIPE-5";
298
+ readonly minDepth: 1;
299
+ }, {
300
+ readonly id: "accessibility";
301
+ readonly fr: "FR-PIPE-6";
302
+ readonly minDepth: 1;
303
+ }, {
304
+ readonly id: "visual";
305
+ readonly fr: "FR-PIPE-7";
306
+ readonly minDepth: 1;
307
+ }, {
308
+ readonly id: "content";
309
+ readonly fr: "FR-PIPE-8";
310
+ readonly minDepth: 1;
311
+ }, {
312
+ readonly id: "responsiveness";
313
+ readonly fr: "FR-PIPE-9";
314
+ readonly minDepth: 1;
315
+ }, {
316
+ readonly id: "cognitive-walkthrough";
317
+ readonly fr: "FR-PIPE-10";
318
+ readonly minDepth: 4;
319
+ }, {
320
+ readonly id: "conversion";
321
+ readonly fr: "FR-PIPE-11";
322
+ readonly minDepth: 4;
323
+ readonly presets: readonly ["agent-ready", "conversion-focused", "deep"];
324
+ }, {
325
+ readonly id: "innovation";
326
+ readonly fr: "FR-PIPE-12";
327
+ readonly minDepth: 5;
328
+ readonly presets: readonly ["deep"];
329
+ }, {
330
+ readonly id: "synthesis";
331
+ readonly fr: "FR-PIPE-13";
332
+ readonly minDepth: 1;
333
+ }, {
334
+ readonly id: "validation";
335
+ readonly fr: "FR-PIPE-14";
336
+ readonly minDepth: 1;
337
+ }];
338
+ /** Select the executable pipeline stages for the configured depth and preset. */
339
+ declare function selectPipelineStages(config?: SurfaceConfig): readonly PipelineStageDefinition[];
340
+ /** Create explicit no-op handlers for tests and metadata-only prototype wiring. */
341
+ declare function createNoopPipelineHandlers(overrides?: Partial<Record<ExecutablePipelineStageId, PipelineStageHandler>>): Record<ExecutablePipelineStageId, PipelineStageHandler>;
342
+ /** Create a stateless orchestrator with metadata-backed resume semantics. */
343
+ declare function createPipelineOrchestrator(options: PipelineOrchestratorOptions): PipelineOrchestrator;
344
+
345
+ type LensFactoryOptions = {
346
+ readonly maxDomChars?: number;
347
+ readonly projectRoot?: string;
348
+ };
349
+ type LensRegistration = {
350
+ readonly id: string;
351
+ readonly method: "measured" | "judged";
352
+ readonly requiresModel: boolean;
353
+ readonly requiresLiveDom: boolean;
354
+ readonly requiredArtifacts?: readonly CaptureArtifactType[];
355
+ readonly presets: readonly SurfaceConfig["evaluation"]["preset"][];
356
+ readonly create?: (options?: LensFactoryOptions) => Lens;
357
+ };
358
+ type LensSkipReason = "model_unavailable" | "live_dom_unavailable";
359
+ type LensExecutionSkip = {
360
+ readonly lensId: string;
361
+ readonly reason: LensSkipReason;
362
+ readonly message: string;
363
+ };
364
+ type LensExecutionPlan = {
365
+ readonly overlay: Readonly<AppTypeOverlay>;
366
+ readonly preset: SurfaceConfig["evaluation"]["preset"];
367
+ readonly selected: readonly LensRegistration[];
368
+ readonly skipped: readonly LensExecutionSkip[];
369
+ };
370
+ type InstantiatedLens = {
371
+ readonly lens: Lens;
372
+ readonly registration: LensRegistration;
373
+ };
374
+ type SelectLensExecutionPlanInput = {
375
+ readonly config: SurfaceConfig;
376
+ readonly capture?: Capture;
377
+ readonly modelAvailability?: ModelAvailability;
378
+ readonly registry?: readonly LensRegistration[];
379
+ };
380
+ type SynthesisDecision = {
381
+ readonly factKey: string;
382
+ readonly sourceOfTruth: "measured" | "judged";
383
+ readonly reason: string;
384
+ readonly measuredSource: string;
385
+ readonly measuredValue: string;
386
+ readonly judgedSource: string;
387
+ readonly judgedValue: string;
388
+ };
389
+ type SynthesizeMeasuredWinsInput = {
390
+ readonly factKey: string;
391
+ readonly measuredSource: string;
392
+ readonly measuredValue: string;
393
+ readonly judgedSource: string;
394
+ readonly judgedValue: string;
395
+ };
396
+ declare const BUILT_IN_LENS_REGISTRY: readonly [{
397
+ readonly id: "accessibility";
398
+ readonly method: "measured";
399
+ readonly requiresModel: false;
400
+ readonly requiresLiveDom: true;
401
+ readonly presets: readonly ["quick", "mvp", "standard", "deep", "accessibility-first", "agent-ready"];
402
+ readonly create: () => Lens;
403
+ }, {
404
+ readonly id: "usability";
405
+ readonly method: "judged";
406
+ readonly requiresModel: true;
407
+ readonly requiredArtifacts: readonly ["dom-snapshot"];
408
+ readonly requiresLiveDom: true;
409
+ readonly presets: readonly ["quick", "mvp", "standard", "deep", "agent-ready"];
410
+ readonly create: (options: LensFactoryOptions | undefined) => Lens;
411
+ }, {
412
+ readonly id: "visual-hierarchy";
413
+ readonly method: "judged";
414
+ readonly requiredArtifacts: readonly ["dom-snapshot", "computed-styles"];
415
+ readonly requiresModel: false;
416
+ readonly requiresLiveDom: true;
417
+ readonly presets: readonly ["mvp", "standard", "deep", "accessibility-first", "design-system-focused"];
418
+ readonly create: (options: LensFactoryOptions | undefined) => Lens;
419
+ }, {
420
+ readonly id: "content";
421
+ readonly method: "judged";
422
+ readonly requiresModel: false;
423
+ readonly requiresLiveDom: true;
424
+ readonly presets: readonly ["standard", "deep"];
425
+ readonly create: (options: LensFactoryOptions | undefined) => Lens;
426
+ }, {
427
+ readonly id: "responsiveness";
428
+ readonly method: "measured";
429
+ readonly requiresModel: false;
430
+ readonly requiresLiveDom: true;
431
+ readonly presets: readonly ["mvp", "standard", "deep", "accessibility-first", "conversion-focused"];
432
+ readonly create: (options: LensFactoryOptions | undefined) => Lens;
433
+ }, {
434
+ readonly id: "conversion";
435
+ readonly method: "judged";
436
+ readonly requiredArtifacts: readonly ["dom-snapshot"];
437
+ readonly requiresModel: true;
438
+ readonly requiresLiveDom: true;
439
+ readonly presets: readonly ["conversion-focused", "deep", "agent-ready"];
440
+ readonly create: (options: LensFactoryOptions | undefined) => Lens;
441
+ }, {
442
+ readonly id: "message-clarity";
443
+ readonly method: "judged";
444
+ readonly requiresModel: true;
445
+ readonly requiresLiveDom: false;
446
+ readonly presets: readonly ["standard", "deep", "conversion-focused"];
447
+ }, {
448
+ readonly id: "task-completion";
449
+ readonly method: "judged";
450
+ readonly requiredArtifacts: readonly ["dom-snapshot"];
451
+ readonly requiresModel: true;
452
+ readonly requiresLiveDom: true;
453
+ readonly presets: readonly ["standard", "deep", "agent-ready"];
454
+ readonly create: (options: LensFactoryOptions | undefined) => Lens;
455
+ }, {
456
+ readonly id: "agent-implementation";
457
+ readonly method: "judged";
458
+ readonly requiresModel: true;
459
+ readonly requiresLiveDom: false;
460
+ readonly presets: readonly ["deep", "agent-ready"];
461
+ }, {
462
+ readonly id: "data-density";
463
+ readonly method: "judged";
464
+ readonly requiresModel: true;
465
+ readonly requiresLiveDom: false;
466
+ readonly presets: readonly ["standard", "deep"];
467
+ }, {
468
+ readonly id: "trust-and-control";
469
+ readonly method: "judged";
470
+ readonly requiresModel: true;
471
+ readonly requiresLiveDom: false;
472
+ readonly presets: readonly ["standard", "deep", "agent-ready"];
473
+ }, {
474
+ readonly id: "trust-and-credibility";
475
+ readonly method: "judged";
476
+ readonly requiresModel: true;
477
+ readonly requiresLiveDom: false;
478
+ readonly presets: readonly ["standard", "deep", "conversion-focused"];
479
+ }];
480
+ declare function selectLensExecutionPlan(input: SelectLensExecutionPlanInput): LensExecutionPlan;
481
+ declare function instantiateLensExecutionPlan(plan: LensExecutionPlan, options?: LensFactoryOptions): readonly InstantiatedLens[];
482
+ declare function synthesizeMeasuredWinsDecision(input: SynthesizeMeasuredWinsInput): SynthesisDecision;
483
+
484
+ type SurfaceCompositionGeneratedAt = string | (() => string);
485
+ type SurfaceCompositionOptions = {
486
+ readonly captureBackends?: readonly CaptureBackend[];
487
+ readonly frameworkAdapters?: readonly FrameworkAdapter[];
488
+ readonly generatedAt?: SurfaceCompositionGeneratedAt;
489
+ readonly gateEvaluator?: GateEvaluator;
490
+ readonly groundingTools?: readonly GroundingTool[];
491
+ readonly issueExporters?: readonly IssueExporter[];
492
+ readonly knowledgeRootDir?: string;
493
+ readonly knowledgeSource?: KnowledgeSource;
494
+ readonly lensFactoryOptions?: LensFactoryOptions;
495
+ readonly lensRegistry?: readonly LensRegistration[];
496
+ readonly pipelineHandlers?: Partial<Record<ExecutablePipelineStageId, PipelineStageHandler>>;
497
+ readonly projectRoot?: string;
498
+ readonly reportRenderers?: readonly ReportRenderer[];
499
+ readonly stateDir?: string;
500
+ readonly stateStore?: StateStore;
501
+ readonly staticFallback?: CaptureBackend;
502
+ };
503
+ type SurfaceComposition = {
504
+ readonly captureBackends: readonly CaptureBackend[];
505
+ readonly captureService: CaptureService;
506
+ readonly frameworkAdapters: readonly FrameworkAdapter[];
507
+ readonly gateEvaluator: GateEvaluator;
508
+ readonly groundingTools: readonly GroundingTool[];
509
+ readonly issueExporters: readonly IssueExporter[];
510
+ readonly knowledgeSource: KnowledgeSource;
511
+ readonly lensFactoryOptions: LensFactoryOptions;
512
+ readonly lensRegistry: readonly LensRegistration[];
513
+ readonly pipelineOrchestrator: PipelineOrchestrator;
514
+ readonly reportRenderers: readonly ReportRenderer[];
515
+ readonly stateStore: StateStore;
516
+ };
517
+ /**
518
+ * Build the shared core composition root consumed by interface adapters.
519
+ *
520
+ * CLI and MCP should both call this factory and then add package-local plugins
521
+ * through the option arrays. Core wires only core-owned implementations here so
522
+ * package dependencies stay one-way: plugins depend on core, never the reverse.
523
+ */
524
+ declare function createSurfaceComposition(options?: SurfaceCompositionOptions): SurfaceComposition;
525
+ declare const DEFAULT_COMPOSITION_STAGE_IDS: ("capture" | "validation" | "accessibility" | "conversion" | "persona" | "routes" | "content" | "responsiveness" | "discovery" | "heuristic" | "visual" | "cognitive-walkthrough" | "innovation" | "synthesis")[];
526
+
527
+ declare const TextInputSchema: z.ZodObject<{
528
+ path: z.ZodOptional<z.ZodString>;
529
+ contents: z.ZodOptional<z.ZodString>;
530
+ }, z.core.$strict>;
531
+ type TextInput = z.infer<typeof TextInputSchema>;
532
+ declare const DesignTokenSchema: z.ZodObject<{
533
+ name: z.ZodString;
534
+ value: z.ZodString;
535
+ }, z.core.$strict>;
536
+ type DesignToken = z.infer<typeof DesignTokenSchema>;
537
+ declare const PersonaSchema: z.ZodObject<{
538
+ goals: z.ZodDefault<z.ZodArray<z.ZodString>>;
539
+ id: z.ZodString;
540
+ priorKnowledge: z.ZodDefault<z.ZodEnum<{
541
+ "first-time": "first-time";
542
+ returning: "returning";
543
+ expert: "expert";
544
+ }>>;
545
+ }, z.core.$strict>;
546
+ type Persona = z.infer<typeof PersonaSchema>;
547
+ declare const TaskDefinitionSchema: z.ZodObject<{
548
+ conversionCritical: z.ZodDefault<z.ZodBoolean>;
549
+ id: z.ZodString;
550
+ personaId: z.ZodOptional<z.ZodString>;
551
+ steps: z.ZodDefault<z.ZodArray<z.ZodString>>;
552
+ }, z.core.$strict>;
553
+ type TaskDefinition = z.infer<typeof TaskDefinitionSchema>;
554
+ declare const ContextIngestionInputSchema: z.ZodObject<{
555
+ component: z.ZodOptional<z.ZodString>;
556
+ designTokens: z.ZodDefault<z.ZodArray<z.ZodObject<{
557
+ name: z.ZodString;
558
+ value: z.ZodString;
559
+ }, z.core.$strict>>>;
560
+ dom: z.ZodOptional<z.ZodObject<{
561
+ path: z.ZodOptional<z.ZodString>;
562
+ contents: z.ZodOptional<z.ZodString>;
563
+ }, z.core.$strict>>;
564
+ personas: z.ZodDefault<z.ZodArray<z.ZodObject<{
565
+ goals: z.ZodDefault<z.ZodArray<z.ZodString>>;
566
+ id: z.ZodString;
567
+ priorKnowledge: z.ZodDefault<z.ZodEnum<{
568
+ "first-time": "first-time";
569
+ returning: "returning";
570
+ expert: "expert";
571
+ }>>;
572
+ }, z.core.$strict>>>;
573
+ scaffoldDocs: z.ZodDefault<z.ZodArray<z.ZodObject<{
574
+ path: z.ZodOptional<z.ZodString>;
575
+ contents: z.ZodOptional<z.ZodString>;
576
+ }, z.core.$strict>>>;
577
+ screenshot: z.ZodOptional<z.ZodObject<{
578
+ path: z.ZodOptional<z.ZodString>;
579
+ contents: z.ZodOptional<z.ZodString>;
580
+ }, z.core.$strict>>;
581
+ source: z.ZodOptional<z.ZodObject<{
582
+ path: z.ZodOptional<z.ZodString>;
583
+ contents: z.ZodOptional<z.ZodString>;
584
+ }, z.core.$strict>>;
585
+ sources: z.ZodDefault<z.ZodArray<z.ZodObject<{
586
+ path: z.ZodOptional<z.ZodString>;
587
+ contents: z.ZodOptional<z.ZodString>;
588
+ }, z.core.$strict>>>;
589
+ tasks: z.ZodDefault<z.ZodArray<z.ZodObject<{
590
+ conversionCritical: z.ZodDefault<z.ZodBoolean>;
591
+ id: z.ZodString;
592
+ personaId: z.ZodOptional<z.ZodString>;
593
+ steps: z.ZodDefault<z.ZodArray<z.ZodString>>;
594
+ }, z.core.$strict>>>;
595
+ tokenDocuments: z.ZodDefault<z.ZodArray<z.ZodObject<{
596
+ path: z.ZodOptional<z.ZodString>;
597
+ contents: z.ZodOptional<z.ZodString>;
598
+ }, z.core.$strict>>>;
599
+ }, z.core.$strict>;
600
+ type ContextIngestionInput = z.input<typeof ContextIngestionInputSchema>;
601
+ type ContextInputKind = "component" | "source" | "dom" | "screenshot" | "design-tokens" | "scaffold-docs" | "persona" | "task";
602
+ interface InputProvenance {
603
+ readonly kind: ContextInputKind;
604
+ readonly ref: string;
605
+ readonly present: true;
606
+ readonly recordedAt: string;
607
+ readonly sha256?: string;
608
+ }
609
+ interface IngestedContext {
610
+ readonly designTokens: readonly DesignToken[];
611
+ readonly dom?: SourceFileRef;
612
+ readonly personas: readonly Persona[];
613
+ readonly scaffoldDocs: readonly SourceFileRef[];
614
+ readonly screenshot?: SourceFileRef;
615
+ readonly sources: readonly SourceFileRef[];
616
+ readonly tasks: readonly TaskDefinition[];
617
+ }
618
+ interface ContextIngestion {
619
+ readonly componentMap: ComponentMap;
620
+ readonly context: IngestedContext;
621
+ readonly findings: readonly FindingDraft[];
622
+ readonly provenance: readonly InputProvenance[];
623
+ readonly target: Target;
624
+ }
625
+ type ContextIngestorClock = () => string;
626
+ interface ContextIngestorOptions {
627
+ readonly adapters?: readonly FrameworkAdapter[];
628
+ readonly artifactWriter?: ArtifactWriter;
629
+ readonly clock?: ContextIngestorClock;
630
+ readonly projectRoot?: string;
631
+ }
632
+ interface ContextIngestor {
633
+ ingest(input: ContextIngestionInput): Promise<Result<ContextIngestion, SurfaceError>>;
634
+ }
635
+ /**
636
+ * Creates a static/context ingestion service that constructs a stable Target and provenance.
637
+ */
638
+ declare function createContextIngestor(options?: ContextIngestorOptions): ContextIngestor;
639
+
640
+ type ContentMicrocopyLensOptions = {
641
+ readonly maxReadingGrade?: number;
642
+ readonly minWords?: number;
643
+ readonly projectRoot?: string;
644
+ };
645
+ declare function createContentMicrocopyLens(options?: ContentMicrocopyLensOptions): Lens;
646
+
647
+ type DiscoveryRunInput = {
648
+ readonly appTypeOverride?: AppType;
649
+ readonly config?: SurfaceConfig;
650
+ readonly personaHint?: string;
651
+ readonly routeCandidates?: readonly string[];
652
+ readonly routeCap?: number;
653
+ readonly runId: string;
654
+ readonly target: Target;
655
+ readonly taskHint?: string;
656
+ };
657
+ declare const RouteInventoryEntrySchema: z.ZodObject<{
658
+ path: z.ZodString;
659
+ source: z.ZodEnum<{
660
+ candidate: "candidate";
661
+ target: "target";
662
+ }>;
663
+ }, z.core.$strict>;
664
+ type RouteInventoryEntry = z.infer<typeof RouteInventoryEntrySchema>;
665
+ declare const RouteSkippedSchema: z.ZodObject<{
666
+ path: z.ZodString;
667
+ reason: z.ZodLiteral<"route_cap_exceeded">;
668
+ source: z.ZodEnum<{
669
+ candidate: "candidate";
670
+ target: "target";
671
+ }>;
672
+ }, z.core.$strict>;
673
+ type RouteSkipped = z.infer<typeof RouteSkippedSchema>;
674
+ declare const RouteInventorySchema: z.ZodObject<{
675
+ cap: z.ZodNumber;
676
+ routes: z.ZodArray<z.ZodObject<{
677
+ path: z.ZodString;
678
+ source: z.ZodEnum<{
679
+ candidate: "candidate";
680
+ target: "target";
681
+ }>;
682
+ }, z.core.$strict>>;
683
+ skipped: z.ZodArray<z.ZodObject<{
684
+ path: z.ZodString;
685
+ reason: z.ZodLiteral<"route_cap_exceeded">;
686
+ source: z.ZodEnum<{
687
+ candidate: "candidate";
688
+ target: "target";
689
+ }>;
690
+ }, z.core.$strict>>;
691
+ }, z.core.$strict>;
692
+ type RouteInventory = z.infer<typeof RouteInventorySchema>;
693
+ declare const PersonaTaskSchema: z.ZodObject<{
694
+ persona: z.ZodString;
695
+ task: z.ZodString;
696
+ }, z.core.$strict>;
697
+ type PersonaTask = z.infer<typeof PersonaTaskSchema>;
698
+ declare const AppTypeClassificationSchema: z.ZodObject<{
699
+ appType: z.ZodEnum<{
700
+ generic: "generic";
701
+ "saas-dashboard": "saas-dashboard";
702
+ "e-commerce": "e-commerce";
703
+ marketing: "marketing";
704
+ admin: "admin";
705
+ "content-media": "content-media";
706
+ }>;
707
+ matchedSignals: z.ZodArray<z.ZodString>;
708
+ source: z.ZodEnum<{
709
+ config: "config";
710
+ "route-inventory": "route-inventory";
711
+ "target-ref": "target-ref";
712
+ "generic-fallback": "generic-fallback";
713
+ }>;
714
+ }, z.core.$strict>;
715
+ type AppTypeClassification = z.infer<typeof AppTypeClassificationSchema>;
716
+ declare const DiscoveryEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
717
+ type: z.ZodLiteral<"AppTypeClassified">;
718
+ appType: z.ZodEnum<{
719
+ generic: "generic";
720
+ "saas-dashboard": "saas-dashboard";
721
+ "e-commerce": "e-commerce";
722
+ marketing: "marketing";
723
+ admin: "admin";
724
+ "content-media": "content-media";
725
+ }>;
726
+ overlayId: z.ZodEnum<{
727
+ generic: "generic";
728
+ "saas-dashboard": "saas-dashboard";
729
+ "e-commerce": "e-commerce";
730
+ marketing: "marketing";
731
+ admin: "admin";
732
+ "content-media": "content-media";
733
+ }>;
734
+ runId: z.ZodString;
735
+ }, z.core.$strict>, z.ZodObject<{
736
+ type: z.ZodLiteral<"RoutesSkipped">;
737
+ cap: z.ZodNumber;
738
+ runId: z.ZodString;
739
+ skipped: z.ZodArray<z.ZodObject<{
740
+ path: z.ZodString;
741
+ reason: z.ZodLiteral<"route_cap_exceeded">;
742
+ source: z.ZodEnum<{
743
+ candidate: "candidate";
744
+ target: "target";
745
+ }>;
746
+ }, z.core.$strict>>;
747
+ }, z.core.$strict>], "type">;
748
+ type DiscoveryEvent = z.infer<typeof DiscoveryEventSchema>;
749
+ declare const DiscoveryResultSchema: z.ZodObject<{
750
+ appType: z.ZodEnum<{
751
+ generic: "generic";
752
+ "saas-dashboard": "saas-dashboard";
753
+ "e-commerce": "e-commerce";
754
+ marketing: "marketing";
755
+ admin: "admin";
756
+ "content-media": "content-media";
757
+ }>;
758
+ classification: z.ZodObject<{
759
+ appType: z.ZodEnum<{
760
+ generic: "generic";
761
+ "saas-dashboard": "saas-dashboard";
762
+ "e-commerce": "e-commerce";
763
+ marketing: "marketing";
764
+ admin: "admin";
765
+ "content-media": "content-media";
766
+ }>;
767
+ matchedSignals: z.ZodArray<z.ZodString>;
768
+ source: z.ZodEnum<{
769
+ config: "config";
770
+ "route-inventory": "route-inventory";
771
+ "target-ref": "target-ref";
772
+ "generic-fallback": "generic-fallback";
773
+ }>;
774
+ }, z.core.$strict>;
775
+ events: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
776
+ type: z.ZodLiteral<"AppTypeClassified">;
777
+ appType: z.ZodEnum<{
778
+ generic: "generic";
779
+ "saas-dashboard": "saas-dashboard";
780
+ "e-commerce": "e-commerce";
781
+ marketing: "marketing";
782
+ admin: "admin";
783
+ "content-media": "content-media";
784
+ }>;
785
+ overlayId: z.ZodEnum<{
786
+ generic: "generic";
787
+ "saas-dashboard": "saas-dashboard";
788
+ "e-commerce": "e-commerce";
789
+ marketing: "marketing";
790
+ admin: "admin";
791
+ "content-media": "content-media";
792
+ }>;
793
+ runId: z.ZodString;
794
+ }, z.core.$strict>, z.ZodObject<{
795
+ type: z.ZodLiteral<"RoutesSkipped">;
796
+ cap: z.ZodNumber;
797
+ runId: z.ZodString;
798
+ skipped: z.ZodArray<z.ZodObject<{
799
+ path: z.ZodString;
800
+ reason: z.ZodLiteral<"route_cap_exceeded">;
801
+ source: z.ZodEnum<{
802
+ candidate: "candidate";
803
+ target: "target";
804
+ }>;
805
+ }, z.core.$strict>>;
806
+ }, z.core.$strict>], "type">>;
807
+ overlayId: z.ZodEnum<{
808
+ generic: "generic";
809
+ "saas-dashboard": "saas-dashboard";
810
+ "e-commerce": "e-commerce";
811
+ marketing: "marketing";
812
+ admin: "admin";
813
+ "content-media": "content-media";
814
+ }>;
815
+ personaTask: z.ZodObject<{
816
+ persona: z.ZodString;
817
+ task: z.ZodString;
818
+ }, z.core.$strict>;
819
+ routeInventory: z.ZodObject<{
820
+ cap: z.ZodNumber;
821
+ routes: z.ZodArray<z.ZodObject<{
822
+ path: z.ZodString;
823
+ source: z.ZodEnum<{
824
+ candidate: "candidate";
825
+ target: "target";
826
+ }>;
827
+ }, z.core.$strict>>;
828
+ skipped: z.ZodArray<z.ZodObject<{
829
+ path: z.ZodString;
830
+ reason: z.ZodLiteral<"route_cap_exceeded">;
831
+ source: z.ZodEnum<{
832
+ candidate: "candidate";
833
+ target: "target";
834
+ }>;
835
+ }, z.core.$strict>>;
836
+ }, z.core.$strict>;
837
+ runId: z.ZodString;
838
+ }, z.core.$loose>;
839
+ type DiscoveryResult = z.infer<typeof DiscoveryResultSchema>;
840
+ declare function runDiscovery(input: DiscoveryRunInput, options?: {
841
+ readonly stateStore?: StateStore;
842
+ }): Promise<Result<DiscoveryResult, SurfaceError>>;
843
+
844
+ declare const REDACTED_EXPORT_VALUE = "[Redacted]";
845
+ declare function redactExportString(value: string, redactionRules: readonly RedactionRule[] | undefined): Result<string, SurfaceError>;
846
+ declare function redactExportValue<T>(value: T, redactionRules: readonly RedactionRule[] | undefined): Result<T, SurfaceError>;
847
+
848
+ type CognitivePersona = {
849
+ readonly goals: readonly string[];
850
+ readonly id: string;
851
+ readonly priorKnowledge: "first-time" | "returning" | "expert";
852
+ };
853
+ type CognitiveTaskDefinition = {
854
+ readonly conversionCritical: boolean;
855
+ readonly id: string;
856
+ readonly persona: CognitivePersona;
857
+ readonly steps: readonly string[];
858
+ };
859
+ type TaskCompletionLensOptions = LensFactoryOptions & {
860
+ readonly task?: CognitiveTaskDefinition;
861
+ };
862
+ type ConversionLensOptions = LensFactoryOptions & {
863
+ readonly conversionPath?: string;
864
+ };
865
+ declare function createTaskCompletionLens(options?: TaskCompletionLensOptions): Lens;
866
+ declare function createConversionLens(options?: ConversionLensOptions): Lens;
867
+
868
+ /** Create the default release gate evaluator for measured findings. */
869
+ declare function createGateEvaluator(): GateEvaluator;
870
+
871
+ type FindingsJsonRendererOptions = {
872
+ readonly generatedAt: string;
873
+ readonly degradation?: FindingsEnvelope["degradation"];
874
+ readonly redactionRules?: readonly RedactionRule[];
875
+ };
876
+ type ReportRendererRedactionOptions = {
877
+ readonly redactionRules?: readonly RedactionRule[];
878
+ };
879
+ declare const SurfaceSarifLogSchema: z.ZodObject<{
880
+ $schema: z.ZodString;
881
+ version: z.ZodLiteral<"2.1.0">;
882
+ runs: z.ZodArray<z.ZodObject<{
883
+ tool: z.ZodObject<{
884
+ driver: z.ZodObject<{
885
+ name: z.ZodLiteral<"surface">;
886
+ informationUri: z.ZodString;
887
+ rules: z.ZodArray<z.ZodObject<{
888
+ id: z.ZodString;
889
+ name: z.ZodString;
890
+ shortDescription: z.ZodObject<{
891
+ text: z.ZodString;
892
+ }, z.core.$strict>;
893
+ }, z.core.$loose>>;
894
+ }, z.core.$loose>;
895
+ }, z.core.$loose>;
896
+ results: z.ZodArray<z.ZodObject<{
897
+ level: z.ZodEnum<{
898
+ error: "error";
899
+ warning: "warning";
900
+ note: "note";
901
+ }>;
902
+ message: z.ZodObject<{
903
+ text: z.ZodString;
904
+ }, z.core.$strict>;
905
+ ruleId: z.ZodString;
906
+ }, z.core.$loose>>;
907
+ }, z.core.$loose>>;
908
+ }, z.core.$loose>;
909
+ type SurfaceSarifLog = z.infer<typeof SurfaceSarifLogSchema>;
910
+ type ReportArtifactSpec = {
911
+ readonly renderer: ReportRenderer;
912
+ readonly relativePath: string;
913
+ };
914
+ type WrittenReportArtifact = {
915
+ readonly artifact: PersistedArtifactRef;
916
+ readonly report: Report;
917
+ readonly relativePath: string;
918
+ };
919
+ type RenderAndWriteReportArtifactsOptions = {
920
+ readonly stateStore: StateStore;
921
+ readonly findings: readonly Finding[];
922
+ readonly backlog: Backlog;
923
+ readonly specs?: readonly ReportArtifactSpec[];
924
+ };
925
+ type ExplainRendererOptions = {
926
+ readonly findingId: string;
927
+ readonly knowledge?: KnowledgeSource;
928
+ readonly redactionRules?: readonly RedactionRule[];
929
+ };
930
+ type AlternativeProposal = {
931
+ readonly id: string;
932
+ readonly rationale: string;
933
+ readonly title: string;
934
+ };
935
+ type AlternativesReportData = {
936
+ readonly proposals: readonly AlternativeProposal[];
937
+ readonly target: Target;
938
+ };
939
+ type AlternativesRendererOptions = ReportRendererRedactionOptions & {
940
+ readonly proposals?: readonly AlternativeProposal[];
941
+ readonly target: Target;
942
+ };
943
+ type DiffRendererOptions = ReportRendererRedactionOptions & {
944
+ readonly afterRunId: string;
945
+ readonly beforeRunId: string;
946
+ readonly diff: TrackedFindingsDiff;
947
+ };
948
+ declare function createFindingsJsonRenderer(options: FindingsJsonRendererOptions): ReportRenderer;
949
+ declare function createSarifRenderer(options?: ReportRendererRedactionOptions): ReportRenderer;
950
+ declare function createFindingsMarkdownRenderer(options?: ReportRendererRedactionOptions): ReportRenderer;
951
+ declare function createBacklogMarkdownRenderer(options?: ReportRendererRedactionOptions): ReportRenderer;
952
+ declare function createAgentPlanMarkdownRenderer(options?: ReportRendererRedactionOptions): ReportRenderer;
953
+ declare function createValidationReportMarkdownRenderer(options?: ReportRendererRedactionOptions): ReportRenderer;
954
+ declare function createExplainMarkdownRenderer(options: ExplainRendererOptions): ReportRenderer;
955
+ declare function createExplainJsonRenderer(options: ExplainRendererOptions): ReportRenderer;
956
+ declare function createAlternativesJsonRenderer(options: AlternativesRendererOptions): ReportRenderer;
957
+ declare function createDiffJsonRenderer(options: DiffRendererOptions): ReportRenderer;
958
+ declare function createBoundedAlternatives(target: Target, proposals?: readonly AlternativeProposal[]): AlternativesReportData;
959
+ declare function defaultPlanningReportArtifactSpecs(options?: ReportRendererRedactionOptions): readonly ReportArtifactSpec[];
960
+ declare function renderAndWriteReportArtifacts(options: RenderAndWriteReportArtifactsOptions): Promise<Result<readonly WrittenReportArtifact[], SurfaceError>>;
961
+
962
+ type GitHubCheckAnnotation = {
963
+ readonly path: string;
964
+ readonly start_line: number;
965
+ readonly end_line: number;
966
+ readonly annotation_level: "failure" | "notice" | "warning";
967
+ readonly message: string;
968
+ readonly title?: string;
969
+ readonly raw_details?: string;
970
+ };
971
+ type GitHubCheckCreateInput = {
972
+ readonly owner: string;
973
+ readonly repo: string;
974
+ readonly name: string;
975
+ readonly head_sha: string;
976
+ readonly status: "completed";
977
+ readonly conclusion: "failure" | "neutral" | "success";
978
+ readonly output: {
979
+ readonly title: string;
980
+ readonly summary: string;
981
+ readonly annotations?: GitHubCheckAnnotation[];
982
+ };
983
+ };
984
+ type GitHubChecksClient = {
985
+ readonly checks: {
986
+ create(input: GitHubCheckCreateInput): Promise<unknown>;
987
+ };
988
+ };
989
+ type GitHubChecksExporterOptions = {
990
+ readonly owner: string;
991
+ readonly repo: string;
992
+ readonly headSha: string;
993
+ readonly token?: string;
994
+ readonly checkName?: string;
995
+ readonly userAgent?: string;
996
+ readonly client?: GitHubChecksClient;
997
+ readonly maxAnnotations?: number;
998
+ readonly redactionRules?: readonly RedactionRule[];
999
+ };
1000
+ type GitHubChecksExportInput = {
1001
+ readonly backlog: Backlog;
1002
+ readonly sarif: SurfaceSarifLog;
1003
+ readonly localArtifactPath?: string;
1004
+ };
1005
+ type GitHubChecksExport = {
1006
+ readonly id: string;
1007
+ readonly target: "github-checks";
1008
+ readonly status: "complete" | "failed";
1009
+ readonly synced: readonly string[];
1010
+ readonly unsynced: readonly string[];
1011
+ readonly annotationCount: number;
1012
+ readonly checkName: string;
1013
+ };
1014
+ declare function createGitHubChecksExporter(options: GitHubChecksExporterOptions): {
1015
+ target: "github-checks";
1016
+ export: (input: GitHubChecksExportInput) => Promise<Result<GitHubChecksExport, SurfaceError>>;
1017
+ };
1018
+
1019
+ type GitHubIssueCreateInput = {
1020
+ readonly owner: string;
1021
+ readonly repo: string;
1022
+ readonly title: string;
1023
+ readonly body: string;
1024
+ labels?: string[];
1025
+ };
1026
+ type GitHubIssueClient = {
1027
+ readonly issues: {
1028
+ create(input: GitHubIssueCreateInput): Promise<unknown>;
1029
+ };
1030
+ };
1031
+ type GitHubIssueExporterOptions = {
1032
+ readonly owner: string;
1033
+ readonly repo: string;
1034
+ readonly token?: string;
1035
+ readonly userAgent?: string;
1036
+ readonly projectRoot?: string;
1037
+ readonly labels?: readonly string[];
1038
+ readonly client?: GitHubIssueClient;
1039
+ readonly maxAttempts?: number;
1040
+ readonly initialBackoffMs?: number;
1041
+ readonly wait?: (milliseconds: number) => Promise<void>;
1042
+ readonly redactionRules?: readonly RedactionRule[];
1043
+ };
1044
+ declare function createGitHubIssueExporter(options: GitHubIssueExporterOptions): IssueExporter;
1045
+
1046
+ declare const KnowledgeCategorySchema: z.ZodEnum<{
1047
+ "e-commerce": "e-commerce";
1048
+ admin: "admin";
1049
+ "core-heuristics": "core-heuristics";
1050
+ accessibility: "accessibility";
1051
+ forms: "forms";
1052
+ navigation: "navigation";
1053
+ states: "states";
1054
+ "visual-content": "visual-content";
1055
+ "design-systems": "design-systems";
1056
+ conversion: "conversion";
1057
+ "platform-web": "platform-web";
1058
+ "agent-implementation": "agent-implementation";
1059
+ dashboards: "dashboards";
1060
+ "data-viz": "data-viz";
1061
+ "saas-onboarding": "saas-onboarding";
1062
+ "search-discovery": "search-discovery";
1063
+ "trust-safety": "trust-safety";
1064
+ i18n: "i18n";
1065
+ }>;
1066
+ declare const FreshnessVolatilitySchema: z.ZodEnum<{
1067
+ stable: "stable";
1068
+ evolving: "evolving";
1069
+ volatile: "volatile";
1070
+ }>;
1071
+ declare const CitationSchema: z.ZodObject<{
1072
+ source: z.ZodString;
1073
+ url: z.ZodOptional<z.ZodString>;
1074
+ retrievedAt: z.ZodPreprocess<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>;
1075
+ }, z.core.$strict>;
1076
+ declare const FreshnessSchema: z.ZodObject<{
1077
+ volatility: z.ZodEnum<{
1078
+ stable: "stable";
1079
+ evolving: "evolving";
1080
+ volatile: "volatile";
1081
+ }>;
1082
+ lastReviewed: z.ZodPreprocess<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>;
1083
+ }, z.core.$strict>;
1084
+ type FileSystemKnowledgeSourceOptions = {
1085
+ readonly rootDir: string;
1086
+ readonly includeDrafts?: boolean;
1087
+ };
1088
+ declare function createFileSystemKnowledgeSource(options: FileSystemKnowledgeSourceOptions): KnowledgeSource;
1089
+ declare function loadKnowledgeEntries(options: FileSystemKnowledgeSourceOptions): Promise<Result<readonly KnowledgeEntry[], SurfaceError>>;
1090
+ declare function queryKnowledgeEntries(entries: readonly KnowledgeEntry[], relevanceQuery: RelevanceQuery): readonly KnowledgeEntry[];
1091
+
1092
+ declare const LIGHTHOUSE_ACCESSIBILITY_AUDIT_IDS: readonly ["accesskeys", "aria-allowed-attr", "aria-allowed-role", "aria-command-name", "aria-conditional-attr", "aria-deprecated-role", "aria-dialog-name", "aria-hidden-body", "aria-hidden-focus", "aria-input-field-name", "aria-meter-name", "aria-progressbar-name", "aria-prohibited-attr", "aria-required-attr", "aria-required-children", "aria-required-parent", "aria-roles", "aria-text", "aria-toggle-field-name", "aria-tooltip-name", "aria-treeitem-name", "aria-valid-attr-value", "aria-valid-attr", "button-name", "bypass", "color-contrast", "definition-list", "dlitem", "document-title", "duplicate-id-aria", "form-field-multiple-labels", "frame-title", "heading-order", "html-has-lang", "html-lang-valid", "html-xml-lang-mismatch", "image-alt", "image-redundant-alt", "input-button-name", "input-image-alt", "label", "link-in-text-block", "link-name", "list", "listitem", "meta-refresh", "meta-viewport", "object-alt", "select-name", "skip-link", "tabindex", "table-duplicate-name", "target-size", "td-headers-attr", "th-has-data-cells", "valid-lang", "video-caption", "focusable-controls", "interactive-element-affordance", "logical-tab-order", "visual-order-follows-dom", "focus-traps", "managed-focus", "use-landmarks", "offscreen-content-hidden", "custom-controls-labels", "custom-controls-roles", "empty-heading", "identical-links-same-purpose", "landmark-one-main", "label-content-name-mismatch", "table-fake-caption", "td-has-header"];
1093
+
1094
+ /**
1095
+ * Privacy-first pino wrapper for surface packages.
1096
+ *
1097
+ * Redaction has two layers: semantic field names such as `token` keep the key and redact the
1098
+ * value, while key names that themselves contain credential material are replaced with
1099
+ * `[RedactedKey]`. Values are traversed defensively with circular detection, hostile getters are
1100
+ * treated as sensitive, and string content is sanitized for URLs, bearer/API tokens, private keys,
1101
+ * and common opaque credential placeholders before pino serializes the log line.
1102
+ */
1103
+ declare const REDACTED_LOG_VALUE = "[Redacted]";
1104
+ declare const REDACTED_LOG_KEY = "[RedactedKey]";
1105
+ declare const CIRCULAR_LOG_VALUE = "[Circular]";
1106
+ declare const TRUNCATED_LOG_VALUE = "[Truncated]";
1107
+ type SurfaceLogFields = Record<string, unknown>;
1108
+ type CreateSurfaceLoggerOptions = {
1109
+ readonly level?: string;
1110
+ readonly runId?: string;
1111
+ readonly stream?: DestinationStream;
1112
+ };
1113
+ /**
1114
+ * Return a log-safe copy that removes captured content and credential-shaped fields.
1115
+ */
1116
+ declare function sanitizeLogFields(fields: SurfaceLogFields): SurfaceLogFields;
1117
+ /**
1118
+ * Create the structured pino logger used by surface libraries.
1119
+ *
1120
+ * The logger is intentionally opinionated: it writes privacy-safe JSON with ISO timestamps
1121
+ * and sanitizes base fields, child bindings, object-first logs, and formatted arguments.
1122
+ */
1123
+ declare function createSurfaceLogger(options?: CreateSurfaceLoggerOptions): Logger;
1124
+
1125
+ type TaskFlowStep = {
1126
+ readonly id: string;
1127
+ readonly target: Target;
1128
+ };
1129
+ type TaskFlowCaptureRecipe = {
1130
+ readonly id: string;
1131
+ readonly steps: readonly TaskFlowStep[];
1132
+ readonly themes?: readonly Theme[];
1133
+ };
1134
+ type CaptureContext = {
1135
+ readonly stateId: string;
1136
+ readonly theme?: Theme;
1137
+ };
1138
+ type TaskFlowCapturedState = CaptureContext & {
1139
+ readonly capture: Capture;
1140
+ };
1141
+ type TaskFlowUnreachableStep = CaptureContext & {
1142
+ readonly reason: string;
1143
+ readonly target: Target;
1144
+ };
1145
+ type TaskFlowCaptureResult = {
1146
+ readonly recipeId: string;
1147
+ readonly captures: readonly TaskFlowCapturedState[];
1148
+ readonly unreachable: readonly TaskFlowUnreachableStep[];
1149
+ readonly status: "completed" | "degraded";
1150
+ };
1151
+ type RunTaskFlowCaptureInput = {
1152
+ readonly captureOptions: CaptureOptions;
1153
+ readonly recipe: TaskFlowCaptureRecipe;
1154
+ readonly service: CaptureService;
1155
+ };
1156
+ type CaptureContextFinding = Finding & {
1157
+ readonly captureContext: CaptureContext;
1158
+ readonly tags: string[];
1159
+ };
1160
+ declare function runTaskFlowCapture(input: RunTaskFlowCaptureInput): Promise<Result<TaskFlowCaptureResult>>;
1161
+ declare function tagFindingsWithCaptureContext(findings: readonly Finding[], context: CaptureContext): readonly CaptureContextFinding[];
1162
+
1163
+ declare const ReconciliationUnavailableReasonSchema: z.ZodEnum<{
1164
+ model_unavailable: "model_unavailable";
1165
+ channel_unavailable: "channel_unavailable";
1166
+ }>;
1167
+ type ReconciliationUnavailableReason = z.infer<typeof ReconciliationUnavailableReasonSchema>;
1168
+ declare const ReconciliationChannelSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
1169
+ id: z.ZodString;
1170
+ status: z.ZodLiteral<"available">;
1171
+ findings: z.ZodArray<z.ZodObject<{
1172
+ id: z.ZodString;
1173
+ lens: z.ZodString;
1174
+ issueType: z.ZodString;
1175
+ method: z.ZodEnum<{
1176
+ measured: "measured";
1177
+ judged: "judged";
1178
+ }>;
1179
+ title: z.ZodString;
1180
+ rationale: z.ZodString;
1181
+ citedHeuristics: z.ZodArray<z.ZodString>;
1182
+ evidence: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
1183
+ kind: z.ZodLiteral<"tool-result">;
1184
+ tool: z.ZodEnum<{
1185
+ axe: "axe";
1186
+ lighthouse: "lighthouse";
1187
+ "eslint-jsx-a11y": "eslint-jsx-a11y";
1188
+ backend: "backend";
1189
+ "context-ingestor": "context-ingestor";
1190
+ }>;
1191
+ rule: z.ZodString;
1192
+ measuredValue: z.ZodString;
1193
+ threshold: z.ZodOptional<z.ZodString>;
1194
+ }, z.core.$strict>, z.ZodObject<{
1195
+ kind: z.ZodLiteral<"dom">;
1196
+ selector: z.ZodString;
1197
+ elementRef: z.ZodOptional<z.ZodString>;
1198
+ }, z.core.$strict>, z.ZodObject<{
1199
+ kind: z.ZodLiteral<"screenshot-region">;
1200
+ artifactId: z.ZodString;
1201
+ rect: z.ZodObject<{
1202
+ x: z.ZodNumber;
1203
+ y: z.ZodNumber;
1204
+ width: z.ZodNumber;
1205
+ height: z.ZodNumber;
1206
+ }, z.core.$strict>;
1207
+ }, z.core.$strict>, z.ZodObject<{
1208
+ kind: z.ZodLiteral<"cited-heuristic">;
1209
+ knowledgeEntryId: z.ZodString;
1210
+ }, z.core.$strict>], "kind">>;
1211
+ dimensions: z.ZodObject<{
1212
+ severity: z.ZodNumber;
1213
+ confidence: z.ZodNumber;
1214
+ effort: z.ZodNumber;
1215
+ userImpact: z.ZodNumber;
1216
+ businessImpact: z.ZodNumber;
1217
+ a11yLegalRisk: z.ZodNumber;
1218
+ evidenceQuality: z.ZodNumber;
1219
+ agentImplementability: z.ZodNumber;
1220
+ }, z.core.$strict>;
1221
+ severityBand: z.ZodEnum<{
1222
+ P0: "P0";
1223
+ P1: "P1";
1224
+ P2: "P2";
1225
+ P3: "P3";
1226
+ }>;
1227
+ location: z.ZodObject<{
1228
+ file: z.ZodOptional<z.ZodString>;
1229
+ component: z.ZodOptional<z.ZodString>;
1230
+ selector: z.ZodOptional<z.ZodString>;
1231
+ elementRef: z.ZodOptional<z.ZodString>;
1232
+ }, z.core.$strict>;
1233
+ confidenceBand: z.ZodEnum<{
1234
+ assert: "assert";
1235
+ "surface-as-question": "surface-as-question";
1236
+ "suppress-unless-deep": "suppress-unless-deep";
1237
+ }>;
1238
+ gatedForHuman: z.ZodBoolean;
1239
+ suggestedPatch: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
1240
+ kind: z.ZodLiteral<"contrast-hex">;
1241
+ change: z.ZodString;
1242
+ }, z.core.$strict>, z.ZodObject<{
1243
+ kind: z.ZodLiteral<"aria-attribute">;
1244
+ change: z.ZodString;
1245
+ }, z.core.$strict>, z.ZodObject<{
1246
+ kind: z.ZodLiteral<"target-size">;
1247
+ change: z.ZodString;
1248
+ }, z.core.$strict>], "kind">>;
1249
+ tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
1250
+ }, z.core.$strict>>;
1251
+ }, z.core.$strict>, z.ZodObject<{
1252
+ id: z.ZodString;
1253
+ status: z.ZodLiteral<"unavailable">;
1254
+ reason: z.ZodEnum<{
1255
+ model_unavailable: "model_unavailable";
1256
+ channel_unavailable: "channel_unavailable";
1257
+ }>;
1258
+ message: z.ZodString;
1259
+ }, z.core.$strict>], "status">;
1260
+ type ReconciliationChannel = z.infer<typeof ReconciliationChannelSchema>;
1261
+ declare const ReconciliationInputSchema: z.ZodObject<{
1262
+ channels: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
1263
+ id: z.ZodString;
1264
+ status: z.ZodLiteral<"available">;
1265
+ findings: z.ZodArray<z.ZodObject<{
1266
+ id: z.ZodString;
1267
+ lens: z.ZodString;
1268
+ issueType: z.ZodString;
1269
+ method: z.ZodEnum<{
1270
+ measured: "measured";
1271
+ judged: "judged";
1272
+ }>;
1273
+ title: z.ZodString;
1274
+ rationale: z.ZodString;
1275
+ citedHeuristics: z.ZodArray<z.ZodString>;
1276
+ evidence: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
1277
+ kind: z.ZodLiteral<"tool-result">;
1278
+ tool: z.ZodEnum<{
1279
+ axe: "axe";
1280
+ lighthouse: "lighthouse";
1281
+ "eslint-jsx-a11y": "eslint-jsx-a11y";
1282
+ backend: "backend";
1283
+ "context-ingestor": "context-ingestor";
1284
+ }>;
1285
+ rule: z.ZodString;
1286
+ measuredValue: z.ZodString;
1287
+ threshold: z.ZodOptional<z.ZodString>;
1288
+ }, z.core.$strict>, z.ZodObject<{
1289
+ kind: z.ZodLiteral<"dom">;
1290
+ selector: z.ZodString;
1291
+ elementRef: z.ZodOptional<z.ZodString>;
1292
+ }, z.core.$strict>, z.ZodObject<{
1293
+ kind: z.ZodLiteral<"screenshot-region">;
1294
+ artifactId: z.ZodString;
1295
+ rect: z.ZodObject<{
1296
+ x: z.ZodNumber;
1297
+ y: z.ZodNumber;
1298
+ width: z.ZodNumber;
1299
+ height: z.ZodNumber;
1300
+ }, z.core.$strict>;
1301
+ }, z.core.$strict>, z.ZodObject<{
1302
+ kind: z.ZodLiteral<"cited-heuristic">;
1303
+ knowledgeEntryId: z.ZodString;
1304
+ }, z.core.$strict>], "kind">>;
1305
+ dimensions: z.ZodObject<{
1306
+ severity: z.ZodNumber;
1307
+ confidence: z.ZodNumber;
1308
+ effort: z.ZodNumber;
1309
+ userImpact: z.ZodNumber;
1310
+ businessImpact: z.ZodNumber;
1311
+ a11yLegalRisk: z.ZodNumber;
1312
+ evidenceQuality: z.ZodNumber;
1313
+ agentImplementability: z.ZodNumber;
1314
+ }, z.core.$strict>;
1315
+ severityBand: z.ZodEnum<{
1316
+ P0: "P0";
1317
+ P1: "P1";
1318
+ P2: "P2";
1319
+ P3: "P3";
1320
+ }>;
1321
+ location: z.ZodObject<{
1322
+ file: z.ZodOptional<z.ZodString>;
1323
+ component: z.ZodOptional<z.ZodString>;
1324
+ selector: z.ZodOptional<z.ZodString>;
1325
+ elementRef: z.ZodOptional<z.ZodString>;
1326
+ }, z.core.$strict>;
1327
+ confidenceBand: z.ZodEnum<{
1328
+ assert: "assert";
1329
+ "surface-as-question": "surface-as-question";
1330
+ "suppress-unless-deep": "suppress-unless-deep";
1331
+ }>;
1332
+ gatedForHuman: z.ZodBoolean;
1333
+ suggestedPatch: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
1334
+ kind: z.ZodLiteral<"contrast-hex">;
1335
+ change: z.ZodString;
1336
+ }, z.core.$strict>, z.ZodObject<{
1337
+ kind: z.ZodLiteral<"aria-attribute">;
1338
+ change: z.ZodString;
1339
+ }, z.core.$strict>, z.ZodObject<{
1340
+ kind: z.ZodLiteral<"target-size">;
1341
+ change: z.ZodString;
1342
+ }, z.core.$strict>], "kind">>;
1343
+ tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
1344
+ }, z.core.$strict>>;
1345
+ }, z.core.$strict>, z.ZodObject<{
1346
+ id: z.ZodString;
1347
+ status: z.ZodLiteral<"unavailable">;
1348
+ reason: z.ZodEnum<{
1349
+ model_unavailable: "model_unavailable";
1350
+ channel_unavailable: "channel_unavailable";
1351
+ }>;
1352
+ message: z.ZodString;
1353
+ }, z.core.$strict>], "status">>;
1354
+ }, z.core.$strict>;
1355
+ type ReconciliationInput = z.infer<typeof ReconciliationInputSchema>;
1356
+ declare const ReconciledFindingSchema: z.ZodObject<{
1357
+ canonicalFindingId: z.ZodString;
1358
+ finding: z.ZodObject<{
1359
+ id: z.ZodString;
1360
+ lens: z.ZodString;
1361
+ issueType: z.ZodString;
1362
+ method: z.ZodEnum<{
1363
+ measured: "measured";
1364
+ judged: "judged";
1365
+ }>;
1366
+ title: z.ZodString;
1367
+ rationale: z.ZodString;
1368
+ citedHeuristics: z.ZodArray<z.ZodString>;
1369
+ evidence: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
1370
+ kind: z.ZodLiteral<"tool-result">;
1371
+ tool: z.ZodEnum<{
1372
+ axe: "axe";
1373
+ lighthouse: "lighthouse";
1374
+ "eslint-jsx-a11y": "eslint-jsx-a11y";
1375
+ backend: "backend";
1376
+ "context-ingestor": "context-ingestor";
1377
+ }>;
1378
+ rule: z.ZodString;
1379
+ measuredValue: z.ZodString;
1380
+ threshold: z.ZodOptional<z.ZodString>;
1381
+ }, z.core.$strict>, z.ZodObject<{
1382
+ kind: z.ZodLiteral<"dom">;
1383
+ selector: z.ZodString;
1384
+ elementRef: z.ZodOptional<z.ZodString>;
1385
+ }, z.core.$strict>, z.ZodObject<{
1386
+ kind: z.ZodLiteral<"screenshot-region">;
1387
+ artifactId: z.ZodString;
1388
+ rect: z.ZodObject<{
1389
+ x: z.ZodNumber;
1390
+ y: z.ZodNumber;
1391
+ width: z.ZodNumber;
1392
+ height: z.ZodNumber;
1393
+ }, z.core.$strict>;
1394
+ }, z.core.$strict>, z.ZodObject<{
1395
+ kind: z.ZodLiteral<"cited-heuristic">;
1396
+ knowledgeEntryId: z.ZodString;
1397
+ }, z.core.$strict>], "kind">>;
1398
+ dimensions: z.ZodObject<{
1399
+ severity: z.ZodNumber;
1400
+ confidence: z.ZodNumber;
1401
+ effort: z.ZodNumber;
1402
+ userImpact: z.ZodNumber;
1403
+ businessImpact: z.ZodNumber;
1404
+ a11yLegalRisk: z.ZodNumber;
1405
+ evidenceQuality: z.ZodNumber;
1406
+ agentImplementability: z.ZodNumber;
1407
+ }, z.core.$strict>;
1408
+ severityBand: z.ZodEnum<{
1409
+ P0: "P0";
1410
+ P1: "P1";
1411
+ P2: "P2";
1412
+ P3: "P3";
1413
+ }>;
1414
+ location: z.ZodObject<{
1415
+ file: z.ZodOptional<z.ZodString>;
1416
+ component: z.ZodOptional<z.ZodString>;
1417
+ selector: z.ZodOptional<z.ZodString>;
1418
+ elementRef: z.ZodOptional<z.ZodString>;
1419
+ }, z.core.$strict>;
1420
+ confidenceBand: z.ZodEnum<{
1421
+ assert: "assert";
1422
+ "surface-as-question": "surface-as-question";
1423
+ "suppress-unless-deep": "suppress-unless-deep";
1424
+ }>;
1425
+ gatedForHuman: z.ZodBoolean;
1426
+ suggestedPatch: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
1427
+ kind: z.ZodLiteral<"contrast-hex">;
1428
+ change: z.ZodString;
1429
+ }, z.core.$strict>, z.ZodObject<{
1430
+ kind: z.ZodLiteral<"aria-attribute">;
1431
+ change: z.ZodString;
1432
+ }, z.core.$strict>, z.ZodObject<{
1433
+ kind: z.ZodLiteral<"target-size">;
1434
+ change: z.ZodString;
1435
+ }, z.core.$strict>], "kind">>;
1436
+ tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
1437
+ }, z.core.$strict>;
1438
+ confidence: z.ZodNumber;
1439
+ severityBand: z.ZodEnum<{
1440
+ P0: "P0";
1441
+ P1: "P1";
1442
+ P2: "P2";
1443
+ P3: "P3";
1444
+ }>;
1445
+ sourceFindingIds: z.ZodArray<z.ZodString>;
1446
+ supportingChannels: z.ZodArray<z.ZodString>;
1447
+ }, z.core.$strict>;
1448
+ type ReconciledFinding = z.infer<typeof ReconciledFindingSchema>;
1449
+ declare const ReconciliationQuestionSchema: z.ZodObject<{
1450
+ kind: z.ZodLiteral<"severity-divergence">;
1451
+ groupKey: z.ZodString;
1452
+ prompt: z.ZodString;
1453
+ findingIds: z.ZodArray<z.ZodString>;
1454
+ channelIds: z.ZodArray<z.ZodString>;
1455
+ severityBands: z.ZodArray<z.ZodEnum<{
1456
+ P0: "P0";
1457
+ P1: "P1";
1458
+ P2: "P2";
1459
+ P3: "P3";
1460
+ }>>;
1461
+ }, z.core.$strict>;
1462
+ type ReconciliationQuestion = z.infer<typeof ReconciliationQuestionSchema>;
1463
+ declare const ReconciliationUnavailableChannelSchema: z.ZodObject<{
1464
+ id: z.ZodString;
1465
+ reason: z.ZodEnum<{
1466
+ model_unavailable: "model_unavailable";
1467
+ channel_unavailable: "channel_unavailable";
1468
+ }>;
1469
+ message: z.ZodString;
1470
+ }, z.core.$strict>;
1471
+ type ReconciliationUnavailableChannel = z.infer<typeof ReconciliationUnavailableChannelSchema>;
1472
+ declare const ReconciliationResultSchema: z.ZodObject<{
1473
+ participatedChannels: z.ZodArray<z.ZodString>;
1474
+ unavailableChannels: z.ZodArray<z.ZodObject<{
1475
+ id: z.ZodString;
1476
+ reason: z.ZodEnum<{
1477
+ model_unavailable: "model_unavailable";
1478
+ channel_unavailable: "channel_unavailable";
1479
+ }>;
1480
+ message: z.ZodString;
1481
+ }, z.core.$strict>>;
1482
+ findings: z.ZodArray<z.ZodObject<{
1483
+ canonicalFindingId: z.ZodString;
1484
+ finding: z.ZodObject<{
1485
+ id: z.ZodString;
1486
+ lens: z.ZodString;
1487
+ issueType: z.ZodString;
1488
+ method: z.ZodEnum<{
1489
+ measured: "measured";
1490
+ judged: "judged";
1491
+ }>;
1492
+ title: z.ZodString;
1493
+ rationale: z.ZodString;
1494
+ citedHeuristics: z.ZodArray<z.ZodString>;
1495
+ evidence: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
1496
+ kind: z.ZodLiteral<"tool-result">;
1497
+ tool: z.ZodEnum<{
1498
+ axe: "axe";
1499
+ lighthouse: "lighthouse";
1500
+ "eslint-jsx-a11y": "eslint-jsx-a11y";
1501
+ backend: "backend";
1502
+ "context-ingestor": "context-ingestor";
1503
+ }>;
1504
+ rule: z.ZodString;
1505
+ measuredValue: z.ZodString;
1506
+ threshold: z.ZodOptional<z.ZodString>;
1507
+ }, z.core.$strict>, z.ZodObject<{
1508
+ kind: z.ZodLiteral<"dom">;
1509
+ selector: z.ZodString;
1510
+ elementRef: z.ZodOptional<z.ZodString>;
1511
+ }, z.core.$strict>, z.ZodObject<{
1512
+ kind: z.ZodLiteral<"screenshot-region">;
1513
+ artifactId: z.ZodString;
1514
+ rect: z.ZodObject<{
1515
+ x: z.ZodNumber;
1516
+ y: z.ZodNumber;
1517
+ width: z.ZodNumber;
1518
+ height: z.ZodNumber;
1519
+ }, z.core.$strict>;
1520
+ }, z.core.$strict>, z.ZodObject<{
1521
+ kind: z.ZodLiteral<"cited-heuristic">;
1522
+ knowledgeEntryId: z.ZodString;
1523
+ }, z.core.$strict>], "kind">>;
1524
+ dimensions: z.ZodObject<{
1525
+ severity: z.ZodNumber;
1526
+ confidence: z.ZodNumber;
1527
+ effort: z.ZodNumber;
1528
+ userImpact: z.ZodNumber;
1529
+ businessImpact: z.ZodNumber;
1530
+ a11yLegalRisk: z.ZodNumber;
1531
+ evidenceQuality: z.ZodNumber;
1532
+ agentImplementability: z.ZodNumber;
1533
+ }, z.core.$strict>;
1534
+ severityBand: z.ZodEnum<{
1535
+ P0: "P0";
1536
+ P1: "P1";
1537
+ P2: "P2";
1538
+ P3: "P3";
1539
+ }>;
1540
+ location: z.ZodObject<{
1541
+ file: z.ZodOptional<z.ZodString>;
1542
+ component: z.ZodOptional<z.ZodString>;
1543
+ selector: z.ZodOptional<z.ZodString>;
1544
+ elementRef: z.ZodOptional<z.ZodString>;
1545
+ }, z.core.$strict>;
1546
+ confidenceBand: z.ZodEnum<{
1547
+ assert: "assert";
1548
+ "surface-as-question": "surface-as-question";
1549
+ "suppress-unless-deep": "suppress-unless-deep";
1550
+ }>;
1551
+ gatedForHuman: z.ZodBoolean;
1552
+ suggestedPatch: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
1553
+ kind: z.ZodLiteral<"contrast-hex">;
1554
+ change: z.ZodString;
1555
+ }, z.core.$strict>, z.ZodObject<{
1556
+ kind: z.ZodLiteral<"aria-attribute">;
1557
+ change: z.ZodString;
1558
+ }, z.core.$strict>, z.ZodObject<{
1559
+ kind: z.ZodLiteral<"target-size">;
1560
+ change: z.ZodString;
1561
+ }, z.core.$strict>], "kind">>;
1562
+ tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
1563
+ }, z.core.$strict>;
1564
+ confidence: z.ZodNumber;
1565
+ severityBand: z.ZodEnum<{
1566
+ P0: "P0";
1567
+ P1: "P1";
1568
+ P2: "P2";
1569
+ P3: "P3";
1570
+ }>;
1571
+ sourceFindingIds: z.ZodArray<z.ZodString>;
1572
+ supportingChannels: z.ZodArray<z.ZodString>;
1573
+ }, z.core.$strict>>;
1574
+ questions: z.ZodArray<z.ZodObject<{
1575
+ kind: z.ZodLiteral<"severity-divergence">;
1576
+ groupKey: z.ZodString;
1577
+ prompt: z.ZodString;
1578
+ findingIds: z.ZodArray<z.ZodString>;
1579
+ channelIds: z.ZodArray<z.ZodString>;
1580
+ severityBands: z.ZodArray<z.ZodEnum<{
1581
+ P0: "P0";
1582
+ P1: "P1";
1583
+ P2: "P2";
1584
+ P3: "P3";
1585
+ }>>;
1586
+ }, z.core.$strict>>;
1587
+ }, z.core.$strict>;
1588
+ type ReconciliationResult = z.infer<typeof ReconciliationResultSchema>;
1589
+ interface ReconciliationService {
1590
+ reconcile(input: ReconciliationInput): Result<ReconciliationResult>;
1591
+ }
1592
+ declare function createReconciliationService(): ReconciliationService;
1593
+ declare function reconcileFindings(input: ReconciliationInput): Result<ReconciliationResult>;
1594
+
1595
+ type ResponsivenessStatesLensOptions = {
1596
+ readonly projectRoot?: string;
1597
+ };
1598
+ /**
1599
+ * Creates the built-in responsiveness and UI-state lens over DOM capture artifacts.
1600
+ */
1601
+ declare function createResponsivenessStatesLens(options?: ResponsivenessStatesLensOptions): Lens;
1602
+
1603
+ /** Default project-local directory used for Surface state and artifacts. */
1604
+ declare const SURFACE_STATE_DIR = ".surface";
1605
+ /** Aggregate JSON file name inside the Surface state directory. */
1606
+ declare const SURFACE_STATE_FILE = "state.json";
1607
+ /** Current persisted state schema version.
1608
+ *
1609
+ * Optional pipeline metadata is additive and parsed with passthrough semantics,
1610
+ * so existing 1.0 readers remain compatible.
1611
+ */
1612
+ declare const SURFACE_STATE_VERSION = "1.0";
1613
+ type FileStateStoreOptions = {
1614
+ readonly projectRoot?: string;
1615
+ /** Project-root-relative child directory for state; invalid paths throw at construction time. */
1616
+ readonly stateDir?: string;
1617
+ readonly stateVersion?: string;
1618
+ readonly lockOptions?: LockOptions;
1619
+ };
1620
+ /**
1621
+ * Create a file-backed StateStore rooted at projectRoot/.surface by default.
1622
+ * Invalid configuration fails fast with TypeError; runtime IO uses Result errors.
1623
+ */
1624
+ declare function createFileStateStore(options?: FileStateStoreOptions): StateStore;
1625
+
1626
+ type LinearIssueInput = {
1627
+ readonly description: string;
1628
+ readonly labels?: readonly string[];
1629
+ readonly teamId: string;
1630
+ readonly title: string;
1631
+ };
1632
+ type JiraIssueInput = {
1633
+ readonly fields: {
1634
+ readonly description: string;
1635
+ readonly issuetype: {
1636
+ readonly name: string;
1637
+ };
1638
+ readonly labels?: readonly string[];
1639
+ readonly project: {
1640
+ readonly key: string;
1641
+ };
1642
+ readonly summary: string;
1643
+ };
1644
+ };
1645
+ type LinearIssueClient = {
1646
+ createIssue(input: LinearIssueInput): Promise<unknown>;
1647
+ };
1648
+ type JiraIssueClient = {
1649
+ createIssue(input: JiraIssueInput): Promise<unknown>;
1650
+ };
1651
+ type LinearIssueExporterOptions = {
1652
+ readonly teamId: string;
1653
+ readonly apiKey?: string;
1654
+ readonly endpointUrl?: string;
1655
+ readonly labels?: readonly string[];
1656
+ readonly projectRoot?: string;
1657
+ readonly client?: LinearIssueClient;
1658
+ readonly maxAttempts?: number;
1659
+ readonly initialBackoffMs?: number;
1660
+ readonly wait?: (milliseconds: number) => Promise<void>;
1661
+ readonly redactionRules?: readonly RedactionRule[];
1662
+ };
1663
+ type JiraIssueExporterOptions = {
1664
+ readonly projectKey: string;
1665
+ readonly siteUrl?: string;
1666
+ readonly email?: string;
1667
+ readonly apiToken?: string;
1668
+ readonly issueType?: string;
1669
+ readonly labels?: readonly string[];
1670
+ readonly projectRoot?: string;
1671
+ readonly client?: JiraIssueClient;
1672
+ readonly maxAttempts?: number;
1673
+ readonly initialBackoffMs?: number;
1674
+ readonly wait?: (milliseconds: number) => Promise<void>;
1675
+ readonly redactionRules?: readonly RedactionRule[];
1676
+ };
1677
+ declare function createLinearIssueExporter(options: LinearIssueExporterOptions): IssueExporter;
1678
+ declare function createJiraIssueExporter(options: JiraIssueExporterOptions): IssueExporter;
1679
+
1680
+ type UsabilityHeuristicLensOptions = LensFactoryOptions;
1681
+ /**
1682
+ * Creates the built-in judged usability lens backed by an injected model provider.
1683
+ */
1684
+ declare function createUsabilityHeuristicLens(options?: UsabilityHeuristicLensOptions): Lens;
1685
+
1686
+ declare const VerdictDecisionSchema: z.ZodEnum<{
1687
+ reject: "reject";
1688
+ accept: "accept";
1689
+ correct: "correct";
1690
+ defer: "defer";
1691
+ }>;
1692
+ type VerdictDecision = z.infer<typeof VerdictDecisionSchema>;
1693
+ declare const VerdictReusePolicySchema: z.ZodEnum<{
1694
+ "this-run": "this-run";
1695
+ "this-identity-always": "this-identity-always";
1696
+ }>;
1697
+ type VerdictReusePolicy = z.infer<typeof VerdictReusePolicySchema>;
1698
+ declare const VerdictSchema: z.ZodObject<{
1699
+ findingIdentityKey: z.ZodString;
1700
+ findingId: z.ZodString;
1701
+ decision: z.ZodEnum<{
1702
+ reject: "reject";
1703
+ accept: "accept";
1704
+ correct: "correct";
1705
+ defer: "defer";
1706
+ }>;
1707
+ rationale: z.ZodString;
1708
+ recordedAt: z.ZodString;
1709
+ reusePolicy: z.ZodEnum<{
1710
+ "this-run": "this-run";
1711
+ "this-identity-always": "this-identity-always";
1712
+ }>;
1713
+ }, z.core.$strict>;
1714
+ type Verdict = z.infer<typeof VerdictSchema>;
1715
+ declare const SelfGroundingReportSchema: z.ZodObject<{
1716
+ sampleSize: z.ZodNumber;
1717
+ measuredGroundTruthCount: z.ZodNumber;
1718
+ judgedFalsePositiveCount: z.ZodNumber;
1719
+ judgedFalsePositiveRate: z.ZodNumber;
1720
+ }, z.core.$strict>;
1721
+ type SelfGroundingReport = z.infer<typeof SelfGroundingReportSchema>;
1722
+ type CreateVerdictInput = {
1723
+ readonly finding: Finding;
1724
+ readonly decision: VerdictDecision;
1725
+ readonly rationale: string;
1726
+ readonly recordedAt?: string | Date;
1727
+ readonly reusePolicy?: VerdictReusePolicy;
1728
+ };
1729
+ type CreateSelfGroundingReportInput = {
1730
+ readonly findings: readonly Finding[];
1731
+ readonly verdicts: readonly Verdict[];
1732
+ };
1733
+ type ApplyVerdictsToBacklogInput = {
1734
+ readonly backlog: Backlog;
1735
+ readonly verdicts: readonly Verdict[];
1736
+ };
1737
+ declare function createVerdict(input: CreateVerdictInput): Result<Verdict>;
1738
+ declare function createSelfGroundingReport(input: CreateSelfGroundingReportInput): Result<SelfGroundingReport>;
1739
+ declare function applyVerdictsToBacklog(input: ApplyVerdictsToBacklogInput): Result<Backlog>;
1740
+
1741
+ type VisualHierarchyLensOptions = {
1742
+ readonly maxFontSizeSteps?: number;
1743
+ readonly minHeadingScaleRatio?: number;
1744
+ readonly projectRoot?: string;
1745
+ };
1746
+ /**
1747
+ * Creates the built-in visual hierarchy lens, grounded by computed style tokens.
1748
+ */
1749
+ declare function createVisualHierarchyLens(options?: VisualHierarchyLensOptions): Lens;
1750
+
1751
+ declare const CORE_PACKAGE_NAME = "@zigrivers/surface-core";
1752
+
1753
+ export { APP_TYPE_OVERLAY_REGISTRY, APP_TYPE_OVERLAY_YAML_HEADER, type AgentBrowserCaptureBackendOptions, type AgentBrowserCommandResult, type AgentBrowserCommandRunner, type AlternativeProposal, type AlternativesRendererOptions, type AlternativesReportData, AppType, type AppTypeClassification, AppTypeClassificationSchema, type AppTypeOverlay, AppTypeOverlaySchema, type ApplyVerdictsToBacklogInput, BUILT_IN_LENS_REGISTRY, Backlog, CIRCULAR_LOG_VALUE, COMMITTED_WEB_APP_TYPE_OVERLAYS, CORE_PACKAGE_NAME, type CaptureClock, type CaptureContext, type CaptureContextFinding, type CaptureIdFactory, type CaptureRandomHex, type CaptureService, type CaptureServiceOptions, CitationSchema, type CognitivePersona, type CognitiveTaskDefinition, type ContentMicrocopyLensOptions, type ContextIngestion, type ContextIngestionInput, type ContextIngestor, type ContextIngestorClock, type ContextIngestorOptions, type ContextInputKind, type ConversionLensOptions, type CreateSelfGroundingReportInput, type CreateSurfaceLoggerOptions, type CreateVerdictInput, DEFAULT_COMPOSITION_STAGE_IDS, DEFAULT_PIPELINE_STAGE_DEFINITIONS, type DesignToken, type DiffRendererOptions, type DiscoveryEvent, DiscoveryEventSchema, type DiscoveryResult, DiscoveryResultSchema, type DiscoveryRunInput, type ExecutablePipelineStageId, ExecutablePipelineStageIdSchema, type ExplainRendererOptions, type FileSystemKnowledgeSourceOptions, Finding, FindingDraft, FindingsEnvelope, type FindingsJsonRendererOptions, FreshnessSchema, FreshnessVolatilitySchema, type GitHubChecksExport, type GitHubChecksExportInput, type GitHubChecksExporterOptions, type GitHubIssueExporterOptions, type IngestedContext, type InputProvenance, type InstantiatedLens, type JiraIssueClient, type JiraIssueExporterOptions, KnowledgeCategorySchema, LIGHTHOUSE_ACCESSIBILITY_AUDIT_IDS, type LensExecutionPlan, type LensExecutionSkip, type LensFactoryOptions, type LensRegistration, type LensSkipReason, type LinearIssueClient, type LinearIssueExporterOptions, ModelAvailability, type OverlayAcceptanceCriteria, OverlayAcceptanceCriteriaSchema, type OverlayReleaseTier, OverlayReleaseTierSchema, type Persona, type PersonaTask, PersonaTaskSchema, type PipelineEvent, PipelineEventSchema, type PipelineOrchestrator, type PipelineOrchestratorOptions, type PipelineRunInput, type PipelineRunResult, type PipelineStageContext, type PipelineStageDefinition, type PipelineStageHandler, type PipelineStageId, PipelineStageIdSchema, type PlaywrightCaptureBackendOptions, REDACTED_EXPORT_VALUE, REDACTED_LOG_KEY, REDACTED_LOG_VALUE, REGISTERED_APP_TYPE_OVERLAYS, type ReconciledFinding, ReconciledFindingSchema, type ReconciliationChannel, ReconciliationChannelSchema, type ReconciliationInput, ReconciliationInputSchema, type ReconciliationQuestion, ReconciliationQuestionSchema, type ReconciliationResult, ReconciliationResultSchema, type ReconciliationService, type ReconciliationUnavailableChannel, ReconciliationUnavailableChannelSchema, type ReconciliationUnavailableReason, ReconciliationUnavailableReasonSchema, RedactionRule, type RegisteredAppTypeOverlay, type RenderAndWriteReportArtifactsOptions, type ReportArtifactSpec, type ReportRendererRedactionOptions, type ResponsivenessStatesLensOptions, Result, type RouteInventory, type RouteInventoryEntry, RouteInventoryEntrySchema, RouteInventorySchema, type RouteSkipped, RouteSkippedSchema, type RunTaskFlowCaptureInput, SURFACE_STATE_DIR, SURFACE_STATE_FILE, SURFACE_STATE_VERSION, type SelectLensExecutionPlanInput, type SelfGroundingReport, SelfGroundingReportSchema, type StaticCaptureBackendOptions, type SurfaceComposition, type SurfaceCompositionGeneratedAt, type SurfaceCompositionOptions, SurfaceConfig, SurfaceError, type SurfaceLogFields, type SurfaceSarifLog, SurfaceSarifLogSchema, type SynthesisDecision, type SynthesizeMeasuredWinsInput, TRUNCATED_LOG_VALUE, type TaskCompletionLensOptions, type TaskDefinition, type TaskFlowCaptureRecipe, type TaskFlowCaptureResult, type TaskFlowCapturedState, type TaskFlowStep, type TaskFlowUnreachableStep, type TextInput, TrackedFindingsDiff, type UsabilityHeuristicLensOptions, type Verdict, type VerdictDecision, VerdictDecisionSchema, type VerdictReusePolicy, VerdictReusePolicySchema, VerdictSchema, type VisualHierarchyLensOptions, type WrittenReportArtifact, applyVerdictsToBacklog, createAccessibilityLens, createAgentBrowserCaptureBackend, createAgentPlanMarkdownRenderer, createAlternativesJsonRenderer, createBacklogMarkdownRenderer, createBoundedAlternatives, createCaptureService, createContentMicrocopyLens, createContextIngestor, createConversionLens, createDefaultCaptureIdFactory, createDiffJsonRenderer, createExplainJsonRenderer, createExplainMarkdownRenderer, createFileStateStore, createFileSystemKnowledgeSource, createFindingsJsonRenderer, createFindingsMarkdownRenderer, createGateEvaluator, createGitHubChecksExporter, createGitHubIssueExporter, createJiraIssueExporter, createLinearIssueExporter, createNoopPipelineHandlers, createPipelineOrchestrator, createPlaywrightCaptureBackend, createReconciliationService, createResponsivenessStatesLens, createSarifRenderer, createSelfGroundingReport, createStaticCaptureBackend, createSurfaceComposition, createSurfaceLogger, createTaskCompletionLens, createUsabilityHeuristicLens, createValidationReportMarkdownRenderer, createVerdict, createVisualHierarchyLens, defaultPlanningReportArtifactSpecs, getAppTypeOverlay, hasRegisteredAppTypeOverlay, instantiateLensExecutionPlan, listAppTypeOverlays, loadKnowledgeEntries, queryKnowledgeEntries, reconcileFindings, redactExportString, redactExportValue, renderAndWriteReportArtifacts, runDiscovery, runTaskFlowCapture, sanitizeLogFields, selectCaptureBackend, selectLensExecutionPlan, selectPipelineStages, serializeAppTypeOverlayToYaml, synthesizeMeasuredWinsDecision, tagFindingsWithCaptureContext };