3bf5c92841
The Writer was the serial long pole: a single LLM call wrote the scene skeleton AND the full beats[] graph before anything downstream could start, so variable-length beat generation blew up tail latency. Split it into two calls: - Phase A (runWriterPlan): minimal skeleton the image pipeline needs (sceneSummary, sceneKey, entryBeatId, cast, entry roster, entry speaker). Serial, on the critical path, kept lightweight. - Phase B (runWriterBeats): full beats[] + storyStatePatch, written to honor the plan. Launched immediately, overlaps the ENTIRE image pipeline (cards / cinematographer / portraits / painter), awaited last. Critical path becomes PhaseA + max(imagePipeline, PhaseB), so the long beat-writing is hidden behind image gen. A Phase B failure degrades to a single playable beat synthesized from the plan. Paired distinct-payload A/B (6 content-matched stories, baseline vs split): - median end-to-end 42.6s -> 32.2s (-24%) - mean 46.4s -> 33.1s (-29%) - worst case 74.7s -> 37.6s (halved) - no content regression: total Writer output tokens 12858 -> 13699 Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
16 lines
523 B
TypeScript
16 lines
523 B
TypeScript
export {
|
|
startSession,
|
|
requestScene,
|
|
visionDecide,
|
|
requestInsertBeat,
|
|
requestBeatAudio,
|
|
} from "./orchestrator";
|
|
export { synthesizeBeat } from "./voice";
|
|
export { mergeCharacters } from "./director";
|
|
export type { SceneResult } from "./director";
|
|
export { runArchitect } from "./agents/architect";
|
|
export type { WriterBeatsOutput } from "./agents/writer";
|
|
export type { CinematographerOutput } from "./agents/cinematographer";
|
|
export type { InsertBeatPartial } from "@infiplot/types";
|
|
export * from "./prompts";
|