/** * Block Converter - Convert OpenCode SDK events to StreamEvents * * Transforms OpenCode SDK events (from SSE streaming) into architecture-agnostic * StreamEvent structures for real-time UI updates. */ import type { Event } from "@opencode-ai/sdk"; import type { ToolExecutionStatus } from '../../../types/session/blocks.js'; import type { StreamEvent } from '../../../types/session/streamEvents.js'; /** * Generate a unique block ID */ declare function generateId(): string; /** * Map OpenCode tool status to ToolExecutionStatus */ declare function mapToolStatus(status: string): ToolExecutionStatus; /** * Convert Unix timestamp (ms) to ISO string */ declare function toISOTimestamp(unixMs: number): string; /** * Parse an OpenCode SDK Event into StreamEvents * * @param event - The OpenCode SDK Event to parse * @param mainSessionId - The ID of the main session (to determine conversationId) * @returns Array of StreamEvents to emit */ export declare function parseOpencodeStreamEvent(event: Event, mainSessionId: string): StreamEvent[]; /** * Reset the active blocks tracker * Call this when starting a new session */ export declare function resetActiveBlocks(): void; /** * Export helper functions for use in transcript parser */ export { mapToolStatus, toISOTimestamp, generateId }; //# sourceMappingURL=block-converter.d.ts.map