/** * Session summarization for the resume picker. * * Produces one short line describing what a session was about, so `/resume` can show * something recognizable instead of a truncated first message. Unlike a branch summary this * never re-enters model context: it exists only as picker metadata. */ import { type ProviderHeaders, type RetryPolicy } from "@bastani/pi-ai"; import type { Api, Model, Usage } from "@bastani/pi-ai/compat"; import type { StreamFn } from "@earendil-works/pi-agent-core"; import type { SessionEntry } from "../session-manager.ts"; export interface SessionSummaryResult { summary?: string; usage?: Usage; aborted?: boolean; error?: string; } export interface GenerateSessionSummaryOptions { /** Model to use for summarization */ model: Model; /** API key for the model; omitted for header-only bearer authentication. */ apiKey?: string; /** Request headers for the model */ headers?: ProviderHeaders; /** Credential-specific request endpoint for the model */ baseUrl?: string; /** Abort signal for cancellation */ signal: AbortSignal; /** Optional session stream function. Used to preserve SDK request behavior without mutating agent state. */ streamFn?: StreamFn; /** Retry policy for transient failures. Retries stay silent: this is background work. */ retry?: RetryPolicy; } /** * Generate a one-line summary of a session. * * @param entries - Session entries to summarize (chronological order) * @param options - Generation options */ export declare function generateSessionSummary(entries: SessionEntry[], options: GenerateSessionSummaryOptions): Promise; export declare function generateWorkflowSummary(text: string, options: GenerateSessionSummaryOptions): Promise; //# sourceMappingURL=session-summarization.d.ts.map