import React from 'react'; import type { Phase } from '../../events/schema'; import type { ArtifactEntry } from '../../state/artifacts'; import type { StateStore } from '../../state/store'; import type { RunRecord } from '../types'; type UiArtifact = { id: string; stepId: string; name: string; kind: 'json' | 'text'; updatedAt: string; sizeBytes?: number; path?: string; source: 'artifact' | 'state'; entry?: ArtifactEntry; payload?: unknown; }; type ArtifactPreview = { title: string; path?: string; formatter: string; lines: string[]; totalLines: number; truncated: boolean; }; type ArtifactGroup = { label: string; artifacts: UiArtifact[]; }; export declare function ArtifactExplorer({ run, stateStore, nowMs, active, onClose, }: { run: RunRecord; stateStore: StateStore; nowMs: number; active: boolean; onClose: () => void; }): React.ReactElement; declare function formatTextPreview(artifact: UiArtifact, raw: string): ArtifactPreview; declare function formatJsonPreview(artifact: UiArtifact, data: unknown, nowMs: number): ArtifactPreview; declare function formatPlanPreview(data: unknown): { formatter: string; lines: string[]; }; declare function formatVerifyReportPreview(data: unknown): { formatter: string; lines: string[]; }; declare function formatLocalGatePreview(data: unknown): { formatter: string; lines: string[]; }; declare function formatPrDraftPreview(data: unknown): { formatter: string; lines: string[]; }; declare function formatReviewClassificationPreview(data: unknown): { formatter: string; lines: string[]; }; declare function formatReviewFixPlanPreview(data: unknown): { formatter: string; lines: string[]; }; declare function formatAiReviewPreview(data: unknown): { formatter: string; lines: string[]; }; declare function formatCiFixPlanPreview(data: unknown, nowMs: number): { formatter: string; lines: string[]; }; declare function formatRawJsonPreview(data: unknown): { formatter: string; lines: string[]; }; declare function groupArtifacts(artifacts: UiArtifact[]): ArtifactGroup[]; declare function derivePhase(stepId: string): Phase | 'other'; declare function phaseLabel(phase: Phase | 'other'): string; declare function phaseOrder(): string[]; declare function artifactTitle(artifact: UiArtifact): string; declare function truncateOutput(value: string, maxLines: number): string[]; declare function limitLines(lines: string[]): string[]; declare function safeSize(path?: string): number | undefined; declare function formatBytes(bytes: number): string; declare function buildRunStatePath(stateStore: StateStore, runId: string): string; export declare const __test: { formatTextPreview: typeof formatTextPreview; formatJsonPreview: typeof formatJsonPreview; formatPlanPreview: typeof formatPlanPreview; formatVerifyReportPreview: typeof formatVerifyReportPreview; formatLocalGatePreview: typeof formatLocalGatePreview; formatPrDraftPreview: typeof formatPrDraftPreview; formatReviewClassificationPreview: typeof formatReviewClassificationPreview; formatReviewFixPlanPreview: typeof formatReviewFixPlanPreview; formatAiReviewPreview: typeof formatAiReviewPreview; formatCiFixPlanPreview: typeof formatCiFixPlanPreview; formatRawJsonPreview: typeof formatRawJsonPreview; groupArtifacts: typeof groupArtifacts; derivePhase: typeof derivePhase; phaseLabel: typeof phaseLabel; phaseOrder: typeof phaseOrder; artifactTitle: typeof artifactTitle; truncateOutput: typeof truncateOutput; limitLines: typeof limitLines; safeSize: typeof safeSize; formatBytes: typeof formatBytes; buildRunStatePath: typeof buildRunStatePath; }; export {};