/**
 * Track storage — read/write .tr files under <project>/.ccweb/tracks/.
 *
 * Mirrors backend/src/flows/store.ts but for .tr source files instead
 * of FlowDef JSON. Each track is a plain UTF-8 text file (train-lang
 * source). No schema validation here — parse errors surface from
 * train-lang when the track is run.
 */
export interface TrackFileInfo {
    filename: string;
    size: number;
    mtime: number;
}
/**
 * sanitize a user-provided filename: forbid path separators, ensure
 * .tr extension. Returns null if input is unsafe.
 */
export declare function sanitizeTrackFilename(input: unknown): string | null;
export declare function listTracks(projectFolder: string): TrackFileInfo[];
/**
 * Read a track. Refuses to follow symlinks — if the on-disk entry is a
 * symlink, returns null. This prevents an attacker with write access to
 * `.ccweb/tracks/` from planting `attack.tr -> /etc/passwd` and reading
 * arbitrary files via the GET endpoint. Symmetric guard in saveTrack
 * (rejects writing to a path whose existing target is a symlink).
 */
export declare function loadTrack(projectFolder: string, filename: string): string | null;
export declare function saveTrack(projectFolder: string, filename: string, source: string): boolean;
export declare function deleteTrack(projectFolder: string, filename: string): boolean;
/** Absolute path used by TrackRunner when starting a run. */
export declare function resolveTrackPath(projectFolder: string, filename: string): string;
export declare function listGlobalTracks(username: string): TrackFileInfo[];
export declare function loadGlobalTrack(username: string, filename: string): string | null;
export declare function saveGlobalTrack(username: string, filename: string, source: string): boolean;
export declare function deleteGlobalTrack(username: string, filename: string): boolean;
export declare function resolveGlobalTrackPath(username: string, filename: string): string;
export declare function saveSidecar(projectFolder: string, filename: string, sidecar: unknown): boolean;
export declare function loadSidecar(projectFolder: string, filename: string): unknown | null;
export declare function deleteSidecar(projectFolder: string, filename: string): void;
//# sourceMappingURL=store.d.ts.map