import { z } from "zod"; export declare const ReflectionClaritySchema: z.ZodEnum<["clear", "mostly_clear", "ambiguous", "unclear"]>; export type ReflectionClarity = z.infer; export declare const ReflectionSeveritySchema: z.ZodEnum<["info", "low", "medium", "high", "critical"]>; export type ReflectionSeverity = z.infer; export declare const AgentReflectionSchema: z.ZodObject<{ task_id: z.ZodString; lens: z.ZodOptional; instruction_clarity: z.ZodEnum<["clear", "mostly_clear", "ambiguous", "unclear"]>; ambiguities: z.ZodOptional>; tool_friction: z.ZodOptional>; suggestions: z.ZodOptional>; severity: z.ZodEnum<["info", "low", "medium", "high", "critical"]>; }, "strict", z.ZodTypeAny, { severity: "high" | "low" | "critical" | "medium" | "info"; task_id: string; instruction_clarity: "clear" | "mostly_clear" | "ambiguous" | "unclear"; lens?: string | undefined; ambiguities?: string[] | undefined; tool_friction?: string[] | undefined; suggestions?: string[] | undefined; }, { severity: "high" | "low" | "critical" | "medium" | "info"; task_id: string; instruction_clarity: "clear" | "mostly_clear" | "ambiguous" | "unclear"; lens?: string | undefined; ambiguities?: string[] | undefined; tool_friction?: string[] | undefined; suggestions?: string[] | undefined; }>; export type AgentReflection = z.infer; /** Canonical worker-appended feedback file name, relative to an artifacts dir. */ export declare const AGENT_FEEDBACK_FILENAME = "agent-feedback.jsonl"; /** * Parse NDJSON reflection text, keeping only schema-valid objects. Blank lines, * non-JSON lines, and objects missing the required `task_id`/`instruction_clarity`/ * `severity` (or with out-of-enum values) are skipped silently — the channel is * opt-in and best-effort, so a bad reflection must never break synthesis. */ export declare function parseReflectionsNdjson(text: string): AgentReflection[]; export interface ReflectionAggregate { total: number; clarity_breakdown: Record; severity_breakdown: Record; /** Deduped notes, highest reported impact first (ties broken alphabetically). */ friction: string[]; ambiguities: string[]; suggestions: string[]; } /** * Tally clarity/severity and dedupe the free-text notes across reflections, * ranking each distinct note by the highest severity it was reported under so the * most impactful friction surfaces first. */ export declare function aggregateReflections(reflections: AgentReflection[]): ReflectionAggregate; /** * Render the "## Process Feedback" section. Returns `[]` when there are no * reflections so the report omits the section entirely. */ export declare function renderProcessFeedbackSection(reflections: AgentReflection[]): string[]; //# sourceMappingURL=agentReflections.d.ts.map