/**
 * Sidecar persistence for skill expansions.
 *
 * The pi-coding-agent CLI owns the canonical `.jsonl` transcript and
 * we don't modify its schema. Instead, when a user message contains
 * resolved slash-skill expansions, we append a single JSON line to a
 * per-session sidecar so the UI can recover the original text + chip
 * positions when replaying messages.
 *
 * Lookup key on restore:
 *   - exact `modelText` match (the persisted user message body), AND
 *   - timestamp within ±2 s of the agent message's recorded timestamp.
 *
 * Backward compatibility: a missing or unreadable sidecar is treated as
 * "no expansions" — the UI renders the user message as plain text.
 *
 * Storage: `<stateDir>/skill-sidecar/<sessionId>.jsonl` — host-side and
 * thus also valid for sandboxed sessions whose `.jsonl` lives inside
 * the container.
 */
import type { SkillExpansion } from "./resolve-skill-expansions.js";
export interface SkillSidecarEntry {
    /** Unix epoch (ms) at the moment the user message was persisted. */
    ts: number;
    /** What the agent saw. Used as a lookup key against the persisted message body. */
    modelText: string;
    /** What the user actually typed. */
    originalText: string;
    /** Chips, snapshotted at invocation time. */
    skillExpansions: SkillExpansion[];
}
/** Initialize the sidecar dir from the gateway state directory. Called by server bootstrap. */
export declare function initSkillSidecarDir(stateDir: string): void;
/** Append one entry. Best-effort; failure logs and returns false. */
export declare function appendSkillSidecarEntry(sessionId: string, entry: SkillSidecarEntry): boolean;
/** Read all entries for a session. Empty array on any failure (backward compat). */
export declare function readSkillSidecarEntries(sessionId: string): SkillSidecarEntry[];
/** Find the entry matching a persisted user message body within ±toleranceMs of `ts`. */
export declare function findSkillSidecarEntry(sessionId: string, modelText: string, ts: number, toleranceMs?: number): SkillSidecarEntry | undefined;
/** Delete the sidecar for a session (archive purge / terminate). */
export declare function purgeSkillSidecar(sessionId: string): void;
//# sourceMappingURL=skill-sidecar.d.ts.map