import type { SlotName } from "../slots/types.js"; export interface EpisodeSummary { id: string; slot: SlotName; task: string; result: string; tokens: number; duration: number; filesModified?: string[]; status: "success" | "failure" | "partial"; } export declare function createEpisodeSummary(partial: Omit): EpisodeSummary; /** * Compress an episode into a structured summary suitable for context injection. * Preserves: slot, status, task summary, files modified, and key outcome. * This replaces naive 200-char truncation with meaningful compression. */ export declare function compressEpisode(episode: EpisodeSummary): string; /** * Format episodes as composable input context for thread-to-thread handoffs. * This is the mechanism the blog describes: "episodes can be direct inputs * to other threads", enabling thread composition where one thread's * conclusions become another thread's starting context. */ export declare function formatEpisodeInputs(episodes: EpisodeSummary[]): string; /** * Extract keywords from episode content for RLM retrieval. */ export declare function extractEpisodeKeywords(episode: EpisodeSummary): Set; /** * Score relevance between a set of query keywords and an episode. * Uses keyword overlap (Jaccard-like scoring). */ export declare function episodeRelevance(queryKeywords: Set, episode: EpisodeSummary): number; /** * Extract keywords from text for RLM-style retrieval. * Filters stop words, keeps words >= 3 chars. */ export declare function extractKeywords(text: string): Set; //# sourceMappingURL=protocol.d.ts.map