/**
 * Show a specific session by ID.
 *
 * @task T4782
 * @epic T4654
 */
import { ExitCode } from '@cleocode/contracts';
import { CleoError } from '../errors.js';
import { getAccessor } from '../store/data-accessor.js';
/**
 * Show a specific session.
 * Looks in active sessions first, then session history.
 * Throws CleoError if not found.
 */
export async function showSession(projectRoot, sessionId) {
    const accessor = await getAccessor(projectRoot);
    const sessions = await accessor.loadSessions();
    const session = sessions.find((s) => s.id === sessionId);
    if (session) {
        return session;
    }
    throw new CleoError(ExitCode.SESSION_NOT_FOUND, `Session '${sessionId}' not found`);
}
//# sourceMappingURL=session-show.js.map