import { proxyWorker, withOwnedJob } from '@/lib/agent-worker-proxy';

export const POST = async (
  _request: Request,
  context: { params: Promise<{ jobId: string }> },
) =>
  await withOwnedJob(
    context,
    async (jobId) =>
      await proxyWorker(jobId, 'agent/abort', { method: 'POST' }),
  );
