/** In-memory `SessionEntry[]` store for the embedded runtime. Linear chain — no branching. */
import type { ImageContent, TextContent } from '../ai/types.js';
import type { AgentSessionContext } from '../contracts/agent-session-store.js';
import type { AgentMessage } from '../core/index.js';
import { type LlmCallEntry, type SessionEntry } from '../core/session-schema.js';
import { type AgentToolDefinitionSnapshot } from './session-entry-builder.js';
export interface ShortcutXLAgentSessionArtifacts {
    readonly context: AgentSessionContext;
    readonly entries: readonly SessionEntry[];
    readonly sessionId: string;
}
/** Host-facing handle: artifact getter + writer + main-thread context replacer. */
export interface ShortcutXLAgentSessionStore {
    getArtifacts(): ShortcutXLAgentSessionArtifacts;
    replaceContext(context: AgentSessionContext): void;
    sessionStore: ShortcutXLSessionWriter;
}
/** Append-only writer surface the runtime drives. Narrower than the CLI's `RuntimeSessionStore`. */
export interface ShortcutXLSessionWriter {
    buildSessionContext(): AgentSessionContext;
    getSessionId(): string;
    getEntries(): SessionEntry[];
    getBranch(): SessionEntry[];
    getLeafId(): string | null;
    reserveAssistantMessageEntryId(): string;
    appendMessage(message: AgentMessage, durationMs?: number, idOverride?: string): string;
    appendCustomMessageEntry<T = unknown>(customType: string, content: string | (TextContent | ImageContent)[], display: boolean, details?: T, timestamp?: string): string;
    appendModelChange(provider: string, modelId: string): string;
    appendThinkingLevelChange(thinkingLevel: string): string;
    appendTurnStart(turnIndex: number): string;
    appendTurnEnd(turnIndex: number, durationMs: number): string;
    appendSystemPrompt(content: string): string;
    appendToolDefinitions(tools: readonly AgentToolDefinitionSnapshot[]): string;
    appendLlmCall(input: Pick<LlmCallEntry, 'requestId' | 'body'>): string;
    appendCompaction<T = unknown>(summary: string, firstKeptEntryId: string, tokensBefore: number, details?: T, fromHook?: boolean): string;
    /** Drop entries from `entryId` onward (inclusive). Returns true when the id resolved. */
    truncateFrom(entryId: string): boolean;
}
export interface CreateShortcutXLAgentSessionStoreOptions {
    context?: AgentSessionContext;
    entries?: readonly SessionEntry[];
    sessionId: string;
}
export declare function createShortcutXLAgentSessionStore(options: CreateShortcutXLAgentSessionStoreOptions): ShortcutXLAgentSessionStore;
//# sourceMappingURL=session-store.d.ts.map