/**
 * GET /api/cloud-providers/github/auth-status
 *
 * Returns { authenticated: boolean } based on the local `gh` CLI state.
 */
import { NextResponse } from 'next/server';
import { resolve } from '../../../../../lib/server-container.js';
export const dynamic = 'force-dynamic';
export async function GET() {
    try {
        const useCase = resolve('EnsureGhAuthenticatedUseCase');
        const result = await useCase.execute();
        return NextResponse.json(result);
    }
    catch (error) {
        return NextResponse.json({ error: error instanceof Error ? error.message : 'Internal server error' }, { status: 500 });
    }
}
