/** * Plate agent — mockup-amendment loop (0.15.0-α.3). * * Single-shot LLM call per `/plate` trigger. Reads PR comments + image * attachments since the last plate commit, amends mockup files with * minimum diff, returns the parsed result for the index.ts wrapper to * write + force-push. * * Same shape as vibe's agent but accepts vision-message inputs (image * blocks alongside text). No format-compliance retry — plate is mid- * iteration; if the model emits prose-only on round 1, the calling * dispatch surfaces the problem to the PM via a comment ("plate * couldn't parse a response — re-run with `/plate` to retry"). */ import { type PlateFeedback } from "./prompts.js"; import { type VibeChangeRequest, type VibeFileBlock } from "../vibe/emit.js"; export interface PlateContext { repoRoot: string; anthropicApiKey: string; model: string; storyId: string; prNumber: number; cliVersion: string; /** Pre-rendered project-context blob (same shape as vibe). */ projectContext: string; /** Spec YAML, for context only. */ specYaml: string; /** Current state of mockup files on the branch. */ currentFiles: Array<{ path: string; contents: string; }>; /** PM feedback to act on. */ feedback: PlateFeedback; /** * Mock shape — read from `.brewing/mock.yaml` (sc#82). Defaults to * `nextjs` for backwards-compat with consumers that predate sc#82. * Branches navigation primitives + scenario imports in the system * prompt. */ mockShape?: "vite" | "nextjs"; } export type PlateResult = { kind: "amended"; files: VibeFileBlock[]; changeRequests: VibeChangeRequest[]; summary: string; spendUsd: number; } | { kind: "no-op"; summary: string; spendUsd: number; } | { kind: "format-failure"; finalText: string; spendUsd: number; }; /** Extract the optional `` block. */ declare function parsePlateSummary(body: string): string | null; export declare function runPlate(ctx: PlateContext): Promise; export { parsePlateSummary }; //# sourceMappingURL=agent.d.ts.map