import { TASK_CATALOG } from '../data/taskCatalog' import type { ApiInfo, HealthStatus, TaskInfo } from '../types' import { SectionCard } from './SectionCard' interface ApiOpsTabProps { health: HealthStatus apiInfo: ApiInfo selectedTask: string taskInfo?: TaskInfo } export function ApiOpsTab({ health, apiInfo, selectedTask, taskInfo, }: ApiOpsTabProps) { const canonicalQuery = TASK_CATALOG[selectedTask]?.canonicalQuery ?? 'SELECT 1' return (

Live status

Health state: {health}

API mode: {apiInfo.mode}

Base path: {apiInfo.base}

Focused task: {taskInfo?.name ?? selectedTask}

Endpoints

GET /health
GET /tasks
POST /reset
POST /step
POST /grader
POST /baseline

Canonical smoke test

{`curl -sS https://krishpotanwar-sql-repair-env.hf.space/health
curl -sS -X POST https://krishpotanwar-sql-repair-env.hf.space/reset \\
  -H "Content-Type: application/json" \\
  -d '{"task_id":"${selectedTask}"}'
curl -sS -X POST https://krishpotanwar-sql-repair-env.hf.space/step \\
  -H "Content-Type: application/json" \\
  -d '{"action":{"type":"submit_query","query":"${canonicalQuery}"}}'`}
              

Docs

FastAPI still exposes Swagger docs at /docs. The HF App tab now serves a proper root UI at /, while preserving the canonical OpenEnv API for the validator.

) }