import type { NameSlots } from "./session-name"; export type MessageSender = "user" | "assistant"; export type Include = "all" | "conversations" | "subagents" | "teammates"; export type View = "flat" | "tree" | "grouped"; export type SortOrder = "recent" | "oldest" | "messages-desc" | "messages-asc" | "alpha"; export declare const VALID_SORT_ORDERS: SortOrder[]; export interface Profile { id: string; label: string; configDir: string; enabled: boolean; emoji?: string; scanHistory?: boolean; } export interface ContentTier { name: string; previewMax: number; snippetMax: number; } export interface MessageSnapshot { text: string; timestamp: string; } export type ProviderName = "claude-code" | "codex-cli" | "cursor" | "copilot"; export interface ConversationMeta { id: string; filePath: string; sessionId: string; provider?: ProviderName; kind?: "conversation" | "task"; externalSessionId?: string; sessionName: string; nameSlots?: NameSlots; projectPath: string; projectName: string; account: string; timestamp: string; messageCount: number; lastMessageSender: MessageSender; preview: string; contentSnippet: string; gitBranch: string | null; model: string | null; isSubagent: boolean; parentSessionId: string | null; subagentId?: string; parentSessionUuid?: string; isTeammate: boolean; teamName: string | null; toolNames: string[]; firstMessage: MessageSnapshot | null; lastMessage: MessageSnapshot | null; lastPrompt?: string; isImportedFromClaude?: boolean; isImportedFromCodex?: boolean; isImportedFromCursor?: boolean; } export interface TreeConversation extends ConversationMeta { subagents: ConversationMeta[]; } export interface GroupedConversations { [groupKey: string]: ConversationMeta[]; } export interface FileStatEntry { mtimeMs: number; size: number; } export interface ScanOptions { profiles?: Profile[]; providers?: Array; codexRoots?: string[]; cursorRoots?: string[]; cursorStateDb?: string; copilotRoots?: string[]; tier?: string; tiers?: Record; include?: Include; view?: View; sort?: SortOrder; since?: string; project?: string; account?: string; limit?: number; offset?: number; onProgress?: (scanned: number, total: number) => void; onBatch?: (metas: ConversationMeta[]) => void; /** Known file stats from a previous scan. Files whose (mtimeMs, size) match * are skipped — the cached ConversationMeta is reused instead. */ statCache?: Map; /** Persistent mode only: bypass the dir-mtime discovery gate and force a * full glob of every profile's projectsDir, ignoring stored watermarks. * Use for an explicit user-triggered refresh that shouldn't trust the * gate's optimization. */ fullRescan?: boolean; } export interface ScanResult { conversations: ConversationMeta[] | TreeConversation[] | GroupedConversations; total: number; scanned: number; } export interface SearchOptions extends ScanOptions { fields?: string[]; provider?: string; } export interface SearchHighlight { start: number; end: number; } export interface SearchMatch { field: string; snippet: string; highlights?: SearchHighlight[]; } export interface SearchResult { meta: ConversationMeta; score: number; matches: SearchMatch[]; } export interface GetConversationOptions { profiles?: Profile[]; } export interface GetConversationPageOptions { beforeIndex?: number; limit: number; } export interface ConversationPage { messages: ConversationMessage[]; total: number; fromIndex: number; } export interface SingleFilePage extends ConversationPage { conversation: Conversation; } export interface TurnDuration { durationMs: number; messageCount: number; uuid?: string; } export interface DeferredToolsDeltaAttachment { type: "deferred_tools_delta"; addedNames: string[]; addedLines: unknown[]; removedNames: string[]; } export type AttachmentSidecar = DeferredToolsDeltaAttachment | { type: string; [key: string]: unknown; }; export interface ToolUseBlock { id: string; name: string; input: Record; } export interface ToolResultBlock { toolUseId: string; type: "edit" | "write" | "read" | "bash" | "grep" | "glob" | "taskAgent" | "taskCreate" | "taskUpdate" | "generic"; content: Record; isError?: boolean; } export interface TeamInfo { teammateId: string; summary?: string; color?: string; } export interface MessageMetadata { model?: string; stopReason?: string | null; inputTokens?: number; outputTokens?: number; cacheReadTokens?: number; cacheCreationTokens?: number; gitBranch?: string; version?: string; toolUses?: string[]; toolUseBlocks?: ToolUseBlock[]; toolResults?: ToolResultBlock[]; teamName?: string; teamInfo?: TeamInfo; } export interface ConversationMessage { role: MessageSender; text: string; timestamp: string; uuid?: string; metadata?: MessageMetadata; isToolResult?: boolean; isThinking?: boolean; thinkingContent?: string; thinkingSignature?: string; parentUuid?: string | null; requestId?: string; promptId?: string; isSidechain?: boolean; permissionMode?: string; hasImages?: boolean; attachment?: AttachmentSidecar; isCompactSummary?: boolean; compaction?: CompactionInfo; } export interface CompactionInfo { trigger?: string; preTokens?: number; postTokens?: number; } export interface Conversation { id: string; filePath: string; projectPath: string; projectName: string; sessionId: string; sessionName: string; messages: ConversationMessage[]; fullText: string; timestamp: string; messageCount: number; account: string; turnDurations?: TurnDuration[]; lastPrompt?: string; } //# sourceMappingURL=types.d.ts.map