import { NextResponse } from 'next/server'
import { checkAgentAuth, checkCallbackSecret } from '@/lib/agent-auth'

export const runtime = 'nodejs'

// Focus is now a pinboard of reminders/lists — it no longer owns items to
// topic-group. These endpoints are kept as no-ops so the Mac organize routine
// (which still fetches/posts here) keeps working until it drops the step.
export async function GET(req: Request) {
  if (!checkAgentAuth(req)) return NextResponse.json({ error: 'unauthorized' }, { status: 401 })
  return NextResponse.json({ items: [] })
}

export async function POST(req: Request) {
  if (!checkAgentAuth(req)) return NextResponse.json({ error: 'unauthorized' }, { status: 401 })
  if (!checkCallbackSecret(req)) return NextResponse.json({ error: 'bad callback secret' }, { status: 403 })
  return NextResponse.json({ ok: true, updated: 0 })
}
