import type { ImageContent, TextContent } from "../../../../llm-core/src/index.js"; import type { AgentMessage } from "../../types.js"; import type { SessionContext, SessionMetadata, SessionStorage, SessionTreeEntry } from "../types.js"; /** Build model context from the active session branch and its latest state markers. */ export declare function buildSessionContext(pathEntries: SessionTreeEntry[]): SessionContext; /** High-level session API backed by pluggable tree storage. */ export declare class Session { private storage; constructor(storage: SessionStorage); getMetadata(): Promise; getStorage(): SessionStorage; getLeafId(): Promise; getEntry(id: string): Promise; getEntries(): Promise; getBranch(fromId?: string): Promise; buildContext(): Promise; getLabel(id: string): Promise; getSessionName(): Promise; private appendTypedEntry; appendMessage(message: AgentMessage): Promise; appendThinkingLevelChange(thinkingLevel: string): Promise; appendModelChange(provider: string, modelId: string): Promise; appendCompaction(summary: string, firstKeptEntryId: string, tokensBefore: number, details?: unknown, fromHook?: boolean): Promise; /** Append a non-LLM transcript marker for harness-specific state. */ appendCustomEntry(customType: string, data?: unknown): Promise; /** Append harness-specific content that can also be replayed into model context. */ appendCustomMessageEntry(customType: string, content: string | (TextContent | ImageContent)[], display: boolean, details?: unknown): Promise; /** Record or clear the display label for an existing session entry. */ appendLabel(targetId: string, label: string | undefined): Promise; appendSessionName(name: string): Promise; /** Move the visible branch leaf and optionally attach a summary of the abandoned branch. */ moveTo(entryId: string | null, summary?: { summary: string; details?: unknown; fromHook?: boolean; }): Promise; }