/** * Prose pipeline — orchestrates the per-turn event → block translation. * * Pipeline stages (from `processTurn`): * 1. Filter — drop `system.*` and `platform.*` events. * 2. Sort — apply ADR-094 chain-metadata ordering. * 3. Route — try the messageId path first (ADR-097), then dispatch * by event type to a handler family. * 4. Assemble — handlers themselves call `createBlock`, so by the * time blocks return here they already carry parsed * bracket decorations and final `className`s. * * Public interface: `class ProsePipeline implements ITextService`. * Engine constructs one instance during `setStory()` and calls * `processTurn` per turn (same three call sites as the retiring * `TextService`). * * Owner context: `@sharpee/engine` — internal prose pipeline. * * @see ADR-174 §Internal interfaces * @see ADR-094 Event Chaining (sort stage) * @see ADR-097 Domain Events with messageId (domain-message handler) */ import type { ITextBlock } from '@sharpee/text-blocks'; import type { LanguageProvider } from '@sharpee/if-domain'; import type { ISemanticEvent } from '@sharpee/core'; import type { ITextService } from './types'; /** * Engine-internal prose pipeline. * * Stateless transformer: events in, blocks out. Constructed once per * `setStory()` call with the active language provider; called per * turn by `GameEngine.executeTurn`, `GameEngine.restartGame`, and * the meta-command path (same three sites the retired * `TextService.processTurn` had). */ export declare class ProsePipeline implements ITextService { private readonly languageProvider; constructor(languageProvider: LanguageProvider); processTurn(events: ISemanticEvent[]): ITextBlock[]; /** * Route an event to its handler family. * * Order: try the ADR-097 messageId path first (catches every stdlib * domain event); then fall through to type-keyed handlers; finally * the catch-all generic handler. */ private routeToHandler; } /** * Construct a `ProsePipeline` for the given language provider. * * Mirrors the `createTextService` factory the retired text-service * package exposed; callers can swap one for the other without * changing call shapes. */ export declare function createProsePipeline(languageProvider: LanguageProvider): ITextService; //# sourceMappingURL=pipeline.d.ts.map