import type { Delegation } from "./types.js"; /** Survival kit data extracted from a delegation for compact-context injection. */ export interface DelegationSurvivalKit { id: string; parentId: string; queueKey: string; agent: string; status: string; task: string; timestamp: number; } /** Stale detection warning for a survival kit whose timestamp exceeds the threshold. */ export interface StaleWarning { delegationId: string; ageMs: number; thresholdMs: number; } /** * REQ-RC-03: Formats delegation records into survival manifest text for pre-compact injection. * * Each delegation produces a `[DELEGATION SURVIVAL]` line with all fields needed * to reconstruct delegation awareness after a context compaction event. * * @param delegations - Active delegation records to serialize into the manifest. * @returns Formatted manifest string with one `[DELEGATION SURVIVAL]` line per delegation. */ export declare function injectSurvivalManifest(delegations: Delegation[]): string; /** * REQ-RC-03: Parses survival manifest text back into structured kits. * * Only lines starting with `[DELEGATION SURVIVAL]` are parsed. * Malformed lines are silently skipped. * * @param text - The compacted context text that may contain survival manifest lines. * @returns Parsed survival kits with timestamp set to Date.now() (parse time). */ export declare function parseSurvivalManifest(text: string): DelegationSurvivalKit[]; /** * REQ-RC-03: Detects survival kits that have exceeded the stale threshold. * * @param kits - Parsed survival kits to check for staleness. * @param thresholdMs - Maximum age in milliseconds before a kit is considered stale (default: 5 min). * @returns Stale warnings for kits whose age exceeds the threshold. */ export declare function detectStaleKit(kits: DelegationSurvivalKit[], thresholdMs?: number): StaleWarning[]; //# sourceMappingURL=survival-kit.d.ts.map