import type { ChatMessage } from "../../protocol/wire/index.js";
import type { TokenUsage } from "../../agent/types.js";
import type { SessionUsageSnapshot } from "./session-state.js";
export declare const SESSION_SCHEMA_VERSION = 1;
export interface SessionMetadata {
    schemaVersion?: number;
    sessionId: string;
    projectId: string;
    createdAt: string;
    lastActiveAt: string;
    model?: string;
    /** Agent that owns this session (e.g. "qlogicagent", "codex"). */
    agentId?: string;
    cwd?: string;
    turnCount: number;
    messageCount: number;
    title?: string;
    taskSummary?: string;
    taskSummaryGeneratedAt?: number;
    pinnedAt?: string;
    archivedAt?: string;
    sealedAt?: string;
    previousSessionId?: string;
    carryoverSummary?: string;
    type?: "personal" | "group";
    ownerPlatform?: string;
    ownerId?: string;
    groupKey?: string;
    groupName?: string;
    groupPlatform?: string;
    totalInputTokens?: number;
    totalOutputTokens?: number;
}
export interface PersistedSession {
    metadata: SessionMetadata;
    messages: PersistedChatMessage[];
}
export interface MessageDisplayMetadata {
    messageId?: string;
    platform?: string;
    sourceChannel?: string;
    source?: string;
    chatId?: string;
    userId?: string;
    userName?: string;
}
export interface PersistedChatMessage extends ChatMessage {
    timestamp?: string;
    turnId?: string;
    usage?: TokenUsage;
    displayMetadata?: MessageDisplayMetadata;
}
export interface SessionListEntry {
    sessionId: string;
    title?: string;
    lastActiveAt: string;
    messageCount: number;
    model?: string;
    agentId?: string;
    pinnedAt?: string;
    archivedAt?: string;
    sealedAt?: string;
    projectId: string;
    type?: "personal" | "group";
    createdAt: string;
    groupKey?: string;
    previousSessionId?: string;
    carryoverSummary?: string | null;
}
export interface TaskSummaryDeps {
    transport: import("../ports/index.js").LLMTransport;
    apiKey: string;
    model: string;
}
export type SessionMetadataPatch = Partial<Record<keyof SessionMetadata, SessionMetadata[keyof SessionMetadata] | null>>;
export type SessionStateSaveMetadata = Partial<SessionMetadata>;
export type { ChatMessage, SessionUsageSnapshot, TokenUsage };
