import type { SessionEntry } from "@earendil-works/pi-coding-agent"; import type { FabricExecutionOutcomeV1, FabricTraceJsonValue } from "../audit/trace.js"; import { type FabricProjectionSource } from "./trace-events.js"; interface EventBase { index: number; entryId: string; sourceEntryId: string; } interface UserEvent extends EventBase { kind: "user"; text: string; } interface AssistantTextEvent extends EventBase { kind: "assistantText"; text: string; } interface ThinkingEvent extends EventBase { kind: "thinking"; text: string; } interface CustomMessageEvent extends EventBase { kind: "customMessage"; customType: string; text: string; display: boolean; details?: FabricTraceJsonValue; } export interface ToolCallEvent extends EventBase { kind: "toolCall"; toolCallId: string; name: string; args: Record; } interface ToolResultEvent extends EventBase { kind: "toolResult"; toolCallId: string; toolName: string; isError: boolean; text: string; } interface BashEvent extends EventBase { kind: "bash"; toolCallId: string; command: string; isError: boolean; exitCode: number | null; error?: string; } interface FabricPhaseEvent extends EventBase { kind: "fabricPhase"; subordinal: string; address: string; phase: string; } interface FabricOperationEvent extends EventBase { kind: "fabricOperation"; subordinal: string; address: string; ref: string; provider?: string; action?: string; tool: string; args: Record; outcome: FabricExecutionOutcomeV1; error?: string; result?: FabricTraceJsonValue; source: FabricProjectionSource | "branch"; } export type CompactionEvent = UserEvent | AssistantTextEvent | ThinkingEvent | CustomMessageEvent | ToolCallEvent | ToolResultEvent | BashEvent | FabricPhaseEvent | FabricOperationEvent; export declare const isPiCustomMessageEntry: (entry: SessionEntry) => entry is Extract; declare const firstLine: (text: string) => string; export declare const normalizeEntries: (entries: SessionEntry[]) => CompactionEvent[]; export { firstLine }; //# sourceMappingURL=normalize.d.ts.map