/** * App-scoped run directory hierarchy. * * When `--app ` is provided, artifacts (term casts, sim mp4s, recording * sessions) live under: * * //// * * `run` is auto-generated from the local time (HHMM) at first call so a * single test run groups its artifacts, but can be overridden via SWEETLINK_RUN. * * Without `--app`, callers fall back to the historical flat layout under * `/` so existing scripts and the daemon's own state files keep * working unchanged. */ export interface RunSlotOptions { /** Project root or other absolute base — usually findProjectRoot(). */ baseDir: string; /** Logical app name. When omitted, returns the flat layout (just baseDir). */ app?: string; /** Override the run identifier. Defaults to env SWEETLINK_RUN or HHMM. */ run?: string; /** Subdirectory inside the run slot. Omit for the session root. */ kind?: 'term' | 'sim' | 'session'; } /** * Slugify a user-supplied namespace segment into something safe to use as a * directory name. Without this, `--app ../../../tmp/x` would let a malicious * caller (CI template, package.json script, batch JSON producer) write * artifacts anywhere the user can write — including ~/.ssh/authorized_keys * or LaunchAgents. Limited charset matches the existing --label slugifier. */ export declare function slugifyNamespace(value: string): string; /** * Resolve the artifact directory for a capture. * - With `app`: ///[/] * - Without: [/] (back-compat with .sweetlink/term, etc.) * * `app` and `run` are slugified to prevent path traversal — anyone who can * influence a sweetlink invocation (npm script, CI template, batch stdin) * could otherwise pass `../../../tmp/x` and target arbitrary writable paths. */ export declare function runSlot(options: RunSlotOptions): string; /** Reset internal caches — kept for back-compat with existing tests; now a no-op. */ export declare function _resetRunCache(): void; //# sourceMappingURL=runs.d.ts.map