/** * Vibe agent — single-shot mockup generator (0.15.0-α.1). * * Reads spec.yaml + brownfield extracts + code-map summary, calls the * LLM once with the VIBE_SYSTEM prompt, parses the XML-block output, * writes files + collects component-change requests. * * Pattern mirrors investigate/agent.ts but simpler: * - no tools (vibe doesn't read files; the project context is inlined) * - single LLM call (multi-round iteration belongs to plate, not vibe) * - format-compliance retry once if the agent emits prose * * Returns a `VibeResult` the index.ts dispatch consumes for git ops + * PR opening. */ import { type VibeChangeRequest, type VibeFileBlock } from "./emit.js"; export interface VibeContext { repoRoot: string; anthropicApiKey: string; model: string; storyId: string; cliVersion: string; /** Pre-rendered spec YAML (read by the index.ts wrapper). */ specYaml: string; /** * Pre-assembled project-context blob: brownfield extracts + code-map * summary, formatted as Markdown. The index.ts wrapper builds this * from `.brewing/diagrams/{schema.mmd, tokens.md}` + a code-map * digest. */ projectContext: string; /** Optional similar-pages-in-codebase free-form hint. */ similarPagesHint?: string; /** * Mock shape — read from `.brewing/mock.yaml` (sc#82). Defaults to * `nextjs` for backwards-compat with consumers that predate sc#82. * Branches path conventions, scenario imports, and navigation * primitives in the system prompt. */ mockShape?: "vite" | "nextjs"; } export type VibeResult = { kind: "emitted"; files: VibeFileBlock[]; writtenPaths: string[]; changeRequests: VibeChangeRequest[]; spendUsd: number; rounds: number; } | { kind: "format-failure"; finalText: string; spendUsd: number; rounds: number; }; export declare function runVibe(ctx: VibeContext): Promise; //# sourceMappingURL=agent.d.ts.map