import { g as getRichRequest } from './pending-requests-8rWjrF6d.js';
import { v as validateAuth } from './auth-DuunT7Cg.js';
import { j as json } from './index-lhTMmBNn.js';
import 'better-sqlite3';
import 'fs';
import 'path';
import './shooter-home-4f_HkdGI.js';
import 'os';
import './shared-server-DaWdgxVh.js';
import 'crypto';

const GET = ({ params, request }) => {
  const authErr = validateAuth(request);
  if (authErr) {
    return authErr;
  }
  const requestId = params.requestId;
  if (!requestId) {
    return json({ error: "requestId path parameter is required" }, { status: 400 });
  }
  const entry = getRichRequest(requestId);
  if (!entry) {
    return json({ error: "Request not found or expired" }, { status: 404 });
  }
  const payload = {
    options: entry.options,
    question: entry.question ?? "",
    requestId: entry.requestId,
    responseKind: entry.responseKind,
    toolInput: entry.toolInput,
    toolName: entry.toolName
  };
  return json(payload);
};

export { GET };
//# sourceMappingURL=_server.ts-DFI6mMYL.js.map
