teamforge / tasks /task_registry.py
Your Name
fix(OpenEnv): implement system-wide [0.1, 0.9] boundary scrub for Phase 2 compliance
efa2d2a
raw
history blame contribute delete
763 Bytes
"""Task registry — single source of truth for all available tasks."""
from __future__ import annotations
from typing import Any, Dict
from . import easy_task, medium_task, hard_task, bonus_task
TASK_REGISTRY: Dict[str, Any] = {
easy_task.TASK_ID: easy_task,
medium_task.TASK_ID: medium_task,
hard_task.TASK_ID: hard_task,
bonus_task.TASK_ID: bonus_task,
}
# The 3 scored tasks for the hackathon (easy, medium, hard)
SCORED_TASK_IDS = [
easy_task.TASK_ID,
medium_task.TASK_ID,
hard_task.TASK_ID,
]
ALL_TASK_IDS = list(TASK_REGISTRY.keys())
def get_task(task_id: str) -> Any:
if task_id not in TASK_REGISTRY:
raise KeyError(f"Unknown task '{task_id}'. Available: {ALL_TASK_IDS}")
return TASK_REGISTRY[task_id]