/** * Per-artifact-type renderer registry. * * Renderers are pure functions: (artifact) => markdown string. * Mechanisms (cli/disk/pr) call render(artifact) to get a human-readable * summary instead of stringifying the full artifact. * * Sprint 11 — replaces inline renderArtifact (cli), summarizeArtifact (disk), * renderCheckpointComment (pr) bodies. Colocated in renderers/ per mechanisms/ * precedent established in Sprints 7-10. */ /** * Canonical artifact type strings. * CLI/disk/PR mechanisms MUST pass artifact.type matching one of these. * Unknown types fall back to a generic JSON text dump with a stderr warning (s11-c2). */ export type ArtifactType = "research" | "plan-spec" | "sprint-contract" | "curator-briefing" | "generator-diff" | "eval-result" | "code-review" | "sprint-summary" | "pipeline-summary"; /** A renderer function: artifact in, markdown string out. Pure, synchronous. */ export type Renderer = (artifact: unknown) => string; /** * Register a renderer for a given artifact type. * Allows test fixtures or future sprints to extend the registry. */ export declare function registerRenderer(type: string, renderer: Renderer): void; /** * Get the renderer for a given artifact type. * Returns undefined if the type is not registered. */ export declare function getRenderer(type: string): Renderer | undefined; /** * Dispatch to the correct renderer by artifact.type. * Unknown types fall through to a generic JSON text dump + stderr warning (s11-c2). */ export declare function render(artifact: unknown): string; /** * Generic fallback renderer — single source of truth for unknown-type rendering. * * Only picks safe metadata fields (type, path, summary, lines) — never stringifies * the entire artifact. Large fields (content, fullContent, text, data) are dropped * to preserve the 100ms perf budget (per disk.ts: large artifact safety test). */ export declare function renderGeneric(artifact: unknown): string; //# sourceMappingURL=registry.d.ts.map