/** * Claude Output Normalizer * * Converts Claude stream-json messages to normalized entries for UI rendering. * * @module agents/claude/normalizer */ import type { ClaudeStreamMessage } from "./types/messages.js"; import type { NormalizedEntry } from "../types/agent-executor.js"; /** * Tool use tracking info stored in the map */ interface ToolUseInfo { /** Entry index for this tool use */ entryIndex: number; /** Tool name */ toolName: string; } /** * Normalizer state for tracking streaming and tool uses */ interface NormalizerState { /** Current entry index */ index: number; /** Active assistant message being coalesced */ activeMessage: { index: number; content: string; } | null; /** Map of tool_use_id to tool info (entry index and name) */ toolUseMap: Map; /** Session ID captured from system message */ sessionId: string | null; /** Model captured from system message */ model: string | null; } /** * Create initial normalizer state */ export declare function createNormalizerState(): NormalizerState; /** * Normalize a single Claude stream-json message * * @param message - Stream-json message from Claude * @param workDir - Working directory for path relativization * @param state - Normalizer state (modified in place) * @returns Normalized entry, or null if message should be skipped */ export declare function normalizeMessage(message: ClaudeStreamMessage, workDir: string, state: NormalizerState): NormalizedEntry | null; export {}; //# sourceMappingURL=normalizer.d.ts.map