/** * Scene Beat Generator * * Assembles scene context from the database and calls Claude to generate * free-form narrative beats for a scene — the micro-structure of what happens * beat by beat within a single scene. * * Philosophy: beats are planning scaffolding, not prose. They help the author * see the shape of the scene before writing it. "Suggest, don't dictate." */ import type { MCPClient } from '../core/database.js'; import type { SceneBeat } from '../types/novel.js'; import type { SceneMetadata } from '../builders/scene-builder.js'; export interface BeatContext { projectTitle: string; projectGenre?: string; chapterNumber: number; chapterTitle?: string; chapterSummary?: string; scene: SceneMetadata; povCharacter?: { name: string; role?: string; summary?: string; personality?: string; arc?: string; }; activePlotThreads: Array<{ name: string; description: string; priority: number; }>; hardWorldRules: Array<{ name: string; description: string; }>; previousSceneLastBeat?: string; } export interface BeatGeneratorOptions { count?: number; } export declare class BeatGenerator { private mcpClient; private projectId; private claude; constructor(mcpClient: MCPClient, projectId: number); /** * Build the beat-generation prompt without calling the API. * Useful for surfacing context to the active Claude Code session. */ buildBeatPrompt(sceneMetadata: SceneMetadata, chapterNumber: number, count?: number): Promise; /** * Generate beats for a scene from its metadata and DB context. * Does not require the scene to have prose — works from planning data alone. * * Returns an empty array when running in passthrough mode (no standalone API * key). The caller should display the assembled prompt so the active Claude * Code session can generate beats and write them back. */ generateBeats(sceneMetadata: SceneMetadata, chapterNumber: number, options?: BeatGeneratorOptions): Promise; private assembleContext; private loadProject; private loadChapter; private loadCharacter; private loadActivePlotThreads; private loadHardWorldRules; /** * Load the last beat from the previous scene in the same chapter (for continuity). * Returns undefined if this is scene 1 or no beats exist. */ private loadPreviousSceneLastBeat; private buildPrompt; /** * Parse Claude's numbered list response into SceneBeat[]. * Tolerates minor formatting variation (periods, parentheses, extra whitespace). */ parseBeats(raw: string): SceneBeat[]; } //# sourceMappingURL=beat-generator.d.ts.map