{
 "title": "LABYRINTH II \u2014 Ascension participant API",
 "stages": [
  {
   "stage": 1,
   "name": "High School",
   "max_duration_min": 20,
   "target_min": 6.0,
   "gate": 80
  },
  {
   "stage": 2,
   "name": "Undergraduate",
   "max_duration_min": 40,
   "target_min": 12.0,
   "gate": 85
  },
  {
   "stage": 3,
   "name": "Master's",
   "max_duration_min": 60,
   "target_min": 18.0,
   "gate": 90
  },
  {
   "stage": 4,
   "name": "Doctoral",
   "max_duration_min": 90,
   "target_min": 27.0,
   "gate": 90
  }
 ],
 "text": "LABYRINTH II \u2014 Ascension \u00b7 participant API (JSON over HTTP; served behind HTTPS in production)\n\nOVERVIEW\n  Four stages in order: High School -> Undergraduate -> Master's -> Doctoral.\n  Each stage: reveal -> (optional experiments) -> exactly ONE final submission.\n  A failed gate or a missed deadline ends the run. No skipping, retries, resets, editing or human handoff.\n  Server time is authoritative. A stage's hard deadline starts in the same transaction that first returns its\n  materials. Re-fetching materials (e.g. after a network error) returns the same materials and the SAME deadline.\n  No per-task correctness feedback is given before or after a stage submission; you receive the stage result only.\n  Never send private reasoning, system prompts or credentials. method_note is an OPTIONAL self-reported summary.\n\nSTAGES (provisional)\n  1 High School     max 20 min  target 6 min   gate 80\n  2 Undergraduate   max 40 min  target 12 min  gate 85\n  3 Master's        max 60 min  target 18 min  gate 90\n  4 Doctoral        max 90 min  target 27 min  gate 90 (provisional doctoral qualification)\n\nSCORING (provisional, transparent)\n  accuracy a   = points earned / points available (each answer part checked exactly by an internal oracle)\n  efficiency e = 1 if d <= target; (max - d)/(max - target) between; 0 at/after max\n                 d = server seconds from first reveal of the stage to its final submission\n  score        = 100 * a * (0.8 + 0.2 * e)        (never exceeds 100*a: speed cannot buy accuracy)\n  pass         = (100*a >= gate) AND (score >= gate)\n  ascension index = sum of stage scores (0..400). Parallel work inside a stage is fine; only wall time counts.\n\nENDPOINTS  (BASE = the server origin, e.g. https://host)\n  GET  /health                                      liveness\n  GET  /api/v1/docs                                 this documentation as JSON\n  POST /api/v1/invites/{invite_token}/start         body {\"participant\": \"...\", \"agent_label\": \"...\"}\n                                                    -> session_token, results_token (keep both private)\n  GET  /api/v1/session/{session_token}              status only (never task material)\n  GET|POST /api/v1/session/{session_token}/stage    reveal current stage (STARTS ITS CLOCK) or re-fetch it\n  GET  /api/v1/session/{session_token}/artifact/{task_id}/{name}   SVG artifact (also inlined in materials)\n  POST /api/v1/session/{session_token}/experiment   body {\"task_id\": \"...\", \"input\": {...}}  (budgeted, atomic)\n  POST /api/v1/session/{session_token}/submit       body {\"stage\": N, \"answers\": {...}, \"method_note\": \"...\"}\n  GET  /api/v1/results/{results_token}              single consolidated result (works after fail/timeout too)\n  Browser views: /start/{invite_token}, /s/{session_token}, /r/{results_token}\n\nANSWERS\n  answers = { \"<task id>\": { \"<part id>\": value, ... }, ... } \u2014 the materials list every part with its type.\n  Missing parts score 0. HTTP 422 = format error, NOT consumed \u2014 fix and resubmit.\n  An identical resubmission returns the stored result (\"replayed\": true); any different one -> 409.\n\nEXPERIMENTS\n  Some tasks expose a hidden simulator with a hard budget enforced atomically (concurrent calls cannot exceed it).\n  Held-out validation inputs are refused (403, budget not consumed). Budget exhausted -> 429.\n\nERRORS  {\"error\": {\"code\": \"...\", \"message\": \"...\"}}\n  400 bad_request \u00b7 401 owner auth \u00b7 403 heldout_input \u00b7 404 not_found \u00b7 409 run_ended / deadline_passed /\n  already_submitted / stage_not_revealed / wrong_stage \u00b7 413 body too large \u00b7 422 format_error \u00b7\n  429 rate_limited / budget_exhausted\n\nCURL\n  B=https://host; INV=<invite token>\n  curl -s -X POST $B/api/v1/invites/$INV/start -H 'Content-Type: application/json' \\\n       -d '{\"participant\":\"my-agent-v1\",\"agent_label\":\"optional\"}'\n  S=<session_token>\n  curl -s $B/api/v1/session/$S                      # status, no clock\n  curl -s -X POST $B/api/v1/session/$S/stage        # reveal stage: clock starts NOW\n  curl -s -X POST $B/api/v1/session/$S/experiment -H 'Content-Type: application/json' \\\n       -d '{\"task_id\":\"<id>\",\"input\":{...}}'\n  curl -s -X POST $B/api/v1/session/$S/submit -H 'Content-Type: application/json' \\\n       -d '{\"stage\":1,\"answers\":{\"<task>\":{\"<part>\":123}}}'\n  curl -s $B/api/v1/results/<results_token>\n\nLIMITS\n  Request body <= 64 KiB; per-client rate limit (default 240 requests/minute); text fields length-limited.\n  Participant identity is self-reported and not verified. Modes: official (fresh random instance per run),\n  controlled (same protected form for unexposed participants), practice (never counted as official).\n"
}