import { type AgentTool } from "@kenkaiiii/gg-agent"; import type { Usage } from "@kenkaiiii/gg-ai"; import type { VideoHost } from "./hosts/types.js"; import { type SkillSource } from "./skills-loader.js"; /** * Self-critique pass over the timeline + transcripts. * * Runs a fresh Agent with a READ-ONLY subset of editor tools and a critique * prompt. The reviewer inspects the current state against the user's stated * intent and returns a one-paragraph critique + a structured flags array. * * Token cost: a sub-agent over many turns can burn context; we cap at * maxTurns=10 by default. */ export interface ReviewFlag { severity: "ok" | "warn" | "block"; note: string; } export interface ReviewOptions { /** What the edit is FOR. The reviewer measures against this. */ intent: string; /** Optional aspects to focus on. */ focus?: Array<"pacing" | "takes" | "audio" | "captions" | "hook" | "color">; host: VideoHost; cwd: string; config: { provider: "anthropic" | "openai" | "glm" | "moonshot"; model: string; apiKey: string; maxTurns?: number; }; signal?: AbortSignal; } export interface ReviewResult { critique: string; flags: ReviewFlag[]; turns: number; usage: Usage; } /** * Build only the 6 read-only tools needed by the reviewer, without instantiating * the full ~100-tool set. Exported so callers can compose a reviewer independently. */ export declare function createReadOnlyEditorTools(host: VideoHost, cwd: string, skills?: SkillSource[]): AgentTool[]; export declare function runReview(opts: ReviewOptions): Promise; /** * Parse the trailing ```json {...} ``` block out of the final assistant message. * The text BEFORE the JSON block becomes the critique. On parse failure, the * whole message is returned as critique with empty flags. */ export declare function parseReviewMessage(text: string): { critique: string; flags: ReviewFlag[]; }; //# sourceMappingURL=review.d.ts.map