import type { MarkdownStreamCache } from "../../ui-core/rendering/streaming-markdown.js"; import type { TranscriptItem, TranscriptState } from "../../ui-core/state/transcript-types.js"; import type { InkTheme } from "../render/ink-theme.js"; import { type BlockContext, type SpoolReader } from "../blocks/block-context.js"; import { type IntroBlockInput } from "../blocks/intro-lines.js"; export type BlockKind = "intro" | "user" | "assistant" | "thinking" | "tool" | "batch" | "diff" | "compacted" | "notice" | "turn-summary"; export interface FeedBlock { readonly key: string; readonly itemId: string; readonly kind: BlockKind; readonly open: boolean; readonly lines: readonly string[]; readonly turnId: string | undefined; readonly sequence: number; } /** Hard ceiling on a single block; beyond it the pager owns the content. */ export declare const MAX_BLOCK_ROWS = 400; export declare const INTRO_ITEM_ID = "intro"; export interface FeedViewInput { readonly columns: number; readonly ink: InkTheme; /** Injected so every builder stays deterministic under test. */ readonly now: number; readonly spool?: SpoolReader | undefined; /** Bumped by `/clear`, `/new`, `/clean` so `` keys never collide. */ readonly generation: number; readonly intro?: IntroBlockInput | undefined; readonly markdownCaches?: ReadonlyMap | undefined; } export declare function blockContextFor(state: TranscriptState, view: FeedViewInput): BlockContext; export declare function toolBlockKind(item: Extract): BlockKind; /** * Pure projection of transcript state onto exact-height renderable blocks. * Same inputs always yield identical output — no clock, no randomness, no * process reads. */ export declare function buildFeedBlocks(state: TranscriptState, view: FeedViewInput): readonly FeedBlock[];