""" tasks/registry.py — Curriculum stage registry for OpenSOC. The four stages map onto the `tasks` block in `openenv.yaml`. Each entry controls how `OpenSOCEnv` materializes incidents in `defender_only` mode (SFT warmstart, eval, simple smoke tests). In `self_play` mode, the attacker LLM drives the distribution and these defaults are unused. """ from __future__ import annotations from typing import Dict, TypedDict class StageConfig(TypedDict): description: str difficulty: str seed_offset: int STAGE_REGISTRY: Dict[str, StageConfig] = { "stage1_basic": { "description": ( "Single-event incidents from a small set of unambiguous templates. " "Used to bootstrap defender format learning." ), "difficulty": "easy", "seed_offset": 1_000, }, "stage2_multi": { "description": ( "Multi-event incidents where the malicious signal is spread across " "a short log window." ), "difficulty": "medium", "seed_offset": 2_000, }, "stage3_mixed": { "description": ( "Benign decoy events interleaved with malicious ones; tests " "false-positive suppression." ), "difficulty": "hard", "seed_offset": 3_000, }, "stage4_adversarial": { "description": ( "Attacker-controlled distribution (self-play) or held-out " "adversarial set (eval)." ), "difficulty": "adversarial", "seed_offset": 4_000, }, } __all__ = ["STAGE_REGISTRY", "StageConfig"]