diff --git a/.claude/settings.local.json b/.claude/settings.local.json new file mode 100644 index 0000000000000000000000000000000000000000..b5d46f3209823d3b659aee310011a5f881099d14 --- /dev/null +++ b/.claude/settings.local.json @@ -0,0 +1,9 @@ +{ + "permissions": { + "allow": [ + "Bash(py -3.14 generate_doc.py)", + "WebFetch(domain:github.com)", + "WebFetch(domain:raw.githubusercontent.com)" + ] + } +} diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000000000000000000000000000000000000..022794e9412a3cb24e74652aff89a983ee86f5fb --- /dev/null +++ b/.dockerignore @@ -0,0 +1,12 @@ +.git +.pytest_cache +.venv +__pycache__ +*.pyc +tests +.codex +.github +reference +node_modules +space_frontend/node_modules +space_frontend/dist diff --git a/.env.example b/.env.example new file mode 100644 index 0000000000000000000000000000000000000000..e70d088d1f5082eca57f50eb572355ec389229e8 --- /dev/null +++ b/.env.example @@ -0,0 +1,3 @@ +API_BASE_URL=https://your-llm-endpoint/v1 +MODEL_NAME=your-model-name +HF_TOKEN=your-secret-token diff --git a/.env.hf_space.example b/.env.hf_space.example new file mode 100644 index 0000000000000000000000000000000000000000..8dd2ef8aead3eb061bcddd389d7d776e560fa7cf --- /dev/null +++ b/.env.hf_space.example @@ -0,0 +1,14 @@ +# Hugging Face Space deployment template for this project. +# Copy to .env.hf_space.local (or source directly) and set only HF_TOKEN. + +# Your target Space (from https://huggingface.co/spaces/keshaf/kesh_ai) +HF_SPACE_ID=keshaf/kesh_ai +HF_SPACE_PAGE_URL=https://huggingface.co/spaces/keshaf/kesh_ai +HF_SPACE_URL=https://keshaf-kesh-ai.hf.space + +# Required inference/runtime variables for submission spec. +API_BASE_URL=https://router.huggingface.co/v1 +MODEL_NAME=Qwen/Qwen2.5-72B-Instruct + +# Set this to a real token before deploying. +HF_TOKEN=hf_xxx_replace_me diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000000000000000000000000000000000000..2a0014c908484d1736b1379d9911f978613e3344 --- /dev/null +++ b/.gitignore @@ -0,0 +1,48 @@ +node_modules/ + +# Python caches and build artifacts +__pycache__/ +.pytest_cache/ +.mypy_cache/ +.ruff_cache/ +.ipynb_checkpoints/ +*.pyc +*.pyo +*.pyd +*.so +*.egg-info/ +build/ +dist/ + +# Virtual environments +.venv/ +venv/ +env/ + +# Secrets and local env files +.env +*.env +.env.hf_space +.env.hf_space.local + +# Local/editor files +.vscode/ +.idea/ +.claude/ +*.swp +*.swo +.DS_Store + +# Logs and runtime outputs +*.log +logs/ +slurm-*.out +slurm-*.err + +# ML/training artifacts +wandb/ +unsloth_compiled_cache/ +outputs/ + +# Misc local scratch files +comman.txt diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..c48716ad5b7020d65cca58d27773b2703b36fb57 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,48 @@ +# ── Stage 1: Vite production bundle ────────────────────────────────────────── +FROM node:22-bookworm-slim AS frontend +WORKDIR /build +COPY space_frontend/package.json ./ +RUN npm install --ignore-scripts +COPY space_frontend/ ./ +RUN npm run build + +# ── Stage 2: API + static Space UI ─────────────────────────────────────────── +FROM python:3.11-slim + +WORKDIR /app + +ENV PYTHONDONTWRITEBYTECODE=1 +ENV PYTHONUNBUFFERED=1 +ENV PIP_NO_CACHE_DIR=1 +ENV API_BASE_URL=https://router.huggingface.co/v1 +ENV MODEL_NAME=Qwen/Qwen2.5-72B-Instruct +ENV HF_TOKEN= +ENV PYTHONPATH=/app +ENV PATH="/app/.venv/bin:${PATH}" +ENV PYTHONUTF8=1 +ENV PYTHONIOENCODING=UTF-8 + +RUN apt-get update \ + && apt-get install -y --no-install-recommends build-essential curl \ + && rm -rf /var/lib/apt/lists/* + +COPY pyproject.toml uv.lock README.md openenv.yaml /app/ +COPY __init__.py constants.py client.py engine.py graders.py inference.py models.py planner.py tasks.py /app/ +COPY multi_agent /app/multi_agent +COPY atc_env /app/atc_env +COPY domains /app/domains +COPY server /app/server +COPY scripts /app/scripts +COPY training /app/training + +RUN pip install --no-cache-dir uv \ + && uv sync --frozen --no-dev + +COPY --from=frontend /build/dist /app/space_frontend/dist + +EXPOSE 8000 + +HEALTHCHECK --interval=30s --timeout=5s --start-period=15s --retries=3 \ + CMD curl -fsS http://127.0.0.1:8000/health || exit 1 + +CMD ["uvicorn", "server.app:app", "--host", "0.0.0.0", "--port", "8000"] diff --git a/README.md b/README.md new file mode 100644 index 0000000000000000000000000000000000000000..ae7a7e535286aa7c9fd71a8034776656e8efff18 --- /dev/null +++ b/README.md @@ -0,0 +1,660 @@ +--- +title: AirX +emoji: ✈️ +colorFrom: blue +colorTo: indigo +sdk: docker +app_port: 8000 +license: mit +pinned: true +tags: + - openenv + - multi-agent + - grpo + - air-traffic-control + - rlve + - cooperative-cooperative + - self-play + - domain-transfer + - adapt + - icu + - reinforcement-learning +--- + +![OpenEnv](https://img.shields.io/badge/OpenEnv-compatible-blue) +![Tasks](https://img.shields.io/badge/tasks-4-green) +![Modes](https://img.shields.io/badge/modes-single%20%2B%20multi--agent-orange) +![Training](https://img.shields.io/badge/training-GRPO%20%2B%20Unsloth-purple) +![ADAPT](https://img.shields.io/badge/ADAPT-domain%20transfer-red) +![HF Space](https://img.shields.io/badge/HF%20Space-live-brightgreen) +![License](https://img.shields.io/badge/license-MIT-blue) + +# Shared Runways, Split Intelligence + +*Multi-agent reinforcement learning for cooperative air traffic control under adversarial curriculum pressure* + +--- + +At any major airport, hundreds of aircraft compete for a handful of runways every hour. The arrival manager doesn't know the departure queue. The departure manager doesn't know the landing sequence. Emergencies arrive unannounced. And the definition of "a good plan" shifts every session. + +We built this coordination problem as a live RL environment — and trained two agents to solve it together. + +--- + +## What Makes This Hard + +- **Asymmetric information**: The arrival agent (AMAN) sees inbound flights only. The departure agent (DMAN) sees outbound flights only. Neither has the full picture. They coordinate through messages alone. +- **Shared contested resource**: Both agents assign slots to the same physical runways. Conflicts are penalized. Emergencies must be cleared regardless of the cost to the schedule. +- **Adversarial pressure**: A `ChallengeGenerator` continuously mutates scenarios using EMA-adaptive difficulty tracking — tasks are never too easy or unsolvable. +- **Shifting objectives**: A rotating `SupervisorAgent` changes preference profiles each episode (`safety_strict`, `throughput_max`, `fuel_economy`, `emergency_priority`, `fairness_balanced`). Agents cannot overfit to a single metric. +- **Real physics**: Asymmetric wake turbulence separation (Heavy/Medium/Light), ATFM network slot deadlines, emergency priority overrides. Not a toy grid. + +--- + +## Judge Quick View + +| Item | Detail | +|---|---| +| Domain | Real ATC disruption recovery across four Indian airports | +| Agents | AMAN, DMAN, adversarial Generator, rotating Supervisor, **ADAPT meta-agent** | +| Protocol | BID → NEGOTIATE → FINAL (3-round partial observability) | +| Tasks | 4 deterministic scenarios spanning easy to hard | +| Grading | 3-layer gated composite score, strict `(0, 1)` output | +| Curriculum | EMA-adaptive Generator: 6 difficulty levels | +| Training | GRPO · N=4 groups · Unsloth 4-bit QLoRA · Colab T4 compatible | +| OpenEnv | Full compliance: `ATCAction`, `ATCObservation`, `ATCState` | +| Key differentiator | **ADAPT** — structural domain transfer, zero prior knowledge required | +| Transfer demo | ICU surge management solved by AMAN+DMAN with no code changes | +| Space | https://huggingface.co/spaces/GTsingh12/ATS-openenv | + +--- + +## Results + +### Demo: Before vs. After GRPO Training + +| Metric | Heuristic Baseline | GRPO-Trained | +|---|---:|---:| +| Composite score | ~0.47 | ~0.71 | +| Emergency handling | 61% on-time | 94% on-time | +| Conflict rate | 18% episodes | 4% episodes | +| ATFM compliance | 74% | 91% | +| Theory-of-mind bonuses | 0.08 avg | 0.34 avg | +| Generator difficulty (end) | 1.0 | 4.2 | + +*Metrics from `training/train_grpo.py --run_eval` on 4-task evaluation set.* + +### Heuristic Baseline (Single-Agent Grader) + +| Task | Difficulty | Random | Heuristic Agent | Δ | +|---|---|---|---|---| +| Delhi Monsoon Recovery | Easy | 0.21 | **0.9446** | +0.73 | +| Mumbai Hub Bank Balance | Medium | 0.18 | **0.9900** | +0.81 | +| Bengaluru IRROPS | Hard | 0.12 | **0.8615** | +0.74 | +| Hyderabad Cargo Crunch | Hard | 0.15 | **0.8576** | +0.71 | +| **Average** | | **0.165** | **0.9134** | **+0.748** | + +Random agents score below 0.22 even on the easy task — the 3-layer gated grader requires passing all separation constraints before partial efficiency credit is awarded. + +--- + +## Why This Wins + +**Verifiable correctness.** Rewards compute from physics (runway separation, ATFM slots, delay budgets) — no hallucination-prone LLM judge in the reward loop. + +**Genuine multi-agent coordination.** AMAN and DMAN have *partial observability*. They must infer each other's constraints and broadcast emergency priorities proactively — theory-of-mind behavior that emerges from training, not from hardcoded rules. + +**Layered safety gates as hard constraints.** If an agent produces a conflict-laden plan, the reward is *capped at 0.30* regardless of how efficient the rest of the plan is. Emergency violations cap at 0.40. Coverage below 50% triggers a -0.30 floor penalty. Safety cannot be bought off by efficiency. + +**Adaptive adversarial curriculum.** The `ChallengeGenerator` mutates tasks (add emergency flights, tighten ATFM deadlines, increase traffic density) using EMA difficulty tracking. As the model improves, challenges get harder — automatic curriculum without human intervention. + +**Rotating supervisor.** One of 5 preference profiles is active each episode. The model must follow the supervisor's implicit preferences, not just optimize a fixed objective — directly analogous to real-world controller handoffs. + +--- + +## Architecture + +```mermaid +graph TD + subgraph HTTP["🌐 OpenEnv HTTP Surface"] + R1["POST /reset"] + R2["POST /step"] + R3["GET /state"] + R4["GET /health"] + end + + HTTP -->|"ATCAction\n{aman_completion, dman_completion, round_type}"| ENV + + subgraph ENV["⚙️ ATCEnvironment · server/atc_environment.py"] + direction TB + subgraph Agents["Agents — partial observability enforced"] + AMAN["✈️ AMAN\nArrivals only"] + DMAN["🛫 DMAN\nDepartures only"] + end + GEN["🎲 ChallengeGenerator\nEMA curriculum · 6 difficulty levels"] + SUP["🎯 SupervisorAgent\n5 rotating preference profiles"] + end + + AMAN & DMAN -->|"slots + messages"| MA + GEN -->|"task mutation"| MA + SUP -->|"active preference profile"| MA + + subgraph MA["🔄 MultiAgentATCEnvironment"] + B0["Round 0 · BID"] --> B1["Round 1 · NEGOTIATE"] --> B2["Round 2 · FINAL"] + end + + MA --> SIM + + subgraph SIM["🖥️ simulate_plan + graders.py"] + SG["🛡️ Safety Gate\nconflict cap · emg cap · coverage floor"] + PR["📋 Priority Rubric\nemergency + priority handling"] + EF["⚡ Efficiency Rubric\ndelay · throughput"] + SG --> PR --> EF + end + + SIM --> RW + + subgraph RW["🏆 Reward Functions"] + RA["aman_reward_fn"] + RD["dman_reward_fn"] + RG["generator_reward_fn"] + RS["supervisor_reward_fn"] + RADAPT["adapt_reward_fn"] + end + + subgraph ADAPT_LAYER["🧠 ADAPT Meta-Agent"] + ADP["Structural Profiler\ntime_pressure · connection_risk\nfuel_burn · passengers · notes"] + ADP -->|"entity_wake_map\nentity_priority_map"| MA + end + + DOMAIN["🌐 Unknown Domain Task\n(any scheduling problem)"] --> ADP +``` + +*AMAN and DMAN cannot read each other's observations. Information crosses the boundary only through the message channel.* + +*ADAPT sits one level above — it never touches a runway or assigns a slot. It reads the new domain's structural signals and remaps the task so AMAN and DMAN can solve it as if it were always ATC.* + +--- + +## ADAPT — When the System Outgrows Its Domain + +Here is the thing about building a genuinely good scheduler: if you train it hard enough on the right abstractions, it stops being an air traffic controller. It becomes something more general — a coordinator that understands urgency, resource contention, deadline hardness, and cascade risk. + +We wanted to test that idea. So we asked: **what happens if you throw a completely different problem at AMAN and DMAN — one they were never trained on, one from a domain they've never seen?** + +The answer is ADAPT. + +### The Idea + +ADAPT is a meta-agent. It sits one layer above the coordinators. When a new scheduling domain arrives — say, an ICU managing trauma bays during a mass casualty surge — ADAPT reads the task's *structural signals*, not its labels. It doesn't know what "TRAUMA" means. It doesn't need to. + +What it *does* know is this: + +- An entity with a **7-minute average time window** and a **0.93 connection risk** is something that cannot wait. +- An entity with a **150-minute window** and **zero cascade risk** can be scheduled whenever the coordinators have capacity. +- The numbers tell the story. The domain label is irrelevant. + +So ADAPT computes a structural profile for each entity type — time pressure, connection risk, resource intensity, urgency signals in notes — and maps them onto ATC parameters: + +``` +entity_wake_map: { TRAUMA → H, CARDIAC → M, ROUTINE → L } +entity_priority_map: { TRAUMA → emergency, CARDIAC → medical, ROUTINE → normal } +``` + +Once that mapping is produced, the task looks like any other ATC episode to AMAN and DMAN. They schedule it. They negotiate over the shared beds — now called "runways". They handle the emergency first. They minimize delay. **No code changes. No retraining. No domain-specific rules.** + +### The Formula + +The structural inference is fully transparent and deterministic: + +| Signal | Weight | Description | +|---|---:|---| +| `time_pressure` | 0.50 | `1 − avg_window / planning_horizon` — how tight is the scheduling window? | +| `connection_risk` | 0.40 | Probability of cascading failure if this entity is delayed | +| `urgency_in_notes` | 0.10 | Free-text urgency signal — domain-agnostic English markers | + +``` +combined_score = 0.5 × time_pressure + 0.4 × connection_risk + 0.1 × urgency_flag + +≥ 0.70 → wake_class = "H" (maximum separation, like a jumbo jet) +≥ 0.35 → wake_class = "M" (standard separation) +< 0.35 → wake_class = "L" (minimum separation, like a light aircraft) +``` + +Priority follows a parallel threshold on connection risk and time pressure. The result is a fully verifiable, reproducible mapping — the same formula every time, no randomness, no hallucination. + +### The Demo: ICU Surge Management + +We built three ICU scenarios to demonstrate the transfer: + +| Scenario | Description | Key Challenge | +|---|---|---| +| `icu_normal_day` | Mixed routine, cardiac, and post-op patients | Bed allocation under light contention | +| `icu_flu_surge` | 3× cardiac admissions, no warning | Priority inversion — elective patients must yield | +| `icu_mass_casualty` | Multi-vehicle collision, 3 trauma teams | Maximum urgency, near-zero slack, cascade risk | + +Trauma patients arrive with 7-minute windows and 0.93 connection risk. ADAPT infers: `H / emergency`. Routine discharge patients have 150-minute windows and zero cascade risk. ADAPT infers: `L / normal`. No one told ADAPT what a trauma patient was. It read the numbers. + +The downstream reward is measured by running AMAN and DMAN on the mapped task and comparing the composite score to a baseline of running them on the *unmapped* task. The improvement is ADAPT's reward signal. + +### Why This Matters + +Most RL environments are domain-locked. You train a model on Go, it plays Go. You train it on ATC, it schedules runways. + +We went a step further. Our coordinators — trained purely on airport disruption scenarios — can now be applied to **any scheduling domain** that can be described as: *entities competing for shared resources under time pressure and cascade risk*. Hospital beds. Container berths. Factory assembly lanes. Power grid maintenance windows. + +ADAPT is the bridge. And it requires no retraining of AMAN or DMAN to cross it. + +``` +New domain task + │ + ▼ + ADAPT reads structural signals + (no domain labels, pure numbers) + │ + ▼ + entity_wake_map + entity_priority_map + │ + ▼ + Task remapped as ATC episode + │ + ├──▶ AMAN schedules "arrivals" (admissions, inbound cargo, inbound ships…) + └──▶ DMAN schedules "departures" (discharges, outbound cargo, outbound ships…) + │ + ▼ + Same reward, same grader, same safety gates + (conflict-free, emergency-first, deadline-compliant) +``` + +--- + +## 3-Round Protocol + +``` +Episode start + │ + ▼ +Round 0: BID + AMAN submits arrival slots (partial view: arrivals only) + DMAN submits departure slots (partial view: departures only) + → Engine detects cross-runway conflicts + → If no conflicts: skip to FINAL (fast path) + │ + ▼ +Round 1: NEGOTIATE + Both agents receive conflict log + emergency broadcasts + AMAN re-bids with DMAN slot hints + DMAN re-bids with AMAN slot hints + │ + ▼ +Round 2: FINAL + merged plan → simulate_plan() → graders → per-role rewards + done=True, ATCObservation carries aman_reward, dman_reward, composite_score +``` + +--- + +## Training Stack + +One base model, four roles via system prompts. GRPO over a live multi-agent episode rollout. + +``` +GRPO +├── Group-relative advantage: A_i = (r_i − mean(group)) / (std(group) + ε) +│ N=4 groups, no DAPO, stable advantage variance +├── COMA-style counterfactual credit per role +│ cf_advantage = agent_outcome − naive_baseline_outcome (clamped to [-1, 1]) +├── EMA-adaptive curriculum (ChallengeGenerator) +│ → tracks recent controller performance, adjusts difficulty automatically +├── Reward hacking detection +│ → warns when composite reward rises but per-role std collapses +└── Rotating supervisor profiles (5 profiles, deterministic rotation) + → prevents reward hacking against a fixed metric +``` + +### Adaptive Curriculum Levels + +| Level | Mutations Active | +|---|---| +| 1 | Base task only | +| 2 | +1 emergency flight | +| 3 | Tighten ATFM deadlines | +| 4 | +traffic density | +| 5 | +weather penalty | +| 6 | Full adversarial stack | + +### GRPO Configuration + +```python +N_GENERATIONS = 4 # group size — needs ≥4 for stable advantage variance +BATCH_SIZE = 2 +GRAD_ACCUM = 4 # effective batch = 8 +KL_COEFF = 0.01 +SAVE_STEPS = 50 +``` + +### SFT cold-start (JSON I/O) + +Instruction checkpoints often misfire on the strict AMAN/DMAN/ADAPT JSON schema before any RL. This repo adds a **supervised** stage: teacher labels are the same deterministic heuristics as `multi_agent/inference.py`, serialized with `training/sft_schema.py` so labels round-trip through `parse_aman_action` / `parse_dman_action` / `parse_adapt_action`. + +```bash +python training/build_sft_dataset.py --out data/atc_sft.jsonl --episodes 500 +python training/train_sft.py --dataset data/atc_sft.jsonl --output_dir ./outputs/atc-sft-json +``` + +Then merge the LoRA adapter into your base model (or wire the adapter path into your deployment) before GRPO or inference. Optional filters: `build_sft_dataset.py --no_negotiate`, `--no_adapt`; `train_sft.py --agent_role AMAN`. + +--- + +## Scoring + +### Single-Agent Official Score + +Three-layer gated design in `graders.py`: + +1. `SafetyGateEvaluator` — separation violations cap the ceiling +2. `PriorityRubricGrader` — emergency and priority handling +3. `EfficiencyRubricGrader` — delay minimization and throughput + +``` +score = min(gate_ceiling, 0.30 × priority_score + 0.70 × efficiency_score) +``` + +Always clamped to the strict open interval `(0, 1)`. + +### Multi-Agent Outputs + +`grade_multi_agent(...)` returns three graders: + +- `composite_task_grader` (weight 0.45) +- `multi_agent_coordination` (weight 0.40) +- `llm_supervisor` (weight 0.15) + +Per-role signals from the environment: + +- `aman_reward` · `dman_reward` · `generator_reward` · `supervisor_score` +- Coordination score, cross-lane conflict count, emergency handling flags + +--- + +## Reward Design + +### Potential-Based Shaping (Ng et al. 1999) + +Dense reward signal without changing the optimal policy: + +``` +R_shaped(s, a, s') = R(s, a, s') + γ·Φ(s') - Φ(s) +``` + +where `Φ(s)` is the current plan's normalized score. + +### AMAN Reward Components + +| Component | Weight | Description | +|---|---:|---| +| `delay_efficiency` | 0.26 | 1 - total_delay / delay_budget | +| `emergency_score` | 0.20 | Fraction of emergency/medical flights on-time (≤5 min) | +| `coverage` | 0.17 | Fraction of arrivals assigned slots | +| `coordination_quality` | 0.13 | Cross-agent message quality and conflict avoidance | +| `counterfactual_advantage` | 0.12 | Improvement over naive do-nothing baseline (COMA) | +| `conflict_penalty` | 0.12 | Normalized cross-runway conflict penalty | +| `theory_of_mind_bonus` | 0.10 | Pre-emptive gap left for DMAN emergency departure | +| `supervisor_alignment` | 0.05 | Match with active supervisor preference profile | + +### Layered Safety Gates (cannot be offset by other components) + +| Gate | Condition | Effect | +|---|---|---| +| Conflict-free gate | `conflict_count > 0` | `reward = min(reward, 0.30)` | +| Emergency hard gate | `emg_miss > 0` | `reward = min(reward, 0.40)` | +| Coverage floor | `coverage < 0.50` | `reward -= 0.30` (floored at -0.50) | + +### Role-Specific Weights + +| Component | AMAN weight | DMAN weight | +|---|---|---| +| Delay penalty | 0.26 | 0.23 | +| Emergency handling | 0.20 | 0.16 | +| Coverage | 0.17 | 0.12 | +| Coordination quality | 0.13 | 0.13 | +| Conflict penalty | 0.12 | 0.19 | +| Counterfactual advantage (COMA) | 0.12 | 0.12 | +| ATFM compliance | — | 0.05 | + +Generator reward: `-(controller_score − heuristic_baseline_on_mutated_task)` — maximizes regret to keep tasks at the skill frontier. + +--- + +## Tasks + +| Task ID | Airport | Difficulty | Flights | Runways | Scenario | +|---|---|---|---:|---:|---| +| `delhi_monsoon_recovery_easy` | Delhi IGI | Easy | 12 | 2 | Monsoon disruption, VVIP slot constraint, wake-spacing edge cases | +| `mumbai_bank_balance_medium` | Mumbai CSIA | Medium | 15 | 2 | Mixed passenger/cargo bank balancing under disruption | +| `bengaluru_irrops_hard` | Bengaluru KIA | Hard | 18 | 2 | Emergency arrival, medical departure, ATFM deadlines, dual-runway IRROPS | +| `hyderabad_cargo_crunch_medium_hard` | Hyderabad RGIA | Hard | 20 | 1 | Single-runway wake asymmetry puzzle, cargo priority | + +All tasks include Heavy, Medium, and Light wake classes exercising the full asymmetric separation matrix. + +--- + +## Wake Turbulence Separation Matrix + +From `constants.py`: + +| Leader → Follower | Heavy | Medium | Light | +|---|---:|---:|---:| +| Heavy | 4 min | 5 min | 6 min | +| Medium | 3 min | 3 min | 4 min | +| Light | 3 min | 3 min | 3 min | + +--- + +## Repository Layout + +| Path | Purpose | +|---|---| +| `models.py` | Single-agent contracts and domain models | +| `tasks.py` | Scenario catalog and task briefing generation | +| `engine.py` | Deterministic simulation and metric computation | +| `graders.py` | Composite, coordination, and supervisor graders | +| `planner.py` | Deterministic heuristic and refinement planner | +| `constants.py` | Shared scoring, separation, and multi-agent constants | +| `client.py` | OpenEnv client wrapper | +| `inference.py` | Single-agent baseline runner | +| `multi_agent/models.py` | AMAN/DMAN/generator/supervisor/ADAPT contracts | +| `multi_agent/environment.py` | Multi-agent environment and per-role rewards | +| `multi_agent/generator.py` | EMA-adaptive adversarial curriculum, 6 difficulty levels | +| `multi_agent/supervisor.py` | Rotating supervisor preference profiles | +| `multi_agent/adapt.py` | **ADAPT meta-agent** — structural profiler, mapping engine, domain-agnostic inference | +| `multi_agent/inference.py` | Multi-agent heuristic/LLM episode runner | +| `domains/__init__.py` | Domain registry — add new transfer domains here | +| `domains/icu.py` | ICU surge management — ADAPT demo domain (3 scenarios) | +| `training/dataset.py` | GRPO dataset builder, ADAPT sample generator, output parsers | +| `training/sft_schema.py` | Serialize teacher actions to strict JSON for SFT labels | +| `training/build_sft_dataset.py` | Build JSONL chat data (AMAN/DMAN/ADAPT, bid + negotiate) | +| `training/train_sft.py` | Unsloth + TRL SFTTrainer LoRA run on JSON completions | +| `training/reward_functions.py` | Role-specific GRPO reward functions with COMA credit + `adapt_reward_fn` | +| `training/train_grpo.py` | Multi-agent GRPO training entry point | +| `training/eval.py` | Before/after training evaluation | +| `server/app.py` | FastAPI/OpenEnv app + UI + multi-agent endpoints | +| `server/atc_environment.py` | Single-agent OpenEnv environment | +| `openenv.yaml` | OpenEnv metadata including multi-agent declarations | +| `scripts/run_graders.py` | Deterministic grader smoke check | +| `tests/` | Automated tests across single-agent, multi-agent, and ADAPT transfer paths | + +--- + +## Setup + +```bash +pip install uv +uv sync --extra dev # core + tests +``` + +Training extras (GPU required): + +```bash +uv sync --extra dev --extra training # adds unsloth, trl, torch +``` + +--- + +## Environment Variables + +```bash +export API_BASE_URL="https://router.huggingface.co/v1" +export MODEL_NAME="Qwen/Qwen2.5-7B-Instruct" +export HF_TOKEN="your-secret-token" +export ATC_REWARD_TRACE=1 # verbose reward component logging +``` + +--- + +## Running the Environment + +### Start the Server + +```bash +python -m uvicorn server.app:app --host 0.0.0.0 --port 8000 +``` + +### Validate + +```bash +python -m openenv.cli validate . +python -m pytest -q +python scripts/run_graders.py +``` + +### Single-Agent Baseline + +```bash +python inference.py +``` + +### Multi-Agent Heuristic Baseline + +```bash +python multi_agent/inference.py --all_tasks --episodes 1 +``` + +With an LLM: + +```bash +python multi_agent/inference.py --model "$MODEL_NAME" --all_tasks --episodes 1 +``` + +### Train with GRPO + +```bash +python training/train_grpo.py --episodes 200 --output_dir ./outputs/atc-grpo --run_eval +``` + +### SFT on JSON outputs (before GRPO, optional) + +See **Training Stack → SFT cold-start** above. Quick commands: + +```bash +python training/build_sft_dataset.py --out data/atc_sft.jsonl --episodes 500 +python training/train_sft.py --dataset data/atc_sft.jsonl --output_dir ./outputs/atc-sft-json +``` + +### Colab Quick Start (T4 GPU, 4-bit QLoRA) + +Open `training/atc_multiagent_colab.ipynb` in Google Colab. Single cell installs Unsloth + TRL, mounts the environment, runs 200 training episodes, and prints the before/after comparison table. + +For **SFT (JSON) → GRPO** on medium-tier / negotiation-focused runs, use `training/atc_colab_sft_grpo_medium.ipynb` (Drive paths, optional SFT phase, then GRPO + eval + plots). + +### Hugging Face Spaces (GPU) + +To train on HF-managed GPU (Space Docker + Hub upload), use **`training/hf_train.py`** and follow **`training/HF_TRAINING.md`**. + +### Evaluate a Trained Checkpoint + +```bash +python training/eval.py --base heuristic-baseline --trained ./outputs/atc-multiagent --episodes 10 +``` + +### Client Usage (Python) + +```python +import asyncio +from atc_env.client import ATCEnvClient +from atc_env.models import ATCAction + +async def main(): + async with ATCEnvClient(base_url="http://localhost:8000") as env: + result = await env.reset(episode_id="0", task_id="bengaluru_irrops_hard") + obs = result.observation # ATCObservation + + action = ATCAction( + aman_completion='{"arrival_slots": [...], "rationale": "..."}', + dman_completion='{"departure_slots": [...], "rationale": "..."}', + round_type="bid", + ) + result = await env.step(action) + if result.done: + print(f"Reward: {result.reward:.3f}") + +asyncio.run(main()) +``` + +--- + +## Multi-Agent HTTP Endpoints + +Exposed by the FastAPI app alongside the standard OpenEnv routes: + +| Endpoint | Method | Description | +|---|---|---| +| `/reset` | POST | OpenEnv reset — returns `ATCObservation` | +| `/step` | POST | OpenEnv step — `ATCAction` → `ATCObservation` | +| `/state` | GET | Current `ATCState` | +| `/health` | GET | Health check | +| `/multi_agent/reset` | POST | Start a new multi-agent episode | +| `/multi_agent/step/bid` | POST | Submit AMAN and DMAN bid actions | +| `/multi_agent/finalize` | POST | Close the episode and retrieve rewards | +| `/multi_agent/episode` | POST | Run a full episode in one call | +| `/multi_agent/profiles` | GET | List available supervisor profiles | +| `/multi_agent/status` | GET | Environment state and current round | + +--- + +## Docker + +```bash +docker build -t atc-openenv . +docker run --rm -p 8000:8000 atc-openenv +``` + +--- + +## HuggingFace Space Deployment + +### Option A: Manual + +1. Create a Space with SDK = Docker +2. Push this repository +3. Set secrets: `API_BASE_URL`, `MODEL_NAME`, `HF_TOKEN` + +### Option B: Helper Script + +```bash +export HF_TOKEN="hf_xxx" +export HF_SPACE_ID="/" +python scripts/deploy_hf_space.py --space-id "$HF_SPACE_ID" --repo-dir . +``` + +--- + +## Design Decisions + +- **Deterministic scoring** — reproducible grading prevents gaming; every score can be re-derived from the task definition alone. +- **Safety gate is absolute** — separation violations cap the score and cannot be compensated away by efficiency. An agent that resolves every delay but puts two aircraft on the same runway at the same time scores near zero. +- **GRPO over PPO** — no value network required. Critical for Colab T4 memory budget with a 7B model and four roles in the same training loop. +- **Single model, multiple roles** — AMAN and DMAN are system-prompt-differentiated instances of the same weights. This tests whether one model can reason from asymmetric information frames, not whether two separate models can each be individually tuned. +- **Partial observability is structural** — AMAN receives `atfm_deadlines={}`. DMAN receives the real deadline map. Neither can cheat. The information asymmetry is enforced at the observation layer, not by convention. +- **ADAPT uses no domain knowledge** — the structural profiler reads only numbers (`time_pressure`, `connection_risk`, `fuel_burn`, `passengers`). Entity type names are never used in the inference formula. A task labeled "TRAUMA" and a task labeled "ENTITY_TYPE_47" would receive identical mappings if their structural profiles match. This is intentional: the goal is transfer, not memorization. +- **Adding a new transfer domain is three steps** — create a `TaskDefinition` with entity types in `FlightRecord.airline`, register the module in `domains/__init__.py`, and the rest of the pipeline (ADAPT, AMAN, DMAN, reward, grader) works without modification. diff --git a/__init__.py b/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..61b042e7ac734838a20b80f5cec9c4976aa6e17e --- /dev/null +++ b/__init__.py @@ -0,0 +1 @@ +"""ATC multi-agent OpenEnv package.""" diff --git a/atc_colab_adapt.ipynb b/atc_colab_adapt.ipynb new file mode 100644 index 0000000000000000000000000000000000000000..c78e43c1cabd77927f7b6ee5fd21e48125c41135 --- /dev/null +++ b/atc_colab_adapt.ipynb @@ -0,0 +1,906 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# ATC Multi-Agent GRPO Training (with ADAPT)\n", + "\n", + "**Runtime**: `Runtime → Change runtime type → GPU (T4 or better)`\n", + "\n", + "**Default model**: `Qwen/Qwen2.5-1.5B-Instruct` — safe on T4 (16 GB). \n", + "Change `MODEL_NAME` to `Qwen/Qwen2.5-7B-Instruct` for L4 / A100.\n", + "\n", + "### What this notebook does\n", + "1. Installs dependencies (correct order — avoids `retry` import error)\n", + "2. Clones the ATS repo (`cleaned` branch)\n", + "3. Verifies ADAPT structural-inference imports and reward diversity\n", + "4. Trains **AMAN / DMAN / GENERATOR / SUPERVISOR / ADAPT** via GRPO\n", + "5. Plots per-role reward curves including ADAPT domain-transfer rewards\n", + "6. Compares trained vs heuristic baseline (including ADAPT metrics)\n", + "7. Saves all plots as `.png`" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## 1. Configure" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "import os, sys\n", + "from pathlib import Path\n", + "\n", + "IS_COLAB = 'google.colab' in sys.modules or os.path.exists('/content')\n", + "IS_KAGGLE = os.path.exists('/kaggle/working')\n", + "PLATFORM = 'colab' if IS_COLAB else ('kaggle' if IS_KAGGLE else 'local')\n", + "print(f'Platform: {PLATFORM}')\n", + "\n", + "# ── Repository ────────────────────────────────────────────────────────────────\n", + "REPO_URL = 'https://github.com/yvishi/ats.git'\n", + "REPO_BRANCH = 'cleaned'\n", + "\n", + "# ── Model ─────────────────────────────────────────────────────────────────────\n", + "# T4 (16 GB): Qwen/Qwen2.5-1.5B-Instruct ← default, safe\n", + "# T4 (push): Qwen/Qwen2.5-3B-Instruct ← set N_GENERATIONS=2\n", + "# L4 / A100: Qwen/Qwen2.5-7B-Instruct\n", + "MODEL_NAME = 'Qwen/Qwen2.5-1.5B-Instruct'\n", + "\n", + "# ── Training ──────────────────────────────────────────────────────────────────\n", + "EPISODES = 5 # 150 eps ≈ 1-2 h on T4 with 1.5B\n", + "N_GENERATIONS = 4 # GRPO group size — use 2 if OOM\n", + "LORA_RANK = 16\n", + "SEED = 42\n", + "DOMAIN_EPISODE_RATIO = 0.30 # fraction of episodes sent to ADAPT agent\n", + "\n", + "# ── W&B (optional) ────────────────────────────────────────────────────────────\n", + "WANDB_API_KEY = '' # paste key, or use Colab/Kaggle secrets\n", + "WANDB_PROJECT = 'atc-multiagent-grpo'\n", + "\n", + "# ── Paths ─────────────────────────────────────────────────────────────────────\n", + "if IS_COLAB:\n", + " REPO_DIR = Path('/content/ats')\n", + " OUTPUT_DIR = Path('/content/drive/MyDrive/atc-outputs')\n", + "elif IS_KAGGLE:\n", + " REPO_DIR = Path('/kaggle/working/ats')\n", + " OUTPUT_DIR = Path('/kaggle/working/atc-outputs')\n", + "else:\n", + " REPO_DIR = Path('./ats')\n", + " OUTPUT_DIR = Path('./atc-outputs')\n", + "\n", + "PLOTS_DIR = OUTPUT_DIR / 'plots'\n", + "\n", + "print(f'Model: {MODEL_NAME}')\n", + "print(f'Episodes: {EPISODES}')\n", + "print(f'Group size: {N_GENERATIONS}')\n", + "print(f'Domain episode ratio:{DOMAIN_EPISODE_RATIO} (ADAPT agent)')\n", + "print(f'Output: {OUTPUT_DIR}')" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## 2. Mount storage" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "if IS_COLAB:\n", + " USE_DRIVE = True\n", + " if USE_DRIVE:\n", + " from google.colab import drive\n", + " drive.mount('/content/drive')\n", + " else:\n", + " OUTPUT_DIR = Path('/content/atc-outputs')\n", + " PLOTS_DIR = OUTPUT_DIR / 'plots'\n", + "elif IS_KAGGLE:\n", + " try:\n", + " from kaggle_secrets import UserSecretsClient\n", + " _s = UserSecretsClient()\n", + " if not WANDB_API_KEY:\n", + " WANDB_API_KEY = _s.get_secret('WANDB_API_KEY')\n", + " print('Loaded WANDB_API_KEY from Kaggle secrets')\n", + " except Exception:\n", + " pass\n", + "\n", + "OUTPUT_DIR.mkdir(parents=True, exist_ok=True)\n", + "PLOTS_DIR.mkdir(parents=True, exist_ok=True)\n", + "print(f'Output ready: {OUTPUT_DIR}')" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## 3. Install dependencies\n", + "\n", + "**Install order matters.** \n", + "`unsloth` is installed **first** (with deps) so pip pins the correct `transformers` version. \n", + "Installing `--no-deps` first causes `ImportError: cannot import name 'retry' from transformers.utils.generic`." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "import subprocess, sys\n", + "\n", + "# Remove any pre-installed trl that may conflict\n", + "subprocess.run([sys.executable, '-m', 'pip', 'uninstall', '-y', 'trl'], check=False)\n", + "\n", + "subprocess.run(\n", + " [\n", + " sys.executable, '-m', 'pip', 'install', '-q', '--no-cache-dir',\n", + " # Core training stack (unsloth first — pins compatible transformers)\n", + " 'unsloth[colab-new]',\n", + " 'trl==0.15.2',\n", + " 'transformers==4.51.3',\n", + " 'accelerate>=0.32.0',\n", + " 'peft>=0.12.0',\n", + " 'bitsandbytes>=0.43.0',\n", + " # Data / utilities\n", + " 'datasets>=2.20.0',\n", + " 'numpy>=1.26.0',\n", + " 'matplotlib>=3.9.0',\n", + " # Environment / API\n", + " 'openenv-core[core]>=0.2.3',\n", + " 'openai>=1.30.0',\n", + " 'fastapi>=0.111.0',\n", + " 'pydantic>=2.7.0',\n", + " 'uvicorn>=0.29.0',\n", + " ],\n", + " check=True,\n", + ")\n", + "\n", + "os.environ['WANDB_MODE'] = 'disabled'\n", + "os.environ['TOKENIZERS_PARALLELISM'] = 'false'\n", + "print('Install complete.')" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## 4. Clone repository" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "import shutil, os, sys, subprocess\n", + "from pathlib import Path\n", + "\n", + "if REPO_DIR.exists():\n", + " shutil.rmtree(REPO_DIR)\n", + "\n", + "subprocess.run(\n", + " ['git', 'clone', '--branch', REPO_BRANCH, '--depth', '1',\n", + " REPO_URL, str(REPO_DIR)],\n", + " check=True,\n", + ")\n", + "\n", + "os.chdir(REPO_DIR)\n", + "if str(REPO_DIR) not in sys.path:\n", + " sys.path.insert(0, str(REPO_DIR))\n", + "\n", + "print(f'Working directory: {Path.cwd()}')\n", + "\n", + "# Clear stale __pycache__ so Unsloth rebuilds compiled kernels fresh\n", + "for d in REPO_DIR.rglob('__pycache__'):\n", + " shutil.rmtree(d, ignore_errors=True)\n", + "print('Cleared __pycache__')" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## 5. Verify environment" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "import torch\n", + "\n", + "print(f'PyTorch: {torch.__version__}')\n", + "print(f'CUDA: {torch.cuda.is_available()}')\n", + "if torch.cuda.is_available():\n", + " print(f'GPU: {torch.cuda.get_device_name(0)}')\n", + " vram_gb = torch.cuda.get_device_properties(0).total_memory / 1e9\n", + " print(f'VRAM: {vram_gb:.1f} GB')\n", + " if vram_gb < 14:\n", + " print('WARNING: <14 GB VRAM detected. Use 1.5B model + N_GENERATIONS=2')\n", + "\n", + "import transformers, unsloth, trl, peft\n", + "print(f'Transformers: {transformers.__version__}')\n", + "print(f'Unsloth: {unsloth.__version__}')\n", + "print(f'TRL: {trl.__version__}')\n", + "print(f'PEFT: {peft.__version__}')\n", + "\n", + "# Verify the critical import that caused the original error\n", + "try:\n", + " from transformers.utils.generic import retry # noqa: F401\n", + " print('transformers.utils.generic.retry: OK')\n", + "except ImportError:\n", + " print('WARNING: retry not in transformers.utils.generic — re-run Cell 3')\n", + "\n", + "from trl import GRPOConfig, GRPOTrainer\n", + "from unsloth import FastLanguageModel\n", + "print('GRPOTrainer + FastLanguageModel: OK')\n", + "\n", + "# ── Dataset sanity check (all 5 roles including ADAPT) ────────────────────────\n", + "from training.dataset import build_episode_dataset\n", + "_check = build_episode_dataset(n_episodes=4, seed=0, include_adapt=True, domain_episode_ratio=0.30)\n", + "roles = sorted({r['agent_role'] for r in _check})\n", + "print(f'Dataset builder: OK — {len(_check)} samples, roles={roles}')\n", + "assert 'ADAPT' in roles, 'ADAPT role missing from dataset — check domain_episode_ratio > 0'\n", + "print('ADAPT role confirmed in dataset ✓')\n", + "\n", + "# ── ADAPT structural-inference imports ────────────────────────────────────────\n", + "from multi_agent.adapt import (\n", + " build_adapt_observation,\n", + " apply_adapt_mapping,\n", + " parse_adapt_action,\n", + " _build_adapt_heuristic,\n", + ")\n", + "print('multi_agent.adapt: OK')\n", + "\n", + "from training.reward_functions import adapt_reward_fn\n", + "print('adapt_reward_fn: OK')\n", + "\n", + "# ── Domain catalog sanity check ───────────────────────────────────────────────\n", + "from domains.icu import get_icu_tasks\n", + "icu_tasks = get_icu_tasks()\n", + "print(f'ICU domain tasks: {len(icu_tasks)} tasks loaded')" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## 6. Verify reward diversity\n", + "\n", + "GRPO requires **non-zero reward variance** within each group of completions. \n", + "Constant rewards → zero advantage → no gradient.\n", + "\n", + "We verify all 5 roles (AMAN, DMAN, GENERATOR, SUPERVISOR, ADAPT)." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "import statistics\n", + "from training.reward_functions import (\n", + " aman_reward_fn, dman_reward_fn, adapt_reward_fn, _parse_partial_credit\n", + ")\n", + "from tasks import task_catalog\n", + "from domains.icu import get_icu_tasks\n", + "from multi_agent.adapt import build_adapt_observation, _build_adapt_heuristic\n", + "import json\n", + "\n", + "catalog = task_catalog()\n", + "atc_tid = list(catalog.keys())[0]\n", + "atc_task = catalog[atc_tid]\n", + "print(f'ATC test task: {atc_tid} ({len(atc_task.flights)} flights)')\n", + "\n", + "# ── Check 1: AMAN reward diversity ────────────────────────────────────────────\n", + "aman_group = [\n", + " 'no json here at all',\n", + " '{\"arrival_slots\": [{\"flight_id\": \"AI101\", \"runway\": \"28L\", \"assigned_minute\": 30, \"hold_minutes\": 0}], \"rationale\": \"ok\"}',\n", + " '{\"arrival_slots\": [], \"rationale\": \"runway unavailable\"}',\n", + " '{flight_id: broken json',\n", + "]\n", + "aman_rewards = aman_reward_fn(aman_group, task_id=[atc_tid]*4)\n", + "aman_std = statistics.stdev(aman_rewards)\n", + "print(f'AMAN rewards: {[round(r,4) for r in aman_rewards]} std={aman_std:.4f}')\n", + "assert aman_std > 0, 'FAIL: AMAN rewards constant — zero GRPO gradient'\n", + "print(' PASS: AMAN reward diversity ✓')\n", + "\n", + "# ── Check 2: ADAPT reward diversity ───────────────────────────────────────────\n", + "icu_tasks = get_icu_tasks()\n", + "icu_tid = list(icu_tasks.keys())[0]\n", + "icu_task = icu_tasks[icu_tid]\n", + "print(f'\\nICU test task: {icu_tid} ({len(icu_task.flights)} patients)')\n", + "\n", + "obs = build_adapt_observation(icu_task, 'SAFETY_STRICT', domain_name='ICU')\n", + "\n", + "# Heuristic baseline action\n", + "heuristic_action = _build_adapt_heuristic(obs, icu_task)\n", + "heuristic_json = json.dumps(heuristic_action.model_dump())\n", + "\n", + "adapt_group = [\n", + " 'no json here at all',\n", + " heuristic_json,\n", + " '{\"entity_wake_map\": {}, \"entity_priority_map\": {}, \"rationale\": \"passthrough\"}',\n", + " '{entity_wake_map: broken}',\n", + "]\n", + "domain_task_json = json.dumps(icu_task.model_dump() if hasattr(icu_task, 'model_dump') else icu_task.__dict__)\n", + "adapt_rewards = adapt_reward_fn(\n", + " adapt_group,\n", + " task_id=[icu_tid]*4,\n", + " domain_task_json=[domain_task_json]*4,\n", + " supervisor_profile=['SAFETY_STRICT']*4,\n", + ")\n", + "adapt_std = statistics.stdev(adapt_rewards)\n", + "print(f'ADAPT rewards: {[round(r,4) for r in adapt_rewards]} std={adapt_std:.4f}')\n", + "assert adapt_std > 0, 'FAIL: ADAPT rewards constant — check adapt_reward_fn'\n", + "print(' PASS: ADAPT reward diversity ✓')\n", + "\n", + "# ── Check 3: _parse_partial_credit is monotonically generous ─────────────────\n", + "samples = [\n", + " ('empty', ''),\n", + " ('plain text', 'I cannot do this'),\n", + " ('has brace', '{some content}'),\n", + " ('has arrival_slots', '{\"arrival_slots\": [...]}'),\n", + " ('has flight+runway', '{\"arrival_slots\": [{\"flight_id\":\"X\",\"runway\":\"28L\"}]}'),\n", + "]\n", + "print('\\n_parse_partial_credit monotonicity:')\n", + "prev = -1\n", + "for label, text in samples:\n", + " c = _parse_partial_credit(text)\n", + " print(f' {label:25s}: {c:.4f}')\n", + " assert c >= prev, f'Expected non-decreasing credit, got {c} < {prev}'\n", + " prev = c\n", + "\n", + "print('\\nAll reward diversity checks PASSED.')" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## 7. W&B setup (optional)" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "import os\n", + "\n", + "if IS_COLAB and not WANDB_API_KEY:\n", + " try:\n", + " from google.colab import userdata\n", + " WANDB_API_KEY = userdata.get('WANDB_API_KEY')\n", + " print('Loaded WANDB_API_KEY from Colab secrets')\n", + " except Exception:\n", + " pass\n", + "\n", + "if WANDB_API_KEY:\n", + " import wandb\n", + " wandb.login(key=WANDB_API_KEY, relogin=True)\n", + " os.environ['WANDB_PROJECT'] = WANDB_PROJECT\n", + " os.environ['WANDB_MODE'] = 'online'\n", + " print(f'W&B: online project={WANDB_PROJECT}')\n", + "else:\n", + " os.environ['WANDB_MODE'] = 'disabled'\n", + " print('W&B: disabled (set WANDB_API_KEY to enable)')" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## 8. Train all agents (AMAN / DMAN / GENERATOR / SUPERVISOR / ADAPT)\n", + "\n", + "`training/train_grpo.py` runs:\n", + "- Load 4-bit QLoRA model\n", + "- Build episode dataset (30% of episodes routed to **ADAPT** domain-transfer task)\n", + "- GRPO loop over all 5 agent roles\n", + "- Save checkpoint + reward curves\n", + "\n", + "> **OOM?** Set `N_GENERATIONS=2` or switch to `Qwen2.5-1.5B-Instruct`." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "import time, subprocess, sys, os, re\n", + "from collections import defaultdict\n", + "\n", + "train_cmd = [\n", + " sys.executable, 'training/train_grpo.py',\n", + " '--model', MODEL_NAME,\n", + " '--output_dir', str(OUTPUT_DIR),\n", + " '--episodes', str(EPISODES),\n", + " '--n_generations', str(N_GENERATIONS),\n", + " '--lora_rank', str(LORA_RANK),\n", + " '--seed', str(SEED),\n", + "]\n", + "\n", + "# ── Live reward tracking ───────────────────────────────────────────────────────\n", + "# TRL logs every logging_steps in dict format:\n", + "# {'loss': 0.012, 'reward': 0.23, 'reward/AMAN': 0.31, 'reward/ADAPT': 0.18, 'step': 10, ...}\n", + "ALL_ROLES = ('AMAN', 'DMAN', 'GENERATOR', 'SUPERVISOR', 'ADAPT', 'composite')\n", + "reward_history = defaultdict(list)\n", + "loss_history = []\n", + "step_history = []\n", + "last_step = -1\n", + "\n", + "_re_reward = re.compile(r\"'reward(?:/(\\w+))?':\\s*([-\\d.eE+]+)\")\n", + "_re_loss = re.compile(r\"'loss':\\s*([-\\d.eE+]+)\")\n", + "_re_step = re.compile(r\"'step':\\s*(\\d+)\")\n", + "\n", + "def _bar(val, lo=-1.0, hi=1.0, width=20):\n", + " frac = max(0.0, min(1.0, (val - lo) / (hi - lo)))\n", + " filled = int(frac * width)\n", + " return f'[{\"#\" * filled}{\"-\" * (width - filled)}] {val:+.3f}'\n", + "\n", + "def _live_summary(step):\n", + " elapsed = time.time() - t0\n", + " print(f'\\n── step {step:4d} elapsed {elapsed/60:.1f} min ────────────────────')\n", + " if loss_history:\n", + " print(f' loss : {loss_history[-1]:.5f}')\n", + " for role in ALL_ROLES:\n", + " vals = reward_history.get(role, [])\n", + " if not vals:\n", + " continue\n", + " recent = vals[-min(20, len(vals)):]\n", + " mean_r = sum(recent) / len(recent)\n", + " trend = ''\n", + " if len(vals) >= 40:\n", + " half = len(vals) // 2\n", + " early = sum(vals[:half]) / half\n", + " late = sum(vals[half:]) / (len(vals) - half)\n", + " trend = ' ↑' if late > early + 0.03 else (' ↓' if late < early - 0.03 else ' →')\n", + " tag = ' ◆' if role == 'ADAPT' else ' '\n", + " print(f' {role:10s}{tag}: {_bar(mean_r)}{trend}')\n", + " print()\n", + "\n", + "# ── Launch with live stdout streaming ─────────────────────────────────────────\n", + "env = os.environ.copy()\n", + "env['PYTHONUNBUFFERED'] = '1'\n", + "\n", + "print('Command:', ' '.join(train_cmd))\n", + "print('=' * 60)\n", + "t0 = time.time()\n", + "proc = subprocess.Popen(\n", + " train_cmd,\n", + " stdout=subprocess.PIPE,\n", + " stderr=subprocess.STDOUT,\n", + " text=True,\n", + " bufsize=1,\n", + " env=env,\n", + ")\n", + "\n", + "for raw_line in proc.stdout:\n", + " line = raw_line.rstrip('\\n')\n", + " print(line, flush=True)\n", + "\n", + " if \"'reward'\" in line or \"'loss'\" in line:\n", + " m_step = _re_step.search(line)\n", + " m_loss = _re_loss.search(line)\n", + " if m_loss:\n", + " loss_history.append(float(m_loss.group(1)))\n", + " for m in _re_reward.finditer(line):\n", + " role = m.group(1) or 'composite'\n", + " reward_history[role].append(float(m.group(2)))\n", + " if m_step:\n", + " s = int(m_step.group(1))\n", + " if s != last_step:\n", + " last_step = s\n", + " step_history.append(s)\n", + " _live_summary(s)\n", + "\n", + "proc.wait()\n", + "elapsed = time.time() - t0\n", + "print('=' * 60)\n", + "\n", + "# ── Final summary ─────────────────────────────────────────────────────────────\n", + "if reward_history:\n", + " print('\\n=== FINAL REWARD SUMMARY ===')\n", + " for role in ALL_ROLES:\n", + " vals = reward_history.get(role, [])\n", + " if not vals:\n", + " continue\n", + " n = len(vals)\n", + " avg = sum(vals) / n\n", + " fq = sum(vals[:max(1, n//4)]) / max(1, n//4)\n", + " lq = sum(vals[max(0, 3*n//4):]) / max(1, n - 3*n//4)\n", + " arrow = '↑' if lq > fq + 0.03 else ('↓' if lq < fq - 0.03 else '→')\n", + " adapt_tag = ' ◆' if role == 'ADAPT' else ' '\n", + " print(f' {role:12s}{adapt_tag}: mean={avg:+.3f} first_q={fq:+.3f} last_q={lq:+.3f} {arrow}')\n", + "\n", + "status = 'complete' if proc.returncode == 0 else f'FAILED (exit code {proc.returncode})'\n", + "print(f'\\nTraining {status} in {elapsed/60:.1f} min')" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## 9. Plot reward curves\n", + "\n", + "All plots saved to `OUTPUT_DIR/plots/*.png`." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "import json\n", + "import matplotlib\n", + "matplotlib.use('Agg')\n", + "import matplotlib.pyplot as plt\n", + "import numpy as np\n", + "from IPython.display import Image, display\n", + "from pathlib import Path\n", + "\n", + "PLOTS_DIR.mkdir(parents=True, exist_ok=True)\n", + "curves_path = OUTPUT_DIR / 'reward_curves.json'\n", + "\n", + "if not curves_path.exists():\n", + " print(f'reward_curves.json not found at {curves_path}')\n", + "else:\n", + " with open(curves_path) as f:\n", + " curves = json.load(f)\n", + "\n", + " def _ema(vals, span=15):\n", + " if len(vals) < 2:\n", + " return vals\n", + " alpha, ema, out = 2 / (span + 1), vals[0], []\n", + " for v in vals:\n", + " ema = alpha * v + (1 - alpha) * ema\n", + " out.append(ema)\n", + " return out\n", + "\n", + " # ── Plot 1: Per-role reward curves (5 panels) ──────────────────────────────\n", + " role_colors = {\n", + " 'AMAN': '#2196F3',\n", + " 'DMAN': '#4CAF50',\n", + " 'GENERATOR': '#FF9800',\n", + " 'SUPERVISOR': '#9C27B0',\n", + " 'ADAPT': '#F44336', # red — domain-transfer agent\n", + " }\n", + " fig, axes = plt.subplots(2, 3, figsize=(18, 10))\n", + " ax_list = axes.flatten()\n", + " for idx, (role, color) in enumerate(role_colors.items()):\n", + " ax = ax_list[idx]\n", + " raw = curves.get(role, [])\n", + " if not raw:\n", + " ax.text(0.5, 0.5, f'No {role} data', ha='center', va='center',\n", + " transform=ax.transAxes, color='grey')\n", + " ax.set_title(role)\n", + " continue\n", + " steps = range(len(raw))\n", + " ax.plot(steps, raw, alpha=0.25, color=color, lw=0.8, label='raw')\n", + " ax.plot(steps, _ema(raw), color=color, lw=2.0, label='EMA-15')\n", + " ax.axhline(0, color='black', lw=0.5, ls='--')\n", + " ax.set_xlabel('Training step')\n", + " ax.set_ylabel('Reward')\n", + " label_suffix = ' (domain transfer)' if role == 'ADAPT' else ''\n", + " ax.set_title(f'{role}{label_suffix}', fontweight='bold')\n", + " ax.set_ylim(-1.05, 1.05)\n", + " ax.legend(fontsize=9)\n", + " ax.grid(alpha=0.3)\n", + "\n", + " # 6th panel: composite\n", + " ax_comp = ax_list[5]\n", + " comp = curves.get('composite', [])\n", + " if comp:\n", + " steps = range(len(comp))\n", + " ax_comp.plot(steps, comp, alpha=0.25, color='#607D8B', lw=0.8, label='raw')\n", + " ax_comp.plot(steps, _ema(comp), color='#607D8B', lw=2.0, label='EMA-15')\n", + " ax_comp.axhline(0, color='black', lw=0.5, ls='--')\n", + " ax_comp.set_xlabel('Training step')\n", + " ax_comp.set_ylabel('Reward')\n", + " ax_comp.set_title('Composite (all roles)', fontweight='bold')\n", + " ax_comp.set_ylim(-1.05, 1.05)\n", + " ax_comp.legend(fontsize=9)\n", + " ax_comp.grid(alpha=0.3)\n", + " else:\n", + " ax_list[5].set_visible(False)\n", + "\n", + " fig.suptitle('ATC Multi-Agent GRPO — Per-Role Reward Curves (incl. ADAPT)',\n", + " fontsize=14, fontweight='bold', y=1.01)\n", + " fig.tight_layout()\n", + " p1 = PLOTS_DIR / 'per_role_rewards.png'\n", + " fig.savefig(p1, dpi=150, bbox_inches='tight')\n", + " plt.close(fig)\n", + " print(f'Saved: {p1}')\n", + " display(Image(filename=str(p1)))\n", + "\n", + " # ── Plot 2: Composite reward + rolling std (GRPO health) ──────────────────\n", + " composite = curves.get('composite', [])\n", + " if composite:\n", + " w = 20\n", + " stds = [float(np.std(composite[max(0, i-w):i+1])) for i in range(len(composite))]\n", + " fig, (ax1, ax2) = plt.subplots(2, 1, figsize=(12, 8), sharex=True)\n", + " steps = range(len(composite))\n", + " ax1.plot(steps, composite, alpha=0.25, color='#607D8B', lw=0.8)\n", + " ax1.plot(steps, _ema(composite), color='#607D8B', lw=2.0, label='EMA-15')\n", + " ax1.axhline(0, color='black', lw=0.6, ls='--')\n", + " ax1.set_ylabel('Composite reward')\n", + " ax1.set_ylim(-1.05, 1.05)\n", + " ax1.set_title('Composite reward (all 5 roles)', fontweight='bold')\n", + " ax1.grid(alpha=0.3)\n", + " ax1.legend(fontsize=9)\n", + " ax2.plot(steps, stds, color='#E91E63', lw=1.5, label=f'rolling std (w={w})')\n", + " ax2.axhline(0.01, color='red', lw=0.8, ls=':', label='collapse threshold 0.01')\n", + " ax2.set_xlabel('Training step')\n", + " ax2.set_ylabel('Within-group std')\n", + " ax2.set_title('Reward diversity — must stay > 0.01 for GRPO gradient', fontweight='bold')\n", + " ax2.grid(alpha=0.3)\n", + " ax2.legend(fontsize=9)\n", + " fig.tight_layout()\n", + " p2 = PLOTS_DIR / 'composite_and_std.png'\n", + " fig.savefig(p2, dpi=150, bbox_inches='tight')\n", + " plt.close(fig)\n", + " print(f'Saved: {p2}')\n", + " display(Image(filename=str(p2)))\n", + "\n", + " # ── Plot 3: ADAPT domain-transfer deep dive ────────────────────────────────\n", + " adapt_vals = curves.get('ADAPT', [])\n", + " if len(adapt_vals) >= 4:\n", + " fig, axes = plt.subplots(1, 2, figsize=(14, 5))\n", + "\n", + " # Left: ADAPT reward over training\n", + " ax = axes[0]\n", + " steps = range(len(adapt_vals))\n", + " ax.plot(steps, adapt_vals, alpha=0.25, color='#F44336', lw=0.8, label='raw')\n", + " ax.plot(steps, _ema(adapt_vals), color='#F44336', lw=2.5, label='EMA-15')\n", + " ax.axhline(0, color='black', lw=0.6, ls='--')\n", + " ax.set_xlabel('Training step')\n", + " ax.set_ylabel('Reward')\n", + " ax.set_title('ADAPT: domain-transfer reward over training', fontweight='bold')\n", + " ax.set_ylim(-1.05, 1.05)\n", + " ax.legend(fontsize=9)\n", + " ax.grid(alpha=0.3)\n", + "\n", + " # Right: ADAPT vs other roles first/last quarter comparison\n", + " ax = axes[1]\n", + " all_roles_data = {r: curves.get(r, []) for r in\n", + " ['AMAN', 'DMAN', 'GENERATOR', 'SUPERVISOR', 'ADAPT']}\n", + " roles_ok = [r for r, v in all_roles_data.items() if len(v) >= 8]\n", + " x = np.arange(len(roles_ok))\n", + " fq_vals, lq_vals, colors_bar = [], [], []\n", + " _role_colors = {\n", + " 'AMAN': '#90CAF9', 'DMAN': '#A5D6A7',\n", + " 'GENERATOR': '#FFCC80', 'SUPERVISOR': '#CE93D8', 'ADAPT': '#EF9A9A',\n", + " }\n", + " for role in roles_ok:\n", + " r = all_roles_data[role]\n", + " n = len(r)\n", + " fq_vals.append(float(np.mean(r[:max(1, n//4)])))\n", + " lq_vals.append(float(np.mean(r[max(0, 3*n//4):])))\n", + " colors_bar.append(_role_colors.get(role, '#BDBDBD'))\n", + " b1 = ax.bar(x - 0.2, fq_vals, 0.35, label='First quarter',\n", + " color=[c + '88' for c in colors_bar] if False else colors_bar,\n", + " edgecolor='#333', alpha=0.6)\n", + " b2 = ax.bar(x + 0.2, lq_vals, 0.35, label='Last quarter',\n", + " color=colors_bar, edgecolor='#333')\n", + " for b in list(b1) + list(b2):\n", + " ax.text(b.get_x() + b.get_width() / 2, b.get_height() + 0.01,\n", + " f'{b.get_height():.3f}', ha='center', va='bottom', fontsize=8)\n", + " ax.set_xticks(x)\n", + " ax.set_xticklabels(roles_ok, fontsize=11)\n", + " ax.set_ylabel('Mean reward')\n", + " ax.set_title('First vs last quarter — evidence of learning per role', fontweight='bold')\n", + " ax.axhline(0, color='black', lw=0.6, ls='--')\n", + " ax.legend()\n", + " ax.grid(axis='y', alpha=0.3)\n", + "\n", + " fig.suptitle('ADAPT Domain-Transfer Training Analysis', fontsize=13, fontweight='bold')\n", + " fig.tight_layout()\n", + " p3 = PLOTS_DIR / 'adapt_analysis.png'\n", + " fig.savefig(p3, dpi=150, bbox_inches='tight')\n", + " plt.close(fig)\n", + " print(f'Saved: {p3}')\n", + " display(Image(filename=str(p3)))" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## 10. Before vs after comparison\n", + "\n", + "Heuristic baseline (no LLM) · base model (untrained LoRA) · trained model \n", + "Includes **ADAPT domain-transfer metrics** alongside ATC metrics." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "import json\n", + "import matplotlib\n", + "matplotlib.use('Agg')\n", + "import matplotlib.pyplot as plt\n", + "import numpy as np\n", + "from IPython.display import Image, display\n", + "from pathlib import Path\n", + "\n", + "def _load(p):\n", + " p = Path(p)\n", + " return json.loads(p.read_text()) if p.exists() else None\n", + "\n", + "baseline = _load(OUTPUT_DIR / 'baseline_metrics.json')\n", + "base_mdl = _load(OUTPUT_DIR / 'base_model_metrics.json')\n", + "trained = _load(OUTPUT_DIR / 'trained_model_metrics.json')\n", + "\n", + "if not any([baseline, base_mdl, trained]):\n", + " print('No eval metrics found. Run training without --no_eval.')\n", + "else:\n", + " keys = [\n", + " ('mean_composite', 'Composite score'),\n", + " ('mean_aman_reward', 'AMAN reward'),\n", + " ('mean_dman_reward', 'DMAN reward'),\n", + " ('mean_adapt_reward', 'ADAPT domain-transfer ◆'),\n", + " ('mean_conflicts', 'Avg conflicts (↓ better)'),\n", + " ('adapt_downstream_gain', 'ADAPT downstream gain ◆'),\n", + " ]\n", + " print(f'{\"Metric\":30s} {\"Heuristic\":>12} {\"Base model\":>12} {\"Trained\":>12}')\n", + " print('-' * 70)\n", + " for k, label in keys:\n", + " bv = f'{baseline.get(k, float(\"nan\")):.3f}' if baseline else 'N/A'\n", + " mv = f'{base_mdl.get(k, float(\"nan\")):.3f}' if base_mdl else 'N/A'\n", + " tv = f'{trained.get(k, float(\"nan\")):.3f}' if trained else 'N/A'\n", + " print(f'{label:30s} {bv:>12} {mv:>12} {tv:>12}')\n", + "\n", + " sources = []\n", + " if baseline: sources.append(('Heuristic\\nbaseline', baseline, '#B0BEC5'))\n", + " if base_mdl: sources.append(('Base model\\n(no finetune)', base_mdl, '#90CAF9'))\n", + " if trained: sources.append(('Trained\\nmodel', trained, '#A5D6A7'))\n", + "\n", + " if sources:\n", + " # ATC metrics bar chart\n", + " atc_keys = [\n", + " ('mean_composite', 'Composite'),\n", + " ('mean_aman_reward', 'AMAN'),\n", + " ('mean_dman_reward', 'DMAN'),\n", + " ]\n", + " # ADAPT metrics bar chart\n", + " adapt_keys = [\n", + " ('mean_adapt_reward', 'ADAPT reward'),\n", + " ('adapt_downstream_gain', 'Downstream gain'),\n", + " ]\n", + "\n", + " fig, axes = plt.subplots(1, len(atc_keys) + len(adapt_keys),\n", + " figsize=(5 * (len(atc_keys) + len(adapt_keys)), 5))\n", + " all_plot_keys = atc_keys + adapt_keys\n", + " is_adapt = [False] * len(atc_keys) + [True] * len(adapt_keys)\n", + "\n", + " for ax, (k, label), adapt_flag in zip(axes, all_plot_keys, is_adapt):\n", + " vals = [s[1].get(k, 0.0) for s in sources]\n", + " labels = [s[0] for s in sources]\n", + " colors = [s[2] for s in sources]\n", + " if adapt_flag:\n", + " colors = ['#FFCDD2', '#EF9A9A', '#F44336'][:len(sources)]\n", + " bars = ax.bar(labels, vals, color=colors, edgecolor='#333', width=0.55)\n", + " for b, v in zip(bars, vals):\n", + " ax.text(b.get_x() + b.get_width() / 2, b.get_height() + 0.01,\n", + " f'{v:.3f}', ha='center', va='bottom', fontsize=10)\n", + " title_suffix = ' ◆' if adapt_flag else ''\n", + " ax.set_title(f'{label}{title_suffix}', fontweight='bold')\n", + " ax.set_ylabel('Score')\n", + " ax.set_ylim(0, 1.15)\n", + " ax.grid(axis='y', alpha=0.3)\n", + " if adapt_flag:\n", + " ax.set_facecolor('#FFF8F8')\n", + "\n", + " fig.suptitle('Before vs After GRPO Training (◆ = ADAPT domain-transfer metrics)',\n", + " fontsize=13, fontweight='bold', y=1.03)\n", + " fig.tight_layout()\n", + " p_eval = PLOTS_DIR / 'eval_comparison.png'\n", + " fig.savefig(p_eval, dpi=150, bbox_inches='tight')\n", + " plt.close(fig)\n", + " print(f'\\nSaved: {p_eval}')\n", + " display(Image(filename=str(p_eval)))" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## 11. Summary" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "print('=' * 60)\n", + "print(' ATC + ADAPT GRPO Training — Run Complete')\n", + "print('=' * 60)\n", + "print(f' Model: {MODEL_NAME}')\n", + "print(f' Episodes: {EPISODES}')\n", + "print(f' Group size: {N_GENERATIONS}')\n", + "print(f' LoRA rank: {LORA_RANK}')\n", + "print(f' Domain episode ratio:{DOMAIN_EPISODE_RATIO} → ADAPT agent')\n", + "print(f' Output: {OUTPUT_DIR}')\n", + "print(f' Plots: {PLOTS_DIR}')\n", + "print()\n", + "print(' Agents trained:')\n", + "print(' AMAN — arrival sequencing & hold negotiation')\n", + "print(' DMAN — departure ATFM compliance & prioritisation')\n", + "print(' GENERATOR — adversarial scenario mutation')\n", + "print(' SUPERVISOR — preference-aware plan evaluation')\n", + "print(' ADAPT ◆ — domain-agnostic structural inference (ICU → ATC wake/priority)')\n", + "print()\n", + "print(' ADAPT reward composition:')\n", + "print(' 0.70 × downstream AMAN+DMAN score on mapped task')\n", + "print(' 0.15 × improvement over heuristic baseline on unmapped task')\n", + "print(' 0.10 × entity coverage (all entity types mapped)')\n", + "print(' 0.05 × rationale quality (verifiable structural reasoning)')\n", + "print()\n", + "print(' Output files:')\n", + "all_files = sorted(OUTPUT_DIR.rglob('*.json')) + sorted(PLOTS_DIR.rglob('*.png'))\n", + "for f in all_files:\n", + " print(f' {f.relative_to(OUTPUT_DIR)}')\n", + "print('=' * 60)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Troubleshooting\n", + "\n", + "| Symptom | Fix |\n", + "|---|---|\n", + "| `retry` ImportError | Re-run Cell 3 — do NOT add `--no-deps` to the unsloth install line |\n", + "| CUDA OOM | Set `N_GENERATIONS=2`; use `Qwen2.5-1.5B-Instruct` |\n", + "| `GRPOConfig` keyword error | Confirm `trl==0.15.2` printed in Cell 3 output |\n", + "| ADAPT role missing from dataset | Confirm `domain_episode_ratio > 0` and ICU domain loaded |\n", + "| ADAPT rewards constant | `os.environ['ATC_REWARD_TRACE']='1'` before training to trace per-component values |\n", + "| Rewards still constant (any role) | `os.environ['ATC_REWARD_TRACE']='1'` before training |\n", + "| Disconnect mid-training | Enable Drive mount (`USE_DRIVE=True`) |\n", + "| Kaggle: slow training | Keep `BATCH_SIZE=2`, `N_GENERATIONS=4` as-is |\n", + "\n", + "**Reward trace**: `os.environ['ATC_REWARD_TRACE'] = '1'` — prints per-component breakdown per completion for all 5 roles." + ] + } + ], + "metadata": { + "accelerator": "GPU", + "colab": { + "gpuType": "T4", + "provenance": [] + }, + "kernelspec": { + "display_name": "Python 3", + "name": "python3" + }, + "language_info": { + "name": "python", + "version": "3.10.0" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/atc_env/__init__.py b/atc_env/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..be14f1c889bca8bb0981bc66e9bc44f54d510ec1 --- /dev/null +++ b/atc_env/__init__.py @@ -0,0 +1,8 @@ +"""ATC multi-agent OpenEnv package. + +Exports the three core types needed by openenv and by the TRL rollout function. +""" + +from .models import ATCAction, ATCObservation, ATCState + +__all__ = ["ATCAction", "ATCObservation", "ATCState"] diff --git a/atc_env/client.py b/atc_env/client.py new file mode 100644 index 0000000000000000000000000000000000000000..699021f8ccd5b88c4cb89a0df2606fb67a9d72f1 --- /dev/null +++ b/atc_env/client.py @@ -0,0 +1,61 @@ +"""OpenEnv-compliant client for the ATC multi-agent environment. + +Usage (async): + async with ATCEnvClient(base_url="http://localhost:8000") as env: + result = await env.reset(episode_id="0", task_id="bengaluru_irrops_hard") + obs = result.observation # ATCObservation + + action = ATCAction( + aman_completion=aman_llm_output, + dman_completion=dman_llm_output, + round_type="bid", + ) + result = await env.step(action) + if result.done: + print(f"Episode done. Reward: {result.reward:.3f}") + +Usage (sync, handy for scripts): + env = ATCEnvClient(base_url="http://localhost:8000").sync() + result = env.reset() +""" + +from __future__ import annotations + +from typing import Any, Dict + +try: + from openenv.core import EnvClient, StepResult + _OPENENV_AVAILABLE = True +except ImportError: + _OPENENV_AVAILABLE = False + +from .models import ATCAction, ATCObservation, ATCState + + +if _OPENENV_AVAILABLE: + class ATCEnvClient(EnvClient[ATCAction, ATCObservation, ATCState]): + """Thin OpenEnv client wrapping the ATC multi-agent server.""" + + def _step_payload(self, action: ATCAction) -> Dict[str, Any]: + return action.model_dump() + + def _parse_result(self, payload: Dict[str, Any]) -> "StepResult[ATCObservation]": + obs = ATCObservation(**payload["observation"]) + return StepResult( + observation=obs, + reward=payload.get("reward"), + done=payload.get("done", False), + ) + + def _parse_state(self, payload: Dict[str, Any]) -> ATCState: + return ATCState(**payload) + +else: + class ATCEnvClient: # type: ignore[no-redef] + """Stub when openenv is not installed — raises on use.""" + + def __init__(self, *args, **kwargs): + raise ImportError( + "openenv package is required for ATCEnvClient. " + "Install with: pip install openenv" + ) diff --git a/atc_env/models.py b/atc_env/models.py new file mode 100644 index 0000000000000000000000000000000000000000..dc0f8f686266c5ac229df3b77de305d2abdd1dec --- /dev/null +++ b/atc_env/models.py @@ -0,0 +1,72 @@ +"""OpenEnv-compliant Pydantic models for the ATC multi-agent environment. + +Inherits from openenv.core base classes so the models satisfy the OpenEnv +server and client contracts without boilerplate. + +Action → ATCAction (carries one full AMAN+DMAN turn) +Observation → ATCObservation (what both agents receive after each step) +State → ATCState (full episode state snapshot, JSON-serialisable) +""" + +from __future__ import annotations + +from typing import Any, Dict, List, Optional + +from pydantic import Field + +try: + from openenv.core.env_server import Action, Observation, State +except ImportError: + # Graceful fallback so the module can be imported without openenv installed + from pydantic import BaseModel as Action, BaseModel as Observation, BaseModel as State + + +class ATCAction(Action): + """Combined AMAN + DMAN action submitted in a single environment step. + + Both agents generate completions independently; the server side parses each + into its typed action (AMANAction / DMANAction) and routes them to the + multi-agent environment. + """ + + aman_completion: str = Field(default="", description="Raw LLM completion from AMAN agent") + dman_completion: str = Field(default="", description="Raw LLM completion from DMAN agent") + round_type: str = Field( + default="bid", + description="Episode round: 'bid' | 'negotiate'", + ) + + +class ATCObservation(Observation): + """What both agents receive after each environment step. + + Inherits `done`, `reward`, and `metadata` from the OpenEnv base class. + Adds ATC-specific fields that the agents need to generate their next action. + """ + + aman_prompt: str = Field(default="", description="Full prompt text for AMAN agent") + dman_prompt: str = Field(default="", description="Full prompt text for DMAN agent") + round_type: str = Field(default="bid") + round_number: int = Field(default=0, ge=0) + conflict_log: List[str] = Field(default_factory=list) + task_id: str = Field(default="") + + # Per-role rewards are emitted on the final step (done=True). + aman_reward: Optional[float] = Field(default=None) + dman_reward: Optional[float] = Field(default=None) + composite_score: Optional[float] = Field(default=None) + + +class ATCState(State): + """Full episode state snapshot. + + Inherits `episode_id` and `step_count` from the OpenEnv base class. + """ + + task_id: str = Field(default="") + supervisor_profile: str = Field(default="safety_strict") + negotiation_rounds: int = Field(default=0, ge=0) + aman_reward: float = Field(default=0.0) + dman_reward: float = Field(default=0.0) + composite_score: float = Field(default=0.0) + generator_difficulty: int = Field(default=1, ge=1, le=6) diff --git a/atc_env/server/__init__.py b/atc_env/server/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/atc_env/server/app.py b/atc_env/server/app.py new file mode 100644 index 0000000000000000000000000000000000000000..0176bce287bb1af41f382171126a66eaff3a8fcf --- /dev/null +++ b/atc_env/server/app.py @@ -0,0 +1,32 @@ +"""FastAPI app created via the OpenEnv factory. + +One line wires the full OpenEnv HTTP surface: + POST /reset + POST /step + GET /state + GET /health (added by create_app) + +Usage: + uvicorn atc_env.server.app:app --host 0.0.0.0 --port 8000 +""" + +from __future__ import annotations + +import sys +import os + +ROOT = os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) +if ROOT not in sys.path: + sys.path.insert(0, ROOT) + +from openenv.core.env_server import create_app + +from ..models import ATCAction, ATCObservation +from .atc_environment import ATCEnvironment + +app = create_app( + ATCEnvironment, + ATCAction, + ATCObservation, + env_name="atc_env", +) diff --git a/atc_env/server/atc_environment.py b/atc_env/server/atc_environment.py new file mode 100644 index 0000000000000000000000000000000000000000..0f93c128a9a3dd8476096a80d5272d91d490f97b --- /dev/null +++ b/atc_env/server/atc_environment.py @@ -0,0 +1,208 @@ +"""OpenEnv server-side environment wrapping the multi-agent ATC core. + +Implements the three-method OpenEnv Environment interface: + reset(seed, episode_id, **kwargs) -> ATCObservation + step(action, **kwargs) -> ATCObservation + state (property) -> ATCState + +The underlying MultiAgentATCEnvironment runs a 3-round protocol: + Round 0 BID → step(round_type="bid") + Round 1 NEGOTIATE → step(round_type="negotiate") [skipped when no conflicts] + Round 2 FINAL → done=True, per-role rewards emitted + +SUPPORTS_CONCURRENT_SESSIONS = True because TRL spawns multiple rollout workers. +Each worker creates its own server instance via the OpenEnv create_app factory, +so no shared mutable state exists between sessions. +""" + +from __future__ import annotations + +import sys +import os +from typing import Optional + +ROOT = os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) +if ROOT not in sys.path: + sys.path.insert(0, ROOT) + +try: + from openenv.core.env_server import Environment + _OPENENV_AVAILABLE = True +except ImportError: + _OPENENV_AVAILABLE = False + +from multi_agent.environment import MAX_NEGOTIATE_ROUNDS, MultiAgentATCEnvironment, count_separation_issues +from multi_agent.generator import ChallengeGenerator +from multi_agent.supervisor import SupervisorAgent +from tasks import ordered_tasks +from training.dataset import parse_aman_action, parse_dman_action + +from ..models import ATCAction, ATCObservation, ATCState + + +def _make_env_base(): + if _OPENENV_AVAILABLE: + return Environment + # Minimal duck-type base when openenv not installed + class _Base: + SUPPORTS_CONCURRENT_SESSIONS = True + return _Base + + +_EnvBase = _make_env_base() + + +class ATCEnvironment(_EnvBase): + """Multi-agent ATC environment conforming to the OpenEnv server interface.""" + + SUPPORTS_CONCURRENT_SESSIONS = True + + def __init__(self) -> None: + if _OPENENV_AVAILABLE: + super().__init__() + self._env = MultiAgentATCEnvironment(seed=42) + self._generator = ChallengeGenerator(seed=42) + self._supervisor = SupervisorAgent() + self._task_list = list(ordered_tasks()) + self._episode_state = ATCState() + + # ── OpenEnv interface ───────────────────────────────────────────────────── + + def reset(self, seed=None, episode_id=None, **kwargs) -> ATCObservation: + """Start a new episode. + + kwargs accepted: + task_id (str): specific task to load; random if omitted + use_generator (bool): apply adversarial mutations (default True) + """ + task_id = kwargs.get("task_id") + use_generator = kwargs.get("use_generator", True) + ep_id = int(episode_id or 0) + + # Apply adaptive curriculum mutation when requested + mutated_task = None + if use_generator: + import random + rng = random.Random(seed or ep_id) + if task_id: + from tasks import task_catalog + base = task_catalog().get(task_id) + else: + base = rng.choice(self._task_list) + if base: + mutated_task, _ = self._generator.mutate(base) + + aman_obs, dman_obs = self._env.reset( + task_id=task_id, + episode_id=ep_id, + mutated_task=mutated_task, + ) + + self._episode_state = ATCState( + episode_id=str(ep_id), + task_id=aman_obs.task_id, + supervisor_profile=aman_obs.supervisor_profile_name.value, + generator_difficulty=self._generator.difficulty_level, + ) + + return ATCObservation( + aman_prompt=aman_obs.to_prompt_text(), + dman_prompt=dman_obs.to_prompt_text(), + round_type="bid", + round_number=0, + task_id=aman_obs.task_id, + done=False, + ) + + def step(self, action: ATCAction, timeout_s=None, **kwargs) -> ATCObservation: + """Process one agent turn. + + round_type="bid" → BID round, may trigger auto-finalize if no conflicts + round_type="negotiate" → NEGOTIATE + FINAL, always returns done=True + """ + self._episode_state.step_count += 1 + + aman_action = parse_aman_action(action.aman_completion) + dman_action = parse_dman_action(action.dman_completion) + + # Fallback to empty actions when parsing fails (penalised by reward) + from multi_agent.models import AMANAction, DMANAction + if aman_action is None: + aman_action = AMANAction(arrival_slots=[], rationale="parse_error") + if dman_action is None: + dman_action = DMANAction(departure_slots=[], rationale="parse_error") + + if action.round_type == "bid": + aman_obs, dman_obs, partial_reward, done = self._env.step_bid( + aman_action, dman_action + ) + if done: + return self._finalize(partial_reward) + + self._episode_state.step_count += 1 # negotiate will be next + return ATCObservation( + aman_prompt=aman_obs.to_prompt_text(), + dman_prompt=dman_obs.to_prompt_text(), + round_type="negotiate", + round_number=1, + conflict_log=aman_obs.conflict_log, + task_id=self._episode_state.task_id, + reward=partial_reward, + done=False, + ) + + # negotiate → apply client revision, then optional heuristic-only repair passes + aman_obs, dman_obs, partial_reward, _ = self._env.step_negotiate( + aman_action, dman_action + ) + if count_separation_issues(self._env._state.conflict_log) > 0: + from multi_agent.inference import ( + _build_aman_heuristic, + _build_dman_heuristic, + _dman_obs_with_aman_messages, + ) + + atfm = self._env._state.atfm_deadlines + for _ in range(1, MAX_NEGOTIATE_ROUNDS): + if count_separation_issues(self._env._state.conflict_log) == 0: + break + aman_h = _build_aman_heuristic(aman_obs, separation_repair=1) + dman_obs_m = _dman_obs_with_aman_messages(dman_obs, aman_h) + dman_h = _build_dman_heuristic(dman_obs_m, atfm, separation_repair=1) + aman_obs, dman_obs, partial_reward, _ = self._env.step_negotiate( + aman_h, dman_h + ) + return self._finalize(partial_reward) + + @property + def state(self) -> ATCState: + return self._episode_state + + # ── Internal helpers ────────────────────────────────────────────────────── + + def _finalize(self, partial_reward: float) -> ATCObservation: + result = self._env.finalize() + + # Update generator curriculum + self._generator.update(result.composite_score) + + self._episode_state.aman_reward = result.aman_reward + self._episode_state.dman_reward = result.dman_reward + self._episode_state.composite_score = result.composite_score + self._episode_state.negotiation_rounds = result.negotiation_rounds + self._episode_state.generator_difficulty = self._generator.difficulty_level + + composite = (result.aman_reward + result.dman_reward) / 2.0 + + return ATCObservation( + aman_prompt="", + dman_prompt="", + round_type="final", + round_number=2, + task_id=self._episode_state.task_id, + reward=round(composite, 4), + done=True, + aman_reward=result.aman_reward, + dman_reward=result.dman_reward, + composite_score=result.composite_score, + ) diff --git a/constants.py b/constants.py new file mode 100644 index 0000000000000000000000000000000000000000..744f9a3caae2346b209d09ac101479e536f9ada5 --- /dev/null +++ b/constants.py @@ -0,0 +1,164 @@ +"""Shared constants for ATC optimization environment. + +This module centralizes all magic numbers and configuration constants +to support the DRY (Don't Repeat Yourself) principle and ease tuning. +""" + +from typing import Dict, Tuple + +# ============================================================================ +# Wake Turbulence Separation Rules (minutes) +# ============================================================================ +# Minimum spacing required between aircraft based on wake classes +# H=Heavy, M=Medium, L=Light +SEPARATION_BY_WAKE: Dict[Tuple[str, str], int] = { + ("H", "H"): 4, # Heavy to Heavy: 4 min + ("H", "M"): 5, # Heavy to Medium: 5 min + ("H", "L"): 6, # Heavy to Light: 6 min + ("M", "H"): 3, # Medium to Heavy: 3 min + ("M", "M"): 3, # Medium to Medium: 3 min + ("M", "L"): 4, # Medium to Light: 4 min + ("L", "H"): 3, # Light to Heavy: 3 min + ("L", "M"): 3, # Light to Medium: 3 min + ("L", "L"): 3, # Light to Light: 3 min +} + + + +# ============================================================================ +# Normalized Score Calculation Weights +# ============================================================================ +# Weights for combining multiple metrics into final score +# Sum must equal 1.0 for balanced weighting +SCORE_WEIGHTS: Dict[str, float] = { + "completeness": 0.24, # Schedule completeness (24%) + "conflict_free": 0.24, # Conflict-free ratio (24%) + "priority": 0.18, # Priority handling (18%) + "delay": 0.16, # Delay efficiency (16%) + "fairness": 0.10, # Fairness across airlines (10%) + "fuel": 0.08, # Fuel efficiency (8%) +} + +# Validate weights sum to 1.0 +_WEIGHT_SUM = sum(SCORE_WEIGHTS.values()) +assert abs(_WEIGHT_SUM - 1.0) < 0.001, ( + f"SCORE_WEIGHTS must sum to 1.0, got {_WEIGHT_SUM}" +) + +# ============================================================================ +# Score Penalty Factors +# ============================================================================ +# Multipliers applied when schedule quality is suboptimal +COMPLETENESS_PENALTY_FACTOR = 1.0 # Apply when incomplete schedules +CONFLICT_PENALTY_FACTOR = 1.0 # Apply when conflicts detected + +# ============================================================================ +# Rounding Precision Configuration +# ============================================================================ +# Number of decimal places for different metric types +METRIC_PRECISION = 4 # Normalized metrics (0.0-1.0): 4 decimals +FUEL_PRECISION = 2 # Fuel burn in tonnes: 2 decimals +AIRLINE_DELAY_PRECISION = 1 # Airline average delays in minutes: 1 decimal +TIME_PRECISION = 0 # Time values in minutes: integers + +# ============================================================================ +# Recommendation Thresholds +# ============================================================================ +# Thresholds for triggering operational recommendations +FAIRNESS_WARNING_THRESHOLD = 0.7 # Warn if fairness < 70% +FUEL_EFFICIENCY_WARNING_THRESHOLD = 0.7 # Warn if fuel efficiency < 70% + +# ============================================================================ +# Capacity Calculation +# ============================================================================ +# Minimum capacity spacing floor +MINIMUM_RUNWAY_SPACING = 2 # Minimum 2-minute spacing between any operations + +# ============================================================================ +# Diagnostic/Recommendation Output +# ============================================================================ +# Limits on diagnostic and recommendation messages +MAX_DIAGNOSTICS = 12 # Maximum diagnostic messages to include +MAX_RECOMMENDATIONS = 6 # Maximum recommendations to include + +# ============================================================================ +# Inference Configuration +# ============================================================================ +# Defaults for baseline inference script +DEFAULT_MAX_STEPS = 4 # Default iterations per task +DEFAULT_MAX_TOKENS = 1400 # Default LLM max tokens per response +DEFAULT_TEMPERATURE = 0 # Temperature for deterministic responses +DEFAULT_SUCCESS_THRESHOLD = 0.65 # Minimum score to consider "success" + +# ============================================================================ +# Validation Messages +# ============================================================================ +# Common validation and error messages +INVALID_RUNWAY_MSG_TEMPLATE = "{flight_id} cannot use runway {runway}; allowed runways are {allowed}." +OUTSIDE_WINDOW_MSG_TEMPLATE = "{flight_id} is assigned outside its feasible window [{earliest}, {latest}]." +PRIORITY_TOLERANCE_MSG_TEMPLATE = "{flight_id} exceeds the {priority} delay tolerance of {tolerance} minutes." +SPACING_VIOLATION_MSG_TEMPLATE = "Runway {runway} has {prev_flight}->{curr_flight} spaced {actual} minutes apart; needs {required}." + +# ============================================================================ +# Export for use in other modules +# ============================================================================ +__all__ = [ + "SEPARATION_BY_WAKE", + "SCORE_WEIGHTS", + "COMPLETENESS_PENALTY_FACTOR", + "CONFLICT_PENALTY_FACTOR", + "METRIC_PRECISION", + "FUEL_PRECISION", + "AIRLINE_DELAY_PRECISION", + "TIME_PRECISION", + "FAIRNESS_WARNING_THRESHOLD", + "FUEL_EFFICIENCY_WARNING_THRESHOLD", + "MINIMUM_RUNWAY_SPACING", + "MAX_DIAGNOSTICS", + "MAX_RECOMMENDATIONS", + "DEFAULT_MAX_STEPS", + "DEFAULT_MAX_TOKENS", + "DEFAULT_TEMPERATURE", + "DEFAULT_SUCCESS_THRESHOLD", + "INVALID_RUNWAY_MSG_TEMPLATE", + "OUTSIDE_WINDOW_MSG_TEMPLATE", + "PRIORITY_TOLERANCE_MSG_TEMPLATE", + "SPACING_VIOLATION_MSG_TEMPLATE", + # Multi-agent constants + "AMAN_EMERGENCY_DELAY_TOLERANCE", + "DMAN_EMERGENCY_DELAY_TOLERANCE", + "ATFM_DEADLINE_BUFFER_MINUTES", + "CROSS_LANE_CONFLICT_PENALTY", + "THEORY_OF_MIND_BONUS", + "GENERATOR_ESCALATION_THRESHOLD", + "GENERATOR_FLOOR_THRESHOLD", + "COORDINATION_SCORE_WEIGHTS", +] + + +# ============================================================================ +# Multi-Agent AMAN/DMAN Constants +# ============================================================================ + +# Emergency delay tolerances per role (minutes) +AMAN_EMERGENCY_DELAY_TOLERANCE: int = 5 # EMERGENCY arrival must land within 5 min of window +DMAN_EMERGENCY_DELAY_TOLERANCE: int = 5 # EMERGENCY departure must push within 5 min + +# ATFM network slot buffer: realistic GDP margin (minutes) +ATFM_DEADLINE_BUFFER_MINUTES: int = 12 + +# Reward shaping constants +CROSS_LANE_CONFLICT_PENALTY: float = 0.15 # per conflict between AMAN/DMAN slots +THEORY_OF_MIND_BONUS: float = 0.25 # pre-emptive coordination without prompt + +# Generator adaptive curriculum thresholds +GENERATOR_ESCALATION_THRESHOLD: float = 0.65 # escalate when agents score above this +GENERATOR_FLOOR_THRESHOLD: float = 0.30 # ease when agents score below this + +# Coordination score component weights +COORDINATION_SCORE_WEIGHTS = { + "zero_cross_conflicts": 0.25, + "negotiation_efficiency": 0.20, # 0 rounds=0.20, 1 round=0.10, 2+=0.0 + "emergency_handling": 0.30, + "preemptive_gap": 0.25, +} diff --git a/domains/__init__.py b/domains/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..26288332dc904fecee8c1c229811120051b71b5a --- /dev/null +++ b/domains/__init__.py @@ -0,0 +1,52 @@ +"""Domain task catalogs for ADAPT agent transfer learning. + +Each domain module provides a catalog of TaskDefinition objects that +represent scheduling problems from non-ATC domains. ADAPT receives these +tasks and infers ATC parameter mappings purely from structural signals — +no domain-specific knowledge is encoded here. + +Adding a new domain: + 1. Create domains/.py exporting _task_catalog() -> Dict[str, TaskDefinition] + 2. Add an import below and register it in ALL_DOMAINS. +""" + +from __future__ import annotations + +from typing import Any, Dict + +from models import TaskDefinition + +# Registered domain modules — add new domains here +_DOMAIN_REGISTRY: list[str] = ["icu"] + + +def get_all_domain_tasks() -> Dict[str, TaskDefinition]: + """Aggregate tasks from every registered domain. + + Returns a flat dict {task_id: TaskDefinition} across all domains. + Safe to call even if some domain modules are missing (they are skipped + with a warning). + """ + all_tasks: Dict[str, TaskDefinition] = {} + for name in _DOMAIN_REGISTRY: + try: + mod = __import__(f"domains.{name}", fromlist=[f"{name}_task_catalog"]) + catalog_fn = getattr(mod, f"{name}_task_catalog") + catalog: Dict[str, TaskDefinition] = catalog_fn() + all_tasks.update(catalog) + except Exception as exc: + import warnings + warnings.warn(f"[domains] Could not load domain '{name}': {exc}") + return all_tasks + + +def get_domain_description(domain_name: str) -> str: + """Return a human-readable description for a registered domain, or ''.""" + try: + mod = __import__(f"domains.{domain_name}", fromlist=["_DOMAIN_DESCRIPTION"]) + for attr in (f"{domain_name.upper()}_DOMAIN_DESCRIPTION", "_DOMAIN_DESCRIPTION"): + if hasattr(mod, attr): + return getattr(mod, attr) + except Exception: + pass + return "" diff --git a/domains/icu.py b/domains/icu.py new file mode 100644 index 0000000000000000000000000000000000000000..89b9e8954cadc136da8673c084bc96de4fb2510a --- /dev/null +++ b/domains/icu.py @@ -0,0 +1,457 @@ +"""ICU Surge Management domain — three TaskDefinition scenarios for ADAPT. + +Entity types (stored in FlightRecord.airline — ADAPT maps these to ATC params): + TRAUMA → should map to wake_class=H, priority=emergency + CARDIAC → should map to wake_class=M, priority=medical + POST_OP → should map to wake_class=M, priority=connection + ROUTINE → should map to wake_class=L, priority=normal + +Operations: + ARRIVAL = patient being admitted to an ICU bed + DEPARTURE = patient being discharged / transferred out + +Resources (runway_id): + BED_A, BED_B, BED_C, BED_D — shared ICU beds managed by both coordinators + +Timing: minute 0 = 08:00, minute 480 = 16:00 (8-hour shift window) +""" + +from __future__ import annotations + +from typing import Dict + +try: + from ..models import ( + Difficulty, + FlightRecord, + OperationType, + PriorityClass, + RunwaySpec, + TaskDefinition, + WakeClass, + ) +except ImportError: + from models import ( + Difficulty, + FlightRecord, + OperationType, + PriorityClass, + RunwaySpec, + TaskDefinition, + WakeClass, + ) + + +ICU_DOMAIN_DESCRIPTION = """\ +Domain: Hospital ICU Surge Management +Resources: Four intensive-care beds (BED_A, BED_B, BED_C, BED_D) shared between + an Admission Coordinator (manages incoming patients) and a + Discharge Coordinator (manages outgoing patients / transfers). + +Entity types and their clinical meaning: + TRAUMA — Patient arriving from mass-casualty event or ER. Life-threatening. + Must be admitted within the narrowest time window. Cannot wait. + CARDIAC — Post-cardiac-surgery patient. Time-sensitive but stable for ~30 min. + High monitoring needs; bed must be fully prepped before arrival. + POST_OP — Post-operative patient ready to move to a step-down unit. + Has a transfer-authorization window (hard deadline from insurance). + ROUTINE — Scheduled transfer from step-down or ward. Flexible timing. + +Hard deadlines: Some POST_OP discharges have a transfer-authorization expiry — + the patient MUST vacate the bed before that minute or re-authorization is needed, + causing a cascade of delays (equivalent to ATFM network slot violations). + +Coordination challenge: The Admission Coordinator does not know which beds are + about to be freed by the Discharge Coordinator. The Discharge Coordinator does + not know which new patients are incoming. They share the same 4 beds and must + coordinate through messages to avoid both admitting to an occupied bed and + discharging into a scheduling gap that blocks the next admission.\ +""" + +_BEDS = ["BED_A", "BED_B", "BED_C", "BED_D"] + +# Spacing floor = max(2, round(60/hourly_capacity)) minutes between ops on the same bed. +# 4/hr → 15 min, which made ICU scenarios nearly unsolvable vs heuristics tuned for airport +# runways (~3–4 min). 12/hr → 5 min: still models turn-over delay without guaranteed conflicts. +_BED_SPECS = [ + RunwaySpec( + runway_id=bid, + hourly_capacity=12, + weather_penalty=1.0, + notes="ICU bed — admission and discharge both allowed", + ) + for bid in _BEDS +] + + +def icu_task_catalog() -> Dict[str, TaskDefinition]: + return { + t.task_id: t + for t in [_normal_day(), _flu_surge(), _mass_casualty()] + } + + +# ── Task 1: Normal ICU Day (Easy) ───────────────────────────────────────────── + +def _normal_day() -> TaskDefinition: + flights = [ + # Admissions (ARRIVAL) + FlightRecord( + flight_id="P_ARR_01", airline="ROUTINE", operation=OperationType.ARRIVAL, + wake_class=WakeClass.MEDIUM, # placeholder — ADAPT overrides + scheduled_minute=30, earliest_minute=0, latest_minute=120, + allowed_runways=_BEDS, passengers=1, fuel_burn_per_minute=1.5, + priority=PriorityClass.NORMAL, + notes="Scheduled step-down transfer, routine admission", + ), + FlightRecord( + flight_id="P_ARR_02", airline="ROUTINE", operation=OperationType.ARRIVAL, + wake_class=WakeClass.MEDIUM, + scheduled_minute=60, earliest_minute=30, latest_minute=150, + allowed_runways=_BEDS, passengers=1, fuel_burn_per_minute=1.5, + priority=PriorityClass.NORMAL, + notes="Scheduled step-down transfer, routine admission", + ), + FlightRecord( + flight_id="P_ARR_03", airline="CARDIAC", operation=OperationType.ARRIVAL, + wake_class=WakeClass.MEDIUM, + scheduled_minute=90, earliest_minute=60, latest_minute=180, + allowed_runways=_BEDS, passengers=3, fuel_burn_per_minute=5.0, + priority=PriorityClass.NORMAL, # placeholder — ADAPT overrides to medical + connection_risk=0.70, + notes="Post-cardiac surgery — bed must be fully prepped before arrival", + ), + FlightRecord( + flight_id="P_ARR_04", airline="ROUTINE", operation=OperationType.ARRIVAL, + wake_class=WakeClass.MEDIUM, + scheduled_minute=150, earliest_minute=90, latest_minute=240, + allowed_runways=_BEDS, passengers=1, fuel_burn_per_minute=1.5, + priority=PriorityClass.NORMAL, + notes="Scheduled step-down transfer, routine admission", + ), + # Discharges (DEPARTURE) + FlightRecord( + flight_id="P_DIS_01", airline="POST_OP", operation=OperationType.DEPARTURE, + wake_class=WakeClass.MEDIUM, + scheduled_minute=45, earliest_minute=0, latest_minute=180, + allowed_runways=_BEDS, passengers=1, fuel_burn_per_minute=2.0, + priority=PriorityClass.NORMAL, # placeholder — ADAPT overrides to connection + notes="Transfer-authorization window open; step-down bed confirmed", + ), + FlightRecord( + flight_id="P_DIS_02", airline="POST_OP", operation=OperationType.DEPARTURE, + wake_class=WakeClass.MEDIUM, + scheduled_minute=75, earliest_minute=30, latest_minute=180, + allowed_runways=_BEDS, passengers=1, fuel_burn_per_minute=2.0, + priority=PriorityClass.NORMAL, + notes="Transfer-authorization window open; step-down bed confirmed", + ), + FlightRecord( + flight_id="P_DIS_03", airline="POST_OP", operation=OperationType.DEPARTURE, + wake_class=WakeClass.MEDIUM, + scheduled_minute=120, earliest_minute=60, latest_minute=240, + allowed_runways=_BEDS, passengers=1, fuel_burn_per_minute=2.0, + priority=PriorityClass.NORMAL, + notes="Transfer-authorization window open", + ), + FlightRecord( + flight_id="P_DIS_04", airline="ROUTINE", operation=OperationType.DEPARTURE, + wake_class=WakeClass.LIGHT, + scheduled_minute=180, earliest_minute=90, latest_minute=300, + allowed_runways=_BEDS, passengers=1, fuel_burn_per_minute=1.5, + priority=PriorityClass.NORMAL, + notes="Routine discharge to ward", + ), + ] + return TaskDefinition( + task_id="icu_normal_day", + title="ICU Normal Day — Routine Bed Turnover", + difficulty=Difficulty.EASY, + airport="GENERAL_HOSPITAL_ICU", + description=ICU_DOMAIN_DESCRIPTION, + objective="Coordinate bed admissions and discharges to minimize patient wait time and avoid bed conflicts", + grading_focus=["bed_conflict_free", "patient_wait_time", "transfer_authorization"], + planning_horizon_minutes=480, + max_steps=4, + delay_budget=60, + fuel_budget=300.0, + fairness_tolerance=2.0, + runways=_BED_SPECS, + flights=flights, + ) + + +# ── Task 2: Flu Surge (Medium) ──────────────────────────────────────────────── + +def _flu_surge() -> TaskDefinition: + flights = [ + # Admissions + FlightRecord( + flight_id="S_ARR_01", airline="CARDIAC", operation=OperationType.ARRIVAL, + wake_class=WakeClass.MEDIUM, + scheduled_minute=30, earliest_minute=10, latest_minute=90, + allowed_runways=_BEDS, passengers=3, fuel_burn_per_minute=5.0, + priority=PriorityClass.NORMAL, connection_risk=0.70, + notes="Post-cardiac surgery — time-sensitive admission", + ), + FlightRecord( + flight_id="S_ARR_02", airline="ROUTINE", operation=OperationType.ARRIVAL, + wake_class=WakeClass.MEDIUM, + scheduled_minute=45, earliest_minute=20, latest_minute=120, + allowed_runways=_BEDS, passengers=1, fuel_burn_per_minute=1.5, + priority=PriorityClass.NORMAL, + notes="Step-down transfer", + ), + FlightRecord( + flight_id="S_ARR_03", airline="CARDIAC", operation=OperationType.ARRIVAL, + wake_class=WakeClass.MEDIUM, + scheduled_minute=60, earliest_minute=40, latest_minute=120, + allowed_runways=_BEDS, passengers=3, fuel_burn_per_minute=5.0, + priority=PriorityClass.NORMAL, connection_risk=0.75, + notes="Post-cardiac surgery — overlapping window with S_ARR_01", + ), + FlightRecord( + flight_id="S_ARR_04", airline="ROUTINE", operation=OperationType.ARRIVAL, + wake_class=WakeClass.MEDIUM, + scheduled_minute=90, earliest_minute=60, latest_minute=200, + allowed_runways=_BEDS, passengers=1, fuel_burn_per_minute=1.5, + priority=PriorityClass.NORMAL, + notes="Step-down transfer", + ), + FlightRecord( + flight_id="S_ARR_05", airline="CARDIAC", operation=OperationType.ARRIVAL, + wake_class=WakeClass.MEDIUM, + scheduled_minute=100, earliest_minute=80, latest_minute=160, + allowed_runways=_BEDS, passengers=3, fuel_burn_per_minute=5.0, + priority=PriorityClass.NORMAL, connection_risk=0.65, + notes="Post-cardiac surgery — third concurrent CARDIAC creating surge", + ), + FlightRecord( + flight_id="S_ARR_06", airline="ROUTINE", operation=OperationType.ARRIVAL, + wake_class=WakeClass.MEDIUM, + scheduled_minute=150, earliest_minute=120, latest_minute=270, + allowed_runways=_BEDS, passengers=1, fuel_burn_per_minute=1.5, + priority=PriorityClass.NORMAL, + notes="Step-down transfer", + ), + FlightRecord( + flight_id="S_ARR_07", airline="ROUTINE", operation=OperationType.ARRIVAL, + wake_class=WakeClass.MEDIUM, + scheduled_minute=200, earliest_minute=160, latest_minute=320, + allowed_runways=_BEDS, passengers=1, fuel_burn_per_minute=1.5, + priority=PriorityClass.NORMAL, + notes="Step-down transfer", + ), + # Discharges + FlightRecord( + flight_id="S_DIS_01", airline="POST_OP", operation=OperationType.DEPARTURE, + wake_class=WakeClass.MEDIUM, + scheduled_minute=20, earliest_minute=0, latest_minute=60, + allowed_runways=_BEDS, passengers=1, fuel_burn_per_minute=2.0, + priority=PriorityClass.NORMAL, + notes="TRANSFER AUTH DEADLINE: minute 60 — must vacate before CARDIAC arrivals", + ), + FlightRecord( + flight_id="S_DIS_02", airline="POST_OP", operation=OperationType.DEPARTURE, + wake_class=WakeClass.MEDIUM, + scheduled_minute=40, earliest_minute=10, latest_minute=80, + allowed_runways=_BEDS, passengers=1, fuel_burn_per_minute=2.0, + priority=PriorityClass.NORMAL, + notes="TRANSFER AUTH DEADLINE: minute 80", + ), + FlightRecord( + flight_id="S_DIS_03", airline="POST_OP", operation=OperationType.DEPARTURE, + wake_class=WakeClass.MEDIUM, + scheduled_minute=70, earliest_minute=40, latest_minute=120, + allowed_runways=_BEDS, passengers=1, fuel_burn_per_minute=2.0, + priority=PriorityClass.NORMAL, + notes="TRANSFER AUTH DEADLINE: minute 120", + ), + FlightRecord( + flight_id="S_DIS_04", airline="POST_OP", operation=OperationType.DEPARTURE, + wake_class=WakeClass.MEDIUM, + scheduled_minute=110, earliest_minute=80, latest_minute=180, + allowed_runways=_BEDS, passengers=1, fuel_burn_per_minute=2.0, + priority=PriorityClass.NORMAL, + notes="TRANSFER AUTH DEADLINE: minute 180", + ), + FlightRecord( + flight_id="S_DIS_05", airline="ROUTINE", operation=OperationType.DEPARTURE, + wake_class=WakeClass.LIGHT, + scheduled_minute=160, earliest_minute=120, latest_minute=280, + allowed_runways=_BEDS, passengers=1, fuel_burn_per_minute=1.5, + priority=PriorityClass.NORMAL, + notes="Routine discharge to ward, flexible timing", + ), + ] + return TaskDefinition( + task_id="icu_flu_surge", + title="ICU Flu Surge — Three Concurrent CARDIAC Admissions", + difficulty=Difficulty.MEDIUM, + airport="GENERAL_HOSPITAL_ICU", + description=ICU_DOMAIN_DESCRIPTION, + objective="Clear beds before CARDIAC surge arrives while respecting transfer-authorization deadlines", + grading_focus=["transfer_auth_compliance", "cardiac_admission_delay", "bed_conflict_free"], + planning_horizon_minutes=480, + max_steps=4, + delay_budget=45, + fuel_budget=400.0, + fairness_tolerance=2.0, + runways=_BED_SPECS, + flights=flights, + ) + + +# ── Task 3: Mass Casualty Surge (Hard) ──────────────────────────────────────── + +def _mass_casualty() -> TaskDefinition: + flights = [ + # TRAUMA admissions — narrow windows, cannot wait + FlightRecord( + flight_id="T_ARR_01", airline="TRAUMA", operation=OperationType.ARRIVAL, + wake_class=WakeClass.MEDIUM, # placeholder — ADAPT must set to H/emergency + scheduled_minute=5, earliest_minute=0, latest_minute=10, + allowed_runways=_BEDS, passengers=5, fuel_burn_per_minute=10.0, + priority=PriorityClass.NORMAL, connection_risk=0.95, + notes="EMERGENCY: Mass-casualty arrival — immediate ICU bed required", + ), + FlightRecord( + flight_id="T_ARR_02", airline="TRAUMA", operation=OperationType.ARRIVAL, + wake_class=WakeClass.MEDIUM, + scheduled_minute=8, earliest_minute=3, latest_minute=15, + allowed_runways=_BEDS, passengers=5, fuel_burn_per_minute=10.0, + priority=PriorityClass.NORMAL, connection_risk=0.95, + notes="EMERGENCY: Mass-casualty arrival — second trauma patient", + ), + FlightRecord( + flight_id="T_ARR_03", airline="TRAUMA", operation=OperationType.ARRIVAL, + wake_class=WakeClass.MEDIUM, + scheduled_minute=12, earliest_minute=8, latest_minute=20, + allowed_runways=_BEDS, passengers=5, fuel_burn_per_minute=10.0, + priority=PriorityClass.NORMAL, connection_risk=0.90, + notes="EMERGENCY: Mass-casualty arrival — third trauma patient", + ), + # CARDIAC admissions + FlightRecord( + flight_id="T_ARR_04", airline="CARDIAC", operation=OperationType.ARRIVAL, + wake_class=WakeClass.MEDIUM, + scheduled_minute=30, earliest_minute=15, latest_minute=75, + allowed_runways=_BEDS, passengers=3, fuel_burn_per_minute=5.0, + priority=PriorityClass.NORMAL, connection_risk=0.72, + notes="Post-cardiac surgery — must admit after trauma queue clears", + ), + FlightRecord( + flight_id="T_ARR_05", airline="CARDIAC", operation=OperationType.ARRIVAL, + wake_class=WakeClass.MEDIUM, + scheduled_minute=50, earliest_minute=30, latest_minute=100, + allowed_runways=_BEDS, passengers=3, fuel_burn_per_minute=5.0, + priority=PriorityClass.NORMAL, connection_risk=0.68, + notes="Post-cardiac surgery", + ), + FlightRecord( + flight_id="T_ARR_06", airline="CARDIAC", operation=OperationType.ARRIVAL, + wake_class=WakeClass.MEDIUM, + scheduled_minute=80, earliest_minute=60, latest_minute=140, + allowed_runways=_BEDS, passengers=3, fuel_burn_per_minute=5.0, + priority=PriorityClass.NORMAL, connection_risk=0.60, + notes="Post-cardiac surgery", + ), + FlightRecord( + flight_id="T_ARR_07", airline="CARDIAC", operation=OperationType.ARRIVAL, + wake_class=WakeClass.MEDIUM, + scheduled_minute=110, earliest_minute=90, latest_minute=170, + allowed_runways=_BEDS, passengers=3, fuel_burn_per_minute=5.0, + priority=PriorityClass.NORMAL, connection_risk=0.55, + notes="Post-cardiac surgery", + ), + # ROUTINE admissions + FlightRecord( + flight_id="T_ARR_08", airline="ROUTINE", operation=OperationType.ARRIVAL, + wake_class=WakeClass.LIGHT, + scheduled_minute=120, earliest_minute=60, latest_minute=240, + allowed_runways=_BEDS, passengers=1, fuel_burn_per_minute=1.5, + priority=PriorityClass.NORMAL, + notes="Step-down transfer — flexible, defer if beds occupied", + ), + FlightRecord( + flight_id="T_ARR_09", airline="ROUTINE", operation=OperationType.ARRIVAL, + wake_class=WakeClass.LIGHT, + scheduled_minute=160, earliest_minute=100, latest_minute=280, + allowed_runways=_BEDS, passengers=1, fuel_burn_per_minute=1.5, + priority=PriorityClass.NORMAL, + notes="Step-down transfer — flexible", + ), + FlightRecord( + flight_id="T_ARR_10", airline="ROUTINE", operation=OperationType.ARRIVAL, + wake_class=WakeClass.LIGHT, + scheduled_minute=200, earliest_minute=150, latest_minute=330, + allowed_runways=_BEDS, passengers=1, fuel_burn_per_minute=1.5, + priority=PriorityClass.NORMAL, + notes="Step-down transfer — flexible", + ), + # Discharges — must clear beds for trauma wave + FlightRecord( + flight_id="T_DIS_01", airline="POST_OP", operation=OperationType.DEPARTURE, + wake_class=WakeClass.MEDIUM, + scheduled_minute=0, earliest_minute=0, latest_minute=8, + allowed_runways=_BEDS, passengers=1, fuel_burn_per_minute=2.0, + priority=PriorityClass.NORMAL, + notes="URGENT: Must vacate immediately — trauma bay needs bed now", + ), + FlightRecord( + flight_id="T_DIS_02", airline="POST_OP", operation=OperationType.DEPARTURE, + wake_class=WakeClass.MEDIUM, + scheduled_minute=2, earliest_minute=0, latest_minute=10, + allowed_runways=_BEDS, passengers=1, fuel_burn_per_minute=2.0, + priority=PriorityClass.NORMAL, + notes="URGENT: Must vacate for second trauma patient — TRANSFER AUTH DEADLINE: minute 10", + ), + FlightRecord( + flight_id="T_DIS_03", airline="POST_OP", operation=OperationType.DEPARTURE, + wake_class=WakeClass.MEDIUM, + scheduled_minute=5, earliest_minute=0, latest_minute=15, + allowed_runways=_BEDS, passengers=1, fuel_burn_per_minute=2.0, + priority=PriorityClass.NORMAL, + notes="Must vacate for third trauma — TRANSFER AUTH DEADLINE: minute 15", + ), + FlightRecord( + flight_id="T_DIS_04", airline="POST_OP", operation=OperationType.DEPARTURE, + wake_class=WakeClass.MEDIUM, + scheduled_minute=20, earliest_minute=10, latest_minute=60, + allowed_runways=_BEDS, passengers=1, fuel_burn_per_minute=2.0, + priority=PriorityClass.NORMAL, + notes="TRANSFER AUTH DEADLINE: minute 60", + ), + FlightRecord( + flight_id="T_DIS_05", airline="ROUTINE", operation=OperationType.DEPARTURE, + wake_class=WakeClass.LIGHT, + scheduled_minute=40, earliest_minute=20, latest_minute=120, + allowed_runways=_BEDS, passengers=1, fuel_burn_per_minute=1.5, + priority=PriorityClass.NORMAL, + notes="Routine discharge — flex to accommodate trauma clearance", + ), + FlightRecord( + flight_id="T_DIS_06", airline="ROUTINE", operation=OperationType.DEPARTURE, + wake_class=WakeClass.LIGHT, + scheduled_minute=90, earliest_minute=60, latest_minute=200, + allowed_runways=_BEDS, passengers=1, fuel_burn_per_minute=1.5, + priority=PriorityClass.NORMAL, + notes="Routine discharge", + ), + ] + return TaskDefinition( + task_id="icu_mass_casualty", + title="ICU Mass Casualty — Three Trauma Emergencies Simultaneous", + difficulty=Difficulty.HARD, + airport="GENERAL_HOSPITAL_ICU", + description=ICU_DOMAIN_DESCRIPTION, + objective="Immediately clear beds for 3 simultaneous TRAUMA arrivals while managing CARDIAC queue", + grading_focus=["trauma_admission_time", "transfer_auth_compliance", "cardiac_sequencing"], + planning_horizon_minutes=480, + max_steps=4, + delay_budget=30, + fuel_budget=600.0, + fairness_tolerance=3.0, + runways=_BED_SPECS, + flights=flights, + ) diff --git a/engine.py b/engine.py new file mode 100644 index 0000000000000000000000000000000000000000..150ff25d59879d3e5fdd494b1c65c79ded4dda58 --- /dev/null +++ b/engine.py @@ -0,0 +1,363 @@ +"""Operational simulator and reward shaping for ATC optimization.""" + +from __future__ import annotations + +from collections import defaultdict +from dataclasses import dataclass +from statistics import pstdev +from typing import Dict, Iterable, List, Tuple + +# Import models with automatic relative/absolute fallback +try: + from .models import ( + FlightRecord, + PriorityClass, + RunwaySpec, + SlotAssignment, + TaskDefinition, + TaskMetrics, + ) + from .constants import ( + SEPARATION_BY_WAKE, + SCORE_WEIGHTS, + METRIC_PRECISION, + FUEL_PRECISION, + AIRLINE_DELAY_PRECISION, + MAX_DIAGNOSTICS, + MAX_RECOMMENDATIONS, + ) +except ImportError: + from models import ( + FlightRecord, + PriorityClass, + RunwaySpec, + SlotAssignment, + TaskDefinition, + TaskMetrics, + ) + from constants import ( + SEPARATION_BY_WAKE, + SCORE_WEIGHTS, + METRIC_PRECISION, + FUEL_PRECISION, + AIRLINE_DELAY_PRECISION, + MAX_DIAGNOSTICS, + MAX_RECOMMENDATIONS, + ) + +# Build priority delay tolerance dynamically from models +PRIORITY_DELAY_TOLERANCE: Dict[PriorityClass, int] = { + PriorityClass.NORMAL: 35, + PriorityClass.CONNECTION: 20, + PriorityClass.MEDICAL: 10, + PriorityClass.EMERGENCY: 5, +} + + +@dataclass +class SimulationOutcome: + """Full simulator output used by the environment and graders.""" + + metrics: TaskMetrics + diagnostics: List[str] + recommendations: List[str] + normalized_score: float + + +def empty_metrics() -> TaskMetrics: + """Return a zeroed metric object.""" + + return TaskMetrics() + + +def _capacity_spacing(runway: RunwaySpec) -> int: + base_gap = max(2, round(60 / runway.hourly_capacity)) + return max(2, round(base_gap * runway.weather_penalty)) + + +def _delay_for(flight: FlightRecord, assigned_minute: int) -> int: + return abs(assigned_minute - flight.scheduled_minute) + + +def simulate_plan(task: TaskDefinition, proposal: Iterable[SlotAssignment]) -> SimulationOutcome: + """Evaluate a candidate runway plan for a task.""" + + flights_by_id = {flight.flight_id: flight for flight in task.flights} + runways_by_id = {runway.runway_id: runway for runway in task.runways} + assignments = list(proposal) + + diagnostics: List[str] = [] + recommendations: List[str] = [] + unknown_assignments = 0 + invalid_assignments = 0 + + assignment_map: Dict[str, SlotAssignment] = {} + duplicate_assignments = max(0, len(assignments) - len({item.flight_id for item in assignments})) + for assignment in assignments: + if assignment.flight_id in assignment_map: + diagnostics.append( + f"{assignment.flight_id} appears more than once; only the last assignment is used." + ) + assignment_map[assignment.flight_id] = assignment + if duplicate_assignments: + invalid_assignments += duplicate_assignments + + scheduled_by_runway: Dict[str, List[Tuple[int, SlotAssignment, FlightRecord]]] = defaultdict(list) + delays: Dict[str, int] = {} + per_airline_delays: Dict[str, List[int]] = defaultdict(list) + fuel_burn = 0.0 + priority_violations = 0 + emergency_violations = 0 + medical_violations = 0 + connection_violations = 0 + capacity_violations = 0 + + for assignment in assignment_map.values(): + flight = flights_by_id.get(assignment.flight_id) + if flight is None: + unknown_assignments += 1 + diagnostics.append(f"Unknown flight id {assignment.flight_id} in proposal.") + continue + + if assignment.runway not in flight.allowed_runways: + invalid_assignments += 1 + diagnostics.append( + f"{flight.flight_id} cannot use runway {assignment.runway}; allowed runways are {', '.join(flight.allowed_runways)}." + ) + continue + + if assignment.runway not in runways_by_id: + invalid_assignments += 1 + diagnostics.append(f"Runway {assignment.runway} is not available in this task.") + continue + + runway = runways_by_id[assignment.runway] + if flight.operation not in runway.allowed_operations: + invalid_assignments += 1 + diagnostics.append( + f"Runway {assignment.runway} cannot handle {flight.operation.value} operations for {flight.flight_id}." + ) + continue + + if assignment.assigned_minute < flight.earliest_minute or assignment.assigned_minute > flight.latest_minute: + invalid_assignments += 1 + diagnostics.append( + f"{flight.flight_id} is assigned outside its feasible window [{flight.earliest_minute}, {flight.latest_minute}]." + ) + continue + + delay = _delay_for(flight, assignment.assigned_minute) + if assignment.hold_minutes > 0 and abs(assignment.hold_minutes - delay) > 5: + diagnostics.append( + f"{flight.flight_id} declares hold_minutes={assignment.hold_minutes}, but the actual delay is {delay}." + ) + delays[flight.flight_id] = delay + per_airline_delays[flight.airline].append(delay) + fuel_burn += delay * flight.fuel_burn_per_minute + scheduled_by_runway[assignment.runway].append((assignment.assigned_minute, assignment, flight)) + + tolerance = PRIORITY_DELAY_TOLERANCE[flight.priority] + if delay > tolerance: + priority_violations += 1 + if flight.priority == PriorityClass.EMERGENCY: + emergency_violations += 1 + elif flight.priority == PriorityClass.MEDICAL: + medical_violations += 1 + elif flight.priority == PriorityClass.CONNECTION: + connection_violations += 1 + diagnostics.append( + f"{flight.flight_id} exceeds the {flight.priority.value} delay tolerance of {tolerance} minutes." + ) + + missing_assignments = max(0, len(task.flights) - len(delays)) + for flight in task.flights: + if flight.flight_id not in delays: + diagnostics.append(f"{flight.flight_id} has no valid runway assignment.") + + conflict_count = 0 + for runway_id, runway_items in scheduled_by_runway.items(): + runway_spec = runways_by_id[runway_id] + runway_items.sort(key=lambda item: item[0]) + required_gap_floor = _capacity_spacing(runway_spec) + for idx in range(1, len(runway_items)): + prev_time, _, prev_flight = runway_items[idx - 1] + curr_time, _, curr_flight = runway_items[idx] + wake_gap = SEPARATION_BY_WAKE[(prev_flight.wake_class.value, curr_flight.wake_class.value)] + required_gap = max(required_gap_floor, wake_gap) + actual_gap = curr_time - prev_time + if actual_gap < required_gap: + conflict_count += 1 + capacity_violations += 1 + diagnostics.append( + f"Runway {runway_id} has {prev_flight.flight_id}->{curr_flight.flight_id} spaced {actual_gap} minutes apart; needs {required_gap}." + ) + + total_delay = sum(delays.values()) + max_delay = max(delays.values(), default=0) + + completeness = max( + 0.0, + min( + 1.0, + len(delays) / max(1, len(task.flights)), + ), + ) + conflict_free_ratio = max( + 0.0, + 1.0 - (conflict_count / max(1, len(task.flights) - 1)), + ) + priority_handling = max( + 0.0, + 1.0 - (priority_violations / max(1, sum(1 for flight in task.flights if flight.priority != PriorityClass.NORMAL))), + ) + delay_efficiency = max(0.0, 1.0 - (total_delay / task.delay_budget)) + fuel_efficiency = max(0.0, 1.0 - (fuel_burn / task.fuel_budget)) + + airline_averages = { + airline: round(sum(values) / len(values), AIRLINE_DELAY_PRECISION) + for airline, values in per_airline_delays.items() + if values + } + spread = pstdev(list(airline_averages.values())) if len(airline_averages) > 1 else 0.0 + fairness = max(0.0, 1.0 - (spread / task.fairness_tolerance)) + + # Connection impact: risk-weighted delay score for CONNECTION flights + connection_flights = [ + f for f in task.flights if f.priority == PriorityClass.CONNECTION and f.connection_risk > 0 + ] + if connection_flights: + # Budget: each connection flight is expected to tolerate up to its delay tolerance + weighted_actual = sum( + delays.get(f.flight_id, PRIORITY_DELAY_TOLERANCE[PriorityClass.CONNECTION]) * f.connection_risk + for f in connection_flights + ) + weighted_budget = sum( + PRIORITY_DELAY_TOLERANCE[PriorityClass.CONNECTION] * f.connection_risk + for f in connection_flights + ) + connection_impact_score = max(0.0, 1.0 - weighted_actual / max(1.0, weighted_budget)) + else: + connection_impact_score = 1.0 + + if completeness < 1.0: + recommendations.append("Cover every flight in the scenario before refining the sequence.") + if conflict_count > 0: + recommendations.append("Increase spacing on the affected runway or move some flights to a parallel runway.") + if duplicate_assignments > 0: + recommendations.append("Avoid duplicate flight entries; submit one definitive assignment per flight.") + if priority_violations > 0: + recommendations.append("Pull medical, emergency, and connection-sensitive flights closer to the front of the sequence.") + if fairness < 0.7: + recommendations.append("Redistribute delay so one airline is not absorbing most of the disruption.") + if fuel_efficiency < 0.7: + recommendations.append("Reduce airborne or taxi delay on the highest-burn arrivals and heavy aircraft.") + if not recommendations: + recommendations.append("The plan is operationally strong; minor gains remain in passenger delay reduction.") + + # Calculate normalized score using defined weights + normalized_score = ( + SCORE_WEIGHTS["completeness"] * completeness + + SCORE_WEIGHTS["conflict_free"] * conflict_free_ratio + + SCORE_WEIGHTS["priority"] * priority_handling + + SCORE_WEIGHTS["delay"] * delay_efficiency + + SCORE_WEIGHTS["fairness"] * fairness + + SCORE_WEIGHTS["fuel"] * fuel_efficiency + ) + normalized_score *= completeness + if conflict_count > 0: + normalized_score *= conflict_free_ratio + normalized_score = max(0.01, min(0.99, normalized_score)) + + metrics = TaskMetrics( + schedule_completeness=round(completeness, METRIC_PRECISION), + conflict_free_ratio=round(conflict_free_ratio, METRIC_PRECISION), + priority_handling=round(priority_handling, METRIC_PRECISION), + delay_efficiency=round(delay_efficiency, METRIC_PRECISION), + fairness=round(fairness, METRIC_PRECISION), + fuel_efficiency=round(fuel_efficiency, METRIC_PRECISION), + connection_impact_score=round(connection_impact_score, METRIC_PRECISION), + agent_judgment=0.0, + overall_score=round(normalized_score, METRIC_PRECISION), + total_delay_minutes=total_delay, + max_delay_minutes=max_delay, + estimated_fuel_burn=round(fuel_burn, FUEL_PRECISION), + conflict_count=conflict_count, + capacity_violations=capacity_violations, + priority_violations=priority_violations, + emergency_violations=emergency_violations, + medical_violations=medical_violations, + connection_violations=connection_violations, + missing_assignments=missing_assignments, + invalid_assignments=invalid_assignments + unknown_assignments, + per_airline_average_delay=airline_averages, + ) + return SimulationOutcome( + metrics=metrics, + diagnostics=diagnostics[:MAX_DIAGNOSTICS], + recommendations=recommendations[:MAX_RECOMMENDATIONS], + normalized_score=normalized_score, + ) + + +def per_role_metrics( + task: TaskDefinition, + proposal: Iterable[SlotAssignment], + outcome: SimulationOutcome, +) -> Dict: + """Extract AMAN/DMAN split metrics from a simulation outcome. + + Returns plain dict for lightweight use in reward functions. + Arrivals → AMAN. Departures → DMAN. + """ + from models import OperationType, PriorityClass + + flights_by_id = {f.flight_id: f for f in task.flights} + assignment_map = {a.flight_id: a for a in proposal} + + arr_delays: List[int] = [] + dep_delays: List[int] = [] + emg_arr_ok = emg_arr_miss = 0 + emg_dep_ok = emg_dep_miss = 0 + + for fid, slot in assignment_map.items(): + flight = flights_by_id.get(fid) + if not flight: + continue + delay = abs(slot.assigned_minute - flight.scheduled_minute) + is_emg = flight.priority in (PriorityClass.EMERGENCY, PriorityClass.MEDICAL) + + if flight.operation == OperationType.ARRIVAL: + arr_delays.append(delay) + if is_emg: + if delay <= 5: + emg_arr_ok += 1 + else: + emg_arr_miss += 1 + else: + dep_delays.append(delay) + if is_emg: + if delay <= 5: + emg_dep_ok += 1 + else: + emg_dep_miss += 1 + + total_arrivals = sum(1 for f in task.flights if f.operation == OperationType.ARRIVAL) + total_departures = sum(1 for f in task.flights if f.operation == OperationType.DEPARTURE) + + return { + "arrival_count": total_arrivals, + "departure_count": total_departures, + "arrival_delay_total": sum(arr_delays), + "arrival_delay_mean": sum(arr_delays) / max(1, len(arr_delays)), + "arrivals_assigned": len(arr_delays), + "arrivals_missing": total_arrivals - len(arr_delays), + "departure_delay_total": sum(dep_delays), + "departure_delay_mean": sum(dep_delays) / max(1, len(dep_delays)), + "departures_assigned": len(dep_delays), + "departures_missing": total_departures - len(dep_delays), + "emergency_arrivals_ok": emg_arr_ok, + "emergency_arrivals_missed": emg_arr_miss, + "emergency_departures_ok": emg_dep_ok, + "emergency_departures_missed": emg_dep_miss, + "total_conflict_count": outcome.metrics.conflict_count, + } diff --git a/graders.py b/graders.py new file mode 100644 index 0000000000000000000000000000000000000000..8a4abe21862f042f6da00af6af42d12f2f325061 --- /dev/null +++ b/graders.py @@ -0,0 +1,471 @@ +"""Task graders for benchmark scoring. + +Architecture (3-layer gated design): + Layer 1 — SafetyGateEvaluator: Hard constraint gates. Any violation caps the ceiling score. + Layer 2 — PriorityRubricGrader: Grades quality of emergency/medical/connection prioritization. + Layer 3 — EfficiencyRubricGrader: Grades operational efficiency (delay, fuel, fairness, connection impact). + GatedCompositeGrader: Official score = min(gate_ceiling, 0.30*priority + 0.70*efficiency). + + LLMSupervisorGrader runs independently as auxiliary information only and is NOT part of the + official composite score. +""" + +from __future__ import annotations + +import json +import os +from abc import ABC, abstractmethod +from typing import Dict, Iterable, List, Optional, Tuple + +from openai import APIConnectionError, APIError, APITimeoutError, OpenAI, OpenAIError, RateLimitError + +try: + from .engine import SimulationOutcome + from .models import PriorityClass, SlotAssignment, TaskDefinition, TaskGrade +except ImportError: + from engine import SimulationOutcome + from models import PriorityClass, SlotAssignment, TaskDefinition, TaskGrade + + +STRICT_SCORE_EPSILON = 0.01 + + +def _strict_score(value: float) -> float: + """Normalize to the strict open interval (0, 1) with stable output precision.""" + clipped = max(STRICT_SCORE_EPSILON, min(1.0 - STRICT_SCORE_EPSILON, float(value))) + return round(clipped, 4) + + +# ── Layer 1: Hard Safety Gates ──────────────────────────────────────────────── + +class SafetyGateEvaluator: + """Computes the hard constraint ceiling that caps the final composite score. + + Violations of safety-critical rules (separation conflicts, incomplete schedule, + emergency flight delayed) set a score ceiling regardless of efficiency metrics. + This mirrors real-world ATC: a conflicting plan is REJECTED, not averaged. + """ + + def evaluate( + self, outcome: SimulationOutcome, task: TaskDefinition + ) -> Tuple[float, List[str]]: + """Return (ceiling, list_of_gate_violation_descriptions).""" + ceiling = 1.0 + violations: List[str] = [] + + # Gate 1: Separation conflicts — hardest veto (each extra conflict makes it worse) + if outcome.metrics.conflict_count > 0: + # First conflict drops to 0.40; each additional conflict reduces further, minimum 0.10 + conflict_ceiling = max(0.10, 0.40 - 0.05 * (outcome.metrics.conflict_count - 1)) + ceiling = min(ceiling, conflict_ceiling) + violations.append( + f"{outcome.metrics.conflict_count} separation conflict(s) detected — plan is operationally unsafe" + ) + + # Gate 2: Incomplete schedule + if outcome.metrics.missing_assignments > 0: + missing = outcome.metrics.missing_assignments + # Each missing flight reduces ceiling further, minimum 0.20 + completeness_ceiling = max(0.20, 0.50 - 0.04 * missing) + ceiling = min(ceiling, completeness_ceiling) + violations.append( + f"{missing} flight(s) unassigned — schedule is incomplete" + ) + + # Gate 3: Emergency flight delay violation — life-safety ceiling + if outcome.metrics.emergency_violations > 0: + ceiling = min(ceiling, 0.35) + violations.append( + "EMERGENCY flight delay tolerance exceeded — life-safety risk" + ) + + return ceiling, violations + + +# ── Layer 2: Priority Rubric ────────────────────────────────────────────────── + +class PriorityRubricGrader: + """Grades the quality of priority-aware sequencing decisions. + + Emergency protection is binary (0 or 1). Medical and connection handling + are graded proportionally. Connection scoring uses the connection_risk field + via the pre-computed connection_impact_score in metrics. + """ + + def grade(self, task: TaskDefinition, outcome: SimulationOutcome) -> float: + metrics = outcome.metrics + + # Emergency: binary — any violation collapses this to 0.0 + emergency_count = sum( + 1 for f in task.flights if f.priority == PriorityClass.EMERGENCY + ) + if emergency_count > 0: + emergency_score = 0.0 if metrics.emergency_violations > 0 else 1.0 + else: + emergency_score = 1.0 # No emergency flights = no penalty + + # Medical: partial credit proportional to violations + medical_count = sum( + 1 for f in task.flights if f.priority == PriorityClass.MEDICAL + ) + if medical_count > 0: + medical_score = max(0.0, 1.0 - metrics.medical_violations / medical_count) + else: + medical_score = 1.0 + + # Connection: uses the risk-weighted connection_impact_score from engine + # (0.0 = all high-risk connections were heavily delayed; 1.0 = all protected) + connection_score = metrics.connection_impact_score + + return 0.50 * emergency_score + 0.30 * medical_score + 0.20 * connection_score + + +# ── Layer 3: Efficiency Rubric ──────────────────────────────────────────────── + +class EfficiencyRubricGrader: + """Grades the operational efficiency dimensions of the plan. + + Weights are domain-derived: + delay 0.35 — total system delay is the primary efficiency metric (ICAO) + fuel 0.25 — fuel burn directly impacts cost and environment + fairness 0.20 — equitable delay distribution across airlines (IATA WSG) + connection 0.20 — risk-weighted connection impact (previously unused field) + """ + + WEIGHTS: Dict[str, float] = { + "delay": 0.35, + "fuel": 0.25, + "fairness": 0.20, + "connection_impact": 0.20, + } + + def grade(self, outcome: SimulationOutcome) -> float: + m = outcome.metrics + return ( + self.WEIGHTS["delay"] * m.delay_efficiency + + self.WEIGHTS["fuel"] * m.fuel_efficiency + + self.WEIGHTS["fairness"] * m.fairness + + self.WEIGHTS["connection_impact"] * m.connection_impact_score + ) + + +# ── Composite Grader (Official Score) ──────────────────────────────────────── + +class BaseTaskGrader(ABC): + """Base class for task graders.""" + + grader_name: str + + @abstractmethod + def grade( + self, + task: TaskDefinition, + outcome: SimulationOutcome, + proposal: Iterable[SlotAssignment], + rationale: str = "", + ) -> TaskGrade: + """Return a score in the strict range (0.0, 1.0).""" + + +class GatedCompositeGrader(BaseTaskGrader): + """Official deterministic benchmark score. + + Formula: + raw = 0.30 * priority_score + 0.70 * efficiency_score + score = min(gate_ceiling, raw) + + Safety gates (Layer 1) apply a hard ceiling: a plan with conflicts or missing + flights can never compensate with excellent efficiency scores. This prevents + reward hacking and aligns with FAA GDP evaluation practice. + """ + + grader_name = "composite_task_grader" + + def __init__(self) -> None: + self._safety_gate = SafetyGateEvaluator() + self._priority = PriorityRubricGrader() + self._efficiency = EfficiencyRubricGrader() + + def grade( + self, + task: TaskDefinition, + outcome: SimulationOutcome, + proposal: Iterable[SlotAssignment], + rationale: str = "", + ) -> TaskGrade: + ceiling, gate_violations = self._safety_gate.evaluate(outcome, task) + priority_score = self._priority.grade(task, outcome) + efficiency_score = self._efficiency.grade(outcome) + + raw = 0.30 * priority_score + 0.70 * efficiency_score + final = min(ceiling, max(0.0, raw)) + + if gate_violations: + status = f"GATED at {ceiling:.3f} — {'; '.join(gate_violations)}." + elif final >= 0.85: + status = "Plan accepted: safe, complete, and operationally balanced." + elif final >= 0.55: + status = "Plan accepted with operational weaknesses remaining." + else: + status = "Plan scored low on efficiency or priority dimensions." + + return TaskGrade( + grader_name=self.grader_name, + score=_strict_score(final), + rationale=status, + sub_scores={ + "gate_ceiling": round(ceiling, 4), + "priority_score": round(priority_score, 4), + "efficiency_score": round(efficiency_score, 4), + }, + ) + + +# ── Auxiliary LLM Grader (non-official) ───────────────────────────────────── + +class LLMSupervisorGrader(BaseTaskGrader): + """Optional LLM-backed supervisor used when credentials are available. + + This grader is AUXILIARY ONLY and does NOT contribute to the official + composite score. It is preserved as a side-channel for analysis. + """ + + grader_name = "llm_supervisor" + + def __init__(self, model_name: Optional[str] = None): + self.api_base_url = os.getenv("API_BASE_URL", "") + self.api_key = os.getenv("HF_TOKEN", os.getenv("OPENAI_API_KEY", "")) + self.model_name = model_name or os.getenv("MODEL_NAME", "") + + def _enabled(self) -> bool: + return bool(self.api_base_url and self.api_key and self.model_name) + + def grade( + self, + task: TaskDefinition, + outcome: SimulationOutcome, + proposal: Iterable[SlotAssignment], + rationale: str = "", + ) -> TaskGrade: + if not self._enabled(): + return TaskGrade( + grader_name=self.grader_name, + score=_strict_score(outcome.metrics.overall_score), + rationale="LLM grader disabled; using deterministic fallback identical to operational score.", + sub_scores={"fallback": _strict_score(outcome.metrics.overall_score)}, + ) + + client = OpenAI(base_url=self.api_base_url, api_key=self.api_key) + proposal_summary = [ + { + "flight_id": assignment.flight_id, + "runway": assignment.runway, + "assigned_minute": assignment.assigned_minute, + } + for assignment in proposal + ] + prompt = ( + "You are a senior ATC supervisor grading a runway recovery plan.\n" + "Return strict JSON with keys score and rationale.\n" + "Score must be a float strictly between 0.0 and 1.0.\n\n" + f"Task: {task.title}\n" + f"Objective: {task.objective}\n" + f"Operational metrics: {outcome.metrics.model_dump_json()}\n" + f"Diagnostics: {json.dumps(outcome.diagnostics)}\n" + f"Proposal: {json.dumps(proposal_summary)}\n" + f"Agent rationale: {rationale}\n" + ) + try: + response = client.chat.completions.create( + model=self.model_name, + temperature=0, + max_tokens=180, + messages=[ + { + "role": "system", + "content": ( + "Grade ATC recovery plans conservatively and output strict JSON only. " + "Score must be strictly greater than 0 and strictly less than 1." + ), + }, + {"role": "user", "content": prompt}, + ], + ) + raw_text = (response.choices[0].message.content or "").strip() + start = raw_text.find("{") + end = raw_text.rfind("}") + if start == -1 or end == -1 or start > end: + raise ValueError("LLM grader response contains no valid JSON object") + data = json.loads(raw_text[start: end + 1]) + if not isinstance(data, dict): + raise ValueError("LLM grader payload must be a JSON object") + score = max(0.0, min(1.0, float(data.get("score", 0.0)))) + rationale_text = str(data.get("rationale", "LLM grader returned no rationale.")) + except ( + APIConnectionError, + APITimeoutError, + APIError, + RateLimitError, + OpenAIError, + json.JSONDecodeError, + ValueError, + KeyError, + AttributeError, + TypeError, + ) as exc: + score = outcome.metrics.overall_score + rationale_text = f"LLM grading failed, reverted to deterministic score: {exc}" + + return TaskGrade( + grader_name=self.grader_name, + score=_strict_score(score), + rationale=rationale_text, + sub_scores={"operational_score": _strict_score(outcome.metrics.overall_score)}, + ) + + +# ── Multi-Agent Coordination Grader ────────────────────────────────────────── + +class MultiAgentCoordinationGrader: + """Grades quality of AMAN/DMAN coordination in multi-agent episodes. + + Scores four coordination dimensions independently: + 1. Cross-lane conflict avoidance — did shared-runway conflicts occur? + 2. Emergency handling quality — were EMERGENCY/MEDICAL flights handled first? + 3. Negotiation efficiency — how many rounds needed to resolve conflicts? + 4. Theory-of-mind bonus — did agents pre-emptively coordinate? + + This grader is auxiliary (not part of official benchmark composite) but + used directly in per-agent reward functions during GRPO training. + """ + + grader_name = "multi_agent_coordination" + + def grade( + self, + task: TaskDefinition, + outcome: SimulationOutcome, + aman_slots: List[SlotAssignment], + dman_slots: List[SlotAssignment], + negotiation_rounds: int = 0, + preemptive_yield: bool = False, + ) -> TaskGrade: + score = 0.0 + sub_scores: Dict[str, float] = {} + rationale_parts: List[str] = [] + + # 1. Cross-lane conflict avoidance + aman_runway_set = {s.runway for s in aman_slots} + dman_runway_set = {s.runway for s in dman_slots} + shared_runways = aman_runway_set & dman_runway_set + + if not shared_runways: + cross_score = 1.0 + rationale_parts.append("Agents used segregated runways — no cross-lane conflict possible.") + else: + cross_conflicts = outcome.metrics.conflict_count + cross_score = max(0.0, 1.0 - cross_conflicts * 0.25) + if cross_conflicts == 0: + rationale_parts.append(f"Zero conflicts on {len(shared_runways)} shared runway(s).") + else: + rationale_parts.append(f"{cross_conflicts} conflict(s) on shared runways.") + + sub_scores["cross_lane_avoidance"] = round(cross_score, 4) + score += 0.25 * cross_score + + # 2. Emergency handling quality + emergency_flights = [ + f for f in task.flights + if f.priority in (PriorityClass.EMERGENCY, PriorityClass.MEDICAL) + ] + all_slots = {s.flight_id: s for s in aman_slots + dman_slots} + if emergency_flights: + emg_score_val = 0.0 + for f in emergency_flights: + slot = all_slots.get(f.flight_id) + if slot: + delay = abs(slot.assigned_minute - f.scheduled_minute) + emg_score_val += 1.0 if delay <= 5 else max(0.0, 1.0 - delay / 10.0) + emg_score = emg_score_val / len(emergency_flights) + rationale_parts.append( + f"Emergency handling: {emg_score:.2f} across {len(emergency_flights)} priority flight(s)." + ) + else: + emg_score = 1.0 + rationale_parts.append("No emergency flights in scenario.") + + sub_scores["emergency_handling"] = round(emg_score, 4) + score += 0.30 * emg_score + + # 3. Negotiation efficiency + if negotiation_rounds == 0: + neg_score = 1.0 + rationale_parts.append("Coordination achieved in bid round (0 negotiation rounds).") + elif negotiation_rounds == 1: + neg_score = 0.6 + rationale_parts.append("Coordination required 1 negotiation round.") + else: + neg_score = max(0.0, 0.4 - 0.15 * (negotiation_rounds - 2)) + rationale_parts.append(f"Coordination required {negotiation_rounds} negotiation rounds.") + + sub_scores["negotiation_efficiency"] = round(neg_score, 4) + score += 0.20 * neg_score + + # 4. Theory-of-mind / pre-emptive coordination bonus + tom_score = 1.0 if preemptive_yield else 0.0 + if preemptive_yield: + rationale_parts.append("Theory-of-mind bonus: agent pre-emptively yielded before conflict detected.") + sub_scores["theory_of_mind"] = round(tom_score, 4) + score += 0.25 * tom_score + + return TaskGrade( + grader_name=self.grader_name, + score=round(max(0.01, min(0.99, score)), 4), + rationale=" | ".join(rationale_parts), + sub_scores=sub_scores, + ) + + +def grade_multi_agent( + task: TaskDefinition, + outcome: SimulationOutcome, + aman_slots: List[SlotAssignment], + dman_slots: List[SlotAssignment], + aman_rationale: str = "", + dman_rationale: str = "", + negotiation_rounds: int = 0, + preemptive_yield: bool = False, +) -> List[TaskGrade]: + """Grade a multi-agent episode. Returns [composite, coordination, llm_supervisor].""" + merged = aman_slots + dman_slots + combined_rationale = f"AMAN: {aman_rationale} | DMAN: {dman_rationale}" + + composite = GatedCompositeGrader().grade(task, outcome, merged, combined_rationale) + coordination = MultiAgentCoordinationGrader().grade( + task, outcome, aman_slots, dman_slots, negotiation_rounds, preemptive_yield + ) + llm = LLMSupervisorGrader().grade(task, outcome, merged, combined_rationale) + return [composite, coordination, llm] + + +# ── Public Entry Point ──────────────────────────────────────────────────────── + +def grade_task( + task: TaskDefinition, + outcome: SimulationOutcome, + proposal: Iterable[SlotAssignment], + rationale: str = "", +) -> List[TaskGrade]: + """Run all task graders and return their scores. + + Each sub-grader is instantiated once and called once. The composite grader + does NOT internally re-run sub-graders (no duplicate computation). + + Order: [composite, llm_supervisor] + - composite_task_grader: official benchmark score (deterministic, gated) + - llm_supervisor: auxiliary LLM signal (non-official) + """ + proposal_list = proposal if isinstance(proposal, list) else list(proposal) + composite = GatedCompositeGrader().grade(task, outcome, proposal_list, rationale) + llm = LLMSupervisorGrader().grade(task, outcome, proposal_list, rationale) + return [composite, llm] diff --git a/models.py b/models.py new file mode 100644 index 0000000000000000000000000000000000000000..10b22d1ded10487c65f60dfa440182a86b405067 --- /dev/null +++ b/models.py @@ -0,0 +1,266 @@ +"""Typed data models for the ATC optimization environment.""" + +from __future__ import annotations + +import json +from enum import Enum +from typing import Dict, List, Literal + +from pydantic import BaseModel, Field, field_validator + +try: + from openenv.core.env_server.types import Action, Observation, State +except Exception as exc: + # Fallback for training-only workflows when OpenEnv runtime deps are partially + # installed (for example fastmcp/openenv version skew on cluster nodes). + print(f"[WARN] OpenEnv types unavailable, using local BaseModel fallbacks: {exc}") + + class Action(BaseModel): + pass + + class Observation(BaseModel): + pass + + class State(BaseModel): + pass + + +class OperationType(str, Enum): + """Flight operation category.""" + + ARRIVAL = "arrival" + DEPARTURE = "departure" + + +class WakeClass(str, Enum): + """Wake turbulence class used for separation logic.""" + + LIGHT = "L" + MEDIUM = "M" + HEAVY = "H" + + +class PriorityClass(str, Enum): + """Operational priority categories for dispatching.""" + + NORMAL = "normal" + CONNECTION = "connection" + MEDICAL = "medical" + EMERGENCY = "emergency" + + +class Difficulty(str, Enum): + """Task difficulty level.""" + + EASY = "easy" + MEDIUM = "medium" + HARD = "hard" + + +DEFAULT_ALLOWED_OPERATIONS = ( + OperationType.ARRIVAL, + OperationType.DEPARTURE, +) + + +def default_allowed_operations() -> List[OperationType]: + return list(DEFAULT_ALLOWED_OPERATIONS) + + +class RunwaySpec(BaseModel): + """Runway configuration available to the controller.""" + + runway_id: str = Field(..., description="Runway identifier") + allowed_operations: List[OperationType] = Field( + default_factory=default_allowed_operations, + description="Operations permitted on the runway", + ) + hourly_capacity: int = Field( + ..., ge=4, le=60, description="Maximum operations per hour" + ) + weather_penalty: float = Field( + default=1.0, + ge=1.0, + le=2.0, + description="Multiplier applied to capacity spacing during disruption", + ) + notes: str = Field(default="", description="Operational notes for the runway") + + +class FlightRecord(BaseModel): + """Flight requiring a runway/slot decision.""" + + flight_id: str = Field(..., description="Flight callsign or identifier") + airline: str = Field(..., description="Airline code") + operation: OperationType = Field(..., description="Arrival or departure") + wake_class: WakeClass = Field(..., description="Wake turbulence category") + scheduled_minute: int = Field(..., ge=0, description="Original planned slot") + earliest_minute: int = Field(..., ge=0, description="Earliest feasible slot") + latest_minute: int = Field(..., ge=0, description="Latest feasible slot") + allowed_runways: List[str] = Field(..., description="Runways the flight may use") + passengers: int = Field(..., ge=1, description="Passengers impacted") + fuel_burn_per_minute: float = Field( + ..., ge=1.0, description="Estimated fuel burn cost for airborne/ground delay" + ) + priority: PriorityClass = Field( + default=PriorityClass.NORMAL, description="Operational priority" + ) + connection_risk: float = Field( + default=0.0, + ge=0.0, + le=1.0, + description="Severity of onward connection disruption", + ) + notes: str = Field(default="", description="Operational nuance for the flight") + + +class SlotAssignment(BaseModel): + """Controller proposal for a single flight.""" + + flight_id: str = Field(..., description="Flight being assigned") + runway: str = Field(..., description="Runway chosen for the flight") + assigned_minute: int = Field(..., ge=0, description="Assigned slot minute") + hold_minutes: int = Field( + default=0, + ge=0, + description="Explicit holding/queueing amount declared by the agent", + ) + + +class TaskMetrics(BaseModel): + """Normalized metrics produced by the simulator/grader.""" + + schedule_completeness: float = Field(default=0.0, ge=0.0, le=1.0) + conflict_free_ratio: float = Field(default=0.0, ge=0.0, le=1.0) + priority_handling: float = Field(default=0.0, ge=0.0, le=1.0) + delay_efficiency: float = Field(default=0.0, ge=0.0, le=1.0) + fairness: float = Field(default=0.0, ge=0.0, le=1.0) + fuel_efficiency: float = Field(default=0.0, ge=0.0, le=1.0) + connection_impact_score: float = Field(default=0.0, ge=0.0, le=1.0) + agent_judgment: float = Field(default=0.0, ge=0.0, le=1.0) + overall_score: float = Field(default=0.01, ge=0.0, le=1.0) + total_delay_minutes: int = Field(default=0, ge=0) + max_delay_minutes: int = Field(default=0, ge=0) + estimated_fuel_burn: float = Field(default=0.0, ge=0.0) + conflict_count: int = Field(default=0, ge=0) + capacity_violations: int = Field(default=0, ge=0) + priority_violations: int = Field(default=0, ge=0) + emergency_violations: int = Field(default=0, ge=0) + medical_violations: int = Field(default=0, ge=0) + connection_violations: int = Field(default=0, ge=0) + missing_assignments: int = Field(default=0, ge=0) + invalid_assignments: int = Field(default=0, ge=0) + per_airline_average_delay: Dict[str, float] = Field(default_factory=dict) + + +class TaskDefinition(BaseModel): + """Scenario definition shipped with the benchmark.""" + + task_id: str + title: str + difficulty: Difficulty + airport: str + description: str + objective: str + grading_focus: List[str] + planning_horizon_minutes: int = Field(..., ge=30) + max_steps: int = Field(default=4, ge=1, le=8) + delay_budget: int = Field(..., ge=30) + fuel_budget: float = Field(..., ge=50.0) + fairness_tolerance: float = Field(..., ge=1.0) + runways: List[RunwaySpec] + flights: List[FlightRecord] + + +class TaskGrade(BaseModel): + """Outcome returned by a task grader.""" + + grader_name: str + score: float = Field(..., ge=0.0, le=1.0) + rationale: str + sub_scores: Dict[str, float] = Field(default_factory=dict) + + +class ATCOptimizationAction(Action): + """Agent proposal for re-sequencing the disrupted traffic bank.""" + + proposal: List[SlotAssignment] = Field( + ..., + description="Full candidate slot plan for all or some flights in the scenario", + ) + rationale: str = Field( + default="", + description="Short explanation describing prioritization decisions", + ) + commit: bool = Field( + default=True, + description="Whether to finish the episode after evaluating this plan", + ) + + @field_validator("proposal", mode="before") + @classmethod + def parse_proposal_json(cls, value): + """Allow playground users to paste proposal JSON into a text box.""" + + if isinstance(value, str): + text = value.strip() + if not text: + return [] + try: + parsed = json.loads(text) + except json.JSONDecodeError as exc: + raise ValueError( + "proposal must be a JSON list of slot assignments" + ) from exc + return parsed + return value + + +class ATCOptimizationObservation(Observation): + """Observation returned after reset/step.""" + + task_id: str = Field(default="", description="Task identifier") + task_title: str = Field(default="", description="Human-readable task name") + difficulty: Difficulty = Field(default=Difficulty.EASY) + airport: str = Field(default="", description="Airport code") + briefing: str = Field(default="", description="Text briefing for the agent") + objective: str = Field(default="", description="Task goal summary") + grading_focus: List[str] = Field(default_factory=list) + flights: List[FlightRecord] = Field(default_factory=list) + runways: List[RunwaySpec] = Field(default_factory=list) + current_metrics: TaskMetrics = Field(default_factory=TaskMetrics) + best_metrics: TaskMetrics = Field(default_factory=TaskMetrics) + current_plan: List[SlotAssignment] = Field(default_factory=list) + diagnostics: List[str] = Field(default_factory=list) + recommendations: List[str] = Field(default_factory=list) + grader_feedback: List[str] = Field(default_factory=list) + steps_remaining: int = Field(default=0, ge=0) + + +class PlanSnapshot(BaseModel): + """Compact history item used inside state.""" + + step: int = Field(..., ge=0) + score: float = Field(..., ge=0.0, le=1.0) + reward: float = Field(..., ge=-1.0, le=1.0) + commit: bool = Field(default=True) + + +class ATCOptimizationState(State): + """Serializable internal state for inspection through `/state`.""" + + task_id: str = Field(default="", description="Current task id") + task_title: str = Field(default="", description="Current task title") + difficulty: Difficulty = Field(default=Difficulty.EASY) + airport: str = Field(default="", description="Airport code") + seed: int = Field(default=0, ge=0) + max_steps: int = Field(default=0, ge=0) + current_metrics: TaskMetrics = Field(default_factory=TaskMetrics) + best_metrics: TaskMetrics = Field(default_factory=TaskMetrics) + current_plan: List[SlotAssignment] = Field(default_factory=list) + best_plan: List[SlotAssignment] = Field(default_factory=list) + history: List[PlanSnapshot] = Field(default_factory=list) + grader_history: List[TaskGrade] = Field(default_factory=list) + final_summary: str = Field(default="", description="Latest summary for the task") + active_task_ids: List[str] = Field(default_factory=list) + mode: Literal["planning"] = Field(default="planning") diff --git a/multi_agent/__init__.py b/multi_agent/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..95f0f1510812856ad9dd8b5099721e6b925abb6e --- /dev/null +++ b/multi_agent/__init__.py @@ -0,0 +1,4 @@ +"""Multi-agent ATC environment: AMAN/DMAN cooperative-competitive coordination. + +Also exports ADAPT — the meta-agent for structural domain transfer. +""" diff --git a/multi_agent/adapt.py b/multi_agent/adapt.py new file mode 100644 index 0000000000000000000000000000000000000000..31cdc973d51442d81efc5cb2bd6ff36c648760d8 --- /dev/null +++ b/multi_agent/adapt.py @@ -0,0 +1,399 @@ +"""ADAPT — Adaptive Decision Agent for Problem Transfer. + +ADAPT receives scheduling problems from UNKNOWN domains. It has no prior +knowledge of any domain. It analyses each task's structural signals: + + - Time window tightness (latest - earliest relative to planning horizon) + - connection_risk (probability of cascading failure if delayed) + - fuel_burn_per_minute (resource intensity proxy) + - passengers (impact weight proxy) + - notes (free-text urgency signal extraction) + +From these domain-agnostic signals it infers ATC parameter mappings +(wake_class and priority) that let AMAN/DMAN solve ANY scheduling problem +unchanged — without ever being told what domain it is. + +Core functions: + build_adapt_observation — build ADAPTObservation with structural entity profiles + _compute_entity_profiles — derive per-entity-type statistics from task data + _build_adapt_heuristic — structural heuristic fallback (no keyword matching) + apply_adapt_mapping — apply ADAPTAction → ATC-ready TaskDefinition + parse_adapt_action — parse LLM JSON completion into ADAPTAction +""" + +from __future__ import annotations + +import json +import re +from collections import defaultdict +from typing import Any, Dict, List, Optional + +try: + from ..models import FlightRecord, PriorityClass, TaskDefinition, WakeClass + from .models import ( + ADAPTAction, + ADAPTObservation, + AgentRole, + SupervisorProfileName, + SUPERVISOR_PROFILES, + ) +except ImportError: + from models import FlightRecord, PriorityClass, TaskDefinition, WakeClass + from multi_agent.models import ( + ADAPTAction, + ADAPTObservation, + AgentRole, + SupervisorProfileName, + SUPERVISOR_PROFILES, + ) + + +# ── Urgency signal words (domain-agnostic) ──────────────────────────────────── +# These do NOT encode domain knowledge — they are general English urgency markers +# that appear in notes regardless of domain. + +_URGENCY_WORDS = frozenset({ + "emergency", "critical", "urgent", "immediate", "priority", + "stat", "asap", "deadline", "cannot wait", "must vacate", + "surge", "life-threatening", "requires immediate", +}) + + +# ── Structural profile computation ──────────────────────────────────────────── + +def _compute_entity_profiles(task: TaskDefinition) -> Dict[str, Dict[str, Any]]: + """Compute domain-agnostic structural signals per entity type. + + Groups flights by FlightRecord.airline (entity type tag) and computes + statistics that are meaningful across any scheduling domain: + + - avg_window_minutes : avg(latest - earliest) — small = high urgency + - time_pressure : 1 - avg_window / planning_horizon — higher = tighter + - avg_connection_risk : avg connection_risk — higher = higher-priority + - avg_fuel_burn : avg fuel_burn_per_minute — resource intensity proxy + - avg_passengers : avg passengers — impact weight proxy + - urgency_in_notes : any urgency-word hit in combined notes + - operation_mix : {"arrival": N, "departure": N} + - count : number of entities of this type + """ + groups: Dict[str, List[FlightRecord]] = defaultdict(list) + for f in task.flights: + groups[f.airline or "UNKNOWN"].append(f) + + horizon = max(1, task.planning_horizon_minutes) + profiles: Dict[str, Dict[str, Any]] = {} + + for entity_type, flights in groups.items(): + windows = [f.latest_minute - f.earliest_minute for f in flights] + risks = [f.connection_risk for f in flights] + burns = [f.fuel_burn_per_minute for f in flights] + pax = [f.passengers for f in flights] + + ops: Dict[str, int] = {"arrival": 0, "departure": 0} + for f in flights: + k = f.operation.value if hasattr(f.operation, "value") else str(f.operation) + if k in ops: + ops[k] += 1 + + combined_notes = " ".join((f.notes or "").lower() for f in flights) + urgency_hit = any(w in combined_notes for w in _URGENCY_WORDS) + + n = max(1, len(flights)) + avg_window = sum(windows) / n + avg_risk = sum(risks) / n + avg_burn = sum(burns) / n + avg_pax = sum(pax) / n + + # Normalized time pressure: 0 = fully flexible, 1 = zero slack + time_pressure = max(0.0, min(1.0, 1.0 - avg_window / horizon)) + + profiles[entity_type] = { + "count": n, + "avg_window_minutes": round(avg_window, 1), + "time_pressure": round(time_pressure, 4), + "avg_connection_risk": round(avg_risk, 4), + "avg_fuel_burn": round(avg_burn, 2), + "avg_passengers": round(avg_pax, 1), + "urgency_in_notes": urgency_hit, + "operation_mix": ops, + } + + return profiles + + +# ── Priority / wake-class tier ordering ────────────────────────────────────── + +_PRIORITY_TIERS = [ + PriorityClass.EMERGENCY.value, + PriorityClass.MEDICAL.value, + PriorityClass.CONNECTION.value, + PriorityClass.NORMAL.value, +] +_WAKE_TIERS = [WakeClass.HEAVY.value, WakeClass.MEDIUM.value, WakeClass.LIGHT.value] + + +def _demote_priority(priority: str) -> str: + """Return the next-lower priority tier (floor at normal).""" + idx = _PRIORITY_TIERS.index(priority) if priority in _PRIORITY_TIERS else len(_PRIORITY_TIERS) - 1 + return _PRIORITY_TIERS[min(idx + 1, len(_PRIORITY_TIERS) - 1)] + + +def _demote_wake(wake: str) -> str: + """Return the next-lower wake class (floor at light).""" + idx = _WAKE_TIERS.index(wake) if wake in _WAKE_TIERS else len(_WAKE_TIERS) - 1 + return _WAKE_TIERS[min(idx + 1, len(_WAKE_TIERS) - 1)] + + +# ── Structural heuristic fallback ───────────────────────────────────────────── + +def _build_adapt_heuristic(obs: ADAPTObservation, task: TaskDefinition) -> ADAPTAction: + """Structural heuristic with priority-budget enforcement. + + Step 1 — Raw scoring (per entity type, no domain knowledge): + urgency_score = 0.50 × time_pressure + 0.40 × connection_risk + 0.10 × urgency_flag + + Wake class raw thresholds: ≥ 0.70 → H | ≥ 0.35 → M | else → L + Priority raw thresholds: + cr ≥ 0.80 or (tp ≥ 0.95 and urgency) → emergency + cr ≥ 0.50 or tp ≥ 0.80 → medical + cr ≥ 0.20 or tp ≥ 0.60 → connection + else → normal + + Step 2 — Budget enforcement (prevents all-emergency starvation): + Entities sorted by urgency_score desc; budgets applied top-down: + max_emergency = 1 (exactly one entity type may be emergency) + max_heavy = max(1, N // 3) (at most 1/3 of types as H) + max_medical = max(1, ceil(N / 3)) (after emergency slot is claimed) + Entities that exceed a budget are demoted one tier automatically. + + This ensures AMAN/DMAN always see a realistic priority distribution and + avoids the starvation failure mode where AMAN yields all capacity to + emergencies and DMAN has no runway time left. + """ + profiles: Dict[str, Dict[str, Any]] = obs.entity_profiles or _compute_entity_profiles(task) + + # ── Step 1: raw scores ──────────────────────────────────────────────────── + raw: List[tuple] = [] # (entity_type, urgency_score, raw_wake, raw_priority) + + for entity_type, p in profiles.items(): + tp = p["time_pressure"] + cr = p["avg_connection_risk"] + urgency = bool(p["urgency_in_notes"]) + + urgency_score = 0.50 * tp + 0.40 * cr + 0.10 * float(urgency) + + if urgency_score >= 0.70: + raw_wake = WakeClass.HEAVY.value + elif urgency_score >= 0.35: + raw_wake = WakeClass.MEDIUM.value + else: + raw_wake = WakeClass.LIGHT.value + + if cr >= 0.80 or (tp >= 0.95 and urgency): + raw_priority = PriorityClass.EMERGENCY.value + elif cr >= 0.50 or tp >= 0.80: + raw_priority = PriorityClass.MEDICAL.value + elif cr >= 0.20 or tp >= 0.60: + raw_priority = PriorityClass.CONNECTION.value + else: + raw_priority = PriorityClass.NORMAL.value + + raw.append((entity_type, urgency_score, raw_wake, raw_priority, p)) + + # ── Step 2: budget enforcement — sort by urgency desc ──────────────────── + n_types = max(1, len(raw)) + max_emergency = 1 + max_heavy = max(1, n_types // 3) + max_medical = max(1, -(-n_types // 3)) # ceil(N / 3) + + raw.sort(key=lambda x: x[1], reverse=True) + + entity_wake_map: Dict[str, str] = {} + entity_priority_map: Dict[str, str] = {} + rationale_parts: List[str] = [] + + emergency_used = 0 + medical_used = 0 + heavy_used = 0 + + for entity_type, urgency_score, raw_wake, raw_priority, p in raw: + # ── wake budget ─────────────────────────────────────────────────────── + wake = raw_wake + if wake == WakeClass.HEAVY.value: + if heavy_used < max_heavy: + heavy_used += 1 + else: + wake = _demote_wake(wake) + + # ── priority budget ─────────────────────────────────────────────────── + priority = raw_priority + + if priority == PriorityClass.EMERGENCY.value: + if emergency_used < max_emergency: + emergency_used += 1 + else: + priority = _demote_priority(priority) # → medical + + if priority == PriorityClass.MEDICAL.value: + if medical_used < max_medical: + medical_used += 1 + else: + priority = _demote_priority(priority) # → connection + + entity_wake_map[entity_type] = wake + entity_priority_map[entity_type] = priority + + demoted_wake = " (budget-demoted)" if wake != raw_wake else "" + demoted_pri = " (budget-demoted)" if priority != raw_priority else "" + rationale_parts.append( + f"{entity_type}: tp={p['time_pressure']:.2f} cr={p['avg_connection_risk']:.2f} " + f"score={urgency_score:.2f} " + f"→ wake={wake}{demoted_wake} priority={priority}{demoted_pri}" + ) + + return ADAPTAction( + entity_wake_map=entity_wake_map, + entity_priority_map=entity_priority_map, + rationale=( + f"Structural budget-enforced inference " + f"(budget: emergency≤{max_emergency} heavy≤{max_heavy} medical≤{max_medical}): " + + "; ".join(rationale_parts) + ), + ) + + +# ── Observation builder ─────────────────────────────────────────────────────── + +def build_adapt_observation( + task: TaskDefinition, + profile: SupervisorProfileName, + domain_name: Optional[str] = None, + domain_description: Optional[str] = None, +) -> ADAPTObservation: + """Build ADAPTObservation from any TaskDefinition. + + domain_name and domain_description default to the task's own fields, + so ADAPT works on ATC tasks, ICU tasks, or any future domain without + caller changes. + """ + domain_name = domain_name or task.airport + domain_description = domain_description or task.description or "" + + entity_types: List[str] = sorted({f.airline for f in task.flights if f.airline}) + resource_names: List[str] = [r.runway_id for r in task.runways] + + # Structural profile computation — domain agnostic + entity_profiles = _compute_entity_profiles(task) + + has_emergencies = any( + f.priority == PriorityClass.EMERGENCY + or any(w in (f.notes or "").lower() for w in ("emergency", "critical", "life-threatening")) + for f in task.flights + ) + has_hard_deadlines = any( + any(w in (f.notes or "").upper() for w in ("DEADLINE", "AUTH", "MUST VACATE", "ATFM")) + for f in task.flights + ) + + # Legacy sample_entities string (still rendered in to_prompt_text via entity_profiles) + sample_lines: List[str] = [] + for f in task.flights[:5]: + sample_lines.append( + f" [{f.airline}] {f.flight_id}: {f.operation.value} " + f"window=[{f.earliest_minute},{f.latest_minute}] " + f"pax={f.passengers} fuel={f.fuel_burn_per_minute}/min" + f" risk={f.connection_risk:.2f}" + ) + sample_entities = "\n".join(sample_lines) if sample_lines else "(none)" + + sup_desc = SUPERVISOR_PROFILES[profile]["description"] + + return ADAPTObservation( + role=AgentRole.ADAPT, + domain_id=task.task_id, + domain_name=domain_name, + domain_description=domain_description, + entity_types=entity_types, + resource_names=resource_names, + sample_entities=sample_entities, + entity_profiles=entity_profiles, + supervisor_profile_name=profile, + supervisor_description=sup_desc, + has_emergencies=has_emergencies, + has_hard_deadlines=has_hard_deadlines, + entity_count=len(task.flights), + ) + + +# ── Mapping application ─────────────────────────────────────────────────────── + +def apply_adapt_mapping(task: TaskDefinition, action: ADAPTAction) -> TaskDefinition: + """Apply ADAPTAction to task — override wake_class and priority per entity type. + + Entity type is stored in FlightRecord.airline (no schema changes needed). + Unknown entity types are passed through unchanged. + Invalid enum values in the action are silently skipped. + """ + adapted_flights: List[FlightRecord] = [] + for flight in task.flights: + entity_type = flight.airline or "" + updates: Dict[str, Any] = {} + + if entity_type in action.entity_wake_map: + try: + updates["wake_class"] = WakeClass(action.entity_wake_map[entity_type]) + except ValueError: + pass + + if entity_type in action.entity_priority_map: + try: + updates["priority"] = PriorityClass(action.entity_priority_map[entity_type]) + except ValueError: + pass + + adapted_flights.append( + flight.model_copy(update=updates) if updates else flight + ) + + return task.model_copy(update={"flights": adapted_flights}) + + +# ── Completion parser ───────────────────────────────────────────────────────── + +def _coerce_text(completion: Any) -> str: + if completion is None: + return "" + if isinstance(completion, bytes): + return completion.decode("utf-8", errors="ignore") + if isinstance(completion, str): + return completion + if isinstance(completion, dict): + for key in ("content", "text", "completion", "generated_text"): + if key in completion: + return _coerce_text(completion[key]) + try: + return json.dumps(completion) + except Exception: + return str(completion) + if isinstance(completion, list): + parts = [_coerce_text(item) for item in completion] + return "\n".join(p for p in parts if p) + return str(completion) + + +def parse_adapt_action(completion: Any) -> Optional[ADAPTAction]: + """Parse LLM JSON completion into ADAPTAction. Returns None on failure.""" + text = _coerce_text(completion) + text = re.sub(r"```(?:json)?", "", text).strip() + match = re.search(r"\{.*\}", text, re.DOTALL) + if not match: + return None + try: + data = json.loads(match.group(0)) + return ADAPTAction( + entity_wake_map=data.get("entity_wake_map", {}), + entity_priority_map=data.get("entity_priority_map", {}), + rationale=data.get("rationale", ""), + ) + except Exception: + return None diff --git a/multi_agent/environment.py b/multi_agent/environment.py new file mode 100644 index 0000000000000000000000000000000000000000..4c926e14cda407b3cf858bc9b64957ddbe3aab43 --- /dev/null +++ b/multi_agent/environment.py @@ -0,0 +1,782 @@ +"""Multi-agent ATC environment: AMAN + DMAN cooperative-competitive coordination. + +Protocol (3 rounds per episode): + Round 0 BID: AMAN submits arrivals plan, DMAN submits departures plan independently + Round 1 NEGOTIATE: Environment detects conflicts, broadcasts to both agents, agents revise + Round 2 FINAL: Plans merged, simulate_plan() + grade_task() run, per-agent rewards emitted + +Key design principles: + - Partial observability: each agent sees only own flight type + incoming messages + - Competitive baseline: each agent optimises own objective (delay for own flights) + - Cooperative forcing: emergencies and conflicts force cross-agent coordination + - Reward decomposition: AMAN reward ≠ DMAN reward; both logged for training curves + - Theory-of-mind bonus: rewarded when agent pre-emptively coordinates without prompt +""" + +from __future__ import annotations + +import copy +import re +import random +from dataclasses import dataclass, field +from typing import Dict, List, Optional, Tuple + +try: + from ..engine import empty_metrics, simulate_plan + from ..graders import GatedCompositeGrader, SafetyGateEvaluator, grade_task + from ..models import ( + FlightRecord, + OperationType, + PriorityClass, + SlotAssignment, + TaskDefinition, + TaskMetrics, + ) + from ..tasks import task_catalog + from .models import ( + AMANAction, + AgentRole, + DMANAction, + GeneratorAction, + MessageType, + MultiAgentEpisodeResult, + MultiAgentObservation, + NegotiationMessage, + PerRoleMetrics, + RoundType, + SupervisorProfileName, + SUPERVISOR_PROFILES, + ) + from .supervisor import SupervisorAgent +except ImportError: + from engine import empty_metrics, simulate_plan + from graders import GatedCompositeGrader, SafetyGateEvaluator, grade_task + from models import ( + FlightRecord, + OperationType, + PriorityClass, + SlotAssignment, + TaskDefinition, + TaskMetrics, + ) + from tasks import task_catalog + from multi_agent.models import ( + AMANAction, + AgentRole, + DMANAction, + GeneratorAction, + MessageType, + MultiAgentEpisodeResult, + MultiAgentObservation, + NegotiationMessage, + PerRoleMetrics, + RoundType, + SupervisorProfileName, + SUPERVISOR_PROFILES, + ) + from multi_agent.supervisor import SupervisorAgent + + +MAX_NEGOTIATE_ROUNDS = 2 # max negotiation passes before forced merge (native ATC episodes) +# ADAPT/ICU (domain transfer) remapped tasks are often window-tight; allow extra repair passes +DOMAIN_MAX_NEGOTIATE_ROUNDS = 4 +ATFM_DEADLINE_HEADROOM = 8 # minutes of margin to call an ATFM violation + +# Matches "TRANSFER AUTH DEADLINE: minute 60" in flight notes (ICU domain). +_TRANSFER_DEADLINE_RE = re.compile( + r"TRANSFER\s+AUTH\s+DEADLINE\s*:\s*MINUTE\s+(\d+)", re.IGNORECASE +) + + +def diagnostic_is_separation_issue(diagnostic_line: str) -> bool: + """True for wake/separation violations that force the negotiate round (matches _detect_conflicts).""" + d = diagnostic_line.lower() + return "spaced" in diagnostic_line or "conflict" in d + + +def count_separation_issues(diagnostics: List[str]) -> int: + """Count separation / wake-spacing violations in simulator diagnostics.""" + return sum(1 for line in diagnostics if diagnostic_is_separation_issue(line)) + +# Domain randomization bounds — small perturbations to prevent task memorisation +_RAND_WINDOW_DELTA = 5 # ± minutes applied to flight windows +_RAND_WEATHER_DELTA = 0.08 # ± weather_penalty (clipped to [1.0, 1.8]) +_RAND_BUDGET_SCALE = 0.12 # ± fraction applied to delay_budget / fuel_budget +_RAND_MIN_WINDOW = 10 # never squeeze window below this width (minutes) + + +@dataclass +class EpisodeState: + task: TaskDefinition + supervisor_profile: SupervisorProfileName + atfm_deadlines: Dict[str, int] = field(default_factory=dict) + aman_slots: List[SlotAssignment] = field(default_factory=list) + dman_slots: List[SlotAssignment] = field(default_factory=list) + aman_messages: List[NegotiationMessage] = field(default_factory=list) + dman_messages: List[NegotiationMessage] = field(default_factory=list) + conflict_log: List[str] = field(default_factory=list) + round_number: int = 0 + negotiation_rounds: int = 0 + episode_id: int = 0 + # Set to DOMAIN_MAX_NEGOTIATE_ROUNDS for ICU/ADAPT episodes so that the + # LLM sees an accurate steps_remaining rather than going to zero after pass 1. + max_negotiate_rounds: int = MAX_NEGOTIATE_ROUNDS + + +class MultiAgentATCEnvironment: + """AMAN/DMAN cooperative-competitive environment. + + Usage (training loop): + env = MultiAgentATCEnvironment() + aman_obs, dman_obs = env.reset(task_id="bengaluru_irrops_hard", episode_id=42) + + # Round 0 — BID + aman_action = aman_agent(aman_obs) + dman_action = dman_agent(dman_obs) + aman_obs, dman_obs, partial_reward, done = env.step_bid(aman_action, dman_action) + + # Round 1 — NEGOTIATE (if conflicts) + if not done: + aman_action = aman_agent(aman_obs) + dman_action = dman_agent(dman_obs) + aman_obs, dman_obs, partial_reward, done = env.step_negotiate(aman_action, dman_action) + + # Round 2 — FINAL + result = env.finalize() + """ + + def __init__(self, seed: int = 42) -> None: + self._catalog: Dict[str, TaskDefinition] = task_catalog() + self._supervisor = SupervisorAgent() + self._rng = random.Random(seed) + self._state: Optional[EpisodeState] = None + + # ── Public API ──────────────────────────────────────────────────────────── + + def reset( + self, + task_id: Optional[str] = None, + episode_id: int = 0, + supervisor_profile: Optional[SupervisorProfileName] = None, + mutated_task: Optional[TaskDefinition] = None, + randomize: bool = False, + domain_mode: bool = False, + ) -> Tuple[MultiAgentObservation, MultiAgentObservation]: + """Reset environment. Returns (aman_obs, dman_obs). + + Args: + randomize: When True (training with no generator), applies bounded + parametric perturbations to flight windows and runway weather so + agents cannot memorise exact task parameters across episodes. + Off by default to keep evaluation and tests deterministic. + domain_mode: Set True for ADAPT/ICU domain-transfer episodes. + Increases max_negotiate_rounds so agents see a correct + steps_remaining value during the extra repair passes. + """ + if mutated_task is not None: + task = mutated_task + elif task_id and task_id in self._catalog: + task = self._catalog[task_id] + else: + task = self._rng.choice(list(self._catalog.values())) + + if randomize: + task = self._randomize_task(task, episode_id) + + profile = supervisor_profile or self._supervisor.sample_profile(episode_id) + atfm = self._build_atfm_deadlines(task) + max_neg = DOMAIN_MAX_NEGOTIATE_ROUNDS if domain_mode else MAX_NEGOTIATE_ROUNDS + + self._state = EpisodeState( + task=task, + supervisor_profile=profile, + atfm_deadlines=atfm, + episode_id=episode_id, + max_negotiate_rounds=max_neg, + ) + return self._build_observations(RoundType.BID, conflict_log=[], incoming_aman=[], incoming_dman=[]) + + def step_bid( + self, + aman_action: AMANAction, + dman_action: DMANAction, + ) -> Tuple[MultiAgentObservation, MultiAgentObservation, float, bool]: + """Process Round 0: independent bids. Returns obs pair, dense reward, done.""" + assert self._state is not None, "call reset() first" + state = self._state + + state.aman_slots = list(aman_action.arrival_slots) + state.dman_slots = list(dman_action.departure_slots) + state.aman_messages = list(aman_action.outgoing_messages) + state.dman_messages = list(dman_action.outgoing_messages) + state.round_number = 1 + + conflicts, diagnostics = self._detect_conflicts(state) + state.conflict_log = diagnostics + + # If emergency broadcast present, inject environment conflict flags + self._inject_emergency_flags(state, aman_action, dman_action) + + partial_score = self._score_merged(state) + done = len(conflicts) == 0 # no conflicts → skip negotiate, go straight to final + if done: + state.round_number = 2 + + aman_obs, dman_obs = self._build_observations( + RoundType.NEGOTIATE if not done else RoundType.FINAL, + conflict_log=state.conflict_log, + incoming_aman=state.dman_messages, + incoming_dman=state.aman_messages, + ) + return aman_obs, dman_obs, round(partial_score * 0.3, 4), done + + def step_negotiate( + self, + aman_action: AMANAction, + dman_action: DMANAction, + ) -> Tuple[MultiAgentObservation, MultiAgentObservation, float, bool]: + """Process Round 1: negotiation revision. Returns obs pair, dense reward, done.""" + assert self._state is not None + state = self._state + + state.aman_slots = list(aman_action.arrival_slots) + state.dman_slots = list(dman_action.departure_slots) + state.aman_messages = list(aman_action.outgoing_messages) + state.dman_messages = list(dman_action.outgoing_messages) + state.round_number = 2 + state.negotiation_rounds += 1 + + conflicts, diagnostics = self._detect_conflicts(state) + state.conflict_log = diagnostics + + partial_score = self._score_merged(state) + + aman_obs, dman_obs = self._build_observations( + RoundType.FINAL, + conflict_log=state.conflict_log, + incoming_aman=state.dman_messages, + incoming_dman=state.aman_messages, + ) + return aman_obs, dman_obs, round(partial_score * 0.3, 4), True + + def finalize(self) -> MultiAgentEpisodeResult: + """Merge plans, run full grader, compute per-agent rewards.""" + assert self._state is not None + state = self._state + + merged = state.aman_slots + state.dman_slots + outcome = simulate_plan(state.task, merged) + grades = grade_task(state.task, outcome, merged, rationale="multi-agent final") + composite = next( + (g for g in grades if g.grader_name == "composite_task_grader"), grades[-1] + ) + + per_role = self._compute_per_role_metrics(state, outcome.metrics) + + aman_reward = self._aman_reward(per_role, outcome.metrics, state) + dman_reward = self._dman_reward(per_role, outcome.metrics, state) + supervisor_score = self._supervisor.score_plan( + outcome, state.task, state.supervisor_profile + ) + # Generator reward: adversarial (1 - controller avg), penalised if unsolvable + controller_avg = (aman_reward + dman_reward) / 2.0 + generator_reward = max(-1.0, 1.0 - controller_avg) + + return MultiAgentEpisodeResult( + task_id=state.task.task_id, + supervisor_profile=state.supervisor_profile, + composite_score=round(composite.score, 4), + aman_reward=round(aman_reward, 4), + dman_reward=round(dman_reward, 4), + generator_reward=round(generator_reward, 4), + supervisor_score=round(supervisor_score, 4), + per_role=per_role, + negotiation_rounds=state.negotiation_rounds, + ) + + # ── Observation builder ─────────────────────────────────────────────────── + + def _build_observations( + self, + round_type: RoundType, + conflict_log: List[str], + incoming_aman: List[NegotiationMessage], + incoming_dman: List[NegotiationMessage], + ) -> Tuple[MultiAgentObservation, MultiAgentObservation]: + assert self._state is not None + state = self._state + profile_name = state.supervisor_profile + sup_desc = SUPERVISOR_PROFILES[profile_name]["description"] + + arrivals = [f for f in state.task.flights if f.operation == OperationType.ARRIVAL] + departures = [f for f in state.task.flights if f.operation == OperationType.DEPARTURE] + + shared = dict( + task_id=state.task.task_id, + airport=state.task.airport, + briefing=state.task.description, + all_runways=state.task.runways, + supervisor_profile_name=profile_name, + supervisor_description=sup_desc, + conflict_log=conflict_log, + round_type=round_type, + round_number=state.round_number, + # Use per-episode cap (DOMAIN_MAX_NEGOTIATE_ROUNDS for ICU) so the LLM + # always sees a non-zero steps_remaining while repair passes remain. + steps_remaining=max(0, state.max_negotiate_rounds - state.negotiation_rounds), + ) + + # Partial observability: ATFM deadlines are DMAN-only information. + # AMAN has no visibility into network slot constraints for departures. + aman_obs = MultiAgentObservation( + role=AgentRole.AMAN, + my_flights=arrivals, + incoming_messages=incoming_aman, + atfm_deadlines={}, + **shared, + ) + dman_obs = MultiAgentObservation( + role=AgentRole.DMAN, + my_flights=departures, + incoming_messages=incoming_dman, + atfm_deadlines=state.atfm_deadlines, + **shared, + ) + return aman_obs, dman_obs + + # ── Conflict detection ──────────────────────────────────────────────────── + + def _detect_conflicts( + self, state: EpisodeState + ) -> Tuple[List[str], List[str]]: + """Detect cross-agent runway conflicts by running simulate_plan on merge.""" + merged = state.aman_slots + state.dman_slots + outcome = simulate_plan(state.task, merged) + conflicts = [d for d in outcome.diagnostics if diagnostic_is_separation_issue(d)] + return conflicts, outcome.diagnostics + + def _score_merged(self, state: EpisodeState) -> float: + merged = state.aman_slots + state.dman_slots + outcome = simulate_plan(state.task, merged) + return outcome.normalized_score + + # ── Emergency handling ──────────────────────────────────────────────────── + + def _inject_emergency_flags( + self, + state: EpisodeState, + aman_action: AMANAction, + dman_action: DMANAction, + ) -> None: + """Inject environment-level emergency conflict flags into message queues.""" + flights_by_id = {f.flight_id: f for f in state.task.flights} + + # DMAN fuel/medical emergency departures → flag to AMAN + for fid in dman_action.emergency_broadcasts: + flight = flights_by_id.get(fid) + if not flight: + continue + slot = next((s for s in state.dman_slots if s.flight_id == fid), None) + if not slot: + continue + state.aman_messages.append(NegotiationMessage( + from_role=AgentRole.DMAN, + message_type=MessageType.EMERGENCY_BCAST, + flight_id=fid, + requested_minute=slot.assigned_minute, + runway_id=slot.runway, + priority=flight.priority, + reason=f"Fuel/medical emergency departure — needs runway by T+{slot.assigned_minute}", + is_emergency=True, + )) + + # AMAN emergency arrivals → flag to DMAN + emergency_arrivals = [ + f for f in state.task.flights + if f.operation == OperationType.ARRIVAL + and f.priority in (PriorityClass.EMERGENCY, PriorityClass.MEDICAL) + ] + for flight in emergency_arrivals: + slot = next((s for s in state.aman_slots if s.flight_id == flight.flight_id), None) + if not slot: + continue + state.dman_messages.append(NegotiationMessage( + from_role=AgentRole.AMAN, + message_type=MessageType.EMERGENCY_BCAST, + flight_id=flight.flight_id, + requested_minute=slot.assigned_minute, + runway_id=slot.runway, + priority=flight.priority, + reason=f"Emergency arrival — runway {slot.runway} must be clear at T+{slot.assigned_minute}", + is_emergency=True, + )) + + # ── Per-role reward computation ─────────────────────────────────────────── + + def _compute_per_role_metrics( + self, state: EpisodeState, metrics: TaskMetrics + ) -> PerRoleMetrics: + flights_by_id = {f.flight_id: f for f in state.task.flights} + aman_map = {s.flight_id: s for s in state.aman_slots} + dman_map = {s.flight_id: s for s in state.dman_slots} + + arr_delay_total = 0 + dep_delay_total = 0 + arr_count = dep_count = 0 + arr_missing = dep_missing = 0 + emg_arr_ok = emg_arr_miss = 0 + emg_dep_ok = emg_dep_miss = 0 + atfm_viol = atfm_ok = 0 + + for f in state.task.flights: + is_emergency = f.priority in (PriorityClass.EMERGENCY, PriorityClass.MEDICAL) + if f.operation == OperationType.ARRIVAL: + arr_count += 1 + slot = aman_map.get(f.flight_id) + if slot: + delay = abs(slot.assigned_minute - f.scheduled_minute) + arr_delay_total += delay + if is_emergency: + if delay <= 5: + emg_arr_ok += 1 + else: + emg_arr_miss += 1 + else: + arr_missing += 1 + if is_emergency: + emg_arr_miss += 1 + else: + dep_count += 1 + slot = dman_map.get(f.flight_id) + if slot: + delay = abs(slot.assigned_minute - f.scheduled_minute) + dep_delay_total += delay + if is_emergency: + if delay <= 5: + emg_dep_ok += 1 + else: + emg_dep_miss += 1 + # ATFM check + deadline = state.atfm_deadlines.get(f.flight_id) + if deadline is not None: + if slot.assigned_minute <= deadline: + atfm_ok += 1 + else: + atfm_viol += 1 + else: + dep_missing += 1 + if is_emergency: + emg_dep_miss += 1 + + # Cross-lane vs intra-lane conflict heuristic: + # cross = conflicts involving one AMAN slot and one DMAN slot on same runway + cross_conflicts = self._count_cross_lane_conflicts(state) + intra_conflicts = max(0, metrics.conflict_count - cross_conflicts) + + arr_mean = (arr_delay_total / max(1, arr_count)) + dep_mean = (dep_delay_total / max(1, dep_count)) + + coord_score = self._coordination_score(state, metrics, cross_conflicts) + + return PerRoleMetrics( + arrival_count=arr_count, + arrival_delay_total=arr_delay_total, + arrival_delay_mean=round(arr_mean, 2), + arrivals_missing=arr_missing, + emergency_arrivals_ok=emg_arr_ok, + emergency_arrivals_missed=emg_arr_miss, + departure_count=dep_count, + departure_delay_total=dep_delay_total, + departure_delay_mean=round(dep_mean, 2), + departures_missing=dep_missing, + atfm_violations=atfm_viol, + atfm_compliant=atfm_ok, + emergency_departures_ok=emg_dep_ok, + emergency_departures_missed=emg_dep_miss, + cross_lane_conflicts=cross_conflicts, + intra_lane_conflicts=intra_conflicts, + negotiation_rounds_used=state.negotiation_rounds, + coordination_score=coord_score, + ) + + def _count_cross_lane_conflicts(self, state: EpisodeState) -> int: + """Heuristic: conflicts on runways used by BOTH agents.""" + from collections import defaultdict + aman_runways = {s.runway for s in state.aman_slots} + dman_runways = {s.runway for s in state.dman_slots} + shared_runways = aman_runways & dman_runways + if not shared_runways: + return 0 + # Re-run sim on shared-runway slots only + shared_slots = [ + s for s in (state.aman_slots + state.dman_slots) + if s.runway in shared_runways + ] + outcome = simulate_plan(state.task, shared_slots) + return outcome.metrics.conflict_count + + def _coordination_score( + self, + state: EpisodeState, + metrics: TaskMetrics, + cross_conflicts: int, + ) -> float: + """Theory-of-mind quality score for agent coordination. + + Rewards: + - Correct emergency yield without being asked (+0.3) + - Pre-emptive gap left for known DMAN emergency (+0.25) + - Resolved in fewest negotiation rounds (+0.2 if 0 rounds, +0.1 if 1) + - Zero cross-lane conflicts (+0.25) + - Proposed alternatives that were adopted in the final plan (+0.15) + """ + score = 0.0 + + # Zero cross-lane conflicts + if cross_conflicts == 0: + score += 0.25 + + # Negotiation efficiency (extra pass penalised lightly vs unresolved conflicts) + if state.negotiation_rounds == 0: + score += 0.20 + elif state.negotiation_rounds == 1: + score += 0.10 + elif state.negotiation_rounds == 2: + score += 0.05 + + # Emergency handling quality + emergency_flights = [ + f for f in state.task.flights + if f.priority in (PriorityClass.EMERGENCY, PriorityClass.MEDICAL) + ] + if emergency_flights: + assigned_ids = {s.flight_id for s in state.aman_slots + state.dman_slots} + ratio = sum(1 for f in emergency_flights if f.flight_id in assigned_ids) / len(emergency_flights) + score += 0.30 * ratio + + # Pre-emptive coordination: DMAN broadcast emergency AND AMAN left gap + dman_broadcasts = {m.flight_id for m in state.dman_messages if m.is_emergency} + if dman_broadcasts: + aman_runway_minutes = {(s.runway, s.assigned_minute) for s in state.aman_slots} + for fid in dman_broadcasts: + dep_slot = next((s for s in state.dman_slots if s.flight_id == fid), None) + if dep_slot: + clear = all( + abs(m - dep_slot.assigned_minute) >= 3 + for (rwy, m) in aman_runway_minutes + if rwy == dep_slot.runway + ) + if clear: + score += 0.25 + break + + # Reward proposed alternatives that were actually adopted in the final plan. + # This incentivises agents to offer concrete fallbacks, not just claim slots. + final_slots = {(s.flight_id, s.runway) for s in state.aman_slots + state.dman_slots} + all_messages = state.aman_messages + state.dman_messages + for msg in all_messages: + for alt in msg.proposed_alternatives: + if (alt.flight_id, alt.runway_id) in final_slots: + score += 0.15 + break # one bonus per message at most + + return round(min(1.0, score), 4) + + # ── Per-agent reward functions ──────────────────────────────────────────── + + def _aman_reward( + self, per_role: PerRoleMetrics, metrics: TaskMetrics, state: EpisodeState + ) -> float: + """Potential-based AMAN reward (Ng et al. 1999). + + Components: + 1. Arrival delay efficiency (normalized against task budget) + 2. Emergency arrival handling + 3. Coordination bonus (theory-of-mind) + 4. Cross-lane conflict penalty (penalises AMAN for shared-runway chaos) + 5. Supervisor alignment + """ + arr_count = max(1, per_role.arrival_count) + budget = state.task.delay_budget / 2 # AMAN's share of delay budget + + # 1. Delay efficiency + delay_ratio = per_role.arrival_delay_total / max(1, budget) + delay_score = max(0.0, 1.0 - delay_ratio) + + # 2. Emergency arrival bonus + total_emg = per_role.emergency_arrivals_ok + per_role.emergency_arrivals_missed + emg_score = (per_role.emergency_arrivals_ok / max(1, total_emg)) if total_emg else 1.0 + + # 3. Coverage (did AMAN assign all arrivals?) + coverage = 1.0 - (per_role.arrivals_missing / arr_count) + + # 4. Coordination bonus + coord = per_role.coordination_score + + # 5. Cross-lane conflict penalty + cross_penalty = 0.15 * per_role.cross_lane_conflicts + + # 6. Supervisor preference alignment (partial) + profile = SUPERVISOR_PROFILES[state.supervisor_profile] + w_conflict = profile.get("conflict_weight", 1.0) / 3.0 + w_priority = profile.get("priority_weight", 1.0) / 3.5 + + supervisor_adj = ( + w_priority * emg_score * 0.1 + - w_conflict * cross_penalty * 0.1 + ) + + raw = ( + 0.35 * delay_score + + 0.25 * emg_score + + 0.20 * coverage + + 0.15 * coord + + 0.05 * max(0.0, 1.0 - cross_penalty) + + supervisor_adj + ) + return round(max(0.0, min(1.0, raw)), 4) + + def _dman_reward( + self, per_role: PerRoleMetrics, metrics: TaskMetrics, state: EpisodeState + ) -> float: + """Potential-based DMAN reward. + + Components: + 1. Departure delay efficiency + 2. ATFM compliance (hard network slot adherence) + 3. Emergency departure handling + 4. Coordination bonus + 5. Cross-lane conflict penalty + 6. Supervisor alignment + """ + dep_count = max(1, per_role.departure_count) + budget = state.task.delay_budget / 2 + + # 1. Delay efficiency + delay_ratio = per_role.departure_delay_total / max(1, budget) + delay_score = max(0.0, 1.0 - delay_ratio) + + # 2. ATFM compliance + total_atfm = per_role.atfm_compliant + per_role.atfm_violations + atfm_score = (per_role.atfm_compliant / max(1, total_atfm)) if total_atfm else 1.0 + + # 3. Emergency departure bonus + total_emg = per_role.emergency_departures_ok + per_role.emergency_departures_missed + emg_score = (per_role.emergency_departures_ok / max(1, total_emg)) if total_emg else 1.0 + + # 4. Coverage + coverage = 1.0 - (per_role.departures_missing / dep_count) + + # 5. Coordination + coord = per_role.coordination_score + + # 6. Cross-lane conflict penalty + cross_penalty = 0.15 * per_role.cross_lane_conflicts + + profile = SUPERVISOR_PROFILES[state.supervisor_profile] + w_conflict = profile.get("conflict_weight", 1.0) / 3.0 + w_fuel = profile.get("fuel_weight", 1.0) / 2.5 + + # Fuel penalty via ATFM: missing ATFM slots causes upstream fuel burn + fuel_adj = w_fuel * atfm_score * 0.1 + + raw = ( + 0.30 * delay_score + + 0.20 * atfm_score + + 0.20 * emg_score + + 0.15 * coverage + + 0.10 * coord + + 0.05 * max(0.0, 1.0 - cross_penalty) + + fuel_adj + ) + return round(max(0.0, min(1.0, raw)), 4) + + # ── Domain randomisation ────────────────────────────────────────────────── + + def _randomize_task(self, task: TaskDefinition, episode_id: int) -> TaskDefinition: + """Apply bounded parametric perturbations to prevent task memorisation. + + Uses a deterministic seed derived from (task_id, episode_id) so results + are reproducible for a given episode while varying across episodes. + All perturbations are small enough that solvability is preserved. + """ + seed = hash(f"{task.task_id}:{episode_id}") & 0x7FFFFFFF + rng = random.Random(seed) + + # Perturb flight windows — shift each bound by ±_RAND_WINDOW_DELTA minutes + updated_flights = [] + for f in task.flights: + delta_e = rng.randint(-_RAND_WINDOW_DELTA, _RAND_WINDOW_DELTA) + delta_l = rng.randint(-_RAND_WINDOW_DELTA, _RAND_WINDOW_DELTA) + new_earliest = max(0, f.earliest_minute + delta_e) + new_latest = max(new_earliest + _RAND_MIN_WINDOW, f.latest_minute + delta_l) + updated_flights.append( + f.model_copy(update={"earliest_minute": new_earliest, "latest_minute": new_latest}) + ) + + # Perturb runway weather penalties + updated_runways = [] + for rwy in task.runways: + delta_w = rng.uniform(-_RAND_WEATHER_DELTA, _RAND_WEATHER_DELTA) + new_penalty = round(min(1.8, max(1.0, rwy.weather_penalty + delta_w)), 3) + updated_runways.append(rwy.model_copy(update={"weather_penalty": new_penalty})) + + # Perturb budgets + budget_scale = 1.0 + rng.uniform(-_RAND_BUDGET_SCALE, _RAND_BUDGET_SCALE) + new_delay_budget = max(30, int(task.delay_budget * budget_scale)) + new_fuel_budget = max(50.0, round(task.fuel_budget * budget_scale, 1)) + + return task.model_copy(update={ + "flights": updated_flights, + "runways": updated_runways, + "delay_budget": new_delay_budget, + "fuel_budget": new_fuel_budget, + }) + + # ── ATFM deadline generator ─────────────────────────────────────────────── + + def _build_atfm_deadlines(self, task: TaskDefinition) -> Dict[str, int]: + """Build hard departure deadlines combining explicit note-based constraints + (e.g. ICU transfer-auth windows) and randomly-sampled ATFM network slots. + + Priority order: + 1. Flights whose notes contain "TRANSFER AUTH DEADLINE: minute N" use N + (capped to latest_minute) — these are real hard constraints. + 2. Urgent flights with no explicit minute but tight windows ("MUST VACATE", + "URGENT") use latest_minute directly as the deadline. + 3. Remaining departures: ~1/3 get a random ATFM slot at scheduled + 12 min. + """ + deadlines: Dict[str, int] = {} + departures = [f for f in task.flights if f.operation == OperationType.DEPARTURE] + if not departures: + return deadlines + + for flight in departures: + note = flight.notes or "" + note_up = note.upper() + + # 1. Explicit transfer-auth deadline in notes + m = _TRANSFER_DEADLINE_RE.search(note) + if m: + parsed_dl = int(m.group(1)) + deadlines[flight.flight_id] = min(parsed_dl, flight.latest_minute) + continue + + # 2. Implicit deadline: "must vacate" / "urgent" with a tight window + # (latest - earliest ≤ 20 min). Use latest_minute so DMAN sorts + # these flights ahead of unconstrained ones. + window = flight.latest_minute - flight.earliest_minute + if window <= 20 and any(w in note_up for w in ("MUST VACATE", "URGENT")): + deadlines[flight.flight_id] = flight.latest_minute + + # 3. Random ATFM slots for flights that don't have explicit deadlines + unconstrained = [f for f in departures if f.flight_id not in deadlines] + if unconstrained: + k = max(1, len(unconstrained) // 3) + constrained = self._rng.sample(unconstrained, k=min(k, len(unconstrained))) + for flight in constrained: + deadline = flight.scheduled_minute + 12 + if deadline <= flight.latest_minute: + deadlines[flight.flight_id] = deadline + + return deadlines diff --git a/multi_agent/generator.py b/multi_agent/generator.py new file mode 100644 index 0000000000000000000000000000000000000000..61f62bbd6cb36941c5e7a7fe080668ef62fc7b62 --- /dev/null +++ b/multi_agent/generator.py @@ -0,0 +1,711 @@ +"""Adversarial self-play scenario generator with ZPD-aware curriculum. + +Design principles (grounded in literature): + + Automatic Curriculum Learning + ALP-GMM / PLR (Portelas 2020, Jiang 2021): track *learning progress* per + difficulty tier, not raw score. Progress = |Δreward| per tier. Sample + tiers proportional to recent absolute improvement. + + VCRL (2025): within a GRPO group the reward variance is a free, parameter-free + ZPD proxy. High variance ↔ the policy is in the learning frontier (sometimes + succeeds, sometimes fails). We track per-tier group variance and prefer tiers + where variance is highest. + + Competence-based curriculum (Platanios 2019): the dataset builder uses a + √-schedule to ramp max-allowed tier from 0 → MAX_TIER. The ChallengeGenerator + provides the *online* adaptive layer on top of that static ramp. + + ProCuRL / ZPD enforcement (2022, 2025): keep tasks where the policy's pass@G + is in [0.10, 0.75]. We approximate this via rescue mode: when the global EMA + drops below RESCUE_THRESHOLD the generator forces tier-0 tasks until it recovers. + + PAIRED regret (Dennis 2020): generator reward = -(controller_score - baseline). + Generator is rewarded for staying at the frontier of agent capability, not for + making tasks arbitrarily hard or unsolvable. + + Hysteresis (Bengio 2009 competence function): require HYSTERESIS_UP consecutive + episodes above ESCALATION_THRESHOLD before escalating, but only HYSTERESIS_DOWN + to deescalate. This prevents noisy single-episode spikes from driving the + curriculum off a cliff. + +Self-improving failure mode addressed here: + The original code set EMA_ALPHA=0.2 (slow to fall) and FLOOR_THRESHOLD=0.30 + (too permissive). A cold model scoring 0.12 has EMA decay: + 0.2 * 0.12 + 0.8 * 0.50 = 0.424 — never reaches 0.30 even after 5 bad episodes. + Fix: EMA_ALPHA=0.08 (tracks ~12-episode window) + FLOOR_THRESHOLD=0.42 + + hard rescue at 0.22. +""" + +from __future__ import annotations + +import random +import statistics +from collections import deque +from typing import Deque, Dict, List, Optional, Tuple + +try: + from ..engine import simulate_plan + from ..models import ( + FlightRecord, + OperationType, + PriorityClass, + SlotAssignment, + TaskDefinition, + WakeClass, + ) + from .models import GeneratorAction, GeneratorMutation, MutationType +except ImportError: + from engine import simulate_plan + from models import ( + FlightRecord, + OperationType, + PriorityClass, + SlotAssignment, + TaskDefinition, + WakeClass, + ) + from multi_agent.models import GeneratorAction, GeneratorMutation, MutationType + + +# ── Curriculum hyperparameters ──────────────────────────────────────────────── +# These constants are the main levers. Comments explain the reasoning so future +# tuners understand what each parameter does. + +ESCALATION_THRESHOLD = 0.65 # EMA must exceed this to escalate tier. + # 0.65 + HYSTERESIS_UP=5 is strictly more conservative + # than old 0.65+no-hysteresis: single-episode noise + # cannot trigger escalation. 0.68 was too close to + # the EMA convergence point (~0.678) for 0.72 scores. + +FLOOR_THRESHOLD = 0.42 # EMA below this → start deescalation countdown. + # Was 0.30 — far too forgiving. At 0.30 a model + # scoring 0.12 every episode takes 30+ episodes + # to trigger ease-back (EMA decays slowly). + # 0.42 triggers after ~4 consecutive low episodes. + +RESCUE_THRESHOLD = 0.22 # Hard floor: EMA below this → immediate rescue mode. + # Research basis: GRPO absorbing state (DeepSeek-R1 + # analysis) — if policy never succeeds, GRPO gradient + # is zero. Rescue injects easy tasks to break the loop. + +EMA_ALPHA = 0.08 # Was 0.2. τ = 1/alpha ≈ 12 episodes. + # 0.2 reacts too fast to single-episode noise; + # 0.08 tracks a 12-episode rolling average, reducing + # the chance of curriculum thrash from one outlier. + +RESCUE_BUDGET = 6 # How many tier-0 episodes to inject when EMA collapses. + # Based on ProCuRL warmup recommendations: ~1 full + # GRPO batch (N_GENERATIONS=8 × BATCH=4 = 32 samples, + # ≈ 6 episodes) before re-evaluating capability. + +HYSTERESIS_UP = 5 # Consecutive episodes above ESCALATION_THRESHOLD + # required before advancing the tier. + # Prevents single-episode lucky runs from escalating. + +HYSTERESIS_DOWN = 2 # Consecutive episodes below FLOOR_THRESHOLD before + # deescalating. Asymmetric: deescalate quickly + # (protect learning signal), escalate conservatively. + +MAX_TIER = 4 # Tier 0=warmup … Tier 4=expert. Mirrors TASK_TIER + # in tasks.py. + +MAX_MUTATIONS_PER_EPISODE = 3 # Cap mutations to prevent compounding unsolvability. +MIN_WINDOW_WIDTH = 8 # Never squeeze a flight window below 8 minutes. + +# Per-mutation mastery (unchanged from original) +MASTERY_WINDOW = 10 +MASTERY_THRESHOLD = 0.55 # Score below this on a mutation type → "weak" + +# LLM priority string aliases +_PRIORITY_ALIASES: Dict[str, str] = { + "high": "emergency", "urgent": "emergency", "critical": "emergency", + "med": "medical", "low": "normal", "standard": "normal", + "routine": "normal", "conn": "connection", +} + + +class ChallengeGenerator: + """ZPD-aware adversarial curriculum generator for multi-agent ATC training. + + Maintains: + - Global EMA of recent controller scores (slow α=0.08) + - Per-tier score windows for learning-progress estimation (ALP-GMM style) + - Per-tier within-group reward variance windows (VCRL ZPD proxy) + - Rescue mode that forces tier-0 episodes when EMA collapses + - Hysteresis counters to prevent curriculum thrash + + Public API: + update(score, group_rewards) — call after each episode (real or simulated) + recommended_tier() — tier (0-4) for next base task selection + mutate(task) — apply curriculum-appropriate mutations + compute_reward(score, solvable) — PAIRED regret signal for generator training + """ + + def __init__(self, seed: int = 0) -> None: + self._rng = random.Random(seed) + + # ── Global EMA and episode history ──────────────────────────────────── + self._ema_score: float = 0.50 # start at mid-difficulty assumption + self._score_history: Deque[float] = deque(maxlen=20) + + # ── Tier state ──────────────────────────────────────────────────────── + self._tier: int = 0 # current recommended base-task tier (0-4) + self._difficulty_level: int = 1 # mutation intensity (1-6); derived from tier + + # Per-tier score windows for ALP-style learning progress estimation + self._tier_scores: Dict[int, Deque[float]] = { + i: deque(maxlen=20) for i in range(MAX_TIER + 1) + } + # Per-tier GRPO-group reward variance (VCRL ZPD proxy) + self._tier_variance: Dict[int, Deque[float]] = { + i: deque(maxlen=10) for i in range(MAX_TIER + 1) + } + + # ── Hysteresis counters ─────────────────────────────────────────────── + self._consecutive_above: int = 0 # episodes above ESCALATION_THRESHOLD + self._consecutive_below: int = 0 # episodes below FLOOR_THRESHOLD + + # ── Rescue mode ─────────────────────────────────────────────────────── + self._rescue_mode: bool = False + self._rescue_remaining: int = 0 + + # ── Mutation mastery (per-task, per-mutation) ───────────────────────── + self._task_mastery: Dict[str, Deque[float]] = {} + self._mutation_mastery: Dict[str, Deque[float]] = {} + self._mutation_history: List[Dict] = [] + + # ── PAIRED baseline ─────────────────────────────────────────────────── + self._last_heuristic_score: float = 0.5 + self._last_mutated_task: Optional[TaskDefinition] = None + + # ── Public API ──────────────────────────────────────────────────────────── + + def update( + self, + controller_score: float, + group_rewards: Optional[List[float]] = None, + ) -> None: + """Update curriculum state after one episode. + + Args: + controller_score: composite score from the episode (0-1). + group_rewards: optional list of individual GRPO group rewards. + When provided, the within-group variance is used + as a VCRL ZPD signal for the current tier. + """ + self._score_history.append(controller_score) + self._ema_score = ( + EMA_ALPHA * controller_score + (1.0 - EMA_ALPHA) * self._ema_score + ) + self._tier_scores[self._tier].append(controller_score) + + # VCRL: track within-group reward variance as a ZPD proxy + if group_rewards and len(group_rewards) >= 2: + try: + var = statistics.variance(group_rewards) + except statistics.StatisticsError: + var = 0.0 + self._tier_variance[self._tier].append(var) + + # ── Rescue mode check (hard floor) ──────────────────────────────────── + if self._ema_score < RESCUE_THRESHOLD and not self._rescue_mode: + self._rescue_mode = True + self._rescue_remaining = RESCUE_BUDGET + # Reset hysteresis so rescue can end cleanly + self._consecutive_above = 0 + self._consecutive_below = 0 + + if self._rescue_mode: + self._rescue_remaining -= 1 + if self._rescue_remaining <= 0: + self._rescue_mode = False + # Drop tier to a safe level so the exit doesn't immediately + # re-trigger rescue. + self._tier = max(0, min(1, self._tier)) + self._difficulty_level = max(1, self._tier) + # Skip normal tier updates during rescue + return + + # ── Hysteresis: escalation ──────────────────────────────────────────── + if self._ema_score > ESCALATION_THRESHOLD: + self._consecutive_above += 1 + self._consecutive_below = 0 + elif self._ema_score < FLOOR_THRESHOLD: + self._consecutive_below += 1 + self._consecutive_above = 0 + else: + # In the ZPD zone — decay both counters slowly (model is learning) + self._consecutive_above = max(0, self._consecutive_above - 1) + self._consecutive_below = max(0, self._consecutive_below - 1) + + # ── Tier transitions ────────────────────────────────────────────────── + if self._consecutive_above >= HYSTERESIS_UP and self._tier < MAX_TIER: + self._tier += 1 + self._consecutive_above = 0 + elif self._consecutive_below >= HYSTERESIS_DOWN and self._tier > 0: + self._tier -= 1 + self._consecutive_below = 0 + + # ── Mutation difficulty level (1-6) derived from tier ───────────────── + # Tier 0 → level 0 (no mutations) + # Tier 1 → level 1-2 + # Tier 2 → level 2-3 + # Tier 3 → level 3-4 + # Tier 4 → level 5-6 + # Extra boost when EMA is above floor (performing well within tier) + tier_to_level = {0: 0, 1: 1, 2: 3, 3: 4, 4: 6} + base_level = tier_to_level.get(self._tier, 1) + # Add 1 when clearly performing well but not yet escalating + boost = 1 if (self._ema_score > FLOOR_THRESHOLD + 0.15 and base_level > 0) else 0 + self._difficulty_level = min(6, max(0, base_level + boost)) + + def record( + self, + task_id: str, + mutations_used: Optional[List[str]], + composite_score: float, + ) -> None: + """Record per-task and per-mutation mastery after an episode. + + Called by the training loop alongside update(). + """ + if task_id not in self._task_mastery: + self._task_mastery[task_id] = deque(maxlen=MASTERY_WINDOW) + self._task_mastery[task_id].append(composite_score) + + for mtype in (mutations_used or []): + if mtype not in self._mutation_mastery: + self._mutation_mastery[mtype] = deque(maxlen=MASTERY_WINDOW) + self._mutation_mastery[mtype].append(composite_score) + + def get_weak_mutations(self, threshold: float = MASTERY_THRESHOLD) -> List[str]: + """Return mutation types where agents still score below threshold.""" + return [ + mtype + for mtype, scores in self._mutation_mastery.items() + if len(scores) >= 3 and (sum(scores) / len(scores)) < threshold + ] + + def recommended_tier(self) -> int: + """Tier (0-4) recommended for selecting the next base task. + + Returns 0 during rescue mode (force easy). Otherwise returns the + current tier, clamped to [0, MAX_TIER]. + """ + if self._rescue_mode: + return 0 + return max(0, min(MAX_TIER, self._tier)) + + def is_in_rescue_mode(self) -> bool: + """True when EMA collapsed below RESCUE_THRESHOLD and easy tasks are forced.""" + return self._rescue_mode + + def mastery_report(self) -> Dict: + """Per-task / per-mutation success rates for logging.""" + task_means = { + tid: round(sum(v) / len(v), 3) + for tid, v in self._task_mastery.items() if v + } + mut_means = { + mtype: round(sum(v) / len(v), 3) + for mtype, v in self._mutation_mastery.items() if v + } + # VCRL ZPD signal: mean variance per tier (high = in learning frontier) + tier_var_means = { + tier: round(sum(v) / len(v), 4) if v else 0.0 + for tier, v in self._tier_variance.items() + } + return { + "task_mastery": task_means, + "mutation_mastery": mut_means, + "weak_mutations": self.get_weak_mutations(), + "tier": self._tier, + "difficulty_level": self._difficulty_level, + "ema_score": self.ema_score, + "rescue_mode": self._rescue_mode, + "rescue_remaining": self._rescue_remaining, + "tier_variance_zpd": tier_var_means, + } + + def curriculum_summary(self) -> str: + """One-line human-readable curriculum state for training logs (ASCII-safe).""" + mode = "RESCUE" if self._rescue_mode else f"T{self._tier}/L{self._difficulty_level}" + above = f"up={self._consecutive_above}/{HYSTERESIS_UP}" + below = f"dn={self._consecutive_below}/{HYSTERESIS_DOWN}" + return ( + f"[Curriculum] EMA={self._ema_score:.3f} {mode} " + f"hyst:{above},{below}" + ) + + # ── Mutation API ────────────────────────────────────────────────────────── + + def mutate( + self, + base_task: TaskDefinition, + generator_action: Optional[GeneratorAction] = None, + ) -> Tuple[TaskDefinition, bool]: + """Apply difficulty-appropriate mutations to base_task. + + If generator_action is provided (LLM-driven), apply those mutations. + Otherwise use rule-based mutations matching current difficulty_level. + + At tier/level 0 no mutations are applied — base task is returned as-is. + This ensures warmup tasks are always solvable in their canonical form. + + Returns (mutated_task, is_solvable). + """ + task = self._deep_copy_task(base_task) + + if generator_action and generator_action.mutations: + mutations = generator_action.mutations[:MAX_MUTATIONS_PER_EPISODE] + else: + mutations = self._sample_mutations(task) + + for mut in mutations: + task = self._apply_mutation(task, mut) + self._mutation_history.append({ + "type": mut.mutation_type.value, + "level": self._difficulty_level, + "tier": self._tier, + "ema": round(self._ema_score, 3), + }) + + solvable = self._check_solvability(task) + + self._last_mutated_task = task + self._last_heuristic_score = ( + self._score_scheduled_baseline(task) if solvable else 0.0 + ) + return task, solvable + + def compute_reward(self, controller_score: float, is_solvable: bool) -> float: + """PAIRED regret-based generator reward with solvability guard. + + Unsolvable → -1.0 penalty (generator must create HARD but not IMPOSSIBLE). + Otherwise: reward = -(controller_score - baseline_score) + • Positive when agents fall behind baseline (generator winning) + • Negative when agents beat baseline (task too easy for generator) + """ + if not is_solvable: + return -1.0 + + if self._last_mutated_task is not None: + regret = controller_score - self._last_heuristic_score + return round(max(-1.0, min(1.0, -regret)), 4) + + # Fallback if called without prior mutate() call (e.g. unit tests) + return round(max(-1.0, min(1.0, 1.0 - controller_score)), 4) + + @property + def difficulty_level(self) -> int: + return self._difficulty_level + + @property + def ema_score(self) -> float: + return round(self._ema_score, 3) + + @property + def current_tier(self) -> int: + return self._tier + + # ── Mutation sampling ───────────────────────────────────────────────────── + + def _sample_mutations(self, task: TaskDefinition) -> List[GeneratorMutation]: + """Rule-based mutation selection based on current difficulty_level. + + Level 0 → no mutations (warmup tier) + Level 1 → TIGHTEN_WINDOW (mild squeeze) + Level 2 → + ADD_ATFM_DEADLINE + Level 3 → + INCREASE_WEATHER_PENALTY + Level 4 → + INJECT_EMERGENCY + Level 5 → + ADD_CONFLICTING_FLIGHT + Level 6 → + CLOSE_RUNWAY_WINDOW + + Weak mutations (agents consistently score below MASTERY_THRESHOLD on them) + are boosted 3× in the sampling pool — curriculum focuses on gaps. + """ + level = self._difficulty_level + + # Tier/level 0: no mutations at all — base task is the challenge + if level <= 0: + return [] + + n_mutations = min(MAX_MUTATIONS_PER_EPISODE, max(1, level // 2)) + + pool: List[MutationType] = [] + if level >= 1: + pool += [MutationType.TIGHTEN_WINDOW] * 3 + if level >= 2: + pool += [MutationType.ADD_ATFM_DEADLINE] * 2 + if level >= 3: + pool += [MutationType.INCREASE_WEATHER_PENALTY] * 2 + if level >= 4: + pool += [MutationType.INJECT_EMERGENCY] * 2 + if level >= 5: + pool += [MutationType.ADD_CONFLICTING_FLIGHT] * 2 + if level >= 6: + pool += [MutationType.CLOSE_RUNWAY_WINDOW] * 1 + + # Boost under-mastered mutation types (3× weight) + weak = set(self.get_weak_mutations()) + pool += [mt for mt in pool if mt.value in weak] + + selected = self._rng.choices(pool, k=n_mutations) + + departures = [f for f in task.flights if f.operation == OperationType.DEPARTURE] + arrivals = [f for f in task.flights if f.operation == OperationType.ARRIVAL] + mutations: List[GeneratorMutation] = [] + + for mtype in selected: + if mtype == MutationType.TIGHTEN_WINDOW: + target = self._rng.choice(task.flights) + # Squeeze scales with level but stays gentle at low tiers + max_squeeze = max(2, 2 + level) + squeeze = self._rng.randint(2, max_squeeze) + mutations.append(GeneratorMutation( + mutation_type=mtype, + target_flight_id=target.flight_id, + params={"squeeze_minutes": squeeze}, + rationale=f"Tighten {target.flight_id} window by {squeeze} min each side", + )) + + elif mtype == MutationType.ADD_ATFM_DEADLINE and departures: + target = self._rng.choice(departures) + buffer = self._rng.randint(5, 10) + mutations.append(GeneratorMutation( + mutation_type=mtype, + target_flight_id=target.flight_id, + params={"deadline_offset": buffer}, + rationale=f"ATFM slot: {target.flight_id} must depart by scheduled+{buffer}", + )) + + elif mtype == MutationType.INCREASE_WEATHER_PENALTY: + target_rwy = self._rng.choice(task.runways) + delta = round(self._rng.uniform(0.1, 0.25), 2) + mutations.append(GeneratorMutation( + mutation_type=mtype, + target_runway_id=target_rwy.runway_id, + params={"penalty_delta": delta}, + rationale=f"Weather degrades {target_rwy.runway_id} capacity by {delta}×", + )) + + elif mtype == MutationType.INJECT_EMERGENCY and arrivals: + base = self._rng.choice(arrivals) + window_center = self._rng.randint( + base.earliest_minute, + min(base.latest_minute, base.earliest_minute + 20), + ) + mutations.append(GeneratorMutation( + mutation_type=mtype, + params={ + "flight_id": f"EMG{self._rng.randint(100, 999)}", + "priority": "emergency", + "minute": window_center, + "runway": self._rng.choice(task.runways).runway_id, + }, + rationale="Inject emergency diversion at peak arrival window", + )) + + elif mtype == MutationType.ADD_CONFLICTING_FLIGHT: + if arrivals: + anchor = self._rng.choice(arrivals) + mutations.append(GeneratorMutation( + mutation_type=mtype, + params={ + "flight_id": f"WKT{self._rng.randint(100, 999)}", + "wake_class": "H", + "operation": "arrival", + "minute": max(0, anchor.earliest_minute - 4), + "runway": self._rng.choice(anchor.allowed_runways), + }, + rationale="Heavy arrival 4 min before window — forces 6-min wake gap", + )) + + elif mtype == MutationType.CLOSE_RUNWAY_WINDOW: + target_rwy = self._rng.choice(task.runways) + duration = self._rng.randint(10, 20) + mutations.append(GeneratorMutation( + mutation_type=mtype, + target_runway_id=target_rwy.runway_id, + params={"close_duration": duration}, + rationale=f"Runway {target_rwy.runway_id} closed for {duration} min", + )) + + return mutations + + # ── Mutation application ────────────────────────────────────────────────── + + def _apply_mutation( + self, task: TaskDefinition, mut: GeneratorMutation + ) -> TaskDefinition: + dispatch = { + MutationType.TIGHTEN_WINDOW: self._tighten_window, + MutationType.INCREASE_WEATHER_PENALTY: self._increase_weather, + MutationType.INJECT_EMERGENCY: self._inject_emergency, + MutationType.ADD_CONFLICTING_FLIGHT: self._add_conflicting_flight, + MutationType.CLOSE_RUNWAY_WINDOW: self._close_runway_window, + # ADD_ATFM_DEADLINE is handled at environment level via the atfm_deadlines + # dict, not by modifying TaskDefinition flights. + MutationType.ADD_ATFM_DEADLINE: lambda t, m: t, + } + fn = dispatch.get(mut.mutation_type) + return fn(task, mut) if fn else task + + def _tighten_window( + self, task: TaskDefinition, mut: GeneratorMutation + ) -> TaskDefinition: + squeeze = mut.params.get("squeeze_minutes", 3) + updated = [] + for f in task.flights: + if f.flight_id == mut.target_flight_id: + new_earliest = f.earliest_minute + squeeze + new_latest = f.latest_minute - squeeze + if new_latest - new_earliest >= MIN_WINDOW_WIDTH: + f = f.model_copy(update={ + "earliest_minute": new_earliest, + "latest_minute": new_latest, + }) + updated.append(f) + return task.model_copy(update={"flights": updated}) + + def _increase_weather( + self, task: TaskDefinition, mut: GeneratorMutation + ) -> TaskDefinition: + delta = mut.params.get("penalty_delta", 0.15) + updated = [] + for rwy in task.runways: + if rwy.runway_id == mut.target_runway_id: + rwy = rwy.model_copy(update={ + "weather_penalty": round(min(2.0, rwy.weather_penalty + delta), 2) + }) + updated.append(rwy) + return task.model_copy(update={"runways": updated}) + + def _inject_emergency( + self, task: TaskDefinition, mut: GeneratorMutation + ) -> TaskDefinition: + p = mut.params + fid = p.get("flight_id", "EMG001") + minute = int(p.get("minute", 20)) + priority_str = str(p.get("priority", "emergency")).lower().strip() + priority_str = _PRIORITY_ALIASES.get(priority_str, priority_str) + try: + priority = PriorityClass(priority_str) + except ValueError: + priority = PriorityClass.EMERGENCY + runway_id = p.get("runway", task.runways[0].runway_id) + + new_flight = FlightRecord( + flight_id=fid, + airline="GOV", + operation=OperationType.ARRIVAL, + wake_class=WakeClass.MEDIUM, + scheduled_minute=minute, + earliest_minute=max(0, minute - 2), + latest_minute=minute + 6, + allowed_runways=[runway_id], + passengers=8, + fuel_burn_per_minute=7.5, + priority=priority, + notes=f"Generator-injected {priority.value} diversion", + ) + return task.model_copy(update={"flights": list(task.flights) + [new_flight]}) + + def _add_conflicting_flight( + self, task: TaskDefinition, mut: GeneratorMutation + ) -> TaskDefinition: + p = mut.params + fid = p.get("flight_id", "WKT001") + minute = int(p.get("minute", 10)) + try: + wake = WakeClass(str(p.get("wake_class", "H")).upper()) + except ValueError: + wake = WakeClass.HEAVY + try: + operation = OperationType(str(p.get("operation", "arrival")).lower()) + except ValueError: + operation = OperationType.ARRIVAL + runway_id = p.get("runway", task.runways[0].runway_id) + + new_flight = FlightRecord( + flight_id=fid, + airline="FRT", + operation=operation, + wake_class=wake, + scheduled_minute=minute, + earliest_minute=max(0, minute - 1), + latest_minute=minute + 5, + allowed_runways=[runway_id], + passengers=1, + fuel_burn_per_minute=6.0, + priority=PriorityClass.NORMAL, + notes="Generator-injected wake-turbulence trap (Heavy)", + ) + return task.model_copy(update={"flights": list(task.flights) + [new_flight]}) + + def _close_runway_window( + self, task: TaskDefinition, mut: GeneratorMutation + ) -> TaskDefinition: + """Simulate runway closure via an extreme weather-penalty increase.""" + duration = mut.params.get("close_duration", 15) + delta = min(1.9, 0.05 * duration) + updated = [] + for rwy in task.runways: + if rwy.runway_id == mut.target_runway_id: + rwy = rwy.model_copy(update={ + "weather_penalty": min(2.0, rwy.weather_penalty + delta), + "notes": rwy.notes + f" [CLOSED {duration}min — generator]", + }) + updated.append(rwy) + return task.model_copy(update={"runways": updated}) + + # ── Solvability check ───────────────────────────────────────────────────── + + def _check_solvability(self, task: TaskDefinition) -> bool: + """Heuristic: verify at least one valid assignment exists per flight.""" + from collections import defaultdict + + for f in task.flights: + if f.latest_minute - f.earliest_minute < 2: + return False + if not f.allowed_runways: + return False + + runway_demand: Dict[str, int] = defaultdict(int) + for f in task.flights: + for rwy_id in f.allowed_runways: + runway_demand[rwy_id] += 1 + + for rwy in task.runways: + demand = runway_demand.get(rwy.runway_id, 0) + effective_cap = rwy.hourly_capacity / rwy.weather_penalty + max_ops = effective_cap * (task.planning_horizon_minutes / 60.0) + if demand > max_ops * 1.5: + return False + + return True + + def _score_scheduled_baseline(self, task: TaskDefinition) -> float: + """PAIRED baseline: assign every flight at scheduled_minute (clamped to window) + on its first allowed runway. This is the 'do-nothing' heuristic score. + """ + slots = [] + for f in task.flights: + if not f.allowed_runways: + continue + minute = max(f.earliest_minute, min(f.latest_minute, f.scheduled_minute)) + slots.append(SlotAssignment( + flight_id=f.flight_id, + runway=f.allowed_runways[0], + assigned_minute=minute, + hold_minutes=0, + )) + try: + outcome = simulate_plan(task, slots) + return outcome.normalized_score + except Exception: + return 0.5 + + def _deep_copy_task(self, task: TaskDefinition) -> TaskDefinition: + return TaskDefinition.model_validate(task.model_dump()) diff --git a/multi_agent/inference.py b/multi_agent/inference.py new file mode 100644 index 0000000000000000000000000000000000000000..e79cb6b895d00da00f9c2234fdc542b1c0858d61 --- /dev/null +++ b/multi_agent/inference.py @@ -0,0 +1,1243 @@ +"""Multi-agent ATC inference runner. + +Runs AMAN + DMAN agents against the ATC environment, either with: + - heuristic-baseline: deterministic planner (no LLM required) + - any HF/OpenAI-compatible model: LLM-driven AMAN and DMAN agents + +Output format mirrors inference.py structured logs: + [START] task=... env=... model=... + [STEP] step=... role=AMAN|DMAN reward=... conflicts=... done=... + (conflicts = wake/separation issue count, not raw diagnostic list length) + [NEG] round=... conflicts_resolved=... messages=... + [END] task=... success=... composite=... aman=... dman=... coord=... + +Usage: + python multi_agent/inference.py # heuristic demo + python multi_agent/inference.py --model Qwen/Qwen2.5-7B # LLM agents + python multi_agent/inference.py --task bengaluru_irrops_hard --episodes 3 +""" + +from __future__ import annotations + +import argparse +import json +import os +import sys +import time +from pathlib import Path +from typing import Any, Dict, List, Optional, Tuple + +ROOT = Path(__file__).resolve().parent.parent +if str(ROOT) not in sys.path: + sys.path.insert(0, str(ROOT)) + +from engine import simulate_plan +from graders import grade_multi_agent +from models import ( + FlightRecord, + OperationType, + PriorityClass, + SlotAssignment, + TaskDefinition, +) +from planner import build_heuristic_plan, build_refined_plan, _flight_sort_key +from tasks import task_catalog, ordered_tasks +from multi_agent.environment import ( + DOMAIN_MAX_NEGOTIATE_ROUNDS, + MAX_NEGOTIATE_ROUNDS, + MultiAgentATCEnvironment, + count_separation_issues, +) +from multi_agent.generator import ChallengeGenerator +from multi_agent.models import ( + AMANAction, + AgentRole, + DMANAction, + NegotiationMessage, + MessageType, + MultiAgentObservation, + SupervisorProfileName, + SUPERVISOR_PROFILES, +) +from multi_agent.supervisor import SupervisorAgent +from multi_agent.visual_events import ( + VisualSink, + emit, + serialize_action_layout, + serialize_task_snapshot, + terminal_event, +) +from training.dataset import ( + AMAN_SYSTEM, + DMAN_SYSTEM, + parse_aman_action, + parse_dman_action, +) + + +# ── Config ──────────────────────────────────────────────────────────────────── + +API_BASE_URL = os.getenv("API_BASE_URL", "https://router.huggingface.co/v1").rstrip("/") +MODEL_NAME = os.getenv("MODEL_NAME", "heuristic-baseline") +HF_TOKEN = os.getenv("HF_TOKEN", "").strip() +BENCHMARK = "atc_multiagent_openenv" +MAX_TOKENS = 1024 +TEMPERATURE = 0.3 +SUCCESS_THRESHOLD = 0.60 + +# N appended to AMAN/DMAN system prompts during ADAPT → ATC runs (bid + 1st negotiate LLM pass). +# Focuses the model on clearing separation conflicts the heuristic pipeline often leaves on +# tight remapped windows (e.g. ICU/ADAPT), without naming the source domain. +_DOMAIN_TRANSFER_LLM_HINT = ( + "STRUCTURAL-TRANSFER SCHEDULE: windows may be tight after cross-domain remapping. " + "In NEGOTIATE, use the CONFLICT LOG: shift arrival/departure minutes on shared runways to " + "satisfy minimum separation, staggering arrivals vs departures when the log says spacing " + "or wake conflicts. Prefer the smallest time moves that clear diagnostics; do not miss " + "ATFM/departure network deadlines (DMAN)." +) + + +# ── Structured logging ──────────────────────────────────────────────────────── + +def _p(msg: str) -> None: + try: + print(msg, flush=True) + except (BrokenPipeError, OSError): + pass + + +def log_start(task: str, model: str) -> None: + _p(f"[START] task={task} env={BENCHMARK} model={model}") + + +def log_step(step: int, role: str, reward: float, conflicts: int, done: bool) -> None: + _p(f"[STEP] step={step} role={role} reward={reward:.3f} conflicts={conflicts} done={str(done).lower()}") + + +def log_neg(rnd: int, resolved: int, messages: int) -> None: + _p(f"[NEG] round={rnd} conflicts_resolved={resolved} messages={messages}") + + +def log_end( + task: str, success: bool, composite: float, + aman: float, dman: float, coord: float, gen_diff: int, +) -> None: + _p( + f"[END] task={task} success={str(success).lower()} " + f"composite={composite:.3f} aman={aman:.3f} dman={dman:.3f} " + f"coord={coord:.3f} gen_difficulty={gen_diff}" + ) + + +# ── Cross-role spacing (ICU / high-capacity resources) ───────────────────────── +# +# simulate_plan() enforces max(capacity_floor, wake) between *any* consecutive ops on a +# runway. ICU beds used hourly_capacity=4 → 15 min floor, while heuristics historically +# avoided peer claims by only ~3 min — guaranteed cross-lane conflicts and ruined scores. + + +def _resolve_peer_clearance( + t: int, + peer_minutes: List[int], + cap_gap: int, + my_wake: str, + latest_limit: int, + repair: int, + peer_wake_default: str = "M", +) -> Optional[int]: + """Push minute ``t`` forward until it clears peer slot minutes on the same runway. + + Uses runway capacity floor and wake separation (peer wake defaulted to Medium). + Returns None if no feasible minute ≤ ``latest_limit``. + """ + from constants import SEPARATION_BY_WAKE + + after_peer = max( + cap_gap, + SEPARATION_BY_WAKE.get((peer_wake_default, my_wake), 4), + ) + max(0, repair) + before_peer = max( + cap_gap, + SEPARATION_BY_WAKE.get((my_wake, peer_wake_default), 4), + ) + max(0, repair) + e = t + peers = sorted({int(x) for x in peer_minutes}) + for _ in range(600): + moved = False + for pm in peers: + if e >= pm and e < pm + after_peer: + e = pm + after_peer + moved = True + elif e < pm and (pm - e) < before_peer: + e = pm + after_peer + moved = True + if not moved: + break + if e > latest_limit: + return None + return e + + +def _dman_obs_with_aman_messages( + dman_obs: MultiAgentObservation, + aman_action: AMANAction, +) -> MultiAgentObservation: + """Update DMAN's inbox with AMAN's CURRENT slot claims, replacing any stale ones. + + Old deduplicate-by-(runway,minute,flight) logic accumulated superseded AMAN + messages: if AMAN moved flight X from BED_A@0 to BED_A@5, DMAN would see both + claims and over-block BED_A. Instead, drop any prior AMAN message whose + flight_id appears in the new outgoing set, then append the fresh claims. + """ + if not aman_action.outgoing_messages: + return dman_obs + refreshed_fids = {m.flight_id for m in aman_action.outgoing_messages} + kept = [ + m for m in dman_obs.incoming_messages + if not (m.from_role == AgentRole.AMAN and m.flight_id in refreshed_fids) + ] + return dman_obs.model_copy( + update={"incoming_messages": kept + list(aman_action.outgoing_messages)}, + ) + + +# ── Heuristic AMAN planner ──────────────────────────────────────────────────── + +def _build_aman_heuristic( + obs: MultiAgentObservation, + separation_repair: int = 0, +) -> AMANAction: + """Deterministic arrival sequencer — priority-sorted, wake-turbulence aware. + + ``separation_repair`` (0 = off): in later negotiate passes, add N minutes to + required wake/ spacing gaps and widen DMAN emergency buffers to clear residual + cross-runway conflicts (stronger for larger N; typical 1–3). + """ + repair = max(0, int(separation_repair)) + arrivals = sorted(obs.my_flights, key=_flight_sort_key) + runway_last: Dict[str, Tuple[int, str]] = { + r.runway_id: (0, "M") for r in obs.all_runways + } + from constants import SEPARATION_BY_WAKE + slots: List[SlotAssignment] = [] + emergency_yields: List[str] = [] + + for flight in arrivals: + best_rwy, best_min = None, None + best_gap = -1 + + for rwy_id in flight.allowed_runways: + rwy = next((r for r in obs.all_runways if r.runway_id == rwy_id), None) + if not rwy: + continue + if OperationType.ARRIVAL not in rwy.allowed_operations: + continue + + last_min, last_wake = runway_last.get(rwy_id, (0, "M")) + from engine import _capacity_spacing + cap_gap = _capacity_spacing(rwy) + wake_gap = SEPARATION_BY_WAKE.get( + (last_wake, flight.wake_class.value), 3 + ) + min_gap = max(cap_gap, wake_gap) + repair + earliest_cap = max(flight.earliest_minute, last_min + min_gap) + + if earliest_cap > flight.latest_minute: + continue + + # Prefer to schedule at the flight's scheduled_minute rather than the + # earliest capacity gap. Busy ATC runways naturally put earliest_cap + # near scheduled; idle ICU beds start at T+5 and would otherwise assign + # all flights minutes before their time, destroying delay_efficiency. + target = max(earliest_cap, flight.scheduled_minute) + if target > flight.latest_minute: + target = earliest_cap # scheduled falls outside window; use earliest + + dman_peer = [ + m.requested_minute + for m in obs.incoming_messages + if m.from_role == AgentRole.DMAN and m.runway_id == rwy_id + ] + + # Peer-clear from target; fall back to earliest_cap if target can't clear + before_peer = target + slot = _resolve_peer_clearance( + target, dman_peer, cap_gap, flight.wake_class.value, + flight.latest_minute, repair, + ) + if slot is None: + before_peer = earliest_cap + slot = _resolve_peer_clearance( + earliest_cap, dman_peer, cap_gap, flight.wake_class.value, + flight.latest_minute, repair, + ) + if slot is None: + continue + + if slot > before_peer and any( + m.is_emergency + for m in obs.incoming_messages + if m.from_role == AgentRole.DMAN and m.runway_id == rwy_id + ): + emergency_yields.append(flight.flight_id) + + gap_to_scheduled = abs(slot - flight.scheduled_minute) + if best_rwy is None or gap_to_scheduled < best_gap: + best_rwy = rwy_id + best_min = slot + best_gap = gap_to_scheduled + + if best_rwy and best_min is not None: + slots.append(SlotAssignment( + flight_id=flight.flight_id, + runway=best_rwy, + assigned_minute=best_min, + hold_minutes=max(0, best_min - flight.scheduled_minute), + )) + runway_last[best_rwy] = (best_min, flight.wake_class.value) + + # Build outgoing messages — claim slots and broadcast emergencies + messages: List[NegotiationMessage] = [] + for s in slots: + flight = next((f for f in arrivals if f.flight_id == s.flight_id), None) + if flight and flight.priority in (PriorityClass.EMERGENCY, PriorityClass.MEDICAL): + messages.append(NegotiationMessage( + from_role=AgentRole.AMAN, + message_type=MessageType.EMERGENCY_BCAST, + flight_id=s.flight_id, + requested_minute=s.assigned_minute, + runway_id=s.runway, + priority=flight.priority, + reason=f"Emergency arrival — runway {s.runway} must be clear at T+{s.assigned_minute}", + is_emergency=True, + )) + else: + messages.append(NegotiationMessage( + from_role=AgentRole.AMAN, + message_type=MessageType.RUNWAY_CLAIM, + flight_id=s.flight_id if flight else "?", + requested_minute=s.assigned_minute, + runway_id=s.runway, + priority=flight.priority if flight else PriorityClass.NORMAL, + reason="Arrival slot claim", + is_emergency=False, + )) + + return AMANAction( + arrival_slots=slots, + rationale=f"Heuristic AMAN: {len(slots)}/{len(arrivals)} arrivals sequenced, " + f"priority-sorted, wake-turbulence aware" + f"{f', separation-repair (level {repair})' if repair else ''}.", + emergency_yields=emergency_yields, + outgoing_messages=messages, + commit=False, + ) + + +# ── Heuristic DMAN planner ──────────────────────────────────────────────────── + +def _build_dman_heuristic( + obs: MultiAgentObservation, + atfm_deadlines: Dict[str, int], + separation_repair: int = 0, +) -> DMANAction: + """Deterministic departure sequencer — ATFM-aware, emergency priority. + + ``separation_repair`` (0 = off): add N minutes to wake gaps and expand buffers + around AMAN-claimed times to break residual cross-lane spacing (larger N = more slack). + """ + repair = max(0, int(separation_repair)) + from constants import SEPARATION_BY_WAKE + from engine import _capacity_spacing + from planner import PRIORITY_RANK + + def _departure_sort_key(flight: FlightRecord) -> Tuple[int, int, int, int, float, int]: + deadline = atfm_deadlines.get(flight.flight_id) + # Keep emergency traffic first, then pull ATFM-constrained flights ahead of + # unconstrained traffic so hard network slot windows are not accidentally lost. + deadline_bucket = 0 if flight.priority in (PriorityClass.EMERGENCY, PriorityClass.MEDICAL) else ( + 1 if deadline is not None else 2 + ) + return ( + deadline_bucket, + deadline if deadline is not None else flight.scheduled_minute, + PRIORITY_RANK[flight.priority], + flight.scheduled_minute, + -flight.connection_risk, + -flight.passengers, + ) + + departures = sorted(obs.my_flights, key=_departure_sort_key) + runway_last: Dict[str, Tuple[int, str]] = { + r.runway_id: (0, "M") for r in obs.all_runways + } + + # Reserve slots claimed by AMAN + aman_claims: Dict[str, List[int]] = {} + for m in obs.incoming_messages: + if m.from_role == AgentRole.AMAN: + aman_claims.setdefault(m.runway_id, []).append(m.requested_minute) + + slots: List[SlotAssignment] = [] + atfm_compliance: Dict[str, int] = {} + emergency_broadcasts: List[str] = [] + messages: List[NegotiationMessage] = [] + + for flight in departures: + # Only pure EMERGENCY flights override AMAN's claims entirely. + # MEDICAL departures (e.g. ICU POST_OP after ADAPT) must still attempt + # peer-clearance: they have hard transfer-auth deadlines and compete for + # the same beds as AMAN admissions. Skipping clearance for MEDICAL was + # the root cause of permanent BID-phase conflicts that negotiation could + # never resolve (DMAN re-claimed the same bed minute every pass). + is_emg = flight.priority in (PriorityClass.EMERGENCY, PriorityClass.MEDICAL) + is_hard_emergency = flight.priority == PriorityClass.EMERGENCY + deadline = atfm_deadlines.get(flight.flight_id) + best_rwy, best_min = None, None + best_score = float("inf") + + for rwy_id in flight.allowed_runways: + rwy = next((r for r in obs.all_runways if r.runway_id == rwy_id), None) + if not rwy: + continue + if OperationType.DEPARTURE not in rwy.allowed_operations: + continue + + last_min, last_wake = runway_last.get(rwy_id, (0, "M")) + cap_gap = _capacity_spacing(rwy) + wake_gap = SEPARATION_BY_WAKE.get((last_wake, flight.wake_class.value), 3) + min_gap = max(cap_gap, wake_gap) + repair + earliest_cap = max(flight.earliest_minute, last_min + min_gap) + + if earliest_cap > flight.latest_minute: + continue + + # Target scheduled time; avoids pulling departures to T+5 on idle resources. + # For ATFM-constrained flights, never target past the hard deadline. + target = max(earliest_cap, flight.scheduled_minute) + if target > flight.latest_minute: + target = earliest_cap + if deadline is not None and target > deadline: + target = earliest_cap # must hit deadline; use earliest feasible + + # Peer-clearance: EMERGENCY overrides AMAN; MEDICAL tries to clear then + # keeps best target if impossible; normal/connection skips runway. + if not is_hard_emergency: + aman_mins = aman_claims.get(rwy_id, []) + # Try peer-clear from target first + cleared = _resolve_peer_clearance( + target, aman_mins, cap_gap, flight.wake_class.value, + flight.latest_minute, repair, + ) + if cleared is not None: + target = cleared + elif not is_emg: + # Fall back to earliest_cap and retry + cleared = _resolve_peer_clearance( + earliest_cap, aman_mins, cap_gap, flight.wake_class.value, + flight.latest_minute, repair, + ) + if cleared is None: + continue + target = cleared + # MEDICAL with unresolvable conflict keeps target (negotiation resolves) + + if target > flight.latest_minute: + continue + + # ATFM deadline must still hold after peer clearance + if deadline is not None and target > deadline: + continue + + score = abs(target - flight.scheduled_minute) + if score < best_score: + best_rwy = rwy_id + best_min = target + best_score = score + + if best_rwy and best_min is not None: + slots.append(SlotAssignment( + flight_id=flight.flight_id, + runway=best_rwy, + assigned_minute=best_min, + hold_minutes=max(0, best_min - flight.scheduled_minute), + )) + runway_last[best_rwy] = (best_min, flight.wake_class.value) + + if deadline is not None: + atfm_compliance[flight.flight_id] = deadline + + msg_type = MessageType.EMERGENCY_BCAST if is_emg else MessageType.RUNWAY_CLAIM + if is_emg: + emergency_broadcasts.append(flight.flight_id) + messages.append(NegotiationMessage( + from_role=AgentRole.DMAN, + message_type=msg_type, + flight_id=flight.flight_id, + requested_minute=best_min, + runway_id=best_rwy, + priority=flight.priority, + reason=( + f"Emergency departure — yield runway {best_rwy} at T+{best_min}" + if is_emg else "Departure slot claim" + ), + is_emergency=is_emg, + )) + + return DMANAction( + departure_slots=slots, + rationale=f"Heuristic DMAN: {len(slots)}/{len(departures)} departures sequenced, " + f"ATFM-compliant, emergency-priority" + f"{f', separation-repair (level {repair})' if repair else ''}.", + atfm_compliance=atfm_compliance, + emergency_broadcasts=emergency_broadcasts, + outgoing_messages=messages, + commit=False, + ) + + +# ── LLM agent ───────────────────────────────────────────────────────────────── + +def _llm_action( + client, + model_name: str, + system: str, + obs: MultiAgentObservation, + sup_desc: str, + role: AgentRole, + temperature: Optional[float] = None, + system_extra: str = "", +) -> Optional[AMANAction | DMANAction]: + if client is None: + return None + temp = TEMPERATURE if temperature is None else temperature + system_content = system + f"\n\nSUPERVISOR TODAY: {sup_desc}" + if (system_extra or "").strip(): + system_content = system_content + "\n\n" + system_extra.strip() + try: + resp = client.chat.completions.create( + model=model_name, + messages=[ + {"role": "system", "content": system_content}, + {"role": "user", "content": obs.to_prompt_text()}, + ], + temperature=temp, + max_tokens=MAX_TOKENS, + ) + text = (resp.choices[0].message.content or "").strip() + if role == AgentRole.AMAN: + return parse_aman_action(text) + return parse_dman_action(text) + except Exception as exc: + _p(f"[WARN] LLM call failed ({role.value}): {exc} — falling back to heuristic") + return None + + +def _negotiate_multi_pass( + client, + selected_model: str, + sup_desc: str, + env: MultiAgentATCEnvironment, + aman_obs_start: MultiAgentObservation, + dman_obs_start: MultiAgentObservation, + atfm: Dict[str, int], + rounds: List[Dict[str, Any]], + visual_sink: VisualSink = None, + max_passes: Optional[int] = None, + llm_system_extra: str = "", +) -> Tuple[MultiAgentObservation, MultiAgentObservation]: + """Revision passes on separation conflicts until resolved or cap reached. + + Pass 1 uses the LLM when ``client`` is set (lower temperature for stability); + later passes use tiered separation-repair heuristics (0 = off; higher passes + add more inter-slot slack). Native ATC uses 2 / 1 passes (with/without client); + ADAPT domain transfer uses DOMAIN_MAX_NEGOTIATE_ROUNDS for more repair attempts. + """ + aman_cur, dman_cur = aman_obs_start, dman_obs_start + if max_passes is not None: + max_p = int(max_passes) + elif client is not None: + max_p = MAX_NEGOTIATE_ROUNDS + else: + max_p = 1 + + for neg_r in range(1, max_p + 1): + sep_before = count_separation_issues(env._state.conflict_log) + if sep_before == 0: + break + + use_llm = client is not None and neg_r == 1 + if use_llm: + aman_action = ( + _llm_action( + client, + selected_model, + AMAN_SYSTEM, + aman_cur, + sup_desc, + AgentRole.AMAN, + temperature=0.2, + system_extra=llm_system_extra, + ) + or _build_aman_heuristic(aman_cur) + ) + dman_merged = _dman_obs_with_aman_messages(dman_cur, aman_action) + dman_action = ( + _llm_action( + client, + selected_model, + DMAN_SYSTEM, + dman_merged, + sup_desc, + AgentRole.DMAN, + temperature=0.2, + system_extra=llm_system_extra, + ) + or _build_dman_heuristic(dman_merged, atfm) + ) + else: + repair = 0 if neg_r == 1 else min(neg_r - 1, 3) + aman_action = _build_aman_heuristic(aman_cur, separation_repair=repair) + dman_merged = _dman_obs_with_aman_messages(dman_cur, aman_action) + dman_action = _build_dman_heuristic(dman_merged, atfm, separation_repair=repair) + + aman_cur, dman_cur, partial_r, _ = env.step_negotiate(aman_action, dman_action) + sep_after = count_separation_issues(env._state.conflict_log) + resolved = max(0, sep_before - sep_after) + total_msgs = len(aman_action.outgoing_messages) + len(dman_action.outgoing_messages) + log_neg(neg_r, resolved, total_msgs) + log_step(1 + neg_r, "NEGOTIATE", partial_r, sep_after, True) + + emit( + visual_sink, + { + "type": "negotiation_tick", + "pass": neg_r, + "partial_reward": partial_r, + "separation_issues_after": sep_after, + "used_llm": use_llm, + "layout": serialize_action_layout(aman_action, dman_action), + }, + ) + + rounds.append({ + "round": "NEGOTIATE", + "negotiate_pass": neg_r, + "partial_reward": partial_r, + "separation_issues_before": sep_before, + "separation_issues_after": sep_after, + "diagnostics_count": len(env._state.conflict_log), + "conflicts_resolved": resolved, + "total_messages": total_msgs, + "aman_alternatives_offered": sum( + len(m.proposed_alternatives) for m in aman_action.outgoing_messages + ), + "dman_alternatives_offered": sum( + len(m.proposed_alternatives) for m in dman_action.outgoing_messages + ), + "used_llm": use_llm, + }) + + if sep_after == 0: + break + + return aman_cur, dman_cur + + +# ── Episode runner ───────────────────────────────────────────────────────────── + +def _save_transcript( + transcript_dir: Path, + episode_id: int, + data: Dict[str, Any], +) -> None: + """Write one episode transcript to /episode_NNNNN.json.""" + transcript_dir.mkdir(parents=True, exist_ok=True) + path = transcript_dir / f"episode_{episode_id:05d}.json" + try: + with open(path, "w", encoding="utf-8") as fh: + json.dump(data, fh, indent=2, default=str) + except OSError as exc: + _p(f"[WARN] Could not save transcript for episode {episode_id}: {exc}") + + +def run_episode( + task_id: str, + client, + env: MultiAgentATCEnvironment, + generator: Optional[ChallengeGenerator], + supervisor: SupervisorAgent, + episode_id: int, + use_generator: bool = True, + model_name: Optional[str] = None, + transcript_dir: Optional[Path] = None, + visual_sink: VisualSink = None, + visual_profile: str = "atc", +) -> Dict: + """Run one full AMAN/DMAN episode. Returns result dict for logging. + + Args: + transcript_dir: If set, writes a JSON transcript of the full episode + (actions, messages, rewards, metadata) to this directory. + visual_sink: Optional callback receiving visual event dicts (SSE / UI). + visual_profile: ``atc`` | ``icu`` — UI theme only (same simulation). + """ + catalog = task_catalog() + base_task = catalog.get(task_id, list(catalog.values())[0]) + profile = supervisor.sample_profile(episode_id) + sup_desc = SUPERVISOR_PROFILES[profile]["description"] + + mutations_applied: List[str] = [] + if use_generator and generator is not None: + mutated_task, solvable = generator.mutate(base_task) + gen_difficulty = generator.difficulty_level + mutations_applied = [ + m["type"] + for m in getattr(generator, "_mutation_history", [])[-3:] + ] + + else: + mutated_task, solvable = base_task, True + gen_difficulty = 1 + + # Enable domain randomisation when the generator is inactive — replaces the + # structural diversity that generator mutations would otherwise provide. + aman_obs, dman_obs = env.reset( + episode_id=episode_id, + supervisor_profile=profile, + mutated_task=mutated_task, + randomize=not use_generator, + ) + selected_model = model_name or MODEL_NAME + atfm = env._state.atfm_deadlines + + # Accumulate round data for the transcript + rounds: List[Dict[str, Any]] = [] + visual_log: List[Dict[str, Any]] = [] + + def _v(ev: Dict[str, Any]) -> None: + visual_log.append(dict(ev)) + emit(visual_sink, ev) + + assert env._state.task is not None + _v( + { + "type": "scene_reset", + "episode_id": episode_id, + "task_id": task_id, + "resolved_task_id": env._state.task.task_id, + "visual_profile": visual_profile, + "supervisor_profile": profile.value, + "mutations_applied": mutations_applied, + "task": serialize_task_snapshot(env._state.task), + }, + ) + + # ── Round 0: BID ────────────────────────────────────────────────────────── + _v({"type": "llm_started", "role": "AMAN", "model": selected_model}) + aman_action = ( + _llm_action(client, selected_model, AMAN_SYSTEM, aman_obs, sup_desc, AgentRole.AMAN) + or _build_aman_heuristic(aman_obs) + ) + _v({"type": "llm_finished", "role": "AMAN", "used_llm": client is not None}) + + dman_obs_bid = _dman_obs_with_aman_messages(dman_obs, aman_action) + _v({"type": "llm_started", "role": "DMAN", "model": selected_model}) + dman_action = ( + _llm_action(client, selected_model, DMAN_SYSTEM, dman_obs_bid, sup_desc, AgentRole.DMAN) + or _build_dman_heuristic(dman_obs_bid, atfm) + ) + _v({"type": "llm_finished", "role": "DMAN", "used_llm": client is not None}) + + _v({"type": "action_layout", "phase": "BID", "layout": serialize_action_layout(aman_action, dman_action)}) + + aman_obs2, dman_obs2, partial_r, done = env.step_bid(aman_action, dman_action) + n_sep_after_bid = count_separation_issues(env._state.conflict_log) + n_diag_after_bid = len(env._state.conflict_log) + log_step(1, "BID", partial_r, n_sep_after_bid, done) + + rounds.append({ + "round": "BID", + "partial_reward": partial_r, + "separation_issues_detected": n_sep_after_bid, + "diagnostics_count": n_diag_after_bid, + "aman_slots": len(aman_action.arrival_slots), + "dman_slots": len(dman_action.departure_slots), + "aman_messages": len(aman_action.outgoing_messages), + "dman_messages": len(dman_action.outgoing_messages), + "done": done, + }) + + # ── Negotiate: LLM first (if available), then heuristic-only repair passes ─ + if not done: + _negotiate_multi_pass( + client, + selected_model, + sup_desc, + env, + aman_obs2, + dman_obs2, + atfm, + rounds, + visual_sink=lambda ev: _v(ev), + ) + + # ── Finalize ────────────────────────────────────────────────────────────── + result = env.finalize() + if generator is not None: + generator.update(result.composite_score) + gen_difficulty = generator.difficulty_level + + episode_result = { + "composite": result.composite_score, + "aman_reward": result.aman_reward, + "dman_reward": result.dman_reward, + "coord_score": result.per_role.coordination_score, + "conflicts": result.per_role.cross_lane_conflicts, + "atfm_viol": result.per_role.atfm_violations, + "emg_arr_ok": result.per_role.emergency_arrivals_ok, + "emg_dep_ok": result.per_role.emergency_departures_ok, + "neg_rounds": result.negotiation_rounds, + "gen_difficulty": gen_difficulty, + "supervisor": profile.value, + "solvable": solvable, + } + + _v( + { + "type": "score_update", + "composite": result.composite_score, + "aman_reward": result.aman_reward, + "dman_reward": result.dman_reward, + }, + ) + _v( + terminal_event( + composite=result.composite_score, + aman_reward=result.aman_reward, + dman_reward=result.dman_reward, + coordination=result.per_role.coordination_score, + cross_lane_conflicts=result.per_role.cross_lane_conflicts, + atfm_violations=result.per_role.atfm_violations, + negotiation_rounds=result.negotiation_rounds, + ) + ) + + if transcript_dir is not None: + _save_transcript( + transcript_dir, + episode_id, + { + "episode_id": episode_id, + "task_id": task_id, + "supervisor_profile": profile.value, + "gen_difficulty": gen_difficulty, + "mutations_applied": mutations_applied, + "solvable": solvable, + "visual_log": visual_log, + "rounds": rounds, + "final": { + "composite_score": result.composite_score, + "aman_reward": result.aman_reward, + "dman_reward": result.dman_reward, + "generator_reward": result.generator_reward, + "supervisor_score": result.supervisor_score, + "coordination_score": result.per_role.coordination_score, + "cross_lane_conflicts": result.per_role.cross_lane_conflicts, + "negotiation_rounds": result.negotiation_rounds, + "atfm_violations": result.per_role.atfm_violations, + "emergency_arrivals_ok": result.per_role.emergency_arrivals_ok, + "emergency_departures_ok": result.per_role.emergency_departures_ok, + }, + }, + ) + + return episode_result + +def run_domain_episode( + domain_task_id: str, + client, + env: MultiAgentATCEnvironment, + supervisor: SupervisorAgent, + episode_id: int, + model_name: Optional[str] = None, + transcript_dir: Optional[Path] = None, + visual_sink: VisualSink = None, + visual_profile: str = "icu", +) -> Dict: + """Run one ADAPT domain-transfer episode. + + ADAPT maps the domain task → ATC-parameterised task. + AMAN and DMAN then solve it with no code changes. + + Args: + domain_task_id: Key from the domains registry, e.g. 'icu_mass_casualty'. + """ + from domains import get_all_domain_tasks + from multi_agent.adapt import ( + build_adapt_observation, + _build_adapt_heuristic, + apply_adapt_mapping, + parse_adapt_action, + ) + from training.dataset import ADAPT_SYSTEM + + all_domain_tasks = get_all_domain_tasks() + if domain_task_id not in all_domain_tasks: + available = ", ".join(sorted(all_domain_tasks.keys())) + raise ValueError( + f"Domain task {domain_task_id!r} not found. Available: {available}" + ) + + domain_task = all_domain_tasks[domain_task_id] + profile = supervisor.sample_profile(episode_id) + sup_desc = SUPERVISOR_PROFILES[profile]["description"] + rounds: List[Dict[str, Any]] = [] + visual_log: List[Dict[str, Any]] = [] + + def _v(ev: Dict[str, Any]) -> None: + visual_log.append(dict(ev)) + emit(visual_sink, ev) + + # ── ADAPT step ──────────────────────────────────────────────────────────── + adapt_obs = build_adapt_observation(task=domain_task, profile=profile) + + adapt_action: Optional[object] = None + adapt_rationale = "(heuristic)" + + _v( + { + "type": "adapt_scene", + "domain_task_id": domain_task_id, + "visual_profile": visual_profile, + "entity_types": list(adapt_obs.entity_types), + }, + ) + + if client is not None: + try: + resp = client.chat.completions.create( + model=model_name or MODEL_NAME, + messages=[ + {"role": "system", "content": ADAPT_SYSTEM}, + {"role": "user", "content": adapt_obs.to_prompt_text()}, + ], + temperature=TEMPERATURE, + max_tokens=MAX_TOKENS, + ) + text = (resp.choices[0].message.content or "").strip() + adapt_action = parse_adapt_action(text) + adapt_rationale = (adapt_action.rationale if adapt_action else "(LLM parse failed)") + except Exception as exc: + _p(f"[WARN] ADAPT LLM call failed: {exc} — falling back to structural heuristic") + + if adapt_action is None: + adapt_action = _build_adapt_heuristic(adapt_obs, domain_task) + adapt_rationale = adapt_action.rationale + + _v( + { + "type": "adapt_mapping", + "wake_map": dict(adapt_action.entity_wake_map), + "priority_map": dict(adapt_action.entity_priority_map), + "rationale_preview": (adapt_rationale or "")[:200], + }, + ) + + _p(f"[ADAPT] domain={domain_task_id} entities={adapt_obs.entity_types}") + _p(f"[ADAPT] wake_map={adapt_action.entity_wake_map}") + _p(f"[ADAPT] priority_map={adapt_action.entity_priority_map}") + _p(f"[ADAPT] rationale={adapt_rationale[:120].encode('ascii', errors='replace').decode()}") + + + # ── Apply ADAPT mapping and run AMAN/DMAN ──────────────────────────────── + mapped_task = apply_adapt_mapping(domain_task, adapt_action) + + aman_obs, dman_obs = env.reset( + episode_id=episode_id, + supervisor_profile=profile, + mutated_task=mapped_task, + domain_mode=True, # enables DOMAIN_MAX_NEGOTIATE_ROUNDS and correct steps_remaining + ) + atfm = env._state.atfm_deadlines + selected_model = model_name or MODEL_NAME + + assert env._state.task is not None + _v( + { + "type": "scene_reset", + "episode_id": episode_id, + "task_id": domain_task_id, + "resolved_task_id": env._state.task.task_id, + "visual_profile": visual_profile, + "supervisor_profile": profile.value, + "mutations_applied": [], + "task": serialize_task_snapshot(env._state.task), + }, + ) + + _v({"type": "llm_started", "role": "AMAN", "model": selected_model}) + aman_action = _build_aman_heuristic(aman_obs) + if client is not None: + aman_action = ( + _llm_action( + client, + selected_model, + AMAN_SYSTEM, + aman_obs, + sup_desc, + AgentRole.AMAN, + system_extra=_DOMAIN_TRANSFER_LLM_HINT, + ) + or aman_action + ) + _v({"type": "llm_finished", "role": "AMAN", "used_llm": client is not None}) + + dman_obs_bid = _dman_obs_with_aman_messages(dman_obs, aman_action) + _v({"type": "llm_started", "role": "DMAN", "model": selected_model}) + dman_action = _build_dman_heuristic(dman_obs_bid, atfm) + if client is not None: + dman_action = ( + _llm_action( + client, + selected_model, + DMAN_SYSTEM, + dman_obs_bid, + sup_desc, + AgentRole.DMAN, + system_extra=_DOMAIN_TRANSFER_LLM_HINT, + ) + or dman_action + ) + _v({"type": "llm_finished", "role": "DMAN", "used_llm": client is not None}) + + _v({"type": "action_layout", "phase": "BID", "layout": serialize_action_layout(aman_action, dman_action)}) + + aman_obs2, dman_obs2, partial_r, done = env.step_bid(aman_action, dman_action) + n_sep_after_bid = count_separation_issues(env._state.conflict_log) + n_diag_after_bid = len(env._state.conflict_log) + log_step(1, "BID", partial_r, n_sep_after_bid, done) + + rounds.append({ + "round": "BID", + "partial_reward": partial_r, + "separation_issues_detected": n_sep_after_bid, + "diagnostics_count": n_diag_after_bid, + "aman_slots": len(aman_action.arrival_slots), + "dman_slots": len(dman_action.departure_slots), + "aman_messages": len(aman_action.outgoing_messages), + "dman_messages": len(dman_action.outgoing_messages), + "done": done, + }) + + if not done: + _negotiate_multi_pass( + client, + selected_model, + sup_desc, + env, + aman_obs2, + dman_obs2, + atfm, + rounds, + visual_sink=lambda ev: _v(ev), + max_passes=DOMAIN_MAX_NEGOTIATE_ROUNDS, + llm_system_extra=_DOMAIN_TRANSFER_LLM_HINT if client is not None else "", + ) + + result = env.finalize() + + _v( + { + "type": "score_update", + "composite": result.composite_score, + "aman_reward": result.aman_reward, + "dman_reward": result.dman_reward, + }, + ) + _v( + terminal_event( + composite=result.composite_score, + aman_reward=result.aman_reward, + dman_reward=result.dman_reward, + coordination=result.per_role.coordination_score, + cross_lane_conflicts=result.per_role.cross_lane_conflicts, + atfm_violations=result.per_role.atfm_violations, + negotiation_rounds=result.negotiation_rounds, + ) + ) + + episode_result: Dict[str, Any] = { + "domain_task_id": domain_task_id, + "composite": result.composite_score, + "aman_reward": result.aman_reward, + "dman_reward": result.dman_reward, + "coord_score": result.per_role.coordination_score, + "conflicts": result.per_role.cross_lane_conflicts, + "neg_rounds": result.negotiation_rounds, + "supervisor": profile.value, + "adapt_wake_map": adapt_action.entity_wake_map, + "adapt_priority_map": adapt_action.entity_priority_map, + } + + if transcript_dir is not None: + _save_transcript( + transcript_dir, + episode_id, + { + "episode_id": episode_id, + "domain_task_id": domain_task_id, + "mode": "adapt_domain_transfer", + "supervisor_profile": profile.value, + "adapt_wake_map": adapt_action.entity_wake_map, + "adapt_priority_map": adapt_action.entity_priority_map, + "adapt_rationale": adapt_rationale, + "visual_log": visual_log, + "rounds": rounds, + "final": { + "composite_score": result.composite_score, + "aman_reward": result.aman_reward, + "dman_reward": result.dman_reward, + "coordination_score": result.per_role.coordination_score, + "cross_lane_conflicts": result.per_role.cross_lane_conflicts, + "negotiation_rounds": result.negotiation_rounds, + "atfm_violations": result.per_role.atfm_violations, + }, + }, + ) + + _p( + f"[END] domain={domain_task_id} success={str(result.composite_score >= SUCCESS_THRESHOLD).lower()} " + f"composite={result.composite_score:.3f} aman={result.aman_reward:.3f} dman={result.dman_reward:.3f}" + ) + return episode_result + + +# ── Main ────────────────────────────────────────────────────────────────────── + +def main() -> None: + parser = argparse.ArgumentParser(description="Multi-Agent ATC Inference Runner") + parser.add_argument("--task", default="bengaluru_irrops_hard", + help="Task ID (default: bengaluru_irrops_hard)") + parser.add_argument("--episodes", type=int, default=1, + help="Number of episodes to run") + parser.add_argument("--model", default=MODEL_NAME, + help="Model name or 'heuristic-baseline'") + parser.add_argument("--no_generator", action="store_true", + help="Disable self-play generator (use base tasks)") + parser.add_argument("--all_tasks", action="store_true", + help="Run all ATC tasks in sequence") + parser.add_argument("--domain", default=None, + help=( + "Run ADAPT domain-transfer mode on a domain task ID " + "(e.g. icu_mass_casualty, icu_flu_surge, icu_normal_day). " + "Use --domain list to show all available domain tasks." + )) + parser.add_argument("--seed", type=int, default=42) + parser.add_argument("--transcript_dir", default=None, + help="Directory to write per-episode JSON transcripts " + "(default: no transcripts saved)") + args = parser.parse_args() + + model = args.model or MODEL_NAME + use_llm = model != "heuristic-baseline" and HF_TOKEN + + client = None + if use_llm: + try: + from openai import OpenAI + client = OpenAI(base_url=API_BASE_URL, api_key=HF_TOKEN) + _p(f"[INFO] LLM client initialised: {model}") + except ImportError: + _p("[WARN] openai package missing — using heuristic baseline") + + env = MultiAgentATCEnvironment(seed=args.seed) + generator = ChallengeGenerator(seed=args.seed) + supervisor = SupervisorAgent() + + transcript_dir = Path(args.transcript_dir) if args.transcript_dir else None + + # ── ADAPT domain-transfer mode ──────────────────────────────────────────── + if args.domain is not None: + if args.domain == "list": + from domains import get_all_domain_tasks + all_dt = get_all_domain_tasks() + _p("Available domain tasks:") + for tid in sorted(all_dt.keys()): + t = all_dt[tid] + _p(f" {tid:<35} ({t.difficulty.value}, {len(t.flights)} entities, {len(t.runways)} resources)") + return + + _p(f"[INFO] ADAPT domain-transfer mode: {args.domain}") + all_results: List[Dict] = [] + for ep in range(args.episodes): + result = run_domain_episode( + domain_task_id=args.domain, + client=client, + env=env, + supervisor=supervisor, + episode_id=ep, + model_name=model, + transcript_dir=transcript_dir, + ) + all_results.append(result) + + if len(all_results) > 1: + _p("\n=== DOMAIN TRANSFER SUMMARY ===") + _p(f"Domain: {args.domain}") + _p(f"Episodes: {len(all_results)}") + _p(f"Mean composite: {sum(r['composite'] for r in all_results)/len(all_results):.3f}") + _p(f"Success rate: {sum(1 for r in all_results if r['composite'] >= SUCCESS_THRESHOLD)/len(all_results):.1%}") + return + + # ── Standard ATC mode ───────────────────────────────────────────────────── + task_ids = ( + [t.task_id for t in ordered_tasks()] + if args.all_tasks + else [args.task] + ) + + all_results: List[Dict] = [] + + for task_id in task_ids: + log_start(task_id, model) + for ep in range(args.episodes): + result = run_episode( + task_id=task_id, + client=client, + model_name=model, + env=env, + generator=generator, + supervisor=supervisor, + episode_id=ep, + use_generator=not args.no_generator, + transcript_dir=transcript_dir, + ) + success = result["composite"] >= SUCCESS_THRESHOLD + log_end( + task=task_id, + success=success, + composite=result["composite"], + aman=result["aman_reward"], + dman=result["dman_reward"], + coord=result["coord_score"], + gen_diff=result["gen_difficulty"], + ) + all_results.append({"task_id": task_id, "episode": ep, **result}) + + # Summary + if len(all_results) > 1: + _p("\n=== MULTI-EPISODE SUMMARY ===") + _p(f"Episodes: {len(all_results)}") + _p(f"Mean composite: {sum(r['composite'] for r in all_results)/len(all_results):.3f}") + _p(f"Mean AMAN reward: {sum(r['aman_reward'] for r in all_results)/len(all_results):.3f}") + _p(f"Mean DMAN reward: {sum(r['dman_reward'] for r in all_results)/len(all_results):.3f}") + _p(f"Mean coord score: {sum(r['coord_score'] for r in all_results)/len(all_results):.3f}") + _p(f"Total conflicts: {sum(r['conflicts'] for r in all_results)}") + _p(f"Success rate: {sum(1 for r in all_results if r['composite'] >= SUCCESS_THRESHOLD)/len(all_results):.1%}") + _p(f"Final gen level: {all_results[-1]['gen_difficulty']}/6") + + +if __name__ == "__main__": + main() + diff --git a/multi_agent/models.py b/multi_agent/models.py new file mode 100644 index 0000000000000000000000000000000000000000..54c449e2c9a308a312ab55d9d454c7359d7a11c8 --- /dev/null +++ b/multi_agent/models.py @@ -0,0 +1,509 @@ +"""Multi-agent data models for AMAN/DMAN coordination environment. + +Architecture: + AMAN — Arrival Manager: owns arrival sequencing, partial view (arrivals only) + DMAN — Departure Manager: owns departure sequencing, partial view (departures only) + GENERATOR — Adversarial self-play: mutates tasks to break coordination + SUPERVISOR — Snorkel AI expert: changing preferences each episode + +Negotiation protocol (3 rounds): + Round 0 BID: each agent submits independent plan for own flights + Round 1 NEGOTIATE: conflict list broadcast; agents revise + send messages + Round 2 FINAL: merged plan graded; per-agent rewards computed +""" + +from __future__ import annotations + +from enum import Enum +from typing import Any, Dict, List, Literal, Optional + +from pydantic import BaseModel, Field + +try: + from ..models import FlightRecord, PriorityClass, RunwaySpec, SlotAssignment, TaskMetrics +except ImportError: + from models import FlightRecord, PriorityClass, RunwaySpec, SlotAssignment, TaskMetrics + + +# ── Agent roles ────────────────────────────────────────────────────────────── + +class AgentRole(str, Enum): + AMAN = "AMAN" + DMAN = "DMAN" + GENERATOR = "GENERATOR" + SUPERVISOR = "SUPERVISOR" + ADAPT = "ADAPT" + + +# ── Negotiation messaging ───────────────────────────────────────────────────── + +class MessageType(str, Enum): + RUNWAY_CLAIM = "runway_claim" # "I need runway X at minute Y" + EMERGENCY_BCAST = "emergency_broadcast" # "I have EMERGENCY — yield now" + YIELD = "yield" # "I yield slot Y on runway X" + ACKNOWLEDGE = "acknowledge" # "Received, adjusting" + REQUEST_GAP = "request_gap" # "Leave gap at T+N on runway X" + CONFLICT_FLAG = "conflict_flag" # environment injects this + + +class SlotProposal(BaseModel): + """An alternative slot a negotiating agent is willing to accept.""" + + flight_id: str + runway_id: str + minute: int + delay_cost: float = Field( + default=0.0, + description="Self-reported cost of accepting this alternative (minutes of delay)", + ) + + +class NegotiationMessage(BaseModel): + from_role: AgentRole + message_type: MessageType + flight_id: str + requested_minute: int + runway_id: str + priority: PriorityClass + reason: str + is_emergency: bool = False + # Richer negotiation fields — enable more expressive coordination + content: str = Field( + default="", + description="Free-form natural language explanation beyond the reason field", + ) + proposed_alternatives: List[SlotProposal] = Field( + default_factory=list, + description="Alternative slots this agent is willing to accept instead", + ) + confidence: float = Field( + default=1.0, + ge=0.0, + le=1.0, + description="Agent's certainty that this request/yield is correct", + ) + theory_of_mind_claim: str = Field( + default="", + description="Agent's explicit prediction about the other agent's constraint or intent", + ) + + +# ── Agent actions ───────────────────────────────────────────────────────────── + +class AMANAction(BaseModel): + """Arrival Manager's slot proposal — arrivals only.""" + + arrival_slots: List[SlotAssignment] = Field(default_factory=list) + rationale: str = Field(default="") + emergency_yields: List[str] = Field(default_factory=list, + description="Flight IDs yielded for incoming emergencies") + outgoing_messages: List[NegotiationMessage] = Field(default_factory=list) + commit: bool = False + + +class DMANAction(BaseModel): + """Departure Manager's slot proposal — departures only.""" + + departure_slots: List[SlotAssignment] = Field(default_factory=list) + rationale: str = Field(default="") + atfm_compliance: Dict[str, int] = Field(default_factory=dict, + description="flight_id -> ATFM deadline minute respected") + emergency_broadcasts: List[str] = Field(default_factory=list, + description="Fuel/medical emergency departure IDs broadcast to AMAN") + outgoing_messages: List[NegotiationMessage] = Field(default_factory=list) + commit: bool = False + + +# ── Generator actions ───────────────────────────────────────────────────────── + +class MutationType(str, Enum): + TIGHTEN_WINDOW = "tighten_window" # narrow earliest/latest window + INJECT_EMERGENCY = "inject_emergency" # add EMERGENCY/MEDICAL flight + INCREASE_WEATHER_PENALTY = "increase_weather_penalty" # degrade runway capacity + ADD_ATFM_DEADLINE = "add_atfm_deadline" # hard network slot constraint + CLOSE_RUNWAY_WINDOW = "close_runway_window" # runway unavailable T1→T2 + ADD_CONFLICTING_FLIGHT = "add_conflicting_flight" # inject flight that forces wake conflict + + +class GeneratorMutation(BaseModel): + mutation_type: MutationType + target_flight_id: Optional[str] = None + target_runway_id: Optional[str] = None + params: Dict[str, Any] = Field(default_factory=dict) + rationale: str = "" + + +class GeneratorAction(BaseModel): + """Self-play generator produces a batch of mutations per episode.""" + + mutations: List[GeneratorMutation] = Field(default_factory=list, + description="Ordered list of mutations to apply to base task") + strategy: str = Field(default="", + description="High-level explanation of how this breaks coordination") + + +# ── ADAPT agent ─────────────────────────────────────────────────────────────── + +class ADAPTAction(BaseModel): + """ADAPT's domain-to-ATC parameter mapping output. + + Maps entity types (stored in FlightRecord.airline) to ATC wake classes and + priority levels so that AMAN/DMAN can operate on a non-ATC domain unchanged. + """ + + entity_wake_map: Dict[str, str] = Field( + ..., + description="Maps entity type string to WakeClass value: 'H', 'M', or 'L'", + ) + entity_priority_map: Dict[str, str] = Field( + ..., + description=( + "Maps entity type string to PriorityClass value: " + "'normal', 'connection', 'medical', or 'emergency'" + ), + ) + rationale: str = Field( + default="", + description="Explanation of mapping decisions — graded for quality", + ) + + +class ADAPTObservation(BaseModel): + """What ADAPT sees: structural signals from the new domain. + + ADAPT has NO prior domain knowledge. The entity_profiles field exposes + domain-agnostic statistics so the agent can reason from data, not labels. + """ + + role: AgentRole = AgentRole.ADAPT + domain_id: str + domain_name: str + domain_description: str + entity_types: List[str] # unique values from FlightRecord.airline + resource_names: List[str] # shared resource IDs (beds, berths, runways…) + sample_entities: str # first 5 entities rendered as readable text + entity_profiles: Dict[str, Any] = Field( + default_factory=dict, + description=( + "Domain-agnostic structural stats per entity type: " + "time_pressure, avg_connection_risk, avg_fuel_burn, " + "avg_passengers, urgency_in_notes, operation_mix." + ), + ) + supervisor_profile_name: SupervisorProfileName + supervisor_description: str + has_emergencies: bool + has_hard_deadlines: bool + entity_count: int + + def to_prompt_text(self) -> str: + lines = [ + "=== ADAPT OBSERVATION — Unknown Domain Scheduling Task ===", + f"Domain identifier: {self.domain_name}", + f"Task ID: {self.domain_id}", + "", + "DOMAIN DESCRIPTION (as provided by the task):", + self.domain_description, + "", + f"SHARED RESOURCES: {', '.join(self.resource_names)}", + f"Total entities to schedule: {self.entity_count}", + f"Hard-deadline entities present: {self.has_hard_deadlines}", + "", + "ENTITY TYPE STRUCTURAL PROFILES", + "(All numbers derived from task data — no domain knowledge assumed)", + "-" * 60, + ] + + for et, p in self.entity_profiles.items(): + tp = p.get("time_pressure", 0.0) + cr = p.get("avg_connection_risk", 0.0) + ops = p.get("operation_mix", {}) + ops_str = ", ".join(f"{k}={v}" for k, v in ops.items() if v > 0) + + if tp >= 0.85: + tp_label = "VERY TIGHT" + elif tp >= 0.60: + tp_label = "MODERATE" + else: + tp_label = "FLEXIBLE" + + if cr >= 0.80: + cr_label = "VERY HIGH" + elif cr >= 0.50: + cr_label = "HIGH" + elif cr >= 0.20: + cr_label = "MODERATE" + else: + cr_label = "LOW" + + lines += [ + f" {et} ({p.get('count', 0)} entities — {ops_str}):", + f" time_window : {p.get('avg_window_minutes', 0):.0f} min avg " + f"[{tp_label}] time_pressure={tp:.3f}", + f" connection_risk: {cr:.3f} [{cr_label}]", + f" resource use : {p.get('avg_fuel_burn', 0):.1f} intensity/min " + f"× {p.get('avg_passengers', 0):.0f} units", + f" urgency_in_notes: {'YES ⚠' if p.get('urgency_in_notes') else 'no'}", + "", + ] + + n = max(1, len(self.entity_profiles)) + max_emg = 1 + max_heavy = max(1, n // 3) + max_med = max(1, -(-n // 3)) # ceil + + lines += [ + "-" * 60, + f"SUPERVISOR TODAY: {self.supervisor_description}", + "", + "PRIORITY DISTRIBUTION BUDGET (hard constraint — starvation prevention):", + f" emergency : exactly {max_emg} entity type maximum", + f" H wake : at most {max_heavy} entity type(s)", + f" medical : at most {max_med} entity type(s) (after emergency is assigned)", + " Exceeding these budgets causes AMAN to starve DMAN of runway time.", + " If multiple types qualify for emergency, assign it only to the SINGLE", + " highest urgency scorer and demote the rest to medical.", + "", + "INSTRUCTIONS:", + "1. You do NOT know what domain this is. Reason from the structural numbers.", + "2. High time_pressure + high connection_risk → H/emergency mapping.", + "3. Flexible windows + low risk → L/normal mapping.", + "4. Enforce the budget above — cite budget slot usage in rationale.", + "5. Map each entity type to wake_class (H/M/L) and priority " + "(emergency/medical/connection/normal).", + "6. Cite the specific numbers in your rationale.", + ] + return "\n".join(lines) + + +# ── Supervisor / Snorkel AI ─────────────────────────────────────────────────── + +class SupervisorProfileName(str, Enum): + SAFETY_STRICT = "safety_strict" + THROUGHPUT_MAX = "throughput_max" + FUEL_PRIORITY = "fuel_priority" + EMERGENCY_FOCUS = "emergency_focus" + AIRLINE_FAIRNESS = "airline_fairness" + + +SUPERVISOR_PROFILES: Dict[str, Dict[str, Any]] = { + SupervisorProfileName.SAFETY_STRICT: { + "description": ( + "Zero tolerance for separation conflicts today. Delay is acceptable — " + "a conflict is not. Prioritize safety margins above all throughput goals." + ), + "conflict_weight": 3.0, + "delay_weight": 0.3, + "fuel_weight": 0.3, + "fairness_weight": 0.5, + "priority_weight": 1.5, + }, + SupervisorProfileName.THROUGHPUT_MAX: { + "description": ( + "Pack the runway. I need maximum aircraft-per-hour today. " + "Minor spacing risks are acceptable; just keep the flow moving." + ), + "conflict_weight": 0.8, + "delay_weight": 1.8, + "fuel_weight": 0.5, + "fairness_weight": 0.5, + "priority_weight": 1.0, + }, + SupervisorProfileName.FUEL_PRIORITY: { + "description": ( + "Fuel costs are critical. Every airborne hold is money burning. " + "Minimize all unnecessary holding — arrivals and departures both." + ), + "conflict_weight": 1.2, + "delay_weight": 0.6, + "fuel_weight": 2.5, + "fairness_weight": 0.5, + "priority_weight": 1.0, + }, + SupervisorProfileName.EMERGENCY_FOCUS: { + "description": ( + "Medical and emergency flights are the only thing that matters today. " + "Everything else waits if needed. No emergency flight may be delayed." + ), + "conflict_weight": 1.5, + "delay_weight": 0.4, + "fuel_weight": 0.4, + "fairness_weight": 0.3, + "priority_weight": 3.5, + }, + SupervisorProfileName.AIRLINE_FAIRNESS: { + "description": ( + "All airlines must be treated equally today. I don't care if IndiGo " + "is bigger — fairness across carriers is the metric I'm watching." + ), + "conflict_weight": 1.2, + "delay_weight": 0.8, + "fuel_weight": 0.8, + "fairness_weight": 2.5, + "priority_weight": 1.0, + }, +} + + +# ── Round / episode state ───────────────────────────────────────────────────── + +class RoundType(str, Enum): + BID = "bid" # Round 0: independent proposals + NEGOTIATE = "negotiate" # Round 1: conflict resolution + FINAL = "final" # Round 2: commit and grade + + +class MultiAgentObservation(BaseModel): + """Role-specific observation injected into the LLM system prompt.""" + + task_id: str + airport: str + briefing: str + role: AgentRole + my_flights: List[FlightRecord] # filtered to agent's operation type + all_runways: List[RunwaySpec] + supervisor_profile_name: SupervisorProfileName + supervisor_description: str + atfm_deadlines: Dict[str, int] = Field(default_factory=dict, + description="flight_id -> hard deadline minute from ATFM") + incoming_messages: List[NegotiationMessage] = Field(default_factory=list) + conflict_log: List[str] = Field(default_factory=list) + current_metrics: Optional[TaskMetrics] = None + steps_remaining: int = 0 + round_type: RoundType = RoundType.BID + round_number: int = 0 + reward: Optional[float] = None + done: bool = False + + def to_prompt_text(self) -> str: + """Render observation as structured text for LLM input.""" + prof = SUPERVISOR_PROFILES[self.supervisor_profile_name] + weight_str = ( + f"conflict={prof['conflict_weight']:.1f}x " + f"delay={prof['delay_weight']:.1f}x " + f"fuel={prof['fuel_weight']:.1f}x " + f"fairness={prof['fairness_weight']:.1f}x " + f"priority={prof['priority_weight']:.1f}x" + ) + lines = [ + f"=== {self.role.value} OBSERVATION — {self.airport} ===", + f"Task: {self.task_id}", + f"Round: {self.round_type.value.upper()} ({self.round_number}/2)", + f"Steps remaining: {self.steps_remaining}", + "", + f"SUPERVISOR TODAY: {self.supervisor_description}", + f"SUPERVISOR WEIGHTS: {weight_str}", + "", + ] + + if self.atfm_deadlines: + lines.append("ATFM HARD DEADLINES (network slots — cannot miss):") + for fid, minute in self.atfm_deadlines.items(): + lines.append(f" {fid}: depart/land by minute {minute}") + lines.append("") + + lines.append(f"YOUR FLIGHTS ({len(self.my_flights)} total):") + for f in self.my_flights: + lines.append( + f" {f.flight_id} | {f.airline} | {f.operation.value.upper()} | " + f"wake={f.wake_class.value} | priority={f.priority.value} | " + f"window=[{f.earliest_minute},{f.latest_minute}] | " + f"scheduled={f.scheduled_minute} | pax={f.passengers} | " + f"burn={f.fuel_burn_per_minute}/min | runways={f.allowed_runways}" + + (f" | NOTE: {f.notes}" if f.notes else "") + ) + + lines.append("") + lines.append("RUNWAYS:") + for rwy in self.all_runways: + ops = "/".join(o.value for o in rwy.allowed_operations) + lines.append( + f" {rwy.runway_id}: {ops} | capacity={rwy.hourly_capacity}/hr | " + f"weather_penalty={rwy.weather_penalty}x" + + (f" | {rwy.notes}" if rwy.notes else "") + ) + + if self.incoming_messages: + lines.append("") + lines.append("MESSAGES FROM OTHER AGENT:") + for msg in self.incoming_messages: + tag = " [EMERGENCY]" if msg.is_emergency else "" + conf_str = f" conf={msg.confidence:.1f}" if msg.confidence < 1.0 else "" + lines.append( + f" [{msg.from_role.value} → {msg.message_type.value}]{tag}{conf_str} " + f"{msg.flight_id} @ runway {msg.runway_id} T+{msg.requested_minute} " + f"({msg.priority.value}): {msg.reason}" + ) + if msg.content: + lines.append(f" Detail: {msg.content}") + if msg.theory_of_mind_claim: + lines.append(f" Prediction: {msg.theory_of_mind_claim}") + if msg.proposed_alternatives: + alts = ", ".join( + f"{a.flight_id}@{a.runway_id}+{a.minute}min(cost={a.delay_cost:.0f})" + for a in msg.proposed_alternatives + ) + lines.append(f" Alternatives offered: {alts}") + + if self.conflict_log: + lines.append("") + lines.append("CONFLICTS DETECTED (must resolve):") + for c in self.conflict_log: + lines.append(f" ⚠ {c}") + + if self.current_metrics: + lines.append("") + lines.append( + f"LAST SCORE: {self.current_metrics.overall_score:.3f} | " + f"conflicts={self.current_metrics.conflict_count} | " + f"delay={self.current_metrics.total_delay_minutes}min" + ) + + return "\n".join(lines) + + +# ── Per-role metrics ────────────────────────────────────────────────────────── + +class PerRoleMetrics(BaseModel): + """Metrics decomposed by AMAN / DMAN responsibility.""" + + # AMAN + arrival_count: int = 0 + arrival_delay_total: int = 0 + arrival_delay_mean: float = 0.0 + arrivals_missing: int = 0 + emergency_arrivals_ok: int = 0 + emergency_arrivals_missed: int = 0 + + # DMAN + departure_count: int = 0 + departure_delay_total: int = 0 + departure_delay_mean: float = 0.0 + departures_missing: int = 0 + atfm_violations: int = 0 + atfm_compliant: int = 0 + emergency_departures_ok: int = 0 + emergency_departures_missed: int = 0 + + # Cross-agent + cross_lane_conflicts: int = 0 # conflicts between AMAN and DMAN slots + intra_lane_conflicts: int = 0 # conflicts within one agent's slots + negotiation_rounds_used: int = 0 + coordination_score: float = 0.0 # 0→1 quality of negotiation + + +# ── Episode result ──────────────────────────────────────────────────────────── + +class MultiAgentEpisodeResult(BaseModel): + """Full episode result used by training loop.""" + + task_id: str + supervisor_profile: SupervisorProfileName + composite_score: float + aman_reward: float + dman_reward: float + generator_reward: float + supervisor_score: float + per_role: PerRoleMetrics + negotiation_rounds: int + scenario_solvable: bool = True diff --git a/multi_agent/supervisor.py b/multi_agent/supervisor.py new file mode 100644 index 0000000000000000000000000000000000000000..6898036677acc4b5ef76fd42ecd967d1acaadf77 --- /dev/null +++ b/multi_agent/supervisor.py @@ -0,0 +1,104 @@ +"""Snorkel AI Simulated Expert Supervisor. + +Each episode the supervisor draws a preference profile (safety / throughput / +fuel / emergency / fairness). The LLM agents must read the stated preference +and optimise toward it — training theory-of-mind and instruction-following +simultaneously. + +Supervisor reward is independent of the composite grader and is used only +for the supervisor-alignment component of per-agent rewards. +""" + +from __future__ import annotations + +from typing import Dict, List + +try: + from ..engine import simulate_plan, SimulationOutcome + from ..models import OperationType, PriorityClass, TaskDefinition + from .models import ( + SUPERVISOR_PROFILES, + PerRoleMetrics, + SupervisorProfileName, + ) +except ImportError: + from engine import simulate_plan, SimulationOutcome + from models import OperationType, PriorityClass, TaskDefinition + from multi_agent.models import ( + SUPERVISOR_PROFILES, + PerRoleMetrics, + SupervisorProfileName, + ) + + +_PROFILE_CYCLE: List[SupervisorProfileName] = list(SupervisorProfileName) + + +class SupervisorAgent: + """Simulates a real ATC supervisor with episodically changing preferences. + + Key behaviours: + - Deterministic profile rotation (reproducible training runs) + - Profile-weighted scoring replaces fixed SCORE_WEIGHTS for this episode + - Natural language description injected into every agent's system prompt + - Supervisor score returned as auxiliary signal (not part of composite) + """ + + def sample_profile(self, episode_id: int) -> SupervisorProfileName: + """Deterministic round-robin through profiles for reproducibility.""" + return _PROFILE_CYCLE[episode_id % len(_PROFILE_CYCLE)] + + def get_description(self, profile_name: SupervisorProfileName) -> str: + return SUPERVISOR_PROFILES[profile_name]["description"] + + def score_plan( + self, + outcome: SimulationOutcome, + task: TaskDefinition, + profile_name: SupervisorProfileName, + ) -> float: + """Score final plan against supervisor's current preference profile. + + Uses profile weight overrides applied to the raw simulation metrics. + Returns normalised score in [0, 1]. + """ + profile = SUPERVISOR_PROFILES[profile_name] + metrics = outcome.metrics + + w_conflict = profile.get("conflict_weight", 1.0) + w_delay = profile.get("delay_weight", 1.0) + w_fuel = profile.get("fuel_weight", 1.0) + w_fairness = profile.get("fairness_weight", 1.0) + w_priority = profile.get("priority_weight", 1.0) + + total_w = w_conflict + w_delay + w_fuel + w_fairness + w_priority + + raw = ( + w_conflict * metrics.conflict_free_ratio + + w_delay * metrics.delay_efficiency + + w_fuel * metrics.fuel_efficiency + + w_fairness * metrics.fairness + + w_priority * metrics.priority_handling + ) / total_w + + # Emergency focus profile: hard penalty if any emergency missed + if profile_name == SupervisorProfileName.EMERGENCY_FOCUS: + if metrics.emergency_violations > 0 or metrics.medical_violations > 0: + raw *= 0.3 # severe penalty — supervisor is watching emergency flights only + + # Safety strict: any conflict = cap at 0.4 + if profile_name == SupervisorProfileName.SAFETY_STRICT: + if metrics.conflict_count > 0: + raw = min(raw, 0.4) + + return round(max(0.0, min(1.0, raw)), 4) + + def build_system_suffix(self, profile_name: SupervisorProfileName) -> str: + """Extra system prompt text reminding agent of supervisor preference.""" + desc = self.get_description(profile_name) + return ( + f"\n\nSUPERVISOR PREFERENCE THIS EPISODE:\n" + f" {desc}\n" + f"Your plan will be scored against this preference. " + f"Explicitly state in your rationale how you are satisfying it." + ) diff --git a/multi_agent/visual_events.py b/multi_agent/visual_events.py new file mode 100644 index 0000000000000000000000000000000000000000..d33a7519c46449b38096f640caab2f09b6efcbb4 --- /dev/null +++ b/multi_agent/visual_events.py @@ -0,0 +1,101 @@ +"""Normalized visual events for HF Space pixel-art UI (SSE / transcripts). + +Keep payloads bounded: no prompts, only layout + scores + phase markers. +""" + +from __future__ import annotations + +from typing import Any, Callable, Dict, List, Literal, Optional + +from models import FlightRecord, TaskDefinition +from multi_agent.models import AMANAction, DMANAction + +VisualSink = Optional[Callable[[Dict[str, Any]], None]] + +TerminalSeverity = Literal["success", "degraded", "catastrophic"] + + +def emit(sink: VisualSink, event: Dict[str, Any]) -> None: + if sink is not None: + sink(dict(event)) + + +def _slot_row(s) -> Dict[str, Any]: + return { + "flight_id": s.flight_id, + "runway": s.runway, + "assigned_minute": int(s.assigned_minute), + "hold_minutes": int(s.hold_minutes), + } + + +def serialize_action_layout(aman: AMANAction, dman: DMANAction) -> Dict[str, Any]: + return { + "aman_arrivals": [_slot_row(s) for s in aman.arrival_slots], + "dman_departures": [_slot_row(s) for s in dman.departure_slots], + } + + +def _flight_minimal(f: FlightRecord) -> Dict[str, Any]: + return { + "flight_id": f.flight_id, + "operation": f.operation.value if hasattr(f.operation, "value") else str(f.operation), + "wake": f.wake_class.value if hasattr(f.wake_class, "value") else str(f.wake_class), + "scheduled": int(f.scheduled_minute), + "earliest": int(f.earliest_minute), + "latest": int(f.latest_minute), + "runways": list(f.allowed_runways), + "priority": f.priority.value if hasattr(f.priority, "value") else str(f.priority), + } + + +def serialize_task_snapshot(task: TaskDefinition) -> Dict[str, Any]: + return { + "task_id": task.task_id, + "airport": getattr(task, "airport", None) or task.task_id, + "runways": [ + { + "runway_id": r.runway_id, + "ops": [o.value for o in r.allowed_operations], + } + for r in task.runways + ], + "flights": [_flight_minimal(f) for f in task.flights], + } + + +def classify_terminal( + composite: float, + cross_lane_conflicts: int, + atfm_violations: int, +) -> TerminalSeverity: + """Single policy for catastrophic vs degraded (shared UI animation).""" + if composite < 0.12 or (composite < 0.22 and cross_lane_conflicts >= 6): + return "catastrophic" + if composite < 0.45 or cross_lane_conflicts >= 3 or atfm_violations >= 2: + return "degraded" + return "success" + + +def terminal_event( + *, + composite: float, + aman_reward: float, + dman_reward: float, + coordination: float, + cross_lane_conflicts: int, + atfm_violations: int, + negotiation_rounds: int, +) -> Dict[str, Any]: + sev = classify_terminal(composite, cross_lane_conflicts, atfm_violations) + return { + "type": "terminal", + "severity": sev, + "composite": round(float(composite), 4), + "aman_reward": round(float(aman_reward), 4), + "dman_reward": round(float(dman_reward), 4), + "coordination": round(float(coordination), 4), + "cross_lane_conflicts": int(cross_lane_conflicts), + "atfm_violations": int(atfm_violations), + "negotiation_rounds": int(negotiation_rounds), + } diff --git a/openenv.yaml b/openenv.yaml new file mode 100644 index 0000000000000000000000000000000000000000..0e77870144eca12b456955f86a20de6dc3a7379b --- /dev/null +++ b/openenv.yaml @@ -0,0 +1,153 @@ +spec_version: 1 +name: atc_env +version: 3.0.0 +description: > + Multi-agent RLVE benchmark for air traffic control disruption recovery. + AMAN and DMAN controllers coordinate via a 3-round BID/NEGOTIATE/FINAL + protocol over shared runways. An adversarial ChallengeGenerator applies + EMA-based curriculum mutation. A SupervisorAgent with 5 rotating preference + profiles (safety / throughput / fuel / emergency / fairness) provides + grounded dense reward. Trained with GRPO + Unsloth 4-bit QLoRA on Colab T4. +type: space +runtime: fastapi +app: server.app:app +port: 8000 +tags: +- openenv +- air-traffic-control +- multi-agent +- rlve +- grpo +- cooperative-competitive +- self-play +- aman +- dman +- curriculum-learning + +# ── Primary interface (OpenEnv-compliant) ───────────────────────────────────── +action_space: atc_env.models:ATCAction +observation_space: atc_env.models:ATCObservation +state_space: atc_env.models:ATCState + +# ── Multi-agent configuration ───────────────────────────────────────────────── +multi_agent: + enabled: true + mode: cooperative_competitive + agents: + - role: AMAN + description: Arrival Manager — sequences inbound flights, manages wake turbulence separation + action_space: multi_agent.models:AMANAction + observation_space: multi_agent.models:MultiAgentObservation + - role: DMAN + description: Departure Manager — schedules outbound flights, enforces ATFM network slots + action_space: multi_agent.models:DMANAction + observation_space: multi_agent.models:MultiAgentObservation + - role: GENERATOR + description: Adversarial self-play agent — mutates tasks via EMA curriculum to challenge controllers + action_space: multi_agent.models:GeneratorAction + observation_space: multi_agent.models:MultiAgentObservation + - role: SUPERVISOR + description: > + Expert with rotating preference profiles (safety_strict / throughput_max / + fuel_economy / emergency_priority / fairness_balanced) + action_space: null + observation_space: multi_agent.models:MultiAgentObservation + negotiation_rounds: 3 + protocol: BID -> NEGOTIATE -> FINAL + shared_runways: true + emergency_broadcast: true + +# ── Reward design ───────────────────────────────────────────────────────────── +reward: + type: potential_based_shaping # Ng et al. 1999 — preserves optimal policy + roles: + AMAN: + components: [delay_efficiency, emergency_score, coverage, counterfactual_advantage, + theory_of_mind_bonus, supervisor_alignment, rationale_quality, json_format] + hard_gates: + conflict_free: {cap: 0.30, condition: "conflict_count > 0"} + emergency: {cap: 0.40, condition: "emg_miss > 0"} + coverage_floor: {penalty: -0.30, condition: "coverage < 0.50"} + DMAN: + components: [delay_efficiency, atfm_compliance, emergency_score, coverage, + counterfactual_advantage, theory_of_mind_bonus, supervisor_alignment, + rationale_quality, json_format] + hard_gates: + conflict_free: {cap: 0.30, condition: "conflict_count > 0"} + emergency: {cap: 0.40, condition: "emg_miss > 0"} + coverage_floor: {penalty: -0.30, condition: "coverage < 0.50"} + GENERATOR: + components: [challenge_score, solvability_bonus] + SUPERVISOR: + components: [preference_alignment, calibration_bonus] + +# ── Graders ─────────────────────────────────────────────────────────────────── +graders: + primary: + - module: graders:MultiAgentCoordinationGrader + weight: 0.40 + - module: graders:GatedCompositeGrader + weight: 0.45 + - module: graders:LLMSupervisorGrader + weight: 0.15 + +# ── Tasks ───────────────────────────────────────────────────────────────────── +tasks: +- id: delhi_monsoon_recovery_easy + difficulty: easy + description: Delhi IGI airport, monsoon season, 12 flights, VVIP slot constraint + grader: + type: programmatic + module: graders:GatedCompositeGrader + multi_agent_grader: + module: graders:grade_multi_agent + max_steps: 10 + multi_agent_max_rounds: 3 + +- id: mumbai_bank_balance_medium + difficulty: medium + description: Mumbai CSIA, runway bank sequence, mixed cargo/passenger, 15 flights + grader: + type: programmatic + module: graders:GatedCompositeGrader + multi_agent_grader: + module: graders:grade_multi_agent + max_steps: 14 + multi_agent_max_rounds: 3 + +- id: bengaluru_irrops_hard + difficulty: hard + description: > + Bengaluru KIA, dual-runway IRROPS (09L/09R), emergency MED001 arrival + + MED208 medical departure, ATFM constraints, 18 flights + grader: + type: programmatic + module: graders:GatedCompositeGrader + multi_agent_grader: + module: graders:grade_multi_agent + max_steps: 18 + multi_agent_max_rounds: 3 + +- id: hyderabad_cargo_crunch_medium_hard + difficulty: hard + description: Hyderabad RGIA, cargo priority, peak hour crunch, 20 flights + grader: + type: programmatic + module: graders:GatedCompositeGrader + multi_agent_grader: + module: graders:grade_multi_agent + max_steps: 20 + multi_agent_max_rounds: 3 + +# ── Training ────────────────────────────────────────────────────────────────── +training: + algorithm: GRPO + n_generations: 4 + kl_coeff: 0.01 + framework: unsloth + trl + base_model: Qwen/Qwen2.5-7B-Instruct + colab_compatible: true + vram_requirement: 16GB + lora_rank: 16 + script: training/train_grpo.py + reward_functions: training/reward_functions.py diff --git a/planner.py b/planner.py new file mode 100644 index 0000000000000000000000000000000000000000..541d26d753515a47d5b1dbe7168d7247f1eb0f33 --- /dev/null +++ b/planner.py @@ -0,0 +1,185 @@ +"""Deterministic baseline planner used by inference and tests.""" + +from __future__ import annotations + +from collections import defaultdict +from typing import Dict, List, Tuple + +try: + from .engine import SimulationOutcome, simulate_plan + from .models import ( + ATCOptimizationObservation, + FlightRecord, + PriorityClass, + RunwaySpec, + SlotAssignment, + ) + from .constants import SEPARATION_BY_WAKE + from .tasks import task_catalog +except ImportError: + from engine import SimulationOutcome, simulate_plan + from models import ( + ATCOptimizationObservation, + FlightRecord, + PriorityClass, + RunwaySpec, + SlotAssignment, + ) + from constants import SEPARATION_BY_WAKE + from tasks import task_catalog + +PRIORITY_RANK = { + PriorityClass.EMERGENCY: 0, + PriorityClass.MEDICAL: 1, + PriorityClass.CONNECTION: 2, + PriorityClass.NORMAL: 3, +} + + +def _capacity_spacing(runway: RunwaySpec) -> int: + base_gap = max(2, round(60 / runway.hourly_capacity)) + return max(2, round(base_gap * runway.weather_penalty)) + + +def _flight_sort_key(flight: FlightRecord) -> Tuple[int, int, int, float, int]: + return ( + PRIORITY_RANK[flight.priority], + flight.scheduled_minute, + 0 if flight.operation.value == "arrival" else 1, + -flight.connection_risk, + -flight.passengers, + ) + + +def _outcome_key(outcome: SimulationOutcome) -> Tuple[float, float, float, float, float, float]: + metrics = outcome.metrics + return ( + metrics.overall_score, + metrics.priority_handling, + metrics.conflict_free_ratio, + metrics.fairness, + metrics.delay_efficiency, + -float(metrics.total_delay_minutes), + ) + + +def build_heuristic_plan(observation: ATCOptimizationObservation) -> List[SlotAssignment]: + """Create a safe, deterministic seed schedule.""" + + runway_lookup = {runway.runway_id: runway for runway in observation.runways} + runway_state: Dict[str, Tuple[int, str]] = { + runway.runway_id: (-999, "M") for runway in observation.runways + } + airline_delay_totals: Dict[str, List[int]] = defaultdict(list) + + assignments: List[SlotAssignment] = [] + for flight in sorted(observation.flights, key=_flight_sort_key): + best_choice: Tuple[float, str, int] | None = None + for runway_id in flight.allowed_runways: + runway = runway_lookup[runway_id] + last_minute, last_wake = runway_state[runway_id] + gap = max( + _capacity_spacing(runway), + SEPARATION_BY_WAKE[(last_wake, flight.wake_class.value)], + ) + earliest_safe = max(flight.earliest_minute, last_minute + gap, flight.scheduled_minute) + candidate_time = min(max(earliest_safe, flight.earliest_minute), flight.latest_minute) + delay = abs(candidate_time - flight.scheduled_minute) + airline_avg_delay = ( + sum(airline_delay_totals[flight.airline]) / len(airline_delay_totals[flight.airline]) + if airline_delay_totals[flight.airline] + else 0.0 + ) + objective = ( + delay + + 6 * PRIORITY_RANK[flight.priority] + + 12 * flight.connection_risk + + 0.25 * airline_avg_delay + + (3 if runway_id.endswith("L") and flight.priority == PriorityClass.NORMAL else 0) + ) + candidate = (objective, runway_id, candidate_time) + if best_choice is None or candidate < best_choice: + best_choice = candidate + + assert best_choice is not None + _, chosen_runway, chosen_time = best_choice + assignments.append( + SlotAssignment( + flight_id=flight.flight_id, + runway=chosen_runway, + assigned_minute=chosen_time, + hold_minutes=max(0, chosen_time - flight.scheduled_minute), + ) + ) + airline_delay_totals[flight.airline].append(abs(chosen_time - flight.scheduled_minute)) + runway_state[chosen_runway] = (chosen_time, flight.wake_class.value) + + assignments.sort(key=lambda item: item.assigned_minute) + return assignments + + +def build_refined_plan( + observation: ATCOptimizationObservation, + seed_plan: List[SlotAssignment] | None = None, + max_passes: int = 2, +) -> List[SlotAssignment]: + """Greedily improve the seed plan using the deterministic simulator.""" + + task = task_catalog().get(observation.task_id) + if task is None: + return seed_plan or build_heuristic_plan(observation) + + ordered_flights = sorted(observation.flights, key=_flight_sort_key) + ordered_ids = [flight.flight_id for flight in ordered_flights] + current_plan = list(seed_plan) if seed_plan is not None else build_heuristic_plan(observation) + assignment_map = {assignment.flight_id: assignment for assignment in current_plan} + + for flight in ordered_flights: + assignment_map.setdefault( + flight.flight_id, + SlotAssignment( + flight_id=flight.flight_id, + runway=flight.allowed_runways[0], + assigned_minute=flight.scheduled_minute, + hold_minutes=0, + ), + ) + + best_plan = [assignment_map[flight_id] for flight_id in ordered_ids] + best_outcome = simulate_plan(task, best_plan) + + for _ in range(max_passes): + improved = False + for flight in ordered_flights: + current_assignment = assignment_map[flight.flight_id] + best_local_assignment = current_assignment + for runway_id in flight.allowed_runways: + for minute in range(flight.earliest_minute, flight.latest_minute + 1): + if ( + runway_id == current_assignment.runway + and minute == current_assignment.assigned_minute + ): + continue + candidate_assignment = SlotAssignment( + flight_id=flight.flight_id, + runway=runway_id, + assigned_minute=minute, + hold_minutes=max(0, minute - flight.scheduled_minute), + ) + assignment_map[flight.flight_id] = candidate_assignment + candidate_plan = [assignment_map[item_id] for item_id in ordered_ids] + candidate_outcome = simulate_plan(task, candidate_plan) + if _outcome_key(candidate_outcome) > _outcome_key(best_outcome): + best_outcome = candidate_outcome + best_local_assignment = candidate_assignment + improved = True + assignment_map[flight.flight_id] = best_local_assignment + + assignment_map[flight.flight_id] = best_local_assignment + best_plan = [assignment_map[item_id] for item_id in ordered_ids] + + if not improved: + break + + best_plan.sort(key=lambda item: (item.assigned_minute, item.flight_id)) + return best_plan diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000000000000000000000000000000000000..03270fd5e985b5ae7cd6e9fea9d8a0aa549bf003 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,54 @@ +[build-system] +requires = ["setuptools>=68", "wheel"] +build-backend = "setuptools.build_meta" + +[project] +name = "openenv-atc-optimization" +version = "1.0.0" +description = "OpenEnv benchmark for realistic air traffic control disruption recovery" +readme = "README.md" +requires-python = ">=3.11" +dependencies = [ + "fastapi>=0.128.0", + "openai>=2.30.0", + "openenv-core[core]>=0.2.3", + "pydantic>=2.12.0", + "uvicorn>=0.41.0", +] + +[project.optional-dependencies] +dev = [ + "pytest>=8.4.0", + "requests>=2.33.0", +] +training = [ + "trl>=0.9.6", + "datasets>=2.20.0", + "transformers>=4.43.0", + "torch>=2.3.0", + "accelerate>=0.32.0", + "bitsandbytes>=0.43.0", + "peft>=0.12.0", + "matplotlib>=3.9.0", + "numpy>=1.26.0", +] +training-unsloth = [ + "unsloth[colab-new]>=2024.8", + "trl>=0.9.6", + "datasets>=2.20.0", + "matplotlib>=3.9.0", + "numpy>=1.26.0", +] + +[project.scripts] +server = "atc_env.server.app:main" +atc-train = "training.train_grpo:main" +atc-train-sft = "training.train_sft:main" +atc-build-sft-data = "training.build_sft_dataset:main" +atc-eval = "training.eval:main" +atc-plot = "training.plot_rewards:main" +atc-hf-train = "training.hf_train:main" + +[tool.setuptools.packages.find] +where = ["."] +include = ["atc_env*", "multi_agent*", "domains*", "training*", "server*"] diff --git a/results/benchmark_scores.json b/results/benchmark_scores.json new file mode 100644 index 0000000000000000000000000000000000000000..67b13d30a6384fa2d644c90052874867bb999543 --- /dev/null +++ b/results/benchmark_scores.json @@ -0,0 +1,31 @@ +{ + "NOTE": "Measured by running the repo's inference code path on 2026-04-08 with model=heuristic-baseline.", + "run_date": "2026-04-08", + "model": "heuristic-baseline", + "tasks": { + "delhi_monsoon_recovery_easy": { + "random_baseline": 0.21, + "our_agent": 0.9446, + "steps_used": 3 + }, + "mumbai_bank_balance_medium": { + "random_baseline": 0.18, + "our_agent": 0.99, + "steps_used": 2 + }, + "bengaluru_irrops_hard": { + "random_baseline": 0.12, + "our_agent": 0.8615, + "steps_used": 4 + }, + "hyderabad_cargo_crunch_medium_hard": { + "random_baseline": 0.15, + "our_agent": 0.8576, + "steps_used": 3 + } + }, + "average_agent_score": 0.9134, + "average_random_baseline": 0.165, + "total_runtime_seconds": 11.69, + "hardware": "2 vCPU / 8 GB RAM (spec limit)" +} diff --git a/scripts/benchmark_results/.gitkeep b/scripts/benchmark_results/.gitkeep new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/scripts/benchmark_results/fixed_icu/episode_00000.json b/scripts/benchmark_results/fixed_icu/episode_00000.json new file mode 100644 index 0000000000000000000000000000000000000000..a0a5bb5bd6f221dfc1db3cad2ae93b8562f43ce7 --- /dev/null +++ b/scripts/benchmark_results/fixed_icu/episode_00000.json @@ -0,0 +1,620 @@ +{ + "episode_id": 0, + "domain_task_id": "icu_mass_casualty", + "mode": "adapt_domain_transfer", + "supervisor_profile": "safety_strict", + "adapt_wake_map": { + "TRAUMA": "H", + "CARDIAC": "M", + "POST_OP": "M", + "ROUTINE": "L" + }, + "adapt_priority_map": { + "TRAUMA": "emergency", + "CARDIAC": "medical", + "POST_OP": "medical", + "ROUTINE": "connection" + }, + "adapt_rationale": "Structural budget-enforced inference (budget: emergency\u22641 heavy\u22641 medical\u22642): TRAUMA: tp=0.98 cr=0.93 score=0.96 \u2192 wake=H priority=emergency; CARDIAC: tp=0.85 cr=0.64 score=0.78 \u2192 wake=M (budget-demoted) priority=medical; POST_OP: tp=0.96 cr=0.00 score=0.58 \u2192 wake=M priority=medical (budget-demoted); ROUTINE: tp=0.68 cr=0.00 score=0.34 \u2192 wake=L priority=connection", + "visual_log": [ + { + "type": "adapt_scene", + "domain_task_id": "icu_mass_casualty", + "visual_profile": "icu", + "entity_types": [ + "CARDIAC", + "POST_OP", + "ROUTINE", + "TRAUMA" + ] + }, + { + "type": "adapt_mapping", + "wake_map": { + "TRAUMA": "H", + "CARDIAC": "M", + "POST_OP": "M", + "ROUTINE": "L" + }, + "priority_map": { + "TRAUMA": "emergency", + "CARDIAC": "medical", + "POST_OP": "medical", + "ROUTINE": "connection" + }, + "rationale_preview": "Structural budget-enforced inference (budget: emergency\u22641 heavy\u22641 medical\u22642): TRAUMA: tp=0.98 cr=0.93 score=0.96 \u2192 wake=H priority=emergency; CARDIAC: tp=0.85 cr=0.64 score=0.78 \u2192 wake=M (budget-demot" + }, + { + "type": "scene_reset", + "episode_id": 0, + "task_id": "icu_mass_casualty", + "resolved_task_id": "icu_mass_casualty", + "visual_profile": "icu", + "supervisor_profile": "safety_strict", + "mutations_applied": [], + "task": { + "task_id": "icu_mass_casualty", + "airport": "GENERAL_HOSPITAL_ICU", + "runways": [ + { + "runway_id": "BED_A", + "ops": [ + "arrival", + "departure" + ] + }, + { + "runway_id": "BED_B", + "ops": [ + "arrival", + "departure" + ] + }, + { + "runway_id": "BED_C", + "ops": [ + "arrival", + "departure" + ] + }, + { + "runway_id": "BED_D", + "ops": [ + "arrival", + "departure" + ] + } + ], + "flights": [ + { + "flight_id": "T_ARR_01", + "operation": "arrival", + "wake": "H", + "scheduled": 5, + "earliest": 0, + "latest": 10, + "runways": [ + "BED_A", + "BED_B", + "BED_C", + "BED_D" + ], + "priority": "emergency" + }, + { + "flight_id": "T_ARR_02", + "operation": "arrival", + "wake": "H", + "scheduled": 8, + "earliest": 3, + "latest": 15, + "runways": [ + "BED_A", + "BED_B", + "BED_C", + "BED_D" + ], + "priority": "emergency" + }, + { + "flight_id": "T_ARR_03", + "operation": "arrival", + "wake": "H", + "scheduled": 12, + "earliest": 8, + "latest": 20, + "runways": [ + "BED_A", + "BED_B", + "BED_C", + "BED_D" + ], + "priority": "emergency" + }, + { + "flight_id": "T_ARR_04", + "operation": "arrival", + "wake": "M", + "scheduled": 30, + "earliest": 15, + "latest": 75, + "runways": [ + "BED_A", + "BED_B", + "BED_C", + "BED_D" + ], + "priority": "medical" + }, + { + "flight_id": "T_ARR_05", + "operation": "arrival", + "wake": "M", + "scheduled": 50, + "earliest": 30, + "latest": 100, + "runways": [ + "BED_A", + "BED_B", + "BED_C", + "BED_D" + ], + "priority": "medical" + }, + { + "flight_id": "T_ARR_06", + "operation": "arrival", + "wake": "M", + "scheduled": 80, + "earliest": 60, + "latest": 140, + "runways": [ + "BED_A", + "BED_B", + "BED_C", + "BED_D" + ], + "priority": "medical" + }, + { + "flight_id": "T_ARR_07", + "operation": "arrival", + "wake": "M", + "scheduled": 110, + "earliest": 90, + "latest": 170, + "runways": [ + "BED_A", + "BED_B", + "BED_C", + "BED_D" + ], + "priority": "medical" + }, + { + "flight_id": "T_ARR_08", + "operation": "arrival", + "wake": "L", + "scheduled": 120, + "earliest": 60, + "latest": 240, + "runways": [ + "BED_A", + "BED_B", + "BED_C", + "BED_D" + ], + "priority": "connection" + }, + { + "flight_id": "T_ARR_09", + "operation": "arrival", + "wake": "L", + "scheduled": 160, + "earliest": 100, + "latest": 280, + "runways": [ + "BED_A", + "BED_B", + "BED_C", + "BED_D" + ], + "priority": "connection" + }, + { + "flight_id": "T_ARR_10", + "operation": "arrival", + "wake": "L", + "scheduled": 200, + "earliest": 150, + "latest": 330, + "runways": [ + "BED_A", + "BED_B", + "BED_C", + "BED_D" + ], + "priority": "connection" + }, + { + "flight_id": "T_DIS_01", + "operation": "departure", + "wake": "M", + "scheduled": 0, + "earliest": 0, + "latest": 8, + "runways": [ + "BED_A", + "BED_B", + "BED_C", + "BED_D" + ], + "priority": "medical" + }, + { + "flight_id": "T_DIS_02", + "operation": "departure", + "wake": "M", + "scheduled": 2, + "earliest": 0, + "latest": 10, + "runways": [ + "BED_A", + "BED_B", + "BED_C", + "BED_D" + ], + "priority": "medical" + }, + { + "flight_id": "T_DIS_03", + "operation": "departure", + "wake": "M", + "scheduled": 5, + "earliest": 0, + "latest": 15, + "runways": [ + "BED_A", + "BED_B", + "BED_C", + "BED_D" + ], + "priority": "medical" + }, + { + "flight_id": "T_DIS_04", + "operation": "departure", + "wake": "M", + "scheduled": 20, + "earliest": 10, + "latest": 60, + "runways": [ + "BED_A", + "BED_B", + "BED_C", + "BED_D" + ], + "priority": "medical" + }, + { + "flight_id": "T_DIS_05", + "operation": "departure", + "wake": "L", + "scheduled": 40, + "earliest": 20, + "latest": 120, + "runways": [ + "BED_A", + "BED_B", + "BED_C", + "BED_D" + ], + "priority": "connection" + }, + { + "flight_id": "T_DIS_06", + "operation": "departure", + "wake": "L", + "scheduled": 90, + "earliest": 60, + "latest": 200, + "runways": [ + "BED_A", + "BED_B", + "BED_C", + "BED_D" + ], + "priority": "connection" + } + ] + } + }, + { + "type": "llm_started", + "role": "AMAN", + "model": "heuristic-baseline" + }, + { + "type": "llm_finished", + "role": "AMAN", + "used_llm": false + }, + { + "type": "llm_started", + "role": "DMAN", + "model": "heuristic-baseline" + }, + { + "type": "llm_finished", + "role": "DMAN", + "used_llm": false + }, + { + "type": "action_layout", + "phase": "BID", + "layout": { + "aman_arrivals": [ + { + "flight_id": "T_ARR_01", + "runway": "BED_A", + "assigned_minute": 5, + "hold_minutes": 0 + }, + { + "flight_id": "T_ARR_02", + "runway": "BED_A", + "assigned_minute": 10, + "hold_minutes": 2 + }, + { + "flight_id": "T_ARR_03", + "runway": "BED_A", + "assigned_minute": 15, + "hold_minutes": 3 + }, + { + "flight_id": "T_ARR_04", + "runway": "BED_A", + "assigned_minute": 20, + "hold_minutes": 0 + }, + { + "flight_id": "T_ARR_05", + "runway": "BED_A", + "assigned_minute": 30, + "hold_minutes": 0 + }, + { + "flight_id": "T_ARR_06", + "runway": "BED_A", + "assigned_minute": 60, + "hold_minutes": 0 + }, + { + "flight_id": "T_ARR_07", + "runway": "BED_A", + "assigned_minute": 90, + "hold_minutes": 0 + }, + { + "flight_id": "T_ARR_08", + "runway": "BED_A", + "assigned_minute": 95, + "hold_minutes": 0 + }, + { + "flight_id": "T_ARR_09", + "runway": "BED_A", + "assigned_minute": 100, + "hold_minutes": 0 + }, + { + "flight_id": "T_ARR_10", + "runway": "BED_A", + "assigned_minute": 150, + "hold_minutes": 0 + } + ], + "dman_departures": [ + { + "flight_id": "T_DIS_01", + "runway": "BED_A", + "assigned_minute": 5, + "hold_minutes": 5 + }, + { + "flight_id": "T_DIS_02", + "runway": "BED_B", + "assigned_minute": 5, + "hold_minutes": 3 + }, + { + "flight_id": "T_DIS_03", + "runway": "BED_C", + "assigned_minute": 5, + "hold_minutes": 0 + }, + { + "flight_id": "T_DIS_04", + "runway": "BED_A", + "assigned_minute": 25, + "hold_minutes": 5 + }, + { + "flight_id": "T_DIS_05", + "runway": "BED_A", + "assigned_minute": 35, + "hold_minutes": 0 + }, + { + "flight_id": "T_DIS_06", + "runway": "BED_A", + "assigned_minute": 65, + "hold_minutes": 0 + } + ] + } + }, + { + "type": "negotiation_tick", + "pass": 1, + "partial_reward": 0.171, + "separation_issues_after": 0, + "used_llm": false, + "layout": { + "aman_arrivals": [ + { + "flight_id": "T_ARR_01", + "runway": "BED_D", + "assigned_minute": 5, + "hold_minutes": 0 + }, + { + "flight_id": "T_ARR_02", + "runway": "BED_A", + "assigned_minute": 10, + "hold_minutes": 2 + }, + { + "flight_id": "T_ARR_03", + "runway": "BED_B", + "assigned_minute": 10, + "hold_minutes": 0 + }, + { + "flight_id": "T_ARR_04", + "runway": "BED_A", + "assigned_minute": 15, + "hold_minutes": 0 + }, + { + "flight_id": "T_ARR_05", + "runway": "BED_A", + "assigned_minute": 30, + "hold_minutes": 0 + }, + { + "flight_id": "T_ARR_06", + "runway": "BED_A", + "assigned_minute": 60, + "hold_minutes": 0 + }, + { + "flight_id": "T_ARR_07", + "runway": "BED_A", + "assigned_minute": 90, + "hold_minutes": 0 + }, + { + "flight_id": "T_ARR_08", + "runway": "BED_A", + "assigned_minute": 95, + "hold_minutes": 0 + }, + { + "flight_id": "T_ARR_09", + "runway": "BED_A", + "assigned_minute": 100, + "hold_minutes": 0 + }, + { + "flight_id": "T_ARR_10", + "runway": "BED_A", + "assigned_minute": 150, + "hold_minutes": 0 + } + ], + "dman_departures": [ + { + "flight_id": "T_DIS_01", + "runway": "BED_A", + "assigned_minute": 5, + "hold_minutes": 5 + }, + { + "flight_id": "T_DIS_02", + "runway": "BED_B", + "assigned_minute": 5, + "hold_minutes": 3 + }, + { + "flight_id": "T_DIS_03", + "runway": "BED_C", + "assigned_minute": 5, + "hold_minutes": 0 + }, + { + "flight_id": "T_DIS_04", + "runway": "BED_A", + "assigned_minute": 20, + "hold_minutes": 0 + }, + { + "flight_id": "T_DIS_05", + "runway": "BED_A", + "assigned_minute": 25, + "hold_minutes": 0 + }, + { + "flight_id": "T_DIS_06", + "runway": "BED_A", + "assigned_minute": 65, + "hold_minutes": 0 + } + ] + } + }, + { + "type": "score_update", + "composite": 0.395, + "aman_reward": 0.5105, + "dman_reward": 0.702 + }, + { + "type": "terminal", + "severity": "degraded", + "composite": 0.395, + "aman_reward": 0.5105, + "dman_reward": 0.702, + "coordination": 0.9, + "cross_lane_conflicts": 0, + "atfm_violations": 0, + "negotiation_rounds": 1 + } + ], + "rounds": [ + { + "round": "BID", + "partial_reward": 0.1583, + "separation_issues_detected": 1, + "diagnostics_count": 8, + "aman_slots": 10, + "dman_slots": 6, + "aman_messages": 10, + "dman_messages": 6, + "done": false + }, + { + "round": "NEGOTIATE", + "negotiate_pass": 1, + "partial_reward": 0.171, + "separation_issues_before": 1, + "separation_issues_after": 0, + "diagnostics_count": 8, + "conflicts_resolved": 1, + "total_messages": 16, + "aman_alternatives_offered": 0, + "dman_alternatives_offered": 0, + "used_llm": false + } + ], + "final": { + "composite_score": 0.395, + "aman_reward": 0.5105, + "dman_reward": 0.702, + "coordination_score": 0.9, + "cross_lane_conflicts": 0, + "negotiation_rounds": 1, + "atfm_violations": 0 + } +} \ No newline at end of file diff --git a/scripts/benchmark_results/kimi_k26_atc/episode_00000.json b/scripts/benchmark_results/kimi_k26_atc/episode_00000.json new file mode 100644 index 0000000000000000000000000000000000000000..04f10967431f0a043d9fb534e72ff7a1128b5556 --- /dev/null +++ b/scripts/benchmark_results/kimi_k26_atc/episode_00000.json @@ -0,0 +1,47 @@ +{ + "episode_id": 0, + "task_id": "bengaluru_irrops_hard", + "supervisor_profile": "safety_strict", + "gen_difficulty": 0, + "mutations_applied": [], + "solvable": true, + "rounds": [ + { + "round": "BID", + "partial_reward": 0.2014, + "separation_issues_detected": 2, + "diagnostics_count": 4, + "aman_slots": 8, + "dman_slots": 9, + "aman_messages": 8, + "dman_messages": 9, + "done": false + }, + { + "round": "NEGOTIATE", + "negotiate_pass": 1, + "partial_reward": 0.22, + "separation_issues_before": 2, + "separation_issues_after": 0, + "diagnostics_count": 2, + "conflicts_resolved": 2, + "total_messages": 17, + "aman_alternatives_offered": 0, + "dman_alternatives_offered": 0, + "used_llm": false + } + ], + "final": { + "composite_score": 0.46, + "aman_reward": 0.8529, + "dman_reward": 0.7633, + "generator_reward": 0.1919, + "supervisor_score": 0.8603, + "coordination_score": 0.9, + "cross_lane_conflicts": 0, + "negotiation_rounds": 1, + "atfm_violations": 0, + "emergency_arrivals_ok": 1, + "emergency_departures_ok": 1 + } +} \ No newline at end of file diff --git a/scripts/benchmark_results/kimi_k26_icu/episode_00000.json b/scripts/benchmark_results/kimi_k26_icu/episode_00000.json new file mode 100644 index 0000000000000000000000000000000000000000..1e43c6785e317b28495d593c7de6e6401f8aff4a --- /dev/null +++ b/scripts/benchmark_results/kimi_k26_icu/episode_00000.json @@ -0,0 +1,53 @@ +{ + "episode_id": 0, + "domain_task_id": "icu_mass_casualty", + "mode": "adapt_domain_transfer", + "supervisor_profile": "safety_strict", + "adapt_wake_map": { + "TRAUMA": "H", + "CARDIAC": "M", + "POST_OP": "M", + "ROUTINE": "L" + }, + "adapt_priority_map": { + "TRAUMA": "emergency", + "CARDIAC": "medical", + "POST_OP": "medical", + "ROUTINE": "connection" + }, + "adapt_rationale": "Structural budget-enforced inference (budget: emergency\u22641 heavy\u22641 medical\u22642): TRAUMA: tp=0.98 cr=0.93 score=0.96 \u2192 wake=H priority=emergency; CARDIAC: tp=0.85 cr=0.64 score=0.78 \u2192 wake=M (budget-demoted) priority=medical; POST_OP: tp=0.96 cr=0.00 score=0.58 \u2192 wake=M priority=medical (budget-demoted); ROUTINE: tp=0.68 cr=0.00 score=0.34 \u2192 wake=L priority=connection", + "rounds": [ + { + "round": "BID", + "partial_reward": 0.0981, + "separation_issues_detected": 3, + "diagnostics_count": 12, + "aman_slots": 9, + "dman_slots": 4, + "aman_messages": 9, + "dman_messages": 4, + "done": false + }, + { + "round": "NEGOTIATE", + "negotiate_pass": 1, + "partial_reward": 0.1098, + "separation_issues_before": 3, + "separation_issues_after": 2, + "diagnostics_count": 11, + "conflicts_resolved": 1, + "total_messages": 13, + "aman_alternatives_offered": 0, + "dman_alternatives_offered": 0, + "used_llm": false + } + ], + "final": { + "composite_score": 0.2768, + "aman_reward": 0.3957, + "dman_reward": 0.4538, + "coordination_score": 0.5682, + "cross_lane_conflicts": 2, + "negotiation_rounds": 1 + } +} \ No newline at end of file diff --git a/scripts/benchmark_results/qwen25_1p5b_atc/episode_00000.json b/scripts/benchmark_results/qwen25_1p5b_atc/episode_00000.json new file mode 100644 index 0000000000000000000000000000000000000000..6704000b4ed473ce6dc4ca487dda3dee5e076897 --- /dev/null +++ b/scripts/benchmark_results/qwen25_1p5b_atc/episode_00000.json @@ -0,0 +1,47 @@ +{ + "episode_id": 0, + "task_id": "bengaluru_irrops_hard", + "supervisor_profile": "safety_strict", + "gen_difficulty": 0, + "mutations_applied": [], + "solvable": true, + "rounds": [ + { + "round": "BID", + "partial_reward": 0.1185, + "separation_issues_detected": 7, + "diagnostics_count": 9, + "aman_slots": 8, + "dman_slots": 8, + "aman_messages": 8, + "dman_messages": 8, + "done": false + }, + { + "round": "NEGOTIATE", + "negotiate_pass": 1, + "partial_reward": 0.1676, + "separation_issues_before": 7, + "separation_issues_after": 2, + "diagnostics_count": 5, + "conflicts_resolved": 5, + "total_messages": 16, + "aman_alternatives_offered": 0, + "dman_alternatives_offered": 0, + "used_llm": false + } + ], + "final": { + "composite_score": 0.35, + "aman_reward": 0.8318, + "dman_reward": 0.632, + "generator_reward": 0.2681, + "supervisor_score": 0.4, + "coordination_score": 0.65, + "cross_lane_conflicts": 2, + "negotiation_rounds": 1, + "atfm_violations": 0, + "emergency_arrivals_ok": 1, + "emergency_departures_ok": 1 + } +} \ No newline at end of file diff --git a/scripts/benchmark_results/qwen25_1p5b_icu/episode_00000.json b/scripts/benchmark_results/qwen25_1p5b_icu/episode_00000.json new file mode 100644 index 0000000000000000000000000000000000000000..31db68315f194370efed7f6e97f784c0fca6cc0f --- /dev/null +++ b/scripts/benchmark_results/qwen25_1p5b_icu/episode_00000.json @@ -0,0 +1,66 @@ +{ + "episode_id": 0, + "domain_task_id": "icu_mass_casualty", + "mode": "adapt_domain_transfer", + "supervisor_profile": "safety_strict", + "adapt_wake_map": { + "TRAUMA": "H", + "CARDIAC": "M", + "POST_OP": "M", + "ROUTINE": "L" + }, + "adapt_priority_map": { + "TRAUMA": "emergency", + "CARDIAC": "medical", + "POST_OP": "medical", + "ROUTINE": "connection" + }, + "adapt_rationale": "Structural budget-enforced inference (budget: emergency\u22641 heavy\u22641 medical\u22642): TRAUMA: tp=0.98 cr=0.93 score=0.96 \u2192 wake=H priority=emergency; CARDIAC: tp=0.85 cr=0.64 score=0.78 \u2192 wake=M (budget-demoted) priority=medical; POST_OP: tp=0.96 cr=0.00 score=0.58 \u2192 wake=M priority=medical (budget-demoted); ROUTINE: tp=0.68 cr=0.00 score=0.34 \u2192 wake=L priority=connection", + "rounds": [ + { + "round": "BID", + "partial_reward": 0.0981, + "separation_issues_detected": 3, + "diagnostics_count": 12, + "aman_slots": 9, + "dman_slots": 4, + "aman_messages": 9, + "dman_messages": 4, + "done": false + }, + { + "round": "NEGOTIATE", + "negotiate_pass": 1, + "partial_reward": 0.1098, + "separation_issues_before": 3, + "separation_issues_after": 2, + "diagnostics_count": 11, + "conflicts_resolved": 1, + "total_messages": 13, + "aman_alternatives_offered": 0, + "dman_alternatives_offered": 0, + "used_llm": false + }, + { + "round": "NEGOTIATE", + "negotiate_pass": 2, + "partial_reward": 0.1126, + "separation_issues_before": 2, + "separation_issues_after": 0, + "diagnostics_count": 10, + "conflicts_resolved": 2, + "total_messages": 11, + "aman_alternatives_offered": 0, + "dman_alternatives_offered": 0, + "used_llm": false + } + ], + "final": { + "composite_score": 0.3, + "aman_reward": 0.4426, + "dman_reward": 0.4584, + "coordination_score": 0.7136, + "cross_lane_conflicts": 0, + "negotiation_rounds": 2 + } +} \ No newline at end of file diff --git a/scripts/benchmark_results/results_20260407_161519.json b/scripts/benchmark_results/results_20260407_161519.json new file mode 100644 index 0000000000000000000000000000000000000000..63606aaa313529a770d3418d9785211d86eeadb6 --- /dev/null +++ b/scripts/benchmark_results/results_20260407_161519.json @@ -0,0 +1,245 @@ +[ + { + "model": "heuristic-baseline", + "avg_score": 0.9271, + "tasks": [ + { + "task_id": "delhi_monsoon_recovery_easy", + "score": 0.964, + "success": true, + "steps": 3, + "rewards": [ + 0.7877, + 0.1763, + 0.0 + ], + "total_reward": 0.964, + "elapsed_s": 0.11, + "error": null + }, + { + "task_id": "mumbai_bank_balance_medium", + "score": 0.955, + "success": true, + "steps": 3, + "rewards": [ + 0.6155, + 0.3395, + 0.0 + ], + "total_reward": 0.955, + "elapsed_s": 0.21, + "error": null + }, + { + "task_id": "bengaluru_irrops_hard", + "score": 0.8623, + "success": true, + "steps": 4, + "rewards": [ + 0.2, + 0.6623, + 0.0, + 0.0 + ], + "total_reward": 0.8623, + "elapsed_s": 0.49, + "error": null + } + ], + "timestamp": "2026-04-07T16:15:25.513158+00:00" + }, + { + "model": "Qwen/Qwen2.5-7B-Instruct", + "avg_score": 0.7706, + "tasks": [ + { + "task_id": "delhi_monsoon_recovery_easy", + "score": 0.9568, + "success": true, + "steps": 3, + "rewards": [ + 0.7244, + 0.2396, + -0.0072 + ], + "total_reward": 0.9568, + "elapsed_s": 9.69, + "error": null + }, + { + "task_id": "mumbai_bank_balance_medium", + "score": 0.955, + "success": true, + "steps": 3, + "rewards": [ + 0.6155, + 0.3395, + 0.0 + ], + "total_reward": 0.955, + "elapsed_s": 12.66, + "error": null + }, + { + "task_id": "bengaluru_irrops_hard", + "score": 0.4, + "success": false, + "steps": 4, + "rewards": [ + 0.15, + 0.25, + -0.05, + 0.05 + ], + "total_reward": 0.4, + "elapsed_s": 24.29, + "error": null + } + ], + "timestamp": "2026-04-07T16:16:12.317519+00:00" + }, + { + "model": "microsoft/Phi-3.5-mini-instruct", + "avg_score": 0.9271, + "tasks": [ + { + "task_id": "delhi_monsoon_recovery_easy", + "score": 0.964, + "success": true, + "steps": 3, + "rewards": [ + 0.7877, + 0.1763, + 0.0 + ], + "total_reward": 0.964, + "elapsed_s": 0.96, + "error": null + }, + { + "task_id": "mumbai_bank_balance_medium", + "score": 0.955, + "success": true, + "steps": 3, + "rewards": [ + 0.6155, + 0.3395, + 0.0 + ], + "total_reward": 0.955, + "elapsed_s": 1.06, + "error": null + }, + { + "task_id": "bengaluru_irrops_hard", + "score": 0.8623, + "success": true, + "steps": 4, + "rewards": [ + 0.2, + 0.6623, + 0.0, + 0.0 + ], + "total_reward": 0.8623, + "elapsed_s": 1.65, + "error": null + } + ], + "timestamp": "2026-04-07T16:16:16.177850+00:00" + }, + { + "model": "Qwen/Qwen2.5-72B-Instruct", + "avg_score": 0.3333, + "tasks": [ + { + "task_id": "delhi_monsoon_recovery_easy", + "score": 0.9999, + "success": true, + "steps": 3, + "rewards": [ + 0.9424, + -0.5424, + 0.5999 + ], + "total_reward": 0.9999, + "elapsed_s": 42.22, + "error": null + }, + { + "task_id": "mumbai_bank_balance_medium", + "score": 0.0, + "success": false, + "steps": 1, + "rewards": [ + 0.3 + ], + "total_reward": 0.3, + "elapsed_s": 40.2, + "error": "received 1011 (internal error) keepalive ping timeout; then sent 1011 (internal error) keepalive ping timeout" + }, + { + "task_id": "bengaluru_irrops_hard", + "score": 0.0, + "success": false, + "steps": 0, + "rewards": [], + "total_reward": 0, + "elapsed_s": 58.23, + "error": "no close frame received or sent" + } + ], + "timestamp": "2026-04-07T16:24:51.683634+00:00" + }, + { + "model": "mistralai/Mistral-Nemo-Instruct-2407", + "avg_score": 0.9271, + "tasks": [ + { + "task_id": "delhi_monsoon_recovery_easy", + "score": 0.964, + "success": true, + "steps": 3, + "rewards": [ + 0.7877, + 0.1763, + 0.0 + ], + "total_reward": 0.964, + "elapsed_s": 1.05, + "error": null + }, + { + "task_id": "mumbai_bank_balance_medium", + "score": 0.955, + "success": true, + "steps": 3, + "rewards": [ + 0.6155, + 0.3395, + 0.0 + ], + "total_reward": 0.955, + "elapsed_s": 1.07, + "error": null + }, + { + "task_id": "bengaluru_irrops_hard", + "score": 0.8623, + "success": true, + "steps": 4, + "rewards": [ + 0.2, + 0.6623, + 0.0, + 0.0 + ], + "total_reward": 0.8623, + "elapsed_s": 1.62, + "error": null + } + ], + "timestamp": "2026-04-07T16:24:55.618898+00:00" + } +] \ No newline at end of file diff --git a/scripts/benchmark_results/results_20260407_171222.json b/scripts/benchmark_results/results_20260407_171222.json new file mode 100644 index 0000000000000000000000000000000000000000..e4d6233a1cf6901192f366f2364854fe03a9f838 --- /dev/null +++ b/scripts/benchmark_results/results_20260407_171222.json @@ -0,0 +1,316 @@ +[ + { + "model": "heuristic-baseline", + "avg_score": 0.9136, + "tasks": [ + { + "task_id": "delhi_monsoon_recovery_easy", + "score": 0.9446, + "success": true, + "steps": 3, + "rewards": [ + 0.4, + 0.5446, + 0.0 + ], + "total_reward": 0.9446, + "elapsed_s": 0.1, + "error": null + }, + { + "task_id": "mumbai_bank_balance_medium", + "score": 0.9907, + "success": true, + "steps": 2, + "rewards": [ + 0.3, + 0.6907 + ], + "total_reward": 0.9907, + "elapsed_s": 0.14, + "error": null + }, + { + "task_id": "bengaluru_irrops_hard", + "score": 0.8615, + "success": true, + "steps": 4, + "rewards": [ + 0.15, + 0.6377, + 0.0738, + 0.0 + ], + "total_reward": 0.8615, + "elapsed_s": 0.55, + "error": null + }, + { + "task_id": "hyderabad_cargo_crunch_medium_hard", + "score": 0.8576, + "success": true, + "steps": 3, + "rewards": [ + 0.4, + 0.4576, + 0.0 + ], + "total_reward": 0.8576, + "elapsed_s": 0.03, + "error": null + } + ], + "timestamp": "2026-04-07T17:12:27.732518+00:00" + }, + { + "model": "Qwen/Qwen2.5-7B-Instruct", + "avg_score": 0.6351, + "tasks": [ + { + "task_id": "delhi_monsoon_recovery_easy", + "score": 0.9999, + "success": true, + "steps": 2, + "rewards": [ + 0.6518, + 0.3481 + ], + "total_reward": 0.9999, + "elapsed_s": 9.09, + "error": null + }, + { + "task_id": "mumbai_bank_balance_medium", + "score": 0.9907, + "success": true, + "steps": 3, + "rewards": [ + 0.3, + 0.1, + 0.5907 + ], + "total_reward": 0.9907, + "elapsed_s": 16.43, + "error": null + }, + { + "task_id": "bengaluru_irrops_hard", + "score": 0.3, + "success": false, + "steps": 4, + "rewards": [ + 0.3138, + -0.0638, + 0.15, + -0.1 + ], + "total_reward": 0.3, + "elapsed_s": 25.14, + "error": null + }, + { + "task_id": "hyderabad_cargo_crunch_medium_hard", + "score": 0.25, + "success": false, + "steps": 3, + "rewards": [ + 0.4, + -0.15, + 0.0 + ], + "total_reward": 0.25, + "elapsed_s": 8.69, + "error": null + } + ], + "timestamp": "2026-04-07T17:13:27.268662+00:00" + }, + { + "model": "microsoft/Phi-3.5-mini-instruct", + "avg_score": 0.9136, + "tasks": [ + { + "task_id": "delhi_monsoon_recovery_easy", + "score": 0.9446, + "success": true, + "steps": 3, + "rewards": [ + 0.4, + 0.5446, + 0.0 + ], + "total_reward": 0.9446, + "elapsed_s": 1.02, + "error": null + }, + { + "task_id": "mumbai_bank_balance_medium", + "score": 0.9907, + "success": true, + "steps": 2, + "rewards": [ + 0.3, + 0.6907 + ], + "total_reward": 0.9907, + "elapsed_s": 0.72, + "error": null + }, + { + "task_id": "bengaluru_irrops_hard", + "score": 0.8615, + "success": true, + "steps": 4, + "rewards": [ + 0.15, + 0.6377, + 0.0738, + 0.0 + ], + "total_reward": 0.8615, + "elapsed_s": 1.58, + "error": null + }, + { + "task_id": "hyderabad_cargo_crunch_medium_hard", + "score": 0.8576, + "success": true, + "steps": 3, + "rewards": [ + 0.4, + 0.4576, + 0.0 + ], + "total_reward": 0.8576, + "elapsed_s": 0.9, + "error": null + } + ], + "timestamp": "2026-04-07T17:13:31.677162+00:00" + }, + { + "model": "Qwen/Qwen2.5-72B-Instruct", + "avg_score": 0.449, + "tasks": [ + { + "task_id": "delhi_monsoon_recovery_easy", + "score": 0.4, + "success": false, + "steps": 3, + "rewards": [ + 0.4, + 0.5566, + -0.5566 + ], + "total_reward": 0.4, + "elapsed_s": 61.11, + "error": null + }, + { + "task_id": "mumbai_bank_balance_medium", + "score": 0.9959, + "success": true, + "steps": 3, + "rewards": [ + 0.2, + 0.2, + 0.5959 + ], + "total_reward": 0.9959, + "elapsed_s": 75.18, + "error": null + }, + { + "task_id": "bengaluru_irrops_hard", + "score": 0.0, + "success": false, + "steps": 2, + "rewards": [ + 0.2, + 0.574 + ], + "total_reward": 0.774, + "elapsed_s": 98.77, + "error": "received 1011 (internal error) keepalive ping timeout; then sent 1011 (internal error) keepalive ping timeout" + }, + { + "task_id": "hyderabad_cargo_crunch_medium_hard", + "score": 0.4, + "success": false, + "steps": 3, + "rewards": [ + 0.4, + 0.343, + -0.343 + ], + "total_reward": 0.4, + "elapsed_s": 38.31, + "error": null + } + ], + "timestamp": "2026-04-07T17:19:23.883503+00:00" + }, + { + "model": "mistralai/Mistral-Nemo-Instruct-2407", + "avg_score": 0.9136, + "tasks": [ + { + "task_id": "delhi_monsoon_recovery_easy", + "score": 0.9446, + "success": true, + "steps": 3, + "rewards": [ + 0.4, + 0.5446, + 0.0 + ], + "total_reward": 0.9446, + "elapsed_s": 1.14, + "error": null + }, + { + "task_id": "mumbai_bank_balance_medium", + "score": 0.9907, + "success": true, + "steps": 2, + "rewards": [ + 0.3, + 0.6907 + ], + "total_reward": 0.9907, + "elapsed_s": 0.73, + "error": null + }, + { + "task_id": "bengaluru_irrops_hard", + "score": 0.8615, + "success": true, + "steps": 4, + "rewards": [ + 0.15, + 0.6377, + 0.0738, + 0.0 + ], + "total_reward": 0.8615, + "elapsed_s": 1.67, + "error": null + }, + { + "task_id": "hyderabad_cargo_crunch_medium_hard", + "score": 0.8576, + "success": true, + "steps": 3, + "rewards": [ + 0.4, + 0.4576, + 0.0 + ], + "total_reward": 0.8576, + "elapsed_s": 0.87, + "error": null + } + ], + "timestamp": "2026-04-07T17:19:28.471491+00:00" + } +] \ No newline at end of file diff --git a/scripts/benchmark_results/summary_20260407_161519.txt b/scripts/benchmark_results/summary_20260407_161519.txt new file mode 100644 index 0000000000000000000000000000000000000000..b141588c1450ddcd39878d0a71a2165d619d67f0 --- /dev/null +++ b/scripts/benchmark_results/summary_20260407_161519.txt @@ -0,0 +1,9 @@ +ATC Benchmark Results — 20260407_161519 + +Model Avg Easy Med Hard +------------------------------------------------------------------------ +heuristic-baseline 0.9271 0.9640 0.9550 0.8623 +microsoft/Phi-3.5-mini-instruct 0.9271 0.9640 0.9550 0.8623 +mistralai/Mistral-Nemo-Instruct-2407 0.9271 0.9640 0.9550 0.8623 +Qwen/Qwen2.5-7B-Instruct 0.7706 0.9568 0.9550 0.4000 +Qwen/Qwen2.5-72B-Instruct 0.3333 0.9999 0.0000 0.0000 \ No newline at end of file diff --git a/scripts/benchmark_results/summary_20260407_171222.txt b/scripts/benchmark_results/summary_20260407_171222.txt new file mode 100644 index 0000000000000000000000000000000000000000..3aa165eb170994eea7b924b355e7796ea8ea8ea6 --- /dev/null +++ b/scripts/benchmark_results/summary_20260407_171222.txt @@ -0,0 +1,9 @@ +ATC Benchmark Results — 20260407_171222 + +Model Avg Easy Med Blr Hyd +---------------------------------------------------------------------------- +heuristic-baseline 0.9136 0.9446 0.9907 0.8615 0.8576 +microsoft/Phi-3.5-mini-instruct 0.9136 0.9446 0.9907 0.8615 0.8576 +mistralai/Mistral-Nemo-Instruct-2407 0.9136 0.9446 0.9907 0.8615 0.8576 +Qwen/Qwen2.5-7B-Instruct 0.6351 0.9999 0.9907 0.3000 0.2500 +Qwen/Qwen2.5-72B-Instruct 0.4490 0.4000 0.9959 0.0000 0.4000 \ No newline at end of file diff --git a/scripts/check_release_hygiene.sh b/scripts/check_release_hygiene.sh new file mode 100755 index 0000000000000000000000000000000000000000..6cf05c8fea72311356fa3011707138fac087e2ca --- /dev/null +++ b/scripts/check_release_hygiene.sh @@ -0,0 +1,34 @@ +#!/usr/bin/env bash +set -euo pipefail + +ROOT_DIR="${1:-.}" +cd "$ROOT_DIR" + +release_files=( + "inference.py" + "README.md" + "Dockerfile" + "scripts/validate-submission.sh" + "scripts/pre_submission_validate.sh" +) + +for file in "${release_files[@]}"; do + if [ ! -f "$file" ]; then + echo "FAILED -- missing required release file: $file" + exit 1 + fi + if rg -n -i "groq|GROQ_" "$file" >/dev/null; then + echo "FAILED -- Groq-only marker found in release file: $file" + rg -n -i "groq|GROQ_" "$file" + exit 1 + fi +done + +for blocked in test_groq_inference.py setup_groq_inference.sh GROQ_SETUP.md GROQ_INTEGRATION_SUMMARY.md; do + if [ -e "$blocked" ]; then + echo "FAILED -- Groq-only artifact present on release branch: $blocked" + exit 1 + fi +done + +echo "PASSED -- release hygiene check" diff --git a/scripts/deploy_hf_space.py b/scripts/deploy_hf_space.py new file mode 100755 index 0000000000000000000000000000000000000000..2ce3421abeef173476f09ea28d1326971592f1ed --- /dev/null +++ b/scripts/deploy_hf_space.py @@ -0,0 +1,209 @@ +#!/usr/bin/env python3 +"""Create/update a Hugging Face Docker Space and upload this repository.""" + +from __future__ import annotations + +import argparse +import os +from pathlib import Path +from typing import Iterable +from urllib.parse import urlparse + +from huggingface_hub import HfApi + +PLACEHOLDER_MARKERS = ("your-", "your_", "changeme", "example") + + +def is_real_value(value: str | None) -> bool: + if value is None: + return False + trimmed = value.strip() + if not trimmed: + return False + lowered = trimmed.lower() + return not any(marker in lowered for marker in PLACEHOLDER_MARKERS) + + +def parse_args() -> argparse.Namespace: + parser = argparse.ArgumentParser( + description="Create/update a HF Docker Space and upload the current repository." + ) + parser.add_argument( + "--space-id", + default=os.getenv("HF_SPACE_ID", ""), + help="Space id in the form '/' (or set HF_SPACE_ID).", + ) + parser.add_argument( + "--space-url", + default=os.getenv("HF_SPACE_PAGE_URL", ""), + help=( + "Optional Space page URL like " + "'https://huggingface.co/spaces//' " + "(or set HF_SPACE_PAGE_URL)." + ), + ) + parser.add_argument( + "--repo-dir", + default=".", + help="Repository folder to upload (default: current directory).", + ) + parser.add_argument( + "--private", + action="store_true", + help="Create the Space as private (default: public).", + ) + parser.add_argument( + "--skip-secrets", + action="store_true", + help="Skip setting API_BASE_URL, MODEL_NAME, HF_TOKEN as Space secrets.", + ) + parser.add_argument( + "--token", + default=os.getenv("HF_TOKEN", ""), + help="HF access token (or set HF_TOKEN).", + ) + return parser.parse_args() + + +def read_env_file(repo_dir: Path) -> dict[str, str]: + env_path = repo_dir / ".env" + if not env_path.exists(): + return {} + + parsed: dict[str, str] = {} + for raw in env_path.read_text(encoding="utf-8").splitlines(): + line = raw.strip() + if not line or line.startswith("#") or "=" not in line: + continue + key, value = line.split("=", 1) + parsed[key.strip()] = value.strip() + return parsed + + +def pick_var(name: str, env_values: dict[str, str]) -> str | None: + direct = os.getenv(name) + if is_real_value(direct): + return direct + fallback = env_values.get(name) + if is_real_value(fallback): + return fallback + return None + + +def set_required_space_secrets(api: HfApi, space_id: str, pairs: Iterable[tuple[str, str]]) -> None: + for key, value in pairs: + api.add_space_secret(repo_id=space_id, key=key, value=value) + print(f"[OK] Set Space secret: {key}") + + +def parse_space_id_from_page_url(space_url: str) -> str | None: + parsed = urlparse(space_url.strip()) + if parsed.netloc != "huggingface.co": + return None + parts = [part for part in parsed.path.split("/") if part] + if len(parts) < 3 or parts[0] != "spaces": + return None + return f"{parts[1]}/{parts[2]}" + + +def resolve_space_id(space_id: str, space_url: str) -> str: + if space_id and "/" in space_id: + return space_id + parsed = parse_space_id_from_page_url(space_url) if space_url else None + if parsed: + return parsed + raise SystemExit( + "HF space id missing/invalid. Use --space-id /, " + "set HF_SPACE_ID, or pass --space-url https://huggingface.co/spaces//." + ) + + +def to_runtime_space_url(space_id: str) -> str: + owner, name = space_id.split("/", 1) + normalized_name = name.replace("_", "-") + return f"https://{owner}-{normalized_name}.hf.space" + + +def main() -> int: + args = parse_args() + + space_id = resolve_space_id(args.space_id, args.space_url) + + if not is_real_value(args.token): + raise SystemExit("HF_TOKEN is missing or looks like a placeholder.") + + repo_dir = Path(args.repo_dir).resolve() + if not repo_dir.exists() or not repo_dir.is_dir(): + raise SystemExit(f"Repo directory not found: {repo_dir}") + + api = HfApi(token=args.token) + try: + who = api.whoami(cache=True) + actor = who.get("name") or who.get("fullname") or "unknown" + print(f"[OK] Authenticated to Hugging Face as: {actor}") + except Exception: + # Whoami rate-limited; proceed anyway — the token will be validated on next API call. + print("[WARN] Could not verify token via whoami (rate-limited). Proceeding...") + + api.create_repo( + repo_id=space_id, + repo_type="space", + space_sdk="docker", + private=args.private, + exist_ok=True, + ) + print(f"[OK] Space ready: https://huggingface.co/spaces/{space_id}") + + ignore_patterns = [ + ".git", + ".venv", + ".pytest_cache", + "__pycache__", + "*.pyc", + "*.pyo", + ".env", + ".env.*", + "*.env", + "*.env.*", + ".codex", + ".github", + "node_modules", + ".uv-cache", + ".mypy_cache", + ".ruff_cache", + "*.egg-info", + "wandb", + "outputs", + "unsloth_compiled_cache", + ] + + commit_info = api.upload_folder( + folder_path=str(repo_dir), + repo_id=space_id, + repo_type="space", + commit_message="chore: sync repository for validation", + ignore_patterns=ignore_patterns, + ) + print(f"[OK] Upload complete: {commit_info.oid}") + + if not args.skip_secrets: + env_values = read_env_file(repo_dir) + secret_pairs: list[tuple[str, str]] = [] + for key in ("API_BASE_URL", "MODEL_NAME", "HF_TOKEN"): + value = pick_var(key, env_values) + if value is not None: + secret_pairs.append((key, value)) + + if secret_pairs: + set_required_space_secrets(api, space_id, secret_pairs) + else: + print("[WARN] No non-placeholder runtime variables found for Space secrets.") + + space_url = to_runtime_space_url(space_id) + print(f"[NEXT] Ping URL: {space_url}") + print(f"[NEXT] Run: ./scripts/validate-submission.sh {space_url} {repo_dir}") + return 0 + + +if __name__ == "__main__": + raise SystemExit(main()) diff --git a/scripts/ping_env.py b/scripts/ping_env.py new file mode 100644 index 0000000000000000000000000000000000000000..247829a1da745f556d44bdb3bcbed538e8df49cb --- /dev/null +++ b/scripts/ping_env.py @@ -0,0 +1,30 @@ +"""Ping a Space or local server and verify reset() works.""" + +from __future__ import annotations + +import json +import sys + +import requests + + +def main() -> int: + if len(sys.argv) != 2: + print("Usage: python scripts/ping_env.py ") + return 1 + + base_url = sys.argv[1].rstrip("/") + health = requests.get(f"{base_url}/health", timeout=10) + print(f"health_status={health.status_code}") + health.raise_for_status() + + reset = requests.post(f"{base_url}/reset", json={"task_id": "delhi_monsoon_recovery_easy"}, timeout=20) + print(f"reset_status={reset.status_code}") + reset.raise_for_status() + payload = reset.json() + print(json.dumps({"task_id": payload["observation"]["task_id"], "done": payload["done"]}, indent=2)) + return 0 + + +if __name__ == "__main__": + raise SystemExit(main()) diff --git a/scripts/pre_submission_validate.sh b/scripts/pre_submission_validate.sh new file mode 100755 index 0000000000000000000000000000000000000000..af3256430b1b63d3564c3914c1d18f803d5f4426 --- /dev/null +++ b/scripts/pre_submission_validate.sh @@ -0,0 +1,26 @@ +#!/usr/bin/env bash +set -euo pipefail + +SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" +REPO_DIR_INPUT="${1:-$SCRIPT_DIR/..}" +REPO_DIR="$(cd "$REPO_DIR_INPUT" && pwd)" +PING_URL="${PING_URL:-}" + +echo "Step 0/5: Checking release branch hygiene" +bash "$REPO_DIR/scripts/check_release_hygiene.sh" "$REPO_DIR" + +if [ -n "$PING_URL" ]; then + echo "Step 1/5: Pinging deployed Space" + python "$REPO_DIR/scripts/ping_env.py" "$PING_URL" +fi + +echo "Step 2/5: Building Docker image" +docker build "$REPO_DIR" + +echo "Step 3/5: Running OpenEnv validation" +python -m openenv.cli validate "$REPO_DIR" + +echo "Step 4/5: Running task graders" +python "$REPO_DIR/scripts/run_graders.py" + +echo "Validation completed successfully." diff --git a/scripts/run_graders.py b/scripts/run_graders.py new file mode 100644 index 0000000000000000000000000000000000000000..75d15c26dc7436d83f8b35ec76989471bc8e0be7 --- /dev/null +++ b/scripts/run_graders.py @@ -0,0 +1,56 @@ +"""Enumerate tasks, run the graders, and assert strict score ranges.""" + +from __future__ import annotations + +import json +from pathlib import Path + +ROOT = Path(__file__).resolve().parent.parent +import sys + +if str(ROOT) not in sys.path: + sys.path.insert(0, str(ROOT)) + +from engine import simulate_plan +from graders import grade_task +from models import ATCOptimizationObservation +from planner import build_heuristic_plan, build_refined_plan +from tasks import ordered_tasks, render_task_briefing + + +def main() -> int: + rows = [] + for task in ordered_tasks(): + observation = ATCOptimizationObservation( + task_id=task.task_id, + task_title=task.title, + difficulty=task.difficulty, + airport=task.airport, + briefing=render_task_briefing(task), + objective=task.objective, + grading_focus=task.grading_focus, + flights=task.flights, + runways=task.runways, + steps_remaining=task.max_steps, + ) + seed_plan = build_heuristic_plan(observation) + proposal = build_refined_plan(observation, seed_plan=seed_plan) + outcome = simulate_plan(task, proposal) + grades = grade_task(task, outcome, proposal, "Deterministic two-step baseline.") + for grade in grades: + assert 0.0 < grade.score < 1.0, f"{grade.grader_name} out of strict range for {task.task_id}" + rows.append( + { + "task_id": task.task_id, + "difficulty": task.difficulty.value, + "seed_operational_score": simulate_plan(task, seed_plan).metrics.overall_score, + "operational_score": outcome.metrics.overall_score, + "grader_scores": {grade.grader_name: grade.score for grade in grades}, + } + ) + print(json.dumps(rows, indent=2)) + return 0 + + +if __name__ == "__main__": + raise SystemExit(main()) diff --git a/scripts/run_local_checklist.ps1 b/scripts/run_local_checklist.ps1 new file mode 100644 index 0000000000000000000000000000000000000000..b44904e7c8a5e3dbb93efeba93d2e0f97555d89a --- /dev/null +++ b/scripts/run_local_checklist.ps1 @@ -0,0 +1,151 @@ +$ErrorActionPreference = "Stop" + +Set-StrictMode -Version Latest + +$RepoRoot = Split-Path -Parent $PSScriptRoot +Set-Location $RepoRoot + +function Write-Step { + param([string]$Message) + Write-Host "" + Write-Host "==> $Message" -ForegroundColor Cyan +} + +function Invoke-CheckedCommand { + param( + [Parameter(Mandatory = $true)] + [string]$FilePath, + + [Parameter(ValueFromRemainingArguments = $true)] + [string[]]$Arguments + ) + + & $FilePath @Arguments + if ($LASTEXITCODE -ne 0) { + throw "Command failed: $FilePath $($Arguments -join ' ')" + } +} + +function Get-UvCommand { + $uv = Get-Command uv -ErrorAction SilentlyContinue + if ($null -ne $uv) { + return $uv.Source + } + + $candidate = Join-Path $env:APPDATA "Python\Python314\Scripts\uv.exe" + if (Test-Path $candidate) { + return $candidate + } + + return $null +} + +function Get-PythonCommand { + $venvPython = Join-Path $RepoRoot ".venv\Scripts\python.exe" + if (Test-Path $venvPython) { + return $venvPython + } + + $python = Get-Command python -ErrorAction SilentlyContinue + if ($null -ne $python) { + return $python.Source + } + + throw "Python was not found. Run uv sync first or install Python." +} + +function Wait-ForHealth { + param( + [string]$BaseUrl, + [int]$TimeoutSeconds = 30 + ) + + $deadline = (Get-Date).AddSeconds($TimeoutSeconds) + while ((Get-Date) -lt $deadline) { + try { + $response = Invoke-WebRequest -Uri "$BaseUrl/health" -UseBasicParsing -TimeoutSec 3 + if ($response.StatusCode -eq 200) { + return + } + } catch { + } + Start-Sleep -Milliseconds 500 + } + + throw "Timed out waiting for server health at $BaseUrl" +} + +$uv = Get-UvCommand +if ($null -ne $uv) { + Write-Step "Syncing local environment" + Invoke-CheckedCommand $uv "sync" "--frozen" "--extra" "dev" +} + +$python = Get-PythonCommand +$serverProcess = $null +$baseUrl = "http://127.0.0.1:8000" + +try { + Write-Step "OpenEnv validation" + Invoke-CheckedCommand $python "-m" "openenv.cli" "validate" "." + + Write-Step "Unit tests" + Invoke-CheckedCommand $python "-m" "pytest" "tests\test_env.py" + + Write-Step "Task graders" + Invoke-CheckedCommand $python "scripts\run_graders.py" + + Write-Step "Starting local server" + $serverProcess = Start-Process ` + -FilePath $python ` + -ArgumentList @("-m", "uvicorn", "server.app:app", "--host", "127.0.0.1", "--port", "8000") ` + -WorkingDirectory $RepoRoot ` + -PassThru + + Wait-ForHealth -BaseUrl $baseUrl + + Write-Step "Ping + reset smoke test" + Invoke-CheckedCommand $python "scripts\ping_env.py" $baseUrl + + Write-Step "Baseline inference" + Invoke-CheckedCommand $python "inference.py" + + $docker = Get-Command docker -ErrorAction SilentlyContinue + if ($null -eq $docker) { + Write-Host "" + Write-Host "Docker not found, skipping docker build." -ForegroundColor Yellow + } else { + $dockerAvailable = $false + $stdoutPath = [System.IO.Path]::GetTempFileName() + $stderrPath = [System.IO.Path]::GetTempFileName() + try { + $probe = Start-Process ` + -FilePath $docker.Source ` + -ArgumentList @("info") ` + -NoNewWindow ` + -Wait ` + -PassThru ` + -RedirectStandardOutput $stdoutPath ` + -RedirectStandardError $stderrPath + $dockerAvailable = ($probe.ExitCode -eq 0) + } finally { + Remove-Item -LiteralPath $stdoutPath -ErrorAction SilentlyContinue + Remove-Item -LiteralPath $stderrPath -ErrorAction SilentlyContinue + } + + if ($dockerAvailable) { + Write-Step "Docker build" + Invoke-CheckedCommand $docker.Source "build" "-t" "atc-openenv-local" "." + } else { + Write-Host "" + Write-Host "Docker engine is not available, skipping docker build." -ForegroundColor Yellow + } + } + + Write-Host "" + Write-Host "Local checklist completed successfully." -ForegroundColor Green +} finally { + if ($null -ne $serverProcess -and -not $serverProcess.HasExited) { + Stop-Process -Id $serverProcess.Id -Force + } +} diff --git a/scripts/smoke_reward_validation.py b/scripts/smoke_reward_validation.py new file mode 100644 index 0000000000000000000000000000000000000000..2c75388ccf3f2ea0a4599e1ed66d34f9ab66700f --- /dev/null +++ b/scripts/smoke_reward_validation.py @@ -0,0 +1,134 @@ +"""Five-episode smoke test for multi-agent reward signal validation. + +This script is intentionally lightweight and does not require torch/trl/unsloth. +It validates the critical data path before expensive GRPO runs: + +1) raw planner output (JSON) +2) parser round-trip (parse_aman_action / parse_dman_action) +3) reward component traces (ATC_REWARD_TRACE=1) +4) final environment composite/coordination outputs + +Usage: + ATC_REWARD_TRACE=1 /home/keshav/ats/.venv/bin/python scripts/smoke_reward_validation.py +""" + +from __future__ import annotations + +import json +import os +import sys +from pathlib import Path + +# Enable detailed component-level traces from reward_functions. +os.environ.setdefault("ATC_REWARD_TRACE", "1") +os.environ.setdefault("REWARD_FAILURE_MODE", "strict") + +ROOT = Path(__file__).resolve().parent.parent +if str(ROOT) not in sys.path: + sys.path.insert(0, str(ROOT)) + +from tasks import ordered_tasks +from multi_agent.environment import MultiAgentATCEnvironment +from multi_agent.generator import ChallengeGenerator +from multi_agent.supervisor import SupervisorAgent +from multi_agent.inference import _build_aman_heuristic, _build_dman_heuristic +from training.dataset import parse_aman_action, parse_dman_action +from training.reward_functions import aman_reward_fn, dman_reward_fn + + +def main() -> None: + seed = 42 + env = MultiAgentATCEnvironment(seed=seed) + generator = ChallengeGenerator(seed=seed) + supervisor = SupervisorAgent() + task_ids = [t.task_id for t in ordered_tasks()] + + print("=== 5-EPISODE SMOKE TEST: reward-signal validation ===") + + for ep in range(5): + task_id = task_ids[ep % len(task_ids)] + profile = supervisor.sample_profile(ep) + + base_task = env._catalog[task_id] + mutated_task, _ = generator.mutate(base_task) + + aman_obs, dman_obs = env.reset( + task_id=task_id, + episode_id=ep, + supervisor_profile=profile, + mutated_task=mutated_task, + ) + + # Heuristic proposals act as deterministic stand-in for model completions. + aman_action = _build_aman_heuristic(aman_obs) + dman_action = _build_dman_heuristic(dman_obs, env._state.atfm_deadlines) + + raw_aman = json.dumps( + { + "arrival_slots": [s.model_dump() for s in aman_action.arrival_slots], + "rationale": aman_action.rationale, + "emergency_yields": aman_action.emergency_yields, + "outgoing_messages": [m.model_dump(mode="json") for m in aman_action.outgoing_messages], + "commit": aman_action.commit, + } + ) + raw_dman = json.dumps( + { + "departure_slots": [s.model_dump() for s in dman_action.departure_slots], + "rationale": dman_action.rationale, + "atfm_compliance": dman_action.atfm_compliance, + "emergency_broadcasts": dman_action.emergency_broadcasts, + "outgoing_messages": [m.model_dump(mode="json") for m in dman_action.outgoing_messages], + "commit": dman_action.commit, + } + ) + + parsed_aman = parse_aman_action(raw_aman) + parsed_dman = parse_dman_action(raw_dman) + + if parsed_aman is None or parsed_dman is None: + raise RuntimeError(f"Parser failure at episode {ep}") + + _, _, _, done = env.step_bid(parsed_aman, parsed_dman) + if not done: + env.step_negotiate(parsed_aman, parsed_dman) + result = env.finalize() + + aman_slots_json = json.dumps([s.model_dump() for s in parsed_aman.arrival_slots]) + dman_slots_json = json.dumps([s.model_dump() for s in parsed_dman.departure_slots]) + atfm_json = json.dumps(env._state.atfm_deadlines) + + aman_r = aman_reward_fn( + [raw_aman], + task_id=[env._state.task.task_id], + supervisor_profile=[profile.value], + dman_slots_json=[dman_slots_json], + atfm_deadlines_json=[atfm_json], + )[0] + dman_r = dman_reward_fn( + [raw_dman], + task_id=[env._state.task.task_id], + supervisor_profile=[profile.value], + aman_slots_json=[aman_slots_json], + atfm_deadlines_json=[atfm_json], + )[0] + + print(f"\n--- EPISODE {ep} ---") + print(f"task={env._state.task.task_id} profile={profile.value}") + print(f"raw_aman_len={len(raw_aman)} raw_dman_len={len(raw_dman)}") + print( + f"parsed_aman_slots={len(parsed_aman.arrival_slots)} " + f"parsed_dman_slots={len(parsed_dman.departure_slots)}" + ) + print(f"aman_reward={aman_r} dman_reward={dman_r}") + print( + f"composite={result.composite_score} " + f"coord={result.per_role.coordination_score} " + f"conflicts={result.per_role.cross_lane_conflicts}" + ) + + print("\nSMOKE TEST PASSED: 5 episodes executed with reward traces and parsed actions.") + + +if __name__ == "__main__": + main() diff --git a/scripts/validate-submission.sh b/scripts/validate-submission.sh new file mode 100755 index 0000000000000000000000000000000000000000..5f6d52eced661b80d6ddb83f4cf24214598ccffe --- /dev/null +++ b/scripts/validate-submission.sh @@ -0,0 +1,198 @@ +#!/usr/bin/env bash +# +# validate-submission.sh — OpenEnv Submission Validator +# +# Checks that your HF Space is live, Docker image builds, and openenv validate passes. +# +# Prerequisites: +# - Docker: https://docs.docker.com/get-docker/ +# - openenv-core: pip install openenv-core +# - curl (usually pre-installed) +# +# Run: +# curl -fsSL https://raw.githubusercontent.com///main/scripts/validate-submission.sh | bash -s -- [repo_dir] +# +# Or download and run locally: +# chmod +x validate-submission.sh +# ./validate-submission.sh [repo_dir] +# +# Arguments: +# ping_url Your HuggingFace Space URL (e.g. https://your-space.hf.space) +# repo_dir Path to your repo (default: current directory) +# +# Examples: +# ./validate-submission.sh https://my-team.hf.space +# ./validate-submission.sh https://my-team.hf.space ./my-repo +# + +set -uo pipefail + +DOCKER_BUILD_TIMEOUT=600 +if [ -t 1 ]; then + RED='\033[0;31m' + GREEN='\033[0;32m' + YELLOW='\033[1;33m' + BOLD='\033[1m' + NC='\033[0m' +else + RED='' GREEN='' YELLOW='' BOLD='' NC='' +fi + +run_with_timeout() { + local secs="$1"; shift + if command -v timeout &>/dev/null; then + timeout "$secs" "$@" + elif command -v gtimeout &>/dev/null; then + gtimeout "$secs" "$@" + else + "$@" & + local pid=$! + ( sleep "$secs" && kill "$pid" 2>/dev/null ) & + local watcher=$! + wait "$pid" 2>/dev/null + local rc=$? + kill "$watcher" 2>/dev/null + wait "$watcher" 2>/dev/null + return $rc + fi +} + +portable_mktemp() { + local prefix="${1:-validate}" + mktemp "${TMPDIR:-/tmp}/${prefix}-XXXXXX" 2>/dev/null || mktemp +} + +CLEANUP_FILES=() +cleanup() { rm -f "${CLEANUP_FILES[@]+"${CLEANUP_FILES[@]}"}"; } +trap cleanup EXIT + +PING_URL="${1:-}" +REPO_DIR="${2:-.}" + +if [ -z "$PING_URL" ]; then + printf "Usage: %s [repo_dir]\n" "$0" + printf "\n" + printf " ping_url Your HuggingFace Space URL (e.g. https://your-space.hf.space)\n" + printf " repo_dir Path to your repo (default: current directory)\n" + exit 1 +fi + +if ! REPO_DIR="$(cd "$REPO_DIR" 2>/dev/null && pwd)"; then + printf "Error: directory '%s' not found\n" "${2:-.}" + exit 1 +fi +PING_URL="${PING_URL%/}" +export PING_URL +PASS=0 + +log() { printf "[%s] %b\n" "$(date -u +%H:%M:%S)" "$*"; } +pass() { log "${GREEN}PASSED${NC} -- $1"; PASS=$((PASS + 1)); } +fail() { log "${RED}FAILED${NC} -- $1"; } +hint() { printf " ${YELLOW}Hint:${NC} %b\n" "$1"; } +stop_at() { + printf "\n" + printf "${RED}${BOLD}Validation stopped at %s.${NC} Fix the above before continuing.\n" "$1" + exit 1 +} + +printf "\n" +printf "${BOLD}========================================${NC}\n" +printf "${BOLD} OpenEnv Submission Validator${NC}\n" +printf "${BOLD}========================================${NC}\n" +log "Repo: $REPO_DIR" +log "Ping URL: $PING_URL" +printf "\n" + +log "${BOLD}Step 0/4: Checking release branch hygiene${NC} ..." +if [ -x "$REPO_DIR/scripts/check_release_hygiene.sh" ]; then + if "$REPO_DIR/scripts/check_release_hygiene.sh" "$REPO_DIR" >/dev/null; then + pass "Release hygiene check passed" + else + fail "Release hygiene check failed" + stop_at "Step 0" + fi +else + fail "scripts/check_release_hygiene.sh not found or not executable" + stop_at "Step 0" +fi + +log "${BOLD}Step 1/4: Pinging HF Space${NC} ($PING_URL/reset) ..." + +CURL_OUTPUT=$(portable_mktemp "validate-curl") +CLEANUP_FILES+=("$CURL_OUTPUT") +HTTP_CODE=$(curl -s -o "$CURL_OUTPUT" -w "%{http_code}" -X POST \ + -H "Content-Type: application/json" -d '{}' \ + "$PING_URL/reset" --max-time 30 2>"$CURL_OUTPUT" || printf "000") + +if [ "$HTTP_CODE" = "200" ]; then + pass "HF Space is live and responds to /reset" +elif [ "$HTTP_CODE" = "000" ]; then + fail "HF Space not reachable (connection failed or timed out)" + hint "Check your network connection and that the Space is running." + hint "Try: curl -s -o /dev/null -w '%%{http_code}' -X POST $PING_URL/reset" + stop_at "Step 1" +else + fail "HF Space /reset returned HTTP $HTTP_CODE (expected 200)" + hint "Make sure your Space is running and the URL is correct." + hint "Try opening $PING_URL in your browser first." + stop_at "Step 1" +fi + +log "${BOLD}Step 2/4: Running docker build${NC} ..." + +if ! command -v docker &>/dev/null; then + fail "docker command not found" + hint "Install Docker: https://docs.docker.com/get-docker/" + stop_at "Step 2" +fi + +if [ -f "$REPO_DIR/Dockerfile" ]; then + DOCKER_CONTEXT="$REPO_DIR" +elif [ -f "$REPO_DIR/server/Dockerfile" ]; then + DOCKER_CONTEXT="$REPO_DIR/server" +else + fail "No Dockerfile found in repo root or server/ directory" + stop_at "Step 2" +fi + +log " Found Dockerfile in $DOCKER_CONTEXT" + +BUILD_OK=false +BUILD_OUTPUT=$(run_with_timeout "$DOCKER_BUILD_TIMEOUT" docker build "$DOCKER_CONTEXT" 2>&1) && BUILD_OK=true + +if [ "$BUILD_OK" = true ]; then + pass "Docker build succeeded" +else + fail "Docker build failed (timeout=${DOCKER_BUILD_TIMEOUT}s)" + printf "%s\n" "$BUILD_OUTPUT" | tail -20 + stop_at "Step 2" +fi + +log "${BOLD}Step 3/4: Running openenv validate${NC} ..." + +if ! command -v openenv &>/dev/null; then + fail "openenv command not found" + hint "Install it: pip install openenv-core" + stop_at "Step 3" +fi + +VALIDATE_OK=false +VALIDATE_OUTPUT=$(cd "$REPO_DIR" && openenv validate 2>&1) && VALIDATE_OK=true + +if [ "$VALIDATE_OK" = true ]; then + pass "openenv validate passed" + [ -n "$VALIDATE_OUTPUT" ] && log " $VALIDATE_OUTPUT" +else + fail "openenv validate failed" + printf "%s\n" "$VALIDATE_OUTPUT" + stop_at "Step 3" +fi + +printf "\n" +printf "${BOLD}========================================${NC}\n" +printf "${GREEN}${BOLD} All 4/4 checks passed!${NC}\n" +printf "${GREEN}${BOLD} Your submission is ready to submit.${NC}\n" +printf "${BOLD}========================================${NC}\n" +printf "\n" + +exit 0 diff --git a/server/__init__.py b/server/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..c8e68b91c1b66a19efeef3c170e48d163edc1ddb --- /dev/null +++ b/server/__init__.py @@ -0,0 +1 @@ +"""Server package for the ATC optimization environment.""" diff --git a/server/app.py b/server/app.py new file mode 100644 index 0000000000000000000000000000000000000000..d7d2e08a055af28ca2f24176bf18c7c14eadfb90 --- /dev/null +++ b/server/app.py @@ -0,0 +1,381 @@ +"""FastAPI application for the multi-agent ATC environment. + +Exposes: + OpenEnv standard surface (via create_app): + POST /reset + POST /step + GET /state + GET /health + + Extended multi-agent REST endpoints: + POST /multi_agent/reset + POST /multi_agent/step/bid + POST /multi_agent/finalize + POST /multi_agent/episode + GET /multi_agent/profiles + GET /multi_agent/status + + Demo (HF Space): + GET /demo/tasks + GET /demo/episode/stream (SSE visual events) + GET / (built ``space_frontend/dist``) + +Usage: + uvicorn server.app:app --host 0.0.0.0 --port 8000 +""" + +from __future__ import annotations + +import asyncio +import json +import queue +import threading +from pathlib import Path +from typing import Any, AsyncIterator, Dict, List, Literal, Optional + +from fastapi import HTTPException, Query +from fastapi.responses import FileResponse, StreamingResponse +from fastapi.staticfiles import StaticFiles +from pydantic import BaseModel + +try: + from openenv.core.env_server.http_server import create_app +except ImportError as exc: + raise ImportError( + "openenv is required. Install dependencies first." + ) from exc + +try: + from ..atc_env.models import ATCAction, ATCObservation + from ..atc_env.server.atc_environment import ATCEnvironment + from ..multi_agent.environment import MultiAgentATCEnvironment + from ..multi_agent.generator import ChallengeGenerator + from ..multi_agent.supervisor import SupervisorAgent + from ..domains import get_all_domain_tasks + from ..multi_agent.inference import ( + API_BASE_URL, + HF_TOKEN, + MODEL_NAME, + run_domain_episode, + run_episode, + ) + from ..multi_agent.models import ( + AMANAction, DMANAction, MultiAgentEpisodeResult, SupervisorProfileName, + ) + from ..tasks import task_catalog + from .demo_tasks import VISUAL_DEMO_TASKS +except ImportError: + from atc_env.models import ATCAction, ATCObservation + from atc_env.server.atc_environment import ATCEnvironment + from domains import get_all_domain_tasks + from multi_agent.environment import MultiAgentATCEnvironment + from multi_agent.generator import ChallengeGenerator + from multi_agent.supervisor import SupervisorAgent + from multi_agent.inference import ( + API_BASE_URL, + HF_TOKEN, + MODEL_NAME, + run_domain_episode, + run_episode, + ) + from multi_agent.models import ( + AMANAction, DMANAction, MultiAgentEpisodeResult, SupervisorProfileName, + ) + from server.demo_tasks import VISUAL_DEMO_TASKS + from tasks import task_catalog + +# Shared multi-agent singletons (serialised via lock — one env per server process) +_ma_env = MultiAgentATCEnvironment(seed=0) +_ma_generator = ChallengeGenerator(seed=0) +_ma_supervisor = SupervisorAgent() +_MA_LOCK = asyncio.Lock() + +app = create_app( + ATCEnvironment, + ATCAction, + ATCObservation, + env_name="atc_env", + max_concurrent_envs=8, +) + + +# ── Multi-agent REST endpoints ───────────────────────────────────────────────── + +class MAResetRequest(BaseModel): + task_id: str + episode_id: int = 0 + supervisor_profile: Optional[str] = None + + +class MABidRequest(BaseModel): + aman_action: Dict[str, Any] + dman_action: Dict[str, Any] + + +class MAEpisodeRequest(BaseModel): + task_id: str + episode_id: int = 0 + use_generator: bool = True + use_heuristic: bool = True + + +@app.post("/multi_agent/reset", tags=["multi-agent"]) +async def ma_reset(req: MAResetRequest) -> Dict[str, Any]: + """Reset multi-agent environment, return AMAN and DMAN observations.""" + async with _MA_LOCK: + try: + profile = ( + SupervisorProfileName(req.supervisor_profile) + if req.supervisor_profile + else None + ) + aman_obs, dman_obs = await asyncio.to_thread( + _ma_env.reset, + task_id=req.task_id, + episode_id=req.episode_id, + supervisor_profile=profile, + ) + return { + "aman_observation": json.loads(aman_obs.model_dump_json()), + "dman_observation": json.loads(dman_obs.model_dump_json()), + "atfm_deadlines": _ma_env._state.atfm_deadlines, + "round_number": _ma_env._state.round_number, + } + except Exception as exc: + raise HTTPException(status_code=400, detail=str(exc)) from exc + + +@app.post("/multi_agent/step/bid", tags=["multi-agent"]) +async def ma_step_bid(req: MABidRequest) -> Dict[str, Any]: + """Submit BID-round actions from both agents.""" + async with _MA_LOCK: + try: + aman_action = AMANAction.model_validate(req.aman_action) + dman_action = DMANAction.model_validate(req.dman_action) + aman_obs2, dman_obs2, reward, done = await asyncio.to_thread( + _ma_env.step_bid, aman_action, dman_action + ) + return { + "aman_observation": json.loads(aman_obs2.model_dump_json()), + "dman_observation": json.loads(dman_obs2.model_dump_json()), + "partial_reward": reward, + "done": done, + "round_number": _ma_env._state.round_number, + } + except Exception as exc: + raise HTTPException(status_code=400, detail=str(exc)) from exc + + +@app.post("/multi_agent/finalize", tags=["multi-agent"]) +async def ma_finalize() -> Dict[str, Any]: + """Finalize episode, return full scored result.""" + async with _MA_LOCK: + try: + result: MultiAgentEpisodeResult = await asyncio.to_thread(_ma_env.finalize) + return json.loads(result.model_dump_json()) + except Exception as exc: + raise HTTPException(status_code=500, detail=str(exc)) from exc + + +@app.post("/multi_agent/episode", tags=["multi-agent"]) +async def ma_run_episode(req: MAEpisodeRequest) -> Dict[str, Any]: + """Run a full multi-agent episode with heuristic or LLM agents.""" + async with _MA_LOCK: + try: + result = await asyncio.to_thread( + run_episode, + task_id=req.task_id, + client=None, + env=_ma_env, + generator=_ma_generator if req.use_generator else None, + supervisor=_ma_supervisor, + episode_id=req.episode_id, + use_generator=req.use_generator, + ) + return result + except Exception as exc: + raise HTTPException(status_code=500, detail=str(exc)) from exc + + +@app.get("/multi_agent/profiles", tags=["multi-agent"]) +async def ma_profiles() -> List[str]: + """List available supervisor preference profiles.""" + return [p.value for p in SupervisorProfileName] + + +@app.get("/multi_agent/status", tags=["multi-agent"]) +async def ma_status() -> Dict[str, Any]: + """Current multi-agent environment state summary.""" + state = _ma_env._state + if state is None: + return {"initialized": False} + return { + "initialized": True, + "task_id": state.task.task_id if state.task else None, + "round_number": state.round_number, + "aman_slots_count": len(state.aman_slots), + "dman_slots_count": len(state.dman_slots), + "generator_difficulty": _ma_generator.difficulty_level, + "supervisor_profile": ( + state.supervisor_profile.value if state.supervisor_profile else None + ), + } + + +# ── HF Space demo: static UI + visual episode stream ────────────────────────── + +_SPACE_DIST = Path(__file__).resolve().parent.parent / "space_frontend" / "dist" +_SPACE_INDEX = _SPACE_DIST / "index.html" +_SPACE_ASSETS = _SPACE_DIST / "assets" + + +def _validate_stream_task(mode: str, task_id: str) -> None: + if mode == "domain": + if task_id not in get_all_domain_tasks(): + raise HTTPException( + status_code=400, + detail=f"Unknown domain task_id={task_id!r}", + ) + elif mode == "atc": + if task_id not in task_catalog(): + raise HTTPException( + status_code=400, + detail=f"Unknown ATC task_id={task_id!r}", + ) + else: + raise HTTPException(status_code=400, detail="mode must be 'atc' or 'domain'") + + +async def _sse_episode_gen( + task_id: str, + mode: str, + visual_profile: str, + episode_id: int, + use_generator: bool, + use_llm: bool, + model_override: Optional[str] = None, +) -> AsyncIterator[str]: + q: queue.Queue = queue.Queue() + + def worker() -> None: + try: + from openai import OpenAI + + stream_env = MultiAgentATCEnvironment(seed=episode_id) + stream_gen = ChallengeGenerator(seed=episode_id) if use_generator else None + supervisor = SupervisorAgent() + want_llm = bool(use_llm and HF_TOKEN) + client = ( + OpenAI(base_url=API_BASE_URL, api_key=HF_TOKEN) + if want_llm + else None + ) + + def sink(ev: Dict[str, Any]) -> None: + q.put(("ev", ev)) + + effective_model = model_override or MODEL_NAME + if mode == "domain": + run_domain_episode( + domain_task_id=task_id, + client=client, + env=stream_env, + supervisor=supervisor, + episode_id=episode_id, + model_name=effective_model, + visual_sink=sink, + visual_profile=visual_profile, + ) + else: + run_episode( + task_id=task_id, + client=client, + env=stream_env, + generator=stream_gen, + supervisor=supervisor, + episode_id=episode_id, + use_generator=use_generator, + model_name=effective_model, + visual_sink=sink, + visual_profile=visual_profile, + ) + except Exception as exc: + q.put(("ev", {"type": "error", "detail": str(exc)})) + finally: + q.put(("done", None)) + + threading.Thread(target=worker, daemon=True).start() + + while True: + kind, payload = await asyncio.to_thread(q.get) + if kind == "done": + break + yield f"data: {json.dumps(payload, default=str)}\n\n" + + +@app.get("/demo/tasks", tags=["demo"]) +async def demo_tasks() -> Dict[str, Any]: + """Curated tasks for the Space picker (tier + ``visual_scene_key``).""" + return {"tasks": list(VISUAL_DEMO_TASKS)} + + +@app.get("/demo/episode/stream", tags=["demo"]) +async def demo_episode_stream( + task_id: str = Query(..., min_length=1), + mode: Literal["atc", "domain"] = Query("atc"), + visual_profile: Literal["atc", "icu"] = Query("atc"), + episode_id: int = Query(0, ge=0, le=1_000_000), + use_generator: bool = Query(True), + use_llm: bool = Query(False), + model: Optional[str] = Query(None, description="HuggingFace model ID override"), +) -> StreamingResponse: + """SSE stream of visual events for one episode (``run_episode`` / ``run_domain_episode``).""" + _validate_stream_task(mode, task_id) + prof = visual_profile + if mode == "domain" and visual_profile == "atc": + prof = "icu" + + return StreamingResponse( + _sse_episode_gen( + task_id=task_id, + mode=mode, + visual_profile=prof, + episode_id=episode_id, + use_generator=use_generator, + use_llm=use_llm, + model_override=model or None, + ), + media_type="text/event-stream", + headers={ + "Cache-Control": "no-cache", + "Connection": "keep-alive", + "X-Accel-Buffering": "no", + }, + ) + + +if _SPACE_ASSETS.is_dir(): + app.mount( + "/assets", + StaticFiles(directory=str(_SPACE_ASSETS)), + name="space_frontend_assets", + ) + + +@app.get("/", tags=["demo"], include_in_schema=False) +async def space_frontend_index() -> FileResponse: + if not _SPACE_INDEX.is_file(): + raise HTTPException( + status_code=503, + detail="space_frontend not built (run npm run build in space_frontend/)", + ) + return FileResponse(str(_SPACE_INDEX)) + + +def main(host: str = "0.0.0.0", port: int = 8000) -> None: + import uvicorn + uvicorn.run(app, host=host, port=port) + + +if __name__ == "__main__": + main() diff --git a/server/demo_tasks.py b/server/demo_tasks.py new file mode 100644 index 0000000000000000000000000000000000000000..5a0ab484d1773318a4da3c4c05aafc878b0c18fe --- /dev/null +++ b/server/demo_tasks.py @@ -0,0 +1,157 @@ +"""Curated demo tasks for the Space UI (picker + ``visual_scene_key`` for scenes).""" + +from __future__ import annotations + +from typing import Any, Dict, List + +from domains import get_all_domain_tasks +from multi_agent.visual_events import serialize_task_snapshot +from tasks import task_catalog + +# Keep in sync with ``space_frontend/src/tasks/registry.ts`` scene keys. +_RAW_VISUAL_DEMO_TASKS: List[Dict[str, Any]] = [ + { + "mode": "atc", + "task_id": "bhopal_solo_dep_t0", + "tier": 0, + "visual_scene_key": "bhopal", + "label": "Bhopal Solo Departure", + "description": "Single runway, departures only. The simplest scheduling challenge—learn DMAN slot assignment basics.", + "difficulty": "Introductory", + "flight_count": 4, + "runway_count": 1, + }, + { + "mode": "atc", + "task_id": "vadodara_mixed_pair_t0", + "tier": 0, + "visual_scene_key": "vadodara", + "label": "Vadodara Mixed Pair", + "description": "Arrivals and departures share one runway. AMAN and DMAN must negotiate runway access.", + "difficulty": "Introductory", + "flight_count": 6, + "runway_count": 1, + }, + { + "mode": "atc", + "task_id": "pune_wake_intro_t1", + "tier": 1, + "visual_scene_key": "pune", + "label": "Pune Wake Turbulence", + "description": "Heavy aircraft require enforced ICAO wake separation. Violate it and scores collapse.", + "difficulty": "Easy", + "flight_count": 8, + "runway_count": 1, + }, + { + "mode": "atc", + "task_id": "nagpur_dual_runway_t1", + "tier": 1, + "visual_scene_key": "nagpur", + "label": "Nagpur Dual Runway", + "description": "Two independent runways with crossing taxiway constraints. Parallel scheduling unlocks throughput.", + "difficulty": "Easy", + "flight_count": 8, + "runway_count": 2, + }, + { + "mode": "atc", + "task_id": "delhi_monsoon_recovery_easy", + "tier": 2, + "visual_scene_key": "delhi", + "label": "Delhi Monsoon Recovery", + "description": "Monsoon weather disrupts the original plan. Recover sequence under ATFM constraints.", + "difficulty": "Medium", + "flight_count": 10, + "runway_count": 2, + }, + { + "mode": "atc", + "task_id": "mumbai_bank_balance_medium", + "tier": 3, + "visual_scene_key": "mumbai", + "label": "Mumbai Bank Balance", + "description": "India's busiest hub: banked arrivals over departures. Balance throughput or face cascade delays.", + "difficulty": "Hard", + "flight_count": 12, + "runway_count": 2, + }, + { + "mode": "atc", + "task_id": "hyderabad_cargo_crunch_medium_hard", + "tier": 2, + "visual_scene_key": "hyderabad", + "label": "Hyderabad Cargo Crunch", + "description": "Cargo freighters hold strict ATFM slots; wake turbulence from heavies threatens pax aircraft.", + "difficulty": "Medium", + "flight_count": 10, + "runway_count": 2, + }, + { + "mode": "atc", + "task_id": "bengaluru_irrops_hard", + "tier": 4, + "visual_scene_key": "bengaluru", + "label": "Bengaluru IRROPS", + "description": "Technical holds, diversion inbounds, and runway incursion risk. Expert-level coordination required.", + "difficulty": "Expert", + "flight_count": 14, + "runway_count": 3, + }, + { + "mode": "domain", + "task_id": "icu_normal_day", + "tier": 0, + "visual_scene_key": "icu", + "label": "ICU Normal Day", + "description": "ADAPT maps ATC reasoning to ICU bed management. Routine patient scheduling on a standard shift.", + "difficulty": "Introductory", + "flight_count": 8, + "runway_count": 4, + }, + { + "mode": "domain", + "task_id": "icu_flu_surge", + "tier": 1, + "visual_scene_key": "icu", + "label": "ICU Flu Surge", + "description": "Flu season surge doubles patient volume. Critical care beds overflow—prioritize triage.", + "difficulty": "Medium", + "flight_count": 12, + "runway_count": 4, + }, + { + "mode": "domain", + "task_id": "icu_mass_casualty", + "tier": 2, + "visual_scene_key": "icu", + "label": "ICU Mass Casualty", + "description": "Mass casualty incident. Agents must prevent catastrophic failure by coordinating across all beds.", + "difficulty": "Hard", + "flight_count": 16, + "runway_count": 4, + }, +] + + +def _attach_task_previews(rows: List[Dict[str, Any]]) -> List[Dict[str, Any]]: + """Attach real runway/bed + flight/patient rows for idle canvas preview.""" + catalog = task_catalog() + domain_map = get_all_domain_tasks() + out: List[Dict[str, Any]] = [] + for row in rows: + tid = row["task_id"] + tdef = domain_map.get(tid) if row.get("mode") == "domain" else catalog.get(tid) + preview = serialize_task_snapshot(tdef) if tdef is not None else None + if preview is not None: + row = { + **row, + "flight_count": len(tdef.flights), + "runway_count": len(tdef.runways), + "task_preview": preview, + } + out.append(row) + return out + + +VISUAL_DEMO_TASKS: List[Dict[str, Any]] = _attach_task_previews(_RAW_VISUAL_DEMO_TASKS) diff --git a/space_frontend/index.html b/space_frontend/index.html new file mode 100644 index 0000000000000000000000000000000000000000..3236516b1bf3697fd28eaf94e631786c733d9ab3 --- /dev/null +++ b/space_frontend/index.html @@ -0,0 +1,18 @@ + + + + + + ADAPT · OpenEnv + + + + + +
+ + + diff --git a/space_frontend/package-lock.json b/space_frontend/package-lock.json new file mode 100644 index 0000000000000000000000000000000000000000..401bb527e063e437b715c776c46eedc5839950b0 --- /dev/null +++ b/space_frontend/package-lock.json @@ -0,0 +1,1846 @@ +{ + "name": "atc-adapt-space-ui", + "version": "1.0.0", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "atc-adapt-space-ui", + "version": "1.0.0", + "dependencies": { + "react": "^18.3.1", + "react-dom": "^18.3.1" + }, + "devDependencies": { + "@types/react": "^18.3.12", + "@types/react-dom": "^18.3.1", + "@vitejs/plugin-react": "^4.3.4", + "typescript": "~5.6.3", + "vite": "^6.0.3" + } + }, + "node_modules/@babel/code-frame": { + "version": "7.29.0", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.29.0.tgz", + "integrity": "sha512-9NhCeYjq9+3uxgdtp20LSiJXJvN0FeCtNGpJxuMFZ1Kv3cWUNb6DOhJwUvcVCzKGR66cw4njwM6hrJLqgOwbcw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-validator-identifier": "^7.28.5", + "js-tokens": "^4.0.0", + "picocolors": "^1.1.1" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/compat-data": { + "version": "7.29.0", + "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.29.0.tgz", + "integrity": "sha512-T1NCJqT/j9+cn8fvkt7jtwbLBfLC/1y1c7NtCeXFRgzGTsafi68MRv8yzkYSapBnFA6L3U2VSc02ciDzoAJhJg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/core": { + "version": "7.29.0", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.29.0.tgz", + "integrity": "sha512-CGOfOJqWjg2qW/Mb6zNsDm+u5vFQ8DxXfbM09z69p5Z6+mE1ikP2jUXw+j42Pf1XTYED2Rni5f95npYeuwMDQA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/code-frame": "^7.29.0", + "@babel/generator": "^7.29.0", + "@babel/helper-compilation-targets": "^7.28.6", + "@babel/helper-module-transforms": "^7.28.6", + "@babel/helpers": "^7.28.6", + "@babel/parser": "^7.29.0", + "@babel/template": "^7.28.6", + "@babel/traverse": "^7.29.0", + "@babel/types": "^7.29.0", + "@jridgewell/remapping": "^2.3.5", + "convert-source-map": "^2.0.0", + "debug": "^4.1.0", + "gensync": "^1.0.0-beta.2", + "json5": "^2.2.3", + "semver": "^6.3.1" + }, + "engines": { + "node": ">=6.9.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/babel" + } + }, + "node_modules/@babel/generator": { + "version": "7.29.1", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.29.1.tgz", + "integrity": "sha512-qsaF+9Qcm2Qv8SRIMMscAvG4O3lJ0F1GuMo5HR/Bp02LopNgnZBC/EkbevHFeGs4ls/oPz9v+Bsmzbkbe+0dUw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/parser": "^7.29.0", + "@babel/types": "^7.29.0", + "@jridgewell/gen-mapping": "^0.3.12", + "@jridgewell/trace-mapping": "^0.3.28", + "jsesc": "^3.0.2" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-compilation-targets": { + "version": "7.28.6", + "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.28.6.tgz", + "integrity": "sha512-JYtls3hqi15fcx5GaSNL7SCTJ2MNmjrkHXg4FSpOA/grxK8KwyZ5bubHsCq8FXCkua6xhuaaBit+3b7+VZRfcA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/compat-data": "^7.28.6", + "@babel/helper-validator-option": "^7.27.1", + "browserslist": "^4.24.0", + "lru-cache": "^5.1.1", + "semver": "^6.3.1" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-globals": { + "version": "7.28.0", + "resolved": "https://registry.npmjs.org/@babel/helper-globals/-/helper-globals-7.28.0.tgz", + "integrity": "sha512-+W6cISkXFa1jXsDEdYA8HeevQT/FULhxzR99pxphltZcVaugps53THCeiWA8SguxxpSp3gKPiuYfSWopkLQ4hw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-module-imports": { + "version": "7.28.6", + "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.28.6.tgz", + "integrity": "sha512-l5XkZK7r7wa9LucGw9LwZyyCUscb4x37JWTPz7swwFE/0FMQAGpiWUZn8u9DzkSBWEcK25jmvubfpw2dnAMdbw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/traverse": "^7.28.6", + "@babel/types": "^7.28.6" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-module-transforms": { + "version": "7.28.6", + "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.28.6.tgz", + "integrity": "sha512-67oXFAYr2cDLDVGLXTEABjdBJZ6drElUSI7WKp70NrpyISso3plG9SAGEF6y7zbha/wOzUByWWTJvEDVNIUGcA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-module-imports": "^7.28.6", + "@babel/helper-validator-identifier": "^7.28.5", + "@babel/traverse": "^7.28.6" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" + } + }, + "node_modules/@babel/helper-plugin-utils": { + "version": "7.28.6", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.28.6.tgz", + "integrity": "sha512-S9gzZ/bz83GRysI7gAD4wPT/AI3uCnY+9xn+Mx/KPs2JwHJIz1W8PZkg2cqyt3RNOBM8ejcXhV6y8Og7ly/Dug==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-string-parser": { + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.27.1.tgz", + "integrity": "sha512-qMlSxKbpRlAridDExk92nSobyDdpPijUq2DW6oDnUqd0iOGxmQjyqhMIihI9+zv4LPyZdRje2cavWPbCbWm3eA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-validator-identifier": { + "version": "7.28.5", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.28.5.tgz", + "integrity": "sha512-qSs4ifwzKJSV39ucNjsvc6WVHs6b7S03sOh2OcHF9UHfVPqWWALUsNUVzhSBiItjRZoLHx7nIarVjqKVusUZ1Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-validator-option": { + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.27.1.tgz", + "integrity": "sha512-YvjJow9FxbhFFKDSuFnVCe2WxXk1zWc22fFePVNEaWJEu8IrZVlda6N0uHwzZrUM1il7NC9Mlp4MaJYbYd9JSg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helpers": { + "version": "7.29.2", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.29.2.tgz", + "integrity": "sha512-HoGuUs4sCZNezVEKdVcwqmZN8GoHirLUcLaYVNBK2J0DadGtdcqgr3BCbvH8+XUo4NGjNl3VOtSjEKNzqfFgKw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/template": "^7.28.6", + "@babel/types": "^7.29.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/parser": { + "version": "7.29.2", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.29.2.tgz", + "integrity": "sha512-4GgRzy/+fsBa72/RZVJmGKPmZu9Byn8o4MoLpmNe1m8ZfYnz5emHLQz3U4gLud6Zwl0RZIcgiLD7Uq7ySFuDLA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/types": "^7.29.0" + }, + "bin": { + "parser": "bin/babel-parser.js" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@babel/plugin-transform-react-jsx-self": { + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-jsx-self/-/plugin-transform-react-jsx-self-7.27.1.tgz", + "integrity": "sha512-6UzkCs+ejGdZ5mFFC/OCUrv028ab2fp1znZmCZjAOBKiBK2jXD1O+BPSfX8X2qjJ75fZBMSnQn3Rq2mrBJK2mw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.27.1" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-react-jsx-source": { + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-jsx-source/-/plugin-transform-react-jsx-source-7.27.1.tgz", + "integrity": "sha512-zbwoTsBruTeKB9hSq73ha66iFeJHuaFkUbwvqElnygoNbj/jHRsSeokowZFN3CZ64IvEqcmmkVe89OPXc7ldAw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.27.1" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/template": { + "version": "7.28.6", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.28.6.tgz", + "integrity": "sha512-YA6Ma2KsCdGb+WC6UpBVFJGXL58MDA6oyONbjyF/+5sBgxY/dwkhLogbMT2GXXyU84/IhRw/2D1Os1B/giz+BQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/code-frame": "^7.28.6", + "@babel/parser": "^7.28.6", + "@babel/types": "^7.28.6" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/traverse": { + "version": "7.29.0", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.29.0.tgz", + "integrity": "sha512-4HPiQr0X7+waHfyXPZpWPfWL/J7dcN1mx9gL6WdQVMbPnF3+ZhSMs8tCxN7oHddJE9fhNE7+lxdnlyemKfJRuA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/code-frame": "^7.29.0", + "@babel/generator": "^7.29.0", + "@babel/helper-globals": "^7.28.0", + "@babel/parser": "^7.29.0", + "@babel/template": "^7.28.6", + "@babel/types": "^7.29.0", + "debug": "^4.3.1" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/types": { + "version": "7.29.0", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.29.0.tgz", + "integrity": "sha512-LwdZHpScM4Qz8Xw2iKSzS+cfglZzJGvofQICy7W7v4caru4EaAmyUuO6BGrbyQ2mYV11W0U8j5mBhd14dd3B0A==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-string-parser": "^7.27.1", + "@babel/helper-validator-identifier": "^7.28.5" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@esbuild/aix-ppc64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.25.12.tgz", + "integrity": "sha512-Hhmwd6CInZ3dwpuGTF8fJG6yoWmsToE+vYgD4nytZVxcu1ulHpUQRAB1UJ8+N1Am3Mz4+xOByoQoSZf4D+CpkA==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "aix" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/android-arm": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.25.12.tgz", + "integrity": "sha512-VJ+sKvNA/GE7Ccacc9Cha7bpS8nyzVv0jdVgwNDaR4gDMC/2TTRc33Ip8qrNYUcpkOHUT5OZ0bUcNNVZQ9RLlg==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/android-arm64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.25.12.tgz", + "integrity": "sha512-6AAmLG7zwD1Z159jCKPvAxZd4y/VTO0VkprYy+3N2FtJ8+BQWFXU+OxARIwA46c5tdD9SsKGZ/1ocqBS/gAKHg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/android-x64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.25.12.tgz", + "integrity": "sha512-5jbb+2hhDHx5phYR2By8GTWEzn6I9UqR11Kwf22iKbNpYrsmRB18aX/9ivc5cabcUiAT/wM+YIZ6SG9QO6a8kg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/darwin-arm64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.25.12.tgz", + "integrity": "sha512-N3zl+lxHCifgIlcMUP5016ESkeQjLj/959RxxNYIthIg+CQHInujFuXeWbWMgnTo4cp5XVHqFPmpyu9J65C1Yg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/darwin-x64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.25.12.tgz", + "integrity": "sha512-HQ9ka4Kx21qHXwtlTUVbKJOAnmG1ipXhdWTmNXiPzPfWKpXqASVcWdnf2bnL73wgjNrFXAa3yYvBSd9pzfEIpA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/freebsd-arm64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.25.12.tgz", + "integrity": "sha512-gA0Bx759+7Jve03K1S0vkOu5Lg/85dou3EseOGUes8flVOGxbhDDh/iZaoek11Y8mtyKPGF3vP8XhnkDEAmzeg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/freebsd-x64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.25.12.tgz", + "integrity": "sha512-TGbO26Yw2xsHzxtbVFGEXBFH0FRAP7gtcPE7P5yP7wGy7cXK2oO7RyOhL5NLiqTlBh47XhmIUXuGciXEqYFfBQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-arm": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.25.12.tgz", + "integrity": "sha512-lPDGyC1JPDou8kGcywY0YILzWlhhnRjdof3UlcoqYmS9El818LLfJJc3PXXgZHrHCAKs/Z2SeZtDJr5MrkxtOw==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-arm64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.25.12.tgz", + "integrity": "sha512-8bwX7a8FghIgrupcxb4aUmYDLp8pX06rGh5HqDT7bB+8Rdells6mHvrFHHW2JAOPZUbnjUpKTLg6ECyzvas2AQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-ia32": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.25.12.tgz", + "integrity": "sha512-0y9KrdVnbMM2/vG8KfU0byhUN+EFCny9+8g202gYqSSVMonbsCfLjUO+rCci7pM0WBEtz+oK/PIwHkzxkyharA==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-loong64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.25.12.tgz", + "integrity": "sha512-h///Lr5a9rib/v1GGqXVGzjL4TMvVTv+s1DPoxQdz7l/AYv6LDSxdIwzxkrPW438oUXiDtwM10o9PmwS/6Z0Ng==", + "cpu": [ + "loong64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-mips64el": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.25.12.tgz", + "integrity": "sha512-iyRrM1Pzy9GFMDLsXn1iHUm18nhKnNMWscjmp4+hpafcZjrr2WbT//d20xaGljXDBYHqRcl8HnxbX6uaA/eGVw==", + "cpu": [ + "mips64el" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-ppc64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.25.12.tgz", + "integrity": "sha512-9meM/lRXxMi5PSUqEXRCtVjEZBGwB7P/D4yT8UG/mwIdze2aV4Vo6U5gD3+RsoHXKkHCfSxZKzmDssVlRj1QQA==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-riscv64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.25.12.tgz", + "integrity": "sha512-Zr7KR4hgKUpWAwb1f3o5ygT04MzqVrGEGXGLnj15YQDJErYu/BGg+wmFlIDOdJp0PmB0lLvxFIOXZgFRrdjR0w==", + "cpu": [ + "riscv64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-s390x": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.25.12.tgz", + "integrity": "sha512-MsKncOcgTNvdtiISc/jZs/Zf8d0cl/t3gYWX8J9ubBnVOwlk65UIEEvgBORTiljloIWnBzLs4qhzPkJcitIzIg==", + "cpu": [ + "s390x" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-x64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.25.12.tgz", + "integrity": "sha512-uqZMTLr/zR/ed4jIGnwSLkaHmPjOjJvnm6TVVitAa08SLS9Z0VM8wIRx7gWbJB5/J54YuIMInDquWyYvQLZkgw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/netbsd-arm64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-arm64/-/netbsd-arm64-0.25.12.tgz", + "integrity": "sha512-xXwcTq4GhRM7J9A8Gv5boanHhRa/Q9KLVmcyXHCTaM4wKfIpWkdXiMog/KsnxzJ0A1+nD+zoecuzqPmCRyBGjg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/netbsd-x64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.25.12.tgz", + "integrity": "sha512-Ld5pTlzPy3YwGec4OuHh1aCVCRvOXdH8DgRjfDy/oumVovmuSzWfnSJg+VtakB9Cm0gxNO9BzWkj6mtO1FMXkQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/openbsd-arm64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-arm64/-/openbsd-arm64-0.25.12.tgz", + "integrity": "sha512-fF96T6KsBo/pkQI950FARU9apGNTSlZGsv1jZBAlcLL1MLjLNIWPBkj5NlSz8aAzYKg+eNqknrUJ24QBybeR5A==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/openbsd-x64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.25.12.tgz", + "integrity": "sha512-MZyXUkZHjQxUvzK7rN8DJ3SRmrVrke8ZyRusHlP+kuwqTcfWLyqMOE3sScPPyeIXN/mDJIfGXvcMqCgYKekoQw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/openharmony-arm64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/openharmony-arm64/-/openharmony-arm64-0.25.12.tgz", + "integrity": "sha512-rm0YWsqUSRrjncSXGA7Zv78Nbnw4XL6/dzr20cyrQf7ZmRcsovpcRBdhD43Nuk3y7XIoW2OxMVvwuRvk9XdASg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openharmony" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/sunos-x64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.25.12.tgz", + "integrity": "sha512-3wGSCDyuTHQUzt0nV7bocDy72r2lI33QL3gkDNGkod22EsYl04sMf0qLb8luNKTOmgF/eDEDP5BFNwoBKH441w==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "sunos" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/win32-arm64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.25.12.tgz", + "integrity": "sha512-rMmLrur64A7+DKlnSuwqUdRKyd3UE7oPJZmnljqEptesKM8wx9J8gx5u0+9Pq0fQQW8vqeKebwNXdfOyP+8Bsg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/win32-ia32": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.25.12.tgz", + "integrity": "sha512-HkqnmmBoCbCwxUKKNPBixiWDGCpQGVsrQfJoVGYLPT41XWF8lHuE5N6WhVia2n4o5QK5M4tYr21827fNhi4byQ==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/win32-x64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.25.12.tgz", + "integrity": "sha512-alJC0uCZpTFrSL0CCDjcgleBXPnCrEAhTBILpeAp7M/OFgoqtAetfBzX0xM00MUsVVPpVjlPuMbREqnZCXaTnA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@jridgewell/gen-mapping": { + "version": "0.3.13", + "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.13.tgz", + "integrity": "sha512-2kkt/7niJ6MgEPxF0bYdQ6etZaA+fQvDcLKckhy1yIQOzaoKjBBjSj63/aLVjYE3qhRt5dvM+uUyfCg6UKCBbA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/sourcemap-codec": "^1.5.0", + "@jridgewell/trace-mapping": "^0.3.24" + } + }, + "node_modules/@jridgewell/remapping": { + "version": "2.3.5", + "resolved": "https://registry.npmjs.org/@jridgewell/remapping/-/remapping-2.3.5.tgz", + "integrity": "sha512-LI9u/+laYG4Ds1TDKSJW2YPrIlcVYOwi2fUC6xB43lueCjgxV4lffOCZCtYFiH6TNOX+tQKXx97T4IKHbhyHEQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/gen-mapping": "^0.3.5", + "@jridgewell/trace-mapping": "^0.3.24" + } + }, + "node_modules/@jridgewell/resolve-uri": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz", + "integrity": "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/sourcemap-codec": { + "version": "1.5.5", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.5.tgz", + "integrity": "sha512-cYQ9310grqxueWbl+WuIUIaiUaDcj7WOq5fVhEljNVgRfOUhY9fy2zTvfoqWsnebh8Sl70VScFbICvJnLKB0Og==", + "dev": true, + "license": "MIT" + }, + "node_modules/@jridgewell/trace-mapping": { + "version": "0.3.31", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.31.tgz", + "integrity": "sha512-zzNR+SdQSDJzc8joaeP8QQoCQr8NuYx2dIIytl1QeBEZHJ9uW6hebsrYgbz8hJwUQao3TWCMtmfV8Nu1twOLAw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/resolve-uri": "^3.1.0", + "@jridgewell/sourcemap-codec": "^1.4.14" + } + }, + "node_modules/@rolldown/pluginutils": { + "version": "1.0.0-beta.27", + "resolved": "https://registry.npmjs.org/@rolldown/pluginutils/-/pluginutils-1.0.0-beta.27.tgz", + "integrity": "sha512-+d0F4MKMCbeVUJwG96uQ4SgAznZNSq93I3V+9NHA4OpvqG8mRCpGdKmK8l/dl02h2CCDHwW2FqilnTyDcAnqjA==", + "dev": true, + "license": "MIT" + }, + "node_modules/@rollup/rollup-android-arm-eabi": { + "version": "4.60.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.60.2.tgz", + "integrity": "sha512-dnlp69efPPg6Uaw2dVqzWRfAWRnYVb1XJ8CyyhIbZeaq4CA5/mLeZ1IEt9QqQxmbdvagjLIm2ZL8BxXv5lH4Yw==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ] + }, + "node_modules/@rollup/rollup-android-arm64": { + "version": "4.60.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.60.2.tgz", + "integrity": "sha512-OqZTwDRDchGRHHm/hwLOL7uVPB9aUvI0am/eQuWMNyFHf5PSEQmyEeYYheA0EPPKUO/l0uigCp+iaTjoLjVoHg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ] + }, + "node_modules/@rollup/rollup-darwin-arm64": { + "version": "4.60.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.60.2.tgz", + "integrity": "sha512-UwRE7CGpvSVEQS8gUMBe1uADWjNnVgP3Iusyda1nSRwNDCsRjnGc7w6El6WLQsXmZTbLZx9cecegumcitNfpmA==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ] + }, + "node_modules/@rollup/rollup-darwin-x64": { + "version": "4.60.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.60.2.tgz", + "integrity": "sha512-gjEtURKLCC5VXm1I+2i1u9OhxFsKAQJKTVB8WvDAHF+oZlq0GTVFOlTlO1q3AlCTE/DF32c16ESvfgqR7343/g==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ] + }, + "node_modules/@rollup/rollup-freebsd-arm64": { + "version": "4.60.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.60.2.tgz", + "integrity": "sha512-Bcl6CYDeAgE70cqZaMojOi/eK63h5Me97ZqAQoh77VPjMysA/4ORQBRGo3rRy45x4MzVlU9uZxs8Uwy7ZaKnBw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ] + }, + "node_modules/@rollup/rollup-freebsd-x64": { + "version": "4.60.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.60.2.tgz", + "integrity": "sha512-LU+TPda3mAE2QB0/Hp5VyeKJivpC6+tlOXd1VMoXV/YFMvk/MNk5iXeBfB4MQGRWyOYVJ01625vjkr0Az98OJQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ] + }, + "node_modules/@rollup/rollup-linux-arm-gnueabihf": { + "version": "4.60.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.60.2.tgz", + "integrity": "sha512-2QxQrM+KQ7DAW4o22j+XZ6RKdxjLD7BOWTP0Bv0tmjdyhXSsr2Ul1oJDQqh9Zf5qOwTuTc7Ek83mOFaKnodPjg==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-arm-musleabihf": { + "version": "4.60.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.60.2.tgz", + "integrity": "sha512-TbziEu2DVsTEOPif2mKWkMeDMLoYjx95oESa9fkQQK7r/Orta0gnkcDpzwufEcAO2BLBsD7mZkXGFqEdMRRwfw==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-arm64-gnu": { + "version": "4.60.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.60.2.tgz", + "integrity": "sha512-bO/rVDiDUuM2YfuCUwZ1t1cP+/yqjqz+Xf2VtkdppefuOFS2OSeAfgafaHNkFn0t02hEyXngZkxtGqXcXwO8Rg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-arm64-musl": { + "version": "4.60.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.60.2.tgz", + "integrity": "sha512-hr26p7e93Rl0Za+JwW7EAnwAvKkehh12BU1Llm9Ykiibg4uIr2rbpxG9WCf56GuvidlTG9KiiQT/TXT1yAWxTA==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-loong64-gnu": { + "version": "4.60.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loong64-gnu/-/rollup-linux-loong64-gnu-4.60.2.tgz", + "integrity": "sha512-pOjB/uSIyDt+ow3k/RcLvUAOGpysT2phDn7TTUB3n75SlIgZzM6NKAqlErPhoFU+npgY3/n+2HYIQVbF70P9/A==", + "cpu": [ + "loong64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-loong64-musl": { + "version": "4.60.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loong64-musl/-/rollup-linux-loong64-musl-4.60.2.tgz", + "integrity": "sha512-2/w+q8jszv9Ww1c+6uJT3OwqhdmGP2/4T17cu8WuwyUuuaCDDJ2ojdyYwZzCxx0GcsZBhzi3HmH+J5pZNXnd+Q==", + "cpu": [ + "loong64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-ppc64-gnu": { + "version": "4.60.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-ppc64-gnu/-/rollup-linux-ppc64-gnu-4.60.2.tgz", + "integrity": "sha512-11+aL5vKheYgczxtPVVRhdptAM2H7fcDR5Gw4/bTcteuZBlH4oP9f5s9zYO9aGZvoGeBpqXI/9TZZihZ609wKw==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-ppc64-musl": { + "version": "4.60.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-ppc64-musl/-/rollup-linux-ppc64-musl-4.60.2.tgz", + "integrity": "sha512-i16fokAGK46IVZuV8LIIwMdtqhin9hfYkCh8pf8iC3QU3LpwL+1FSFGej+O7l3E/AoknL6Dclh2oTdnRMpTzFQ==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-riscv64-gnu": { + "version": "4.60.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.60.2.tgz", + "integrity": "sha512-49FkKS6RGQoriDSK/6E2GkAsAuU5kETFCh7pG4yD/ylj9rKhTmO3elsnmBvRD4PgJPds5W2PkhC82aVwmUcJ7A==", + "cpu": [ + "riscv64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-riscv64-musl": { + "version": "4.60.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-musl/-/rollup-linux-riscv64-musl-4.60.2.tgz", + "integrity": "sha512-mjYNkHPfGpUR00DuM1ZZIgs64Hpf4bWcz9Z41+4Q+pgDx73UwWdAYyf6EG/lRFldmdHHzgrYyge5akFUW0D3mQ==", + "cpu": [ + "riscv64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-s390x-gnu": { + "version": "4.60.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.60.2.tgz", + "integrity": "sha512-ALyvJz965BQk8E9Al/JDKKDLH2kfKFLTGMlgkAbbYtZuJt9LU8DW3ZoDMCtQpXAltZxwBHevXz5u+gf0yA0YoA==", + "cpu": [ + "s390x" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-x64-gnu": { + "version": "4.60.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.60.2.tgz", + "integrity": "sha512-UQjrkIdWrKI626Du8lCQ6MJp/6V1LAo2bOK9OTu4mSn8GGXIkPXk/Vsp4bLHCd9Z9Iz2OTEaokUE90VweJgIYQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-x64-musl": { + "version": "4.60.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.60.2.tgz", + "integrity": "sha512-bTsRGj6VlSdn/XD4CGyzMnzaBs9bsRxy79eTqTCBsA8TMIEky7qg48aPkvJvFe1HyzQ5oMZdg7AnVlWQSKLTnw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-openbsd-x64": { + "version": "4.60.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-openbsd-x64/-/rollup-openbsd-x64-4.60.2.tgz", + "integrity": "sha512-6d4Z3534xitaA1FcMWP7mQPq5zGwBmGbhphh2DwaA1aNIXUu3KTOfwrWpbwI4/Gr0uANo7NTtaykFyO2hPuFLg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openbsd" + ] + }, + "node_modules/@rollup/rollup-openharmony-arm64": { + "version": "4.60.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-openharmony-arm64/-/rollup-openharmony-arm64-4.60.2.tgz", + "integrity": "sha512-NetAg5iO2uN7eB8zE5qrZ3CSil+7IJt4WDFLcC75Ymywq1VZVD6qJ6EvNLjZ3rEm6gB7XW5JdT60c6MN35Z85Q==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openharmony" + ] + }, + "node_modules/@rollup/rollup-win32-arm64-msvc": { + "version": "4.60.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.60.2.tgz", + "integrity": "sha512-NCYhOotpgWZ5kdxCZsv6Iudx0wX8980Q/oW4pNFNihpBKsDbEA1zpkfxJGC0yugsUuyDZ7gL37dbzwhR0VI7pQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@rollup/rollup-win32-ia32-msvc": { + "version": "4.60.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.60.2.tgz", + "integrity": "sha512-RXsaOqXxfoUBQoOgvmmijVxJnW2IGB0eoMO7F8FAjaj0UTywUO/luSqimWBJn04WNgUkeNhh7fs7pESXajWmkg==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@rollup/rollup-win32-x64-gnu": { + "version": "4.60.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-gnu/-/rollup-win32-x64-gnu-4.60.2.tgz", + "integrity": "sha512-qdAzEULD+/hzObedtmV6iBpdL5TIbKVztGiK7O3/KYSf+HIzU257+MX1EXJcyIiDbMAqmbwaufcYPvyRryeZtA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@rollup/rollup-win32-x64-msvc": { + "version": "4.60.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.60.2.tgz", + "integrity": "sha512-Nd/SgG27WoA9e+/TdK74KnHz852TLa94ovOYySo/yMPuTmpckK/jIF2jSwS3g7ELSKXK13/cVdmg1Z/DaCWKxA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@types/babel__core": { + "version": "7.20.5", + "resolved": "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.20.5.tgz", + "integrity": "sha512-qoQprZvz5wQFJwMDqeseRXWv3rqMvhgpbXFfVyWhbx9X47POIA6i/+dXefEmZKoAgOaTdaIgNSMqMIU61yRyzA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/parser": "^7.20.7", + "@babel/types": "^7.20.7", + "@types/babel__generator": "*", + "@types/babel__template": "*", + "@types/babel__traverse": "*" + } + }, + "node_modules/@types/babel__generator": { + "version": "7.27.0", + "resolved": "https://registry.npmjs.org/@types/babel__generator/-/babel__generator-7.27.0.tgz", + "integrity": "sha512-ufFd2Xi92OAVPYsy+P4n7/U7e68fex0+Ee8gSG9KX7eo084CWiQ4sdxktvdl0bOPupXtVJPY19zk6EwWqUQ8lg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/types": "^7.0.0" + } + }, + "node_modules/@types/babel__template": { + "version": "7.4.4", + "resolved": "https://registry.npmjs.org/@types/babel__template/-/babel__template-7.4.4.tgz", + "integrity": "sha512-h/NUaSyG5EyxBIp8YRxo4RMe2/qQgvyowRwVMzhYhBCONbW8PUsg4lkFMrhgZhUe5z3L3MiLDuvyJ/CaPa2A8A==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/parser": "^7.1.0", + "@babel/types": "^7.0.0" + } + }, + "node_modules/@types/babel__traverse": { + "version": "7.28.0", + "resolved": "https://registry.npmjs.org/@types/babel__traverse/-/babel__traverse-7.28.0.tgz", + "integrity": "sha512-8PvcXf70gTDZBgt9ptxJ8elBeBjcLOAcOtoO/mPJjtji1+CdGbHgm77om1GrsPxsiE+uXIpNSK64UYaIwQXd4Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/types": "^7.28.2" + } + }, + "node_modules/@types/estree": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.8.tgz", + "integrity": "sha512-dWHzHa2WqEXI/O1E9OjrocMTKJl2mSrEolh1Iomrv6U+JuNwaHXsXx9bLu5gG7BUWFIN0skIQJQ/L1rIex4X6w==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/prop-types": { + "version": "15.7.15", + "resolved": "https://registry.npmjs.org/@types/prop-types/-/prop-types-15.7.15.tgz", + "integrity": "sha512-F6bEyamV9jKGAFBEmlQnesRPGOQqS2+Uwi0Em15xenOxHaf2hv6L8YCVn3rPdPJOiJfPiCnLIRyvwVaqMY3MIw==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/react": { + "version": "18.3.28", + "resolved": "https://registry.npmjs.org/@types/react/-/react-18.3.28.tgz", + "integrity": "sha512-z9VXpC7MWrhfWipitjNdgCauoMLRdIILQsAEV+ZesIzBq/oUlxk0m3ApZuMFCXdnS4U7KrI+l3WRUEGQ8K1QKw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/prop-types": "*", + "csstype": "^3.2.2" + } + }, + "node_modules/@types/react-dom": { + "version": "18.3.7", + "resolved": "https://registry.npmjs.org/@types/react-dom/-/react-dom-18.3.7.tgz", + "integrity": "sha512-MEe3UeoENYVFXzoXEWsvcpg6ZvlrFNlOQ7EOsvhI3CfAXwzPfO8Qwuxd40nepsYKqyyVQnTdEfv68q91yLcKrQ==", + "dev": true, + "license": "MIT", + "peerDependencies": { + "@types/react": "^18.0.0" + } + }, + "node_modules/@vitejs/plugin-react": { + "version": "4.7.0", + "resolved": "https://registry.npmjs.org/@vitejs/plugin-react/-/plugin-react-4.7.0.tgz", + "integrity": "sha512-gUu9hwfWvvEDBBmgtAowQCojwZmJ5mcLn3aufeCsitijs3+f2NsrPtlAWIR6OPiqljl96GVCUbLe0HyqIpVaoA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/core": "^7.28.0", + "@babel/plugin-transform-react-jsx-self": "^7.27.1", + "@babel/plugin-transform-react-jsx-source": "^7.27.1", + "@rolldown/pluginutils": "1.0.0-beta.27", + "@types/babel__core": "^7.20.5", + "react-refresh": "^0.17.0" + }, + "engines": { + "node": "^14.18.0 || >=16.0.0" + }, + "peerDependencies": { + "vite": "^4.2.0 || ^5.0.0 || ^6.0.0 || ^7.0.0" + } + }, + "node_modules/baseline-browser-mapping": { + "version": "2.10.22", + "resolved": "https://registry.npmjs.org/baseline-browser-mapping/-/baseline-browser-mapping-2.10.22.tgz", + "integrity": "sha512-6qruVrb5rse6WylFkU0FhBKKGuecWseqdpQfhkawn6ztyk2QlfwSRjsDxMCLJrkfmfN21qvhl9ABgaMeRkuwww==", + "dev": true, + "license": "Apache-2.0", + "bin": { + "baseline-browser-mapping": "dist/cli.cjs" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/browserslist": { + "version": "4.28.2", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.28.2.tgz", + "integrity": "sha512-48xSriZYYg+8qXna9kwqjIVzuQxi+KYWp2+5nCYnYKPTr0LvD89Jqk2Or5ogxz0NUMfIjhh2lIUX/LyX9B4oIg==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/browserslist" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", + "dependencies": { + "baseline-browser-mapping": "^2.10.12", + "caniuse-lite": "^1.0.30001782", + "electron-to-chromium": "^1.5.328", + "node-releases": "^2.0.36", + "update-browserslist-db": "^1.2.3" + }, + "bin": { + "browserslist": "cli.js" + }, + "engines": { + "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7" + } + }, + "node_modules/caniuse-lite": { + "version": "1.0.30001791", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001791.tgz", + "integrity": "sha512-yk0l/YSrOnFZk3UROpDLQD9+kC1l4meK/wed583AXrzoarMGJcbRi2Q4RaUYbKxYAsZ8sWmaSa/DsLmdBeI1vQ==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/caniuse-lite" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "CC-BY-4.0" + }, + "node_modules/convert-source-map": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-2.0.0.tgz", + "integrity": "sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==", + "dev": true, + "license": "MIT" + }, + "node_modules/csstype": { + "version": "3.2.3", + "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.2.3.tgz", + "integrity": "sha512-z1HGKcYy2xA8AGQfwrn0PAy+PB7X/GSj3UVJW9qKyn43xWa+gl5nXmU4qqLMRzWVLFC8KusUX8T/0kCiOYpAIQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/debug": { + "version": "4.4.3", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz", + "integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==", + "dev": true, + "license": "MIT", + "dependencies": { + "ms": "^2.1.3" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/electron-to-chromium": { + "version": "1.5.344", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.344.tgz", + "integrity": "sha512-4MxfbmNDm+KPh066EZy+eUnkcDPcZ35wNmOWzFuh/ijvHsve6kbLTLURy88uCNK5FbpN+yk2nQY6BYh1GEt+wg==", + "dev": true, + "license": "ISC" + }, + "node_modules/esbuild": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.25.12.tgz", + "integrity": "sha512-bbPBYYrtZbkt6Os6FiTLCTFxvq4tt3JKall1vRwshA3fdVztsLAatFaZobhkBC8/BrPetoa0oksYoKXoG4ryJg==", + "dev": true, + "hasInstallScript": true, + "license": "MIT", + "bin": { + "esbuild": "bin/esbuild" + }, + "engines": { + "node": ">=18" + }, + "optionalDependencies": { + "@esbuild/aix-ppc64": "0.25.12", + "@esbuild/android-arm": "0.25.12", + "@esbuild/android-arm64": "0.25.12", + "@esbuild/android-x64": "0.25.12", + "@esbuild/darwin-arm64": "0.25.12", + "@esbuild/darwin-x64": "0.25.12", + "@esbuild/freebsd-arm64": "0.25.12", + "@esbuild/freebsd-x64": "0.25.12", + "@esbuild/linux-arm": "0.25.12", + "@esbuild/linux-arm64": "0.25.12", + "@esbuild/linux-ia32": "0.25.12", + "@esbuild/linux-loong64": "0.25.12", + "@esbuild/linux-mips64el": "0.25.12", + "@esbuild/linux-ppc64": "0.25.12", + "@esbuild/linux-riscv64": "0.25.12", + "@esbuild/linux-s390x": "0.25.12", + "@esbuild/linux-x64": "0.25.12", + "@esbuild/netbsd-arm64": "0.25.12", + "@esbuild/netbsd-x64": "0.25.12", + "@esbuild/openbsd-arm64": "0.25.12", + "@esbuild/openbsd-x64": "0.25.12", + "@esbuild/openharmony-arm64": "0.25.12", + "@esbuild/sunos-x64": "0.25.12", + "@esbuild/win32-arm64": "0.25.12", + "@esbuild/win32-ia32": "0.25.12", + "@esbuild/win32-x64": "0.25.12" + } + }, + "node_modules/escalade": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.2.0.tgz", + "integrity": "sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/fdir": { + "version": "6.5.0", + "resolved": "https://registry.npmjs.org/fdir/-/fdir-6.5.0.tgz", + "integrity": "sha512-tIbYtZbucOs0BRGqPJkshJUYdL+SDH7dVM8gjy+ERp3WAUjLEFJE+02kanyHtwjWOnwrKYBiwAmM0p4kLJAnXg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12.0.0" + }, + "peerDependencies": { + "picomatch": "^3 || ^4" + }, + "peerDependenciesMeta": { + "picomatch": { + "optional": true + } + } + }, + "node_modules/fsevents": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", + "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", + "dev": true, + "hasInstallScript": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + } + }, + "node_modules/gensync": { + "version": "1.0.0-beta.2", + "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz", + "integrity": "sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/js-tokens": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", + "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", + "license": "MIT" + }, + "node_modules/jsesc": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-3.1.0.tgz", + "integrity": "sha512-/sM3dO2FOzXjKQhJuo0Q173wf2KOo8t4I8vHy6lF9poUp7bKT0/NHE8fPX23PwfhnykfqnC2xRxOnVw5XuGIaA==", + "dev": true, + "license": "MIT", + "bin": { + "jsesc": "bin/jsesc" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/json5": { + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz", + "integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==", + "dev": true, + "license": "MIT", + "bin": { + "json5": "lib/cli.js" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/loose-envify": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz", + "integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==", + "license": "MIT", + "dependencies": { + "js-tokens": "^3.0.0 || ^4.0.0" + }, + "bin": { + "loose-envify": "cli.js" + } + }, + "node_modules/lru-cache": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz", + "integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==", + "dev": true, + "license": "ISC", + "dependencies": { + "yallist": "^3.0.2" + } + }, + "node_modules/ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "dev": true, + "license": "MIT" + }, + "node_modules/nanoid": { + "version": "3.3.11", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.11.tgz", + "integrity": "sha512-N8SpfPUnUp1bK+PMYW8qSWdl9U+wwNWI4QKxOYDy9JAro3WMX7p2OeVRF9v+347pnakNevPmiHhNmZ2HbFA76w==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", + "bin": { + "nanoid": "bin/nanoid.cjs" + }, + "engines": { + "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" + } + }, + "node_modules/node-releases": { + "version": "2.0.38", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.38.tgz", + "integrity": "sha512-3qT/88Y3FbH/Kx4szpQQ4HzUbVrHPKTLVpVocKiLfoYvw9XSGOX2FmD2d6DrXbVYyAQTF2HeF6My8jmzx7/CRw==", + "dev": true, + "license": "MIT" + }, + "node_modules/picocolors": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz", + "integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==", + "dev": true, + "license": "ISC" + }, + "node_modules/picomatch": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.4.tgz", + "integrity": "sha512-QP88BAKvMam/3NxH6vj2o21R6MjxZUAd6nlwAS/pnGvN9IVLocLHxGYIzFhg6fUQ+5th6P4dv4eW9jX3DSIj7A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/postcss": { + "version": "8.5.10", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.10.tgz", + "integrity": "sha512-pMMHxBOZKFU6HgAZ4eyGnwXF/EvPGGqUr0MnZ5+99485wwW41kW91A4LOGxSHhgugZmSChL5AlElNdwlNgcnLQ==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/postcss/" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/postcss" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", + "dependencies": { + "nanoid": "^3.3.11", + "picocolors": "^1.1.1", + "source-map-js": "^1.2.1" + }, + "engines": { + "node": "^10 || ^12 || >=14" + } + }, + "node_modules/react": { + "version": "18.3.1", + "resolved": "https://registry.npmjs.org/react/-/react-18.3.1.tgz", + "integrity": "sha512-wS+hAgJShR0KhEvPJArfuPVN1+Hz1t0Y6n5jLrGQbkb4urgPE/0Rve+1kMB1v/oWgHgm4WIcV+i7F2pTVj+2iQ==", + "license": "MIT", + "dependencies": { + "loose-envify": "^1.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/react-dom": { + "version": "18.3.1", + "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-18.3.1.tgz", + "integrity": "sha512-5m4nQKp+rZRb09LNH59GM4BxTh9251/ylbKIbpe7TpGxfJ+9kv6BLkLBXIjjspbgbnIBNqlI23tRnTWT0snUIw==", + "license": "MIT", + "dependencies": { + "loose-envify": "^1.1.0", + "scheduler": "^0.23.2" + }, + "peerDependencies": { + "react": "^18.3.1" + } + }, + "node_modules/react-refresh": { + "version": "0.17.0", + "resolved": "https://registry.npmjs.org/react-refresh/-/react-refresh-0.17.0.tgz", + "integrity": "sha512-z6F7K9bV85EfseRCp2bzrpyQ0Gkw1uLoCel9XBVWPg/TjRj94SkJzUTGfOa4bs7iJvBWtQG0Wq7wnI0syw3EBQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/rollup": { + "version": "4.60.2", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.60.2.tgz", + "integrity": "sha512-J9qZyW++QK/09NyN/zeO0dG/1GdGfyp9lV8ajHnRVLfo/uFsbji5mHnDgn/qYdUHyCkM2N+8VyspgZclfAh0eQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/estree": "1.0.8" + }, + "bin": { + "rollup": "dist/bin/rollup" + }, + "engines": { + "node": ">=18.0.0", + "npm": ">=8.0.0" + }, + "optionalDependencies": { + "@rollup/rollup-android-arm-eabi": "4.60.2", + "@rollup/rollup-android-arm64": "4.60.2", + "@rollup/rollup-darwin-arm64": "4.60.2", + "@rollup/rollup-darwin-x64": "4.60.2", + "@rollup/rollup-freebsd-arm64": "4.60.2", + "@rollup/rollup-freebsd-x64": "4.60.2", + "@rollup/rollup-linux-arm-gnueabihf": "4.60.2", + "@rollup/rollup-linux-arm-musleabihf": "4.60.2", + "@rollup/rollup-linux-arm64-gnu": "4.60.2", + "@rollup/rollup-linux-arm64-musl": "4.60.2", + "@rollup/rollup-linux-loong64-gnu": "4.60.2", + "@rollup/rollup-linux-loong64-musl": "4.60.2", + "@rollup/rollup-linux-ppc64-gnu": "4.60.2", + "@rollup/rollup-linux-ppc64-musl": "4.60.2", + "@rollup/rollup-linux-riscv64-gnu": "4.60.2", + "@rollup/rollup-linux-riscv64-musl": "4.60.2", + "@rollup/rollup-linux-s390x-gnu": "4.60.2", + "@rollup/rollup-linux-x64-gnu": "4.60.2", + "@rollup/rollup-linux-x64-musl": "4.60.2", + "@rollup/rollup-openbsd-x64": "4.60.2", + "@rollup/rollup-openharmony-arm64": "4.60.2", + "@rollup/rollup-win32-arm64-msvc": "4.60.2", + "@rollup/rollup-win32-ia32-msvc": "4.60.2", + "@rollup/rollup-win32-x64-gnu": "4.60.2", + "@rollup/rollup-win32-x64-msvc": "4.60.2", + "fsevents": "~2.3.2" + } + }, + "node_modules/scheduler": { + "version": "0.23.2", + "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.23.2.tgz", + "integrity": "sha512-UOShsPwz7NrMUqhR6t0hWjFduvOzbtv7toDH1/hIrfRNIDBnnBWd0CwJTGvTpngVlmwGCdP9/Zl/tVrDqcuYzQ==", + "license": "MIT", + "dependencies": { + "loose-envify": "^1.1.0" + } + }, + "node_modules/semver": { + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", + "dev": true, + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + } + }, + "node_modules/source-map-js": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.1.tgz", + "integrity": "sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==", + "dev": true, + "license": "BSD-3-Clause", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/tinyglobby": { + "version": "0.2.16", + "resolved": "https://registry.npmjs.org/tinyglobby/-/tinyglobby-0.2.16.tgz", + "integrity": "sha512-pn99VhoACYR8nFHhxqix+uvsbXineAasWm5ojXoN8xEwK5Kd3/TrhNn1wByuD52UxWRLy8pu+kRMniEi6Eq9Zg==", + "dev": true, + "license": "MIT", + "dependencies": { + "fdir": "^6.5.0", + "picomatch": "^4.0.4" + }, + "engines": { + "node": ">=12.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/SuperchupuDev" + } + }, + "node_modules/typescript": { + "version": "5.6.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.6.3.tgz", + "integrity": "sha512-hjcS1mhfuyi4WW8IWtjP7brDrG2cuDZukyrYrSauoXGNgx0S7zceP07adYkJycEr56BOUTNPzbInooiN3fn1qw==", + "dev": true, + "license": "Apache-2.0", + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=14.17" + } + }, + "node_modules/update-browserslist-db": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.2.3.tgz", + "integrity": "sha512-Js0m9cx+qOgDxo0eMiFGEueWztz+d4+M3rGlmKPT+T4IS/jP4ylw3Nwpu6cpTTP8R1MAC1kF4VbdLt3ARf209w==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/browserslist" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", + "dependencies": { + "escalade": "^3.2.0", + "picocolors": "^1.1.1" + }, + "bin": { + "update-browserslist-db": "cli.js" + }, + "peerDependencies": { + "browserslist": ">= 4.21.0" + } + }, + "node_modules/vite": { + "version": "6.4.2", + "resolved": "https://registry.npmjs.org/vite/-/vite-6.4.2.tgz", + "integrity": "sha512-2N/55r4JDJ4gdrCvGgINMy+HH3iRpNIz8K6SFwVsA+JbQScLiC+clmAxBgwiSPgcG9U15QmvqCGWzMbqda5zGQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "esbuild": "^0.25.0", + "fdir": "^6.4.4", + "picomatch": "^4.0.2", + "postcss": "^8.5.3", + "rollup": "^4.34.9", + "tinyglobby": "^0.2.13" + }, + "bin": { + "vite": "bin/vite.js" + }, + "engines": { + "node": "^18.0.0 || ^20.0.0 || >=22.0.0" + }, + "funding": { + "url": "https://github.com/vitejs/vite?sponsor=1" + }, + "optionalDependencies": { + "fsevents": "~2.3.3" + }, + "peerDependencies": { + "@types/node": "^18.0.0 || ^20.0.0 || >=22.0.0", + "jiti": ">=1.21.0", + "less": "*", + "lightningcss": "^1.21.0", + "sass": "*", + "sass-embedded": "*", + "stylus": "*", + "sugarss": "*", + "terser": "^5.16.0", + "tsx": "^4.8.1", + "yaml": "^2.4.2" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + }, + "jiti": { + "optional": true + }, + "less": { + "optional": true + }, + "lightningcss": { + "optional": true + }, + "sass": { + "optional": true + }, + "sass-embedded": { + "optional": true + }, + "stylus": { + "optional": true + }, + "sugarss": { + "optional": true + }, + "terser": { + "optional": true + }, + "tsx": { + "optional": true + }, + "yaml": { + "optional": true + } + } + }, + "node_modules/yallist": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", + "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==", + "dev": true, + "license": "ISC" + } + } +} diff --git a/space_frontend/package.json b/space_frontend/package.json new file mode 100644 index 0000000000000000000000000000000000000000..63689b68a68b82dde83af9bdcd12a740487f8e08 --- /dev/null +++ b/space_frontend/package.json @@ -0,0 +1,22 @@ +{ + "name": "atc-adapt-space-ui", + "private": true, + "version": "1.0.0", + "type": "module", + "scripts": { + "dev": "vite", + "build": "tsc --noEmit && vite build", + "preview": "vite preview" + }, + "dependencies": { + "react": "^18.3.1", + "react-dom": "^18.3.1" + }, + "devDependencies": { + "@types/react": "^18.3.12", + "@types/react-dom": "^18.3.1", + "@vitejs/plugin-react": "^4.3.4", + "typescript": "~5.6.3", + "vite": "^6.0.3" + } +} diff --git a/space_frontend/src/App.tsx b/space_frontend/src/App.tsx new file mode 100644 index 0000000000000000000000000000000000000000..4c269a8e693920cc9c4f2f3139ec3bfbe053714f --- /dev/null +++ b/space_frontend/src/App.tsx @@ -0,0 +1,473 @@ +import { useCallback, useEffect, useRef, useState } from "react"; +import { PixelEngine } from "./engine/PixelEngine"; +import { TaskBrowser } from "./components/TaskBrowser"; +import { ScorePanel } from "./components/ScorePanel"; +import { EventLog } from "./components/EventLog"; +import { ProjectBrief } from "./components/ProjectBrief"; +import { RunHistory, type RunResult } from "./components/RunHistory"; +import { ApiPanel } from "./components/ApiPanel"; +import type { DemoTask, LogEntry, ScoreState } from "./types"; +import { EMPTY_SCORE } from "./types"; + +type FilterMode = "all" | "atc" | "domain"; + +const PRESET_MODELS = [ + "Qwen/Qwen2.5-7B-Instruct", + "Qwen/Qwen2.5-14B-Instruct", + "meta-llama/Llama-3.1-8B-Instruct", + "mistralai/Mistral-7B-Instruct-v0.3", +]; + +const DIFFICULTY_ORDER: Record = { + Introductory: 0, Easy: 1, Medium: 2, Hard: 3, Expert: 4, +}; + +function useDemoTasks() { + const [tasks, setTasks] = useState([]); + const [err, setErr] = useState(null); + useEffect(() => { + fetch("/demo/tasks") + .then((r) => r.json()) + .then((j: { tasks?: DemoTask[] }) => { + setTasks(Array.isArray(j.tasks) ? j.tasks : []); + }) + .catch(() => setErr("Could not reach /demo/tasks — is the FastAPI server running?")); + }, []); + return { tasks, err }; +} + +export default function App() { + const canvasRef = useRef(null); + const engineRef = useRef(null); + const esRef = useRef(null); + const logIdRef = useRef(0); + const histIdRef = useRef(0); + + const { tasks, err: tasksErr } = useDemoTasks(); + + const [filter, setFilter] = useState("all"); + const [adaptActive, setAdaptActive] = useState(false); + const [selectedTask, setSelectedTask] = useState(null); + const [running, setRunning] = useState(false); + const [score, setScore] = useState(EMPTY_SCORE); + const [logEntries, setLogEntries] = useState([]); + const [agentThinking, setAgentThinking] = useState<"AMAN" | "DMAN" | null>(null); + const [useLlm, setUseLlm] = useState(false); + const [modelName, setModelName] = useState(PRESET_MODELS[0]); + const [episodeId, setEpisodeId] = useState(0); + const [runHistory, setRunHistory] = useState([]); + const [activeStreamUrl, setActiveStreamUrl] = useState(""); + + /* Init PixelEngine */ + useEffect(() => { + const c = canvasRef.current; + if (!c) return; + const eng = new PixelEngine(c); + engineRef.current = eng; + return () => { eng.destroy(); engineRef.current = null; }; + }, []); + + /* Auto-select first task */ + useEffect(() => { + if (tasks.length > 0 && !selectedTask) setSelectedTask(tasks[0]); + }, [tasks, selectedTask]); + + /* Idle canvas: real flight/patient rows from ``task_preview`` (from /demo/tasks). */ + useEffect(() => { + const eng = engineRef.current; + if (!eng) return; + if (running) return; + if (!selectedTask) { + eng.applyEvent({ type: "idle_clear" }); + return; + } + if (selectedTask.task_preview) { + eng.applyEvent({ + type: "idle_preview", + task_id: selectedTask.task_id, + visual_profile: selectedTask.mode === "domain" ? "icu" : "atc", + task: selectedTask.task_preview, + }); + } else { + eng.applyEvent({ + type: "scene_reset", + task_id: selectedTask.task_id, + visual_profile: selectedTask.mode === "domain" ? "icu" : "atc", + }); + } + }, [selectedTask, running]); + + const pushLog = useCallback((type: string, detail: string) => { + setLogEntries((prev) => [ + ...prev.slice(-299), + { id: logIdRef.current++, type, detail, ts: Date.now() }, + ]); + }, []); + + const stopStream = useCallback(() => { + esRef.current?.close(); + esRef.current = null; + setRunning(false); + setAgentThinking(null); + }, []); + + const runStream = useCallback(() => { + if (!selectedTask) return; + stopStream(); + setScore(EMPTY_SCORE); + setLogEntries([]); + logIdRef.current = 0; + setAgentThinking(null); + + const vProfile = selectedTask.mode === "domain" ? "icu" : "atc"; + const u = new URL("/demo/episode/stream", window.location.origin); + u.searchParams.set("task_id", selectedTask.task_id); + u.searchParams.set("mode", selectedTask.mode); + u.searchParams.set("visual_profile", vProfile); + u.searchParams.set("episode_id", String(episodeId)); + u.searchParams.set("use_generator", "true"); + u.searchParams.set("use_llm", useLlm ? "true" : "false"); + if (useLlm && modelName) u.searchParams.set("model", modelName); + + const urlStr = u.toString(); + setActiveStreamUrl(urlStr); + + const es = new EventSource(urlStr); + esRef.current = es; + setRunning(true); + + const latestScore: Partial = {}; + + es.onmessage = (msg) => { + let ev: Record; + try { ev = JSON.parse(msg.data) as Record; } + catch { return; } + + engineRef.current?.applyEvent(ev); + const t = String(ev.type); + + if (t === "llm_started") { + setAgentThinking(String(ev.role) === "DMAN" ? "DMAN" : "AMAN"); + } else if (t === "llm_finished") { + setAgentThinking(null); + } else if (t === "score_update") { + const update: Partial = { + composite: Number(ev.composite ?? 0), + aman_reward: Number(ev.aman_reward ?? 0), + dman_reward: Number(ev.dman_reward ?? 0), + }; + Object.assign(latestScore, update); + setScore((prev) => ({ ...prev, ...update })); + } else if (t === "terminal") { + const sev = String(ev.severity ?? "") as ScoreState["severity"]; + const final: ScoreState = { + composite: Number(ev.composite ?? latestScore.composite ?? 0), + aman_reward: Number(ev.aman_reward ?? latestScore.aman_reward ?? 0), + dman_reward: Number(ev.dman_reward ?? latestScore.dman_reward ?? 0), + coordination: Number(ev.coordination ?? 0), + cross_lane_conflicts: Number(ev.cross_lane_conflicts ?? 0), + atfm_violations: Number(ev.atfm_violations ?? 0), + negotiation_rounds: Number(ev.negotiation_rounds ?? 0), + severity: sev, + done: true, + }; + setScore(final); + setRunHistory((prev) => [ + ...prev.slice(-19), + { + id: histIdRef.current++, + taskLabel: selectedTask.label, + taskId: selectedTask.task_id, + domain: selectedTask.mode, + episodeId, + composite: final.composite, + aman_reward: final.aman_reward, + dman_reward: final.dman_reward, + severity: sev ?? "", + usedLlm: useLlm, + ts: Date.now(), + }, + ]); + setRunning(false); + setAgentThinking(null); + setActiveStreamUrl(""); + } + + let detail = ""; + switch (t) { + case "score_update": detail = `cmp=${Number(ev.composite ?? 0).toFixed(3)} aman=${Number(ev.aman_reward ?? 0).toFixed(3)} dman=${Number(ev.dman_reward ?? 0).toFixed(3)}`; break; + case "terminal": detail = `${ev.severity} cmp=${Number(ev.composite ?? 0).toFixed(3)}`; break; + case "scene_reset": detail = String(ev.task_id ?? ""); break; + case "llm_started": detail = String(ev.role ?? ""); break; + case "negotiation_tick": detail = `pass ${ev.pass ?? 0}`; break; + case "action_layout": detail = `arr=${(ev as { layout?: { aman_arrivals?: unknown[] } }).layout?.aman_arrivals?.length ?? 0} dep=${(ev as { layout?: { dman_departures?: unknown[] } }).layout?.dman_departures?.length ?? 0}`; break; + case "error": detail = String(ev.detail ?? ""); break; + case "adapt_mapping": detail = String(ev.rationale_preview ?? "").slice(0, 55); break; + default: break; + } + if (t !== "negotiation_tick") pushLog(t, detail); + }; + + es.onerror = () => { + pushLog("error", "stream closed"); + stopStream(); + setActiveStreamUrl(""); + }; + }, [selectedTask, episodeId, useLlm, modelName, stopStream, pushLog]); + + useEffect(() => () => stopStream(), [stopStream]); + + function handleTaskSelect(task: DemoTask) { + if (running) stopStream(); + setSelectedTask(task); + setScore(EMPTY_SCORE); + setLogEntries([]); + logIdRef.current = 0; + setAgentThinking(null); + } + + const sortedDiffs = selectedTask?.difficulty + ? Object.entries(DIFFICULTY_ORDER).sort((a, b) => a[1] - b[1]).map(([k]) => k) + : []; + + return ( +
+ {/* ── Header (sticky) ──────────────────────────────────────────── */} +
+
+
◈
+
+ AirX + Self Improving & Adapting Multi-Agent Environment +
+
+ +
+ +
+ + {running ? "LIVE" : "READY"} +
+ + {selectedTask && !running && ( +
+ + {selectedTask.mode === "domain" ? "⊕ ICU" : "✈ ATC"} + + {selectedTask.label} +
+ )} + +
+ +
+ + {useLlm && ( + + )} +
+
+ +
+ {/* Full-width scenario context — not squeezed beside the canvas */} + {selectedTask && ( +
+
+
+ + {selectedTask.mode === "domain" ? "⊕" : "✈"} + +
+

{selectedTask.label}

+ {!running && selectedTask.description && ( +

{selectedTask.description}

+ )} +
+
+ T{selectedTask.tier} + {selectedTask.difficulty && ( + + {selectedTask.difficulty} + + )} + + {selectedTask.mode === "domain" ? "ICU domain transfer" : "ATC scenario"} + +
+
+ {!running && ( +
+ {selectedTask.flight_count !== undefined && ( +
+ + {selectedTask.mode === "domain" ? "Patients" : "Flights"} + + {selectedTask.flight_count} +
+ )} + {selectedTask.runway_count !== undefined && ( +
+ + {selectedTask.mode === "domain" ? "Beds / resources" : "Runways"} + + {selectedTask.runway_count} +
+ )} + {selectedTask.difficulty && ( +
+ Difficulty curve +
+ {sortedDiffs.map((d) => ( + + ))} +
+ {selectedTask.difficulty} +
+ )} +
+ )} +
+
+ )} + + {/* Three columns: scenarios · visualization · scores & tools */} +
+ + +
+
+ + +
+ + {running ? ( + + ) : ( + + )} +
+ +
+ + {!selectedTask && ( +
+
◈
+
Select a scenario
+
+ )} +
+
+ + +
+
+
+ ); +} diff --git a/space_frontend/src/components/ApiPanel.tsx b/space_frontend/src/components/ApiPanel.tsx new file mode 100644 index 0000000000000000000000000000000000000000..98432f285576b47435b55cfffa9b82cb5a070fc6 --- /dev/null +++ b/space_frontend/src/components/ApiPanel.tsx @@ -0,0 +1,99 @@ +type Endpoint = { + method: "GET" | "POST"; + path: string; + desc: string; + params?: string[]; +}; + +const ENDPOINTS: Endpoint[] = [ + { + method: "GET", + path: "/demo/tasks", + desc: "Task catalog with metadata (label, difficulty, flight count)", + }, + { + method: "GET", + path: "/demo/episode/stream", + desc: "SSE live episode stream — runs agents and emits visual events", + params: ["task_id", "mode", "visual_profile", "episode_id", "use_llm", "model"], + }, + { + method: "POST", + path: "/multi_agent/reset", + desc: "Reset multi-agent environment for a given task", + }, + { + method: "POST", + path: "/multi_agent/step/bid", + desc: "Submit BID-round actions from AMAN and DMAN", + }, + { + method: "POST", + path: "/multi_agent/finalize", + desc: "Finalize episode and return full scored result", + }, + { + method: "POST", + path: "/multi_agent/episode", + desc: "Run a complete episode end-to-end (REST alternative to SSE)", + }, + { + method: "GET", + path: "/multi_agent/status", + desc: "Current multi-agent environment state summary", + }, + { + method: "GET", + path: "/multi_agent/profiles", + desc: "List available supervisor preference profiles", + }, +]; + +type Props = { + activeUrl: string; +}; + +export function ApiPanel({ activeUrl }: Props) { + const activePath = activeUrl ? new URL(activeUrl).pathname : ""; + + return ( +
+
ACTIVE REQUEST
+ {activeUrl ? ( +
{activeUrl.slice(activeUrl.indexOf("/"))}
+ ) : ( +
No active request
+ )} + +
+ ENDPOINTS +
+
+ {ENDPOINTS.map((ep) => { + const isActive = activePath === ep.path; + return ( +
+
+ + {ep.method} + + {ep.path} + {isActive && } +
+
{ep.desc}
+ {ep.params && ( +
+ {ep.params.map((param) => ( + + {param} + + ))} +
+ )} +
+ ); + })} +
+
+ ); +} diff --git a/space_frontend/src/components/EventLog.tsx b/space_frontend/src/components/EventLog.tsx new file mode 100644 index 0000000000000000000000000000000000000000..d7689a5dc31166256168a8432c6dcfab79e85042 --- /dev/null +++ b/space_frontend/src/components/EventLog.tsx @@ -0,0 +1,70 @@ +import { useEffect, useRef } from "react"; +import type { LogEntry } from "../types"; + +type Props = { + entries: LogEntry[]; + /** When true, omit the duplicate section title (parent supplies heading). */ + embedded?: boolean; +}; + +const EVENT_COLORS: Record = { + scene_reset: "var(--accent)", + adapt_scene: "var(--purple)", + adapt_mapping: "#cc88ff", + llm_started: "#ffdd44", + llm_finished: "#cc9933", + action_layout: "var(--green)", + negotiation_tick: "#7799ff", + score_update: "var(--green)", + terminal: "var(--red)", + error: "#ff2244", +}; + +function fmt(ts: number): string { + return new Date(ts).toLocaleTimeString([], { + hour12: false, + hour: "2-digit", + minute: "2-digit", + second: "2-digit", + }); +} + +export function EventLog({ entries, embedded = false }: Props) { + const bottomRef = useRef(null); + const prevLen = useRef(0); + + useEffect(() => { + if (entries.length !== prevLen.current) { + prevLen.current = entries.length; + bottomRef.current?.scrollIntoView({ behavior: "smooth" }); + } + }, [entries.length]); + + return ( +
+ {!embedded &&
EVENT LOG
} +
+ {entries.length === 0 && ( +
Awaiting episode…
+ )} + {entries.map((e) => ( +
+
+ {fmt(e.ts)} + + {e.type} + +
+ {e.detail ? ( +
{e.detail}
+ ) : null} +
+ ))} +
+
+
+ ); +} diff --git a/space_frontend/src/components/ProjectBrief.tsx b/space_frontend/src/components/ProjectBrief.tsx new file mode 100644 index 0000000000000000000000000000000000000000..848e0d63d6075342a217e0579bdbfa73ff7485b4 --- /dev/null +++ b/space_frontend/src/components/ProjectBrief.tsx @@ -0,0 +1,74 @@ +type Props = { + adaptActive: boolean; + onToggleAdapt: () => void; +}; + +export function ProjectBrief({ adaptActive, onToggleAdapt }: Props) { + return ( +
+ {/* Wordmark */} +
+ ◈ +
+
ADAPT
+
Multi-Agent · GRPO-RL · Zero-Shot Transfer
+
+
+ + {/* Description */} +

+ ADAPT proves that multi-agent intelligence is{" "} + domain-agnostic. Two LLM agents — AMAN{" "} + (arrivals) & DMAN (departures) — negotiate slot + assignments under hard constraints, trained with{" "} + GRPO reinforcement learning on Air Traffic Control. + The same trained agents transfer zero-shot to entirely + different domains, showing that structured negotiation is a{" "} + universal primitive. +

+ + {/* Tags */} +
+ ✈ ATC + ◎ GRPO-RL + ⬡ LLM Agents + ↗ Zero-Shot +
+ + {/* ADAPT CTA */} +
+ {!adaptActive && ( +
+ ▼ + Click to unlock domain transfer + ▼ +
+ )} + + + + {adaptActive && ( +
+ + ICU scenarios now visible in the task list below +
+ )} +
+
+ ); +} diff --git a/space_frontend/src/components/RunHistory.tsx b/space_frontend/src/components/RunHistory.tsx new file mode 100644 index 0000000000000000000000000000000000000000..d84e0f444fef505b1b2d83c059635cfcd2eb947d --- /dev/null +++ b/space_frontend/src/components/RunHistory.tsx @@ -0,0 +1,104 @@ +export type RunResult = { + id: number; + taskLabel: string; + taskId: string; + domain: "atc" | "domain"; + episodeId: number; + composite: number; + aman_reward: number; + dman_reward: number; + severity: string; + usedLlm: boolean; + ts: number; +}; + +type Props = { + history: RunResult[]; +}; + +function SevChip({ sev }: { sev: string }) { + const cls = + sev === "success" + ? "sev-success" + : sev === "catastrophic" + ? "sev-catastrophic" + : sev === "degraded" + ? "sev-degraded" + : "sev-idle"; + return {sev || "—"}; +} + +function ScoreBar({ value }: { value: number }) { + const col = + value >= 0.7 ? "var(--green)" : value >= 0.4 ? "var(--amber)" : "var(--red)"; + return ( +
+
+
+ ); +} + +export function RunHistory({ history }: Props) { + if (history.length === 0) { + return ( +
+ No episodes run yet. Hit Run Episode to generate results. +
+ ); + } + + return ( +
+ + + + + + + + + + + + {[...history].reverse().map((r) => ( + + + + + + + + ))} + +
ScenarioCompositeAMANDMANResult
+ + {r.domain === "domain" ? "⊕" : "✈"} + + {r.taskLabel} + {r.usedLlm && LLM} + +
+ = 0.7 + ? "var(--green)" + : r.composite >= 0.4 + ? "var(--amber)" + : "var(--red)", + }} + > + {r.composite.toFixed(3)} + + +
+
{r.aman_reward.toFixed(2)}{r.dman_reward.toFixed(2)} + +
+
+ ); +} diff --git a/space_frontend/src/components/ScorePanel.tsx b/space_frontend/src/components/ScorePanel.tsx new file mode 100644 index 0000000000000000000000000000000000000000..725183a896009691b6fd3baf42167adc247a8217 --- /dev/null +++ b/space_frontend/src/components/ScorePanel.tsx @@ -0,0 +1,147 @@ +import type { ScoreState } from "../types"; + +type Props = { + score: ScoreState; + running: boolean; + agentThinking: "AMAN" | "DMAN" | null; + taskLabel?: string; +}; + +function ScoreBar({ + label, + value, + color, +}: { + label: string; + value: number; + color: string; +}) { + const pct = `${Math.max(0, Math.min(1, value)) * 100}%`; + return ( +
+ {label} +
+
+
+ {value.toFixed(3)} +
+ ); +} + +function severityMeta( + sev: ScoreState["severity"], + running: boolean, + done: boolean, +): { label: string; cls: string } { + if (sev === "success") return { label: "SUCCESS", cls: "sev-success" }; + if (sev === "degraded") return { label: "DEGRADED", cls: "sev-degraded" }; + if (sev === "catastrophic") return { label: "CATASTROPHIC", cls: "sev-catastrophic" }; + if (running) return { label: "RUNNING", cls: "sev-running" }; + if (done) return { label: "DONE", cls: "sev-done" }; + return { label: "IDLE", cls: "sev-idle" }; +} + +export function ScorePanel({ score, running, agentThinking, taskLabel }: Props) { + const { label: sevLabel, cls: sevCls } = severityMeta( + score.severity, + running, + score.done, + ); + + const compositeColor = + score.composite >= 0.7 + ? "var(--green)" + : score.composite >= 0.4 + ? "var(--amber)" + : score.composite > 0 + ? "var(--red)" + : "var(--muted)"; + + const hasScores = score.aman_reward > 0 || score.dman_reward > 0 || score.done; + + return ( +
+ {agentThinking && ( +
+ + + {agentThinking} generating… + +
+ )} + +
+
EPISODE SCORE
+ + {taskLabel && !running && !score.done && ( +
{taskLabel}
+ )} + +
+
+ {score.composite > 0 ? score.composite.toFixed(3) : "—"} +
+ +
+
+
+ +
+ {running && !score.done && ● } + {sevLabel} +
+
+
+ + {hasScores && ( +
+
AGENTS
+ + + {score.coordination > 0 && ( + + )} +
+ )} + + {(score.done || score.negotiation_rounds > 0) && ( +
+
METRICS
+
+
+ Conflicts + 0 ? "val-red" : "val-green"}`} + > + {score.cross_lane_conflicts} + +
+
+ ATFM Viol. + 0 ? "val-amber" : "val-green"}`} + > + {score.atfm_violations} + +
+
+ Neg. Rounds + + {score.negotiation_rounds} + +
+
+
+ )} +
+ ); +} diff --git a/space_frontend/src/components/TaskBrowser.tsx b/space_frontend/src/components/TaskBrowser.tsx new file mode 100644 index 0000000000000000000000000000000000000000..a54bd6c1d763dbb51f3b9d9deee25b6a3c77df83 --- /dev/null +++ b/space_frontend/src/components/TaskBrowser.tsx @@ -0,0 +1,104 @@ +import type { DemoTask } from "../types"; + +type FilterMode = "all" | "atc" | "domain"; + +type Props = { + tasks: DemoTask[]; + selected: DemoTask | null; + filter: FilterMode; + adaptActive: boolean; + onFilterChange: (f: FilterMode) => void; + onSelect: (t: DemoTask) => void; +}; + +function TierBadge({ tier }: { tier: number }) { + return T{tier}; +} + +function DiffBadge({ difficulty }: { difficulty: string }) { + return ( + + {difficulty} + + ); +} + +export function TaskBrowser({ tasks, selected, filter, adaptActive, onFilterChange, onSelect }: Props) { + const pool = adaptActive ? tasks : tasks.filter((t) => t.mode === "atc"); + const visible = filter === "all" ? pool + : filter === "domain" ? pool.filter((t) => t.mode === "domain") + : pool.filter((t) => t.mode === "atc"); + + const atcCount = pool.filter((t) => t.mode === "atc").length; + const icuCount = pool.filter((t) => t.mode === "domain").length; + + return ( +
+
+ SCENARIOS + {visible.length} +
+ +
+ + + {adaptActive && ( + + )} +
+ +
+ {visible.map((task) => { + const isAtc = task.mode === "atc"; + const isSelected = selected?.task_id === task.task_id; + return ( + + ); + })} +
+
+ ); +} diff --git a/space_frontend/src/engine/PixelEngine.ts b/space_frontend/src/engine/PixelEngine.ts new file mode 100644 index 0000000000000000000000000000000000000000..8bf3f5363aa708af871f751650d9f8cbbe291f5f --- /dev/null +++ b/space_frontend/src/engine/PixelEngine.ts @@ -0,0 +1,837 @@ +import { catastrophicMotion, drawCatastrophicOverlay } from "./catastrophicFailure"; +import { + resolveSceneKey, + SCENE_PALETTES, + type ScenePalette, + type VisualSceneKey, +} from "../tasks/registry"; + +const LW = 320; +const LH = 180; + +type LayoutSlot = { + flight_id: string; + runway: string; + assigned_minute: number; + hold_minutes: number; +}; + +type ActionLayout = { + aman_arrivals: LayoutSlot[]; + dman_departures: LayoutSlot[]; +}; + +type VisualEvent = Record; + +export class PixelEngine { + private canvas: HTMLCanvasElement; + private ctx: CanvasRenderingContext2D; + private raf = 0; + + private sceneKey: VisualSceneKey = "bhopal"; + private profile: "atc" | "icu" = "atc"; + private mode: "atc" | "domain" = "atc"; + private palette: ScenePalette = SCENE_PALETTES.bhopal; + + private taskSnapshot: Record | null = null; + private layout: ActionLayout | null = null; + /** Synthetic layout from ``idle_preview`` (scheduled slots) until SSE sends real actions. */ + private previewLayout: ActionLayout | null = null; + + private thinking: "AMAN" | "DMAN" | null = null; + private negPass = 0; + private composite = 0; + private statusLine = ""; + + private catastrophicStart: number | null = null; + + private decorT = 0; + private radarAngle = 0; + private blinkT = 0; + + constructor(canvas: HTMLCanvasElement) { + const ctx = canvas.getContext("2d"); + if (!ctx) throw new Error("2d context required"); + this.canvas = canvas; + this.ctx = ctx; + this.resize(); + window.addEventListener("resize", this.resize); + this.loop = this.loop.bind(this); + this.raf = requestAnimationFrame(this.loop); + } + + destroy(): void { + cancelAnimationFrame(this.raf); + window.removeEventListener("resize", this.resize); + } + + private resize = (): void => { + const parent = this.canvas.parentElement; + const pw = parent?.clientWidth ?? 640; + const ph = parent?.clientHeight ?? 360; + let scaleX = Math.max(1, Math.floor(pw / LW)); + let scaleY = Math.max(1, Math.floor(ph / LH)); + let scale = Math.min(scaleX, scaleY); + if (pw >= 720) scale = Math.max(scale, 2); + if (pw >= 1100) scale = Math.max(scale, 3); + scale = Math.min(5, Math.max(1, scale)); + this.canvas.width = LW * scale; + this.canvas.height = LH * scale; + this.canvas.style.width = `${LW * scale}px`; + this.canvas.style.height = `${LH * scale}px`; + this.ctx.imageSmoothingEnabled = false; + }; + + applyEvent(ev: VisualEvent): void { + const t = String(ev.type); + switch (t) { + case "scene_reset": { + const tid = String(ev.task_id ?? ""); + this.profile = + String((ev as { visual_profile?: string }).visual_profile ?? "atc") === "icu" + ? "icu" + : "atc"; + this.mode = tid.startsWith("icu_") ? "domain" : "atc"; + this.sceneKey = resolveSceneKey(tid, this.mode); + this.palette = SCENE_PALETTES[this.sceneKey]; + this.taskSnapshot = (ev as { task?: Record }).task ?? null; + this.layout = null; + this.previewLayout = null; + this.thinking = null; + this.negPass = 0; + this.composite = 0; + this.statusLine = tid; + break; + } + case "idle_preview": { + const tid = String(ev.task_id ?? ""); + this.profile = + String((ev as { visual_profile?: string }).visual_profile ?? "atc") === "icu" + ? "icu" + : "atc"; + this.mode = tid.startsWith("icu_") ? "domain" : "atc"; + this.sceneKey = resolveSceneKey(tid, this.mode); + this.palette = SCENE_PALETTES[this.sceneKey]; + this.taskSnapshot = (ev as { task?: Record }).task ?? null; + this.layout = null; + this.previewLayout = this._layoutFromTaskPreview( + (ev as { task?: { flights?: unknown[] } }).task, + ); + this.thinking = null; + this.negPass = 0; + this.composite = 0; + const n = this.previewLayout + ? (this.previewLayout.aman_arrivals?.length ?? 0) + + (this.previewLayout.dman_departures?.length ?? 0) + : 0; + this.statusLine = + this.profile === "icu" + ? `Preview · ${n} patients (scheduled)` + : `Preview · ${n} flights (scheduled)`; + break; + } + case "idle_clear": { + this.previewLayout = null; + this.taskSnapshot = null; + this.layout = null; + this.sceneKey = "bhopal"; + this.mode = "atc"; + this.profile = "atc"; + this.palette = SCENE_PALETTES.bhopal; + this.statusLine = "Select a scenario"; + this.composite = 0; + break; + } + case "adapt_scene": + this.mode = "domain"; + this.profile = "icu"; + this.sceneKey = "icu"; + this.palette = SCENE_PALETTES.icu; + this.statusLine = `ADAPT · ${String(ev.domain_task_id ?? "")}`; + break; + case "adapt_mapping": + this.statusLine = `Mapping · ${String( + (ev as { rationale_preview?: string }).rationale_preview ?? "", + ).slice(0, 55)}`; + break; + case "llm_started": + this.thinking = String(ev.role) === "DMAN" ? "DMAN" : "AMAN"; + this.statusLine = `${this.thinking} generating…`; + break; + case "llm_finished": + this.thinking = null; + break; + case "action_layout": + case "negotiation_tick": { + const layout = (ev as { layout?: ActionLayout }).layout; + if (layout) { + this.layout = layout; + this.previewLayout = null; + } + if (t === "negotiation_tick") { + this.negPass = Number((ev as { pass?: number }).pass ?? 0); + this.statusLine = `Negotiate pass ${this.negPass}`; + } + break; + } + case "score_update": + this.composite = Number((ev as { composite?: number }).composite ?? 0); + break; + case "terminal": { + const sev = String((ev as { severity?: string }).severity); + this.statusLine = `${sev.toUpperCase()} · score ${this.composite.toFixed(3)}`; + if (sev === "catastrophic") this.catastrophicStart = performance.now(); + break; + } + case "error": + this.statusLine = `ERR: ${String((ev as { detail?: string }).detail ?? "")}`; + break; + default: + break; + } + } + + private loop(): void { + this.raf = requestAnimationFrame(this.loop); + this.decorT += 1; + this.radarAngle = (this.radarAngle + 1.4) % 360; + this.blinkT = (this.blinkT + 1) % 90; + + const scale = this.canvas.width / LW; + const ctx = this.ctx; + + let shakeX = 0, + shakeY = 0, + catElapsed = 0, + catActive = false; + if (this.catastrophicStart !== null) { + catElapsed = performance.now() - this.catastrophicStart; + const m = catastrophicMotion(catElapsed); + shakeX = m.shakeX; + shakeY = m.shakeY; + catActive = true; + } + + ctx.save(); + ctx.setTransform(scale, 0, 0, scale, 0, 0); + ctx.imageSmoothingEnabled = false; + ctx.translate(shakeX, shakeY); + this.drawWorld(ctx); + ctx.restore(); + + if (catActive) { + ctx.save(); + ctx.setTransform(scale, 0, 0, scale, 0, 0); + ctx.imageSmoothingEnabled = false; + drawCatastrophicOverlay(ctx, LW, LH, catElapsed); + ctx.restore(); + if (catastrophicMotion(catElapsed).done) this.catastrophicStart = null; + } + } + + // ───────────────────────────────────────────────────────────────────────── + // drawWorld: dispatch on profile + // ───────────────────────────────────────────────────────────────────────── + + private drawWorld(ctx: CanvasRenderingContext2D): void { + if (this.profile === "icu") { + this.drawICUWorld(ctx); + } else { + this.drawATCWorld(ctx); + } + this.drawStatusBar(ctx); + this.drawScoreOverlay(ctx); + } + + // ───────────────────────────────────────────────────────────────────────── + // ATC World + // ───────────────────────────────────────────────────────────────────────── + + private drawATCWorld(ctx: CanvasRenderingContext2D): void { + const p = this.palette; + + // Sky gradient + const sky = ctx.createLinearGradient(0, 0, 0, 120); + sky.addColorStop(0, p.skyTop); + sky.addColorStop(1, p.skyBot); + ctx.fillStyle = sky; + ctx.fillRect(0, 0, LW, 120); + + // Scene decor + this.drawATCDecor(ctx, p); + + // Radar in sky + this.drawRadarSweep(ctx, p); + + // Ground + const gnd = ctx.createLinearGradient(0, 118, 0, LH); + gnd.addColorStop(0, p.ground); + gnd.addColorStop(1, this.shade(p.ground, 0.72)); + ctx.fillStyle = gnd; + ctx.fillRect(0, 118, LW, LH - 118); + + // Taxiway line + ctx.strokeStyle = "rgba(255,200,0,0.25)"; + ctx.lineWidth = 0.5; + ctx.setLineDash([5, 4]); + ctx.beginPath(); + ctx.moveTo(0, 132); + ctx.lineTo(LW, 132); + ctx.stroke(); + ctx.setLineDash([]); + + // Runways + const runways = this.extractRunwayIds(); + const rw = 54, + rg = 14; + const totalW = runways.length * rw + (runways.length - 1) * rg; + let x0 = Math.max(14, (LW - totalW) / 2); + for (const id of runways) { + this.drawRunway(ctx, x0, 125, rw, 13, id, p); + x0 += rw + rg; + } + + // Aircraft + this.drawAircraftGlyphs(ctx, p); + } + + private drawRadarSweep(ctx: CanvasRenderingContext2D, p: ScenePalette): void { + const cx = LW * 0.78, + cy = 68, + r = 40; + const ang = (this.radarAngle * Math.PI) / 180; + const sweepW = 0.65; + + ctx.save(); + + // Radar circles + ctx.strokeStyle = `${p.accent}1a`; + ctx.lineWidth = 0.5; + for (let ri = r / 3; ri <= r; ri += r / 3) { + ctx.beginPath(); + ctx.arc(cx, cy, ri, 0, Math.PI * 2); + ctx.stroke(); + } + + // Cross-hairs + ctx.strokeStyle = `${p.accent}10`; + ctx.beginPath(); + ctx.moveTo(cx - r, cy); + ctx.lineTo(cx + r, cy); + ctx.moveTo(cx, cy - r); + ctx.lineTo(cx, cy + r); + ctx.stroke(); + + // Sweep fan (layered sectors) + for (let i = 0; i < 10; i++) { + const a0 = ang - sweepW + (i / 10) * sweepW; + const a1 = ang - sweepW + ((i + 1) / 10) * sweepW; + ctx.globalAlpha = ((i + 1) / 10) * 0.22; + ctx.fillStyle = p.accent; + ctx.beginPath(); + ctx.moveTo(cx, cy); + ctx.arc(cx, cy, r, a0, a1); + ctx.closePath(); + ctx.fill(); + } + + // Leading edge line + ctx.globalAlpha = 0.55; + ctx.strokeStyle = p.accent; + ctx.lineWidth = 1; + ctx.beginPath(); + ctx.moveTo(cx, cy); + ctx.lineTo(cx + Math.cos(ang) * r, cy + Math.sin(ang) * r); + ctx.stroke(); + + // Centre dot + ctx.globalAlpha = 0.8; + ctx.fillStyle = p.accent; + ctx.beginPath(); + ctx.arc(cx, cy, 1.5, 0, Math.PI * 2); + ctx.fill(); + + // Blips from layout slots + const lay = this._activeLayout(); + if (lay) { + const all = [ + ...(lay.aman_arrivals ?? []), + ...(lay.dman_departures ?? []), + ]; + all.slice(0, 6).forEach((slot, i) => { + const h = (slot.flight_id.charCodeAt(0) * 17 + slot.assigned_minute * 3 + i * 31) % 100; + const bx = cx + Math.cos((h / 100) * Math.PI * 2) * (r * 0.3 + (h % 12) * 2); + const by = cy + Math.sin((h / 100) * Math.PI * 2) * (r * 0.3 + (h % 10)); + const age = (this.decorT + i * 17) % 80; + if (age < 25) { + ctx.globalAlpha = ((25 - age) / 25) * 0.85; + ctx.fillStyle = p.accent; + ctx.beginPath(); + ctx.arc(bx, by, 1.5, 0, Math.PI * 2); + ctx.fill(); + } + }); + } + + ctx.globalAlpha = 1; + ctx.restore(); + } + + private drawRunway( + ctx: CanvasRenderingContext2D, + x: number, + y: number, + w: number, + h: number, + label: string, + p: ScenePalette, + ): void { + // Surface + ctx.fillStyle = p.runway; + ctx.fillRect(x, y, w, h); + + // Threshold markings + ctx.fillStyle = p.runwayMark; + for (let i = 0; i < 4; i++) { + ctx.fillRect(x + 4 + i * 5, y + 2, 2, 3); + ctx.fillRect(x + 4 + i * 5, y + h - 5, 2, 3); + } + + // Centreline dashes + ctx.strokeStyle = p.runwayMark; + ctx.lineWidth = 0.6; + ctx.setLineDash([5, 4]); + ctx.beginPath(); + ctx.moveTo(x + 10, y + h / 2); + ctx.lineTo(x + w - 10, y + h / 2); + ctx.stroke(); + ctx.setLineDash([]); + + // Edge highlight + ctx.strokeStyle = `${p.runwayMark}55`; + ctx.lineWidth = 0.5; + ctx.strokeRect(x + 0.5, y + 0.5, w - 1, h - 1); + + // Label below runway + ctx.fillStyle = p.runwayMark; + ctx.font = "6px JetBrains Mono, monospace"; + ctx.fillText(label.slice(0, 6), x + 3, y + h + 7); + } + + private drawAircraftGlyphs(ctx: CanvasRenderingContext2D, p: ScenePalette): void { + const lay = this._activeLayout(); + if (!lay) return; + const arrivals = lay.aman_arrivals ?? []; + const departures = lay.dman_departures ?? []; + const total = arrivals.length + departures.length; + if (total === 0) return; + + const spacing = Math.min(44, (LW - 28) / total); + let i = 0; + + for (const slot of arrivals) { + const gx = 14 + i * spacing; + const gy = 108 - (i % 2) * 9; + this.drawAircraft(ctx, gx, gy, slot.flight_id, "arr", p); + i++; + } + for (const slot of departures) { + const gx = 14 + i * spacing; + const gy = 114 + (i % 2) * 7; + this.drawAircraft(ctx, gx, gy, slot.flight_id, "dep", p); + i++; + } + } + + private drawAircraft( + ctx: CanvasRenderingContext2D, + x: number, + y: number, + fid: string, + kind: "arr" | "dep", + p: ScenePalette, + ): void { + const isArr = kind === "arr"; + ctx.save(); + ctx.translate(x, y); + + // Fuselage + ctx.fillStyle = isArr ? p.accent : "#dde8ff"; + ctx.beginPath(); + if (isArr) { + ctx.moveTo(14, 4); + ctx.lineTo(0, 1); + ctx.lineTo(0, 7); + ctx.closePath(); + } else { + ctx.moveTo(0, 4); + ctx.lineTo(14, 1); + ctx.lineTo(14, 7); + ctx.closePath(); + } + ctx.fill(); + + // Wings + const wc = isArr ? this.shade(p.accent, 0.65) : "#8898b8"; + ctx.fillStyle = wc; + const wx = isArr ? 4 : 4; + ctx.fillRect(wx, 0, 5, 2); + ctx.fillRect(wx, 6, 5, 2); + + // Nav blink + const blink = this.blinkT < 9 || (this.blinkT > 32 && this.blinkT < 41); + if (blink) { + ctx.fillStyle = isArr ? "#ff3030" : "#30ff80"; + ctx.fillRect(isArr ? 11 : 1, 3, 2, 2); + } + + // Flight ID + ctx.fillStyle = "rgba(200,220,245,0.85)"; + ctx.font = "5px JetBrains Mono, monospace"; + ctx.fillText(fid.slice(0, 4), 0, 14); + + ctx.restore(); + } + + private drawATCDecor(ctx: CanvasRenderingContext2D, p: ScenePalette): void { + const d = p.decor; + if (d === "rain") { + ctx.strokeStyle = "rgba(180,210,255,0.3)"; + ctx.lineWidth = 0.7; + for (let i = 0; i < 38; i++) { + const rx = ((i * 51 + this.decorT * 3) % LW) | 0; + const ry = ((i * 23 + this.decorT * 6) % 90) | 0; + ctx.beginPath(); + ctx.moveTo(rx, ry + 20); + ctx.lineTo(rx - 1, ry + 26); + ctx.stroke(); + } + } else if (d === "cranes") { + ctx.strokeStyle = "rgba(30,35,50,0.5)"; + ctx.lineWidth = 1; + for (let c = 0; c < 3; c++) { + const bx = 188 + c * 34; + ctx.beginPath(); + ctx.moveTo(bx, 120); + ctx.lineTo(bx, 68); + ctx.lineTo(bx + 26, 57); + ctx.stroke(); + ctx.beginPath(); + ctx.moveTo(bx, 68); + ctx.lineTo(bx - 4, 120); + ctx.stroke(); + // Hook line + ctx.beginPath(); + ctx.moveTo(bx + 14, 57); + ctx.lineTo(bx + 14, 80); + ctx.stroke(); + } + } else if (d === "heat") { + ctx.fillStyle = "rgba(255,170,60,0.04)"; + ctx.fillRect(0, 28, LW, 80); + } + } + + // ───────────────────────────────────────────────────────────────────────── + // ICU World + // ───────────────────────────────────────────────────────────────────────── + + private drawICUWorld(ctx: CanvasRenderingContext2D): void { + const p = this.palette; + + // Hospital background + ctx.fillStyle = "#070c18"; + ctx.fillRect(0, 0, LW, LH); + + // Subtle grid lines + ctx.strokeStyle = "rgba(18,48,78,0.35)"; + ctx.lineWidth = 0.5; + for (let gx = 0; gx < LW; gx += 20) { + ctx.beginPath(); + ctx.moveTo(gx, 22); + ctx.lineTo(gx, LH - 2); + ctx.stroke(); + } + for (let gy = 22; gy < LH; gy += 20) { + ctx.beginPath(); + ctx.moveTo(0, gy); + ctx.lineTo(LW, gy); + ctx.stroke(); + } + + // Ambient glow + const glow = ctx.createRadialGradient(LW / 2, LH / 2, 10, LW / 2, LH / 2, 110); + glow.addColorStop(0, "rgba(0,70,120,0.1)"); + glow.addColorStop(1, "transparent"); + ctx.fillStyle = glow; + ctx.fillRect(0, 0, LW, LH); + + // Ward label + ctx.fillStyle = "#1e4060"; + ctx.font = "7px JetBrains Mono, monospace"; + ctx.fillText("ICU WARD", 6, 33); + + // Central monitor line + ctx.strokeStyle = "rgba(0,180,120,0.15)"; + ctx.lineWidth = 0.5; + ctx.beginPath(); + ctx.moveTo(0, LH - 28); + ctx.lineTo(LW, LH - 28); + ctx.stroke(); + + // Beds + const beds = this.extractRunwayIds(); + const maxPerRow = Math.min(beds.length, 4); + const bedW = 60, + bedH = 32, + padX = 8, + padY = 10; + const gridW = maxPerRow * bedW + (maxPerRow - 1) * padX; + const startX = Math.max(6, (LW - gridW) / 2); + const startY = 38; + + beds.forEach((bedId, i) => { + const row = Math.floor(i / maxPerRow); + const col = i % maxPerRow; + const bx = startX + col * (bedW + padX); + const by = startY + row * (bedH + padY); + const arrN = this._activeLayout()?.aman_arrivals?.length ?? 0; + const hasPatient = arrN > 0 && i < arrN; + this.drawBedCell(ctx, bx, by, bedW, bedH, bedId, hasPatient, p); + }); + + // Patient queue below beds + this.drawPatientQueue(ctx, p, startX, startY, beds.length, maxPerRow, bedW, bedH, padX, padY); + } + + private drawBedCell( + ctx: CanvasRenderingContext2D, + x: number, + y: number, + w: number, + h: number, + label: string, + occupied: boolean, + _p: ScenePalette, + ): void { + // Frame + ctx.fillStyle = occupied ? "#0c1c30" : "#080f1c"; + ctx.strokeStyle = occupied ? "#1e5080" : "#102030"; + ctx.lineWidth = 1; + ctx.beginPath(); + ctx.rect(x, y, w, h); + ctx.fill(); + ctx.stroke(); + + // Bed surface + ctx.fillStyle = occupied ? "#142438" : "#0a1520"; + ctx.fillRect(x + 3, y + Math.floor(h * 0.46), w - 6, Math.floor(h * 0.44)); + + if (occupied) { + // Patient silhouette + ctx.fillStyle = "#2870b8"; + ctx.fillRect(x + 4, y + Math.floor(h * 0.52), w - 18, Math.floor(h * 0.28)); + + // Pillow + ctx.fillStyle = "#c8dff0"; + ctx.fillRect(x + w - 12, y + Math.floor(h * 0.5), 8, Math.floor(h * 0.3)); + + // IV drip indicator + ctx.strokeStyle = "rgba(100,200,255,0.5)"; + ctx.lineWidth = 0.6; + ctx.beginPath(); + ctx.moveTo(x + w - 4, y + 3); + ctx.lineTo(x + w - 4, y + h - 5); + ctx.stroke(); + } + + // ECG waveform + ctx.strokeStyle = occupied + ? "rgba(0,220,120,0.75)" + : "rgba(0,120,80,0.35)"; + ctx.lineWidth = 0.8; + ctx.beginPath(); + const ecgY = y + 10; + const ecgSteps = Math.floor((w - 6) / 1.4); + for (let s = 0; s <= ecgSteps; s++) { + const ex = x + 3 + s * 1.4; + const phase = s * 0.38 + this.decorT * 0.06; + const mod = phase % (Math.PI * 2); + let ey: number; + if (mod > 1.7 && mod < 1.9) ey = ecgY - 5; + else if (mod > 1.9 && mod < 2.1) ey = ecgY + 3; + else ey = ecgY + Math.sin(phase * 0.22) * 1.3; + if (s === 0) ctx.moveTo(ex, ey); + else ctx.lineTo(ex, ey); + } + ctx.stroke(); + + // Bed label + ctx.fillStyle = occupied ? "#3a80b8" : "#1a3850"; + ctx.font = "5px JetBrains Mono, monospace"; + const shortLabel = label.length > 5 ? label.slice(0, 5) : label; + ctx.fillText(shortLabel, x + 3, y + h - 2); + + // Occupied dot + if (occupied) { + ctx.fillStyle = "#00e87a"; + ctx.beginPath(); + ctx.arc(x + w - 4, y + 4, 2, 0, Math.PI * 2); + ctx.fill(); + } + } + + private drawPatientQueue( + ctx: CanvasRenderingContext2D, + _p: ScenePalette, + startX: number, + startY: number, + bedCount: number, + maxPerRow: number, + _bedW: number, + bedH: number, + _padX: number, + padY: number, + ): void { + const lay = this._activeLayout(); + if (!lay) return; + const entities = [ + ...(lay.dman_departures ?? []), + ]; + if (entities.length === 0) return; + + const rows = Math.ceil(bedCount / maxPerRow); + const queueY = startY + rows * (bedH + padY) + 4; + if (queueY > LH - 14) return; + + // Queue label + ctx.fillStyle = "#1e4060"; + ctx.font = "6px JetBrains Mono, monospace"; + ctx.fillText("PENDING", startX, queueY + 7); + + entities.slice(0, 8).forEach((slot, i) => { + const ex = startX + 44 + i * 28; + if (ex > LW - 16) return; + ctx.fillStyle = "#1a5080"; + ctx.strokeStyle = "#2a7ab8"; + ctx.lineWidth = 0.8; + ctx.beginPath(); + ctx.rect(ex, queueY, 22, 10); + ctx.fill(); + ctx.stroke(); + ctx.fillStyle = "#6ab0e0"; + ctx.font = "5px JetBrains Mono, monospace"; + ctx.fillText(slot.flight_id.slice(0, 4), ex + 2, queueY + 7); + }); + } + + // ───────────────────────────────────────────────────────────────────────── + // Shared overlays + // ───────────────────────────────────────────────────────────────────────── + + private drawStatusBar(ctx: CanvasRenderingContext2D): void { + const p = this.palette; + + ctx.fillStyle = "rgba(4,6,12,0.93)"; + ctx.fillRect(0, 0, LW, 20); + + // Bottom border + const borderColor = this.profile === "icu" ? "#1a4060" : `${p.accent}35`; + ctx.fillStyle = borderColor; + ctx.fillRect(0, 20, LW, 1); + + // Profile indicator chip + ctx.fillStyle = this.profile === "icu" ? "#0e2840" : "#0a1e30"; + ctx.strokeStyle = this.profile === "icu" ? "#2a5a80" : `${p.accent}50`; + ctx.lineWidth = 0.5; + ctx.strokeRect(3, 3, 24, 14); + ctx.fillRect(3, 3, 24, 14); + ctx.fillStyle = this.profile === "icu" ? "#40a0d0" : p.accent; + ctx.font = "6px JetBrains Mono, monospace"; + ctx.fillText(this.profile.toUpperCase(), 6, 13); + + // Status text + ctx.fillStyle = this.profile === "icu" ? "#50a8d8" : p.accent; + ctx.font = "9px JetBrains Mono, monospace"; + ctx.fillText(this.statusLine.slice(0, 36), 32, 13); + + // Thinking indicator + if (this.thinking) { + const blink = this.blinkT < 45; + ctx.fillStyle = blink ? "#ffdd44" : "#664400"; + ctx.fillText(`● ${this.thinking}`, LW - 60, 13); + } + } + + private drawScoreOverlay(ctx: CanvasRenderingContext2D): void { + if (this.composite <= 0) return; + const col = + this.composite >= 0.7 + ? "#00e87a" + : this.composite >= 0.4 + ? "#ffaa30" + : "#ff3355"; + ctx.fillStyle = "rgba(4,6,12,0.7)"; + ctx.fillRect(LW - 44, LH - 14, 44, 14); + ctx.fillStyle = col; + ctx.font = "8px JetBrains Mono, monospace"; + ctx.fillText(this.composite.toFixed(3), LW - 40, LH - 4); + } + + // ───────────────────────────────────────────────────────────────────────── + // Utilities + // ───────────────────────────────────────────────────────────────────────── + + private _activeLayout(): ActionLayout | null { + return this.layout ?? this.previewLayout; + } + + /** Build AMAN/DMAN slot lists from scheduled times (idle preview). */ + private _layoutFromTaskPreview(task: unknown): ActionLayout | null { + if (!task || typeof task !== "object") return null; + const flights = (task as { flights?: unknown[] }).flights; + if (!Array.isArray(flights) || flights.length === 0) return null; + const aman_arrivals: LayoutSlot[] = []; + const dman_departures: LayoutSlot[] = []; + for (const raw of flights) { + if (!raw || typeof raw !== "object") continue; + const f = raw as Record; + const op = String(f.operation ?? "").toLowerCase(); + const runway = Array.isArray(f.runways) && f.runways.length + ? String(f.runways[0]) + : "RWY1"; + const slot: LayoutSlot = { + flight_id: String(f.flight_id ?? "?"), + runway, + assigned_minute: Number(f.scheduled ?? f.earliest ?? 0), + hold_minutes: 0, + }; + if (op === "arrival") aman_arrivals.push(slot); + else if (op === "departure") dman_departures.push(slot); + } + if (aman_arrivals.length === 0 && dman_departures.length === 0) return null; + return { aman_arrivals, dman_departures }; + } + + private extractRunwayIds(): string[] { + const t = this.taskSnapshot as { runways?: { runway_id: string }[] } | null; + if (t?.runways?.length) return t.runways.map((r) => r.runway_id); + const lay = this._activeLayout(); + if (lay) { + const s = new Set(); + for (const a of lay.aman_arrivals ?? []) s.add(a.runway); + for (const d of lay.dman_departures ?? []) s.add(d.runway); + return [...s].sort(); + } + return this.profile === "icu" ? ["BED-1", "BED-2", "BED-3"] : ["RWY1"]; + } + + private shade(hex: string, f: number): string { + const n = parseInt(hex.replace("#", ""), 16); + if (isNaN(n)) return hex; + const r = Math.round(((n >> 16) & 0xff) * f); + const g = Math.round(((n >> 8) & 0xff) * f); + const b = Math.round((n & 0xff) * f); + return `rgb(${r},${g},${b})`; + } +} diff --git a/space_frontend/src/engine/catastrophicFailure.ts b/space_frontend/src/engine/catastrophicFailure.ts new file mode 100644 index 0000000000000000000000000000000000000000..94117201e6e521addd49aefe94b787f00662b6f5 --- /dev/null +++ b/space_frontend/src/engine/catastrophicFailure.ts @@ -0,0 +1,65 @@ +/** + * Single shared full-screen FX for `terminal.severity === "catastrophic"`. + */ + +const DURATION_MS = 2800; + +export type CatastrophicMotion = { + shakeX: number; + shakeY: number; + done: boolean; +}; + +export function catastrophicMotion(elapsedMs: number): CatastrophicMotion { + const t = Math.min(1, elapsedMs / DURATION_MS); + const shakeAmp = Math.max(0, 6 * (1 - t * 1.2)); + const shakeX = Math.round( + (Math.sin(elapsedMs * 0.09) + Math.sin(elapsedMs * 0.031)) * shakeAmp, + ); + const shakeY = Math.round( + (Math.cos(elapsedMs * 0.084) + Math.cos(elapsedMs * 0.029)) * shakeAmp, + ); + return { shakeX, shakeY, done: elapsedMs >= DURATION_MS }; +} + +/** Full-screen vignette + pixel burst (call in logical pixel space, 320×180). */ +export function drawCatastrophicOverlay( + ctx: CanvasRenderingContext2D, + w: number, + h: number, + elapsedMs: number, +): void { + const t = Math.min(1, elapsedMs / DURATION_MS); + const phase = t < 0.15 ? t / 0.15 : t < 0.55 ? (t - 0.15) / 0.4 : (t - 0.55) / 0.45; + const overlayAlpha = t < 0.2 ? t * 2.2 : t < 0.65 ? 0.55 + phase * 0.25 : Math.max(0, 0.85 - (t - 0.65) * 2.2); + + const g = ctx.createRadialGradient( + w * 0.5, + h * 0.48, + Math.max(w, h) * 0.05, + w * 0.5, + h * 0.5, + Math.max(w, h) * 0.85, + ); + g.addColorStop(0, `rgba(255,80,40,${0.12 * overlayAlpha})`); + g.addColorStop(0.55, `rgba(120,0,20,${0.55 * overlayAlpha})`); + g.addColorStop(1, `rgba(10,0,0,${0.92 * overlayAlpha})`); + ctx.fillStyle = g; + ctx.fillRect(0, 0, w, h); + + const seed = Math.floor(elapsedMs / 40); + const n = 48; + for (let i = 0; i < n; i++) { + const a = ((i * 997 + seed * 13) % 1000) / 1000; + const b = ((i * 541 + seed * 7) % 1000) / 1000; + const ang = a * Math.PI * 2; + const dist = (b * 0.4 + t * 0.55) * Math.max(w, h) * 0.55; + const px = Math.floor(w * 0.5 + Math.cos(ang) * dist * (0.3 + t)); + const py = Math.floor(h * 0.45 + Math.sin(ang) * dist * (0.25 + t)); + const sz = 2 + ((i * 3) % 4); + ctx.fillStyle = i % 3 === 0 ? "#ff4444" : i % 3 === 1 ? "#ffcc00" : "#ffffff"; + ctx.globalAlpha = Math.max(0, 1 - t * 0.95); + ctx.fillRect(px, py, sz, sz); + } + ctx.globalAlpha = 1; +} diff --git a/space_frontend/src/index.css b/space_frontend/src/index.css new file mode 100644 index 0000000000000000000000000000000000000000..3c2491d83b2fd1b98402781ef3a00371f1f980e2 --- /dev/null +++ b/space_frontend/src/index.css @@ -0,0 +1,1818 @@ +@import url("https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=JetBrains+Mono:wght@400;600&display=swap"); + +/* ── Design tokens ─────────────────────────────────────────────────────────── */ +:root { + color-scheme: dark; + --bg: #050810; + --panel: #0b1420; + --surface: #101d2c; + --surface2: #152030; + --border: #1c2e40; + --border-bright: #2a4260; + --text: #c8dae8; + --text-dim: #8aa0b8; + --muted: #4a6478; + --accent: #00cfff; + --accent-dim: #006080; + --green: #00e87a; + --green-dim: #005a30; + --amber: #ffaa30; + --red: #ff3355; + --purple: #aa55ff; + --scan-line: rgba(0, 10, 20, 0.18); +} + +/* ── Reset ──────────────────────────────────────────────────────────────────── */ +*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; } + +html { + scroll-behavior: smooth; +} + +html, body { + min-height: 100%; + font-family: "DM Sans", system-ui, sans-serif; + font-size: 16px; + background: var(--bg); + color: var(--text); + overflow-x: hidden; + overflow-y: auto; + -webkit-font-smoothing: antialiased; +} + +#root { + min-height: 100%; + display: flex; + flex-direction: column; +} + +.mono { font-family: "JetBrains Mono", ui-monospace, monospace; } + +/* ── Scrollbar ──────────────────────────────────────────────────────────────── */ +::-webkit-scrollbar { width: 5px; } +::-webkit-scrollbar-track { background: transparent; } +::-webkit-scrollbar-thumb { background: var(--border-bright); border-radius: 3px; } +::-webkit-scrollbar-thumb:hover { background: #3a5570; } + +/* ── Root layout (page scrolls; header stays visible) ───────────────────────── */ +.app-layout { + display: flex; + flex-direction: column; + min-height: 100vh; +} + +.app-scroll { + flex: 1; + display: flex; + flex-direction: column; + width: 100%; + padding-bottom: 2.5rem; +} + +/* Full-width scenario strip above the 3-column workspace */ +.scenario-hero { + border-bottom: 1px solid var(--border); + background: linear-gradient(180deg, rgba(0, 55, 90, 0.22) 0%, var(--panel) 55%); +} + +.scenario-hero--compact { + padding-top: 0.35rem; + padding-bottom: 0.35rem; +} + +.scenario-hero-inner { + max-width: 1400px; + margin: 0 auto; + padding: 1.35rem 1.75rem 1.5rem; +} + +.scenario-hero--compact .scenario-hero-inner { + padding: 0.65rem 1.25rem; +} + +.scenario-hero-top { + display: flex; + flex-wrap: wrap; + align-items: flex-start; + gap: 1rem 1.5rem; +} + +.scenario-hero-icon { + font-size: 1.75rem; + opacity: 0.75; + line-height: 1; +} + +.scenario-hero-text { + flex: 1 1 280px; + min-width: 0; +} + +.scenario-hero-title { + font-size: 1.35rem; + font-weight: 700; + letter-spacing: -0.02em; + color: var(--text); + line-height: 1.25; + margin-bottom: 0.45rem; +} + +.scenario-hero-desc { + font-size: 0.92rem; + line-height: 1.55; + color: var(--text-dim); + max-width: 72ch; +} + +.scenario-hero-badges { + display: flex; + flex-wrap: wrap; + align-items: center; + gap: 0.45rem; + justify-content: flex-end; + flex: 0 1 auto; +} + +.scenario-domain-pill { + font-size: 0.68rem; + font-weight: 600; + letter-spacing: 0.06em; + text-transform: uppercase; + padding: 0.28rem 0.65rem; + border-radius: 6px; + border: 1px solid var(--border-bright); + color: var(--text-dim); + background: var(--surface); +} + +.scenario-hero-stats { + display: flex; + flex-wrap: wrap; + align-items: stretch; + gap: 1rem 1.25rem; + margin-top: 1.25rem; + padding-top: 1.1rem; + border-top: 1px solid rgba(28, 46, 64, 0.75); +} + +.scenario-hero--compact .scenario-hero-stats { + display: none; +} + +.scenario-stat-card { + min-width: 120px; + padding: 0.65rem 1rem; + border-radius: 8px; + background: var(--surface); + border: 1px solid var(--border); +} + +.scenario-stat-label { + display: block; + font-size: 0.62rem; + font-weight: 700; + letter-spacing: 0.08em; + text-transform: uppercase; + color: var(--muted); + margin-bottom: 0.35rem; +} + +.scenario-stat-value { + font-size: 1.35rem; + font-weight: 700; + color: var(--text); +} + +.scenario-diff-track { + flex: 1 1 220px; + min-width: 200px; + padding: 0.65rem 1rem; + border-radius: 8px; + background: var(--surface); + border: 1px solid var(--border); +} + +.scenario-diff-label { + display: block; + font-size: 0.62rem; + font-weight: 700; + letter-spacing: 0.08em; + text-transform: uppercase; + color: var(--muted); + margin-bottom: 0.45rem; +} + +.scenario-diff-current { + display: inline-block; + margin-top: 0.45rem; + font-size: 0.78rem; + color: var(--text-dim); +} + +.td-diff-bar--spaced { + margin-left: 0; + gap: 0.28rem; +} + +.td-diff-bar--spaced .td-diff-step { + width: 18px; + height: 5px; +} + +/* Main workspace: three columns, aligned to top, generous gutters */ +.app-columns { + display: grid; + grid-template-columns: minmax(280px, 320px) minmax(400px, 1fr) minmax(340px, 460px); + gap: 1rem 1.75rem; + max-width: 1680px; + margin: 0 auto; + width: 100%; + padding: 1.35rem 1.75rem 0; + align-items: stretch; +} + +/* ── Header ─────────────────────────────────────────────────────────────────── */ +.app-header { + display: flex; + align-items: center; + gap: 1.15rem; + min-height: 68px; + padding: 0.35rem 1.5rem; + background: var(--panel); + border-bottom: 1px solid var(--border); + flex-shrink: 0; + position: sticky; + top: 0; + z-index: 20; +} + +.header-brand { + display: flex; + align-items: center; + gap: 0.55rem; + flex-shrink: 0; +} + +.brand-glyph { + width: 40px; + height: 40px; + border-radius: 10px; + background: linear-gradient(135deg, #003a5a 0%, #005a80 100%); + border: 1px solid var(--accent-dim); + display: flex; + align-items: center; + justify-content: center; + font-size: 1rem; + color: var(--accent); + flex-shrink: 0; +} + +.brand-text { display: flex; flex-direction: column; } + +.brand-main { + font-size: 1.12rem; + font-weight: 700; + letter-spacing: 0.05em; + color: var(--text); + line-height: 1; +} + +.brand-sub { + font-size: 0.72rem; + color: var(--muted); + letter-spacing: 0.08em; + text-transform: uppercase; + line-height: 1.25; +} + +.header-divider { + width: 1px; + height: 24px; + background: var(--border); + flex-shrink: 0; +} + +.header-badge { + display: flex; + align-items: center; + gap: 0.35rem; + font-size: 0.72rem; + font-weight: 600; + letter-spacing: 0.07em; + text-transform: uppercase; + color: var(--muted); + padding: 0.32rem 0.65rem; + border-radius: 6px; + border: 1px solid var(--border); + flex-shrink: 0; +} + +.header-badge .dot { + width: 6px; + height: 6px; + border-radius: 50%; + background: var(--green); +} + +.header-badge.running .dot { animation: pulse-dot 1s ease-in-out infinite; } + +@keyframes pulse-dot { + 0%, 100% { opacity: 1; transform: scale(1); } + 50% { opacity: 0.5; transform: scale(0.7); } +} + +.header-spacer { flex: 1; } + +.header-controls { + display: flex; + align-items: center; + gap: 0.6rem; + flex-shrink: 0; +} + +.llm-toggle { + display: flex; + align-items: center; + gap: 0.4rem; + font-size: 0.78rem; + font-weight: 600; + letter-spacing: 0.06em; + text-transform: uppercase; + color: var(--text-dim); + cursor: pointer; + flex-shrink: 0; +} + +.llm-toggle input[type="checkbox"] { + width: 14px; + height: 14px; + cursor: pointer; + accent-color: var(--accent); +} + +.model-select { + font: inherit; + font-size: 0.82rem; + padding: 0.38rem 0.7rem; + background: var(--surface); + color: var(--text); + border: 1px solid var(--border-bright); + border-radius: 6px; + min-width: 240px; + cursor: pointer; +} + +.model-select:focus { + outline: none; + border-color: var(--accent-dim); +} + +/* ── Sidebar left (task browser) ─────────────────────────────────────────────── */ +.sidebar-left { + border: 1px solid var(--border); + border-radius: 10px; + display: flex; + flex-direction: column; + overflow: visible; + background: var(--panel); + align-self: stretch; +} + +/* ── Task Browser ────────────────────────────────────────────────────────────── */ +.task-browser { + display: flex; + flex-direction: column; + min-height: 0; +} + +.browser-header { + display: flex; + align-items: center; + justify-content: space-between; + padding: 0.65rem 0.85rem 0.4rem; + border-bottom: 1px solid var(--border); + flex-shrink: 0; +} + +.browser-title { + font-size: 0.72rem; + font-weight: 700; + letter-spacing: 0.1em; + text-transform: uppercase; + color: var(--muted); +} + +.browser-count { + font-size: 0.62rem; + font-family: "JetBrains Mono", monospace; + color: var(--muted); + background: var(--surface); + padding: 0.1rem 0.35rem; + border-radius: 3px; +} + +.filter-tabs { + display: grid; + grid-template-columns: 1fr 1fr; + border-bottom: 1px solid var(--border); + flex-shrink: 0; +} + +.filter-tab { + font: inherit; + font-size: 0.74rem; + font-weight: 600; + letter-spacing: 0.07em; + text-transform: uppercase; + color: var(--muted); + background: transparent; + border: none; + border-bottom: 2px solid transparent; + padding: 0.62rem 0.4rem; + cursor: pointer; + transition: color 0.15s, border-color 0.15s; + display: flex; + align-items: center; + justify-content: center; + gap: 0.3rem; +} + +.filter-tab:hover { color: var(--text-dim); } +.filter-tab.active { color: var(--text); border-bottom-color: var(--accent); } +.filter-tab.active.icu { border-bottom-color: var(--purple); } + +.tab-count { + font-size: 0.55rem; + background: var(--surface); + padding: 0.05rem 0.3rem; + border-radius: 3px; +} + +.task-list { + flex: 1; + overflow-y: auto; + padding: 0.5rem; + display: flex; + flex-direction: column; + gap: 0.4rem; +} + +.task-card { + width: 100%; + text-align: left; + background: var(--surface); + border: 1px solid var(--border); + border-radius: 7px; + padding: 0.65rem 0.7rem; + cursor: pointer; + transition: border-color 0.15s, background 0.15s, box-shadow 0.15s; + display: flex; + flex-direction: column; + gap: 0.35rem; +} + +.task-card:hover { + border-color: var(--border-bright); + background: var(--surface2); +} + +.task-card.selected { + border-color: var(--accent); + background: rgba(0, 207, 255, 0.05); + box-shadow: 0 0 0 1px rgba(0, 207, 255, 0.1) inset; +} + +.task-card.domain.selected { + border-color: var(--purple); + background: rgba(170, 85, 255, 0.05); + box-shadow: 0 0 0 1px rgba(170, 85, 255, 0.1) inset; +} + +.task-card-top { + display: flex; + align-items: center; + gap: 0.4rem; +} + +.task-icon { + font-size: 0.85rem; + flex-shrink: 0; + opacity: 0.75; +} + +.task-label { + flex: 1; + font-size: 0.86rem; + font-weight: 600; + color: var(--text); + line-height: 1.2; +} + +/* Tier badges */ +.tier-badge { + font-size: 0.55rem; + font-weight: 700; + font-family: "JetBrains Mono", monospace; + padding: 0.12rem 0.36rem; + border-radius: 3px; + letter-spacing: 0.04em; + flex-shrink: 0; +} + +.tier-0 { background: #102840; color: #5aace0; } +.tier-1 { background: #103828; color: #50c880; } +.tier-2 { background: #303010; color: #c8c040; } +.tier-3 { background: #302010; color: #d08030; } +.tier-4 { background: #300808; color: #d03030; } + +.task-desc { + font-size: 0.72rem; + color: var(--text-dim); + line-height: 1.5; + display: -webkit-box; + -webkit-box-orient: vertical; + -webkit-line-clamp: 3; + overflow: hidden; +} + +.task-meta { + display: flex; + align-items: center; + gap: 0.3rem; + flex-wrap: wrap; +} + +.diff-badge { + font-size: 0.58rem; + font-weight: 600; + letter-spacing: 0.04em; +} + +.diff-introductory { color: #50c880; } +.diff-easy { color: #80c850; } +.diff-medium { color: #c8c040; } +.diff-hard { color: #d08030; } +.diff-expert { color: #d03030; } + +.meta-pill { + font-size: 0.58rem; + font-family: "JetBrains Mono", monospace; + color: var(--muted); + background: var(--bg); + padding: 0.1rem 0.35rem; + border-radius: 3px; + border: 1px solid var(--border); +} + +/* ── Center panel ────────────────────────────────────────────────────────────── */ +.center-panel { + display: flex; + flex-direction: column; + overflow: hidden; + min-width: 0; + min-height: 520px; + background: var(--bg); + border: 1px solid var(--border); + border-radius: 10px; + align-self: stretch; +} + +.task-header-bar { + padding: 0.6rem 1rem 0.5rem; + border-bottom: 1px solid var(--border); + flex-shrink: 0; + background: var(--panel); +} + +.task-header-label { + display: block; + font-size: 0.82rem; + font-weight: 600; + color: var(--text); + margin-bottom: 0.15rem; +} + +.task-header-desc { + display: block; + font-size: 0.65rem; + color: var(--muted); + line-height: 1.4; + max-width: 600px; +} + +.canvas-shell { + flex: 1 1 auto; + display: flex; + align-items: center; + justify-content: center; + min-height: min(58vh, 720px); + padding: 1.25rem 1.5rem; + background: + radial-gradient(ellipse 70% 60% at 50% 50%, rgba(0, 80, 120, 0.12) 0%, transparent 70%), + var(--bg); + position: relative; + overflow: hidden; + border-radius: 0 0 10px 10px; +} + +/* CRT scanline overlay */ +.canvas-shell::after { + content: ""; + pointer-events: none; + position: absolute; + inset: 0; + background: repeating-linear-gradient( + 0deg, + transparent, + transparent 2px, + var(--scan-line) 2px, + var(--scan-line) 3px + ); + opacity: 0.4; + z-index: 1; +} + +canvas, +.sim-canvas { + display: block; + image-rendering: pixelated; + image-rendering: crisp-edges; + position: relative; + z-index: 0; + max-width: 100%; +} + +.idle-overlay { + position: absolute; + inset: 0; + display: flex; + flex-direction: column; + align-items: center; + justify-content: center; + gap: 0.5rem; + z-index: 2; + pointer-events: none; +} + +.idle-overlay-glyph { + font-size: 2.5rem; + opacity: 0.12; +} + +.idle-overlay-text { + font-size: 0.65rem; + font-weight: 600; + letter-spacing: 0.12em; + text-transform: uppercase; + color: var(--muted); + opacity: 0.6; +} + +/* Controls bar (above the animation — matches panel top radius) */ +.episode-controls { + display: flex; + align-items: center; + gap: 0.85rem; + padding: 1rem 1.25rem 1.1rem; + border-bottom: 1px solid var(--border); + flex-shrink: 0; + background: var(--panel); + border-radius: 10px 10px 0 0; +} + +.control-label { + display: flex; + align-items: center; + gap: 0.4rem; + font-size: 0.65rem; + font-weight: 600; + letter-spacing: 0.07em; + text-transform: uppercase; + color: var(--muted); + flex-shrink: 0; +} + +.episode-input { + font: inherit; + font-family: "JetBrains Mono", monospace; + font-size: 0.8rem; + width: 52px; + padding: 0.3rem 0.4rem; + background: var(--surface); + color: var(--text); + border: 1px solid var(--border-bright); + border-radius: 4px; + text-align: center; +} + +.episode-input:focus { outline: none; border-color: var(--accent-dim); } + +.control-spacer { flex: 1; } + +.btn-run { + font: inherit; + font-size: 0.8rem; + font-weight: 700; + letter-spacing: 0.04em; + padding: 0.45rem 1.4rem; + background: linear-gradient(180deg, #005a80 0%, #003a58 100%); + color: var(--accent); + border: 1px solid var(--accent-dim); + border-radius: 6px; + cursor: pointer; + transition: background 0.15s, box-shadow 0.15s; +} + +.btn-run:hover:not(:disabled) { + background: linear-gradient(180deg, #006a95 0%, #004a6a 100%); + box-shadow: 0 0 12px rgba(0, 207, 255, 0.2); +} + +.btn-run:disabled { + opacity: 0.35; + cursor: not-allowed; +} + +.btn-stop { + font: inherit; + font-size: 0.8rem; + font-weight: 700; + padding: 0.45rem 1.1rem; + background: rgba(255, 51, 85, 0.12); + color: var(--red); + border: 1px solid rgba(255, 51, 85, 0.35); + border-radius: 6px; + cursor: pointer; + transition: background 0.15s; +} + +.btn-stop:hover { background: rgba(255, 51, 85, 0.2); } + +/* ── Right panel ─────────────────────────────────────────────────────────────── */ +.right-panel { + border: none; + border-radius: 0; + display: flex; + flex-direction: column; + gap: 1rem; + overflow: visible; + background: transparent; + align-self: stretch; + min-height: 0; + flex: 1 1 auto; +} + +/* Fill column height: score fixed, log+history share space, API compact */ +.right-panel > .insight-compartment:nth-of-type(1) { + flex: 0 0 auto; +} + +.right-panel > .insight-compartment:nth-of-type(2), +.right-panel > .insight-compartment:nth-of-type(3) { + flex: 1 1 0; + min-height: 200px; +} + +.right-panel > .insight-compartment:nth-of-type(4) { + flex: 0 1 300px; + min-height: 160px; +} + +/* Separate stacked panels (replaces tabbed single bubble) */ +.insight-compartment { + border: 1px solid var(--border); + border-radius: 10px; + background: var(--panel); + display: flex; + flex-direction: column; + min-height: 0; + overflow: hidden; +} + +.insight-compartment-head { + display: flex; + align-items: center; + justify-content: space-between; + gap: 0.5rem; + padding: 0.65rem 1rem; + font-size: 0.72rem; + font-weight: 700; + letter-spacing: 0.1em; + text-transform: uppercase; + color: var(--text-dim); + background: linear-gradient(180deg, var(--surface2) 0%, var(--panel) 100%); + border-bottom: 1px solid var(--border); + flex-shrink: 0; +} + +.insight-compartment-meta { + font-size: 0.68rem; + font-weight: 600; + letter-spacing: 0.04em; + color: var(--accent); + background: rgba(0, 207, 255, 0.08); + border: 1px solid rgba(0, 207, 255, 0.22); + padding: 0.12rem 0.45rem; + border-radius: 4px; +} + +.insight-compartment-body { + flex: 1; + min-height: 0; + display: flex; + flex-direction: column; +} + +.insight-compartment-body--tight { + flex: 0 0 auto; +} + +.insight-compartment-body--tight .score-panel { + border-bottom: none; +} + +.insight-compartment-body--fill { + flex: 1 1 auto; + min-height: 0; +} + +.insight-compartment-body--scroll { + flex: 1 1 auto; + min-height: 0; + overflow: hidden; + display: flex; + flex-direction: column; +} + +/* ── Score Panel ─────────────────────────────────────────────────────────────── */ +.score-panel { + flex-shrink: 0; + border-bottom: 1px solid var(--border); + padding-bottom: 0.25rem; +} + +.panel-section { + padding: 1rem 1.1rem 0.85rem; + border-bottom: 1px solid var(--border); +} + +.panel-section:last-child { border-bottom: none; } + +.panel-title { + font-size: 0.65rem; + font-weight: 700; + letter-spacing: 0.1em; + text-transform: uppercase; + color: var(--muted); + margin-bottom: 0.65rem; +} + +.agent-thinking { + display: flex; + align-items: center; + gap: 0.5rem; + padding: 0.45rem 0.85rem; + background: rgba(255, 221, 68, 0.06); + border-bottom: 1px solid rgba(255, 221, 68, 0.15); +} + +.thinking-pulse { + width: 8px; + height: 8px; + border-radius: 50%; + background: #ffdd44; + flex-shrink: 0; + animation: thinking-anim 0.8s ease-in-out infinite; +} + +@keyframes thinking-anim { + 0%, 100% { opacity: 1; transform: scale(1); } + 50% { opacity: 0.4; transform: scale(0.65); } +} + +.thinking-text { + font-size: 0.7rem; + font-weight: 600; + color: #ffdd44; +} + +.thinking-action { + font-weight: 400; + color: #cc9933; +} + +.score-task-label { + font-size: 0.68rem; + color: var(--text-dim); + margin-bottom: 0.5rem; + padding-bottom: 0.4rem; + border-bottom: 1px solid var(--border); +} + +.composite-display { + display: flex; + flex-direction: column; + gap: 0.45rem; +} + +.composite-value { + font-size: clamp(2.2rem, 5vw, 3.1rem); + font-weight: 700; + letter-spacing: -0.02em; + line-height: 1; + transition: color 0.4s; +} + +.composite-bar-wrap { + height: 4px; + background: var(--surface); + border-radius: 2px; + overflow: hidden; +} + +.composite-bar-fill { + height: 100%; + border-radius: 2px; + transition: width 0.5s ease; + min-width: 0; +} + +.status-badge { + display: inline-flex; + align-items: center; + font-size: 0.62rem; + font-weight: 700; + letter-spacing: 0.08em; + text-transform: uppercase; + padding: 0.22rem 0.55rem; + border-radius: 4px; + border: 1px solid; + align-self: flex-start; +} + +.sev-success { color: var(--green); border-color: rgba(0,232,122,0.3); background: rgba(0,232,122,0.08); } +.sev-degraded { color: var(--amber); border-color: rgba(255,170,48,0.3); background: rgba(255,170,48,0.08); } +.sev-catastrophic { color: var(--red); border-color: rgba(255,51,85,0.3); background: rgba(255,51,85,0.08); } +.sev-running { color: var(--accent); border-color: rgba(0,207,255,0.3); background: rgba(0,207,255,0.08); } +.sev-done { color: var(--text-dim); border-color: var(--border); background: transparent; } +.sev-idle { color: var(--muted); border-color: var(--border); background: transparent; } + +.blink-dot { animation: blink 1s step-end infinite; } +@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } } + +/* Per-agent score bars */ +.score-row { + display: grid; + grid-template-columns: 3rem 1fr 3.5rem; + align-items: center; + gap: 0.5rem; + margin-bottom: 0.45rem; +} + +.score-label { + font-size: 0.62rem; + font-weight: 700; + letter-spacing: 0.06em; + color: var(--text-dim); +} + +.score-bar-track { + height: 5px; + background: var(--surface); + border-radius: 3px; + overflow: hidden; +} + +.score-bar-fill { + height: 100%; + border-radius: 3px; + transition: width 0.4s ease; +} + +.score-value { + font-size: 0.68rem; + text-align: right; + color: var(--text); +} + +/* Metrics grid */ +.metrics-grid { + display: grid; + grid-template-columns: repeat(3, 1fr); + gap: 0.65rem; +} + +.metric-cell { + display: flex; + flex-direction: column; + gap: 0.25rem; + background: var(--surface); + border-radius: 8px; + padding: 0.55rem 0.65rem; + min-height: 3.5rem; + justify-content: center; +} + +.metric-key { + font-size: 0.6rem; + font-weight: 600; + letter-spacing: 0.06em; + text-transform: uppercase; + color: var(--muted); +} + +.metric-val { + font-size: 1.15rem; + font-weight: 700; + line-height: 1; +} + +.val-green { color: var(--green); } +.val-amber { color: var(--amber); } +.val-red { color: var(--red); } +.val-accent { color: var(--accent); } + +/* ── Event Log ───────────────────────────────────────────────────────────────── */ +.event-log { + flex: 1; + display: flex; + flex-direction: column; + padding: 0.85rem 1rem 1rem; + min-height: 0; + overflow: hidden; +} + +.event-log--embedded { + padding: 0.55rem 0.85rem 0.75rem; + flex: 1; + min-height: 0; +} + +.event-log .panel-title { margin-bottom: 0.4rem; } + +.log-entries { + flex: 1; + overflow-y: auto; + min-height: 0; + padding-right: 0.25rem; +} + +.log-empty { + font-size: 0.65rem; + color: var(--muted); + font-style: italic; + padding: 0.3rem 0; +} + +.log-entry { + padding: 0.55rem 0; + border-bottom: 1px solid rgba(28, 46, 64, 0.45); +} + +.log-entry:last-of-type { + border-bottom: none; +} + +.log-entry-head { + display: flex; + flex-wrap: wrap; + align-items: center; + gap: 0.5rem 0.85rem; + margin-bottom: 0.2rem; +} + +.log-ts { + font-size: 0.68rem; + color: var(--muted); +} + +.log-type { + font-size: 0.72rem; + font-weight: 600; +} + +.log-detail { + font-size: 0.78rem; + color: var(--text-dim); + line-height: 1.45; + word-break: break-word; + white-space: normal; + padding-left: 0.05rem; +} + +.tab-badge { + font-size: 0.52rem; + background: var(--accent-dim); + color: var(--accent); + padding: 0.05rem 0.28rem; + border-radius: 3px; +} + +/* ── Project Brief ───────────────────────────────────────────────────────────── */ +.project-brief { + padding: 1.35rem 1.15rem 1.5rem; + border-bottom: 1px solid var(--border); + flex-shrink: 0; + background: + radial-gradient(ellipse 120% 80% at 50% 0%, rgba(0,207,255,0.07) 0%, transparent 60%), + linear-gradient(180deg, rgba(0,40,70,0.35) 0%, rgba(0,20,40,0.1) 100%); + display: flex; + flex-direction: column; + gap: 1rem; + position: relative; +} + +/* Subtle top accent line */ +.project-brief::before { + content: ""; + position: absolute; + top: 0; left: 0; right: 0; + height: 2px; + background: linear-gradient(90deg, transparent 0%, var(--accent) 40%, var(--purple) 70%, transparent 100%); + opacity: 0.5; +} + +.project-brief--active::before { + opacity: 1; + background: linear-gradient(90deg, transparent 0%, var(--accent) 30%, var(--purple) 60%, transparent 100%); + animation: pb-top-line 2s ease-in-out infinite alternate; +} + +@keyframes pb-top-line { + from { opacity: 0.7; } + to { opacity: 1; } +} + +/* Wordmark row */ +.pb-wordmark { + display: flex; + align-items: center; + gap: 0.7rem; +} + +.pb-wordmark-glyph { + font-size: 2rem; + color: var(--accent); + line-height: 1; + flex-shrink: 0; + filter: drop-shadow(0 0 8px rgba(0,207,255,0.5)); + animation: glyph-spin 8s linear infinite; +} + +@keyframes glyph-spin { + 0% { filter: drop-shadow(0 0 6px rgba(0,207,255,0.4)); } + 50% { filter: drop-shadow(0 0 12px rgba(0,207,255,0.7)); } + 100% { filter: drop-shadow(0 0 6px rgba(0,207,255,0.4)); } +} + +.pb-wordmark-text { + font-size: 1.7rem; + font-weight: 800; + letter-spacing: 0.2em; + background: linear-gradient(135deg, var(--text) 0%, var(--accent) 100%); + -webkit-background-clip: text; + -webkit-text-fill-color: transparent; + background-clip: text; + line-height: 1; +} + +.pb-wordmark-sub { + font-size: 0.56rem; + font-weight: 600; + letter-spacing: 0.1em; + text-transform: uppercase; + color: var(--muted); + margin-top: 0.3rem; +} + +/* Description */ +.pb-desc { + font-size: 0.8rem; + color: var(--text-dim); + line-height: 1.7; + border-left: 2px solid rgba(0,207,255,0.25); + padding-left: 0.75rem; +} + +.pb-desc strong { color: var(--text); } +.pb-desc em { + color: var(--accent); + font-style: normal; + font-weight: 700; +} + +/* Tag row */ +.pb-tags { + display: flex; + gap: 0.35rem; + flex-wrap: wrap; +} + +.pb-tag { + font-size: 0.57rem; + font-weight: 700; + letter-spacing: 0.07em; + text-transform: uppercase; + padding: 0.2rem 0.55rem; + border-radius: 4px; + border: 1px solid; +} + +.pb-tag--atc { color: var(--accent); border-color: rgba(0,207,255,0.3); background: rgba(0,207,255,0.08); } +.pb-tag--grpo { color: var(--green); border-color: rgba(0,232,122,0.3); background: rgba(0,232,122,0.08); } +.pb-tag--llm { color: var(--purple); border-color: rgba(170,85,255,0.3); background: rgba(170,85,255,0.08); } +.pb-tag--transfer { color: var(--amber); border-color: rgba(255,170,48,0.3); background: rgba(255,170,48,0.08); } + +/* ── ADAPT feature section ──────────────────────────────────────────────────── */ +.pb-adapt-section { + display: flex; + flex-direction: column; + gap: 0.55rem; +} + +/* Animated "click me" hint above the button */ +.pb-adapt-cta-hint { + display: flex; + align-items: center; + justify-content: center; + gap: 0.45rem; + font-size: 0.6rem; + font-weight: 700; + letter-spacing: 0.1em; + text-transform: uppercase; + color: var(--purple); + animation: cta-bounce 1.6s ease-in-out infinite; +} + +.pb-adapt-cta-arrow { + font-size: 0.55rem; + animation: cta-bounce 1.6s ease-in-out infinite; +} + +@keyframes cta-bounce { + 0%, 100% { transform: translateY(0); opacity: 0.7; } + 50% { transform: translateY(3px); opacity: 1; } +} + +/* The ADAPT button itself */ +.pb-adapt-btn { + width: 100%; + padding: 0; + border-radius: 12px; + border: 1.5px solid rgba(170,85,255,0.4); + background: rgba(170,85,255,0.07); + cursor: pointer; + position: relative; + overflow: hidden; + transition: border-color 0.2s, background 0.2s, box-shadow 0.3s, transform 0.15s; + /* Idle shimmer to grab attention */ + animation: adapt-idle-shimmer 3s ease-in-out infinite; +} + +@keyframes adapt-idle-shimmer { + 0%, 100% { box-shadow: 0 0 0px rgba(170,85,255,0); } + 50% { box-shadow: 0 0 16px rgba(170,85,255,0.28), 0 0 30px rgba(170,85,255,0.1); } +} + +.pb-adapt-btn:hover { + border-color: rgba(170,85,255,0.75); + background: rgba(170,85,255,0.13); + box-shadow: 0 0 22px rgba(170,85,255,0.4), 0 0 50px rgba(170,85,255,0.18); + transform: translateY(-1px); + animation: none; +} + +.pb-adapt-btn:active { transform: translateY(0); } + +/* Animated sweep layer */ +.pb-adapt-btn-sweep { + position: absolute; + inset: 0; + background: linear-gradient( + 105deg, + transparent 30%, + rgba(170,85,255,0.12) 50%, + transparent 70% + ); + background-size: 200% 100%; + animation: sweep 2.8s ease-in-out infinite; + pointer-events: none; +} + +@keyframes sweep { + 0% { background-position: 200% 0; } + 100% { background-position: -200% 0; } +} + +/* Radial glow behind the content */ +.pb-adapt-btn::before { + content: ""; + position: absolute; + inset: 0; + background: radial-gradient(ellipse 85% 70% at 50% 50%, rgba(170,85,255,0.16) 0%, transparent 70%); + opacity: 0; + transition: opacity 0.3s; + pointer-events: none; +} + +.pb-adapt-btn:hover::before, +.pb-adapt-btn--active::before { opacity: 1; } + +/* Active state */ +.pb-adapt-btn--active { + border-color: var(--purple); + background: rgba(170,85,255,0.16); + animation: adapt-active-glow 2s ease-in-out infinite; + transform: none; +} + +@keyframes adapt-active-glow { + 0%, 100% { + box-shadow: + 0 0 20px rgba(170,85,255,0.45), + 0 0 50px rgba(170,85,255,0.2), + inset 0 0 0 1px rgba(170,85,255,0.3); + } + 50% { + box-shadow: + 0 0 32px rgba(170,85,255,0.65), + 0 0 80px rgba(170,85,255,0.3), + inset 0 0 0 1px rgba(170,85,255,0.5); + } +} + +.pb-adapt-btn--active:hover { animation: adapt-active-glow 2s ease-in-out infinite; transform: none; } + +/* Inner content layout */ +.pb-adapt-btn-inner { + display: flex; + flex-direction: column; + align-items: center; + gap: 0.32rem; + padding: 1.1rem 1rem 1.15rem; + position: relative; + z-index: 1; +} + +.pb-adapt-btn-icon { + font-size: 1.85rem; + line-height: 1; + color: var(--purple); + transition: filter 0.3s, transform 0.3s; +} + +.pb-adapt-btn:hover .pb-adapt-btn-icon { + filter: drop-shadow(0 0 10px rgba(170,85,255,0.9)); + transform: scale(1.1); +} + +.pb-adapt-btn--active .pb-adapt-btn-icon { + filter: drop-shadow(0 0 12px rgba(170,85,255,1)); + animation: icon-spin 4s ease-in-out infinite; +} + +@keyframes icon-spin { + 0%, 100% { transform: scale(1) rotate(0deg); } + 25% { transform: scale(1.08) rotate(10deg); } + 75% { transform: scale(1.08) rotate(-10deg); } +} + +.pb-adapt-btn-label { + font-size: 1.3rem; + font-weight: 900; + letter-spacing: 0.28em; + color: var(--text); + line-height: 1; + transition: color 0.25s, text-shadow 0.25s; +} + +.pb-adapt-btn--active .pb-adapt-btn-label { + color: #d49fff; + text-shadow: + 0 0 10px rgba(170,85,255,0.8), + 0 0 24px rgba(170,85,255,0.4); +} + +.pb-adapt-btn-sub { + font-size: 0.62rem; + font-weight: 600; + letter-spacing: 0.08em; + text-transform: uppercase; + color: var(--muted); + transition: color 0.25s; +} + +.pb-adapt-btn--active .pb-adapt-btn-sub { + color: rgba(170,85,255,0.85); +} + +/* Status bar shown after activation */ +.pb-adapt-active-bar { + display: flex; + align-items: center; + gap: 0.5rem; + font-size: 0.62rem; + font-weight: 600; + letter-spacing: 0.06em; + text-transform: uppercase; + color: rgba(170,85,255,0.8); + background: rgba(170,85,255,0.08); + border: 1px solid rgba(170,85,255,0.22); + border-radius: 6px; + padding: 0.45rem 0.75rem; +} + +.pb-adapt-active-dot { + width: 7px; + height: 7px; + border-radius: 50%; + background: var(--purple); + flex-shrink: 0; + box-shadow: 0 0 6px rgba(170,85,255,0.8); + animation: pulse-dot 1.2s ease-in-out infinite; +} + +/* Filter tabs: 2-col default, 3-col when adapt active */ +.filter-tabs--adapt { + grid-template-columns: 1fr 1fr 1fr; +} + +/* ── Server error banner ─────────────────────────────────────────────────────── */ +.server-error-banner { + padding: 0.5rem 0.85rem; + font-size: 0.65rem; + color: var(--amber); + background: rgba(255,170,48,0.06); + border-bottom: 1px solid rgba(255,170,48,0.2); + line-height: 1.4; +} + +/* ── Header additions ────────────────────────────────────────────────────────── */ +.header-task-pill { + display: flex; + align-items: center; + gap: 0.35rem; + padding: 0.2rem 0.6rem; + background: var(--surface); + border: 1px solid var(--border-bright); + border-radius: 4px; + max-width: 260px; + overflow: hidden; +} + +.header-task-mode { + font-size: 0.6rem; + font-weight: 700; + color: var(--accent); + white-space: nowrap; +} + +.header-task-name { + font-size: 0.68rem; + color: var(--text-dim); + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; +} + +/* ── Task detail bar (center panel) ─────────────────────────────────────────── */ +.task-detail-bar { + padding: 0.65rem 1rem; + border-bottom: 1px solid var(--border); + flex-shrink: 0; + background: var(--panel); + transition: padding 0.2s; +} + +.task-detail-bar.compact { padding: 0.4rem 1rem; } + +.td-top { + display: flex; + align-items: flex-start; + gap: 0.55rem; +} + +.td-icon { + font-size: 1.1rem; + opacity: 0.65; + flex-shrink: 0; + margin-top: 0.05rem; +} + +.td-text { flex: 1; min-width: 0; } + +.td-label { + font-size: 0.88rem; + font-weight: 700; + color: var(--text); + line-height: 1.2; + margin-bottom: 0.15rem; +} + +.td-desc { + font-size: 0.68rem; + color: var(--text-dim); + line-height: 1.45; + margin-top: 0.2rem; +} + +.td-badges { + display: flex; + align-items: center; + gap: 0.3rem; + flex-shrink: 0; + flex-wrap: wrap; + justify-content: flex-end; +} + +.td-domain-badge { + font-size: 0.55rem; + font-weight: 700; + letter-spacing: 0.07em; + padding: 0.12rem 0.38rem; + border-radius: 3px; + background: var(--surface); + border: 1px solid var(--border-bright); + color: var(--text-dim); +} + +.td-stats { + display: flex; + align-items: center; + gap: 0.75rem; + margin-top: 0.55rem; + flex-wrap: wrap; +} + +.td-stat { + display: flex; + align-items: center; + gap: 0.3rem; + font-size: 0.65rem; + color: var(--text-dim); +} + +.td-stat-icon { font-size: 0.75rem; } + +.td-diff-bar { + display: flex; + align-items: center; + gap: 0.2rem; + margin-left: auto; +} + +.td-diff-step { + width: 14px; + height: 4px; + border-radius: 2px; + background: var(--border-bright); + transition: background 0.2s; +} + +.td-diff-step.active { background: var(--amber); } + +.td-diff-label { + font-size: 0.6rem; + color: var(--text-dim); + margin-left: 0.2rem; +} + +/* ── Run History ─────────────────────────────────────────────────────────────── */ +.run-history { + overflow-y: auto; + padding: 0.55rem 0.75rem 0.85rem; + flex: 1; + min-height: 0; +} + +.rh-empty { + padding: 1rem 0.85rem; + font-size: 0.65rem; + color: var(--muted); + line-height: 1.5; +} + +.rh-empty strong { color: var(--text-dim); } + +.rh-table { + width: 100%; + border-collapse: collapse; + font-size: 0.74rem; +} + +.rh-table th { + text-align: left; + font-size: 0.55rem; + font-weight: 700; + letter-spacing: 0.07em; + text-transform: uppercase; + color: var(--muted); + padding: 0.25rem 0.3rem; + border-bottom: 1px solid var(--border); +} + +.rh-table td { + padding: 0.35rem 0.3rem; + border-bottom: 1px solid rgba(28,46,64,0.6); + vertical-align: middle; +} + +.rh-table tr:last-child td { border-bottom: none; } +.rh-table tr:hover td { background: rgba(255,255,255,0.02); } + +.rh-task { + display: flex; + align-items: center; + gap: 0.35rem; + min-width: 0; +} + +.rh-domain-icon { font-size: 0.7rem; flex-shrink: 0; } + +.rh-task-name { + color: var(--text-dim); + font-size: 0.74rem; + line-height: 1.3; + white-space: normal; + word-break: break-word; +} + +.rh-llm-tag { + font-size: 0.5rem; + font-weight: 700; + color: var(--amber); + background: rgba(255,170,48,0.12); + border: 1px solid rgba(255,170,48,0.25); + padding: 0.05rem 0.2rem; + border-radius: 2px; + flex-shrink: 0; +} + +.rh-score-cell { + display: flex; + flex-direction: column; + gap: 0.2rem; +} + +.rh-score-val { + font-size: 0.68rem; + font-weight: 600; +} + +.rh-bar-track { + height: 3px; + background: var(--surface); + border-radius: 2px; + width: 50px; + overflow: hidden; +} + +.rh-bar-fill { + height: 100%; + border-radius: 2px; +} + +.rh-score-sm { + color: var(--text-dim); + font-size: 0.62rem; +} + +.sev-chip { + font-size: 0.52rem !important; + padding: 0.1rem 0.3rem !important; + white-space: nowrap; +} + +/* ── API Panel ───────────────────────────────────────────────────────────────── */ +.api-panel { + overflow-y: auto; + padding: 0.55rem 0.85rem 0.85rem; + flex: 1; + min-height: 0; +} + +.api-section-label { + font-size: 0.55rem; + font-weight: 700; + letter-spacing: 0.1em; + text-transform: uppercase; + color: var(--muted); + margin-bottom: 0.35rem; +} + +.api-active-url { + font-size: 0.6rem; + color: var(--green); + word-break: break-all; + background: rgba(0,232,122,0.06); + border: 1px solid rgba(0,232,122,0.18); + border-radius: 4px; + padding: 0.35rem 0.5rem; + line-height: 1.5; +} + +.api-none { + font-size: 0.62rem; + color: var(--muted); + font-style: italic; +} + +.api-endpoint-list { + display: flex; + flex-direction: column; + gap: 0.35rem; +} + +.api-endpoint { + background: var(--surface); + border: 1px solid var(--border); + border-radius: 8px; + padding: 0.65rem 0.75rem; + transition: border-color 0.15s; +} + +.api-endpoint-active { + border-color: var(--green); + background: rgba(0,232,122,0.04); +} + +.api-endpoint-top { + display: flex; + align-items: center; + gap: 0.4rem; + margin-bottom: 0.2rem; +} + +.api-method { + font-size: 0.55rem; + font-weight: 700; + font-family: "JetBrains Mono", monospace; + padding: 0.1rem 0.3rem; + border-radius: 2px; + flex-shrink: 0; +} + +.api-method-get { background: rgba(0,207,255,0.12); color: var(--accent); } +.api-method-post { background: rgba(170,85,255,0.12); color: var(--purple); } + +.api-path { + font-size: 0.62rem; + color: var(--text); + flex: 1; +} + +.api-live-dot { + width: 6px; + height: 6px; + border-radius: 50%; + background: var(--green); + flex-shrink: 0; + animation: pulse-dot 1s ease-in-out infinite; +} + +.api-desc { + font-size: 0.78rem; + color: var(--text-dim); + line-height: 1.5; +} + +.api-params { + display: flex; + gap: 0.25rem; + flex-wrap: wrap; + margin-top: 0.3rem; +} + +.api-param { + font-size: 0.52rem; + color: var(--muted); + background: var(--bg); + border: 1px solid var(--border); + padding: 0.05rem 0.28rem; + border-radius: 2px; +} + +/* ── Responsive ─────────────────────────────────────────────────────────────── */ +@media (max-width: 1100px) { + .app-columns { + grid-template-columns: minmax(240px, 1fr) minmax(280px, 1fr); + gap: 1rem; + } + .right-panel { + grid-column: 1 / -1; + max-width: 100%; + } +} + +@media (max-width: 720px) { + .app-columns { + grid-template-columns: 1fr; + padding: 1rem 1rem 0; + } + .scenario-hero-inner { + padding: 1rem 1rem 1.15rem; + } + .scenario-hero-badges { + justify-content: flex-start; + } +} diff --git a/space_frontend/src/main.tsx b/space_frontend/src/main.tsx new file mode 100644 index 0000000000000000000000000000000000000000..27481e022f7bf95da4dd73cd7514fd96067120d9 --- /dev/null +++ b/space_frontend/src/main.tsx @@ -0,0 +1,10 @@ +import React from "react"; +import ReactDOM from "react-dom/client"; +import App from "./App"; +import "./index.css"; + +ReactDOM.createRoot(document.getElementById("root")!).render( + + + , +); diff --git a/space_frontend/src/tasks/registry.ts b/space_frontend/src/tasks/registry.ts new file mode 100644 index 0000000000000000000000000000000000000000..30bd60b0b8d36dd6a63d0afb387923be393a1ce5 --- /dev/null +++ b/space_frontend/src/tasks/registry.ts @@ -0,0 +1,131 @@ +/** Scene pack id — keep aligned with ``server/demo_tasks.py`` ``visual_scene_key``. */ + +export type VisualSceneKey = + | "bhopal" + | "vadodara" + | "pune" + | "nagpur" + | "delhi" + | "mumbai" + | "hyderabad" + | "bengaluru" + | "icu"; + +const TASK_TO_SCENE: Record = { + bhopal_solo_dep_t0: "bhopal", + vadodara_mixed_pair_t0: "vadodara", + pune_wake_intro_t1: "pune", + nagpur_dual_runway_t1: "nagpur", + delhi_monsoon_recovery_easy: "delhi", + mumbai_bank_balance_medium: "mumbai", + hyderabad_cargo_crunch_medium_hard: "hyderabad", + bengaluru_irrops_hard: "bengaluru", + icu_normal_day: "icu", + icu_flu_surge: "icu", + icu_mass_casualty: "icu", +}; + +export function resolveSceneKey( + taskId: string, + mode: "atc" | "domain", +): VisualSceneKey { + if (mode === "domain" || taskId.startsWith("icu_")) { + return "icu"; + } + return TASK_TO_SCENE[taskId] ?? "bengaluru"; +} + +export type ScenePalette = { + skyTop: string; + skyBot: string; + ground: string; + runway: string; + runwayMark: string; + accent: string; + /** Micro-ambient hint for ``drawSceneDecor``. */ + decor: "none" | "rain" | "cranes" | "heat"; +}; + +export const SCENE_PALETTES: Record = { + bhopal: { + skyTop: "#6a9cbc", + skyBot: "#b8d4e8", + ground: "#3d5c3a", + runway: "#2a2a2a", + runwayMark: "#f0f0a0", + accent: "#e8c86a", + decor: "none", + }, + vadodara: { + skyTop: "#5a8ab8", + skyBot: "#c8dce8", + ground: "#4a6044", + runway: "#252525", + runwayMark: "#ddd", + accent: "#88c4e8", + decor: "none", + }, + pune: { + skyTop: "#4a6a98", + skyBot: "#a8c0d8", + ground: "#3d5238", + runway: "#222", + runwayMark: "#e0e080", + accent: "#f0a040", + decor: "heat", + }, + nagpur: { + skyTop: "#5878a8", + skyBot: "#b0c8e0", + ground: "#455040", + runway: "#202020", + runwayMark: "#fff8c0", + accent: "#90d090", + decor: "none", + }, + delhi: { + skyTop: "#4a5568", + skyBot: "#8898a8", + ground: "#3a4538", + runway: "#1c1c1c", + runwayMark: "#d0d0a0", + accent: "#68b0d8", + decor: "rain", + }, + mumbai: { + skyTop: "#4a6088", + skyBot: "#98b0c8", + ground: "#3a4840", + runway: "#1a1a1a", + runwayMark: "#f5e6a0", + accent: "#e89840", + decor: "cranes", + }, + hyderabad: { + skyTop: "#5a78a0", + skyBot: "#b0c4d8", + ground: "#4a5040", + runway: "#232323", + runwayMark: "#e8e0a0", + accent: "#c8a060", + decor: "heat", + }, + bengaluru: { + skyTop: "#3a5080", + skyBot: "#8090b0", + ground: "#2d3830", + runway: "#181818", + runwayMark: "#ffe080", + accent: "#ff6060", + decor: "rain", + }, + icu: { + skyTop: "#1a2838", + skyBot: "#2a3848", + ground: "#0f1820", + runway: "#2a3540", + runwayMark: "#4a90c8", + accent: "#40c090", + decor: "none", + }, +}; diff --git a/space_frontend/src/types.ts b/space_frontend/src/types.ts new file mode 100644 index 0000000000000000000000000000000000000000..b8375365a8dedbe819a5ef00e7a61d62ae8f03f8 --- /dev/null +++ b/space_frontend/src/types.ts @@ -0,0 +1,63 @@ +/** Minimal flight row from ``serialize_task_snapshot`` (planes or ICU patients). */ +export type TaskPreviewFlight = { + flight_id: string; + operation: string; + wake: string; + scheduled: number; + earliest: number; + latest: number; + runways: string[]; + priority: string; +}; + +/** Task structure for idle canvas preview (real schedule data, no LLM). */ +export type TaskPreview = { + task_id: string; + airport: string; + runways: { runway_id: string; ops: string[] }[]; + flights: TaskPreviewFlight[]; +}; + +export type DemoTask = { + mode: "atc" | "domain"; + task_id: string; + tier: number; + visual_scene_key: string; + label: string; + description?: string; + difficulty?: string; + flight_count?: number; + runway_count?: number; + task_preview?: TaskPreview | null; +}; + +export type ScoreState = { + composite: number; + aman_reward: number; + dman_reward: number; + coordination: number; + cross_lane_conflicts: number; + atfm_violations: number; + negotiation_rounds: number; + severity: "success" | "degraded" | "catastrophic" | null; + done: boolean; +}; + +export const EMPTY_SCORE: ScoreState = { + composite: 0, + aman_reward: 0, + dman_reward: 0, + coordination: 0, + cross_lane_conflicts: 0, + atfm_violations: 0, + negotiation_rounds: 0, + severity: null, + done: false, +}; + +export type LogEntry = { + id: number; + type: string; + detail: string; + ts: number; +}; diff --git a/space_frontend/src/vite-env.d.ts b/space_frontend/src/vite-env.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..11f02fe2a0061d6e6e1f271b21da95423b448b32 --- /dev/null +++ b/space_frontend/src/vite-env.d.ts @@ -0,0 +1 @@ +/// diff --git a/space_frontend/tsconfig.json b/space_frontend/tsconfig.json new file mode 100644 index 0000000000000000000000000000000000000000..93e40eae937eee868cfc8a16c11e1bcad62943ea --- /dev/null +++ b/space_frontend/tsconfig.json @@ -0,0 +1,21 @@ +{ + "compilerOptions": { + "target": "ES2022", + "useDefineForClassFields": true, + "lib": ["ES2022", "DOM", "DOM.Iterable"], + "module": "ESNext", + "skipLibCheck": true, + "moduleResolution": "bundler", + "allowImportingTsExtensions": true, + "isolatedModules": true, + "moduleDetection": "force", + "noEmit": true, + "jsx": "react-jsx", + "strict": true, + "noUnusedLocals": true, + "noUnusedParameters": true, + "noFallthroughCasesInSwitch": true, + "noUncheckedSideEffectImports": true + }, + "include": ["src"] +} diff --git a/space_frontend/tsconfig.node.json b/space_frontend/tsconfig.node.json new file mode 100644 index 0000000000000000000000000000000000000000..7366cef322b20de942a2c6c6b87fab059935457d --- /dev/null +++ b/space_frontend/tsconfig.node.json @@ -0,0 +1,10 @@ +{ + "compilerOptions": { + "target": "ES2022", + "lib": ["ES2023"], + "module": "ESNext", + "skipLibCheck": true, + "moduleResolution": "bundler" + }, + "include": ["vite.config.ts"] +} diff --git a/space_frontend/vite.config.ts b/space_frontend/vite.config.ts new file mode 100644 index 0000000000000000000000000000000000000000..36cf80987c6db9bf9915ec352c733abb4cf30990 --- /dev/null +++ b/space_frontend/vite.config.ts @@ -0,0 +1,25 @@ +import { defineConfig } from "vite"; +import react from "@vitejs/plugin-react"; + +export default defineConfig({ + plugins: [react()], + base: "/", + server: { + proxy: { + "/demo": "http://localhost:8000", + "/multi_agent": "http://localhost:8000", + "/reset": "http://localhost:8000", + "/step": "http://localhost:8000", + }, + }, + build: { + outDir: "dist", + assetsDir: "assets", + sourcemap: false, + rollupOptions: { + output: { + manualChunks: undefined, + }, + }, + }, +}); diff --git a/tasks.py b/tasks.py new file mode 100644 index 0000000000000000000000000000000000000000..47a203bfc0693b89a6d8c95c67188ebaf0075349 --- /dev/null +++ b/tasks.py @@ -0,0 +1,710 @@ +"""Scenario catalog for the ATC optimization benchmark. + +Tasks are organized into five learning tiers: + + Tier 0 — Warmup 3-4 flights, 1 runway, all MEDIUM wake, 40-60 min windows. + A cold 1.5B model that can barely parse JSON should score ≥ 0.50 + by placing flights close to their scheduled times. + + Tier 1 — Beginner 5-7 flights, 1-2 runways, all three wake classes introduced, + 1 connection/medical priority. Naive FCFS scoring ≈ 0.30-0.50; + correct wake-aware ordering scores ≈ 0.65+. + + Tier 2 — Intermediate 8-14 flights, 2 runways, 1 emergency, LIGHT aircraft. + (Delhi EASY + Hyderabad HARD-layout-but-medium-volume) + + Tier 3 — Advanced 14-18 flights, 2 runways, multiple priorities, ATFM, tighter + windows. (Mumbai MEDIUM) + + Tier 4 — Expert 18+ flights, complex IRROPS, multiple emergencies, strictest + windows. (Bengaluru HARD) + +Research grounding: + - Bengio (2009): ordering easy→hard improves final model quality, not just speed. + - Platanios (2019): root-schedule competence function c(t)=√(t/T) outperforms linear. + - VCRL (2025): reward variance within GRPO group is a free ZPD proxy — target variance >0. + - ProCuRL (2022): keep tasks where pass@1 ∈ [0.10, 0.75] for maximum learning signal. +""" + +from __future__ import annotations + +from typing import Dict, Iterable, List + +try: + from .models import ( + Difficulty, + FlightRecord, + OperationType, + PriorityClass, + RunwaySpec, + TaskDefinition, + WakeClass, + ) +except ImportError: + from models import ( + Difficulty, + FlightRecord, + OperationType, + PriorityClass, + RunwaySpec, + TaskDefinition, + WakeClass, + ) + + +def _f( + flight_id: str, + airline: str, + operation: OperationType, + wake_class: WakeClass, + scheduled: int, + earliest: int, + latest: int, + runways: List[str], + passengers: int, + burn: float, + priority: PriorityClass = PriorityClass.NORMAL, + connection_risk: float = 0.0, + notes: str = "", +) -> FlightRecord: + return FlightRecord( + flight_id=flight_id, + airline=airline, + operation=operation, + wake_class=wake_class, + scheduled_minute=scheduled, + earliest_minute=earliest, + latest_minute=latest, + allowed_runways=runways, + passengers=passengers, + fuel_burn_per_minute=burn, + priority=priority, + connection_risk=connection_risk, + notes=notes, + ) + + +TASKS: List[TaskDefinition] = [ + + # ═════════════════════════════════════════════════════════════════════════ + # TIER 0 — WARMUP (3-4 flights, 1 runway, all MEDIUM, 40-60 min windows) + # Goal: teach the model basic JSON output and that flights must stay inside + # [earliest, latest]. Naive scheduled-minute assignment scores ≥ 0.55. + # ═════════════════════════════════════════════════════════════════════════ + + # ───────────────────────────────────────────────────────────────────────── + # T0-A: Bhopal Solo Departures + # Three MEDIUM departures on one runway, generous windows, no other + # constraints. The only rule that matters: 3-min M→M separation. + # ───────────────────────────────────────────────────────────────────────── + TaskDefinition( + task_id="bhopal_solo_dep_t0", + title="Bhopal Solo Departures (Warmup)", + difficulty=Difficulty.EASY, + airport="VABP", + description=( + "A quiet morning at Raja Bhoj Airport. Three domestic jets need departure " + "slots on the single active runway. No weather, no emergencies — just " + "sequence them safely and on time." + ), + objective=( + "Assign departure slots for all three flights within their windows, " + "maintaining the 3-minute minimum M→M wake separation." + ), + grading_focus=[ + "All flights assigned within their windows", + "No wake-turbulence conflicts (M→M ≥ 3 min)", + "Minimal total delay", + ], + planning_horizon_minutes=90, + max_steps=3, + delay_budget=200, + fuel_budget=400.0, + fairness_tolerance=20.0, + runways=[ + RunwaySpec( + runway_id="32", + allowed_operations=[OperationType.DEPARTURE], + hourly_capacity=20, + weather_penalty=1.0, + notes="Single active departure runway, clear conditions.", + ), + ], + flights=[ + _f("BPL01", "IGO", OperationType.DEPARTURE, WakeClass.MEDIUM, 5, 5, 55, ["32"], 120, 2.2), + _f("BPL02", "AIC", OperationType.DEPARTURE, WakeClass.MEDIUM, 15, 15, 65, ["32"], 115, 2.3), + _f("BPL03", "VTI", OperationType.DEPARTURE, WakeClass.MEDIUM, 25, 25, 75, ["32"], 110, 2.1), + ], + ), + + # ───────────────────────────────────────────────────────────────────────── + # T0-B: Vadodara Mixed Pair + # Two arrivals + two departures on one runway, all MEDIUM, wide windows. + # Challenge: interleave arrivals and departures on the same runway while + # keeping 3-minute separation between any two movements. + # ───────────────────────────────────────────────────────────────────────── + TaskDefinition( + task_id="vadodara_mixed_pair_t0", + title="Vadodara Mixed Pair (Warmup)", + difficulty=Difficulty.EASY, + airport="VABO", + description=( + "Vadodara Airport has four flights — two arriving and two departing — " + "all on the same runway. No special priorities, clear skies." + ), + objective=( + "Interleave arrivals and departures without conflicts, keeping all " + "assignments within their time windows." + ), + grading_focus=[ + "No runway conflicts (any consecutive pair ≥ 3 min)", + "All flights inside their windows", + ], + planning_horizon_minutes=90, + max_steps=3, + delay_budget=200, + fuel_budget=500.0, + fairness_tolerance=20.0, + runways=[ + RunwaySpec( + runway_id="08", + allowed_operations=[OperationType.ARRIVAL, OperationType.DEPARTURE], + hourly_capacity=20, + weather_penalty=1.0, + notes="Single runway, mixed operations, clear conditions.", + ), + ], + flights=[ + _f("VDR01", "IGO", OperationType.ARRIVAL, WakeClass.MEDIUM, 8, 8, 58, ["08"], 130, 4.5), + _f("VDR02", "AIC", OperationType.DEPARTURE, WakeClass.MEDIUM, 14, 14, 64, ["08"], 125, 2.3), + _f("VDR03", "VTI", OperationType.ARRIVAL, WakeClass.MEDIUM, 24, 24, 74, ["08"], 120, 4.4), + _f("VDR04", "GOW", OperationType.DEPARTURE, WakeClass.MEDIUM, 32, 32, 82, ["08"], 115, 2.2), + ], + ), + + # ═════════════════════════════════════════════════════════════════════════ + # TIER 1 — BEGINNER (5-7 flights, mixed wake classes, 1-2 runways) + # Goal: teach wake-turbulence asymmetry (H→L≥6 but L→H only 3) and basic + # priority handling. Naive FCFS scores ≈ 0.30-0.50; optimal ≈ 0.65+. + # ═════════════════════════════════════════════════════════════════════════ + + # ───────────────────────────────────────────────────────────────────────── + # T1-A: Pune Wake Intro + # Single runway, three wake classes. The key insight: placing the LIGHT + # aircraft BEFORE the HEAVY saves 3 minutes vs placing it after + # (H→L=6 min gap vs L→H=3 min gap). Proves wake asymmetry has real value. + # One CONNECTION flight tests priority awareness. + # ───────────────────────────────────────────────────────────────────────── + TaskDefinition( + task_id="pune_wake_intro_t1", + title="Pune Wake Turbulence Introduction (Beginner)", + difficulty=Difficulty.EASY, + airport="VAPO", + description=( + "Six flights on a single runway at Pune Airport introduce all three " + "wake classes. A heavy wide-body arrives early, followed by a light " + "piston, two medium jets, and a connection-critical departure. " + "Smart ordering of the LIGHT aircraft relative to the HEAVY saves " + "real runway time." + ), + objective=( + "Sequence all six flights with no separation conflicts. Exploit wake " + "asymmetry to keep the connection flight on time." + ), + grading_focus=[ + "H→L gap ≥ 6 min; L→H gap ≥ 3 min (asymmetry rewarded)", + "Connection departure protected", + "No window violations", + ], + planning_horizon_minutes=90, + max_steps=4, + delay_budget=150, + fuel_budget=700.0, + fairness_tolerance=18.0, + runways=[ + RunwaySpec( + runway_id="14", + allowed_operations=[OperationType.ARRIVAL, OperationType.DEPARTURE], + hourly_capacity=20, + weather_penalty=1.0, + notes="Single runway, mixed operations.", + ), + ], + flights=[ + # Heavy arrives first: following LIGHT needs ≥6 min (H→L) + _f("PNQ01", "AIC", OperationType.ARRIVAL, WakeClass.HEAVY, 8, 8, 40, ["14"], 260, 6.2), + # Light piston: if after H, pad 6 min; if before H, only 3 min → smart agent moves it early + _f("PNQ02", "SPJ", OperationType.ARRIVAL, WakeClass.LIGHT, 16, 10, 46, ["14"], 18, 1.0), + # Medium arrivals + _f("PNQ03", "IGO", OperationType.ARRIVAL, WakeClass.MEDIUM, 22, 22, 52, ["14"], 165, 5.0), + _f("PNQ04", "VTI", OperationType.ARRIVAL, WakeClass.MEDIUM, 30, 30, 60, ["14"], 170, 5.1), + # Connection departure — must stay close to its window + _f("PNQ05", "AIC", OperationType.DEPARTURE, WakeClass.MEDIUM, 35, 35, 62, ["14"], 180, 2.4, + PriorityClass.CONNECTION, 0.7, "Bank connections at risk if delayed past t=62."), + # Normal medium departure + _f("PNQ06", "GOW", OperationType.DEPARTURE, WakeClass.MEDIUM, 44, 44, 74, ["14"], 175, 2.3), + ], + ), + + # ───────────────────────────────────────────────────────────────────────── + # T1-B: Nagpur Dual Runway + # Two runways (one arr-only, one mixed). Seven flights with a heavy, a + # light, and a MEDICAL departure. Primary challenge: which runway gets + # which flight, and medical priority awareness. + # ───────────────────────────────────────────────────────────────────────── + TaskDefinition( + task_id="nagpur_dual_runway_t1", + title="Nagpur Dual Runway Intro (Beginner)", + difficulty=Difficulty.EASY, + airport="VANP", + description=( + "Two runways at Nagpur: 12L accepts arrivals only, 12R handles mixed " + "operations. A heavy freighter must use 12R; a light cargo feeder " + "can use either runway. A time-sensitive medical cargo departure " + "needs priority handling." + ), + objective=( + "Assign all seven flights to the correct runways without conflicts, " + "protecting the medical departure's window." + ), + grading_focus=[ + "Medical departure protected (≤ 10 min delay)", + "Runway restrictions respected (no departures on 12L)", + "Wake separation maintained across both runways", + ], + planning_horizon_minutes=90, + max_steps=4, + delay_budget=150, + fuel_budget=800.0, + fairness_tolerance=18.0, + runways=[ + RunwaySpec( + runway_id="12L", + allowed_operations=[OperationType.ARRIVAL], + hourly_capacity=18, + weather_penalty=1.0, + notes="Arrival-only runway.", + ), + RunwaySpec( + runway_id="12R", + allowed_operations=[OperationType.ARRIVAL, OperationType.DEPARTURE], + hourly_capacity=18, + weather_penalty=1.0, + notes="Mixed-ops runway; heavy freighter requires 12R.", + ), + ], + flights=[ + # Arrivals: can use 12L or 12R + _f("NGP01", "IGO", OperationType.ARRIVAL, WakeClass.MEDIUM, 6, 6, 50, ["12L", "12R"], 155, 4.8), + # Heavy freighter: 12R only + _f("NGP02", "FTR", OperationType.ARRIVAL, WakeClass.HEAVY, 12, 12, 45, ["12R"], 310, 6.5, + PriorityClass.NORMAL, 0.0, "Heavy freighter — 12R only."), + # Light feeder: either runway + _f("NGP03", "CRG", OperationType.ARRIVAL, WakeClass.LIGHT, 20, 14, 54, ["12L", "12R"], 15, 1.0, + PriorityClass.NORMAL, 0.0, "Light feeder — exploit L→M asymmetry."), + _f("NGP04", "VTI", OperationType.ARRIVAL, WakeClass.MEDIUM, 28, 28, 58, ["12L", "12R"], 160, 4.9), + # Medical departure: 12R only (no dep on 12L) + _f("NGP05", "AIC", OperationType.DEPARTURE, WakeClass.MEDIUM, 18, 18, 42, ["12R"], 150, 2.5, + PriorityClass.MEDICAL, 0.3, "Medical cargo — must depart within window."), + # Normal departures: 12R only + _f("NGP06", "GOW", OperationType.DEPARTURE, WakeClass.MEDIUM, 26, 26, 62, ["12R"], 170, 2.4), + _f("NGP07", "IGO", OperationType.DEPARTURE, WakeClass.HEAVY, 38, 38, 68, ["12R"], 285, 5.8), + ], + ), + + # ═════════════════════════════════════════════════════════════════════════ + # TIER 2 — INTERMEDIATE (existing EASY + the Hyderabad scenario) + # ═════════════════════════════════════════════════════════════════════════ + + # ───────────────────────────────────────────────────────────────────────── + # EASY — Delhi Monsoon Departure Recovery + # Changes from v1: added 2 LIGHT aircraft (SPJ01, CRJ90) to exercise + # untested H/M↔L wake separations. Tightened 3 padded normal-flight + # windows so every flight presents a real scheduling constraint. + # ───────────────────────────────────────────────────────────────────────── + TaskDefinition( + task_id="delhi_monsoon_recovery_easy", + title="Delhi Monsoon Departure Recovery", + difficulty=Difficulty.EASY, + airport="VIDP", + description=( + "A short convective weather burst reduced departure acceptance rates for " + "the morning bank. The controller must resequence mixed arrivals and " + "departures — including a charter light piston and a regional feeder — " + "while protecting a medical flight." + ), + objective=( + "Restore a safe runway sequence, keep the medical departure close to " + "schedule, correctly space light aircraft around heavier traffic, and " + "minimize total passenger delay." + ), + grading_focus=[ + "Zero runway conflicts including light-aircraft wake spacing", + "Medical flight protected", + "Low total delay and fuel burn", + ], + planning_horizon_minutes=100, + max_steps=4, + delay_budget=105, + fuel_budget=730.0, + fairness_tolerance=14.0, + runways=[ + RunwaySpec( + runway_id="27L", + allowed_operations=[OperationType.ARRIVAL, OperationType.DEPARTURE], + hourly_capacity=18, + weather_penalty=1.15, + notes="Usable for mixed operations with reduced wet-runway spacing.", + ), + RunwaySpec( + runway_id="27R", + allowed_operations=[OperationType.ARRIVAL, OperationType.DEPARTURE], + hourly_capacity=18, + weather_penalty=1.15, + notes="Parallel runway, but departures should be metered carefully.", + ), + ], + flights=[ + # ── Original flights (3 windows tightened) ─────────────────────── + _f("IGO601", "IGO", OperationType.DEPARTURE, WakeClass.MEDIUM, 8, 8, 55, ["27L", "27R"], 180, 2.6), + _f("AIC221", "AIC", OperationType.DEPARTURE, WakeClass.MEDIUM, 12, 12, 60, ["27L", "27R"], 168, 2.9, PriorityClass.CONNECTION, 0.6, "Tight onward domestic bank."), + _f("VTI404", "VTI", OperationType.ARRIVAL, WakeClass.MEDIUM, 15, 15, 48, ["27L"], 156, 4.8, PriorityClass.CONNECTION, 0.7, "Inbound hub connections at risk."), + _f("AKJ118", "AKJ", OperationType.DEPARTURE, WakeClass.MEDIUM, 18, 18, 38, ["27R"], 150, 2.4), # was [18,70] — tightened + _f("IGO882", "IGO", OperationType.ARRIVAL, WakeClass.MEDIUM, 20, 20, 56, ["27L", "27R"], 174, 5.2, PriorityClass.CONNECTION, 0.5, "Arrival bank should not absorb long holding."), + _f("AIC911", "AIC", OperationType.DEPARTURE, WakeClass.MEDIUM, 24, 24, 68, ["27L", "27R"], 132, 2.8, PriorityClass.MEDICAL, 0.2, "Medical cargo onboard."), + _f("VTI721", "VTI", OperationType.DEPARTURE, WakeClass.MEDIUM, 27, 27, 52, ["27L", "27R"], 188, 2.7), # was [27,84] — tightened + _f("GOW330", "GOW", OperationType.DEPARTURE, WakeClass.MEDIUM, 30, 30, 55, ["27R"], 186, 2.5), # was [30,88] — tightened + # ── NEW: LIGHT aircraft ────────────────────────────────────────── + # SPJ01 departs 27L only. Any MEDIUM departure immediately behind a + # LIGHT needs a 4-minute gap (M←L); any HEAVY needs 6 minutes. + _f("SPJ01", "SPJ", OperationType.DEPARTURE, WakeClass.LIGHT, 10, 10, 30, ["27L"], 22, 1.1, PriorityClass.NORMAL, 0.0, "Charter light piston — must be slotted before heavier departures back up 27L."), + # CRJ90 arrives 27R only. A HEAVY arriving before it requires 6 min + # separation; arriving before a HEAVY only 3 min — asymmetry matters. + _f("CRJ90", "CRJ", OperationType.ARRIVAL, WakeClass.LIGHT, 22, 22, 42, ["27R"], 48, 1.8, PriorityClass.NORMAL, 0.0, "Regional feeder — light aircraft wake rules apply on 27R."), + ], + ), + + # ───────────────────────────────────────────────────────────────────────── + # MEDIUM — Mumbai Hub Bank Balance + # Changes from v1: added DKT22 (LIGHT cargo feeder, rwy 14 only) and + # JET05 (LIGHT corporate arrival, rwy 27 only). Tightened IGO774 and + # AKJ901 windows so the back-of-bank flights are real constraints. + # ───────────────────────────────────────────────────────────────────────── + TaskDefinition( + task_id="mumbai_bank_balance_medium", + title="Mumbai Hub Bank Balance", + difficulty=Difficulty.MEDIUM, + airport="VABB", + description=( + "A runway inspection removed one preferred departure flow during the " + "mid-morning hub bank. A light cargo feeder and a corporate jet join " + "the queue alongside international heavies. Controllers need to protect " + "fuel-sensitive arrivals and keep delay distribution fair across airlines." + ), + objective=( + "Produce a conflict-free schedule that limits missed bank connections, " + "correctly spaces light aircraft around heavier traffic, keeps a " + "fuel-sensitive arrival near the front, and avoids over-penalizing " + "a single carrier." + ), + grading_focus=[ + "Arrival fuel protection", + "Light-aircraft wake separation correctness", + "Fairness across airlines", + "Capacity-aware sequencing", + ], + planning_horizon_minutes=120, + max_steps=4, + delay_budget=175, + fuel_budget=1280.0, + fairness_tolerance=12.0, + runways=[ + RunwaySpec( + runway_id="27", + allowed_operations=[OperationType.ARRIVAL, OperationType.DEPARTURE], + hourly_capacity=20, + weather_penalty=1.2, + notes="Primary runway with wet braking action advisory.", + ), + RunwaySpec( + runway_id="14", + allowed_operations=[OperationType.DEPARTURE], + hourly_capacity=14, + weather_penalty=1.1, + notes="Departure-only flow after inspection release.", + ), + ], + flights=[ + # ── NEW: LIGHT cargo feeder on dep-only rwy 14 ─────────────────── + # A MEDIUM departure behind DKT22 on 14 needs 4 min (M←L). + _f("DKT22", "DKT", OperationType.DEPARTURE, WakeClass.LIGHT, 8, 8, 28, ["14"], 18, 1.0, PriorityClass.NORMAL, 0.0, "Cargo feeder — light aircraft on dep-only rwy 14; sequence before MEDIUM wave."), + # ── Original flights (2 windows tightened) ─────────────────────── + _f("IGO202", "IGO", OperationType.DEPARTURE, WakeClass.MEDIUM, 5, 5, 70, ["14", "27"], 186, 2.4), + _f("AIC540", "AIC", OperationType.ARRIVAL, WakeClass.HEAVY, 10, 10, 44, ["27"], 264, 6.1, PriorityClass.CONNECTION, 0.8, "Long-haul inbound with large connection bank."), + _f("VTI313", "VTI", OperationType.DEPARTURE, WakeClass.MEDIUM, 13, 13, 78, ["14"], 176, 2.5, PriorityClass.CONNECTION, 0.7), + _f("AKJ440", "AKJ", OperationType.DEPARTURE, WakeClass.MEDIUM, 17, 17, 82, ["14", "27"], 172, 2.4), + _f("IGO558", "IGO", OperationType.ARRIVAL, WakeClass.MEDIUM, 19, 19, 51, ["27"], 181, 5.0, PriorityClass.NORMAL, 0.4), + _f("AIX117", "AIX", OperationType.DEPARTURE, WakeClass.MEDIUM, 22, 22, 88, ["14"], 164, 2.6), + _f("AIC612", "AIC", OperationType.DEPARTURE, WakeClass.MEDIUM, 25, 25, 92, ["14", "27"], 158, 2.9, PriorityClass.CONNECTION, 0.6), + _f("VTI880", "VTI", OperationType.ARRIVAL, WakeClass.MEDIUM, 28, 28, 55, ["27"], 170, 5.6, PriorityClass.MEDICAL, 0.4, "Special handling passenger onboard."), + _f("IGO774", "IGO", OperationType.DEPARTURE, WakeClass.MEDIUM, 31, 31, 65, ["14", "27"], 190, 2.5), # was [31,100] — tightened + _f("GOW410", "GOW", OperationType.DEPARTURE, WakeClass.MEDIUM, 35, 35, 102, ["14"], 186, 2.3), + _f("AIC845", "AIC", OperationType.ARRIVAL, WakeClass.HEAVY, 38, 38, 66, ["27"], 248, 6.3, PriorityClass.CONNECTION, 0.7, "Fuel-sensitive after holding south of field."), + _f("AKJ901", "AKJ", OperationType.DEPARTURE, WakeClass.MEDIUM, 42, 42, 72, ["14", "27"], 168, 2.4), # was [42,108] — tightened + # ── NEW: LIGHT corporate arrival on rwy 27 ──────────────────────── + # If arriving AFTER AIC845 (HEAVY), spacing must be 6 min (H→L). + # If arriving BEFORE AIC845, only 3 min needed (L→H) — placing JET05 + # early is significantly more efficient, rewarding smart sequencing. + _f("JET05", "JET", OperationType.ARRIVAL, WakeClass.LIGHT, 33, 33, 55, ["27"], 12, 1.2, PriorityClass.NORMAL, 0.0, "Corporate jet arrival — LIGHT, rwy 27 only; heavy-wake separation critical."), + ], + ), + + # ───────────────────────────────────────────────────────────────────────── + # HARD — Bengaluru IRROPS Recovery Command + # Changes from v1: MED208 window fixed [31,85]→[31,55] (organ transport + # must be operationally credible). GOW099 (padding flight) removed. + # IGO702 window tightened [30,108]→[30,65]. VFR01 (LIGHT arrival) + # added to force early-slot ordering before HEAVY waves. + # ───────────────────────────────────────────────────────────────────────── + TaskDefinition( + task_id="bengaluru_irrops_hard", + title="Bengaluru IRROPS Recovery Command", + difficulty=Difficulty.HARD, + airport="VOBL", + description=( + "A rapidly evolving IRROPS event combines wet-runway spacing, " + "an emergency inbound, a time-critical organ-transport departure, and a " + "heavily peaking departure bank. A light VFR aircraft on a special permit " + "must be resolved before the heavy wave arrives. The controller must " + "sequence mixed traffic with both safety and network impact in mind." + ), + objective=( + "Protect the emergency arrival and medical departure within their strict " + "windows, slot the light VFR arrival before it is blocked by heavy traffic, " + "keep all assignments conflict-free under reduced capacity, minimize system " + "delay, and distribute unavoidable delay fairly across participating airlines." + ), + grading_focus=[ + "Emergency and medical traffic prioritized within strict windows", + "VFR01 slotted before heavy-wave blockage", + "Zero separation and capacity conflicts", + "Balanced delay distribution under IRROPS", + ], + planning_horizon_minutes=140, + max_steps=6, + delay_budget=220, + fuel_budget=1680.0, + fairness_tolerance=8.5, + runways=[ + RunwaySpec( + runway_id="09L", + allowed_operations=[OperationType.ARRIVAL, OperationType.DEPARTURE], + hourly_capacity=18, + weather_penalty=1.3, + notes="Mixed-mode runway with longer heavy-to-medium spacing.", + ), + RunwaySpec( + runway_id="09R", + allowed_operations=[OperationType.ARRIVAL, OperationType.DEPARTURE], + hourly_capacity=16, + weather_penalty=1.25, + notes="Secondary runway handling overflow and tactical recovery.", + ), + ], + flights=[ + _f("IGO110", "IGO", OperationType.DEPARTURE, WakeClass.MEDIUM, 4, 4, 78, ["09L", "09R"], 184, 2.4), + _f("AIC781", "AIC", OperationType.ARRIVAL, WakeClass.HEAVY, 7, 7, 34, ["09L"], 252, 6.5, PriorityClass.CONNECTION, 0.8), + # ── NEW: LIGHT VFR on special permit ───────────────────────────── + # VFR01 must land before the MEDIUM/HEAVY wave builds after t=14. + # Placed after AIC781 (HEAVY): requires 6-min gap (H→L). + # Placed before AIC781: only 3-min gap (L→H) and no blockage. + # Smart agents will slot it early; naive agents will conflict it. + _f("VFR01", "VFR", OperationType.ARRIVAL, WakeClass.LIGHT, 9, 9, 20, ["09L", "09R"], 6, 1.0, PriorityClass.NORMAL, 0.0, "Light VFR on special permit — must clear before heavy wave; strict window."), + _f("VTI220", "VTI", OperationType.DEPARTURE, WakeClass.MEDIUM, 9, 9, 86, ["09R"], 170, 2.6), + _f("AKJ662", "AKJ", OperationType.DEPARTURE, WakeClass.MEDIUM, 12, 12, 90, ["09L", "09R"], 168, 2.3), + _f("GOW510", "GOW", OperationType.ARRIVAL, WakeClass.MEDIUM, 14, 14, 46, ["09L", "09R"], 174, 5.3, PriorityClass.NORMAL, 0.4), + _f("AIC110", "AIC", OperationType.DEPARTURE, WakeClass.MEDIUM, 16, 16, 92, ["09L", "09R"], 162, 2.7, PriorityClass.CONNECTION, 0.7), + _f("IGO455", "IGO", OperationType.ARRIVAL, WakeClass.MEDIUM, 18, 18, 44, ["09L"], 176, 5.5, PriorityClass.CONNECTION, 0.6), + _f("VTI918", "VTI", OperationType.DEPARTURE, WakeClass.MEDIUM, 21, 21, 94, ["09R"], 188, 2.5), + _f("MED001", "GOV", OperationType.ARRIVAL, WakeClass.MEDIUM, 23, 23, 28, ["09L", "09R"], 6, 7.0, PriorityClass.EMERGENCY, 0.1, "Emergency medical diversion with priority handling."), + _f("AKJ303", "AKJ", OperationType.DEPARTURE, WakeClass.MEDIUM, 25, 25, 98, ["09L", "09R"], 178, 2.4), + _f("AIX770", "AIX", OperationType.DEPARTURE, WakeClass.MEDIUM, 27, 27, 102, ["09R"], 164, 2.6), + _f("IGO702", "IGO", OperationType.DEPARTURE, WakeClass.MEDIUM, 30, 30, 65, ["09L", "09R"], 192, 2.4), # was [30,108] — tightened + _f("MED208", "AIC", OperationType.DEPARTURE, WakeClass.MEDIUM, 31, 31, 55, ["09R"], 154, 2.8, PriorityClass.MEDICAL, 0.4, "Time-critical organ transport departure — 24-minute window is firm."), # was [31,85] + _f("AIC605", "AIC", OperationType.ARRIVAL, WakeClass.HEAVY, 33, 33, 60, ["09L"], 244, 6.4, PriorityClass.CONNECTION, 0.7), + _f("VTI640", "VTI", OperationType.DEPARTURE, WakeClass.MEDIUM, 36, 36, 112, ["09R"], 182, 2.5), + _f("AKJ818", "AKJ", OperationType.ARRIVAL, WakeClass.MEDIUM, 42, 42, 68, ["09L", "09R"], 171, 5.4, PriorityClass.CONNECTION, 0.5), + _f("AIC990", "AIC", OperationType.ARRIVAL, WakeClass.HEAVY, 45, 45, 72, ["09L"], 246, 6.6, PriorityClass.CONNECTION, 0.8, "Second fuel-sensitive long-haul inbound wave."), + ], + ), + + # ───────────────────────────────────────────────────────────────────────── + # NEW — Hyderabad Cargo Crunch (Medium-Hard) + # Single runway (09R bird-strike inspection closes 09L). + # All three wake classes present: HEAVY freighters, MEDIUM passenger jets, + # LIGHT cargo feeders. No emergency flight — difficulty comes entirely + # from runway scarcity and wake turbulence asymmetry. + # ───────────────────────────────────────────────────────────────────────── + TaskDefinition( + task_id="hyderabad_cargo_crunch_medium_hard", + title="Hyderabad Single-Runway Cargo Crunch", + difficulty=Difficulty.HARD, + airport="VOHS", + description=( + "A bird-strike inspection grounds runway 09R at Rajiv Gandhi International " + "during the peak mango-export cargo wave. All traffic — international " + "heavy freighters, domestic passenger jets, and light cargo feeders — must " + "be sequenced through runway 09L alone. Wake turbulence between all three " + "aircraft classes is the central constraint." + ), + objective=( + "Sequence all seven aircraft through the single available runway without " + "separation conflicts, exploiting wake-class asymmetry to maximize " + "throughput while protecting connection passengers on AIC300." + ), + grading_focus=[ + "Zero conflicts on a single runway", + "Wake-class asymmetry exploited (L→H cheaper than H→L)", + "Connection passengers on AIC300 protected", + "Minimal total delay given severe capacity constraint", + ], + planning_horizon_minutes=80, + max_steps=4, + delay_budget=90, + fuel_budget=720.0, + fairness_tolerance=15.0, + runways=[ + RunwaySpec( + runway_id="09L", + allowed_operations=[OperationType.ARRIVAL, OperationType.DEPARTURE], + hourly_capacity=16, + weather_penalty=1.1, + notes="Only active runway — 09R closed for bird-strike inspection.", + ), + ], + flights=[ + # ── Slot ordering puzzle ───────────────────────────────────────── + # FTR001 (HEAVY arr) → SPJ100 (LIGHT dep): 6-min gap required (H→L) + # SPJ100 (LIGHT dep) → AIC300 (MEDIUM arr): 3-min gap (L→M) — asymmetry! + # FTR002 (HEAVY dep) → CRG55 (LIGHT arr): 6-min gap (H→L) + # CRG55 (LIGHT arr) → VTI200 (MEDIUM dep): only 3-min (L→M) — efficient + # Optimal ordering saves ~6 minutes of total delay vs naive FCFS. + _f("FTR001", "FTR", OperationType.ARRIVAL, WakeClass.HEAVY, 10, 10, 28, ["09L"], 312, 6.8, PriorityClass.NORMAL, 0.0, "Heavy freighter — sets 6-min gap for any following LIGHT traffic."), + _f("SPJ100", "SPJ", OperationType.DEPARTURE, WakeClass.LIGHT, 14, 14, 32, ["09L"], 20, 1.1, PriorityClass.NORMAL, 0.0, "Light cargo feeder — if after HEAVY arr, needs 6 min; if before, only 3."), + _f("AIC300", "AIC", OperationType.ARRIVAL, WakeClass.MEDIUM, 17, 17, 35, ["09L"], 198, 5.4, PriorityClass.CONNECTION, 0.8, "Connection bank closes at t=40; keep delays minimal."), + _f("FTR002", "FTR", OperationType.DEPARTURE, WakeClass.HEAVY, 21, 21, 42, ["09L"], 285, 5.9, PriorityClass.NORMAL, 0.0, "Outbound freighter — after departure, following LIGHT needs 6-min gap."), + _f("VTI200", "VTI", OperationType.DEPARTURE, WakeClass.MEDIUM, 23, 23, 44, ["09L"], 182, 2.6, PriorityClass.CONNECTION, 0.5, "Domestic passenger departure — tight window in single-runway crunch."), + _f("CRG55", "CRG", OperationType.ARRIVAL, WakeClass.LIGHT, 27, 27, 46, ["09L"], 16, 1.0, PriorityClass.NORMAL, 0.0, "Light cargo arrival — exploit L→M asymmetry to save slots for VTI200."), + _f("AIC480", "AIC", OperationType.DEPARTURE, WakeClass.MEDIUM, 30, 30, 52, ["09L"], 175, 2.5, PriorityClass.NORMAL, 0.3, "Second passenger departure — last slot in the crunch window."), + ], + ), +] + + +# ── Tier catalog ───────────────────────────────────────────────────────────── +# Explicit tier assignment for every task. +# +# Tier 0 — Warmup naive-FCFS scores ≥ 0.55 (teaches JSON format) +# Tier 1 — Beginner naive ≈ 0.30-0.50, optimal ≈ 0.65 (wake asymmetry) +# Tier 2 — Intermediate naive ≈ 0.20-0.40, optimal ≈ 0.55 (LIGHT + emergency) +# Tier 3 — Advanced naive ≈ 0.15-0.35, optimal ≈ 0.50 (ATFM, 14 flights) +# Tier 4 — Expert naive ≈ 0.10-0.25, optimal ≈ 0.45 (IRROPS, 18 flights) +# +# Source evidence: engine.py penalty structure — conflicts multiply the final +# score; a 20-flight task with even 1 unresolved conflict drops score by ~5%. +# Fairness tolerance 8.5 (Bengaluru) vs 20.0 (warmup) is a 2.4× harder target. + +TASK_TIER: Dict[str, int] = { + "bhopal_solo_dep_t0": 0, + "vadodara_mixed_pair_t0": 0, + "pune_wake_intro_t1": 1, + "nagpur_dual_runway_t1": 1, + "delhi_monsoon_recovery_easy": 2, + "hyderabad_cargo_crunch_medium_hard": 2, # compact but all-wake-classes puzzle + "mumbai_bank_balance_medium": 3, + "bengaluru_irrops_hard": 4, +} + + +def task_catalog() -> Dict[str, TaskDefinition]: + """Return all tasks keyed by task_id.""" + return {t.task_id: t for t in TASKS} + + +def ordered_tasks() -> Iterable[TaskDefinition]: + """Return tasks ordered by tier then task_id (easy → hard).""" + return sorted(TASKS, key=lambda t: (TASK_TIER.get(t.task_id, 2), t.task_id)) + + +def tasks_by_tier(tier: int) -> List[TaskDefinition]: + """Return tasks belonging to exactly this tier (0-4).""" + return [t for t in TASKS if TASK_TIER.get(t.task_id, 2) == tier] + + +def tasks_up_to_tier(tier: int) -> List[TaskDefinition]: + """Return all tasks at or below this tier — the eligible pool for a given competence level. + + Always returns at least the tier-0 tasks so the dataset builder never gets an + empty pool (guards against off-by-one during the first episode). + """ + pool = [t for t in TASKS if TASK_TIER.get(t.task_id, 2) <= tier] + if not pool: + pool = tasks_by_tier(0) + return pool + + +MAX_TASK_TIER: int = max(TASK_TIER.values()) # 4 + + +def render_task_briefing(task: TaskDefinition) -> str: + """Generate the ATC situation briefing shown to agents. + + Produces a concise, structured text that describes the scenario, runway + configuration, flight list (with priorities and wake classes), and the + scoring focus areas. This is the primary context LLMs receive. + """ + lines: List[str] = [] + + lines.append(f"# ATC BRIEFING — {task.title}") + lines.append(f"Airport: {task.airport} Difficulty: {task.difficulty.value.upper()}") + lines.append(f"Planning horizon: {task.planning_horizon_minutes} min " + f"Delay budget: {task.delay_budget} min " + f"Fuel budget: {task.fuel_budget:.0f} kg") + lines.append("") + lines.append(f"## Situation\n{task.description}") + lines.append("") + lines.append(f"## Objective\n{task.objective}") + lines.append("") + + lines.append("## Runways") + for rwy in task.runways: + ops = "/".join(op.value for op in rwy.allowed_operations) + lines.append( + f" {rwy.runway_id}: {ops}, capacity {rwy.hourly_capacity}/hr, " + f"wx_penalty×{rwy.weather_penalty}. {rwy.notes}" + ) + lines.append("") + + lines.append("## Wake Turbulence Separation (minutes between consecutive movements)") + lines.append(" Leader→Follower : H→H=4 H→M=5 H→L=6 M→H=3 M→M=3 M→L=4 L→H=3 L→M=3 L→L=3") + lines.append("") + + lines.append("## Flights (flight_id | airline | op | wake | sched | window | runways | priority | risk | notes)") + for f in task.flights: + r_str = ",".join(f.allowed_runways) + risk = f"-risk={f.connection_risk:.1f}" if f.connection_risk > 0 else "" + notes = f" [{f.notes}]" if f.notes else "" + lines.append( + f" {f.flight_id:<8} {f.airline:<4} {f.operation.value:<3} " + f"{f.wake_class.value:<3} sched={f.scheduled_minute:>3} " + f"[{f.earliest_minute},{f.latest_minute}] " + f"rwy={r_str} {f.priority.value}{risk}{notes}" + ) + lines.append("") + + lines.append("## Grading Focus") + for item in task.grading_focus: + lines.append(f" • {item}") + + return "\n".join(lines) + diff --git a/tests/conftest.py b/tests/conftest.py new file mode 100644 index 0000000000000000000000000000000000000000..607dba1d75ad572fb5fa03c73ebb4e34907dae92 --- /dev/null +++ b/tests/conftest.py @@ -0,0 +1,8 @@ +"""Test configuration for local import paths.""" + +from pathlib import Path +import sys + +ROOT = Path(__file__).resolve().parent.parent +if str(ROOT) not in sys.path: + sys.path.insert(0, str(ROOT)) diff --git a/tests/test_adapt.py b/tests/test_adapt.py new file mode 100644 index 0000000000000000000000000000000000000000..f582da02de6b13fba06dca40797b25f5b0ad5ac9 --- /dev/null +++ b/tests/test_adapt.py @@ -0,0 +1,626 @@ +"""Smoke tests for the ADAPT meta-agent (structural domain transfer). + +ADAPT is domain-agnostic: it receives any unknown TaskDefinition and infers +ATC parameter mappings purely from structural signals (time_pressure, +connection_risk, resource intensity, notes urgency). These tests validate +the structural inference, NOT keyword-based guessing. +""" + +from __future__ import annotations + +import json + +import pytest + +from domains.icu import icu_task_catalog, ICU_DOMAIN_DESCRIPTION +from models import PriorityClass, WakeClass +from multi_agent.adapt import ( + _build_adapt_heuristic, + _compute_entity_profiles, + apply_adapt_mapping, + build_adapt_observation, + parse_adapt_action, +) +from multi_agent.models import ( + ADAPTAction, + ADAPTObservation, + AgentRole, + SupervisorProfileName, +) + + +# ── Fixtures ────────────────────────────────────────────────────────────────── + +@pytest.fixture(scope="module") +def icu_catalog(): + return icu_task_catalog() + + +@pytest.fixture(scope="module") +def normal_task(icu_catalog): + return icu_catalog["icu_normal_day"] + + +@pytest.fixture(scope="module") +def mass_casualty_task(icu_catalog): + return icu_catalog["icu_mass_casualty"] + + +@pytest.fixture(scope="module") +def flu_surge_task(icu_catalog): + return icu_catalog["icu_flu_surge"] + + +@pytest.fixture(scope="module") +def normal_obs(normal_task): + return build_adapt_observation( + task=normal_task, + profile=SupervisorProfileName.SAFETY_STRICT, + domain_name="Hospital ICU Surge Management", + domain_description=ICU_DOMAIN_DESCRIPTION, + ) + + +@pytest.fixture(scope="module") +def mass_casualty_obs(mass_casualty_task): + return build_adapt_observation( + task=mass_casualty_task, + profile=SupervisorProfileName.EMERGENCY_FOCUS, + domain_name="Hospital ICU Surge Management", + domain_description=ICU_DOMAIN_DESCRIPTION, + ) + + +# ── ICU domain catalog ──────────────────────────────────────────────────────── + +def test_icu_catalog_has_three_tasks(icu_catalog): + assert len(icu_catalog) == 3 + assert "icu_normal_day" in icu_catalog + assert "icu_flu_surge" in icu_catalog + assert "icu_mass_casualty" in icu_catalog + + +def test_icu_tasks_have_beds_as_runways(icu_catalog): + for task in icu_catalog.values(): + runway_ids = {r.runway_id for r in task.runways} + assert runway_ids == {"BED_A", "BED_B", "BED_C", "BED_D"} + + +def test_mass_casualty_has_trauma_arrivals(mass_casualty_task): + trauma = [f for f in mass_casualty_task.flights if f.airline == "TRAUMA"] + assert len(trauma) == 3, "mass_casualty must have exactly 3 TRAUMA arrivals" + + +def test_flu_surge_has_cardiac_arrivals(flu_surge_task): + cardiac = [f for f in flu_surge_task.flights if f.airline == "CARDIAC"] + assert len(cardiac) == 3, "flu_surge must have exactly 3 CARDIAC arrivals" + + +# ── _compute_entity_profiles (structural signals) ───────────────────────────── + +def test_compute_profiles_returns_dict_per_entity_type(mass_casualty_task): + profiles = _compute_entity_profiles(mass_casualty_task) + entity_types = {f.airline for f in mass_casualty_task.flights if f.airline} + assert set(profiles.keys()) == entity_types + + +def test_trauma_profile_has_high_time_pressure(mass_casualty_task): + profiles = _compute_entity_profiles(mass_casualty_task) + p = profiles["TRAUMA"] + # TRAUMA entities have very tight windows → time_pressure should be high + assert p["time_pressure"] >= 0.85, ( + f"TRAUMA should have high time_pressure, got {p['time_pressure']}" + ) + + +def test_trauma_profile_has_high_connection_risk(mass_casualty_task): + profiles = _compute_entity_profiles(mass_casualty_task) + p = profiles["TRAUMA"] + assert p["avg_connection_risk"] >= 0.80, ( + f"TRAUMA should have high connection_risk, got {p['avg_connection_risk']}" + ) + + +def test_routine_profile_has_low_time_pressure(normal_task): + profiles = _compute_entity_profiles(normal_task) + p = profiles["ROUTINE"] + # ROUTINE windows are wide relative to H/emergency types, but planning_horizon + # is 480 min so even 150-min windows give tp~0.69 — assert it is strictly + # below the HIGH-urgency threshold, not necessarily below 0.50. + assert p["time_pressure"] < 0.85, ( + f"ROUTINE should be below the VERY TIGHT threshold, got {p['time_pressure']}" + ) + + +def test_routine_profile_has_zero_connection_risk(normal_task): + profiles = _compute_entity_profiles(normal_task) + p = profiles["ROUTINE"] + assert p["avg_connection_risk"] <= 0.05, ( + f"ROUTINE should have near-zero connection_risk, got {p['avg_connection_risk']}" + ) + + +def test_profiles_contain_required_keys(normal_task): + profiles = _compute_entity_profiles(normal_task) + required = { + "count", "avg_window_minutes", "time_pressure", "avg_connection_risk", + "avg_fuel_burn", "avg_passengers", "urgency_in_notes", "operation_mix", + } + for entity_type, p in profiles.items(): + missing = required - set(p.keys()) + assert not missing, f"{entity_type} missing keys: {missing}" + + +def test_operation_mix_counts_arrivals_and_departures(mass_casualty_task): + profiles = _compute_entity_profiles(mass_casualty_task) + for et, p in profiles.items(): + ops = p["operation_mix"] + assert "arrival" in ops and "departure" in ops + + +# ── build_adapt_observation ─────────────────────────────────────────────────── + +def test_adapt_observation_type(normal_obs): + assert isinstance(normal_obs, ADAPTObservation) + assert normal_obs.role == AgentRole.ADAPT + + +def test_adapt_observation_has_entity_profiles(normal_obs): + assert isinstance(normal_obs.entity_profiles, dict) + assert len(normal_obs.entity_profiles) > 0 + + +def test_adapt_observation_profiles_match_entity_types(normal_obs): + assert set(normal_obs.entity_profiles.keys()) == set(normal_obs.entity_types) + + +def test_adapt_observation_resource_names(normal_obs, normal_task): + expected = [r.runway_id for r in normal_task.runways] + assert normal_obs.resource_names == expected + + +def test_adapt_observation_entity_count(normal_obs, normal_task): + assert normal_obs.entity_count == len(normal_task.flights) + + +def test_mass_casualty_obs_has_emergencies(mass_casualty_obs): + assert mass_casualty_obs.has_emergencies is True + + +def test_adapt_observation_prompt_shows_structural_profiles(normal_obs): + text = normal_obs.to_prompt_text() + assert "ADAPT OBSERVATION" in text + assert "time_pressure" in text + assert "connection_risk" in text + assert "ENTITY TYPE STRUCTURAL PROFILES" in text + + +def test_adapt_observation_prompt_shows_numerical_values(mass_casualty_obs): + """The prompt must contain actual numbers, not just labels.""" + text = mass_casualty_obs.to_prompt_text() + # Should show numeric time_pressure and connection_risk values + import re + numbers = re.findall(r"\d+\.\d{2,}", text) + assert len(numbers) >= 4, "Prompt should contain multiple numeric structural values" + + +def test_adapt_observation_prompt_domain_agnostic_language(normal_obs): + """Prompt must instruct agent not to reason from entity names.""" + text = normal_obs.to_prompt_text() + assert "do NOT know what domain" in text.lower() or "INSTRUCTIONS" in text + + +def test_adapt_observation_supervisor_description_nonempty(normal_obs): + assert len(normal_obs.supervisor_description) > 10 + + +def test_build_adapt_observation_defaults_to_task_fields(normal_task): + """Without explicit domain_name, should use task.airport.""" + obs = build_adapt_observation( + task=normal_task, + profile=SupervisorProfileName.SAFETY_STRICT, + ) + assert obs.domain_name == normal_task.airport + + +# ── _build_adapt_heuristic (structural, no keywords) ───────────────────────── + +def test_heuristic_covers_all_entity_types(normal_obs, normal_task): + action = _build_adapt_heuristic(normal_obs, normal_task) + for et in normal_obs.entity_types: + assert et in action.entity_wake_map, f"{et!r} missing from wake map" + assert et in action.entity_priority_map, f"{et!r} missing from priority map" + + +def test_heuristic_high_pressure_entity_maps_to_heavy(mass_casualty_obs, mass_casualty_task): + """Entity with highest structural urgency must map to H/emergency. + + This tests structural inference only: TRAUMA has tp>0.85 and cr>0.80 which + pushes urgency_score well above the 0.70 Heavy threshold. + """ + action = _build_adapt_heuristic(mass_casualty_obs, mass_casualty_task) + profiles = mass_casualty_obs.entity_profiles + + # Find whichever entity has the highest urgency score — it must be H + highest_et = max( + profiles, + key=lambda et: 0.5 * profiles[et]["time_pressure"] + + 0.4 * profiles[et]["avg_connection_risk"] + + 0.1 * float(profiles[et]["urgency_in_notes"]), + ) + assert action.entity_wake_map[highest_et] == WakeClass.HEAVY.value, ( + f"Entity with highest urgency score should be H, got {action.entity_wake_map[highest_et]}" + ) + assert action.entity_priority_map[highest_et] in ( + PriorityClass.EMERGENCY.value, PriorityClass.MEDICAL.value + ) + + +def test_heuristic_low_pressure_entity_maps_to_light(normal_obs, normal_task): + """Entity with lowest structural urgency score must map to L wake class. + + Priority can be 'connection' if tp >= 0.60 even with cr=0 — the score + formula is what drives wake; priority is a separate axis. + """ + action = _build_adapt_heuristic(normal_obs, normal_task) + profiles = normal_obs.entity_profiles + + lowest_et = min( + profiles, + key=lambda et: 0.5 * profiles[et]["time_pressure"] + + 0.4 * profiles[et]["avg_connection_risk"], + ) + assert action.entity_wake_map[lowest_et] == WakeClass.LIGHT.value, ( + f"Entity with lowest urgency score should be L, got {action.entity_wake_map[lowest_et]}" + ) + # Priority must not be emergency or medical — connection/normal both acceptable + assert action.entity_priority_map[lowest_et] in ( + PriorityClass.NORMAL.value, PriorityClass.CONNECTION.value + ), f"Lowest-urgency entity should be normal or connection, got {action.entity_priority_map[lowest_et]}" + + +def test_heuristic_ordering_consistent_with_profiles(normal_obs, normal_task): + """Wake class ordering must be monotone with urgency score.""" + action = _build_adapt_heuristic(normal_obs, normal_task) + profiles = normal_obs.entity_profiles + + _WAKE_ORDER = {WakeClass.HEAVY.value: 3, WakeClass.MEDIUM.value: 2, WakeClass.LIGHT.value: 1} + + scores = { + et: 0.5 * p["time_pressure"] + 0.4 * p["avg_connection_risk"] + for et, p in profiles.items() + } + sorted_by_score = sorted(scores, key=scores.__getitem__, reverse=True) + + wake_ranks = [_WAKE_ORDER[action.entity_wake_map[et]] for et in sorted_by_score] + # Must be non-increasing (higher score ≥ lower score in wake rank) + for i in range(len(wake_ranks) - 1): + assert wake_ranks[i] >= wake_ranks[i + 1], ( + f"Wake class ordering violated: {sorted_by_score[i]} " + f"(score={scores[sorted_by_score[i]]:.2f} rank={wake_ranks[i]}) " + f"vs {sorted_by_score[i+1]} " + f"(score={scores[sorted_by_score[i+1]]:.2f} rank={wake_ranks[i+1]})" + ) + + +def test_heuristic_has_rationale_citing_numbers(normal_obs, normal_task): + import re + action = _build_adapt_heuristic(normal_obs, normal_task) + assert len(action.rationale.strip()) > 0 + # Rationale must contain at least one numeric value + numbers = re.findall(r"\d+\.\d+", action.rationale) + assert len(numbers) >= 2, "Rationale should cite structural numbers" + + +def test_heuristic_returns_adapt_action_type(normal_obs, normal_task): + action = _build_adapt_heuristic(normal_obs, normal_task) + assert isinstance(action, ADAPTAction) + + +# ── apply_adapt_mapping ─────────────────────────────────────────────────────── + +def test_apply_mapping_overrides_wake_class(mass_casualty_task): + action = ADAPTAction( + entity_wake_map={"TRAUMA": "H", "CARDIAC": "M", "ROUTINE": "L", "POST_OP": "M"}, + entity_priority_map={"TRAUMA": "emergency", "CARDIAC": "medical", + "ROUTINE": "normal", "POST_OP": "connection"}, + rationale="test mapping", + ) + mapped = apply_adapt_mapping(mass_casualty_task, action) + for f in mapped.flights: + if f.airline == "TRAUMA": + assert f.wake_class == WakeClass.HEAVY + assert f.priority == PriorityClass.EMERGENCY + elif f.airline == "CARDIAC": + assert f.wake_class == WakeClass.MEDIUM + assert f.priority == PriorityClass.MEDICAL + elif f.airline == "ROUTINE": + assert f.wake_class == WakeClass.LIGHT + assert f.priority == PriorityClass.NORMAL + + +def test_apply_mapping_preserves_unmatched_flights(normal_task): + action = ADAPTAction( + entity_wake_map={"UNKNOWN_TYPE": "H"}, + entity_priority_map={"UNKNOWN_TYPE": "emergency"}, + rationale="test", + ) + mapped = apply_adapt_mapping(normal_task, action) + assert len(mapped.flights) == len(normal_task.flights) + + +def test_apply_mapping_preserves_task_metadata(normal_task): + action = ADAPTAction( + entity_wake_map={"ROUTINE": "L"}, + entity_priority_map={"ROUTINE": "normal"}, + rationale="test", + ) + mapped = apply_adapt_mapping(normal_task, action) + assert mapped.task_id == normal_task.task_id + assert mapped.delay_budget == normal_task.delay_budget + assert len(mapped.runways) == len(normal_task.runways) + + +def test_apply_mapping_ignores_invalid_wake_value(normal_task): + original_wakes = {f.flight_id: f.wake_class for f in normal_task.flights} + action = ADAPTAction( + entity_wake_map={"ROUTINE": "INVALID_WAKE"}, + entity_priority_map={}, + rationale="test", + ) + mapped = apply_adapt_mapping(normal_task, action) + for f in mapped.flights: + if f.airline == "ROUTINE": + assert f.wake_class == original_wakes[f.flight_id] + + +# ── parse_adapt_action ──────────────────────────────────────────────────────── + +def test_parse_valid_json_completion(): + completion = json.dumps({ + "entity_wake_map": {"TYPE_X": "H", "TYPE_Y": "M"}, + "entity_priority_map": {"TYPE_X": "emergency", "TYPE_Y": "medical"}, + "rationale": "TYPE_X: tp=0.97 cr=0.93 score=0.86 → H/emergency", + }) + action = parse_adapt_action(completion) + assert action is not None + assert action.entity_wake_map["TYPE_X"] == "H" + assert action.entity_priority_map["TYPE_Y"] == "medical" + + +def test_parse_json_in_markdown_fences(): + completion = "```json\n" + json.dumps({ + "entity_wake_map": {"TYPE_Z": "L"}, + "entity_priority_map": {"TYPE_Z": "normal"}, + "rationale": "tp=0.12 cr=0.05 score=0.08 → L/normal", + }) + "\n```" + action = parse_adapt_action(completion) + assert action is not None + assert action.entity_wake_map["TYPE_Z"] == "L" + + +def test_parse_returns_none_for_non_json(): + assert parse_adapt_action("I cannot complete this task.") is None + assert parse_adapt_action("") is None + assert parse_adapt_action(None) is None + + +def test_parse_returns_none_for_malformed_json(): + assert parse_adapt_action("{entity_wake_map: broken}") is None + + +def test_parse_handles_dict_completion(): + completion = { + "content": json.dumps({ + "entity_wake_map": {"TYPE_A": "H"}, + "entity_priority_map": {"TYPE_A": "emergency"}, + "rationale": "dict input test", + }) + } + action = parse_adapt_action(completion) + assert action is not None + assert action.entity_wake_map["TYPE_A"] == "H" + + +def test_parse_missing_rationale_defaults_to_empty(): + completion = json.dumps({ + "entity_wake_map": {"TYPE_B": "L"}, + "entity_priority_map": {"TYPE_B": "normal"}, + }) + action = parse_adapt_action(completion) + assert action is not None + assert action.rationale == "" + + +# ── adapt_reward_fn ─────────────────────────────────────────────────────────── + +def test_adapt_reward_returns_list_of_floats(mass_casualty_task): + from training.reward_functions import adapt_reward_fn + + completion = json.dumps({ + "entity_wake_map": {"TRAUMA": "H", "CARDIAC": "M", "ROUTINE": "L", "POST_OP": "M"}, + "entity_priority_map": {"TRAUMA": "emergency", "CARDIAC": "medical", + "ROUTINE": "normal", "POST_OP": "connection"}, + "rationale": "Structural: TRAUMA tp=0.97 cr=0.93 → H/emergency.", + }) + rewards = adapt_reward_fn( + completions=[completion], + task_id=[mass_casualty_task.task_id], + domain_task_json=[mass_casualty_task.model_dump_json()], + supervisor_profile=[SupervisorProfileName.EMERGENCY_FOCUS.value], + ) + assert isinstance(rewards, list) + assert len(rewards) == 1 + assert isinstance(rewards[0], float) + + +def test_adapt_reward_bounded(mass_casualty_task): + from training.reward_functions import adapt_reward_fn + + completion = json.dumps({ + "entity_wake_map": {"TRAUMA": "H", "CARDIAC": "M", "ROUTINE": "L", "POST_OP": "M"}, + "entity_priority_map": {"TRAUMA": "emergency", "CARDIAC": "medical", + "ROUTINE": "normal", "POST_OP": "connection"}, + "rationale": "Structural inference from numerical profiles.", + }) + rewards = adapt_reward_fn( + completions=[completion], + task_id=[mass_casualty_task.task_id], + domain_task_json=[mass_casualty_task.model_dump_json()], + supervisor_profile=[SupervisorProfileName.EMERGENCY_FOCUS.value], + ) + assert -1.0 <= rewards[0] <= 1.0 + + +def test_adapt_reward_bad_json_penalised(mass_casualty_task): + from training.reward_functions import adapt_reward_fn + + rewards = adapt_reward_fn( + completions=["not json at all"], + task_id=[mass_casualty_task.task_id], + domain_task_json=[mass_casualty_task.model_dump_json()], + supervisor_profile=[SupervisorProfileName.SAFETY_STRICT.value], + ) + assert rewards[0] <= -0.4 + + +def test_adapt_reward_missing_domain_task_penalised(): + from training.reward_functions import adapt_reward_fn + + rewards = adapt_reward_fn( + completions=["{}"], + task_id=["some_task"], + domain_task_json=[None], + supervisor_profile=[SupervisorProfileName.SAFETY_STRICT.value], + ) + assert rewards[0] <= -0.5 + + +def test_adapt_reward_batch_length_matches(mass_casualty_task): + from training.reward_functions import adapt_reward_fn + + dtjson = mass_casualty_task.model_dump_json() + completions = [ + json.dumps({"entity_wake_map": {"TRAUMA": "H"}, + "entity_priority_map": {"TRAUMA": "emergency"}, + "rationale": "tp=0.97 → H/emergency"}), + "bad json", + ] + rewards = adapt_reward_fn( + completions=completions, + task_id=[mass_casualty_task.task_id] * 2, + domain_task_json=[dtjson] * 2, + supervisor_profile=[SupervisorProfileName.SAFETY_STRICT.value] * 2, + ) + assert len(rewards) == 2 + + +# ── _make_adapt_sample ──────────────────────────────────────────────────────── + +def test_make_adapt_sample_structure(normal_task, normal_obs): + from training.dataset import _make_adapt_sample + + sample = _make_adapt_sample(ep_id=0, obs=normal_obs, domain_task=normal_task) + assert "prompt" in sample + assert len(sample["prompt"]) == 2 + assert sample["prompt"][0]["role"] == "system" + assert sample["prompt"][1]["role"] == "user" + assert sample["agent_role"] == AgentRole.ADAPT.value + assert sample["round"] == "adapt" + assert "domain_task_json" in sample + + +def test_make_adapt_sample_prompt_contains_structural_profiles(normal_task, normal_obs): + from training.dataset import _make_adapt_sample + + sample = _make_adapt_sample(ep_id=5, obs=normal_obs, domain_task=normal_task) + user_content = sample["prompt"][1]["content"] + assert "time_pressure" in user_content + assert "connection_risk" in user_content + + +def test_make_adapt_sample_system_contains_structural_guide(normal_task, normal_obs): + from training.dataset import ADAPT_SYSTEM, _make_adapt_sample + + sample = _make_adapt_sample(ep_id=0, obs=normal_obs, domain_task=normal_task) + sys_content = sample["prompt"][0]["content"] + assert "STRUCTURAL" in sys_content + assert "entity_wake_map" in sys_content + assert "time_pressure" in sys_content + + +def test_make_adapt_sample_domain_task_json_valid(normal_task, normal_obs): + from training.dataset import _make_adapt_sample + + sample = _make_adapt_sample(ep_id=0, obs=normal_obs, domain_task=normal_task) + from models import TaskDefinition + restored = TaskDefinition.model_validate_json(sample["domain_task_json"]) + assert restored.task_id == normal_task.task_id + + +# ── Dispatch table ──────────────────────────────────────────────────────────── + +def test_adapt_in_dispatch_table(): + from training.train_grpo import REWARD_FN_DISPATCH + from training.reward_functions import adapt_reward_fn + + assert AgentRole.ADAPT.value in REWARD_FN_DISPATCH + assert REWARD_FN_DISPATCH[AgentRole.ADAPT.value] is adapt_reward_fn + + +def test_dispatch_table_has_all_roles(): + from training.train_grpo import REWARD_FN_DISPATCH + + for role in AgentRole: + assert role.value in REWARD_FN_DISPATCH, f"{role.value} missing from dispatch table" + + +# ── build_episode_dataset integration ──────────────────────────────────────── + +def test_dataset_includes_adapt_samples(): + from training.dataset import build_episode_dataset + + samples = build_episode_dataset(n_episodes=20, seed=0, include_adapt=True, + domain_episode_ratio=0.5) + adapt_samples = [s for s in samples if s["agent_role"] == AgentRole.ADAPT.value] + assert len(adapt_samples) >= 1 + + +def test_dataset_adapt_samples_have_required_fields(): + from training.dataset import build_episode_dataset + + samples = build_episode_dataset(n_episodes=20, seed=7, include_adapt=True, + domain_episode_ratio=0.8) + adapt_samples = [s for s in samples if s["agent_role"] == AgentRole.ADAPT.value] + for s in adapt_samples: + assert "prompt" in s + assert "domain_task_json" in s + assert s["round"] == "adapt" + assert s["supervisor_profile"] in {p.value for p in SupervisorProfileName} + + +def test_dataset_no_adapt_when_disabled(): + from training.dataset import build_episode_dataset + + samples = build_episode_dataset(n_episodes=20, seed=0, include_adapt=False) + adapt_samples = [s for s in samples if s["agent_role"] == AgentRole.ADAPT.value] + assert len(adapt_samples) == 0 + + +# ── Generic domain registry ─────────────────────────────────────────────────── + +def test_get_all_domain_tasks_returns_icu_tasks(): + from domains import get_all_domain_tasks + + all_tasks = get_all_domain_tasks() + assert len(all_tasks) >= 3 + assert "icu_normal_day" in all_tasks + + +def test_get_all_domain_tasks_returns_task_definitions(): + from domains import get_all_domain_tasks + from models import TaskDefinition + + all_tasks = get_all_domain_tasks() + for task in all_tasks.values(): + assert isinstance(task, TaskDefinition) diff --git a/tests/test_constants_invariants.py b/tests/test_constants_invariants.py new file mode 100644 index 0000000000000000000000000000000000000000..58a67a6b387bff3208e56408d7259a8272ea2896 --- /dev/null +++ b/tests/test_constants_invariants.py @@ -0,0 +1,29 @@ +"""Constants and precision invariants used by scoring and reporting.""" + +from __future__ import annotations + +from constants import ( + AIRLINE_DELAY_PRECISION, + FUEL_PRECISION, + METRIC_PRECISION, + SCORE_WEIGHTS, + SEPARATION_BY_WAKE, +) + + +def test_score_weights_sum_to_one() -> None: + assert abs(sum(SCORE_WEIGHTS.values()) - 1.0) < 1e-9 + + +def test_precision_values_are_non_negative() -> None: + assert METRIC_PRECISION >= 0 + assert FUEL_PRECISION >= 0 + assert AIRLINE_DELAY_PRECISION >= 0 + + +def test_wake_separation_matrix_has_all_class_pairs() -> None: + wake_classes = {"H", "M", "L"} + for lead in wake_classes: + for trail in wake_classes: + assert (lead, trail) in SEPARATION_BY_WAKE + assert SEPARATION_BY_WAKE[(lead, trail)] >= 0 diff --git a/tests/test_multi_agent.py b/tests/test_multi_agent.py new file mode 100644 index 0000000000000000000000000000000000000000..f056ea60cc4fe26e1754aa7e7dcd6095094ebd73 --- /dev/null +++ b/tests/test_multi_agent.py @@ -0,0 +1,325 @@ +"""Smoke tests for multi-agent ATC environment.""" + +from __future__ import annotations + +import pytest +from models import SlotAssignment, OperationType +from tasks import task_catalog +from engine import simulate_plan +from multi_agent.environment import MultiAgentATCEnvironment, count_separation_issues +from multi_agent.generator import ChallengeGenerator +from multi_agent.supervisor import SupervisorAgent +from multi_agent.models import ( + AMANAction, + DMANAction, + AgentRole, + SupervisorProfileName, + SUPERVISOR_PROFILES, + PerRoleMetrics, +) +from multi_agent.inference import _build_aman_heuristic, _build_dman_heuristic +from graders import MultiAgentCoordinationGrader, grade_multi_agent + + +# ── Fixtures ────────────────────────────────────────────────────────────────── + +@pytest.fixture +def env(): + return MultiAgentATCEnvironment(seed=0) + + +@pytest.fixture +def catalog(): + return task_catalog() + + +@pytest.fixture +def easy_task(catalog): + return catalog["delhi_monsoon_recovery_easy"] + + +@pytest.fixture +def hard_task(catalog): + return catalog["bengaluru_irrops_hard"] + + +# ── Environment reset ───────────────────────────────────────────────────────── + +def test_count_separation_issues_filters_diagnostics(): + diags = [ + "Runway 27 has A->B spaced 2 minutes apart; needs 3.", + "X exceeds the normal delay tolerance of 35 minutes.", + "Unknown flight id Z in proposal.", + ] + assert count_separation_issues(diags) == 1 + + +def test_reset_splits_flights_by_role(env, easy_task): + aman_obs, dman_obs = env.reset(task_id=easy_task.task_id, episode_id=0) + assert aman_obs.role == AgentRole.AMAN + assert dman_obs.role == AgentRole.DMAN + assert all(f.operation == OperationType.ARRIVAL for f in aman_obs.my_flights) + assert all(f.operation == OperationType.DEPARTURE for f in dman_obs.my_flights) + total = len(aman_obs.my_flights) + len(dman_obs.my_flights) + assert total == len(easy_task.flights) + + +def test_reset_assigns_supervisor_profile(env, easy_task): + aman_obs, _ = env.reset(task_id=easy_task.task_id, episode_id=0) + assert aman_obs.supervisor_profile_name in SupervisorProfileName + assert len(aman_obs.supervisor_description) > 10 + + +def test_atfm_deadlines_are_departures_only(env, easy_task): + env.reset(task_id=easy_task.task_id, episode_id=0) + dep_ids = {f.flight_id for f in easy_task.flights if f.operation == OperationType.DEPARTURE} + for fid in env._state.atfm_deadlines: + assert fid in dep_ids, f"{fid} is not a departure but got ATFM deadline" + + +# ── Heuristic planners ──────────────────────────────────────────────────────── + +def test_heuristic_aman_covers_all_arrivals(env, hard_task): + aman_obs, _ = env.reset(task_id=hard_task.task_id, episode_id=1) + action = _build_aman_heuristic(aman_obs) + assigned_ids = {s.flight_id for s in action.arrival_slots} + arrival_ids = {f.flight_id for f in aman_obs.my_flights} + # Heuristic must assign ≥90% of arrivals (some may be unassignable in extreme cases) + assert len(assigned_ids) >= 0.9 * len(arrival_ids) + + +def test_heuristic_dman_covers_all_departures(env, hard_task): + aman_obs, dman_obs = env.reset(task_id=hard_task.task_id, episode_id=1) + action = _build_dman_heuristic(dman_obs, env._state.atfm_deadlines) + assigned_ids = {s.flight_id for s in action.departure_slots} + dep_ids = {f.flight_id for f in dman_obs.my_flights} + assert len(assigned_ids) >= 0.9 * len(dep_ids) + + +def test_heuristic_slots_within_windows(env, easy_task): + aman_obs, dman_obs = env.reset(task_id=easy_task.task_id, episode_id=0) + flights_by_id = {f.flight_id: f for f in easy_task.flights} + + aman_action = _build_aman_heuristic(aman_obs) + for s in aman_action.arrival_slots: + f = flights_by_id[s.flight_id] + assert f.earliest_minute <= s.assigned_minute <= f.latest_minute, \ + f"{s.flight_id} assigned_minute={s.assigned_minute} outside [{f.earliest_minute},{f.latest_minute}]" + + dman_action = _build_dman_heuristic(dman_obs, env._state.atfm_deadlines) + for s in dman_action.departure_slots: + f = flights_by_id[s.flight_id] + assert f.earliest_minute <= s.assigned_minute <= f.latest_minute, \ + f"{s.flight_id} assigned_minute={s.assigned_minute} outside [{f.earliest_minute},{f.latest_minute}]" + + +# ── Bid round ───────────────────────────────────────────────────────────────── + +def test_bid_step_returns_valid_reward(env, easy_task): + aman_obs, dman_obs = env.reset(task_id=easy_task.task_id, episode_id=0) + aman_action = _build_aman_heuristic(aman_obs) + dman_action = _build_dman_heuristic(dman_obs, env._state.atfm_deadlines) + _, _, reward, done = env.step_bid(aman_action, dman_action) + assert -1.0 <= reward <= 1.0 + assert isinstance(done, bool) + + +def test_bid_step_updates_state(env, easy_task): + aman_obs, dman_obs = env.reset(task_id=easy_task.task_id, episode_id=0) + aman_action = _build_aman_heuristic(aman_obs) + dman_action = _build_dman_heuristic(dman_obs, env._state.atfm_deadlines) + env.step_bid(aman_action, dman_action) + assert len(env._state.aman_slots) > 0 + assert len(env._state.dman_slots) > 0 + assert env._state.round_number >= 1 + + +# ── Finalize ────────────────────────────────────────────────────────────────── + +def test_finalize_returns_bounded_rewards(env, easy_task): + aman_obs, dman_obs = env.reset(task_id=easy_task.task_id, episode_id=0) + aman_action = _build_aman_heuristic(aman_obs) + dman_action = _build_dman_heuristic(dman_obs, env._state.atfm_deadlines) + env.step_bid(aman_action, dman_action) + result = env.finalize() + assert 0.0 <= result.aman_reward <= 1.0 + assert 0.0 <= result.dman_reward <= 1.0 + assert 0.0 <= result.composite_score <= 1.0 + assert 0.0 <= result.per_role.coordination_score <= 1.0 + + +def test_finalize_per_role_flight_counts(env, easy_task): + aman_obs, dman_obs = env.reset(task_id=easy_task.task_id, episode_id=0) + aman_action = _build_aman_heuristic(aman_obs) + dman_action = _build_dman_heuristic(dman_obs, env._state.atfm_deadlines) + env.step_bid(aman_action, dman_action) + result = env.finalize() + n_arr = sum(1 for f in easy_task.flights if f.operation == OperationType.ARRIVAL) + n_dep = sum(1 for f in easy_task.flights if f.operation == OperationType.DEPARTURE) + assert result.per_role.arrival_count == n_arr + assert result.per_role.departure_count == n_dep + + +def test_generator_reward_bounded(env, easy_task): + aman_obs, dman_obs = env.reset(task_id=easy_task.task_id, episode_id=0) + aman_action = _build_aman_heuristic(aman_obs) + dman_action = _build_dman_heuristic(dman_obs, env._state.atfm_deadlines) + env.step_bid(aman_action, dman_action) + result = env.finalize() + assert -1.0 <= result.generator_reward <= 1.0 + + +# ── Multi-episode stability ─────────────────────────────────────────────────── + +def test_multiple_episodes_no_state_leak(env): + """Ensure environment state does not bleed between episodes.""" + catalog = task_catalog() + for ep, task_id in enumerate(list(catalog)[:3]): + aman_obs, dman_obs = env.reset(task_id=task_id, episode_id=ep) + assert env._state.task.task_id == task_id + aman_action = _build_aman_heuristic(aman_obs) + dman_action = _build_dman_heuristic(dman_obs, env._state.atfm_deadlines) + env.step_bid(aman_action, dman_action) + result = env.finalize() + assert 0.0 <= result.composite_score <= 1.0 + + +# ── Generator ───────────────────────────────────────────────────────────────── + +def test_generator_mutation_produces_solvable_task(easy_task): + gen = ChallengeGenerator(seed=7) + mutated, solvable = gen.mutate(easy_task) + assert solvable + assert mutated.task_id == easy_task.task_id + assert len(mutated.runways) == len(easy_task.runways) + + +def test_generator_escalates_difficulty(): + gen = ChallengeGenerator(seed=0) + assert gen.difficulty_level == 1 + for _ in range(12): + gen.update(0.80) # consistently high scores + assert gen.difficulty_level >= 2 + + +def test_generator_eases_on_low_scores(): + gen = ChallengeGenerator(seed=0) + gen._difficulty_level = 4 + for _ in range(12): + gen.update(0.15) # consistently low scores + assert gen.difficulty_level <= 3 + + +def test_generator_solvability_guard(easy_task): + gen = ChallengeGenerator(seed=0) + gen._difficulty_level = 6 + for _ in range(5): + mutated, solvable = gen.mutate(easy_task) + # Even at max difficulty, task should still be solvable + if not solvable: + assert gen.compute_reward(0.3, solvable) == -1.0 + + +# ── Supervisor ──────────────────────────────────────────────────────────────── + +def test_supervisor_profile_rotation(): + sup = SupervisorAgent() + profiles = set() + for ep in range(10): + profiles.add(sup.sample_profile(ep)) + assert len(profiles) == len(SupervisorProfileName) + + +def test_supervisor_score_bounded(easy_task): + sup = SupervisorAgent() + flights = easy_task.flights + slots = [ + SlotAssignment( + flight_id=f.flight_id, + runway=f.allowed_runways[0], + assigned_minute=f.scheduled_minute, + hold_minutes=0, + ) + for f in flights + ] + outcome = simulate_plan(easy_task, slots) + for profile in SupervisorProfileName: + score = sup.score_plan(outcome, easy_task, profile) + assert 0.0 <= score <= 1.0, f"{profile}: score {score} out of range" + + +def test_supervisor_safety_strict_penalises_conflicts(easy_task): + """Safety strict profile should score very low when there are conflicts.""" + sup = SupervisorAgent() + # Create a conflicting plan: two flights on same runway at same minute + f0, f1 = easy_task.flights[0], easy_task.flights[1] + shared_rwy = list(set(f0.allowed_runways) & set(f1.allowed_runways)) + if not shared_rwy: + pytest.skip("No shared runway between first two flights") + slots = [ + SlotAssignment(flight_id=f0.flight_id, runway=shared_rwy[0], assigned_minute=10, hold_minutes=0), + SlotAssignment(flight_id=f1.flight_id, runway=shared_rwy[0], assigned_minute=10, hold_minutes=0), + ] + # Add remaining flights + for f in easy_task.flights[2:]: + slots.append(SlotAssignment( + flight_id=f.flight_id, runway=f.allowed_runways[0], + assigned_minute=f.scheduled_minute, hold_minutes=0, + )) + outcome = simulate_plan(easy_task, slots) + if outcome.metrics.conflict_count == 0: + pytest.skip("No conflict generated — cannot test safety_strict penalty") + score = sup.score_plan(outcome, easy_task, SupervisorProfileName.SAFETY_STRICT) + assert score <= 0.45, f"Safety strict should penalise conflicts; got {score}" + + +# ── Coordination grader ─────────────────────────────────────────────────────── + +def test_coordination_grader_zero_conflicts(easy_task): + grader = MultiAgentCoordinationGrader() + slots = [ + SlotAssignment( + flight_id=f.flight_id, + runway=f.allowed_runways[0], + assigned_minute=f.scheduled_minute, + hold_minutes=0, + ) + for f in easy_task.flights + ] + outcome = simulate_plan(easy_task, slots) + arrivals = [s for s in slots if next(f for f in easy_task.flights if f.flight_id == s.flight_id).operation == OperationType.ARRIVAL] + departures = [s for s in slots if next(f for f in easy_task.flights if f.flight_id == s.flight_id).operation == OperationType.DEPARTURE] + grade = grader.grade(easy_task, outcome, arrivals, departures, negotiation_rounds=0) + assert 0.0 < grade.score < 1.0 + assert "cross_lane_avoidance" in grade.sub_scores + + +def test_grade_multi_agent_returns_three_grades(easy_task): + slots = [ + SlotAssignment(flight_id=f.flight_id, runway=f.allowed_runways[0], + assigned_minute=f.scheduled_minute, hold_minutes=0) + for f in easy_task.flights + ] + outcome = simulate_plan(easy_task, slots) + arrivals = [s for s in slots if next(f for f in easy_task.flights if f.flight_id == s.flight_id).operation == OperationType.ARRIVAL] + departures = [s for s in slots if next(f for f in easy_task.flights if f.flight_id == s.flight_id).operation == OperationType.DEPARTURE] + grades = grade_multi_agent(easy_task, outcome, arrivals, departures) + names = {g.grader_name for g in grades} + assert "composite_task_grader" in names + assert "multi_agent_coordination" in names + assert "llm_supervisor" in names + + +# ── Emergency handling ──────────────────────────────────────────────────────── + +def test_emergency_broadcast_injected_into_messages(env, hard_task): + """Hard task has MED001 (EMERGENCY arrival) and MED208 (MEDICAL departure).""" + aman_obs, dman_obs = env.reset(task_id=hard_task.task_id, episode_id=0) + aman_action = _build_aman_heuristic(aman_obs) + dman_action = _build_dman_heuristic(dman_obs, env._state.atfm_deadlines) + + aman_obs2, dman_obs2, _, _ = env.step_bid(aman_action, dman_action) + # After bid, AMAN emergency should be broadcast to DMAN + emg_msgs_for_dman = [m for m in dman_obs2.incoming_messages if m.is_emergency] + # bengaluru_irrops_hard has MED001 (EMERGENCY arrival) + assert len(emg_msgs_for_dman) >= 1, "Emergency arrival not broadcast to DMAN" diff --git a/tests/test_sft_schema.py b/tests/test_sft_schema.py new file mode 100644 index 0000000000000000000000000000000000000000..12cb1615f72732e7129062989a961e72fc55275c --- /dev/null +++ b/tests/test_sft_schema.py @@ -0,0 +1,55 @@ +"""SFT label serialization must parse with the same parsers as rollout.""" + +from __future__ import annotations + +import pytest + +from multi_agent.inference import _build_aman_heuristic, _build_dman_heuristic +from multi_agent.environment import MultiAgentATCEnvironment +from multi_agent.adapt import parse_adapt_action, _build_adapt_heuristic, build_adapt_observation +from domains.icu import icu_task_catalog +from training.dataset import parse_aman_action, parse_dman_action +from training.sft_schema import ( + adapt_action_to_json_str, + aman_action_to_json_str, + dman_action_to_json_str, + verify_adapt_parseable, + verify_aman_parseable, + verify_dman_parseable, +) +from multi_agent.models import SupervisorProfileName + + +@pytest.fixture +def env(): + return MultiAgentATCEnvironment(seed=1) + + +def test_aman_sft_json_parseable(env): + aman_obs, _ = env.reset(task_id="vadodara_mixed_pair_t0", episode_id=0) + action = _build_aman_heuristic(aman_obs) + assert verify_aman_parseable(action, parse_aman_action) + parsed = parse_aman_action(aman_action_to_json_str(action)) + assert parsed is not None + assert len(parsed.arrival_slots) == len(action.arrival_slots) + + +def test_dman_sft_json_parseable(env): + _, dman_obs = env.reset(task_id="vadodara_mixed_pair_t0", episode_id=0) + action = _build_dman_heuristic(dman_obs, env._state.atfm_deadlines) + assert verify_dman_parseable(action, parse_dman_action) + parsed = parse_dman_action(dman_action_to_json_str(action)) + assert parsed is not None + assert len(parsed.departure_slots) == len(action.departure_slots) + + +def test_adapt_sft_json_parseable(): + task = icu_task_catalog()["icu_normal_day"] + profile = SupervisorProfileName.SAFETY_STRICT + obs = build_adapt_observation(task, profile) + teacher = _build_adapt_heuristic(obs, task) + assert verify_adapt_parseable(teacher, parse_adapt_action) + p = parse_adapt_action(adapt_action_to_json_str(teacher)) + assert p is not None + assert p.entity_wake_map == teacher.entity_wake_map + assert p.entity_priority_map == teacher.entity_priority_map diff --git a/training/HF_TRAINING.md b/training/HF_TRAINING.md new file mode 100644 index 0000000000000000000000000000000000000000..b9868063c81175008a66bec750edeeea4287fd8a --- /dev/null +++ b/training/HF_TRAINING.md @@ -0,0 +1,105 @@ +# Train on Hugging Face (Spaces GPU) + +This repo can run **SFT (optional) + GRPO** on a **private Hugging Face Space** with a GPU, then upload the LoRA folder to a **Hub model repo**. That keeps your laptop off and billing goes through HF credits. + +## Prerequisites + +1. **Hugging Face account** with **write token** (`Settings → Access tokens`, role *write*). +2. **Billing / credits** for the GPU tier you pick (Space **Settings → Hardware**). A **T4** is the cheapest; **7B + Unsloth** may need **A10G** or larger — if the job OOMs, raise hardware in the launcher (`--hardware`) or shrink `--model` / batch flags. +3. **Local Python** with `huggingface_hub` (to run the launcher only): + + ```bash + pip install "huggingface_hub>=0.26" + ``` + +## One-command deploy (recommended) + +From your clone of this repository: + +```bash +python training/hf_train.py \ + --hf_token "$HF_TOKEN" \ + --hf_user jdoe \ + --repo_url https://github.com/yvishi/ats.git \ + --repo_branch cleaned \ + --model Qwen/Qwen2.5-7B-Instruct \ + --hardware a10g-small \ + --episodes 80 \ + --run_sft \ + --adapt_focus +``` + +- **`--run_sft`**: builds jsonl, runs `train_sft.py`, then `train_grpo.py --sft_adapter /app/sft_adapter`. +- Omit **`--run_sft`** for GRPO-only (faster, less JSON stability). +- **`--no_eval`**: skip GRPO before/after eval on the Space (faster). +- **`--github_token`**: only if you use a **private** GitHub repo for `--repo_url`. + +The script: + +1. Creates/updates Space **`/atc-grpo-runner`** (Docker SDK). +2. Creates/updates model repo **`/atc-grpo-adapter`**. +3. Sets Space secret **`HF_TOKEN`** (and optional **`GITHUB_TOKEN`**). +4. Requests the GPU **`--hardware`** (if the API allows; otherwise set it in the Space UI). + +## Watch the run + +**There is no working page at** `.../spaces/user/name/logs` **(that path 404s).** Use one of these: + +1. **Browser:** open the Space **home** only: + `https://huggingface.co/spaces//atc-grpo-runner` + Then use the **Logs** / **Build** UI on that page (wording varies; look for runtime/build output or the status badge). + +2. **CLI** (install [HF CLI](https://huggingface.co/docs/huggingface_hub/guides/cli), `huggingface-cli login`): + + ```bash + hf spaces logs /atc-grpo-runner --build + hf spaces logs /atc-grpo-runner + hf spaces logs /atc-grpo-runner -f + ``` + +### GPU usage shows 0% + +Common causes: + +- **Docker build still failing** — GPU is not used until the container **runs**. Check **Build** logs first. +- **Space asleep** — open the Space URL in a browser to wake it; **Factory reboot** after fixing errors. +- **Hardware not actually enabled** — Space **Settings → Hardware** must show a **GPU** tier (not CPU Basic). The launcher may fail to set hardware via API; set it manually. +- **Run finished or crashed** — container exits; GPU goes idle. Read **run** logs for tracebacks. + +## Download the adapter + +After training finishes: + +```bash +huggingface-cli download /atc-grpo-adapter --local-dir ./hf-adapter +``` + +Use that folder as `--trained` in `training/eval.py` or point inference at the Hub repo. + +## Change code or hyperparameters + +Re-run **`python training/hf_train.py ...`** with new flags; it **re-uploads** the Dockerfile and entrypoint. Then **restart** the Space (Factory reboot or push empty commit) so the new image runs. + +## Hugging Face Jobs (CLI, alternative) + +HF also offers **`hf jobs`** to run a command on a rented GPU (prepaid credits). See the official quickstart: [Hugging Face Jobs](https://huggingface.co/docs/hub/jobs-quickstart). Pattern: + +1. Install the [HF CLI](https://huggingface.co/docs/huggingface_hub/guides/cli). +2. Put the same commands as in `entrypoint.sh` into your job script (clone repo → `train_grpo.py` / `train_sft.py`). +3. Pass **`HF_TOKEN`** as a job secret. + +This repo’s **Spaces** path is the most integrated “one script” experience; **Jobs** are better if you want a single CLI `run` without maintaining a Space. + +## Troubleshooting + +| Issue | What to try | +|-------|-------------| +| **403** creating Space/model | Use your **real** `--hf_user` (profile URL slug), not the literal text `YOUR_HF_USERNAME`. Token must be **write** (classic) or fine-grained with **create repos** + **Spaces** for that account/org. | +| **README / “Startup duration too large”** | The launcher only sets `title` + `sdk: docker` (no `startup_duration_timeout` — avoids HF’s `6h` cap errors). Re-run the launcher after updating the repo, or on the Space click **Files and versions** → **README.md** and remove any `startup_duration_timeout: 8h` left from an old run. | +| **Docker build failed** on `unsloth` git / `colab-new` | Use the **latest** `hf_train.py`: image is `pytorch/pytorch:2.4.0-cuda12.1-…` + **unsloth from PyPI** (no git, no `colab-new`). Re-run the launcher. If the build log shows a **pip** error, paste the last 30 lines. | +| **`torch==2.10.0` vs `torchvision==0.19.0` / unsloth import error** | The launcher Dockerfile upgrades **torchvision** and **torchaudio** from `download.pytorch.org/whl/cu121` after unsloth so they match the newer **torch** unsloth pulls in. Re-run the launcher to refresh the Space Dockerfile. | +| **`/usr/bin/env: 'bash\r': No such file or directory` (exit 127)** | The Space’s `entrypoint.sh` had **Windows (CRLF)** line endings. The launcher now writes **LF** on all OSes. **Re-run** `python training/hf_train.py ...` to re-upload, then restart the Space. If you hand-edit `entrypoint.sh` on Windows, use **LF** in the editor. | +| Build timeout / killed | Unsloth + deps in one `RUN` can take 10–20+ minutes; if HF still kills the build, we can move installs to `entrypoint.sh` (slower per run, faster image build). | +| CUDA OOM | `--hardware a10g-small` or larger; lower `--batch_size`, `--max_new_tokens`, or use a smaller `--model`. | +| Clone fails | Public repo: leave `GITHUB_TOKEN` unset. Private: pass `--github_token` and ensure Space secret is set. | +| Empty adapter repo | Check **Logs** for tracebacks; confirm `HF_TOKEN` has **write** and `hf_push_outputs.py` ran. | diff --git a/training/__init__.py b/training/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..a38885330fa744a5c370be22f9e1742c63c25dc7 --- /dev/null +++ b/training/__init__.py @@ -0,0 +1 @@ +"""GRPO training pipeline for multi-agent ATC environment.""" diff --git a/training/atc_colab_kaggle.ipynb b/training/atc_colab_kaggle.ipynb new file mode 100644 index 0000000000000000000000000000000000000000..dcd48d76eb12b9b6daab3e1a035646cf4e3e030f --- /dev/null +++ b/training/atc_colab_kaggle.ipynb @@ -0,0 +1,909 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "id": "title", + "metadata": {}, + "source": [ + "# ATC Multi-Agent GRPO Training\n", + "\n", + "**Runtime**: `Runtime → Change runtime type → GPU (T4 or better)`\n", + "\n", + "**Default model**: `Qwen2.5-1.5B-Instruct` — safe on T4 (16 GB). \n", + "Change `MODEL_NAME` to `Qwen/Qwen2.5-7B-Instruct` for L4 / A100.\n", + "\n", + "**Works on**: Google Colab · Kaggle Notebooks\n", + "\n", + "**Parity:** Training defaults, env vars, and `train_grpo.py` / `train_sft.py` flags match `training/train_jupyter.ipynb` §0 + §9 (Colab-specific paths and streaming logs differ).\n", + "\n", + "### What this notebook does\n", + "1. Installs dependencies in the correct order (fixes the `retry` import error)\n", + "2. Clones the ATC repo\n", + "3. Verifies reward diversity (constant-reward bugs are fixed in source)\n", + "4. Runs SFT (optional) then GRPO with the same flags as `train_jupyter` (default `adapt_multidomain` = domain-only AMAN+DMAN+ADAPT; grounded curriculum off)\n", + "5. Plots reward curves (labelled axes, EMA smoothing, std collapse detector)\n", + "6. Compares trained vs heuristic baseline side-by-side\n", + "7. Saves all plots as `.png` for README embedding" + ] + }, + { + "cell_type": "markdown", + "id": "cfg-header", + "metadata": {}, + "source": [ + "## 1. Configure" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "config", + "metadata": {}, + "outputs": [], + "source": [ + "import os, sys\n", + "from pathlib import Path\n", + "\n", + "IS_COLAB = 'google.colab' in sys.modules or os.path.exists('/content')\n", + "IS_KAGGLE = os.path.exists('/kaggle/working')\n", + "PLATFORM = 'colab' if IS_COLAB else ('kaggle' if IS_KAGGLE else 'local')\n", + "print(f'Platform: {PLATFORM}')\n", + "\n", + "# ── Repository ────────────────────────────────────────────────────────────────\n", + "REPO_URL = 'https://github.com/GTsingh600/ats.git'\n", + "REPO_BRANCH = 'main'\n", + "\n", + "# ── Model (match training/train_jupyter.ipynb: use 7B when VRAM allows) ───────\n", + "MODEL_NAME = 'Qwen/Qwen2.5-7B-Instruct' # Colab T4-safe; set to Qwen/Qwen2.5-7B-Instruct for A100-class\n", + "\n", + "# ── Training (defaults aligned with training/train_jupyter.ipynb §0) ─────────\n", + "EPISODES = 100\n", + "N_GENERATIONS = 4\n", + "LORA_RANK = 16\n", + "SEED = 42\n", + "BATCH_SIZE = 8\n", + "GRAD_ACCUM = 2\n", + "MAX_NEW_TOKENS = 384\n", + "TEMPERATURE = 0.7\n", + "LOGGING_STEPS = 1\n", + "EVAL_EPISODES = 3\n", + "\n", + "# GRPO roster / dataset (same CLI as train_jupyter)\n", + "TRAINING_MODE = 'adapt_multidomain' # 'full' | 'hyper_minimal' | 'adapt_multidomain'\n", + "RELAX_ROSTER = True\n", + "USE_GROUNDED_CURRICULUM = False # must stay False for adapt_multidomain\n", + "STATIC_GROUNDED_DATASET = False\n", + "ATC_LIVE_PASSES = 2.5\n", + "ATC_SAVE_STEPS = 20\n", + "SKIP_MAIN_EVAL = True\n", + "STRICT_GATES = True\n", + "CURRICULUM_STATE = None # optional path str to grounded_curriculum_state.json\n", + "\n", + "# SFT pre-GRPO (same as train_jupyter defaults)\n", + "RUN_SFT_PHASE = True\n", + "SFT_N_EPISODES = 200\n", + "SFT_MAX_STEPS = 300\n", + "SFT_BATCH = 2\n", + "SFT_GRAD_ACCUM = 4\n", + "SFT_EVAL_SPLIT = 0.0\n", + "SFT_EARLY_STOP_PATIENCE = 0\n", + "\n", + "# ── W&B (optional) ────────────────────────────────────────────────────────────\n", + "WANDB_API_KEY = ''\n", + "WANDB_PROJECT = 'atc-multiagent-grpo'\n", + "\n", + "# ── Paths ─────────────────────────────────────────────────────────────────────\n", + "if IS_COLAB:\n", + " REPO_DIR = Path('/content/ats')\n", + " OUTPUT_DIR = Path('/content/drive/MyDrive/atc-outputs')\n", + "elif IS_KAGGLE:\n", + " REPO_DIR = Path('/kaggle/working/ats')\n", + " OUTPUT_DIR = Path('/kaggle/working/atc-outputs')\n", + "else:\n", + " REPO_DIR = Path('./ats')\n", + " OUTPUT_DIR = Path('./atc-outputs')\n", + "\n", + "PLOTS_DIR = OUTPUT_DIR / 'plots'\n", + "SFT_OUTPUT_DIR = OUTPUT_DIR / 'atc-sft-json'\n", + "\n", + "os.environ['ATC_TRAINING_MODE'] = str(TRAINING_MODE)\n", + "print(f'Model: {MODEL_NAME}')\n", + "print(f'Episodes: {EPISODES} TRAINING_MODE={TRAINING_MODE} RELAX_ROSTER={RELAX_ROSTER}')\n", + "print(f'Grounded: live={USE_GROUNDED_CURRICULUM and not STATIC_GROUNDED_DATASET} static={STATIC_GROUNDED_DATASET}')\n", + "print(f'SFT: RUN_SFT_PHASE={RUN_SFT_PHASE} max_steps={SFT_MAX_STEPS} n_episodes={SFT_N_EPISODES}')\n", + "print(f'Output: {OUTPUT_DIR}')\n" + ] + }, + { + "cell_type": "markdown", + "id": "storage-header", + "metadata": {}, + "source": [ + "## 2. Mount storage" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "storage", + "metadata": {}, + "outputs": [], + "source": [ + "if IS_COLAB:\n", + " USE_DRIVE = True\n", + " if USE_DRIVE:\n", + " from google.colab import drive\n", + " drive.mount('/content/drive')\n", + " else:\n", + " OUTPUT_DIR = Path('/content/atc-outputs')\n", + " PLOTS_DIR = OUTPUT_DIR / 'plots'\n", + "elif IS_KAGGLE:\n", + " try:\n", + " from kaggle_secrets import UserSecretsClient\n", + " _s = UserSecretsClient()\n", + " if not WANDB_API_KEY:\n", + " WANDB_API_KEY = _s.get_secret('WANDB_API_KEY')\n", + " print('Loaded WANDB_API_KEY from Kaggle secrets')\n", + " except Exception:\n", + " pass\n", + "\n", + "OUTPUT_DIR.mkdir(parents=True, exist_ok=True)\n", + "PLOTS_DIR.mkdir(parents=True, exist_ok=True)\n", + "print(f'Output ready: {OUTPUT_DIR}')" + ] + }, + { + "cell_type": "markdown", + "id": "install-header", + "metadata": {}, + "source": [ + "## 3. Install dependencies\n", + "\n", + "**Install order matters.** \n", + "Unsloth is installed **first without `--no-deps`** so pip can resolve a compatible\n", + "`transformers` version. Installing with `--no-deps` causes the\n", + "`ImportError: cannot import name 'retry' from transformers.utils.generic` error\n", + "because the pre-installed Colab/Kaggle `transformers` may not match what\n", + "`unsloth_zoo` requires. \n", + "After unsloth pins `transformers`, we reinstall `trl` and other packages." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "install", + "metadata": {}, + "outputs": [], + "source": [ + "import subprocess, sys\n", + "\n", + "def _pip(*args):\n", + " subprocess.run([sys.executable, '-m', 'pip', 'install', '-q', *args], check=True)\n", + "\n", + "def _pip_uninstall(*pkgs):\n", + " subprocess.run(\n", + " [sys.executable, '-m', 'pip', 'uninstall', '-y', *pkgs],\n", + " capture_output=True,\n", + " )\n", + "\n", + "# ── Step 0: Remove known conflicts ───────────────────────────────────────────\n", + "_pip_uninstall('vllm', 'vllm-flash-attn')\n", + "print('Step 0: removed conflicting packages')\n", + "\n", + "# ── Step 1: Unsloth WITH deps ─────────────────────────────────────────────────\n", + "# CRITICAL: do NOT add --no-deps here.\n", + "# unsloth_zoo imports `retry` from transformers.utils.generic; the version of\n", + "# transformers that exposes this is pulled in by unsloth's own requirements.\n", + "# Skipping deps leaves whatever Colab pre-installed, which causes ImportError.\n", + "_pip('unsloth==2026.4.7', 'unsloth-zoo==2026.4.9')\n", + "print('Step 1: unsloth installed (with deps, including compatible transformers)')\n", + "\n", + "# ── Step 2: TRL and training stack ───────────────────────────────────────────\n", + "# Install AFTER unsloth so transformers is already at the right version.\n", + "# --no-deps for these is safe because unsloth already resolved the graph.\n", + "_pip(\n", + " 'trl==0.16.0',\n", + " 'accelerate==1.13.0',\n", + " 'peft==0.19.1',\n", + " 'bitsandbytes==0.49.2',\n", + " 'datasets==2.20.0',\n", + " '--no-deps',\n", + ")\n", + "print('Step 2: trl + training stack installed')\n", + "\n", + "_pip('mergekit')\n", + "print('Step 2b: mergekit (TRL GRPO import chain)')\n", + "\n", + "\n", + "\n", + "# ── Step 3: HuggingFace utilities ────────────────────────────────────────────\n", + "_pip(\n", + " 'huggingface-hub==0.36.2',\n", + " 'hf_transfer==0.1.9',\n", + " 'tyro==0.9.17',\n", + " 'multiprocess==0.70.17',\n", + " '--no-deps',\n", + ")\n", + "print('Step 3: HuggingFace utilities installed')\n", + "\n", + "# ── Step 4: W&B + OpenEnv + plotting ────────────────────────────────────────\n", + "_pip('wandb>=0.18,<0.20')\n", + "_pip(\n", + " 'openenv-core>=0.2.3',\n", + " 'fastapi>=0.128.0',\n", + " 'pydantic>=2.12.0',\n", + " 'uvicorn>=0.41.0',\n", + " 'matplotlib>=3.9.0',\n", + " 'numpy>=1.26.0',\n", + ")\n", + "print('Step 4: W&B + OpenEnv + plotting installed')\n", + "\n", + "# ── Global env flags ─────────────────────────────────────────────────────────\n", + "import os\n", + "os.environ['TORCH_COMPILE_DISABLE'] = '1' # avoid Dynamo issues with GRPO\n", + "os.environ['TOKENIZERS_PARALLELISM'] = 'false'\n", + "\n", + "print('\\nInstallation complete.')" + ] + }, + { + "cell_type": "markdown", + "id": "clone-header", + "metadata": {}, + "source": [ + "## 4. Clone repository" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "clone", + "metadata": {}, + "outputs": [], + "source": [ + "import shutil, os, sys\n", + "from pathlib import Path\n", + "\n", + "if REPO_DIR.exists():\n", + " shutil.rmtree(REPO_DIR)\n", + "\n", + "subprocess.run(\n", + " ['git', 'clone', '--branch', REPO_BRANCH, '--depth', '1',\n", + " REPO_URL, str(REPO_DIR)],\n", + " check=True,\n", + ")\n", + "\n", + "os.chdir(REPO_DIR)\n", + "if str(REPO_DIR) not in sys.path:\n", + " sys.path.insert(0, str(REPO_DIR))\n", + "\n", + "print(f'Working directory: {Path.cwd()}')\n", + "\n", + "# Clear stale __pycache__ so Unsloth rebuilds compiled kernels fresh\n", + "for d in REPO_DIR.rglob('__pycache__'):\n", + " shutil.rmtree(d, ignore_errors=True)\n", + "print('Cleared __pycache__')" + ] + }, + { + "cell_type": "markdown", + "id": "verify-header", + "metadata": {}, + "source": [ + "## 5. Verify environment" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "verify", + "metadata": {}, + "outputs": [], + "source": [ + "import torch\n", + "\n", + "print(f'PyTorch: {torch.__version__}')\n", + "print(f'CUDA: {torch.cuda.is_available()}')\n", + "if torch.cuda.is_available():\n", + " print(f'GPU: {torch.cuda.get_device_name(0)}')\n", + " vram_gb = torch.cuda.get_device_properties(0).total_memory / 1e9\n", + " print(f'VRAM: {vram_gb:.1f} GB')\n", + " if vram_gb < 14:\n", + " print('WARNING: <14 GB VRAM detected. Use 1.5B model + N_GENERATIONS=2')\n", + "\n", + "_unsloth_ver = None\n", + "try:\n", + " import unsloth # noqa: F401\n", + " _unsloth_ver = unsloth.__version__\n", + "except Exception as exc:\n", + " print(f'Unsloth preload: {exc}')\n", + "\n", + "import transformers\n", + "import trl\n", + "import peft\n", + "print(f'Transformers: {transformers.__version__}')\n", + "if _unsloth_ver is not None:\n", + " print(f'Unsloth: {_unsloth_ver}')\n", + "print(f'TRL: {trl.__version__}')\n", + "print(f'PEFT: {peft.__version__}')\n", + "\n", + "try:\n", + " from transformers.utils.generic import retry # noqa: F401\n", + " print('transformers.utils.generic.retry: OK')\n", + "except ImportError:\n", + " print('WARNING: retry not in transformers.utils.generic')\n", + " print(' Re-run the install cell.')\n", + "\n", + "from trl import GRPOConfig, GRPOTrainer\n", + "print('GRPOConfig + GRPOTrainer: OK')\n", + "if _unsloth_ver is not None:\n", + " from unsloth import FastLanguageModel # noqa: F401\n", + " print('FastLanguageModel: OK')\n", + "else:\n", + " print('FastLanguageModel: skipped (unsloth not loaded)')\n", + "\n", + "from training.dataset import build_episode_dataset\n", + "_check = build_episode_dataset(n_episodes=2, seed=0, training_mode=TRAINING_MODE)\n", + "print(f'Dataset builder: OK — {len(_check)} samples, roles={sorted({r[\"agent_role\"] for r in _check})}')\n" + ] + }, + { + "cell_type": "markdown", + "id": "reward-check-header", + "metadata": {}, + "source": [ + "## 6. Verify reward diversity\n", + "\n", + "Three bugs caused constant AMAN/DMAN rewards (zero GRPO gradient). All fixed in source:\n", + "\n", + "| Bug | Before | After |\n", + "|-----|--------|-------|\n", + "| `delay_eff` for empty plan | `1.0` (wrong) | `0.0` |\n", + "| Parse failure reward | fixed `-0.8` → group std=0 | content-aware `[-0.80, -0.62]` |\n", + "| Generation temperature | `0.7` (low diversity) | `0.9` |" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "reward-check", + "metadata": {}, + "outputs": [], + "source": [ + "import statistics\n", + "from training.reward_functions import aman_reward_fn, _parse_partial_credit\n", + "from tasks import task_catalog\n", + "\n", + "catalog = task_catalog()\n", + "tid = list(catalog.keys())[0]\n", + "print(f'Test task: {tid} ({len(catalog[tid].flights)} flights)')\n", + "\n", + "# Test 1: empty arrival_slots must NOT get delay_eff=1.0\n", + "r_empty = aman_reward_fn(['{\"arrival_slots\": [], \"rationale\": \"test\"}'], task_id=[tid])\n", + "print(f'\\nEmpty plan reward: {r_empty[0]:.4f}')\n", + "assert r_empty[0] < 0.20, f'Bug still present: empty plan scored {r_empty[0]:.3f} (expect < 0.20)'\n", + "print(' PASS: empty plan correctly penalised')\n", + "\n", + "# Test 2: group of 4 completions must have std > 0\n", + "group = [\n", + " 'no json here at all',\n", + " '{\"arrival_slots\": [{\"flight_id\": \"AI101\", \"runway\": \"28L\", \"assigned_minute\": 30, \"hold_minutes\": 0}], \"rationale\": \"ok\"}',\n", + " '{\"arrival_slots\": [], \"rationale\": \"runway unavailable\"}',\n", + " '{flight_id: broken json',\n", + "]\n", + "rewards = aman_reward_fn(group, task_id=[tid]*4)\n", + "std = statistics.stdev(rewards)\n", + "print(f'\\nGroup rewards: {[round(r,4) for r in rewards]}')\n", + "print(f'Group std: {std:.4f}')\n", + "assert std > 0, 'FAIL: all rewards identical — GRPO gets zero gradient'\n", + "print(' PASS: reward diversity confirmed (GRPO gradient will flow)')\n", + "\n", + "# Test 3: _parse_partial_credit is monotonically more generous with more structure\n", + "samples = [\n", + " ('empty', ''),\n", + " ('plain text', 'I cannot do this'),\n", + " ('has brace', '{some content}'),\n", + " ('has arrival_slots', '{\"arrival_slots\": [...]}'),\n", + " ('has flight+runway', '{\"arrival_slots\": [{\"flight_id\":\"X\",\"runway\":\"28L\"}]}'),\n", + "]\n", + "print('\\n_parse_partial_credit:')\n", + "prev = -1\n", + "for label, text in samples:\n", + " c = _parse_partial_credit(text)\n", + " print(f' {label:25s}: {c:.4f}')\n", + " assert c >= prev, f'Expected non-decreasing credit, got {c} < {prev}'\n", + " prev = c\n", + "\n", + "print('\\nAll reward diversity checks PASSED.')" + ] + }, + { + "cell_type": "markdown", + "id": "wandb-header", + "metadata": {}, + "source": [ + "## 7. W&B setup (optional)" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "wandb-setup", + "metadata": {}, + "outputs": [], + "source": [ + "import os\n", + "\n", + "if IS_COLAB and not WANDB_API_KEY:\n", + " try:\n", + " from google.colab import userdata\n", + " WANDB_API_KEY = userdata.get('WANDB_API_KEY')\n", + " print('Loaded WANDB_API_KEY from Colab secrets')\n", + " except Exception:\n", + " pass\n", + "\n", + "if WANDB_API_KEY:\n", + " import wandb\n", + " wandb.login(key=WANDB_API_KEY, relogin=True)\n", + " os.environ['WANDB_PROJECT'] = WANDB_PROJECT\n", + " os.environ['WANDB_MODE'] = 'online'\n", + " print(f'W&B: online project={WANDB_PROJECT}')\n", + "else:\n", + " os.environ['WANDB_MODE'] = 'disabled'\n", + " print('W&B: disabled (set WANDB_API_KEY to enable)')" + ] + }, + { + "cell_type": "markdown", + "id": "train-header", + "metadata": {}, + "source": [ + "## 8. Train\n", + "\n", + "`train_grpo.py` runs: load 4-bit QLoRA model → build episode dataset → GRPO loop → save checkpoint + curves.\n", + "\n", + "> **OOM?** Lower `N_GENERATIONS` to `2`, or switch to `Qwen2.5-1.5B-Instruct`." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "train", + "metadata": {}, + "outputs": [], + "source": [ + "import time, subprocess, sys, os, re\n", + "from collections import defaultdict\n", + "from pathlib import Path\n", + "\n", + "SFT_OUTPUT_DIR.mkdir(parents=True, exist_ok=True)\n", + "\n", + "def _train_env():\n", + " e = os.environ.copy()\n", + " e['PYTHONUNBUFFERED'] = '1'\n", + " e['ATC_STRICT_GATES'] = '1' if STRICT_GATES else '0'\n", + " e['ATC_TRAINING_MODE'] = str(TRAINING_MODE)\n", + " e['ATC_LIVE_PASSES'] = str(float(ATC_LIVE_PASSES))\n", + " e['ATC_SAVE_STEPS'] = str(int(ATC_SAVE_STEPS))\n", + " if STATIC_GROUNDED_DATASET:\n", + " e['ATC_STATIC_GROUNDED_DATASET'] = '1'\n", + " else:\n", + " e.pop('ATC_STATIC_GROUNDED_DATASET', None)\n", + " if RELAX_ROSTER:\n", + " e['ATC_RELAX_ROSTER'] = '1'\n", + " else:\n", + " e.pop('ATC_RELAX_ROSTER', None)\n", + " return e\n", + "\n", + "env = _train_env()\n", + "\n", + "if RUN_SFT_PHASE:\n", + " sft_cmd = [\n", + " sys.executable, 'training/train_sft.py',\n", + " '--model', MODEL_NAME,\n", + " '--output_dir', str(SFT_OUTPUT_DIR),\n", + " '--n_episodes', str(SFT_N_EPISODES),\n", + " '--max_steps', str(SFT_MAX_STEPS),\n", + " '--batch_size', str(SFT_BATCH),\n", + " '--grad_accum', str(SFT_GRAD_ACCUM),\n", + " '--seed', str(SEED),\n", + " '--eval_split', str(SFT_EVAL_SPLIT),\n", + " '--early_stop_patience', str(SFT_EARLY_STOP_PATIENCE),\n", + " ]\n", + " if CURRICULUM_STATE:\n", + " sft_cmd.extend(['--curriculum_state', str(CURRICULUM_STATE)])\n", + " print('SFT:', ' '.join(sft_cmd))\n", + " subprocess.run(sft_cmd, check=True, env=env)\n", + "\n", + "_sft = SFT_OUTPUT_DIR if (SFT_OUTPUT_DIR / 'adapter_config.json').is_file() else None\n", + "if RUN_SFT_PHASE and _sft is None:\n", + " raise RuntimeError('SFT expected but adapter_config.json missing')\n", + "\n", + "train_cmd = [\n", + " sys.executable, 'training/train_grpo.py',\n", + " '--model', MODEL_NAME,\n", + " '--output_dir', str(OUTPUT_DIR),\n", + " '--episodes', str(EPISODES),\n", + " '--n_generations', str(N_GENERATIONS),\n", + " '--batch_size', str(BATCH_SIZE),\n", + " '--grad_accum', str(GRAD_ACCUM),\n", + " '--max_new_tokens', str(MAX_NEW_TOKENS),\n", + " '--temperature', str(TEMPERATURE),\n", + " '--logging_steps', str(LOGGING_STEPS),\n", + " '--eval_episodes', str(EVAL_EPISODES),\n", + " '--lora_rank', str(LORA_RANK),\n", + " '--seed', str(SEED),\n", + " '--training_mode', str(TRAINING_MODE),\n", + "]\n", + "if USE_GROUNDED_CURRICULUM:\n", + " train_cmd.append('--grounded_curriculum')\n", + " if STATIC_GROUNDED_DATASET:\n", + " train_cmd.append('--static_grounded_dataset')\n", + " if CURRICULUM_STATE:\n", + " train_cmd.extend(['--curriculum_state', str(CURRICULUM_STATE)])\n", + "if SKIP_MAIN_EVAL:\n", + " train_cmd.append('--no_eval')\n", + "if _sft is not None:\n", + " train_cmd.extend(['--adapter_in', str(_sft)])\n", + "\n", + "\n", + "# ── Live reward tracking ──────────────────────────────────────────────────────\n", + "# TRL 0.16 logs every logging_steps steps in dict format:\n", + "# {'loss': 0.012, 'reward': 0.23, 'reward/AMAN': 0.31, 'step': 10, ...}\n", + "reward_history = defaultdict(list)\n", + "loss_history = []\n", + "step_history = []\n", + "last_print_step = -1\n", + "\n", + "_re_reward = re.compile(r\"'reward(?:/([\\w]+))?':\\s*([-\\d.eE+]+)\")\n", + "_re_loss = re.compile(r\"'loss':\\s*([-\\d.eE+]+)\")\n", + "_re_step = re.compile(r\"'step':\\s*(\\d+)\")\n", + "\n", + "def _bar(val, lo=-1.0, hi=1.0, width=20):\n", + " \"\"\"ASCII bar for a reward value in [lo, hi].\"\"\"\n", + " frac = max(0.0, min(1.0, (val - lo) / (hi - lo)))\n", + " filled = int(frac * width)\n", + " return f'[{\"#\" * filled}{\"-\" * (width - filled)}] {val:+.3f}'\n", + "\n", + "def _live_summary(step):\n", + " elapsed_s = time.time() - t0\n", + " print(f'\\n── step {step:4d} elapsed {elapsed_s/60:.1f} min ──────────────────')\n", + " if loss_history:\n", + " print(f' loss : {loss_history[-1]:.5f}')\n", + " for role in ('AMAN', 'DMAN', 'GENERATOR', 'SUPERVISOR', 'composite'):\n", + " vals = reward_history.get(role, [])\n", + " if not vals:\n", + " continue\n", + " recent = vals[-min(20, len(vals)):]\n", + " mean_r = sum(recent) / len(recent)\n", + " trend = ''\n", + " if len(vals) >= 40:\n", + " half = len(vals) // 2\n", + " early = sum(vals[:half]) / half\n", + " late = sum(vals[half:]) / (len(vals) - half)\n", + " trend = ' ↑' if late > early + 0.03 else (' ↓' if late < early - 0.03 else ' →')\n", + " print(f' {role:10s} : {_bar(mean_r)}{trend}')\n", + " print()\n", + "\n", + "# ── Launch with live stdout streaming ────────────────────────────────────────\n", + "# env from _train_env()\n", + "env['PYTHONUNBUFFERED'] = '1' # training script flushes every line immediately\n", + "\n", + "print('Command:', ' '.join(train_cmd))\n", + "print('='*60)\n", + "t0 = time.time()\n", + "proc = subprocess.Popen(\n", + " train_cmd,\n", + " stdout=subprocess.PIPE,\n", + " stderr=subprocess.STDOUT, # merge stderr so nothing is hidden\n", + " text=True,\n", + " bufsize=1, # line-buffered\n", + " env=env,\n", + ")\n", + "\n", + "for raw_line in proc.stdout:\n", + " line = raw_line.rstrip('\\n')\n", + " print(line, flush=True) # echo every line immediately\n", + "\n", + " # Parse TRL dict-format log lines\n", + " if \"'reward'\" in line or \"'loss'\" in line:\n", + " m_step = _re_step.search(line)\n", + " m_loss = _re_loss.search(line)\n", + " if m_loss:\n", + " loss_history.append(float(m_loss.group(1)))\n", + " for m in _re_reward.finditer(line):\n", + " role = m.group(1) or 'composite'\n", + " reward_history[role].append(float(m.group(2)))\n", + " if m_step:\n", + " s = int(m_step.group(1))\n", + " if s != last_print_step:\n", + " last_print_step = s\n", + " step_history.append(s)\n", + " _live_summary(s)\n", + "\n", + "proc.wait()\n", + "elapsed = time.time() - t0\n", + "print('='*60)\n", + "\n", + "# ── Final summary ─────────────────────────────────────────────────────────────\n", + "if reward_history:\n", + " print('\\n=== FINAL REWARD SUMMARY ===')\n", + " for role in ('AMAN', 'DMAN', 'GENERATOR', 'SUPERVISOR', 'composite'):\n", + " vals = reward_history.get(role, [])\n", + " if not vals:\n", + " continue\n", + " n = len(vals)\n", + " avg = sum(vals) / n\n", + " fq = sum(vals[:max(1, n//4)]) / max(1, n//4)\n", + " lq = sum(vals[max(0, 3*n//4):]) / max(1, n - 3*n//4)\n", + " trend = '↑' if lq > fq + 0.03 else ('↓' if lq < fq - 0.03 else '→')\n", + " print(f' {role:12s}: mean={avg:+.3f} first_q={fq:+.3f} last_q={lq:+.3f} {trend}')\n", + "\n", + "status = 'complete' if proc.returncode == 0 else f'FAILED (exit code {proc.returncode})'\n", + "print(f'\\nTraining {status} in {elapsed/60:.1f} min')\n" + ] + }, + { + "cell_type": "markdown", + "id": "plots-header", + "metadata": {}, + "source": [ + "## 9. Plot reward curves\n", + "\n", + "All plots saved to `OUTPUT_DIR/plots/*.png` — embed in README." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "plots", + "metadata": {}, + "outputs": [], + "source": [ + "import json\n", + "import matplotlib\n", + "matplotlib.use('Agg')\n", + "import matplotlib.pyplot as plt\n", + "import numpy as np\n", + "from IPython.display import Image, display\n", + "from pathlib import Path\n", + "\n", + "PLOTS_DIR.mkdir(parents=True, exist_ok=True)\n", + "curves_path = OUTPUT_DIR / 'reward_curves.json'\n", + "\n", + "if not curves_path.exists():\n", + " print(f'reward_curves.json not found at {curves_path}')\n", + "else:\n", + " with open(curves_path) as f:\n", + " curves = json.load(f)\n", + "\n", + " def _ema(vals, span=15):\n", + " if len(vals) < 2: return vals\n", + " alpha, ema, out = 2/(span+1), vals[0], []\n", + " for v in vals:\n", + " ema = alpha*v + (1-alpha)*ema\n", + " out.append(ema)\n", + " return out\n", + "\n", + " # ── Plot 1: Per-role reward curves ────────────────────────────────────────\n", + " role_colors = {'AMAN':'#2196F3','DMAN':'#4CAF50','GENERATOR':'#FF9800','SUPERVISOR':'#9C27B0'}\n", + " fig, axes = plt.subplots(2, 2, figsize=(14, 9))\n", + " for ax, (role, color) in zip(axes.flatten(), role_colors.items()):\n", + " raw = curves.get(role, [])\n", + " if not raw:\n", + " ax.text(0.5, 0.5, f'No {role} data', ha='center', va='center',\n", + " transform=ax.transAxes, color='grey')\n", + " ax.set_title(role); continue\n", + " steps = range(len(raw))\n", + " ax.plot(steps, raw, alpha=0.25, color=color, lw=0.8, label='raw')\n", + " ax.plot(steps, _ema(raw), color=color, lw=2.0, label='EMA-15')\n", + " ax.axhline(0, color='black', lw=0.5, ls='--')\n", + " ax.set_xlabel('Training step'); ax.set_ylabel('Reward')\n", + " ax.set_title(f'{role} reward over training', fontweight='bold')\n", + " ax.set_ylim(-1.05, 1.05); ax.legend(fontsize=9); ax.grid(alpha=0.3)\n", + " fig.suptitle('ATC Multi-Agent GRPO — Per-Role Reward Curves', fontsize=14, fontweight='bold', y=1.01)\n", + " fig.tight_layout()\n", + " p1 = PLOTS_DIR / 'per_role_rewards.png'\n", + " fig.savefig(p1, dpi=150, bbox_inches='tight'); plt.close(fig)\n", + " print(f'Saved: {p1}'); display(Image(filename=str(p1)))\n", + "\n", + " # ── Plot 2: Composite reward + rolling std (GRPO health check) ────────────\n", + " composite = curves.get('composite', [])\n", + " if composite:\n", + " w = 20\n", + " stds = [float(np.std(composite[max(0,i-w):i+1])) for i in range(len(composite))]\n", + " fig, (ax1, ax2) = plt.subplots(2, 1, figsize=(12, 8), sharex=True)\n", + " steps = range(len(composite))\n", + " ax1.plot(steps, composite, alpha=0.25, color='#607D8B', lw=0.8)\n", + " ax1.plot(steps, _ema(composite), color='#607D8B', lw=2.0, label='EMA-15')\n", + " ax1.axhline(0, color='black', lw=0.6, ls='--')\n", + " ax1.set_ylabel('Composite reward'); ax1.set_ylim(-1.05, 1.05)\n", + " ax1.set_title('Composite reward (all roles)', fontweight='bold')\n", + " ax1.grid(alpha=0.3); ax1.legend(fontsize=9)\n", + " ax2.plot(steps, stds, color='#E91E63', lw=1.5, label=f'rolling std (w={w})')\n", + " ax2.axhline(0.01, color='red', lw=0.8, ls=':', label='collapse threshold 0.01')\n", + " ax2.set_xlabel('Training step')\n", + " ax2.set_ylabel('Within-group std')\n", + " ax2.set_title('Reward diversity — must stay > 0.01 for GRPO gradient', fontweight='bold')\n", + " ax2.grid(alpha=0.3); ax2.legend(fontsize=9)\n", + " fig.tight_layout()\n", + " p2 = PLOTS_DIR / 'composite_and_std.png'\n", + " fig.savefig(p2, dpi=150, bbox_inches='tight'); plt.close(fig)\n", + " print(f'Saved: {p2}'); display(Image(filename=str(p2)))\n", + "\n", + " # ── Plot 3: First-quarter vs last-quarter per role ────────────────────────\n", + " roles_ok = [r for r in ['AMAN','DMAN','GENERATOR','SUPERVISOR'] if len(curves.get(r,[])) >= 8]\n", + " if roles_ok:\n", + " fig, ax = plt.subplots(figsize=(10, 5))\n", + " x = np.arange(len(roles_ok))\n", + " fq, lq = [], []\n", + " for role in roles_ok:\n", + " r = curves[role]; n = len(r)\n", + " fq.append(float(np.mean(r[:max(1,n//4)]))); lq.append(float(np.mean(r[max(0,3*n//4):])))\n", + " b1 = ax.bar(x-0.2, fq, 0.35, label='First quarter', color='#90CAF9', edgecolor='#1565C0')\n", + " b2 = ax.bar(x+0.2, lq, 0.35, label='Last quarter', color='#A5D6A7', edgecolor='#2E7D32')\n", + " for b in list(b1)+list(b2):\n", + " ax.text(b.get_x()+b.get_width()/2, b.get_height()+0.01,\n", + " f'{b.get_height():.3f}', ha='center', va='bottom', fontsize=8)\n", + " ax.set_xticks(x); ax.set_xticklabels(roles_ok, fontsize=11)\n", + " ax.set_ylabel('Mean reward')\n", + " ax.set_title('First vs last quarter reward per role — evidence of learning', fontweight='bold')\n", + " ax.axhline(0, color='black', lw=0.6, ls='--'); ax.legend(); ax.grid(axis='y', alpha=0.3)\n", + " fig.tight_layout()\n", + " p3 = PLOTS_DIR / 'first_vs_last_quarter.png'\n", + " fig.savefig(p3, dpi=150, bbox_inches='tight'); plt.close(fig)\n", + " print(f'Saved: {p3}'); display(Image(filename=str(p3)))" + ] + }, + { + "cell_type": "markdown", + "id": "eval-header", + "metadata": {}, + "source": [ + "## 10. Before vs after comparison\n", + "\n", + "Heuristic baseline (no LLM) · base model (untrained LoRA) · trained model" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "eval", + "metadata": {}, + "outputs": [], + "source": [ + "import json\n", + "import matplotlib\n", + "matplotlib.use('Agg')\n", + "import matplotlib.pyplot as plt\n", + "import numpy as np\n", + "from IPython.display import Image, display\n", + "\n", + "def _load(p):\n", + " p = Path(p)\n", + " return json.loads(p.read_text()) if p.exists() else None\n", + "\n", + "baseline = _load(OUTPUT_DIR / 'baseline_metrics.json')\n", + "base_mdl = _load(OUTPUT_DIR / 'base_model_metrics.json')\n", + "trained = _load(OUTPUT_DIR / 'trained_model_metrics.json')\n", + "\n", + "if not any([baseline, base_mdl, trained]):\n", + " print('No eval metrics found. Run training without --no_eval.')\n", + "else:\n", + " keys = [\n", + " ('mean_composite', 'Composite score'),\n", + " ('mean_aman_reward', 'AMAN reward'),\n", + " ('mean_dman_reward', 'DMAN reward'),\n", + " ('mean_conflicts', 'Avg conflicts (lower=better)'),\n", + " ]\n", + " print(f'{\"Metric\":25s} {\"Heuristic\":>12} {\"Base model\":>12} {\"Trained\":>12}')\n", + " print('-'*64)\n", + " for k, label in keys:\n", + " bv = f'{baseline.get(k,float(\"nan\")):.3f}' if baseline else 'N/A'\n", + " mv = f'{base_mdl.get(k, float(\"nan\")):.3f}' if base_mdl else 'N/A'\n", + " tv = f'{trained.get(k, float(\"nan\")):.3f}' if trained else 'N/A'\n", + " print(f'{label:25s} {bv:>12} {mv:>12} {tv:>12}')\n", + "\n", + " sources = []\n", + " if baseline: sources.append(('Heuristic\\nbaseline', baseline, '#B0BEC5'))\n", + " if base_mdl: sources.append(('Base model\\n(no finetune)', base_mdl, '#90CAF9'))\n", + " if trained: sources.append(('Trained\\nmodel', trained, '#A5D6A7'))\n", + "\n", + " if sources:\n", + " plot_keys = [(k, lbl) for k, lbl in keys if 'conflict' not in k]\n", + " fig, axes = plt.subplots(1, len(plot_keys), figsize=(4*len(plot_keys), 5))\n", + " if len(plot_keys) == 1: axes = [axes]\n", + " for ax, (k, label) in zip(axes, plot_keys):\n", + " vals = [s[1].get(k, 0.0) for s in sources]\n", + " labels = [s[0] for s in sources]\n", + " colors = [s[2] for s in sources]\n", + " bars = ax.bar(labels, vals, color=colors, edgecolor='#333', width=0.55)\n", + " for b, v in zip(bars, vals):\n", + " ax.text(b.get_x()+b.get_width()/2, b.get_height()+0.01,\n", + " f'{v:.3f}', ha='center', va='bottom', fontsize=10)\n", + " ax.set_title(label, fontweight='bold'); ax.set_ylabel('Score')\n", + " ax.set_ylim(0, 1.15); ax.grid(axis='y', alpha=0.3)\n", + " fig.suptitle('Before vs After GRPO Training', fontsize=14, fontweight='bold', y=1.03)\n", + " fig.tight_layout()\n", + " p_eval = PLOTS_DIR / 'eval_comparison.png'\n", + " fig.savefig(p_eval, dpi=150, bbox_inches='tight'); plt.close(fig)\n", + " print(f'\\nSaved: {p_eval}'); display(Image(filename=str(p_eval)))" + ] + }, + { + "cell_type": "markdown", + "id": "summary-header", + "metadata": {}, + "source": [ + "## 11. Summary" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "summary", + "metadata": {}, + "outputs": [], + "source": [ + "print('='*60)\n", + "print(' ATC GRPO Training — Run Complete')\n", + "print('='*60)\n", + "print(f' Model: {MODEL_NAME}')\n", + "print(f' Episodes: {EPISODES}')\n", + "print(f' Group size: {N_GENERATIONS}')\n", + "print(f' LoRA rank: {LORA_RANK}')\n", + "print(f' Output: {OUTPUT_DIR}')\n", + "print(f' Plots: {PLOTS_DIR}')\n", + "print()\n", + "print(' Output files:')\n", + "all_files = sorted(OUTPUT_DIR.rglob('*.json')) + sorted(PLOTS_DIR.rglob('*.png'))\n", + "for f in all_files:\n", + " print(f' {f.relative_to(OUTPUT_DIR)}')\n", + "print()\n", + "print(' Reward fixes applied:')\n", + "print(' [1] delay_eff=0 for fully-unscheduled plans (was 1.0)')\n", + "print(' [2] Parse failures get content-aware [-0.80, -0.62] (was fixed -0.8)')\n", + "print(' [3] TEMPERATURE=0.9 for diverse GRPO rollouts (was 0.7)')\n", + "print('='*60)" + ] + }, + { + "cell_type": "markdown", + "id": "troubleshoot", + "metadata": {}, + "source": [ + "## Troubleshooting\n", + "\n", + "| Symptom | Fix |\n", + "|---|---|\n", + "| `No module named 'mergekit'` | Re-run install cell (Step 2b installs mergekit for TRL GRPO) |\n", + "| `retry` ImportError | Re-run Cell 3 — do NOT add `--no-deps` to the unsloth install line |\n", + "| CUDA OOM | Set `N_GENERATIONS=2`; use `Qwen2.5-1.5B-Instruct` |\n", + "| `GRPOConfig` keyword error | Confirm `trl==0.16.0` printed in Cell 3 output |\n", + "| Rewards still constant | `os.environ['ATC_REWARD_TRACE']='1'` before training to see component values |\n", + "| Disconnect mid-training | Enable Drive mount (`USE_DRIVE=True`) |\n", + "| Kaggle: slow training | 2×T4 — keep `BATCH_SIZE=2`, `N_GENERATIONS=4` as-is |\n", + "\n", + "**Reward trace**: `os.environ['ATC_REWARD_TRACE'] = '1'` — prints per-component breakdown per completion." + ] + } + ], + "metadata": { + "accelerator": "GPU", + "colab": { + "gpuType": "T4", + "provenance": [] + }, + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "name": "python", + "version": "3.11.0" + } + }, + "nbformat": 4, + "nbformat_minor": 5 +} diff --git a/training/build_sft_dataset.py b/training/build_sft_dataset.py new file mode 100644 index 0000000000000000000000000000000000000000..0117327882072fadc8e3bfecc968d59e30cd2c6a --- /dev/null +++ b/training/build_sft_dataset.py @@ -0,0 +1,221 @@ +"""Build supervised fine-tuning (SFT) JSONL for AMAN / DMAN / ADAPT JSON I/O. + +Teacher labels come from the same deterministic heuristics used in inference +(``multi_agent.inference``), so completions match ``parse_*`` expectations. + +Usage: + python training/build_sft_dataset.py --out data/atc_sft.jsonl --episodes 400 + +Then run SFT: + python training/train_sft.py --dataset data/atc_sft.jsonl --output_dir outputs/sft-lora +""" + +from __future__ import annotations + +import argparse +import json +import math +import random +import sys +from pathlib import Path +from typing import Any, Dict, List, Optional + +ROOT = Path(__file__).resolve().parent.parent +if str(ROOT) not in sys.path: + sys.path.insert(0, str(ROOT)) + +from multi_agent.environment import MultiAgentATCEnvironment +from multi_agent.generator import ChallengeGenerator +from multi_agent.models import AgentRole, SupervisorProfileName, SUPERVISOR_PROFILES +from multi_agent.supervisor import SupervisorAgent +from tasks import MAX_TASK_TIER, task_catalog, tasks_up_to_tier + +from training.dataset import ( + ADAPT_SYSTEM, + AMAN_SYSTEM, + DMAN_SYSTEM, + _heuristic_aman_action, + _heuristic_dman_action, +) +from training.sft_schema import adapt_action_to_json_str, aman_action_to_json_str, dman_action_to_json_str + + +def _chat_messages(system: str, user: str, assistant_json: str) -> List[Dict[str, str]]: + return [ + {"role": "system", "content": system}, + {"role": "user", "content": user}, + {"role": "assistant", "content": assistant_json}, + ] + + +def build_sft_rows( + n_episodes: int, + seed: int, + *, + include_negotiate: bool = True, + include_adapt: bool = True, + domain_episode_ratio: float = 0.12, +) -> List[Dict[str, Any]]: + """Return SFT rows with ``messages`` + metadata (each row = one training example).""" + from multi_agent.inference import _build_aman_heuristic, _build_dman_heuristic + + rng = random.Random(seed) + supervisor = SupervisorAgent() + env = MultiAgentATCEnvironment(seed=seed) + generator = ChallengeGenerator(seed=seed) + rows: List[Dict[str, Any]] = [] + + domain_tasks: Dict[str, Any] = {} + build_adapt_observation = None + _build_adapt_heuristic = None + if include_adapt: + try: + from domains import get_all_domain_tasks + from multi_agent.adapt import _build_adapt_heuristic as _bah + from multi_agent.adapt import build_adapt_observation as _bao + + domain_tasks = get_all_domain_tasks() + build_adapt_observation = _bao + _build_adapt_heuristic = _bah + except Exception: + domain_tasks = {} + + for ep_id in range(n_episodes): + if ( + include_adapt + and domain_tasks + and build_adapt_observation is not None + and _build_adapt_heuristic is not None + and rng.random() < domain_episode_ratio + ): + tid = rng.choice(list(domain_tasks.keys())) + dtask = domain_tasks[tid] + profile = supervisor.sample_profile(ep_id) + sup_desc = SUPERVISOR_PROFILES[profile]["description"] + obs = build_adapt_observation(dtask, profile) + teacher = _build_adapt_heuristic(obs, dtask) + assistant = adapt_action_to_json_str(teacher) + system = ADAPT_SYSTEM + f"\n\nSUPERVISOR CONTEXT: {sup_desc}" + user = obs.to_prompt_text() + rows.append({ + "messages": _chat_messages(system, user, assistant), + "task_id": tid, + "agent_role": AgentRole.ADAPT.value, + "episode_id": ep_id, + "round": "adapt", + }) + continue + + progress = ep_id / max(1, n_episodes - 1) + max_tier = max(0, min(MAX_TASK_TIER, int(math.sqrt(progress) * MAX_TASK_TIER))) + if generator.is_in_rescue_mode(): + max_tier = 0 + tier_pool = tasks_up_to_tier(max_tier) + base_task = rng.choice(tier_pool) + generator._difficulty_level = max(0, max_tier) + profile = supervisor.sample_profile(ep_id) + sup_desc = SUPERVISOR_PROFILES[profile]["description"] + mutated_task, _ = generator.mutate(base_task) + + aman_obs, dman_obs = env.reset( + episode_id=ep_id, + supervisor_profile=profile, + mutated_task=mutated_task, + ) + atfm = env._state.atfm_deadlines + + aman_teacher = _build_aman_heuristic(aman_obs) + dman_teacher = _build_dman_heuristic(dman_obs, atfm) + + aman_sys = AMAN_SYSTEM + f"\n\nSUPERVISOR TODAY: {sup_desc}" + dman_sys = DMAN_SYSTEM + f"\n\nSUPERVISOR TODAY: {sup_desc}" + + rows.append({ + "messages": _chat_messages( + aman_sys, + aman_obs.to_prompt_text(), + aman_action_to_json_str(aman_teacher), + ), + "task_id": mutated_task.task_id, + "agent_role": AgentRole.AMAN.value, + "episode_id": ep_id, + "round": "bid", + "curriculum_tier": max_tier, + }) + rows.append({ + "messages": _chat_messages( + dman_sys, + dman_obs.to_prompt_text(), + dman_action_to_json_str(dman_teacher), + ), + "task_id": mutated_task.task_id, + "agent_role": AgentRole.DMAN.value, + "episode_id": ep_id, + "round": "bid", + "curriculum_tier": max_tier, + }) + + if include_negotiate: + try: + h_aman = _heuristic_aman_action(mutated_task) + h_dman = _heuristic_dman_action(mutated_task) + neg_aman_obs, neg_dman_obs, _, bid_done = env.step_bid(h_aman, h_dman) + if not bid_done: + neg_aman = _build_aman_heuristic(neg_aman_obs) + neg_dman = _build_dman_heuristic(neg_dman_obs, atfm) + rows.append({ + "messages": _chat_messages( + aman_sys, + neg_aman_obs.to_prompt_text(), + aman_action_to_json_str(neg_aman), + ), + "task_id": mutated_task.task_id, + "agent_role": AgentRole.AMAN.value, + "episode_id": ep_id, + "round": "negotiate", + "curriculum_tier": max_tier, + }) + rows.append({ + "messages": _chat_messages( + dman_sys, + neg_dman_obs.to_prompt_text(), + dman_action_to_json_str(neg_dman), + ), + "task_id": mutated_task.task_id, + "agent_role": AgentRole.DMAN.value, + "episode_id": ep_id, + "round": "negotiate", + "curriculum_tier": max_tier, + }) + except Exception: + pass + + return rows + + +def main() -> None: + parser = argparse.ArgumentParser(description="Build JSONL for JSON-format SFT") + parser.add_argument("--out", type=Path, required=True, help="Output .jsonl path") + parser.add_argument("--episodes", type=int, default=500) + parser.add_argument("--seed", type=int, default=42) + parser.add_argument("--no_negotiate", action="store_true", help="Omit negotiate-round rows") + parser.add_argument("--no_adapt", action="store_true", help="Omit ADAPT domain rows") + parser.add_argument("--domain_ratio", type=float, default=0.12, help="Fraction of ADAPT episodes") + args = parser.parse_args() + + args.out.parent.mkdir(parents=True, exist_ok=True) + rows = build_sft_rows( + args.episodes, + args.seed, + include_negotiate=not args.no_negotiate, + include_adapt=not args.no_adapt, + domain_episode_ratio=args.domain_ratio, + ) + with open(args.out, "w", encoding="utf-8") as fh: + for row in rows: + fh.write(json.dumps(row, ensure_ascii=False) + "\n") + print(f"[OK] Wrote {len(rows)} SFT rows to {args.out}") + + +if __name__ == "__main__": + main() diff --git a/training/colab_train.py b/training/colab_train.py new file mode 100644 index 0000000000000000000000000000000000000000..36f0fc9ab0d80e554b8b716b2d429bf8529abb0f --- /dev/null +++ b/training/colab_train.py @@ -0,0 +1,206 @@ +# -*- coding: utf-8 -*- +"""ATC Multi-Agent GRPO Training — Colab Notebook +Runtime → Change runtime type → T4 GPU +Run cells top-to-bottom. +""" + +# ══════════════════════════════════════════════════════════════════════════════ +# Cell 1 — Mount Drive + Clone Repo +# ══════════════════════════════════════════════════════════════════════════════ + +from google.colab import drive +drive.mount("/content/drive") + +import subprocess, sys, os + +BRANCH = "multiagent-readme-sync" # change to "main" once merged +REPO_URL = "https://github.com/GTsingh600/ats.git" +REPO_DIR = "/content/ATC" +OUTPUT_DIR = "/content/drive/MyDrive/atc-multiagent" + +subprocess.run(["rm", "-rf", REPO_DIR], check=True) +subprocess.run( + ["git", "clone", "--branch", BRANCH, "--single-branch", REPO_URL, REPO_DIR], + check=True, +) +os.chdir(REPO_DIR) +if REPO_DIR not in sys.path: + sys.path.insert(0, REPO_DIR) +print(f"Repo ready: {REPO_DIR}") + + +# ══════════════════════════════════════════════════════════════════════════════ +# Cell 2 — Install Dependencies +# ══════════════════════════════════════════════════════════════════════════════ + +subprocess.run([sys.executable, "-m", "pip", "uninstall", "-y", "trl"], check=False) +subprocess.run( + [ + sys.executable, "-m", "pip", "install", "-q", "--no-cache-dir", + "unsloth[colab-new]", + "trl==0.15.2", + "transformers==4.51.3", + "accelerate>=0.32.0", + "peft>=0.12.0", + "bitsandbytes>=0.43.0", + "datasets>=2.20.0", + "numpy>=1.26.0", + "matplotlib>=3.9.0", + "openenv-core[core]>=0.2.3", + "openai>=1.30.0", + "fastapi>=0.111.0", + "pydantic>=2.7.0", + "uvicorn>=0.29.0", + ], + check=True, +) + +os.environ["WANDB_MODE"] = "disabled" +os.environ["TOKENIZERS_PARALLELISM"] = "false" +print("Install complete.") + + +# ══════════════════════════════════════════════════════════════════════════════ +# Cell 3 — Smoke-test Imports +# (unsloth MUST be imported before torch/trl/transformers) +# ══════════════════════════════════════════════════════════════════════════════ + +import unsloth # ← first, enables Unsloth kernel patches +import torch +import trl +import transformers +from trl import GRPOConfig, GRPOTrainer +from unsloth import FastLanguageModel + +print(f"Python : {sys.version.split()[0]}") +print(f"Torch : {torch.__version__}") +print(f"TRL : {trl.__version__}") +print(f"Transformers: {transformers.__version__}") +print(f"CUDA : {torch.cuda.is_available()}") +if torch.cuda.is_available(): + props = torch.cuda.get_device_properties(0) + print(f"GPU : {torch.cuda.get_device_name(0)}") + print(f"VRAM : {props.total_memory / 1e9:.1f} GB") + +# Repo imports +from training.dataset import build_episode_dataset +data = build_episode_dataset(n_episodes=2, seed=42) +print(f"\nDataset smoke: {len(data)} samples | roles: {sorted({x['agent_role'] for x in data})}") + + +# ══════════════════════════════════════════════════════════════════════════════ +# Cell 4 — Train (in-process — full tracebacks visible) +# +# T4 safe settings: N_GENERATIONS=2, BATCH_SIZE=2, GRAD_ACCUM=4 +# → effective batch = 8, group size = 2 +# A100 / better VRAM: set N_GENERATIONS=4 for more stable advantage estimates +# +# run_eval=True → runs base-model eval BEFORE training and trained-model eval +# AFTER training, prints before/after comparison table. +# Each eval pass ≈ 15 min on T4 (3 model inference episodes). +# Set run_eval=False to skip and save ~30 min total. +# ══════════════════════════════════════════════════════════════════════════════ + +import training.train_grpo as _grpo + +# Override memory-critical constants for T4 before training starts +_grpo.N_GENERATIONS = 2 # 2 = T4 safe; 4 = better gradient quality (A100) +_grpo.BATCH_SIZE = 2 # must stay divisible by N_GENERATIONS +_grpo.GRAD_ACCUM = 4 # effective batch = BATCH_SIZE * GRAD_ACCUM = 8 + +os.makedirs(OUTPUT_DIR, exist_ok=True) + +_grpo.train( + model_name = "Qwen/Qwen2.5-7B-Instruct", + output_dir = OUTPUT_DIR, + n_episodes = 50, # ~2 hr on T4; use 200 for full training + lora_rank = 16, + seed = 42, + run_eval = True, # set False to skip before/after model inference +) + + +# ══════════════════════════════════════════════════════════════════════════════ +# Cell 5 — Plot Reward Curves +# ══════════════════════════════════════════════════════════════════════════════ + +from pathlib import Path +from IPython.display import display, Image + +PLOTS_DIR = f"{OUTPUT_DIR}/plots" +os.makedirs(PLOTS_DIR, exist_ok=True) + +subprocess.run( + [ + sys.executable, "training/plot_rewards.py", + "--input", f"{OUTPUT_DIR}/reward_curves.json", + "--save", PLOTS_DIR, + "--no_show", + ], + check=False, + cwd=REPO_DIR, +) + +for png in sorted(Path(PLOTS_DIR).glob("*.png")): + print(png.name) + display(Image(str(png))) + + +# ══════════════════════════════════════════════════════════════════════════════ +# Cell 6 — Standalone Eval (optional — already runs inside Cell 4) +# +# Use this only if you want more episodes or re-run eval separately. +# ══════════════════════════════════════════════════════════════════════════════ + +import json + +EVAL_OUT = f"{OUTPUT_DIR}/eval_results.json" + +subprocess.run( + [ + sys.executable, "training/eval.py", + "--base", "heuristic-baseline", + "--trained", OUTPUT_DIR, + "--episodes", "5", + "--output", EVAL_OUT, + ], + check=False, + cwd=REPO_DIR, +) + +if Path(EVAL_OUT).exists(): + results = json.loads(Path(EVAL_OUT).read_text()) + print("\n=== EVAL RESULTS ===") + for k, v in results.items(): + if isinstance(v, float): + print(f" {k}: {v:.3f}") + else: + print(f" {k}: {v}") + + +# ══════════════════════════════════════════════════════════════════════════════ +# Cell 7 — Heuristic Sanity Check (no model needed) +# Verifies multi-agent environment works end-to-end. +# ══════════════════════════════════════════════════════════════════════════════ + +from multi_agent.environment import MultiAgentATCEnvironment +from multi_agent.generator import ChallengeGenerator +from multi_agent.supervisor import SupervisorAgent +from multi_agent.inference import run_episode + +env = MultiAgentATCEnvironment(seed=0) +gen = ChallengeGenerator(seed=0) +sup = SupervisorAgent() + +result = run_episode( + task_id = "bengaluru_irrops_hard", + client = None, # heuristic mode — no LLM + env = env, + generator = gen, + supervisor = sup, + episode_id = 0, + use_generator= False, +) +print(f"\nHeuristic sanity: composite={result['composite']:.3f} " + f"aman={result['aman_reward']:.3f} dman={result['dman_reward']:.3f} " + f"conflicts={result['conflicts']}") diff --git a/training/dataset.py b/training/dataset.py new file mode 100644 index 0000000000000000000000000000000000000000..1bb476068b0b56057afb2711deb0dd8ac498aa0b --- /dev/null +++ b/training/dataset.py @@ -0,0 +1,782 @@ +"""Episode dataset builder for multi-agent GRPO training. + +Each training sample = one agent turn in one episode. +Format required by TRL GRPOTrainer: + {"prompt": [{"role": "system", "content": ...}, {"role": "user", "content": ...}], + "task_id": ..., "agent_role": ..., ...metadata...} + +System prompts encode: + - Role identity + operational rules + - Output JSON schema (strict) + - Supervisor preference for this episode + - Negotiation protocol rules + +Parsing utilities decode LLM JSON completions back to typed actions. +""" + +from __future__ import annotations + +import json +import re +import sys, os +from typing import Any, Dict, List, Optional + +sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) + +import math + +from models import OperationType, SlotAssignment, TaskDefinition +from tasks import task_catalog, ordered_tasks, tasks_up_to_tier, MAX_TASK_TIER +from multi_agent.environment import MultiAgentATCEnvironment +from multi_agent.generator import ChallengeGenerator +from multi_agent.models import ( + AMANAction, + DMANAction, + GeneratorAction, + GeneratorMutation, + MutationType, + NegotiationMessage, + MessageType, + AgentRole, + SupervisorProfileName, + SUPERVISOR_PROFILES, + ADAPTObservation, +) +from multi_agent.supervisor import SupervisorAgent + + +# ── System prompts ──────────────────────────────────────────────────────────── + +AMAN_SYSTEM = """You are AMAN (Arrival Manager) at a busy Indian airport. +You ONLY control ARRIVAL flights. Do NOT assign departure flights. + +CORE RULES (non-negotiable): +1. EMERGENCY and MEDICAL arrivals land FIRST — delay them ≤5 min maximum. +2. Respect wake turbulence separation: H→H≥4min, H→M≥5min, H→L≥6min, M→M≥3min. +3. Every arrival must stay within its [earliest, latest] window. +4. Only assign each flight to runways listed in its allowed_runways. +5. If DMAN broadcasts an EMERGENCY departure, yield your next runway slot to them. +6. Pre-empt gaps: if you know a DMAN emergency is at T+N, leave runway clear ±3 min. + +NEGOTIATION PROTOCOL: +- Round BID: submit your best independent plan. +- Round NEGOTIATE: if conflicts reported, revise plan and send yield/acknowledge messages. +- Use outgoing_messages to communicate runway claims and yields to DMAN. + +OUTPUT FORMAT (strict JSON, no markdown): +{ + "arrival_slots": [ + {"flight_id": "...", "runway": "...", "assigned_minute": N, "hold_minutes": N} + ], + "rationale": "explain your sequencing decisions and how you satisfy supervisor preference", + "emergency_yields": ["flight_id_you_yielded_for"], + "outgoing_messages": [ + { + "from_role": "AMAN", + "message_type": "runway_claim|yield|acknowledge|request_gap|emergency_broadcast", + "flight_id": "...", + "requested_minute": N, + "runway_id": "...", + "priority": "normal|connection|medical|emergency", + "reason": "...", + "is_emergency": false + } + ], + "commit": false +}""" + + +DMAN_SYSTEM = """You are DMAN (Departure Manager) at a busy Indian airport. +You ONLY control DEPARTURE flights. Do NOT assign arrival flights. + +CORE RULES (non-negotiable): +1. ATFM network slot deadlines are HARD — missing them cascades to 3+ airports. +2. MEDICAL and EMERGENCY departures jump to the front of the departure queue. +3. Every departure must stay within its [earliest, latest] window. +4. Only assign each flight to runways listed in its allowed_runways. +5. If AMAN broadcasts an EMERGENCY arrival, clear the runway immediately. +6. Broadcast your own fuel/medical emergencies to AMAN in outgoing_messages. + +PRIORITY RULE (air vs ground): +If BOTH a medical ARRIVAL and a medical DEPARTURE need the same slot: +→ The ARRIVAL wins (airborne aircraft cannot divert fuel-free; ground can hold). + +NEGOTIATION PROTOCOL: +- Round BID: submit your best independent plan. +- Round NEGOTIATE: revise after conflict report; send messages to AMAN. + +OUTPUT FORMAT (strict JSON, no markdown): +{ + "departure_slots": [ + {"flight_id": "...", "runway": "...", "assigned_minute": N, "hold_minutes": N} + ], + "rationale": "explain sequencing and ATFM compliance and supervisor preference", + "atfm_compliance": {"flight_id": deadline_minute_you_respected}, + "emergency_broadcasts": ["flight_id_of_your_emergency_departures"], + "outgoing_messages": [ + { + "from_role": "DMAN", + "message_type": "runway_claim|yield|acknowledge|request_gap|emergency_broadcast", + "flight_id": "...", + "requested_minute": N, + "runway_id": "...", + "priority": "normal|connection|medical|emergency", + "reason": "...", + "is_emergency": false + } + ], + "commit": false +}""" + + +GENERATOR_SYSTEM = """You are the Scenario Generator for multi-agent ATC training. +Your goal: mutate the scenario to make AMAN and DMAN fail to coordinate. +You are rewarded when they score LOW. You are penalised if the scenario is UNSOLVABLE. + +MUTATION TYPES: +- tighten_window: squeeze a flight's time window (make it harder to sequence) +- inject_emergency: add a new EMERGENCY/MEDICAL arrival to disrupt sequencing +- increase_weather_penalty: degrade runway capacity +- add_atfm_deadline: add a hard network slot constraint to a departure +- close_runway_window: make a runway unavailable during peak period +- add_conflicting_flight: inject a Heavy arrival before a Light to create wake trap + +STRATEGY TIPS: +- Simultaneous medical arrival + fuel emergency departure on same runway = maximum conflict +- Injecting emergency during peak hour breaks AMAN's sequence +- ATFM deadlines during weather degradation stress DMAN + +OUTPUT FORMAT (strict JSON, no markdown): +{ + "mutations": [ + { + "mutation_type": "tighten_window|inject_emergency|increase_weather_penalty|add_atfm_deadline|close_runway_window|add_conflicting_flight", + "target_flight_id": "flight_id or null", + "target_runway_id": "runway_id or null", + "params": {"key": "value"}, + "rationale": "why this breaks coordination" + } + ], + "strategy": "overall explanation of how these mutations disrupt AMAN/DMAN coordination" +}""" + + +SUPERVISOR_SYSTEM_TEMPLATE = """You are an ATC Supervisor evaluating a completed runway plan. +Your preference this shift: {preference} + +Score the plan 0.0-1.0 based on how well it satisfies YOUR preference (not generic quality). +Be specific about what satisfies or violates your stated priority. + +OUTPUT FORMAT (strict JSON, no markdown): +{{ + "score": 0.0, + "alignment": "explain how well the plan matches your stated preference", + "key_violations": ["list specific violations of your preference"] +}}""" + + +ADAPT_SYSTEM = """You are ADAPT (STRUCTURAL Domain Meta-Agent). +You are given a scheduling task from an UNKNOWN domain (e.g. Hospital ICU, Port Logistics). +You do NOT know the domain's terminology. You must ignore labels like "TRAUMA" or "BERTH" and focus on: +1. time_pressure: How narrow is the execution window? +2. connection_risk: Is this entity part of a sequence (risk of cascade)? +3. Resource Intensity: How much runway/resource time does it need? + +Your job: Map these abstract entities into ATC-specific parameters (Wake Class and Priority) +so that the existing AMAN/DMAN models can solve the task with zero retraining. + +MAPPING GUIDE: +- Wake Class (H, M, L): Structural separation. Map high-intensity/high-risk to 'H', low to 'L'. +- Priority (emergency, medical, connection, normal): Sequence urgency. Map highest time pressure to 'emergency'. + +OUTPUT FORMAT (strict JSON, no markdown): +{ + "entity_wake_map": {"ENTITY_TYPE_A": "H|M|L", "ENTITY_TYPE_B": "..."}, + "entity_priority_map": {"ENTITY_TYPE_A": "emergency|medical|connection|normal", ...}, + "rationale": "Explain using NUMERICAL structural signals (time pressure, risk) why you chose these mappings." +}""" + + + +# ── Heuristic action builders (used for negotiate-round conflict detection) ─── + +def _heuristic_aman_action(task) -> "AMANAction": + """Naive arrival plan: each flight at scheduled_minute on its first runway.""" + slots = [] + for f in task.flights: + if f.operation == OperationType.ARRIVAL and f.allowed_runways: + minute = max(f.earliest_minute, min(f.latest_minute, f.scheduled_minute)) + slots.append(SlotAssignment( + flight_id=f.flight_id, + runway=f.allowed_runways[0], + assigned_minute=minute, + hold_minutes=0, + )) + return AMANAction(arrival_slots=slots, rationale="heuristic") + + +def _heuristic_dman_action(task) -> "DMANAction": + """Naive departure plan: each flight at scheduled_minute on its first runway.""" + slots = [] + for f in task.flights: + if f.operation == OperationType.DEPARTURE and f.allowed_runways: + minute = max(f.earliest_minute, min(f.latest_minute, f.scheduled_minute)) + slots.append(SlotAssignment( + flight_id=f.flight_id, + runway=f.allowed_runways[0], + assigned_minute=minute, + hold_minutes=0, + )) + return DMANAction(departure_slots=slots, rationale="heuristic") + + +# ── Dataset builder ─────────────────────────────────────────────────────────── + +def build_episode_dataset( + n_episodes: int = 200, + seed: int = 42, + include_generator: bool = True, + include_supervisor: bool = True, + include_adapt: bool = True, + domain_episode_ratio: float = 0.30, + domain_stratify: bool = True, +) -> List[Dict[str, Any]]: + """Build full multi-agent training dataset. + + Returns list of training samples, one per agent turn per episode. + Each episode has: 1 AMAN bid + 1 DMAN bid + optionally 1 negotiation round. + If include_generator: also 1 generator turn per episode. + If include_supervisor: also 1 supervisor turn per episode. + """ + import random + rng = random.Random(seed) + catalog = task_catalog() + supervisor = SupervisorAgent() + env = MultiAgentATCEnvironment(seed=seed) + generator = ChallengeGenerator(seed=seed) + + samples: List[Dict[str, Any]] = [] + + domain_tasks_for_stratify: Optional[Dict[str, Any]] = None + domain_id_list: List[str] = [] + domain_idx = 0 + if include_adapt and domain_stratify: + try: + from domains import get_all_domain_tasks + domain_tasks_for_stratify = get_all_domain_tasks() + if domain_tasks_for_stratify: + domain_id_list = sorted(domain_tasks_for_stratify.keys()) + except Exception: + domain_id_list = [] + + for ep_id in range(n_episodes): + # ── ADAPT Domain Sample (Stochastic) ────────────────────────────────── + if include_adapt and rng.random() < domain_episode_ratio: + from domains import get_all_domain_tasks + from multi_agent.adapt import build_adapt_observation + domain_tasks = domain_tasks_for_stratify or get_all_domain_tasks() + if domain_tasks: + if domain_stratify and domain_id_list: + tid = domain_id_list[domain_idx % len(domain_id_list)] + domain_idx += 1 + else: + tid = rng.choice(list(domain_tasks.keys())) + dtask = domain_tasks[tid] + profile = supervisor.sample_profile(ep_id) + obs = build_adapt_observation(dtask, profile) + samples.append(_make_adapt_sample(ep_id, obs, dtask)) + continue + + # ── Competence-based task tier selection (Platanios 2019 √-schedule) ── + # progress ∈ [0, 1] across the dataset. √-schedule spends more time at + # intermediate difficulty before advancing to the hardest tiers. + # Research basis: root schedule outperforms linear in competence-based + # curriculum (Platanios ACL 2019, VCRL arXiv 2509.19803). + progress = ep_id / max(1, n_episodes - 1) # 0.0 → 1.0 + max_tier = int(math.sqrt(progress) * MAX_TASK_TIER) # √-schedule: 0 → 4 + max_tier = max(0, min(MAX_TASK_TIER, max_tier)) + + # Online rescue override: if generator EMA collapsed, force tier 0 + if generator.is_in_rescue_mode(): + max_tier = 0 + + # Pool = all tasks at or below the current competence ceiling + tier_pool = tasks_up_to_tier(max_tier) + base_task = rng.choice(tier_pool) + + # Set mutation intensity to match the competence level directly — + # avoids the fake random-score update that distorted the EMA. + generator._difficulty_level = max(0, max_tier) + + profile = supervisor.sample_profile(ep_id) + sup_desc = SUPERVISOR_PROFILES[profile]["description"] + + # Apply generator mutation (rule-based for dataset generation) + mutated_task, is_solvable = generator.mutate(base_task) + + aman_obs, dman_obs = env.reset( + episode_id=ep_id, + supervisor_profile=profile, + mutated_task=mutated_task, + ) + + atfm_json = json.dumps(env._state.atfm_deadlines) + + # Track start index so tier annotation covers all samples for this + # episode regardless of how many negotiate samples are added below. + ep_start_idx = len(samples) + + # AMAN BID sample + samples.append(_make_aman_sample( + ep_id=ep_id, + obs=aman_obs, + atfm_json=atfm_json, + dman_slots_json="[]", + sup_desc=sup_desc, + profile=profile, + round_name="bid", + )) + + # DMAN BID sample + samples.append(_make_dman_sample( + ep_id=ep_id, + obs=dman_obs, + atfm_json=atfm_json, + aman_slots_json="[]", + sup_desc=sup_desc, + profile=profile, + round_name="bid", + )) + + # ── Negotiate-round samples ──────────────────────────────────────────── + # Run a heuristic BID through the environment to detect conflicts, then + # build negotiate samples that teach agents to REDUCE those conflicts. + # The negotiate observation already contains the conflict_log so the + # model sees exactly which constraints it violated in the BID round. + try: + h_aman = _heuristic_aman_action(mutated_task) + h_dman = _heuristic_dman_action(mutated_task) + neg_aman_obs, neg_dman_obs, _, bid_done = env.step_bid(h_aman, h_dman) + if not bid_done: + # Count actual conflicts after the heuristic BID + from engine import simulate_plan as _sim_plan + bid_outcome = _sim_plan( + mutated_task, + env._state.aman_slots + env._state.dman_slots, + ) + bid_n = bid_outcome.metrics.conflict_count + if bid_n > 0: + h_dman_json = json.dumps([s.model_dump() for s in h_dman.departure_slots]) + h_aman_json = json.dumps([s.model_dump() for s in h_aman.arrival_slots]) + samples.append(_make_aman_sample( + ep_id=ep_id, + obs=neg_aman_obs, + atfm_json=atfm_json, + dman_slots_json=h_dman_json, + sup_desc=sup_desc, + profile=profile, + round_name="negotiate", + bid_conflict_count=bid_n, + )) + samples.append(_make_dman_sample( + ep_id=ep_id, + obs=neg_dman_obs, + atfm_json=atfm_json, + aman_slots_json=h_aman_json, + sup_desc=sup_desc, + profile=profile, + round_name="negotiate", + bid_conflict_count=bid_n, + )) + except Exception: + pass # Never break dataset building — negotiate samples are bonus signal + + # Generator sample — carry the tier in metadata for logging + if include_generator: + samples.append(_make_generator_sample( + ep_id=ep_id, + task=base_task, + profile=profile, + difficulty_level=generator.difficulty_level, + ema_score=generator.ema_score, + )) + + # Supervisor sample + if include_supervisor: + samples.append(_make_supervisor_sample( + ep_id=ep_id, + task=mutated_task, + profile=profile, + sup_desc=sup_desc, + )) + + # Annotate all samples for this episode with the curriculum tier. + # Use ep_start_idx (not a fixed count) so negotiate samples are included. + for s in samples[ep_start_idx:]: + s["curriculum_tier"] = max_tier + + return samples + + +# ── Sample builders ─────────────────────────────────────────────────────────── + +def _make_aman_sample( + ep_id: int, + obs, + atfm_json: str, + dman_slots_json: str, + sup_desc: str, + profile: SupervisorProfileName, + round_name: str, + bid_conflict_count: int = 0, +) -> Dict[str, Any]: + system = AMAN_SYSTEM + f"\n\nSUPERVISOR TODAY: {sup_desc}" + user = obs.to_prompt_text() + return { + "prompt": [ + {"role": "system", "content": system}, + {"role": "user", "content": user}, + ], + "task_id": obs.task_id, + "agent_role": AgentRole.AMAN.value, + "episode_id": ep_id, + "round": round_name, + "supervisor_profile": profile.value, + "atfm_deadlines_json": atfm_json, + "dman_slots_json": dman_slots_json, + "bid_conflict_count": bid_conflict_count, + } + + +def _make_dman_sample( + ep_id: int, + obs, + atfm_json: str, + aman_slots_json: str, + sup_desc: str, + profile: SupervisorProfileName, + round_name: str, + bid_conflict_count: int = 0, +) -> Dict[str, Any]: + system = DMAN_SYSTEM + f"\n\nSUPERVISOR TODAY: {sup_desc}" + user = obs.to_prompt_text() + return { + "prompt": [ + {"role": "system", "content": system}, + {"role": "user", "content": user}, + ], + "task_id": obs.task_id, + "agent_role": AgentRole.DMAN.value, + "episode_id": ep_id, + "round": round_name, + "supervisor_profile": profile.value, + "atfm_deadlines_json": atfm_json, + "aman_slots_json": aman_slots_json, + "bid_conflict_count": bid_conflict_count, + } + + +def _make_generator_sample( + ep_id: int, + task, + profile: SupervisorProfileName, + difficulty_level: int, + ema_score: float, +) -> Dict[str, Any]: + user_content = ( + f"Current agent performance (EMA): {ema_score:.2f}\n" + f"Target difficulty level: {difficulty_level}/6\n\n" + f"Base task: {task.task_id} ({task.difficulty.value})\n" + f"Flights: {len(task.flights)} | Runways: {len(task.runways)}\n" + f"Airport: {task.airport}\n\n" + f"Design mutations that will make AMAN and DMAN fail to coordinate " + f"at difficulty level {difficulty_level}. Remember: solvable but hard." + ) + return { + "prompt": [ + {"role": "system", "content": GENERATOR_SYSTEM}, + {"role": "user", "content": user_content}, + ], + "task_id": task.task_id, + "agent_role": AgentRole.GENERATOR.value, + "episode_id": ep_id, + "round": "generate", + "supervisor_profile": profile.value, + "controller_scores": ema_score, + } + + +def _make_supervisor_sample( + ep_id: int, + task, + profile: SupervisorProfileName, + sup_desc: str, +) -> Dict[str, Any]: + merged_plan_json = _build_reference_merged_plan_json(task) + system = SUPERVISOR_SYSTEM_TEMPLATE.format(preference=sup_desc) + user_content = ( + f"Task: {task.task_id}\nAirport: {task.airport}\n" + f"Flights: {len(task.flights)} | Runways: {len(task.runways)}\n\n" + f"A merged AMAN+DMAN plan was submitted. Evaluate it against your preference." + ) + return { + "prompt": [ + {"role": "system", "content": system}, + {"role": "user", "content": user_content}, + ], + "task_id": task.task_id, + "agent_role": AgentRole.SUPERVISOR.value, + "episode_id": ep_id, + "round": "evaluate", + "supervisor_profile": profile.value, + "merged_plan_json": merged_plan_json, + } + + +def _build_reference_merged_plan_json(task) -> str: + """Build a deterministic full-plan baseline for supervisor training.""" + slots: List[Dict[str, Any]] = [] + for flight in task.flights: + if not flight.allowed_runways: + continue + assigned_minute = max( + int(flight.earliest_minute), + min(int(flight.latest_minute), int(flight.scheduled_minute)), + ) + hold_minutes = max(0, abs(assigned_minute - int(flight.scheduled_minute))) + slots.append( + { + "flight_id": str(flight.flight_id), + "runway": str(flight.allowed_runways[0]), + "assigned_minute": int(assigned_minute), + "hold_minutes": int(hold_minutes), + } + ) + return json.dumps(slots) + + +# ── Action parsers (completion → typed action) ──────────────────────────────── + +def _coerce_completion_text(completion: Any) -> str: + """Normalise chat-style completions from TRL into plain text.""" + if completion is None: + return "" + if isinstance(completion, bytes): + return completion.decode("utf-8", errors="ignore") + if isinstance(completion, str): + return completion + if isinstance(completion, dict): + for key in ("content", "text", "completion", "generated_text"): + if key in completion: + return _coerce_completion_text(completion[key]) + try: + return json.dumps(completion) + except Exception: + return str(completion) + if isinstance(completion, list): + parts = [_coerce_completion_text(item) for item in completion] + return "\n".join(part for part in parts if part) + return str(completion) + + +def _extract_json(text: Any) -> Optional[str]: + """Extract first JSON object from an LLM completion. + + Handles the most common LLM output quirks: + - markdown fences (```json, ```JSON, ```) + - Python literals: True/False/None → true/false/null + - single-quote dicts → double-quote JSON (ast fallback) + """ + text = _coerce_completion_text(text) + # Strip all markdown code fences regardless of language tag or case + text = re.sub(r"```[a-zA-Z]*\s*", "", text) + text = re.sub(r"```", "", text).strip() + + candidates = _extract_balanced_json_candidates(text) + for raw in candidates: + # Normalise Python literals so json.loads can parse them + # Use word-boundary replacements to avoid mangling string values + norm = re.sub(r"\bTrue\b", "true", raw) + norm = re.sub(r"\bFalse\b", "false", norm) + norm = re.sub(r"\bNone\b", "null", norm) + if _loads_lenient(norm) is not None: + return norm + return None + + +def _extract_balanced_json_candidates(text: str) -> List[str]: + """Extract balanced {...} object candidates from a completion.""" + candidates: List[str] = [] + start = None + depth = 0 + in_string = False + escape = False + for idx, ch in enumerate(text): + if in_string: + if escape: + escape = False + elif ch == "\\": + escape = True + elif ch == '"': + in_string = False + continue + if ch == '"': + in_string = True + continue + if ch == "{": + if depth == 0: + start = idx + depth += 1 + elif ch == "}": + if depth > 0: + depth -= 1 + if depth == 0 and start is not None: + candidates.append(text[start : idx + 1]) + start = None + if not candidates: + # Fallback keeps previous behavior when braces are malformed. + match = re.search(r"\{.*\}", text, re.DOTALL) + if match: + candidates.append(match.group(0)) + return candidates + + +def _loads_lenient(raw: str) -> Optional[dict]: + """json.loads with ast.literal_eval fallback for single-quote dicts.""" + try: + return json.loads(raw) + except json.JSONDecodeError: + try: + import ast + obj = ast.literal_eval(raw) + return obj if isinstance(obj, dict) else None + except Exception: + return None + + +def _safe_slot(s: dict, op: str) -> Optional[SlotAssignment]: + """Build a SlotAssignment tolerating wrong field types from LLM output.""" + try: + return SlotAssignment( + flight_id=str(s.get("flight_id", "")), + runway=str(s.get("runway", "")), + assigned_minute=int(float(s.get("assigned_minute", 0))), + hold_minutes=int(float(s.get("hold_minutes", 0))), + ) + except Exception: + return None + + +def parse_aman_action(completion: Any) -> Optional[AMANAction]: + raw = _extract_json(completion) + if not raw: + return None + data = _loads_lenient(raw) + if not isinstance(data, dict): + return None + try: + # Per-slot try/except: one bad slot skips that slot, not the whole action + slots = [s for s in (_safe_slot(x, "arrival") for x in data.get("arrival_slots", [])) if s] + msgs = [] + for m in data.get("outgoing_messages", []): + try: + msgs.append(NegotiationMessage( + from_role=AgentRole.AMAN, + message_type=MessageType(m.get("message_type", "runway_claim")), + flight_id=str(m.get("flight_id", "")), + requested_minute=int(float(m.get("requested_minute", 0))), + runway_id=str(m.get("runway_id", "")), + priority=str(m.get("priority", "normal")), + reason=str(m.get("reason", "")), + is_emergency=bool(m.get("is_emergency", False)), + )) + except Exception: + continue + return AMANAction( + arrival_slots=slots, + rationale=str(data.get("rationale", "")), + emergency_yields=list(data.get("emergency_yields", [])), + outgoing_messages=msgs, + commit=bool(data.get("commit", False)), + ) + except Exception: + return None + + +def parse_dman_action(completion: Any) -> Optional[DMANAction]: + raw = _extract_json(completion) + if not raw: + return None + data = _loads_lenient(raw) + if not isinstance(data, dict): + return None + try: + slots = [s for s in (_safe_slot(x, "departure") for x in data.get("departure_slots", [])) if s] + msgs = [] + for m in data.get("outgoing_messages", []): + try: + msgs.append(NegotiationMessage( + from_role=AgentRole.DMAN, + message_type=MessageType(m.get("message_type", "runway_claim")), + flight_id=str(m.get("flight_id", "")), + requested_minute=int(float(m.get("requested_minute", 0))), + runway_id=str(m.get("runway_id", "")), + priority=str(m.get("priority", "normal")), + reason=str(m.get("reason", "")), + is_emergency=bool(m.get("is_emergency", False)), + )) + except Exception: + continue + return DMANAction( + departure_slots=slots, + rationale=str(data.get("rationale", "")), + atfm_compliance=dict(data.get("atfm_compliance", {})), + emergency_broadcasts=list(data.get("emergency_broadcasts", [])), + outgoing_messages=msgs, + commit=bool(data.get("commit", False)), + ) + except Exception: + return None + + +def parse_generator_action(completion: Any) -> Optional[GeneratorAction]: + raw = _extract_json(completion) + if not raw: + return None + try: + data = json.loads(raw) + mutations = [] + for m in data.get("mutations", []): + try: + mutations.append(GeneratorMutation( + mutation_type=MutationType(m.get("mutation_type", "tighten_window")), + target_flight_id=m.get("target_flight_id"), + target_runway_id=m.get("target_runway_id"), + params=m.get("params", {}), + rationale=m.get("rationale", ""), + )) + except Exception: + continue + return GeneratorAction( + mutations=mutations, + strategy=data.get("strategy", ""), + ) + except Exception: + return None + + +def _make_adapt_sample(ep_id: int, obs: ADAPTObservation, domain_task: TaskDefinition) -> Dict[str, Any]: + return { + "prompt": [ + {"role": "system", "content": ADAPT_SYSTEM}, + {"role": "user", "content": obs.to_prompt_text()}, + ], + "task_id": "domain_transfer", + "agent_role": AgentRole.ADAPT.value, + "round": "adapt", + "domain_task_json": domain_task.model_dump_json(), + "supervisor_profile": obs.supervisor_profile_name.value, + } + + + diff --git a/training/eval.py b/training/eval.py new file mode 100644 index 0000000000000000000000000000000000000000..ee10a8d6f700a90ea63375130f6c80105795a2ee --- /dev/null +++ b/training/eval.py @@ -0,0 +1,266 @@ +"""Before/after evaluation: base model vs trained checkpoint. + +Mirrors kube-sre-gym eval.py pattern: + - Run N episodes with base model (heuristic or untrained LLM) + - Run same N episodes with trained checkpoint + - Compare AMAN reward, DMAN reward, composite, coordination score + - Print structured comparison table + +Usage: + python training/eval.py --base heuristic-baseline --trained ./outputs/atc-multiagent + python training/eval.py --base Qwen/Qwen2.5-7B-Instruct --trained ./outputs/atc-multiagent --episodes 20 +""" + +from __future__ import annotations + +import argparse +import json +import os +import sys +import time +from pathlib import Path +from typing import Dict, List, Optional + +ROOT = Path(__file__).resolve().parent.parent +if str(ROOT) not in sys.path: + sys.path.insert(0, str(ROOT)) + +from multi_agent.environment import MultiAgentATCEnvironment +from multi_agent.generator import ChallengeGenerator +from multi_agent.inference import run_episode +from multi_agent.models import SUPERVISOR_PROFILES +from multi_agent.supervisor import SupervisorAgent +from tasks import ordered_tasks + + +# ── Model loader ────────────────────────────────────────────────────────────── + +def _load_client(model_name_or_path: str) -> Optional[object]: + """Load OpenAI-compatible client for a model or checkpoint.""" + if model_name_or_path == "heuristic-baseline": + return None + + api_base = os.getenv("API_BASE_URL", "https://router.huggingface.co/v1") + hf_token = os.getenv("HF_TOKEN", "") + + # Local checkpoint: load with Unsloth and spin up inference + if Path(model_name_or_path).exists(): + try: + import json as _json + from unsloth import FastLanguageModel + + ckpt = Path(model_name_or_path) + adapter_cfg_path = ckpt / "adapter_config.json" + full_cfg_path = ckpt / "config.json" + + if adapter_cfg_path.exists() and not full_cfg_path.exists(): + # TRL saves LoRA adapters without the base model config — + # load base model first, then apply the adapter on top. + adapter_cfg = _json.loads(adapter_cfg_path.read_text()) + base_name = adapter_cfg.get( + "base_model_name_or_path", + os.getenv("BASE_MODEL", "Qwen/Qwen2.5-7B-Instruct"), + ) + print(f" LoRA adapter detected — loading base: {base_name}") + model, tokenizer = FastLanguageModel.from_pretrained( + base_name, + max_seq_length=4096, + load_in_4bit=True, + ) + from peft import PeftModel + model = PeftModel.from_pretrained(model, str(ckpt)) + else: + model, tokenizer = FastLanguageModel.from_pretrained( + str(ckpt), + max_seq_length=4096, + load_in_4bit=True, + ) + + FastLanguageModel.for_inference(model) + print(f" Loaded local checkpoint: {model_name_or_path}") + return _LocalModelClient(model, tokenizer) + except ImportError: + print(f" [WARN] unsloth not installed — using API for {model_name_or_path}") + + try: + from openai import OpenAI + return OpenAI(base_url=api_base, api_key=hf_token) + except ImportError: + print(" [WARN] openai not installed — using heuristic fallback") + return None + + +class _LocalModelClient: + """Thin OpenAI-compatible wrapper for a locally loaded Unsloth model.""" + + def __init__(self, model, tokenizer): + self.model = model + self.tokenizer = tokenizer + + class _Choice: + def __init__(self, text): + self.message = type("M", (), {"content": text})() + + class _Resp: + def __init__(self, text): + self.choices = [_LocalModelClient._Choice(text)] + + def chat_completions_create(self, *, model, messages, temperature, max_tokens, **kw): + import torch + prompt = self.tokenizer.apply_chat_template( + messages, tokenize=False, add_generation_prompt=True + ) + inputs = self.tokenizer(prompt, return_tensors="pt").to(self.model.device) + with torch.no_grad(): + out = self.model.generate( + **inputs, + max_new_tokens=max_tokens, + temperature=max(temperature, 0.01), + do_sample=True, + pad_token_id=self.tokenizer.eos_token_id, + ) + text = self.tokenizer.decode(out[0][inputs["input_ids"].shape[1]:], skip_special_tokens=True) + return self._Resp(text) + + @property + def chat(self): + return type("Chat", (), {"completions": type("C", (), {"create": self.chat_completions_create})()})() + + +# ── Evaluation runner ───────────────────────────────────────────────────────── + +def evaluate_model( + model_name: str, + n_episodes: int, + task_ids: List[str], + seed: int, + use_generator: bool, + label: str, +) -> Dict: + """Run N episodes and return aggregated metrics.""" + print(f"\n{'─'*50}") + print(f" Evaluating: {label} ({model_name})") + print(f" Episodes: {n_episodes} × {len(task_ids)} tasks") + print(f"{'─'*50}") + + client = _load_client(model_name) + env = MultiAgentATCEnvironment(seed=seed) + generator = ChallengeGenerator(seed=seed) + supervisor = SupervisorAgent() + + records: List[Dict] = [] + t0 = time.time() + + for task_id in task_ids: + for ep in range(n_episodes): + try: + r = run_episode( + task_id=task_id, + client=client, + env=env, + generator=generator, + supervisor=supervisor, + episode_id=ep, + use_generator=use_generator, + ) + r["task_id"] = task_id + records.append(r) + print( + f" {task_id[:30]:30s} ep{ep:2d} | " + f"composite={r['composite']:.3f} aman={r['aman_reward']:.3f} " + f"dman={r['dman_reward']:.3f} coord={r['coord_score']:.3f}" + ) + except Exception as exc: + print(f" [ERROR] {task_id} ep{ep}: {exc}") + + elapsed = time.time() - t0 + + def _m(key): return sum(r[key] for r in records) / max(1, len(records)) + + summary = { + "label": label, + "model": model_name, + "n_episodes": len(records), + "elapsed_s": round(elapsed, 1), + "mean_composite": round(_m("composite"), 3), + "mean_aman": round(_m("aman_reward"), 3), + "mean_dman": round(_m("dman_reward"), 3), + "mean_coord": round(_m("coord_score"), 3), + "mean_conflicts": round(_m("conflicts"), 2), + "success_rate": round(sum(1 for r in records if r["composite"] >= 0.60) / max(1, len(records)), 3), + "emg_arr_handled": int(sum(r["emg_arr_ok"] for r in records)), + "emg_dep_handled": int(sum(r["emg_dep_ok"] for r in records)), + "atfm_violations": int(sum(r["atfm_viol"] for r in records)), + "final_gen_level": records[-1]["gen_difficulty"] if records else 1, + "records": records, + } + return summary + + +# ── Comparison printer ──────────────────────────────────────────────────────── + +def print_comparison(base: Dict, trained: Dict) -> None: + def _delta(key: str) -> str: + d = trained[key] - base[key] + arrow = "↑" if d > 0.01 else ("↓" if d < -0.01 else "→") + return f"{d:+.3f} {arrow}" + + print(f"\n{'='*65}") + print(f" BEFORE vs AFTER TRAINING — Multi-Agent ATC") + print(f"{'='*65}") + print(f" {'Metric':<22} {'Base':>10} {'Trained':>10} {'Delta':>12}") + print(f" {'─'*22} {'─'*10} {'─'*10} {'─'*12}") + + rows = [ + ("Composite score", "mean_composite"), + ("AMAN reward", "mean_aman"), + ("DMAN reward", "mean_dman"), + ("Coordination", "mean_coord"), + ("Success rate", "success_rate"), + ("Mean conflicts", "mean_conflicts"), + ] + for label, key in rows: + print(f" {label:<22} {base[key]:>10.3f} {trained[key]:>10.3f} {_delta(key):>12}") + + print(f"\n Emergency arrivals handled: {base['emg_arr_handled']:>4} → {trained['emg_arr_handled']}") + print(f" Emergency departures handled: {base['emg_dep_handled']:>4} → {trained['emg_dep_handled']}") + print(f" ATFM violations: {base['atfm_violations']:>4} → {trained['atfm_violations']}") + print(f" Generator difficulty: {base['final_gen_level']:>4} → {trained['final_gen_level']}") + print(f"{'='*65}") + + +# ── CLI ─────────────────────────────────────────────────────────────────────── + +def main() -> None: + parser = argparse.ArgumentParser(description="Multi-Agent ATC Evaluation") + parser.add_argument("--base", default="heuristic-baseline") + parser.add_argument("--trained", default="./outputs/atc-multiagent") + parser.add_argument("--episodes", type=int, default=10) + parser.add_argument("--tasks", nargs="+", + default=["delhi_monsoon_recovery_easy", + "bengaluru_irrops_hard"]) + parser.add_argument("--seed", type=int, default=99) + parser.add_argument("--no_generator", action="store_true") + parser.add_argument("--output", default=None, help="Save results JSON") + args = parser.parse_args() + + base_results = evaluate_model( + args.base, args.episodes, args.tasks, args.seed, not args.no_generator, "BASE" + ) + trained_results = evaluate_model( + args.trained, args.episodes, args.tasks, args.seed, not args.no_generator, "TRAINED" + ) + + print_comparison(base_results, trained_results) + + if args.output: + out = { + "base": {k: v for k, v in base_results.items() if k != "records"}, + "trained": {k: v for k, v in trained_results.items() if k != "records"}, + } + Path(args.output).write_text(json.dumps(out, indent=2)) + print(f"\nResults saved to {args.output}") + + +if __name__ == "__main__": + main() diff --git a/training/hf_train.py b/training/hf_train.py new file mode 100644 index 0000000000000000000000000000000000000000..5e067868bdd946063677ca07aff4e99da4986f3d --- /dev/null +++ b/training/hf_train.py @@ -0,0 +1,351 @@ +""" +Hugging Face Spaces (Docker) — GPU training launcher for ATC GRPO (+ optional SFT). + +Creates or updates a private HF Space that clones this project, runs training on GPU, +then uploads the output folder (LoRA adapter, curves, metrics) to a Hub model repo. + +Local usage: + pip install "huggingface_hub>=0.20" + python training/hf_train.py \\ + --hf_token hf_xxxx \\ + --hf_user your_username \\ + --model Qwen/Qwen2.5-7B-Instruct \\ + --episodes 80 + +Space URL: https://huggingface.co/spaces// +Output: https://huggingface.co// + +See training/HF_TRAINING.md for step-by-step setup and HF Jobs (CLI) notes. +""" + +from __future__ import annotations + +import argparse +import shlex +import subprocess +import sys +import textwrap +import tempfile +from pathlib import Path + +ROOT = Path(__file__).resolve().parent.parent + + +def _write_unix_text(path: Path, data: str) -> None: + """Write UTF-8 with LF only. On Windows, Path.write_text() defaults to CRLF and breaks + Linux shebangs in Docker/Spaces: `/usr/bin/env: 'bash\\r': No such file or directory`.""" + path.write_text(data, encoding="utf-8", newline="\n") + + +PUSH_SCRIPT = textwrap.dedent("""\ + \"\"\"Push training outputs to HF Hub model repo.\"\"\" + import argparse + import os + from pathlib import Path + + from huggingface_hub import HfApi + + parser = argparse.ArgumentParser() + parser.add_argument("--output_dir", required=True) + parser.add_argument("--repo_id", required=True) + args = parser.parse_args() + + token = os.environ.get("HF_TOKEN") or os.environ.get("HUGGING_FACE_HUB_TOKEN") + api = HfApi(token=token) + + api.create_repo(repo_id=args.repo_id, repo_type="model", exist_ok=True, private=True) + api.upload_folder( + folder_path=args.output_dir, + repo_id=args.repo_id, + repo_type="model", + ignore_patterns=["*.bin.tmp", "*.safetensors.tmp", "__pycache__/*"], + ) + print(f"Pushed outputs to https://huggingface.co/{args.repo_id}") +""") + + +def _dockerfile() -> str: + # HF Space Docker builds: avoid `unsloth[colab-new] @ git+...` (often fails: timeouts, + # Colab-only extras, long compile). Use official PyTorch image + unsloth from PyPI. + return textwrap.dedent("""\ + FROM pytorch/pytorch:2.4.0-cuda12.1-cudnn9-runtime + + ENV DEBIAN_FRONTEND=noninteractive + ENV PYTHONUNBUFFERED=1 + ENV TORCH_COMPILE_DISABLE=1 + ENV TOKENIZERS_PARALLELISM=false + ENV HF_HUB_ENABLE_HF_TRANSFER=1 + + RUN apt-get update && apt-get install -y --no-install-recommends \\ + git ca-certificates \\ + && rm -rf /var/lib/apt/lists/* + + # Base image ships torch+torchvision 2.4/0.19. Unsloth from PyPI upgrades torch (e.g. 2.10) + # but leaves torchvision stale → "torch==2.10.0 requires torchvision>=0.25.0". Re-align wheels + # from the official CUDA 12.1 index (must match the image CUDA / PyTorch cu121 build). + RUN pip install --no-cache-dir --upgrade pip && \\ + pip install --no-cache-dir \\ + "unsloth>=2024.8" "unsloth-zoo" \\ + "trl>=0.9.6" "datasets>=2.20.0" "accelerate>=0.32.0" "peft>=0.12.0" "bitsandbytes>=0.43.0" \\ + "huggingface_hub>=0.26" "hf_transfer" "matplotlib>=3.9.0" "numpy>=1.26.0" \\ + "openenv-core[core]>=0.2.3" "fastapi>=0.128.0" "openai>=2.30.0" "pydantic>=2.12.0" "uvicorn>=0.41.0" \\ + && pip install --no-cache-dir --upgrade \\ + "torchvision>=0.25.0" "torchaudio>=2.10.0" \\ + --index-url https://download.pytorch.org/whl/cu121 + + WORKDIR /app + COPY hf_push_outputs.py /app/hf_push_outputs.py + COPY entrypoint.sh /app/entrypoint.sh + RUN chmod +x /app/entrypoint.sh + CMD ["/app/entrypoint.sh"] + """) + + +def _entrypoint(args: argparse.Namespace) -> str: + """Shell script run inside the Space container (runtime clone + train + push).""" + q = shlex.quote + # github.com/org/repo.git (no scheme) for https://TOKEN@host/... clones + clone_host = args.repo_url.split("://", 1)[-1].rstrip("/") + + lines = [ + "#!/usr/bin/env bash", + "set -euo pipefail", + 'echo "=== Clone repository ==="', + "if [ -n \"${GITHUB_TOKEN:-}\" ]; then", + f' CLONE_URL="https://${{GITHUB_TOKEN}}@{clone_host}"', + "else", + f" CLONE_URL={q(args.repo_url)}", + "fi", + f'git clone --branch {q(args.repo_branch)} --depth 1 "$CLONE_URL" /app/repo', + "cd /app/repo", + ] + + if args.run_sft: + lines += [ + 'echo "=== SFT: build dataset ==="', + "python training/build_sft_dataset.py \\", + f" --out /app/sft_data.jsonl \\", + f" --episodes {int(args.sft_episodes)} \\", + f" --seed {int(args.seed)}", + 'echo "=== SFT: train LoRA ==="', + "python training/train_sft.py \\", + " --dataset /app/sft_data.jsonl \\", + " --output_dir /app/sft_adapter \\", + f" --model {q(args.model)} \\", + f" --epochs {float(args.sft_epochs)} \\", + f" --max_seq_length {int(args.sft_max_seq_length)} \\", + f" --batch_size {int(args.sft_batch_size)} \\", + f" --grad_accum {int(args.sft_grad_accum)} \\", + f" --lora_rank {int(args.lora_rank)} \\", + f" --seed {int(args.seed)} \\", + " --trainer hf", + ] + + grpo_parts = [ + "python training/train_grpo.py", + f" --model {q(args.model)}", + " --output_dir /app/outputs", + f" --episodes {int(args.episodes)}", + f" --lora_rank {int(args.lora_rank)}", + f" --seed {int(args.seed)}", + f" --eval_episodes {int(args.eval_episodes)}", + f" --batch_size {int(args.batch_size)}", + f" --grad_accum {int(args.grad_accum)}", + f" --n_generations {int(args.n_generations)}", + f" --max_new_tokens {int(args.max_new_tokens)}", + f" --logging_steps {int(args.logging_steps)}", + f" --domain_episode_ratio {float(args.domain_episode_ratio)}", + f" --stage_epoch_scale {float(args.stage_epoch_scale)}", + f" --adapt_eval_episodes {int(args.adapt_eval_episodes)}", + ] + if args.adapt_focus: + grpo_parts.append(" --adapt_focus") + if args.no_eval: + grpo_parts.append(" --no_eval") + if args.run_sft: + grpo_parts.append(" --sft_adapter /app/sft_adapter") + + lines += ['echo "=== GRPO ==="'] + for i, part in enumerate(grpo_parts): + if i < len(grpo_parts) - 1: + lines.append(part + " \\") + else: + lines.append(part) + + lines += [ + 'echo "=== Push to Hub ==="', + "python /app/hf_push_outputs.py \\", + " --output_dir /app/outputs \\", + f" --repo_id {q(args.hf_output_repo)}", + 'echo "=== Done ==="', + ] + return "\n".join(lines) + "\n" + + +def _run(cmd: list[str], **kw) -> None: + print(f"$ {' '.join(cmd)}") + subprocess.run(cmd, check=True, **kw) + + +def _hf_api(token: str): + try: + from huggingface_hub import HfApi + except ImportError: + print("[ERROR] pip install huggingface_hub") + sys.exit(1) + return HfApi(token=token) + + +def _ensure_repo(api, repo_id: str, repo_type: str) -> str: + kwargs: dict = dict(repo_id=repo_id, repo_type=repo_type, exist_ok=True, private=True) + if repo_type == "space": + kwargs["space_sdk"] = "docker" + url = api.create_repo(**kwargs) + print(f"Repo ready: {url}") + return url + + +def main() -> None: + parser = argparse.ArgumentParser(description="Deploy ATC training to Hugging Face Spaces (Docker GPU)") + parser.add_argument("--hf_token", required=True, help="HF token with write access (hub + spaces)") + parser.add_argument("--hf_user", required=True, help="HF username or org") + parser.add_argument("--repo_url", default="https://github.com/yvishi/ats.git") + parser.add_argument("--repo_branch", default="cleaned") + parser.add_argument("--model", default="Qwen/Qwen2.5-7B-Instruct") + parser.add_argument("--episodes", type=int, default=80) + parser.add_argument("--eval_episodes", type=int, default=4) + parser.add_argument("--n_generations", type=int, default=4) + parser.add_argument("--lora_rank", type=int, default=16) + parser.add_argument("--seed", type=int, default=42) + parser.add_argument("--batch_size", type=int, default=2) + parser.add_argument("--grad_accum", type=int, default=2) + parser.add_argument("--max_new_tokens", type=int, default=256) + parser.add_argument("--logging_steps", type=int, default=1) + parser.add_argument("--domain_episode_ratio", type=float, default=0.45) + parser.add_argument("--stage_epoch_scale", type=float, default=0.35) + parser.add_argument("--adapt_eval_episodes", type=int, default=4) + parser.add_argument("--adapt_focus", action="store_true") + parser.add_argument("--no_eval", action="store_true", help="Skip GRPO before/after eval (faster)") + parser.add_argument("--run_sft", action="store_true", help="Run SFT then GRPO with --sft_adapter") + parser.add_argument("--sft_episodes", type=int, default=300) + parser.add_argument("--sft_epochs", type=float, default=1.0) + parser.add_argument("--sft_max_seq_length", type=int, default=2048) + parser.add_argument("--sft_batch_size", type=int, default=1) + parser.add_argument("--sft_grad_accum", type=int, default=8) + parser.add_argument( + "--hardware", + default="t4-small", + help="Space hardware: t4-small, a10g-small, a100-large, … (see HF Space settings)", + ) + parser.add_argument("--space_name", default="atc-grpo-runner") + parser.add_argument("--adapter_name", default="atc-grpo-adapter") + parser.add_argument("--wandb_key", default="") + parser.add_argument("--github_token", default="", help="GitHub PAT if the source repo is private") + args = parser.parse_args() + + _hu = (args.hf_user or "").strip() + _bad = { + "your_hf_username", + "yourusername", + "your_username", + "username", + "hf_user", + "myusername", + } + if not _hu or "/" in _hu or " " in _hu: + print( + "[ERROR] --hf_user must be your Hugging Face username or org id " + "(from https://huggingface.co/), with no spaces or slashes.", + file=sys.stderr, + ) + sys.exit(2) + if _hu.upper() == "YOUR_HF_USERNAME" or _hu.lower() in _bad: + print( + "[ERROR] Replace the docs placeholder: pass your real HF username, e.g. " + "--hf_user jdoe (not YOUR_HF_USERNAME).", + file=sys.stderr, + ) + sys.exit(2) + args.hf_user = _hu + + space_repo_id = f"{args.hf_user}/{args.space_name}" + adapter_repo_id = f"{args.hf_user}/{args.adapter_name}" + args.hf_output_repo = adapter_repo_id + + print(f"\n{'='*60}") + print(" ATC training → Hugging Face Space (Docker)") + print(f" Space: https://huggingface.co/spaces/{space_repo_id}") + print(f" Output: https://huggingface.co/{adapter_repo_id}") + print(f" GPU: {args.hardware}") + print(f" Model: {args.model}") + print(f" GRPO ep: {args.episodes} SFT: {'yes' if args.run_sft else 'no'}") + print(f"{'='*60}\n") + + api = _hf_api(args.hf_token) + + print("[1/4] Ensure Space repo exists...") + _ensure_repo(api, space_repo_id, "space") + _ensure_repo(api, adapter_repo_id, "model") + + print("[2/4] Upload Dockerfile, entrypoint, push helper...") + with tempfile.TemporaryDirectory() as tmp: + tmp_p = Path(tmp) + _write_unix_text(tmp_p / "Dockerfile", _dockerfile()) + _write_unix_text(tmp_p / "entrypoint.sh", _entrypoint(args)) + _write_unix_text(tmp_p / "hf_push_outputs.py", PUSH_SCRIPT) + # Minimal frontmatter: `startup_duration_timeout` in README has caused Hub validation + # errors (e.g. "max 6h"). Omit it; use default startup behavior. Long Docker *builds* are + # separate from this knob — adjust in Space → Settings on HF if build still times out. + readme = textwrap.dedent(f"""\ + --- + title: ATC GRPO Runner + sdk: docker + --- + + # ATC training on GPU + + Clones **`{args.repo_url}`** (`{args.repo_branch}`), runs **{"SFT + " if args.run_sft else ""}GRPO**, + uploads the LoRA folder to **`{adapter_repo_id}`**. + + **Secrets:** `HF_TOKEN` (required). `GITHUB_TOKEN` only if the Git repo is private. + + **GPU:** set in Space **Settings → Hardware** to `{args.hardware}` (launcher also requests it via API). + """) + _write_unix_text(tmp_p / "README.md", readme) + + api.upload_folder(folder_path=str(tmp_p), repo_id=space_repo_id, repo_type="space") + + print(f"[3/4] Request hardware {args.hardware}...") + try: + api.request_space_hardware(repo_id=space_repo_id, hardware=args.hardware) + print(f" Hardware set to {args.hardware}") + except Exception as e: + print(f" [WARN] Could not set hardware via API: {e}") + print(f" Set manually: https://huggingface.co/spaces/{space_repo_id}/settings") + + print("[4/4] Space secrets...") + try: + api.add_space_secret(repo_id=space_repo_id, key="HF_TOKEN", value=args.hf_token) + secrets = ["HF_TOKEN"] + if args.github_token: + api.add_space_secret(repo_id=space_repo_id, key="GITHUB_TOKEN", value=args.github_token) + secrets.append("GITHUB_TOKEN") + if args.wandb_key: + api.add_space_secret(repo_id=space_repo_id, key="WANDB_API_KEY", value=args.wandb_key) + secrets.append("WANDB_API_KEY") + print(f" Secrets set: {', '.join(secrets)}") + except Exception as e: + print(f" [WARN] Could not set secrets via API: {e}") + print(" Add HF_TOKEN (and GITHUB_TOKEN if needed) under Space Settings → Variables and secrets.") + + print("\nDone. Open your Space (there is no /logs URL — use the Space page + Logs UI).") + print(f" Space home: https://huggingface.co/spaces/{space_repo_id}") + print(" In the browser: open that page → **Logs** / **Build** (or the status indicator).") + print(" From terminal (HF CLI): hf spaces logs " + space_repo_id + " --build") + print(" hf spaces logs " + space_repo_id) + print("\nDownload adapter after run:") + print(f" huggingface-cli download {adapter_repo_id} --local-dir ./hf-adapter") + + +if __name__ == "__main__": + main() diff --git a/training/plot_rewards.py b/training/plot_rewards.py new file mode 100644 index 0000000000000000000000000000000000000000..1060c558d19ee62049c7a433636ec877f5a8fcd7 --- /dev/null +++ b/training/plot_rewards.py @@ -0,0 +1,280 @@ +"""Reward curve visualization for multi-agent ATC training. + +Reads reward_curves.json produced by train_grpo.py and generates: + 1. Per-role reward curves (AMAN, DMAN, GENERATOR, SUPERVISOR) + 2. Coordination score progression + 3. Generator difficulty escalation overlay + 4. Before/after comparison bar chart (from eval.py output) + +Usage: + python training/plot_rewards.py --input outputs/atc-multiagent/reward_curves.json + python training/plot_rewards.py --eval_results eval_output.json --save plots/ +""" + +from __future__ import annotations + +import argparse +import json +import sys +from pathlib import Path +from typing import Dict, List, Optional + + +def _smooth(values: List[float], window: int = 10) -> List[float]: + """Exponential moving average smoothing.""" + if not values: + return values + smoothed = [values[0]] + alpha = 2.0 / (window + 1) + for v in values[1:]: + smoothed.append(alpha * v + (1 - alpha) * smoothed[-1]) + return smoothed + + +def plot_training_curves( + reward_curves: Dict[str, List[float]], + save_dir: Optional[str] = None, + show: bool = True, +) -> None: + try: + import matplotlib + if not show: + matplotlib.use("Agg") + import matplotlib.pyplot as plt + import matplotlib.gridspec as gridspec + except ImportError: + print("[ERROR] pip install matplotlib") + sys.exit(1) + + plt.rcParams.update({ + "font.family": "DejaVu Sans", "font.size": 10, + "axes.spines.top": False, "axes.spines.right": False, + "axes.grid": True, "grid.alpha": 0.3, "grid.linestyle": "--", + "figure.dpi": 150, + }) + + roles = ["AMAN", "DMAN", "ADAPT", "GENERATOR", "SUPERVISOR"] + colours = { + "AMAN": "#1976D2", + "DMAN": "#F57C00", + "ADAPT": "#6A1B9A", + "GENERATOR": "#C62828", + "SUPERVISOR": "#2E7D32", + } + + fig = plt.figure(figsize=(16, 10)) + fig.suptitle("Multi-Agent ATC — GRPO Training Curves", fontsize=15, fontweight="bold", y=0.98) + gs = gridspec.GridSpec(2, 2, hspace=0.4, wspace=0.35) + + # ── Plot 1: Per-role rewards ────────────────────────────────────────────── + ax1 = fig.add_subplot(gs[0, :]) + for role in roles: + data = reward_curves.get(role, []) + if not data: + continue + xs = list(range(len(data))) + raw = data + smt = _smooth(data, window=15) + ax1.plot(xs, raw, alpha=0.2, color=colours[role], linewidth=0.8) + ax1.plot(xs, smt, label=role, color=colours[role], linewidth=2) + + ax1.set_xlabel("Training Step") + ax1.set_ylabel("Reward") + ax1.set_title("Per-Role Reward Progression (shaded=raw, solid=EMA)") + ax1.legend(loc="lower right") + ax1.axhline(0, color="gray", linestyle="--", linewidth=0.5) + ax1.set_ylim(-1.05, 1.05) + ax1.grid(True, alpha=0.3) + + # ── Plot 2: AMAN vs DMAN convergence ───────────────────────────────────── + ax2 = fig.add_subplot(gs[1, 0]) + aman_data = _smooth(reward_curves.get("AMAN", [])) + dman_data = _smooth(reward_curves.get("DMAN", [])) + n = min(len(aman_data), len(dman_data)) + if n > 0: + xs = list(range(n)) + ax2.plot(xs, aman_data[:n], label="AMAN", color=colours["AMAN"], linewidth=2) + ax2.plot(xs, dman_data[:n], label="DMAN", color=colours["DMAN"], linewidth=2) + # Shade cooperation region (both > 0.5) + ax2.fill_between( + xs, + [min(a, d) for a, d in zip(aman_data[:n], dman_data[:n])], + 0, + where=[a > 0.4 and d > 0.4 for a, d in zip(aman_data[:n], dman_data[:n])], + alpha=0.15, + color="green", + label="Cooperation zone", + ) + ax2.set_xlabel("Training Step") + ax2.set_ylabel("Reward") + ax2.set_title("AMAN vs DMAN — Coordination Emergence") + ax2.legend() + ax2.grid(True, alpha=0.3) + ax2.set_ylim(-0.1, 1.05) + + # ── Plot 3: Generator adversarial reward + composite ───────────────────── + ax3 = fig.add_subplot(gs[1, 1]) + gen_data = _smooth(reward_curves.get("GENERATOR", [])) + comp_data = _smooth(reward_curves.get("composite", [])) + n = max(len(gen_data), len(comp_data)) + if gen_data: + xs = list(range(len(gen_data))) + ax3.plot(xs, gen_data, label="Generator reward", color=colours["GENERATOR"], + linewidth=2, linestyle="--") + if comp_data: + xs = list(range(len(comp_data))) + ax3_r = ax3.twinx() + ax3_r.plot(xs, comp_data, label="Composite score", color="#9C27B0", linewidth=2) + ax3_r.set_ylabel("Composite Score", color="#9C27B0") + ax3_r.set_ylim(0, 1.05) + ax3.set_xlabel("Training Step") + ax3.set_ylabel("Generator Reward", color=colours["GENERATOR"]) + ax3.set_title("Self-Play Arms Race: Generator vs Controllers") + ax3.grid(True, alpha=0.3) + + lines1, labels1 = ax3.get_legend_handles_labels() + if comp_data: + lines2, labels2 = ax3_r.get_legend_handles_labels() + ax3.legend(lines1 + lines2, labels1 + labels2, loc="upper left", fontsize=8) + else: + ax3.legend(loc="upper left") + + if save_dir: + Path(save_dir).mkdir(parents=True, exist_ok=True) + path = Path(save_dir) / "training_curves.png" + plt.savefig(path, dpi=150, bbox_inches="tight") + print(f"Saved: {path}") + if show: + plt.show() + plt.close() + + +def plot_eval_comparison(eval_results: Dict, save_dir: Optional[str] = None, show: bool = True) -> None: + """Bar chart comparing base vs trained on key metrics.""" + try: + import matplotlib + if not show: + matplotlib.use("Agg") + import matplotlib.pyplot as plt + import numpy as np + except ImportError: + print("[ERROR] pip install matplotlib numpy") + sys.exit(1) + + base = eval_results.get("base", {}) + trained = eval_results.get("trained", {}) + if not base or not trained: + print("[WARN] eval_results must have 'base' and 'trained' keys") + return + + # Support both short keys (smoke-test synthetic) and long keys (train_grpo.py output) + def _get(d: dict, *keys: str) -> float: + for k in keys: + if k in d: + return d[k] + return 0.0 + + metrics = [ + ("Composite Score", "mean_composite", "mean_composite"), + ("AMAN Reward", "mean_aman", "mean_aman_reward"), + ("DMAN Reward", "mean_dman", "mean_dman_reward"), + ("ADAPT pipeline", "mean_adapt", "mean_adapt"), + ("Coordination Score", "mean_coord", "mean_coordination"), + ("Success Rate", "success_rate", "success_rate"), + ] + + labels = [m[0] for m in metrics] + base_v = [_get(base, m[1], m[2]) for m in metrics] + train_v = [_get(trained, m[1], m[2]) for m in metrics] + + plt.rcParams.update({ + "font.family": "DejaVu Sans", "font.size": 10, + "axes.spines.top": False, "axes.spines.right": False, + "figure.dpi": 150, + }) + + x = list(range(len(labels))) + w = 0.35 + fig, ax = plt.subplots(figsize=(14, 6)) + + ax.bar([i - w/2 for i in x], base_v, w, label="Base (untrained)", color="#90A4AE", alpha=0.85) + bars2 = ax.bar([i + w/2 for i in x], train_v, w, label="Trained (GRPO)", color="#1565C0", alpha=0.90) + + for i, (bar, bv, tv) in enumerate(zip(bars2, base_v, train_v)): + ax.annotate( + f"{tv:.2f}", + xy=(bar.get_x() + bar.get_width() / 2, tv), + xytext=(0, 3), textcoords="offset points", + ha="center", va="bottom", fontsize=8, fontweight="bold", color="#1565C0", + ) + if bv > 0: + pct = (tv - bv) / bv * 100 + ax.annotate( + f"+{pct:.0f}%" if pct >= 0 else f"{pct:.0f}%", + xy=(i, max(tv, bv) + 0.08), + ha="center", va="bottom", fontsize=7.5, + color="#2E7D32" if pct >= 0 else "#C62828", + fontweight="bold", + ) + + ax.set_xticks(x) + ax.set_xticklabels(labels, rotation=15, ha="right") + ax.set_ylabel("Score (0–1)") + ax.set_ylim(0, 1.25) + ax.set_title("Multi-Agent ATC: Before vs After GRPO Training", + fontsize=13, fontweight="bold", pad=12) + ax.legend(loc="upper left") + ax.grid(axis="y", alpha=0.3, linestyle="--") + ax.axhline(0.6, color="#FF8F00", linestyle="--", linewidth=1.2, + label="Success threshold (0.60)", zorder=0) + + plt.tight_layout() + if save_dir: + Path(save_dir).mkdir(parents=True, exist_ok=True) + path = Path(save_dir) / "eval_comparison.png" + plt.savefig(path, dpi=150, bbox_inches="tight") + print(f"Saved: {path}") + if show: + plt.show() + plt.close() + + +# ── CLI ─────────────────────────────────────────────────────────────────────── + +def main() -> None: + parser = argparse.ArgumentParser(description="Plot multi-agent ATC reward curves") + parser.add_argument("--input", default=None, + help="reward_curves.json from train_grpo.py") + parser.add_argument("--eval_results", default=None, + help="eval output JSON from eval.py") + parser.add_argument("--save", default=None, + help="Directory to save PNG files") + parser.add_argument("--no_show", action="store_true", + help="Don't display plots interactively") + args = parser.parse_args() + + show = not args.no_show + + if args.input: + path = Path(args.input) + if not path.exists(): + print(f"[ERROR] {path} not found") + sys.exit(1) + data = json.loads(path.read_text()) + plot_training_curves(data, save_dir=args.save, show=show) + + if args.eval_results: + path = Path(args.eval_results) + if not path.exists(): + print(f"[ERROR] {path} not found") + sys.exit(1) + data = json.loads(path.read_text()) + plot_eval_comparison(data, save_dir=args.save, show=show) + + if not args.input and not args.eval_results: + print("Usage: python training/plot_rewards.py --input reward_curves.json") + print(" python training/plot_rewards.py --eval_results eval_output.json") + + +if __name__ == "__main__": + main() diff --git a/training/reward_functions.py b/training/reward_functions.py new file mode 100644 index 0000000000000000000000000000000000000000..e5c18702d5544d27d4f016d43ad61372bda6e545 --- /dev/null +++ b/training/reward_functions.py @@ -0,0 +1,1078 @@ +"""Per-agent reward functions for GRPO training. + +Design principles: + 1. Potential-based reward shaping (Ng et al. 1999) gives dense signal. + 2. Group-relative advantage (GRPO) avoids a learned value baseline. + 3. Role decomposition keeps AMAN/DMAN/GENERATOR/SUPERVISOR rewards separate. + 4. Theory-of-mind bonuses reward proactive coordination. + 5. Supervisor alignment shaping trains preference following. + +The helpers in this module are intentionally defensive because newer TRL +versions may pass completions and metadata in slightly different shapes. +""" + +from __future__ import annotations + +import json +import os +import re +from typing import Any, Dict, List, Optional + +try: + from ..engine import simulate_plan + from .dataset import ( + _coerce_completion_text, + parse_aman_action, + parse_dman_action, + parse_generator_action, + ) + from ..models import OperationType, PriorityClass, SlotAssignment, TaskDefinition, WakeClass + from ..tasks import task_catalog + from ..multi_agent.generator import ChallengeGenerator + from ..multi_agent.models import SupervisorProfileName + from ..multi_agent.supervisor import SupervisorAgent +except ImportError: + import sys + + sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) + from engine import simulate_plan + from training.dataset import ( + _coerce_completion_text, + parse_aman_action, + parse_dman_action, + parse_generator_action, + ) + from models import OperationType, PriorityClass, SlotAssignment, TaskDefinition, WakeClass + from tasks import task_catalog + from multi_agent.generator import ChallengeGenerator + from multi_agent.models import SupervisorProfileName + from multi_agent.supervisor import SupervisorAgent + +_CATALOG = None +_SUPERVISOR = SupervisorAgent() +_GENERATOR = ChallengeGenerator() +_TRACE_REWARDS = os.getenv("ATC_REWARD_TRACE", "").strip().lower() in {"1", "true", "yes", "on"} +_DEFAULT_SUPERVISOR_PROFILE = SupervisorProfileName.SAFETY_STRICT +_ROLE_TOKEN_BUDGETS = { + "AMAN": int(os.getenv("ATC_ROLE_TOKENS_AMAN", "384")), + "DMAN": int(os.getenv("ATC_ROLE_TOKENS_DMAN", "384")), + "GENERATOR": int(os.getenv("ATC_ROLE_TOKENS_GENERATOR", "224")), + "SUPERVISOR": int(os.getenv("ATC_ROLE_TOKENS_SUPERVISOR", "160")), +} + +# Wake turbulence minimum separation (minutes), keyed by (leading_class, trailing_class). +# Source: AMAN system prompt rules + ICAO Doc 4444 wake separation table. +_WAKE_MIN_SEP: Dict[tuple, int] = { + ("H", "H"): 4, ("H", "M"): 5, ("H", "L"): 6, + ("M", "H"): 3, ("M", "M"): 3, ("M", "L"): 3, + ("L", "H"): 3, ("L", "M"): 3, ("L", "L"): 3, +} + + +def _wake_separation_penalty(slots: List[SlotAssignment], task: TaskDefinition) -> float: + """Penalise slots that violate wake turbulence separation on a shared runway. + + Checks every consecutive same-runway pair (sorted by assigned_minute). + Returns a value in [0.0, 0.40]: 0 = no violations, 0.40 = all pairs violated. + + Applies to both arrivals (AMAN) and departures (DMAN) — wake vortex affects + both approach and departure sequences when sharing a runway. + """ + flights_by_id = {f.flight_id: f for f in task.flights} + runway_slots: Dict[str, List[SlotAssignment]] = {} + for slot in slots: + if slot.flight_id in flights_by_id: + runway_slots.setdefault(slot.runway, []).append(slot) + + violations = 0 + total_pairs = 0 + for rwy_slots in runway_slots.values(): + sorted_slots = sorted(rwy_slots, key=lambda s: s.assigned_minute) + for i in range(len(sorted_slots) - 1): + lslot = sorted_slots[i] + tslot = sorted_slots[i + 1] + lf = flights_by_id.get(lslot.flight_id) + tf = flights_by_id.get(tslot.flight_id) + if lf is None or tf is None: + continue + gap = tslot.assigned_minute - lslot.assigned_minute + min_sep = _WAKE_MIN_SEP.get( + (lf.wake_class.value, tf.wake_class.value), 3 + ) + total_pairs += 1 + if gap < min_sep: + violations += 1 + + if total_pairs == 0: + return 0.0 + return round(min(0.40, 0.40 * violations / total_pairs), 4) + + +def _delta_conflict_bonus( + new_slots: List[SlotAssignment], + other_slots: List[SlotAssignment], + task: TaskDefinition, + bid_conflict_count: int, +) -> float: + """Immediate reward for reducing conflicts during the negotiate round. + + Positive = conflicts reduced (good negotiation), negative = conflicts increased. + Range: [-0.30, +0.30]. Zero when bid_conflict_count == 0 (no conflicts to fix). + + This is the key fix for the Pune failure: agents that make things WORSE during + negotiation now receive a negative signal at that step, not just a delayed penalty. + """ + if bid_conflict_count <= 0: + return 0.0 + merged = new_slots + other_slots + outcome = simulate_plan(task, merged) + new_conflicts = outcome.metrics.conflict_count + delta = bid_conflict_count - new_conflicts # positive = improved + normalized = delta / max(1, bid_conflict_count) + return round(max(-0.30, min(0.30, 0.30 * normalized)), 4) + + +def _debug_reward_trace(role: str, components: Dict[str, float]) -> None: + if not _TRACE_REWARDS: + return + print(f"\n[REWARD TRACE] role={role}") + for key, value in components.items(): + print(f" {key}: {value:.4f}") + + +def _get_catalog() -> Dict[str, TaskDefinition]: + global _CATALOG + if _CATALOG is None: + _CATALOG = task_catalog() + return _CATALOG + + +def _metadata_list(value: Any, length: int, default: Any) -> List[Any]: + if isinstance(value, list): + if not value: + return [default] * length + if len(value) >= length: + return value[:length] + return value + [value[-1]] * (length - len(value)) + if value is None: + return [default] * length + return [value] * length + + +def _safe_supervisor_profile(profile_value: Any) -> SupervisorProfileName: + try: + return SupervisorProfileName(profile_value) + except Exception: + return _DEFAULT_SUPERVISOR_PROFILE + + +def _safe_float(value: Any, default: float = 0.5) -> float: + try: + return float(value) + except Exception: + return default + + +def _weighted_active_mean(parts: List[tuple[float, float, bool]]) -> float: + num = 0.0 + den = 0.0 + for value, weight, active in parts: + if not active: + continue + num += float(value) * float(weight) + den += float(weight) + return num / den if den > 1e-9 else 0.0 + + +def _approx_token_count(text: str) -> int: + # Simple, fast approximation suitable for relative penalties. + return max(0, len(text.split())) + + +def _length_budget_penalty(role: str, completion: Any) -> float: + text = _coerce_completion_text(completion) + budget = max(32, _ROLE_TOKEN_BUDGETS.get(role, 256)) + n = _approx_token_count(text) + if n <= budget: + return 0.0 + overflow = n - budget + return min(0.25, overflow / max(1.0, float(budget)) * 0.25) + + +def _controller_failure_reward(completion: Any, role: str) -> float: + """Spread parse-failure rewards to avoid flat-floor collapse in GRPO.""" + text = _coerce_completion_text(completion) + base_credit = _parse_partial_credit(completion) # [0, 0.18] + lower = -0.95 + spread = 0.60 + reward = lower + spread * base_credit + # Deterministic micro-jitter keeps rewards non-identical within bad batches. + if text: + bucket = sum(ord(c) for c in text[:240]) % 41 + jitter = (bucket / 40.0 - 0.5) * 0.08 + reward += jitter + reward -= _length_budget_penalty(role, text) + return round(max(-1.0, min(-0.2, reward)), 4) + + +def _normalized_cross_conflict_penalty( + our_slots: List[SlotAssignment], + other_slots: List[SlotAssignment], + conflict_count: int, + weight: float = 0.35, +) -> float: + if conflict_count <= 0 or not our_slots or not other_slots: + return 0.0 + + our_by_runway: Dict[str, int] = {} + other_by_runway: Dict[str, int] = {} + + for slot in our_slots: + our_by_runway[slot.runway] = our_by_runway.get(slot.runway, 0) + 1 + for slot in other_slots: + other_by_runway[slot.runway] = other_by_runway.get(slot.runway, 0) + 1 + + max_cross_conflicts = 0 + for runway in set(our_by_runway) & set(other_by_runway): + max_cross_conflicts += our_by_runway[runway] * other_by_runway[runway] + + if max_cross_conflicts <= 0: + return 0.0 + + normalized = min(1.0, conflict_count / max_cross_conflicts) + return weight * normalized + + +def aman_reward_fn( + completions: List[str], + task_id: List[str], + supervisor_profile: Optional[List[str]] = None, + dman_slots_json: Optional[List[str]] = None, + atfm_deadlines_json: Optional[List[str]] = None, + **kwargs: Any, +) -> List[float]: + """GRPO reward function for AMAN (Arrival Manager).""" + catalog = _get_catalog() + rewards: List[float] = [] + n = len(completions) + + task_id = _metadata_list(task_id, n, "") + supervisor_profile = _metadata_list( + supervisor_profile if supervisor_profile is not None else kwargs.get("supervisor_profile"), + n, + _DEFAULT_SUPERVISOR_PROFILE.value, + ) + dman_slots_json = _metadata_list( + dman_slots_json if dman_slots_json is not None else kwargs.get("dman_slots_json"), + n, + "[]", + ) + atfm_deadlines_json = _metadata_list( + atfm_deadlines_json if atfm_deadlines_json is not None else kwargs.get("atfm_deadlines_json"), + n, + "{}", + ) + round_names = _metadata_list(kwargs.get("round"), n, "bid") + bid_conflict_counts = _metadata_list(kwargs.get("bid_conflict_count"), n, 0) + + for completion, tid, profile_str, dman_json, _atfm_json, round_name, bid_n in zip( + completions, task_id, supervisor_profile, dman_slots_json, atfm_deadlines_json, + round_names, bid_conflict_counts, + ): + task = catalog.get(tid) + if task is None: + rewards.append(-1.0) + continue + + aman_action = parse_aman_action(completion) + if aman_action is None: + rewards.append(_controller_failure_reward(completion, "AMAN")) + continue + + dman_slots = _parse_slots_json(dman_json) + profile = _safe_supervisor_profile(profile_str) + merged = aman_action.arrival_slots + dman_slots + outcome = simulate_plan(task, merged) + + arrivals = [f for f in task.flights if f.operation == OperationType.ARRIVAL] + arr_map = {s.flight_id: s for s in aman_action.arrival_slots} + + delay_total = 0 + missing = 0 + emg_ok = emg_miss = 0 + + for f in arrivals: + slot = arr_map.get(f.flight_id) + if slot: + delay = abs(slot.assigned_minute - f.scheduled_minute) + delay_total += delay + if f.priority in (PriorityClass.EMERGENCY, PriorityClass.MEDICAL): + if delay <= 5: + emg_ok += 1 + else: + emg_miss += 1 + else: + missing += 1 + + arr_count = max(1, len(arrivals)) + parsed_slot_count = len(aman_action.arrival_slots) + emg_total = sum( + 1 for f in arrivals if f.priority in (PriorityClass.EMERGENCY, PriorityClass.MEDICAL) + ) + budget = task.delay_budget / 2.0 + # If all flights are unscheduled, delay_total=0 which would give delay_eff=1.0 + # (rewarding an empty plan). Clamp to 0 when nothing is scheduled. + _all_arr_missing = missing == len(arrivals) and len(arrivals) > 0 + delay_eff = 0.0 if _all_arr_missing else max(0.0, 1.0 - delay_total / max(1, budget)) + coverage = 1.0 - missing / arr_count + emg_score = emg_ok / max(1, emg_ok + emg_miss) if emg_total > 0 else 0.5 + + cross_penalty = 0.0 + if {s.runway for s in aman_action.arrival_slots} & {s.runway for s in dman_slots}: + cross_penalty = _normalized_cross_conflict_penalty( + aman_action.arrival_slots, + dman_slots, + outcome.metrics.conflict_count, + ) + + tom_bonus = _compute_tom_bonus_aman(aman_action, dman_slots, task) + sup_align = _supervisor_alignment(outcome, task, profile) + rationale_score = _score_rationale_quality(aman_action.rationale, task, outcome) + + # Counterfactual credit: how much does AMAN's plan improve over naive baseline? + # cf_outcome = naive arrivals + real DMAN slots; advantage = real - counterfactual. + cf_outcome = simulate_plan(task, _naive_arrival_slots(task) + dman_slots) + cf_advantage = max(-1.0, min(1.0, outcome.normalized_score - cf_outcome.normalized_score)) + + json_fmt = _json_format_score(completion) + parse_valid_bonus = 0.08 + slot_validity = min(1.0, parsed_slot_count / arr_count) + parse_progress = 0.5 * json_fmt + 0.5 * slot_validity + long_horizon_gate = max(0.25, parse_progress) + long_horizon = _weighted_active_mean( + [ + (outcome.metrics.connection_impact_score, 0.45, True), + (outcome.metrics.fairness, 0.25, True), + (outcome.metrics.fuel_efficiency, 0.20, True), + (outcome.metrics.schedule_completeness, 0.10, True), + ] + ) + reward = _weighted_active_mean( + [ + (delay_eff, 0.22, True), + (coverage, 0.18, True), + (cf_advantage, 0.15, True), + (tom_bonus, 0.10, True), + (emg_score, 0.14, emg_total > 0), + (sup_align, 0.06, True), + (rationale_score, 0.05, True), + (json_fmt, 0.04, True), + (long_horizon * long_horizon_gate, 0.06, True), + ] + ) + reward += parse_valid_bonus + reward -= cross_penalty + reward -= _length_budget_penalty("AMAN", completion) + # Smooth safety penalties preserve ranking signal for GRPO. + conflict_penalty = min(0.55, 0.55 * outcome.metrics.conflict_count / max(1, len(task.flights) - 1)) + emg_penalty = 0.35 * (emg_miss / max(1, emg_total)) if emg_total > 0 else 0.0 + coverage_penalty = max(0.0, 0.55 - coverage) * 0.9 + reward -= conflict_penalty + emg_penalty + coverage_penalty + + # Wake turbulence separation — immediate signal for H/M/L ordering violations. + wake_penalty = _wake_separation_penalty(aman_action.arrival_slots, task) + reward -= wake_penalty + + # Negotiate-round delta bonus — reward/penalise conflict CHANGE vs bid round. + delta_bonus = 0.0 + if round_name == "negotiate" and bid_n: + delta_bonus = _delta_conflict_bonus( + aman_action.arrival_slots, dman_slots, task, int(bid_n) + ) + reward += delta_bonus + + reward = round(max(-1.0, min(1.0, reward)), 4) + _debug_reward_trace( + role="AMAN", + components={ + "delay_eff": delay_eff, + "emg_score": emg_score, + "coverage": coverage, + "cf_advantage": cf_advantage, + "tom_bonus": tom_bonus, + "sup_align": sup_align, + "rationale_score": rationale_score, + "json_fmt": json_fmt, + "parse_valid_bonus": parse_valid_bonus, + "slot_validity": slot_validity, + "long_horizon_gate": long_horizon_gate, + "cross_penalty": -cross_penalty, + "conflict_penalty": -conflict_penalty, + "emg_penalty": -emg_penalty, + "coverage_penalty": -coverage_penalty, + "wake_penalty": -wake_penalty, + "delta_bonus": delta_bonus, + "final_reward": reward, + }, + ) + rewards.append(reward) + + return rewards + + +def dman_reward_fn( + completions: List[str], + task_id: List[str], + supervisor_profile: Optional[List[str]] = None, + aman_slots_json: Optional[List[str]] = None, + atfm_deadlines_json: Optional[List[str]] = None, + **kwargs: Any, +) -> List[float]: + """GRPO reward function for DMAN (Departure Manager).""" + catalog = _get_catalog() + rewards: List[float] = [] + n = len(completions) + + task_id = _metadata_list(task_id, n, "") + supervisor_profile = _metadata_list( + supervisor_profile if supervisor_profile is not None else kwargs.get("supervisor_profile"), + n, + _DEFAULT_SUPERVISOR_PROFILE.value, + ) + aman_slots_json = _metadata_list( + aman_slots_json if aman_slots_json is not None else kwargs.get("aman_slots_json"), + n, + "[]", + ) + atfm_deadlines_json = _metadata_list( + atfm_deadlines_json if atfm_deadlines_json is not None else kwargs.get("atfm_deadlines_json"), + n, + "{}", + ) + round_names = _metadata_list(kwargs.get("round"), n, "bid") + bid_conflict_counts = _metadata_list(kwargs.get("bid_conflict_count"), n, 0) + + for completion, tid, profile_str, aman_json, atfm_json, round_name, bid_n in zip( + completions, task_id, supervisor_profile, aman_slots_json, atfm_deadlines_json, + round_names, bid_conflict_counts, + ): + task = catalog.get(tid) + if task is None: + rewards.append(-1.0) + continue + + dman_action = parse_dman_action(completion) + if dman_action is None: + rewards.append(_controller_failure_reward(completion, "DMAN")) + continue + + aman_slots = _parse_slots_json(aman_json) + atfm = json.loads(atfm_json) if atfm_json else {} + profile = _safe_supervisor_profile(profile_str) + merged = aman_slots + dman_action.departure_slots + outcome = simulate_plan(task, merged) + + departures = [f for f in task.flights if f.operation == OperationType.DEPARTURE] + dep_map = {s.flight_id: s for s in dman_action.departure_slots} + + delay_total = 0 + missing = 0 + emg_ok = emg_miss = 0 + atfm_ok = atfm_viol = 0 + + for f in departures: + slot = dep_map.get(f.flight_id) + if slot: + delay = abs(slot.assigned_minute - f.scheduled_minute) + delay_total += delay + if f.priority in (PriorityClass.EMERGENCY, PriorityClass.MEDICAL): + if delay <= 5: + emg_ok += 1 + else: + emg_miss += 1 + deadline = atfm.get(f.flight_id) + if deadline is not None: + if slot.assigned_minute <= deadline: + atfm_ok += 1 + else: + atfm_viol += 1 + else: + missing += 1 + + dep_count = max(1, len(departures)) + parsed_slot_count = len(dman_action.departure_slots) + emg_total = sum( + 1 for f in departures if f.priority in (PriorityClass.EMERGENCY, PriorityClass.MEDICAL) + ) + budget = task.delay_budget / 2.0 + _all_dep_missing = missing == len(departures) and len(departures) > 0 + delay_eff = 0.0 if _all_dep_missing else max(0.0, 1.0 - delay_total / max(1, budget)) + coverage = 1.0 - missing / dep_count + emg_score = emg_ok / max(1, emg_ok + emg_miss) if emg_total > 0 else 0.5 + atfm_count = atfm_ok + atfm_viol + atfm_score = atfm_ok / max(1, atfm_count) if atfm_count > 0 else 0.5 + + cross_penalty = 0.0 + if {s.runway for s in dman_action.departure_slots} & {s.runway for s in aman_slots}: + cross_penalty = _normalized_cross_conflict_penalty( + dman_action.departure_slots, + aman_slots, + outcome.metrics.conflict_count, + ) + + tom_bonus = _compute_tom_bonus_dman(dman_action, aman_slots, task) + sup_align = _supervisor_alignment(outcome, task, profile) + rationale_score = _score_rationale_quality(dman_action.rationale, task, outcome) + + # Counterfactual credit: how much does DMAN's plan improve over naive baseline? + # cf_outcome = real AMAN slots + naive departures; advantage = real - counterfactual. + cf_outcome = simulate_plan(task, aman_slots + _naive_departure_slots(task)) + cf_advantage = max(-1.0, min(1.0, outcome.normalized_score - cf_outcome.normalized_score)) + + json_fmt = _json_format_score(completion) + parse_valid_bonus = 0.08 + slot_validity = min(1.0, parsed_slot_count / dep_count) + parse_progress = 0.5 * json_fmt + 0.5 * slot_validity + long_horizon_gate = max(0.25, parse_progress) + long_horizon = _weighted_active_mean( + [ + (outcome.metrics.connection_impact_score, 0.45, True), + (outcome.metrics.fairness, 0.25, True), + (outcome.metrics.fuel_efficiency, 0.20, True), + (outcome.metrics.schedule_completeness, 0.10, True), + ] + ) + reward = _weighted_active_mean( + [ + (delay_eff, 0.19, True), + (coverage, 0.14, True), + (cf_advantage, 0.14, True), + (tom_bonus, 0.10, True), + (atfm_score, 0.14, atfm_count > 0), + (emg_score, 0.12, emg_total > 0), + (sup_align, 0.05, True), + (rationale_score, 0.04, True), + (json_fmt, 0.03, True), + (long_horizon * long_horizon_gate, 0.05, True), + ] + ) + reward += parse_valid_bonus + reward -= cross_penalty + reward -= _length_budget_penalty("DMAN", completion) + conflict_penalty = min(0.55, 0.55 * outcome.metrics.conflict_count / max(1, len(task.flights) - 1)) + emg_penalty = 0.35 * (emg_miss / max(1, emg_total)) if emg_total > 0 else 0.0 + coverage_penalty = max(0.0, 0.55 - coverage) * 0.9 + reward -= conflict_penalty + emg_penalty + coverage_penalty + + # Wake turbulence separation — immediate signal for H/M/L ordering violations. + wake_penalty = _wake_separation_penalty(dman_action.departure_slots, task) + reward -= wake_penalty + + # Negotiate-round delta bonus — reward/penalise conflict CHANGE vs bid round. + delta_bonus = 0.0 + if round_name == "negotiate" and bid_n: + delta_bonus = _delta_conflict_bonus( + dman_action.departure_slots, aman_slots, task, int(bid_n) + ) + reward += delta_bonus + + reward = round(max(-1.0, min(1.0, reward)), 4) + _debug_reward_trace( + role="DMAN", + components={ + "delay_eff": delay_eff, + "atfm_score": atfm_score, + "emg_score": emg_score, + "coverage": coverage, + "cf_advantage": cf_advantage, + "tom_bonus": tom_bonus, + "sup_align": sup_align, + "rationale_score": rationale_score, + "json_fmt": json_fmt, + "parse_valid_bonus": parse_valid_bonus, + "slot_validity": slot_validity, + "long_horizon_gate": long_horizon_gate, + "cross_penalty": -cross_penalty, + "conflict_penalty": -conflict_penalty, + "emg_penalty": -emg_penalty, + "coverage_penalty": -coverage_penalty, + "wake_penalty": -wake_penalty, + "delta_bonus": delta_bonus, + "final_reward": reward, + }, + ) + rewards.append(reward) + + return rewards + + +def generator_reward_fn( + completions: List[str], + task_id: List[str], + controller_scores: Optional[List[float]] = None, + **kwargs: Any, +) -> List[float]: + """GRPO reward function for GENERATOR role.""" + catalog = _get_catalog() + rewards: List[float] = [] + n = len(completions) + + task_id = _metadata_list(task_id, n, "") + controller_scores = _metadata_list( + controller_scores if controller_scores is not None else kwargs.get("controller_scores"), + n, + 0.5, + ) + + for completion, tid, ctrl_score in zip(completions, task_id, controller_scores): + task = catalog.get(tid) + if task is None: + rewards.append(-1.0) + continue + + gen_action = parse_generator_action(completion) + if gen_action is None: + rewards.append(-0.5) + continue + + try: + _, is_solvable = _GENERATOR.mutate(task, gen_action) + reward = _GENERATOR.compute_reward(_safe_float(ctrl_score), is_solvable) + except Exception as exc: + # LLM may emit invalid param types (e.g. flight_id as int). + # Penalise but don't crash training — the source bug is also fixed + # in generator.py, but this guard handles any future schema drift. + if _TRACE_REWARDS: + print(f"[REWARD TRACE] generator mutate failed: {exc}") + reward = -0.4 + _parse_partial_credit(completion) + rewards.append(round(max(-1.0, min(1.0, reward)), 4)) + + return rewards + + +def supervisor_reward_fn( + completions: List[str], + task_id: List[str], + supervisor_profile: Optional[List[str]] = None, + merged_plan_json: Optional[List[str]] = None, + **kwargs: Any, +) -> List[float]: + """GRPO reward for SUPERVISOR role.""" + catalog = _get_catalog() + rewards: List[float] = [] + n = len(completions) + + task_id = _metadata_list(task_id, n, "") + supervisor_profile = _metadata_list( + supervisor_profile if supervisor_profile is not None else kwargs.get("supervisor_profile"), + n, + _DEFAULT_SUPERVISOR_PROFILE.value, + ) + merged_plan_json = _metadata_list( + merged_plan_json if merged_plan_json is not None else kwargs.get("merged_plan_json"), + n, + "[]", + ) + + for completion, tid, profile_str, plan_json in zip( + completions, task_id, supervisor_profile, merged_plan_json + ): + task = catalog.get(tid) + if task is None: + rewards.append(-1.0) + continue + + try: + plan_data = json.loads(plan_json) + slots = [SlotAssignment(**s) for s in plan_data] + except Exception: + rewards.append(-0.5) + continue + + outcome = simulate_plan(task, slots) + profile = _safe_supervisor_profile(profile_str) + score = _SUPERVISOR.score_plan(outcome, task, profile) + + supervisor_claimed = _extract_supervisor_score(completion) + calibration_bonus = 0.0 + if supervisor_claimed is not None: + calibration_bonus = max(0.0, 0.2 - abs(supervisor_claimed - score)) + + rewards.append(round(min(1.0, score + calibration_bonus), 4)) + + return rewards + + +def _json_format_score(completion: Any) -> float: + """Returns 1.0 if completion contains valid JSON with expected keys, else 0.0.""" + text = _coerce_completion_text(completion) + try: + stripped = re.sub(r"```[a-zA-Z]*\s*", "", text) + stripped = re.sub(r"```", "", stripped).strip() + # Normalise Python literals before parsing + stripped = re.sub(r"\bTrue\b", "true", stripped) + stripped = re.sub(r"\bFalse\b", "false", stripped) + stripped = re.sub(r"\bNone\b", "null", stripped) + data = json.loads(stripped) + if isinstance(data, dict) and ( + "arrival_slots" in data or "departure_slots" in data or "rationale" in data + ): + return 1.0 + return 0.5 # valid JSON but unexpected shape + except Exception: + # Partial credit if JSON block is present but malformed + if "{" in text and ("slots" in text or "rationale" in text): + return 0.2 + return 0.0 + + +def _parse_partial_credit(completion: Any) -> float: + """Partial credit for completions that fail JSON parsing. + + GRPO advantage = (r - mean) / std. If ALL completions in a group get + identical rewards, std=0 → advantage=0 → zero gradient. This function + ensures rewards in [-0.80, -0.62] vary even when parsing fails completely, + including when the model outputs natural language instead of JSON. + + Credit tiers (cumulative, capped at 0.18): + +0.03 any substantive text (> 20 chars) + +0.02 longer response (> 100 chars, shows more effort) + +0.04 has { (attempted JSON) + +0.05 has slot key (arrival_slots / departure_slots / slots) + +0.04 has flight_id key or pattern + +0.03 has runway key or pattern + +0.02 has rationale key + -0.04 very short (< 20 chars, penalise lazy/empty outputs) + """ + text = _coerce_completion_text(completion) + if not text or not text.strip(): + return 0.0 + + tl = text.lower() + score = 0.0 + + # Natural-language responses still get some credit so they vary from empty + if len(text.strip()) > 20: + score += 0.03 + if len(text.strip()) > 100: + score += 0.02 + + # JSON structure markers + if "{" in text: + score += 0.04 + if any(k in tl for k in ("arrival_slots", "departure_slots", '"slots"', "'slots'")): + score += 0.05 + if "flight_id" in tl: + score += 0.04 + if "runway" in tl: + score += 0.03 + if "rationale" in tl: + score += 0.02 + + if len(text.strip()) < 20: + score = max(0.0, score - 0.04) + + return round(min(0.18, score), 4) + + +def _score_rationale_quality( + rationale: str, + task: TaskDefinition, + outcome, +) -> float: + """Rule-based rationale quality scorer — fully verifiable, no LLM required. + + Rewards agents for rationales that demonstrate awareness of the task's key + constraints. Keeps rewards in RLVR territory (deterministic & verifiable). + + Returns a score in [0.0, 1.0]. + """ + if not rationale or not rationale.strip(): + return 0.0 + + text = rationale.lower() + score = 0.0 + + # Acknowledge emergency / medical flights by ID + emergency_flights = [ + f for f in task.flights + if f.priority in (PriorityClass.EMERGENCY, PriorityClass.MEDICAL) + ] + for ef in emergency_flights: + if ef.flight_id.lower() in text: + score += 0.20 + break # one bonus regardless of how many emergencies are mentioned + + # Acknowledge wake turbulence separation constraints + if any(kw in text for kw in ("wake", "turbulence", "separation", "heavy", "light")): + score += 0.15 + + # Acknowledge runway capacity or weather penalty + if any(kw in text for kw in ("capacity", "weather", "penalty", "runway")): + score += 0.10 + + # Mention at least one flight ID from the task (shows engagement, not boilerplate) + flight_ids_lower = {f.flight_id.lower() for f in task.flights} + if any(fid in text for fid in flight_ids_lower): + score += 0.10 + + # Acknowledge a detected conflict if one exists + if outcome.metrics.conflict_count > 0 and any( + kw in text for kw in ("conflict", "spac", "gap", "collision") + ): + score += 0.15 + + # Mention delay or fuel concern (shows cost awareness) + if any(kw in text for kw in ("delay", "fuel", "hold", "burn", "cost")): + score += 0.10 + + # Penalty for suspiciously short rationales (< 15 chars after strip) + if len(rationale.strip()) < 15: + score = max(0.0, score - 0.30) + + return round(min(1.0, score), 4) + + +def _naive_arrival_slots(task: TaskDefinition) -> List[SlotAssignment]: + """Baseline arrivals plan: each flight at scheduled_minute on first allowed runway. + + Used for COMA-style counterfactual credit assignment — measures how much better + AMAN's plan is versus a naive do-nothing scheduler. + """ + slots = [] + for f in task.flights: + if f.operation == OperationType.ARRIVAL and f.allowed_runways: + minute = max(f.earliest_minute, min(f.latest_minute, f.scheduled_minute)) + slots.append(SlotAssignment( + flight_id=f.flight_id, + runway=f.allowed_runways[0], + assigned_minute=minute, + hold_minutes=0, + )) + return slots + + +def _naive_departure_slots(task: TaskDefinition) -> List[SlotAssignment]: + """Baseline departures plan: each flight at scheduled_minute on first allowed runway.""" + slots = [] + for f in task.flights: + if f.operation == OperationType.DEPARTURE and f.allowed_runways: + minute = max(f.earliest_minute, min(f.latest_minute, f.scheduled_minute)) + slots.append(SlotAssignment( + flight_id=f.flight_id, + runway=f.allowed_runways[0], + assigned_minute=minute, + hold_minutes=0, + )) + return slots + + +def _parse_slots_json(json_str: str) -> List[SlotAssignment]: + try: + data = json.loads(json_str) + return [SlotAssignment(**item) for item in data] + except Exception: + return [] + + +def _compute_tom_bonus_aman(aman_action, dman_slots, task) -> float: + """Theory-of-mind bonus: AMAN pre-emptively left gap for DMAN emergency.""" + if not dman_slots: + return 0.0 + flights_by_id = {f.flight_id: f for f in task.flights} + emg_deps = [ + s for s in dman_slots + if flights_by_id.get(s.flight_id) and flights_by_id[s.flight_id].priority in (PriorityClass.EMERGENCY, PriorityClass.MEDICAL) + ] + if not emg_deps: + return 0.0 + aman_runway_times = [(s.runway, s.assigned_minute) for s in aman_action.arrival_slots] + for dep in emg_deps: + gap_ok = all( + abs(m - dep.assigned_minute) >= 3 + for rwy, m in aman_runway_times + if rwy == dep.runway + ) + if gap_ok: + return 1.0 + return 0.1 + + +def _compute_tom_bonus_dman(dman_action, aman_slots, task) -> float: + """Theory-of-mind bonus: DMAN cleared gap for AMAN emergency arrival.""" + if not aman_slots: + return 0.0 + flights_by_id = {f.flight_id: f for f in task.flights} + emg_arrs = [ + s for s in aman_slots + if flights_by_id.get(s.flight_id) and flights_by_id[s.flight_id].priority in (PriorityClass.EMERGENCY, PriorityClass.MEDICAL) + ] + if not emg_arrs: + return 0.0 + dman_runway_times = [(s.runway, s.assigned_minute) for s in dman_action.departure_slots] + for arr in emg_arrs: + gap_ok = all( + abs(m - arr.assigned_minute) >= 3 + for rwy, m in dman_runway_times + if rwy == arr.runway + ) + if gap_ok: + return 1.0 + return 0.1 + + +def _supervisor_alignment(outcome, task, profile: SupervisorProfileName) -> float: + return _SUPERVISOR.score_plan(outcome, task, profile) + + +def _extract_supervisor_score(completion: Any) -> Optional[float]: + """Parse supervisor's claimed score from JSON-like completion content.""" + text = _coerce_completion_text(completion) + try: + data = json.loads(text) + return float(data.get("score", None)) + except Exception: + match = re.search(r'"score"\s*:\s*([0-9.]+)', text) + if match: + return float(match.group(1)) + return None + + +# ── ADAPT reward function ───────────────────────────────────────────────────── + +def adapt_reward_fn(completions: List[Any], **kwargs) -> List[float]: + """Reward ADAPT meta-agent for quality of structural domain transfer. + + Signal = downstream operational efficiency on the ADAPT-mapped task + compared to the heuristic baseline on the *unmapped* task. + + Components (summed, clamped to [-1, 1]): + 0.70 × downstream_composite — how well AMAN+DMAN solve the mapped task + 0.15 × improvement_over_base — delta vs running heuristic on raw task + 0.10 × mapping_coverage — fraction of entity types that were mapped + up to 0.05 × rationale_bonus — rationale ≥ 30 chars citing numbers + + Parse failure → -0.50 immediately. + Missing domain_task_json → -0.60 immediately. + """ + from multi_agent.adapt import ( + _build_adapt_heuristic, + apply_adapt_mapping, + build_adapt_observation, + parse_adapt_action, + _compute_entity_profiles, + ) + + rewards: List[float] = [] + n = len(completions) + + task_ids = kwargs.get("task_id", [None] * n) + domain_task_jsons = kwargs.get("domain_task_json", [None] * n) + supervisor_profiles = kwargs.get("supervisor_profile", [None] * n) + + if not isinstance(task_ids, list): task_ids = [task_ids] * n + if not isinstance(domain_task_jsons, list): domain_task_jsons = [domain_task_jsons] * n + if not isinstance(supervisor_profiles, list): supervisor_profiles = [supervisor_profiles] * n + + for i, completion in enumerate(completions): + dtjson = domain_task_jsons[i] if i < len(domain_task_jsons) else None + profile = supervisor_profiles[i] if i < len(supervisor_profiles) else None + + # ── Guard: missing domain task ──────────────────────────────────────── + if not dtjson: + rewards.append(-0.60) + continue + + try: + domain_task = TaskDefinition.model_validate_json(dtjson) + except Exception: + rewards.append(-0.60) + continue + + # ── Guard: parse failure ────────────────────────────────────────────── + action = parse_adapt_action(completion) + if action is None: + rewards.append(-0.50) + continue + + # ── Resolve supervisor profile ──────────────────────────────────────── + try: + prof_enum = SupervisorProfileName(profile) if profile else SupervisorProfileName.SAFETY_STRICT + except ValueError: + prof_enum = SupervisorProfileName.SAFETY_STRICT + + # ── Build observation for heuristic baseline ────────────────────────── + try: + adapt_obs = build_adapt_observation( + task=domain_task, + profile=prof_enum, + ) + except Exception: + rewards.append(-0.40) + continue + + # ── Baseline: heuristic ADAPT on unmapped task ──────────────────────── + try: + heuristic_action = _build_adapt_heuristic(adapt_obs, domain_task) + heuristic_mapped = apply_adapt_mapping(domain_task, heuristic_action) + env_base = MultiAgentATCEnvironment(seed=0) + env_base.reset(episode_id=0, supervisor_profile=prof_enum, mutated_task=heuristic_mapped) + from multi_agent.inference import _build_aman_heuristic, _build_dman_heuristic + aman_obs_b, dman_obs_b = env_base.reset(0, prof_enum, heuristic_mapped) + aman_act_b = _build_aman_heuristic(aman_obs_b) + dman_act_b = _build_dman_heuristic(dman_obs_b, env_base._state.atfm_deadlines) + env_base.step_bid(aman_act_b, dman_act_b) + baseline_result = env_base.finalize() + baseline_composite = baseline_result.composite_score + except Exception: + baseline_composite = 0.40 # fallback if heuristic run fails + + # ── Downstream: LLM ADAPT action on its mapped task ────────────────── + try: + llm_mapped = apply_adapt_mapping(domain_task, action) + env_llm = MultiAgentATCEnvironment(seed=0) + aman_obs_l, dman_obs_l = env_llm.reset(0, prof_enum, llm_mapped) + aman_act_l = _build_aman_heuristic(aman_obs_l) + dman_act_l = _build_dman_heuristic(dman_obs_l, env_llm._state.atfm_deadlines) + env_llm.step_bid(aman_act_l, dman_act_l) + llm_result = env_llm.finalize() + downstream = llm_result.composite_score + except Exception: + downstream = 0.0 + + # ── Coverage: what fraction of entity types were mapped? ────────────── + entity_types = set(adapt_obs.entity_types) + mapped_types = set(action.entity_wake_map.keys()) | set(action.entity_priority_map.keys()) + coverage = len(entity_types & mapped_types) / max(1, len(entity_types)) + + # ── Rationale bonus: cite numbers? ──────────────────────────────────── + rationale = action.rationale or "" + import re as _re + has_numbers = bool(_re.search(r"\d+\.\d+", rationale)) + rationale_bonus = 0.05 if (len(rationale) >= 30 and has_numbers) else 0.0 + + # ── Compose reward ──────────────────────────────────────────────────── + improvement = downstream - baseline_composite # positive = LLM beat heuristic + reward = ( + 0.70 * downstream + + 0.15 * max(-1.0, min(1.0, improvement)) + + 0.10 * coverage + + rationale_bonus + ) + reward = max(-1.0, min(1.0, reward)) + + _debug_reward_trace("ADAPT", { + "downstream_composite": downstream, + "baseline_composite": baseline_composite, + "improvement": improvement, + "coverage": coverage, + "rationale_bonus": rationale_bonus, + "total_reward": reward, + }) + + rewards.append(reward) + + return rewards + + + diff --git a/training/sft_schema.py b/training/sft_schema.py new file mode 100644 index 0000000000000000000000000000000000000000..57ac253c1cfcc19786cad06ce8291c62d87f2d4e --- /dev/null +++ b/training/sft_schema.py @@ -0,0 +1,96 @@ +"""Serialize AMAN/DMAN/ADAPT actions to strict JSON for SFT labels. + +Every string produced here is intended to parse cleanly with +``parse_aman_action``, ``parse_dman_action``, and ``parse_adapt_action``. +""" + +from __future__ import annotations + +import json +from typing import Any, Dict, List + +from multi_agent.models import AMANAction, ADAPTAction, DMANAction, NegotiationMessage + + +def _msg_to_dict(m: NegotiationMessage) -> Dict[str, Any]: + pr = m.priority + priority_val = pr.value if hasattr(pr, "value") else str(pr) + return { + "from_role": m.from_role.value, + "message_type": m.message_type.value, + "flight_id": m.flight_id, + "requested_minute": int(m.requested_minute), + "runway_id": m.runway_id, + "priority": priority_val, + "reason": m.reason, + "is_emergency": bool(m.is_emergency), + } + + +def aman_action_to_json_str(action: AMANAction) -> str: + """Strict JSON for AMAN completions (no markdown fences).""" + slots = [ + { + "flight_id": s.flight_id, + "runway": s.runway, + "assigned_minute": int(s.assigned_minute), + "hold_minutes": int(s.hold_minutes), + } + for s in action.arrival_slots + ] + obj: Dict[str, Any] = { + "arrival_slots": slots, + "rationale": action.rationale or "SFT teacher: heuristic arrival plan.", + "emergency_yields": list(action.emergency_yields), + "outgoing_messages": [_msg_to_dict(m) for m in action.outgoing_messages], + "commit": bool(action.commit), + } + return json.dumps(obj, ensure_ascii=False, separators=(",", ":")) + + +def dman_action_to_json_str(action: DMANAction) -> str: + """Strict JSON for DMAN completions (no markdown fences).""" + slots = [ + { + "flight_id": s.flight_id, + "runway": s.runway, + "assigned_minute": int(s.assigned_minute), + "hold_minutes": int(s.hold_minutes), + } + for s in action.departure_slots + ] + atfm: Dict[str, int] = {str(k): int(v) for k, v in action.atfm_compliance.items()} + obj: Dict[str, Any] = { + "departure_slots": slots, + "rationale": action.rationale or "SFT teacher: heuristic departure plan.", + "atfm_compliance": atfm, + "emergency_broadcasts": list(action.emergency_broadcasts), + "outgoing_messages": [_msg_to_dict(m) for m in action.outgoing_messages], + "commit": bool(action.commit), + } + return json.dumps(obj, ensure_ascii=False, separators=(",", ":")) + + +def adapt_action_to_json_str(action: ADAPTAction) -> str: + """Strict JSON for ADAPT completions.""" + obj = { + "entity_wake_map": dict(action.entity_wake_map), + "entity_priority_map": dict(action.entity_priority_map), + "rationale": action.rationale or "SFT teacher: structural mapping.", + } + return json.dumps(obj, ensure_ascii=False, separators=(",", ":")) + + +def verify_aman_parseable(action: AMANAction, parse_fn) -> bool: + p = parse_fn(aman_action_to_json_str(action)) + return p is not None and len(p.arrival_slots) == len(action.arrival_slots) + + +def verify_dman_parseable(action: DMANAction, parse_fn) -> bool: + p = parse_fn(dman_action_to_json_str(action)) + return p is not None and len(p.departure_slots) == len(action.departure_slots) + + +def verify_adapt_parseable(action: ADAPTAction, parse_fn) -> bool: + p = parse_fn(adapt_action_to_json_str(action)) + return p is not None and bool(p.entity_wake_map) and bool(p.entity_priority_map) diff --git a/training/train_grpo.py b/training/train_grpo.py new file mode 100644 index 0000000000000000000000000000000000000000..f18ab98bec4453b3cb5b8284a6394b5235ee770d --- /dev/null +++ b/training/train_grpo.py @@ -0,0 +1,1955 @@ +"""Multi-Agent ATC GRPO Training with Unsloth. + +Architecture: + - Single LLM (Qwen2.5-7B-Instruct, 4-bit QLoRA) plays 4 roles via system prompts + - GRPO: group-relative advantage A_i = (r_i - mean(group)) / (std(group) + eps) + - Four independent reward functions (AMAN, DMAN, GENERATOR, SUPERVISOR) + - Potential-based reward shaping per role (policy-gradient safe, Ng et al. 1999) + - Adaptive curriculum: ChallengeGenerator escalates difficulty as agents improve + - Per-role reward curves saved to reward_curves.json for demo + +Training loop: + Episode -> Generator mutates task -> AMAN bids -> DMAN bids -> + Negotiate (if conflicts) -> Grade -> Per-agent GRPO update + +Colab T4 resource profile: + Model: Qwen2.5-7B-Instruct, 4-bit QLoRA + LoRA rank: 16 (q_proj, v_proj, k_proj, o_proj) + Batch size: 2, gradient accumulation 4 -> effective batch 8 + Generations: 4 per prompt (GRPO group size — minimum for stable advantage estimate) + Max tokens: 512 per completion + Training: ~200 episodes ≈ 800 samples ≈ 2 hr on T4 + +For JSON parse reliability on a cold base model, run SFT first (``training/build_sft_dataset.py`` + +``training/train_sft.py``) then continue from the saved adapter. + +Usage: + python training/train_grpo.py [--episodes 200] [--model Qwen/Qwen2.5-7B-Instruct] + +Colab one-liner: + !python training/train_grpo.py --episodes 100 --output_dir /content/atc-multiagent +""" + +from __future__ import annotations + +import argparse +import inspect +import json +import logging +import os +import re +import sys +import time +import warnings +from pathlib import Path +from typing import Any, Dict, List, Optional + +ROOT = Path(__file__).resolve().parent.parent +if str(ROOT) not in sys.path: + sys.path.insert(0, str(ROOT)) + + +def _require_training_deps(): + if sys.version_info >= (3, 14): + print("[ERROR] Python 3.14 not supported. Use 3.11 or 3.12.") + sys.exit(1) + try: + import torch + except ImportError as e: + print(f"[ERROR] Training deps missing: {e}") + print("Install: pip install torch") + sys.exit(1) + try: + # Unsloth should be imported before TRL/Transformers/PEFT. + import unsloth # noqa: F401 + from unsloth import FastLanguageModel + except Exception as e: + print(f"[ERROR] unsloth import failed: {e}") + print("Install: pip install unsloth unsloth-zoo") + sys.exit(1) + try: + from trl import GRPOConfig, GRPOTrainer + except ImportError as e: + print(f"[ERROR] Training deps missing: {e}") + print("Install: pip install trl transformers") + sys.exit(1) + return torch, FastLanguageModel, GRPOConfig, GRPOTrainer + + +from training.dataset import ( + build_episode_dataset, + parse_aman_action, + parse_dman_action, + parse_generator_action, +) +from training.reward_functions import ( + aman_reward_fn, + dman_reward_fn, + generator_reward_fn, + supervisor_reward_fn, + adapt_reward_fn, +) +from multi_agent.environment import MultiAgentATCEnvironment +from multi_agent.generator import ChallengeGenerator +from multi_agent.models import AgentRole, SupervisorProfileName +from multi_agent.supervisor import SupervisorAgent +from tasks import task_catalog, ordered_tasks + + +# ── Hyperparameters ─────────────────────────────────────────────────────────── + +DEFAULT_MODEL = "Qwen/Qwen2.5-7B-Instruct" +DEFAULT_OUTPUT = "./outputs/atc-multiagent" +LORA_RANK = 16 +LORA_ALPHA = 32 +LORA_TARGETS = ["q_proj", "v_proj", "k_proj", "o_proj"] +MAX_SEQ_LEN = 4096 +MAX_NEW_TOKENS = 384 +TEMPERATURE = 0.7 +# Role-aware generation budgets. GRPO supports one global max token cap, so we +# use the max here and enforce per-role compactness in rewards/logging. +ROLE_MAX_NEW_TOKENS = { + AgentRole.AMAN.value: 384, + AgentRole.DMAN.value: 384, + AgentRole.GENERATOR.value: 224, + AgentRole.SUPERVISOR.value: 160, + AgentRole.ADAPT.value: 384, +} +# 8 generations per prompt. +# Research basis (GRPO dynamics, arXiv 2503.06639): the adaptive advantage weight +# w_i = (1-p)/√[p(1-p)] relies on an accurate estimate of p (per-prompt success +# rate). With N=4 the estimate variance is high enough to produce misleading +# advantage signs on low-success prompts. N=8 halves the estimation variance +# while keeping VRAM cost manageable on T4 (1.5B model, LoRA rank 16). +# DAPO / NGRPO finding: groups where pass@N ∈ {0, N} have std≈0 → zero GRPO +# gradient. Larger N reduces the probability of all-correct or all-wrong groups +# on intermediate-difficulty tasks. +N_GENERATIONS = 8 +BATCH_SIZE = 4 +GRAD_ACCUM = 2 # effective batch = 8 +LR = 5e-5 +# In trl==0.16.0 + unsloth==2026.4.7 with PEFT, non-zero KL can fail when +# ref_per_token_logps is absent in the fast path (ref=None crash). +KL_COEFF = 0.0 +WARMUP_RATIO = 0.05 +LOGGING_STEPS = 1 +SAVE_STEPS = 50 +SAVE_TOTAL_LIMIT = 3 # keep only 3 checkpoints on disk +EVAL_EPISODES = 3 +STAGE_EPOCHS = { + "stage_a": 0.45, # AMAN + DMAN only + "stage_b": 0.30, # add sampled generator/supervisor + "stage_c": 0.25, # full 4-role mix +} + + +def _configure_runtime_warnings() -> None: + """Hide repetitive upstream warnings that don't affect correctness.""" + warnings.filterwarnings( + "ignore", + message=r"Both `max_new_tokens` \(=.*\) and `max_length`\(=.*\) seem to have been set\..*", + ) + warnings.filterwarnings( + "ignore", + message=r"Passing `generation_config` together with generation-related arguments=.* is deprecated.*", + ) + warnings.filterwarnings( + "ignore", + message=r"The attention mask API under `transformers\.modeling_attn_mask_utils`.*deprecated.*", + category=FutureWarning, + ) + # Some transformers builds emit this through logging, not warnings. + class _SuppressMaxLenWarning(logging.Filter): + def filter(self, record: logging.LogRecord) -> bool: + msg = record.getMessage() + return "Both `max_new_tokens`" not in msg + + for name in ( + "transformers.generation.utils", + "transformers.generation.configuration_utils", + ): + logging.getLogger(name).addFilter(_SuppressMaxLenWarning()) + + +def _auto_tune_for_gpu(torch_module) -> Dict[str, int]: + """Return tuned batch/accum/token settings based on detected VRAM.""" + tuned = { + "batch_size": BATCH_SIZE, + "grad_accum": GRAD_ACCUM, + "max_new_tokens": MAX_NEW_TOKENS, + } + if not torch_module.cuda.is_available(): + return tuned + try: + vram_gb = torch_module.cuda.get_device_properties(0).total_memory / (1024 ** 3) + except Exception: + return tuned + + # 80GB-class GPUs: increase throughput while keeping rollout quality. + if vram_gb >= 70: + tuned["batch_size"] = max(tuned["batch_size"], 8) + tuned["grad_accum"] = 1 + tuned["max_new_tokens"] = min(tuned["max_new_tokens"], 384) + elif vram_gb >= 40: + tuned["batch_size"] = max(tuned["batch_size"], 6) + tuned["grad_accum"] = min(tuned["grad_accum"], 2) + tuned["max_new_tokens"] = min(tuned["max_new_tokens"], 384) + return tuned + + +def _prefer_local_model_path(model_name: str) -> str: + """Use local HF cache path when available to avoid network flakiness.""" + if os.path.isdir(model_name): + return model_name + try: + from huggingface_hub import snapshot_download + + local_path = snapshot_download(repo_id=model_name, local_files_only=True) + print(f"[INFO] Using local model snapshot cache: {local_path}") + return local_path + except Exception: + return model_name + + +def _is_transient_network_error(exc: Exception) -> bool: + msg = str(exc).lower() + needles = ( + "temporary failure in name resolution", + "name resolution", + "connecterror", + "connection error", + "failed to establish a new connection", + ) + return any(n in msg for n in needles) + + +def _load_model_with_fallback( + FastLanguageModel, + model_source: str, + *, + max_seq_length: int, +): + """Load model/tokenizer, retrying in offline mode on DNS/network failures.""" + kwargs = { + "model_name": model_source, + "max_seq_length": max_seq_length, + "load_in_4bit": True, + "dtype": None, + } + try: + return FastLanguageModel.from_pretrained(**kwargs) + except Exception as exc: + if not _is_transient_network_error(exc): + raise + print("[WARN] Network/DNS issue while loading tokenizer/model. Retrying from local cache...") + os.environ["TRANSFORMERS_OFFLINE"] = "1" + os.environ["HF_HUB_OFFLINE"] = "1" + kwargs["local_files_only"] = True + return FastLanguageModel.from_pretrained(**kwargs) + + +# ── Role-dispatch table ─────────────────────────────────────────────────────── + +REWARD_FN_DISPATCH = { + AgentRole.AMAN.value: aman_reward_fn, + AgentRole.DMAN.value: dman_reward_fn, + AgentRole.GENERATOR.value: generator_reward_fn, + AgentRole.SUPERVISOR.value: supervisor_reward_fn, + AgentRole.ADAPT.value: adapt_reward_fn, +} + + +def _reward_failure_mode() -> str: + mode = os.getenv("REWARD_FAILURE_MODE", "strict").strip().lower() + return mode if mode in {"strict", "penalize"} else "strict" + + +def _config_supports(param: str, config_cls) -> bool: + try: + return param in inspect.signature(config_cls.__init__).parameters + except Exception: + return False + + +def _trainer_supports(param: str, trainer_cls) -> bool: + try: + return param in inspect.signature(trainer_cls.__init__).parameters + except Exception: + return False + + +def _maybe_patch_trainer_sampler(trainer) -> None: + """Handle TRL/Transformers sampler signature drift across versions.""" + try: + sampler = getattr(type(trainer), "_get_train_sampler", None) + if sampler is None: + return + # Old TRL versions expose _get_train_sampler(self) while newer + # Transformers call sampler_fn(dataset). Patch only that old form. + if len(inspect.signature(sampler).parameters) == 1: + from types import MethodType + + original = trainer._get_train_sampler + + def _compat_get_train_sampler(self, train_dataset=None): + return original() + + trainer._get_train_sampler = MethodType(_compat_get_train_sampler, trainer) + print("[WARN] Applied sampler compatibility shim for this TRL/Transformers pair.") + except Exception as exc: + print(f"[WARN] Could not apply sampler compatibility shim: {exc}") + + +def _maybe_patch_unsloth_grad_accum(trainer) -> None: + """Provide missing attribute expected by some Unsloth GRPO trainer builds.""" + if hasattr(trainer, "current_gradient_accumulation_steps"): + return + steps = 1 + try: + args = getattr(trainer, "args", None) + if args is not None: + steps = int(getattr(args, "gradient_accumulation_steps", 1) or 1) + except Exception: + steps = 1 + trainer.current_gradient_accumulation_steps = steps + print( + "[WARN] Applied Unsloth GRPO compatibility shim: " + f"current_gradient_accumulation_steps={steps}" + ) + + +def _maybe_patch_unsloth_loss_type(trainer) -> None: + """Ensure loss_type exists for Unsloth/TRL compatibility. + + Some compiled trainer paths branch on hasattr(self.args, "loss_type"). + If missing, they may take an older unpack path that mismatches newer + return signatures and crashes with "too many values to unpack". + """ + try: + args = getattr(trainer, "args", None) + if args is None: + return + if getattr(args, "loss_type", None) is None: + setattr(args, "loss_type", "grpo") + print("[WARN] Applied Unsloth GRPO compatibility shim: loss_type='grpo'") + except Exception as exc: + print(f"[WARN] Could not apply loss_type compatibility shim: {exc}") + + +def _maybe_patch_unsloth_runtime_attrs(trainer) -> None: + """Backfill runtime attrs expected by some Unsloth compiled trainer builds.""" + try: + args = getattr(trainer, "args", None) + + if not hasattr(trainer, "importance_sampling_level"): + level = "token" + if args is not None: + level = getattr(args, "importance_sampling_level", level) or level + setattr(trainer, "importance_sampling_level", level) + print( + "[WARN] Applied Unsloth GRPO compatibility shim: " + f"importance_sampling_level={level!r}" + ) + + if not hasattr(trainer, "epsilon_low"): + epsilon_low = 0.2 + if args is not None: + epsilon_low = float(getattr(args, "epsilon", epsilon_low) or epsilon_low) + setattr(trainer, "epsilon_low", epsilon_low) + print( + "[WARN] Applied Unsloth GRPO compatibility shim: " + f"epsilon_low={epsilon_low}" + ) + + if not hasattr(trainer, "epsilon_high"): + epsilon_high = getattr(trainer, "epsilon_low", 0.2) + if args is not None: + epsilon_high = float( + getattr(args, "epsilon_high", epsilon_high) or epsilon_high + ) + setattr(trainer, "epsilon_high", epsilon_high) + print( + "[WARN] Applied Unsloth GRPO compatibility shim: " + f"epsilon_high={epsilon_high}" + ) + + if not hasattr(trainer, "vllm_importance_sampling_cap"): + cap = 2.0 + if args is not None: + cap = float( + getattr(args, "vllm_importance_sampling_cap", cap) or cap + ) + setattr(trainer, "vllm_importance_sampling_cap", cap) + print( + "[WARN] Applied Unsloth GRPO compatibility shim: " + f"vllm_importance_sampling_cap={cap}" + ) + + if not hasattr(trainer, "loss_type"): + loss_type = "grpo" + if args is not None: + loss_type = getattr(args, "loss_type", loss_type) or loss_type + setattr(trainer, "loss_type", loss_type) + print( + "[WARN] Applied Unsloth GRPO compatibility shim: " + f"loss_type={loss_type!r}" + ) + except Exception as exc: + print(f"[WARN] Could not apply runtime attr compatibility shim: {exc}") + + +def _maybe_patch_unsloth_args_attrs(trainer) -> None: + """Backfill args fields expected by some Unsloth compiled trainer paths.""" + try: + args = getattr(trainer, "args", None) + if args is None: + return + + if not hasattr(args, "delta"): + setattr(args, "delta", None) + print("[WARN] Applied Unsloth GRPO compatibility shim: args.delta=None") + + if not hasattr(args, "temperature"): + setattr(args, "temperature", TEMPERATURE) + print( + "[WARN] Applied Unsloth GRPO compatibility shim: " + f"args.temperature={TEMPERATURE}" + ) + + if not hasattr(args, "max_completion_length"): + setattr(args, "max_completion_length", MAX_NEW_TOKENS) + print( + "[WARN] Applied Unsloth GRPO compatibility shim: " + f"args.max_completion_length={MAX_NEW_TOKENS}" + ) + except Exception as exc: + print(f"[WARN] Could not apply args attr compatibility shim: {exc}") + + +def _maybe_patch_nanmin_symbols() -> None: + """Provide nanmin/nanmax symbols expected by some generated trainer code.""" + try: + import builtins + import torch as _torch + + def _compat_nanmin(x, *args, **kwargs): + if hasattr(_torch, "nanmin"): + return _torch.nanmin(x, *args, **kwargs) + x2 = _torch.nan_to_num(x, nan=float("inf")) + if args or kwargs: + return _torch.amin(x2, *args, **kwargs) + return _torch.min(x2) + + def _compat_nanmax(x, *args, **kwargs): + if hasattr(_torch, "nanmax"): + return _torch.nanmax(x, *args, **kwargs) + x2 = _torch.nan_to_num(x, nan=float("-inf")) + if args or kwargs: + return _torch.amax(x2, *args, **kwargs) + return _torch.max(x2) + + if not hasattr(builtins, "nanmin"): + builtins.nanmin = _compat_nanmin + print("[WARN] Applied compatibility shim: builtins.nanmin") + if not hasattr(builtins, "nanmax"): + builtins.nanmax = _compat_nanmax + print("[WARN] Applied compatibility shim: builtins.nanmax") + except Exception as exc: + print(f"[WARN] Could not apply nanmin/nanmax compatibility shim: {exc}") + + +def _resolve_num_generations(batch_size: int, requested: int) -> int: + requested = max(1, requested) + for candidate in range(min(requested, batch_size), 0, -1): + if batch_size % candidate == 0: + return candidate + return 1 + + +def _effective_kl_coeff() -> float: + raw = os.getenv("ATC_KL_COEFF", str(KL_COEFF)).strip() + try: + value = float(raw) + except ValueError: + print(f"[WARN] Invalid ATC_KL_COEFF={raw!r}; using default {KL_COEFF}.") + return KL_COEFF + + if value < 0.0: + print(f"[WARN] Negative KL coeff {value} is invalid; clamping to 0.0.") + value = 0.0 + + if value > 0.0: + print( + "[WARN] Non-zero KL enabled. On trl==0.16.0 + unsloth==2026.4.7 this may " + "trigger ref_per_token_logps=None errors with PEFT." + ) + return value + + +def _select_sample_value(value: Any, index: int) -> Any: + if isinstance(value, list): + if not value: + return None + return value[index] if index < len(value) else value[-1] + return value + + +def _expand_to_completion_length( + value: Any, + target_len: int, + *, + field_name: str, + num_generations: int, +) -> List[Any]: + """Align prompt-level metadata with completion-level batches.""" + if not isinstance(value, list): + return [value] * target_len + current_len = len(value) + if current_len == target_len: + return value + if current_len == 0: + return [None] * target_len + if current_len * max(1, num_generations) == target_len: + expanded: List[Any] = [] + for item in value: + expanded.extend([item] * max(1, num_generations)) + return expanded + if target_len % current_len == 0: + factor = target_len // current_len + expanded = [] + for item in value: + expanded.extend([item] * factor) + return expanded + raise RuntimeError( + f"Metadata alignment error for '{field_name}': len={current_len}, " + f"target={target_len}, num_generations={num_generations}" + ) + + +def _build_curriculum_slices( + dataset_raw: List[Dict[str, Any]], + seed: int, + *, + adapt_focus: bool = False, +) -> Dict[str, List[Dict[str, Any]]]: + """Create staged role mixes for pure-GRPO curriculum.""" + import random + + rng = random.Random(seed) + adapt_rows = [ + row for row in dataset_raw + if row.get("agent_role") == AgentRole.ADAPT.value + ] + stage_a = [ + row for row in dataset_raw + if row.get("agent_role") in (AgentRole.AMAN.value, AgentRole.DMAN.value) + ] + if adapt_focus and adapt_rows: + # ADAPT is otherwise only in stage_c; include it early to emphasize domain transfer. + stage_a = stage_a + list(adapt_rows) + rng.shuffle(stage_a) + gen_sup = [ + row for row in dataset_raw + if row.get("agent_role") in (AgentRole.GENERATOR.value, AgentRole.SUPERVISOR.value) + ] + rng.shuffle(gen_sup) + keep = int(0.35 * len(gen_sup)) + stage_b = stage_a + gen_sup[:keep] + stage_c = list(dataset_raw) + return {"stage_a": stage_a, "stage_b": stage_b, "stage_c": stage_c} + + +def _tail_rate(values: List[int], window: int = 128) -> float: + if not values: + return 0.0 + tail = values[-min(window, len(values)) :] + return sum(tail) / max(1, len(tail)) + + +def _parse_quality_gates(parse_log: Dict[str, List[int]], fallback_log: Dict[str, List[int]]) -> Dict[str, float]: + return { + "parse_aman": _tail_rate(parse_log.get("AMAN", []), 128), + "parse_dman": _tail_rate(parse_log.get("DMAN", []), 128), + "fallback_aman": _tail_rate(fallback_log.get("AMAN", []), 128), + "fallback_dman": _tail_rate(fallback_log.get("DMAN", []), 128), + } + + +# ── Unified reward dispatcher ───────────────────────────────────────────────── + +def combined_reward_fn(completions: List[str], **kwargs) -> List[float]: + """Route each completion to its role-specific reward function. + + TRL GRPOTrainer calls this with a batch of completions. + kwargs contains per-sample metadata from the dataset. + """ + target_len = len(completions) + normalized_kwargs: Dict[str, List[Any]] = {} + for key, value in kwargs.items(): + normalized_kwargs[key] = _expand_to_completion_length( + value, + target_len, + field_name=key, + num_generations=N_GENERATIONS, + ) + + roles = normalized_kwargs.get("agent_role", [AgentRole.AMAN.value] * target_len) + if not roles: + roles = [AgentRole.AMAN.value] * target_len + + rewards: List[float] = [] + failure_mode = _reward_failure_mode() + + for i, (completion, role) in enumerate(zip(completions, roles)): + fn = REWARD_FN_DISPATCH.get(role, aman_reward_fn) + sample_kwargs = {k: [_select_sample_value(v, i)] for k, v in normalized_kwargs.items()} + try: + r = fn([completion], **sample_kwargs) + if not r: + raise RuntimeError(f"empty reward list for role={role}") + rewards.append(r[0]) + except Exception as exc: + msg = f"reward_fn({role}) failed at index={i}: {exc}" + if failure_mode == "strict": + raise RuntimeError(msg) from exc + print(f"[WARN] {msg}") + rewards.append(-1.0) + + return rewards + + +# ── Training entry point ────────────────────────────────────────────────────── + +def train( + model_name: str = DEFAULT_MODEL, + output_dir: str = DEFAULT_OUTPUT, + n_episodes: int = 200, + lora_rank: int = LORA_RANK, + seed: int = 42, + eval_episodes: int = EVAL_EPISODES, + push_to_hub: bool = False, + hub_model_id: Optional[str] = None, + run_eval: bool = True, + *, + domain_episode_ratio: float = 0.30, + adapt_focus: bool = False, + domain_stratify: bool = True, + stage_epoch_scale: float = 1.0, + adapt_eval_episodes: Optional[int] = None, + sft_adapter_dir: Optional[str] = None, +) -> None: + torch, FastLanguageModel, GRPOConfig, GRPOTrainer = _require_training_deps() + _configure_runtime_warnings() + from transformers import TrainerCallback + + domain_episode_ratio = max(0.0, min(1.0, float(domain_episode_ratio))) + + tuned = _auto_tune_for_gpu(torch) + batch_size = tuned["batch_size"] + grad_accum = tuned["grad_accum"] + max_new_tokens = max(tuned["max_new_tokens"], max(ROLE_MAX_NEW_TOKENS.values())) + + num_generations = _resolve_num_generations(batch_size, N_GENERATIONS) + if num_generations != N_GENERATIONS: + print( + f"[WARN] Adjusted num_generations {N_GENERATIONS} -> {num_generations} " + f"to satisfy GRPO batch-size divisibility constraint." + ) + + print(f"\n{'='*60}") + print(f" ATC Multi-Agent GRPO Training") + print(f" Model: {model_name}") + print(f" Episodes: {n_episodes}") + print(f" Eval eps: {eval_episodes}") + print(f" Generations: {num_generations} per prompt") + print(f" Output: {output_dir}") + device_str = torch.cuda.get_device_name(0) if torch.cuda.is_available() else "CPU" + print(f" Device: {device_str}") + print( + f" Tune: batch={batch_size}, accum={grad_accum}, " + f"max_new_tokens={max_new_tokens}, temp={TEMPERATURE}, logging_steps={LOGGING_STEPS}" + ) + print( + " Role tokens: " + f"AMAN={ROLE_MAX_NEW_TOKENS[AgentRole.AMAN.value]}, " + f"DMAN={ROLE_MAX_NEW_TOKENS[AgentRole.DMAN.value]}, " + f"GEN={ROLE_MAX_NEW_TOKENS[AgentRole.GENERATOR.value]}, " + f"SUP={ROLE_MAX_NEW_TOKENS[AgentRole.SUPERVISOR.value]}, " + f"ADAPT={ROLE_MAX_NEW_TOKENS[AgentRole.ADAPT.value]}" + ) + _aes = adapt_eval_episodes if adapt_eval_episodes is not None else max(3, eval_episodes) + print( + f" ADAPT: domain_ratio={domain_episode_ratio} focus={adapt_focus} " + f"stratify_domains={domain_stratify} stage_epoch_scale={stage_epoch_scale} " + f"adapt_eval_eps={_aes}" + ) + _spg = os.getenv("ATC_STRICT_PARSE_GATE", "0").strip().lower() in {"1", "true", "yes", "on"} + print( + f" Parse abort: {'ON (Stage A can RuntimeError)' if _spg else 'OFF (warn only; set ATC_STRICT_PARSE_GATE=1 to enforce)'}" + ) + print(f"{'='*60}\n") + + # ── 1. Capture pre-training baseline metrics ────────────────────────────── + if run_eval: + print("[0/5] Capturing pre-training baseline metrics...") + baseline = _quick_heuristic_eval(n_episodes=min(10, n_episodes)) + _save_json(baseline, Path(output_dir) / "baseline_metrics.json") + print(f" Baseline composite: {baseline['mean_composite']:.3f}") + + # ── 2. Load model ───────────────────────────────────────────────────────── + print("[1/5] Loading model with Unsloth 4-bit QLoRA...") + model_source = _prefer_local_model_path(model_name) + model, tokenizer = _load_model_with_fallback( + FastLanguageModel, + model_source, + max_seq_length=MAX_SEQ_LEN, + ) + # Prevent generate() ambiguity warnings from inherited max_length defaults. + if hasattr(model, "generation_config") and model.generation_config is not None: + model.generation_config.max_length = None + + sft_path: Optional[Path] = None + if sft_adapter_dir: + _sp = Path(sft_adapter_dir).expanduser() + if _sp.is_dir() and (_sp / "adapter_config.json").exists(): + sft_path = _sp + + if sft_path is not None: + print(f" Continuing GRPO from SFT LoRA: {sft_path}") + from peft import PeftModel + + model = PeftModel.from_pretrained(model, str(sft_path), is_trainable=True) + if hasattr(model, "enable_input_require_grads"): + try: + model.enable_input_require_grads() + except Exception: + pass + else: + if sft_adapter_dir: + print( + f" [WARN] --sft_adapter has no adapter_config.json: {sft_adapter_dir!r} " + "— training a fresh LoRA" + ) + model = FastLanguageModel.get_peft_model( + model, + r=lora_rank, + lora_alpha=LORA_ALPHA, + target_modules=LORA_TARGETS, + lora_dropout=0.0, + bias="none", + use_gradient_checkpointing="unsloth", + random_state=seed, + ) + trainable = sum(p.numel() for p in model.parameters() if p.requires_grad) + print(f" Trainable params: {trainable:,}") + + # ── 2b. Base model eval (before any gradient steps) ────────────────────── + base_model_metrics: Optional[Dict[str, Any]] = None + if run_eval: + print("\n[1.5/5] Measuring base model score (untrained LoRA)...") + model.eval() + base_model_metrics = _run_model_episodes( + model, tokenizer, n_episodes=eval_episodes, tag="BASE MODEL (no fine-tune)" + ) + base_adapt = _run_adapt_domain_eval( + model, + tokenizer, + n_episodes=_aes, + tag="BASE ADAPT (domain pipeline)", + ) + base_model_metrics = _merge_adapt_eval(base_model_metrics, base_adapt) + model.train() + _save_json(base_model_metrics, Path(output_dir) / "base_model_metrics.json") + print(f" Base model composite: {base_model_metrics['mean_composite']:.3f}" + f" (AMAN {base_model_metrics['mean_aman_reward']:.3f}" + f" / DMAN {base_model_metrics['mean_dman_reward']:.3f})") + print( + f" Base ADAPT pipeline (domain→ATC): " + f"{base_model_metrics.get('mean_adapt_pipeline_composite', 0.0):.3f}" + ) + + # ── 3. Build training dataset ───────────────────────────────────────────── + print(f"\n[2/5] Building {n_episodes}-episode multi-agent dataset...") + t0 = time.time() + dataset_raw = build_episode_dataset( + n_episodes=n_episodes, + seed=seed, + include_generator=True, + include_supervisor=True, + include_adapt=True, + domain_episode_ratio=domain_episode_ratio, + domain_stratify=domain_stratify, + ) + + print(f" Dataset: {len(dataset_raw)} samples ({time.time()-t0:.1f}s)") + + role_counts: Dict[str, int] = {} + for s in dataset_raw: + r = s.get("agent_role", "unknown") + role_counts[r] = role_counts.get(r, 0) + 1 + for role, count in sorted(role_counts.items()): + print(f" {role}: {count} samples") + + try: + from datasets import Dataset + stage_slices = _build_curriculum_slices( + dataset_raw, seed=seed, adapt_focus=adapt_focus + ) + stage_datasets = { + name: Dataset.from_list(rows) for name, rows in stage_slices.items() if rows + } + except ImportError: + print("[ERROR] pip install datasets") + sys.exit(1) + print(" Curriculum:") + for stage_name in ("stage_a", "stage_b", "stage_c"): + ds = stage_datasets.get(stage_name) + if ds is not None: + print(f" {stage_name}: {len(ds)} samples") + + # ── 4. GRPO config ──────────────────────────────────────────────────────── + kl_coeff = _effective_kl_coeff() + print( + f"\n[3/5] Configuring GRPO (group_size={num_generations}, lr={LR}, kl={kl_coeff})..." + ) + grpo_kwargs: Dict[str, Any] = { + "num_generations": num_generations, + "temperature": TEMPERATURE, + "learning_rate": LR, + "per_device_train_batch_size": batch_size, + "gradient_accumulation_steps": grad_accum, + "num_train_epochs": 1, + "warmup_ratio": WARMUP_RATIO, + "logging_steps": LOGGING_STEPS, + "save_steps": SAVE_STEPS, + "save_total_limit": SAVE_TOTAL_LIMIT, + "output_dir": output_dir, + "run_name": f"atc-multiagent-grpo-{int(time.time())}", + "bf16": torch.cuda.is_bf16_supported(), + "fp16": not torch.cuda.is_bf16_supported(), + "gradient_checkpointing": True, + "optim": "paged_adamw_8bit", + } + + if _wandb_available(): + grpo_kwargs["report_to"] = "wandb" + else: + grpo_kwargs["report_to"] = "none" + + # Compatibility shims for different TRL versions + if _config_supports("max_completion_length", GRPOConfig): + grpo_kwargs["max_completion_length"] = max_new_tokens + elif _config_supports("max_new_tokens", GRPOConfig): + grpo_kwargs["max_new_tokens"] = max_new_tokens + + if _config_supports("beta", GRPOConfig): + grpo_kwargs["beta"] = kl_coeff + elif _config_supports("kl_coeff", GRPOConfig): + grpo_kwargs["kl_coeff"] = kl_coeff + + if _config_supports("use_vllm", GRPOConfig): + grpo_kwargs["use_vllm"] = False + + if _config_supports("logging_strategy", GRPOConfig): + grpo_kwargs["logging_strategy"] = "steps" + if _config_supports("logging_first_step", GRPOConfig): + grpo_kwargs["logging_first_step"] = True + if _config_supports("disable_tqdm", GRPOConfig): + grpo_kwargs["disable_tqdm"] = False + + grpo_config = GRPOConfig(**grpo_kwargs) + + # ── 5. Per-role reward logger ───────────────────────────────────────────── + print("\n[4/5] Setting up per-role reward logging...") + + # Curriculum generator: receives real GRPO group rewards so the adaptive + # curriculum can trigger rescue mode and tier changes based on actual training + # performance rather than the simulated scores used during dataset building. + curriculum_generator = ChallengeGenerator(seed=seed) + + # Separate lists so we can show per-role curves in the demo + reward_log: Dict[str, List[float]] = { + "AMAN": [], "DMAN": [], "GENERATOR": [], "SUPERVISOR": [], "ADAPT": [], "composite": [] + } + parse_log: Dict[str, List[int]] = { + "AMAN": [], "DMAN": [], "GENERATOR": [], "SUPERVISOR": [], "ADAPT": [] + } + fallback_log: Dict[str, List[int]] = { + "AMAN": [], "DMAN": [], "GENERATOR": [], "SUPERVISOR": [], "ADAPT": [] + } + overflow_log: Dict[str, List[int]] = { + "AMAN": [], "DMAN": [], "GENERATOR": [], "SUPERVISOR": [], "ADAPT": [] + } + parse_fail_samples: Dict[str, str] = {} + parse_fail_counts: Dict[str, int] = { + "AMAN": 0, "DMAN": 0, "GENERATOR": 0, "SUPERVISOR": 0, "ADAPT": 0 + } + reward_call_count = 0 + # Per-tier reward accumulator for ZPD logging + tier_reward_log: Dict[int, List[float]] = {i: [] for i in range(5)} + + class RewardLogger: + __name__ = "combined_reward_fn" + + def __call__(self, *args, **kwargs): + nonlocal reward_call_count + # TRL <0.17: reward_func(completions=..., **kwargs) + # TRL >=0.17: reward_func(prompts, completions, **kwargs) + if "completions" in kwargs: + completions = kwargs.pop("completions") + elif len(args) >= 2: + completions = args[1] + elif args: + completions = args[0] + else: + completions = [] + kwargs.pop("prompts", None) + kwargs.pop("prompt_ids", None) + + # Some TRL versions pass conversational turns. Extract the assistant text. + if completions and isinstance(completions[0], list): + flattened = [] + for c in completions: + if c and isinstance(c[-1], dict) and "content" in c[-1]: + flattened.append(c[-1]["content"]) + else: + flattened.append(str(c)) + completions = flattened + + rewards = combined_reward_fn(completions, **kwargs) + reward_call_count += 1 + + # ── Degenerate-group detection + live curriculum update ──────────── + # When all N_GENERATIONS completions in a group have near-identical + # rewards, std(group) ≈ 0 and GRPO produces zero gradient. + # Two common causes: + # (a) All-wrong: task too hard — every completion parse-fails. + # (b) All-right: task too easy — every completion is correct. + # We pass real group rewards into the curriculum generator so it can + # trigger rescue mode (all-wrong) or advance tier (all-right) based + # on actual training performance, not the simulated scores used during + # dataset building. (Research: VCRL arXiv 2509.19803, DAPO 2025) + if len(rewards) >= 2: + import statistics as _stats + try: + grp_std = _stats.stdev(rewards) + except _stats.StatisticsError: + grp_std = 0.0 + grp_mean = sum(rewards) / len(rewards) + # Feed every group into the curriculum generator (not just degenerate ones) + curriculum_generator.update(grp_mean, rewards) + if grp_std < 0.01: + mode_tag = "ALL-WRONG" if grp_mean < -0.3 else "ALL-CORRECT" + if reward_call_count % 20 == 0: + print( + f"[ZPD_WARN] {mode_tag} group detected " + f"(std={grp_std:.4f}, mean={grp_mean:.3f}) " + f"at call={reward_call_count}. " + f"{curriculum_generator.curriculum_summary()}" + ) + + # ── Per-tier reward accumulation ────────────────────────────────── + tier = kwargs.get("curriculum_tier", [curriculum_generator.current_tier] * len(rewards)) + if not isinstance(tier, list): + tier = [tier] * len(rewards) + for r, t in zip(rewards, tier): + t_int = int(t) if isinstance(t, (int, float)) else curriculum_generator.current_tier + tier_reward_log[t_int].append(r) + + roles = kwargs.get("agent_role", []) + if not isinstance(roles, list): + roles = [roles] * len(rewards) + elif len(roles) < len(rewards): + roles = roles + [ + roles[-1] if roles else AgentRole.AMAN.value + ] * (len(rewards) - len(roles)) + + def _is_parse_ok(role: str, completion: Any) -> int: + if role == AgentRole.AMAN.value: + return 1 if parse_aman_action(completion) is not None else 0 + if role == AgentRole.DMAN.value: + return 1 if parse_dman_action(completion) is not None else 0 + if role == AgentRole.GENERATOR.value: + return 1 if parse_generator_action(completion) is not None else 0 + if role == AgentRole.SUPERVISOR.value: + text = str(completion) + if re.search(r'"score"\s*:\s*-?\d+(?:\.\d+)?', text): + return 1 + return 0 + if role == AgentRole.ADAPT.value: + from multi_agent.adapt import parse_adapt_action + return 1 if parse_adapt_action(completion) is not None else 0 + return 0 + + def _is_fallback(role: str, parse_ok: int, reward_value: float) -> int: + if role in (AgentRole.AMAN.value, AgentRole.DMAN.value): + return 0 if parse_ok else 1 + if role == AgentRole.ADAPT.value: + return 0 if parse_ok else 1 + if role == AgentRole.GENERATOR.value: + return 1 if reward_value <= -0.49 else 0 + if role == AgentRole.SUPERVISOR.value: + return 1 if reward_value <= -0.49 else 0 + return 0 + + def _overflow(role: str, completion: Any) -> int: + budget = ROLE_MAX_NEW_TOKENS.get(role, max_new_tokens) + approx_tokens = len(str(completion).split()) + return 1 if approx_tokens > budget else 0 + + for completion, r, role in zip(completions, rewards, roles): + parse_ok = _is_parse_ok(role, completion) + if role in reward_log: + reward_log[role].append(r) + if role in parse_log: + parse_log[role].append(parse_ok) + if role in fallback_log: + fallback_log[role].append(_is_fallback(role, parse_ok, float(r))) + if role in overflow_log: + overflow_log[role].append(_overflow(role, completion)) + if role in parse_fail_counts and parse_ok == 0: + parse_fail_counts[role] += 1 + if role in (AgentRole.AMAN.value, AgentRole.DMAN.value, AgentRole.ADAPT.value): + txt = re.sub(r"\s+", " ", str(completion)).strip() + parse_fail_samples[role] = txt[:220] + reward_log["composite"].append(r) + + # Reward-hacking detection: warn when composite rises but per-role variance + # collapses (all roles getting same score = likely gaming) + if len(reward_log["composite"]) % 50 == 0 and len(reward_log["composite"]) > 50: + _check_reward_hacking(reward_log) + if reward_call_count % 25 == 0: + for role in (AgentRole.AMAN.value, AgentRole.DMAN.value, AgentRole.ADAPT.value): + sample = parse_fail_samples.get(role) + if sample: + print( + f"[PARSE_FAIL_SAMPLE] role={role} count={parse_fail_counts[role]} " + f"sample='{sample}'" + ) + + return rewards + + reward_logger = RewardLogger() + + # ── 6. Train ────────────────────────────────────────────────────────────── + print("\n[5/5] Starting GRPO training...") + trainer_kwargs: Dict[str, Any] = { + "model": model, + "processing_class": tokenizer, + "reward_funcs": [reward_logger], + "train_dataset": stage_datasets.get("stage_a"), + } + if _trainer_supports("args", GRPOTrainer): + trainer_kwargs["args"] = grpo_config + else: + trainer_kwargs["config"] = grpo_config + + trainer = GRPOTrainer(**trainer_kwargs) + + def _print_live_metrics(args, state, logs=None, *, prefix: str = "[LIVE]") -> None: + """One stdout line of trainer + reward tail stats (used each log step and each epoch).""" + logs = logs or {} + if prefix == "[LIVE]" and not logs: + return + step = int(logs.get("step", getattr(state, "global_step", 0)) or 0) + max_steps = int(getattr(state, "max_steps", 0) or 0) + loss = logs.get("loss") + lr = logs.get("learning_rate") + + def _avg_last(key: str, window: int = 64) -> float: + vals = reward_log.get(key, []) + if not vals: + return float("nan") + tail = vals[-min(window, len(vals)) :] + return sum(tail) / max(1, len(tail)) + + def _fmt(v: float) -> str: + return "n/a" if v != v else f"{v:.3f}" + + def _parse_rate(role: str, window: int = 64) -> float: + vals = parse_log.get(role, []) + if not vals: + return float("nan") + tail = vals[-min(window, len(vals)) :] + return sum(tail) / max(1, len(tail)) + + def _tail_rate(store: Dict[str, List[int]], role: str, window: int = 64) -> float: + vals = store.get(role, []) + if not vals: + return float("nan") + tail = vals[-min(window, len(vals)) :] + return sum(tail) / max(1, len(tail)) + + comp = _avg_last("composite") + aman = _avg_last("AMAN") + dman = _avg_last("DMAN") + gen = _avg_last("GENERATOR") + sup = _avg_last("SUPERVISOR") + adapt_r = _avg_last("ADAPT") + p_aman = _parse_rate("AMAN") + p_dman = _parse_rate("DMAN") + p_gen = _parse_rate("GENERATOR") + p_sup = _parse_rate("SUPERVISOR") + p_adapt = _parse_rate("ADAPT") + f_aman = _tail_rate(fallback_log, "AMAN") + f_dman = _tail_rate(fallback_log, "DMAN") + f_adapt = _tail_rate(fallback_log, "ADAPT") + o_aman = _tail_rate(overflow_log, "AMAN") + o_dman = _tail_rate(overflow_log, "DMAN") + o_adapt = _tail_rate(overflow_log, "ADAPT") + print( + f"{prefix} " + f"step={step}/{max_steps} " + f"loss={loss if loss is not None else 'n/a'} " + f"lr={lr if lr is not None else 'n/a'} " + f"comp64={_fmt(comp)} AMAN={_fmt(aman)} DMAN={_fmt(dman)} " + f"ADAPT={_fmt(adapt_r)} GEN={_fmt(gen)} SUP={_fmt(sup)} " + f"parse64[A={_fmt(p_aman)} D={_fmt(p_dman)} T={_fmt(p_adapt)} G={_fmt(p_gen)} S={_fmt(p_sup)}] " + f"fb64[A={_fmt(f_aman)} D={_fmt(f_dman)} T={_fmt(f_adapt)}] " + f"ovf64[A={_fmt(o_aman)} D={_fmt(o_dman)} T={_fmt(o_adapt)}]", + flush=True, + ) + + class LiveMetricsCallback(TrainerCallback): + """Stream concise live metrics into notebook/stdout while training.""" + + def on_log(self, args, state, control, logs=None, **kwargs): + _print_live_metrics(args, state, logs, prefix="[LIVE]") + + def on_epoch_end(self, args, state, control, **kwargs): + ep = float(getattr(state, "epoch", 0.0) or 0.0) + gs = int(getattr(state, "global_step", 0) or 0) + hist = list(getattr(state, "log_history", []) or []) + last = hist[-1] if hist else {} + loss = last.get("loss") + lr = last.get("learning_rate") + loss_s = f"{loss:.4f}" if isinstance(loss, (int, float)) else str(loss) + lr_s = f"{lr:.2e}" if isinstance(lr, (int, float)) else str(lr) + print( + f"\n{'='*60}\n" + f" [GRPO] EPOCH END epoch={ep:.2f} global_step={gs}\n" + f" last_log: loss={loss_s} lr={lr_s}\n" + f"{'='*60}", + flush=True, + ) + _print_live_metrics(args, state, last, prefix="[GRPO EPOCH]") + + if hasattr(trainer, "add_callback"): + live_cb = LiveMetricsCallback() + # Fail fast before trainer.train() if callback API is incompatible. + missing = [name for name in ("on_train_begin", "on_log", "on_train_end") if not hasattr(live_cb, name)] + if missing: + raise RuntimeError( + "LiveMetricsCallback is incompatible with Trainer API; " + f"missing methods: {missing}" + ) + trainer.add_callback(live_cb) + + # ── CRITICAL: Apply ALL compatibility patches BEFORE any training ── + _maybe_patch_trainer_sampler(trainer) + _maybe_patch_unsloth_grad_accum(trainer) + _maybe_patch_unsloth_loss_type(trainer) + _maybe_patch_unsloth_runtime_attrs(trainer) + _maybe_patch_unsloth_args_attrs(trainer) + _maybe_patch_nanmin_symbols() + + # ── ADD THIS: Extra safety check for any remaining missing attrs ── + # Some Unsloth compiled paths access these directly on the trainer + _safety_attrs = { + "importance_sampling_level": "token", + "epsilon_low": 0.2, + "epsilon_high": 0.2, + "vllm_importance_sampling_cap": 2.0, + "current_gradient_accumulation_steps": getattr(trainer, "current_gradient_accumulation_steps", 1), + } + for attr, default in _safety_attrs.items(): + if not hasattr(trainer, attr): + setattr(trainer, attr, default) + print(f"[SAFETY] Added missing trainer.{attr} = {default!r}") + + # ── ADD THIS: Delete stale compiled cache so Unsloth rebuilds with patched attrs ── + import shutil + compiled_cache_dirs = [ + Path.cwd() / "unsloth_compiled_cache", + Path.home() / ".cache" / "unsloth" / "compiled_cache", + ] + for cache_dir in compiled_cache_dirs: + if cache_dir.exists(): + shutil.rmtree(cache_dir, ignore_errors=True) + print(f"[INFO] Deleted stale compiled cache: {cache_dir}") + + strict_gates = os.getenv("ATC_STRICT_GATES", "1").strip().lower() in {"1", "true", "yes", "on"} + # Stage-A parse abort is opt-in: short Colab runs + mixed ADAPT batches rarely hit 0.75 DMAN in one stage. + strict_parse_gate = os.getenv("ATC_STRICT_PARSE_GATE", "0").strip().lower() in { + "1", "true", "yes", "on", + } + se_scale = max(0.01, min(4.0, float(stage_epoch_scale))) + stage_sequence = ["stage_a", "stage_b", "stage_c"] + stage_a_retries = 0 + # Treat high domain ratio like adapt_focus for thresholds (even if --adapt_focus was omitted). + mixed_stage_a = bool(adapt_focus) or float(domain_episode_ratio) >= 0.25 + quick_run = se_scale < 0.5 + + def _safe_float(v: Any, default: float = 0.0) -> float: + try: + return float(v) + except Exception: + return default + + def _optimization_gates() -> Dict[str, float]: + history = list(getattr(getattr(trainer, "state", None), "log_history", []) or []) + reward_std_vals = [ + _safe_float(entry.get("reward_std"), 0.0) + for entry in history + if "reward_std" in entry + ] + clip_vals = [ + _safe_float(entry.get("clip_ratio/region_mean"), 0.0) + for entry in history + if "clip_ratio/region_mean" in entry + ] + clip_nonzero_frac = ( + sum(1 for v in clip_vals if v > 1e-8) / max(1, len(clip_vals)) + if clip_vals else 0.0 + ) + reward_std_med = ( + sorted(reward_std_vals)[len(reward_std_vals) // 2] + if reward_std_vals else 0.0 + ) + return {"clip_nonzero_frac": clip_nonzero_frac, "reward_std_median": reward_std_med} + + for stage_name in stage_sequence: + ds = stage_datasets.get(stage_name) + if ds is None or len(ds) == 0: + continue + if hasattr(trainer, "train_dataset"): + trainer.train_dataset = ds + if hasattr(trainer, "_train_dataloader"): + trainer._train_dataloader = None + if hasattr(trainer, "args"): + trainer.args.num_train_epochs = STAGE_EPOCHS.get(stage_name, 0.25) * se_scale + print( + f"\n[STAGE] {stage_name} samples={len(ds)} " + f"epochs={getattr(getattr(trainer, 'args', None), 'num_train_epochs', 'n/a')}" + ) + trainer.train() + + parse_gates = _parse_quality_gates(parse_log, fallback_log) + opt_gates = _optimization_gates() + print( + f"[GATE] {stage_name} " + f"parseA={parse_gates['parse_aman']:.3f} parseD={parse_gates['parse_dman']:.3f} " + f"fbA={parse_gates['fallback_aman']:.3f} fbD={parse_gates['fallback_dman']:.3f} " + f"clipNonZero={opt_gates['clip_nonzero_frac']:.3f} " + f"rewardStdMed={opt_gates['reward_std_median']:.4f}" + ) + + if stage_name == "stage_a": + # Softer retry trigger when stage_a mixes ADAPT or when epochs are scaled down. + if mixed_stage_a or quick_run: + retry_bar_a, retry_bar_d = 0.72, 0.72 + else: + retry_bar_a, retry_bar_d = 0.85, 0.85 + parse_ok = ( + parse_gates["parse_aman"] >= retry_bar_a + and parse_gates["parse_dman"] >= retry_bar_d + ) + if not parse_ok and stage_a_retries < 1: + stage_a_retries += 1 + if hasattr(trainer, "args"): + trainer.args.num_train_epochs = 0.20 * se_scale + print("[GATE] Stage A parse gate missed; running one extra controller-only pass.") + trainer.train() + parse_gates = _parse_quality_gates(parse_log, fallback_log) + print( + f"[GATE] stage_a_retry parseA={parse_gates['parse_aman']:.3f} " + f"parseD={parse_gates['parse_dman']:.3f}" + ) + # Abort only if ATC_STRICT_PARSE_GATE=1 (see banner at train() start). + if mixed_stage_a or quick_run: + req_a, req_d = 0.68, 0.42 + else: + req_a, req_d = 0.75, 0.75 + pa, pd = parse_gates["parse_aman"], parse_gates["parse_dman"] + if pa < req_a or pd < req_d: + print( + f"[WARN] Stage A parse tail: AMAN={pa:.3f} (guide {req_a:.2f}), " + f"DMAN={pd:.3f} (guide {req_d:.2f}) — " + "continuing (stages B/C add more controller steps). " + "To hard-fail here: export ATC_STRICT_PARSE_GATE=1." + ) + if strict_gates and strict_parse_gate and not (pa >= req_a and pd >= req_d): + raise RuntimeError( + "Parse gate failed after Stage A (ATC_STRICT_PARSE_GATE=1): " + f"AMAN={pa:.3f}, DMAN={pd:.3f}" + ) + # Short / mixed curricula often lack stable clip stats — skip when adapt_focus or very fast stages. + if strict_gates and not adapt_focus and se_scale >= 0.35 and ( + opt_gates["clip_nonzero_frac"] < 0.20 + or opt_gates["reward_std_median"] < 0.02 + ): + raise RuntimeError( + f"Optimization gate failed in {stage_name}: " + f"clip_nonzero_frac={opt_gates['clip_nonzero_frac']:.3f}, " + f"reward_std_median={opt_gates['reward_std_median']:.4f}" + ) + if strict_gates and adapt_focus and se_scale >= 0.35 and ( + opt_gates["clip_nonzero_frac"] < 0.20 + or opt_gates["reward_std_median"] < 0.02 + ): + print( + f"[WARN] Optimization gate soft (adapt_focus): " + f"clip_nonZero={opt_gates['clip_nonzero_frac']:.3f}, " + f"rewardStdMed={opt_gates['reward_std_median']:.4f} — continuing." + ) + + # ── Save ────────────────────────────────────────────────────────────────── + print(f"\nSaving model to {output_dir}...") + trainer.save_model(output_dir) + tokenizer.save_pretrained(output_dir) + + curves_path = Path(output_dir) / "reward_curves.json" + _save_json(reward_log, curves_path) + print(f"Reward curves -> {curves_path}") + + # Save per-tier reward summary and curriculum state + tier_summary = { + str(tier): { + "n_samples": len(rws), + "mean": round(sum(rws) / len(rws), 4) if rws else None, + "first_q": round(sum(rws[:max(1, len(rws)//4)]) / max(1, len(rws)//4), 4) if rws else None, + "last_q": round(sum(rws[max(0,3*len(rws)//4):]) / max(1, len(rws)-3*len(rws)//4), 4) if rws else None, + } + for tier, rws in tier_reward_log.items() + } + tier_curves_path = Path(output_dir) / "tier_reward_summary.json" + _save_json(tier_summary, tier_curves_path) + + curriculum_report = curriculum_generator.mastery_report() + _save_json(curriculum_report, Path(output_dir) / "curriculum_state.json") + + print("\n── Curriculum Summary ──────────────────────────────────────") + print(curriculum_generator.curriculum_summary()) + print("Per-tier mean rewards:") + for tier, stats in tier_summary.items(): + if stats["n_samples"] > 0: + print(f" Tier {tier}: n={stats['n_samples']} mean={stats['mean']} " + f"first_q={stats['first_q']} last_q={stats['last_q']}") + print("────────────────────────────────────────────────────────────\n") + + _print_final_stats(reward_log) + + # ── Post-training eval ──────────────────────────────────────────────────── + if run_eval: + print("\n[Post] Measuring trained model score...") + FastLanguageModel.for_inference(model) # fuse LoRA weights for faster generation + trained_model_metrics = _run_model_episodes( + model, tokenizer, n_episodes=eval_episodes, tag="TRAINED MODEL" + ) + trained_adapt = _run_adapt_domain_eval( + model, tokenizer, n_episodes=_aes, tag="TRAINED ADAPT (domain pipeline)" + ) + trained_model_metrics = _merge_adapt_eval(trained_model_metrics, trained_adapt) + _save_json(trained_model_metrics, Path(output_dir) / "trained_model_metrics.json") + if base_model_metrics is not None: + _plot_payload = { + "base": _plot_payload_from_metrics(base_model_metrics), + "trained": _plot_payload_from_metrics(trained_model_metrics), + } + _save_json(_plot_payload, Path(output_dir) / "grpo_before_after.json") + _print_improvement(base_model_metrics, trained_model_metrics) + delta_comp = float(trained_model_metrics.get("mean_composite", 0.0)) - float( + base_model_metrics.get("mean_composite", 0.0) + ) + delta_aman = float(trained_model_metrics.get("mean_aman_reward", 0.0)) - float( + base_model_metrics.get("mean_aman_reward", 0.0) + ) + delta_dman = float(trained_model_metrics.get("mean_dman_reward", 0.0)) - float( + base_model_metrics.get("mean_dman_reward", 0.0) + ) + delta_adapt = float(trained_model_metrics.get("mean_adapt_pipeline_composite", 0.0)) - float( + base_model_metrics.get("mean_adapt_pipeline_composite", 0.0) + ) + print( + f"[GATE] quality delta_comp={delta_comp:+.3f} " + f"delta_aman={delta_aman:+.3f} delta_dman={delta_dman:+.3f} " + f"delta_adapt={delta_adapt:+.3f}" + ) + if strict_gates and not adapt_focus and not ( + delta_comp >= 0.0 and (delta_aman > 0.0 or delta_dman > 0.0) + ): + raise RuntimeError( + "Quality gate failed: expected non-negative composite delta and at least one " + "controller reward improvement." + ) + else: + # Fallback: compare heuristic baseline vs trained model + _print_improvement( + {**baseline, "tag": "HEURISTIC BASELINE"}, + {**trained_model_metrics, "tag": "TRAINED MODEL"}, + ) + + if push_to_hub and hub_model_id: + print(f"\nPushing to Hub: {hub_model_id}") + trainer.push_to_hub(hub_model_id) + + return trainer + + +# ── Quick heuristic eval (no LLM needed — uses planner baseline) ────────────── + +def _quick_heuristic_eval(n_episodes: int = 6) -> Dict[str, Any]: + """Run heuristic-only multi-agent episodes (client=None → deterministic planner). + + Uses run_episode so metrics are AMAN/DMAN rewards from the real multi-agent + environment — not single-agent grades. Same format as _run_model_episodes so + _print_improvement can compare them directly. + """ + from multi_agent.inference import run_episode as _run_ep + + env = MultiAgentATCEnvironment(seed=99) + sup = SupervisorAgent() + + # Fixed task list — no generator mutations for a stable repeatable baseline + eval_tasks = ["delhi_monsoon_recovery_easy", "bengaluru_irrops_hard"] + + composites, aman_rews, dman_rews, conflict_list, emg_list = [], [], [], [], [] + + for ep in range(n_episodes): + task_id = eval_tasks[ep % len(eval_tasks)] + try: + r = _run_ep( + task_id = task_id, + client = None, # heuristic mode — no LLM + env = env, + generator = None, + supervisor = sup, + episode_id = ep, + use_generator= False, + ) + composites.append(float(r.get("composite", 0))) + aman_rews.append(float(r.get("aman_reward", 0))) + dman_rews.append(float(r.get("dman_reward", 0))) + conflict_list.append(int(r.get("conflicts", 0))) + emg_list.append(int(r.get("emg_arr_ok", 0)) + int(r.get("emg_dep_ok", 0))) + except Exception as exc: + print(f" [WARN] Heuristic eval ep {ep} failed: {exc}") + + def _mean(lst: list) -> float: + return round(sum(lst) / max(1, len(lst)), 3) if lst else 0.0 + + return { + "tag": "HEURISTIC BASELINE", + "n_episodes": n_episodes, + "mean_composite": _mean(composites), + "mean_aman_reward": _mean(aman_rews), + "mean_dman_reward": _mean(dman_rews), + "mean_conflicts": _mean(conflict_list), + "mean_emg_handled": _mean(emg_list), + "scores": [round(s, 3) for s in composites], + } + + +def _print_improvement( + before: Dict[str, Any], after: Dict[str, Any] +) -> None: + tag_b = before.get("tag", "BEFORE") + tag_a = after.get("tag", "AFTER") + rows = [ + ("mean_composite", "Composite score"), + ("mean_aman_reward", "AMAN reward"), + ("mean_dman_reward", "DMAN reward"), + ("mean_adapt_pipeline_composite", "ADAPT pipeline (domain→ATC)"), + ("mean_conflicts", "Avg conflicts"), + ("mean_emg_handled", "Emg handled"), + ] + width = 56 + print(f"\n{'='*width}") + print(f" BEFORE vs AFTER TRAINING") + print(f" {tag_b!r:24s} → {tag_a!r}") + print(f"{'='*width}") + for key, label in rows: + if key == "mean_adapt_pipeline_composite" and "mean_adapt_pipeline_composite" not in before and "mean_adapt_pipeline_composite" not in after: + continue + bv = before.get(key, 0.0) + av = after.get(key, 0.0) + if isinstance(bv, dict): + continue + if isinstance(av, dict): + continue + delta = float(av) - float(bv) + arrow = "↑" if delta > 0.005 else ("↓" if delta < -0.005 else "→") + sign = "+" if delta >= 0 else "" + print(f" {label:20s}: {float(bv):6.3f} → {float(av):6.3f} ({sign}{delta:.3f} {arrow})") + print(f"{'='*width}") + + +# ── Local model client for in-process inference eval ────────────────────────── + +class _LocalModelClient: + """Duck-type OpenAI client wrapping a locally loaded Unsloth/PEFT model.""" + + def __init__(self, model, tokenizer): + self._model = model + self._tokenizer = tokenizer + if hasattr(self._model, "generation_config") and self._model.generation_config is not None: + self._model.generation_config.max_length = None + + def _create(self, *, model=None, messages, temperature=0.3, max_tokens=MAX_NEW_TOKENS, **kw): + import torch + prompt = self._tokenizer.apply_chat_template( + messages, tokenize=False, add_generation_prompt=True + ) + inputs = self._tokenizer(prompt, return_tensors="pt").to(self._model.device) + use_cuda = torch.cuda.is_available() and str(self._model.device).startswith("cuda") + cast_dtype = torch.bfloat16 if torch.cuda.is_bf16_supported() else torch.float16 + with torch.no_grad(): + if use_cuda: + with torch.autocast(device_type="cuda", dtype=cast_dtype): + out = self._model.generate( + **inputs, + max_new_tokens=min(int(max_tokens), MAX_NEW_TOKENS), + temperature=max(float(temperature), 0.01), + do_sample=float(temperature) > 0.01, + pad_token_id=self._tokenizer.eos_token_id, + ) + else: + out = self._model.generate( + **inputs, + max_new_tokens=min(int(max_tokens), MAX_NEW_TOKENS), + temperature=max(float(temperature), 0.01), + do_sample=float(temperature) > 0.01, + pad_token_id=self._tokenizer.eos_token_id, + ) + text = self._tokenizer.decode( + out[0][inputs["input_ids"].shape[1]:], skip_special_tokens=True + ) + + class _Msg: + content = text + class _Choice: + message = _Msg() + class _Resp: + choices = [_Choice()] + + return _Resp() + + @property + def chat(self): + _self = self + class _Comp: + def create(self, **kw): + return _self._create(**kw) + class _Chat: + completions = _Comp() + return _Chat() + + +def _run_model_episodes( + model, + tokenizer, + n_episodes: int = 3, + tag: str = "MODEL", + use_generator: bool = False, +) -> Dict[str, Any]: + """Run multi-agent episodes using an in-process model client. + + use_generator=False keeps tasks fixed so base and trained models + see identical scenarios — essential for a fair comparison. + """ + from multi_agent.inference import run_episode as _run_ep + + client = _LocalModelClient(model, tokenizer) + env = MultiAgentATCEnvironment(seed=77) + gen = ChallengeGenerator(seed=77) + sup = SupervisorAgent() + + # Two representative tasks: one easy, one hard + eval_tasks = ["delhi_monsoon_recovery_easy", "bengaluru_irrops_hard"] + + composites, aman_rews, dman_rews, conflict_list, emg_list = [], [], [], [], [] + + for ep in range(n_episodes): + task_id = eval_tasks[ep % len(eval_tasks)] + try: + r = _run_ep( + task_id=task_id, + client=client, + env=env, + generator=gen if use_generator else None, + supervisor=sup, + episode_id=ep, + use_generator=use_generator, + model_name="local", + ) + composites.append(float(r.get("composite", 0))) + aman_rews.append(float(r.get("aman_reward", 0))) + dman_rews.append(float(r.get("dman_reward", 0))) + conflict_list.append(int(r.get("conflicts", 0))) + emg_list.append( + int(r.get("emg_arr_ok", 0)) + int(r.get("emg_dep_ok", 0)) + ) + except Exception as exc: + print(f" [WARN] model eval episode {ep} failed: {exc}") + + def _m(lst: list) -> float: + return round(sum(lst) / max(1, len(lst)), 3) if lst else 0.0 + + return { + "tag": tag, + "n_episodes": n_episodes, + "mean_composite": _m(composites), + "mean_aman_reward": _m(aman_rews), + "mean_dman_reward": _m(dman_rews), + "mean_conflicts": _m(conflict_list), + "mean_emg_handled": _m(emg_list), + "scores": [round(s, 3) for s in composites], + } + + +def _merge_adapt_eval(core: Dict[str, Any], adapt_block: Dict[str, Any]) -> Dict[str, Any]: + """Attach ADAPT domain-pipeline metrics (end-to-end composite after domain→ATC).""" + out = {**core} + m = float(adapt_block.get("mean_composite", 0.0) or 0.0) + out["mean_adapt_pipeline_composite"] = round(m, 3) + out["adapt_eval_tag"] = adapt_block.get("tag", "") + out["adapt_by_domain"] = adapt_block.get("by_domain", {}) + return out + + +def _run_adapt_domain_eval( + model, + tokenizer, + n_episodes: int, + tag: str, +) -> Dict[str, Any]: + """Evaluate ADAPT on registered domain tasks (cycles tasks for coverage).""" + from multi_agent.inference import run_domain_episode + from domains import get_all_domain_tasks + + client = _LocalModelClient(model, tokenizer) + env = MultiAgentATCEnvironment(seed=123) + sup = SupervisorAgent() + tasks = get_all_domain_tasks() + if not tasks: + return { + "tag": tag, + "n_episodes": 0, + "mean_composite": 0.0, + "mean_aman_reward": 0.0, + "mean_dman_reward": 0.0, + "by_domain": {}, + "scores": [], + } + + ids = sorted(tasks.keys()) + composites, aman_rews, dman_rews = [], [], [] + by_domain: Dict[str, float] = {} + n = max(1, int(n_episodes)) + for ep in range(n): + tid = ids[ep % len(ids)] + try: + r = run_domain_episode( + tid, client, env, sup, ep, model_name="local", + ) + c = float(r.get("composite", 0.0)) + a = float(r.get("aman_reward", 0.0)) + d = float(r.get("dman_reward", 0.0)) + composites.append(c) + aman_rews.append(a) + dman_rews.append(d) + by_domain[tid] = c + except Exception as exc: + print(f" [WARN] {tag} adapt eval ep={ep} task={tid}: {exc}") + + def _m(lst: list) -> float: + return round(sum(lst) / max(1, len(lst)), 3) if lst else 0.0 + + return { + "tag": tag, + "n_episodes": len(composites), + "mean_composite": _m(composites), + "mean_aman_reward": _m(aman_rews), + "mean_dman_reward": _m(dman_rews), + "by_domain": by_domain, + "scores": [round(s, 3) for s in composites], + } + + +def _plot_payload_from_metrics(m: Dict[str, Any]) -> Dict[str, float]: + """Normalize metrics for training/plot_rewards.py bar chart.""" + mc = float(m.get("mean_composite", 0.0) or 0.0) + return { + "mean_composite": mc, + "mean_aman": float(m.get("mean_aman_reward", 0.0) or 0.0), + "mean_dman": float(m.get("mean_dman_reward", 0.0) or 0.0), + "mean_coord": 0.0, + "mean_adapt": float(m.get("mean_adapt_pipeline_composite", 0.0) or 0.0), + "success_rate": round(sum(1 for s in m.get("scores", []) if float(s) >= 0.60) / max(1, len(m.get("scores", []))), 3), + } + + +# ── Utilities ───────────────────────────────────────────────────────────────── + +def _wandb_available() -> bool: + try: + import wandb + return True + except ImportError: + return False + + +def _save_json(data: Any, path: Path) -> None: + path.parent.mkdir(parents=True, exist_ok=True) + with open(path, "w") as f: + json.dump(data, f, indent=2) + + +def _check_reward_hacking(reward_log: Dict[str, List[float]]) -> None: + """Warn when mean composite rises but role rewards collapse (gaming signal).""" + comp = reward_log["composite"] + if len(comp) < 100: + return + recent_50 = comp[-50:] + earlier_50 = comp[-100:-50] + mean_recent = sum(recent_50) / 50 + mean_earlier = sum(earlier_50) / 50 + if mean_recent > mean_earlier + 0.1: + # Check if any role's recent std collapsed (< 0.05 = suspiciously uniform) + for role in ("AMAN", "DMAN"): + rs = reward_log.get(role, []) + if len(rs) >= 20: + recent = rs[-20:] + mean_r = sum(recent) / len(recent) + std_r = (sum((x - mean_r) ** 2 for x in recent) / len(recent)) ** 0.5 + if std_r < 0.05: + print( + f"[WARN] Possible reward hacking: {role} std={std_r:.4f} " + f"while composite reward is rising. Sample outputs and inspect." + ) + + +def _print_final_stats(reward_log: Dict[str, List[float]]) -> None: + print("\n=== TRAINING REWARD SUMMARY ===") + for role, rewards in reward_log.items(): + if not rewards: + continue + n = len(rewards) + first_q = rewards[:max(1, n // 4)] + last_q = rewards[max(0, 3 * n // 4):] + mean_all = sum(rewards) / n + mean_first = sum(first_q) / len(first_q) + mean_last = sum(last_q) / len(last_q) + trend = "↑" if mean_last > mean_first + 0.05 else ( + "↓" if mean_last < mean_first - 0.05 else "→" + ) + print( + f" {role:12s}: mean={mean_all:.3f} | " + f"first_q={mean_first:.3f} -> last_q={mean_last:.3f} {trend}" + ) + + +# ── Evaluation loop ─────────────────────────────────────────────────────────── + +def evaluate(model_name_or_path: str, n_episodes: int = 20, seed: int = 99) -> Dict[str, Any]: + """Run trained model on evaluation episodes.""" + torch, FastLanguageModel, _, _ = _require_training_deps() + _configure_runtime_warnings() + + print(f"\nEvaluating {model_name_or_path} on {n_episodes} episodes...") + model_source = _prefer_local_model_path(model_name_or_path) + model, tokenizer = _load_model_with_fallback( + FastLanguageModel, + model_source, + max_seq_length=MAX_SEQ_LEN, + ) + if hasattr(model, "generation_config") and model.generation_config is not None: + model.generation_config.max_length = None + FastLanguageModel.for_inference(model) + + import random + from training.dataset import AMAN_SYSTEM, DMAN_SYSTEM, SUPERVISOR_PROFILES + + env = MultiAgentATCEnvironment(seed=seed) + generator = ChallengeGenerator(seed=seed) + supervisor = SupervisorAgent() + task_list = list(ordered_tasks()) + rng = random.Random(seed) + + results: Dict[str, List] = { + "aman_rewards": [], "dman_rewards": [], "composite_scores": [], + "conflict_counts": [], "coordination_scores": [], + "generator_difficulty": [], + } + + for ep in range(n_episodes): + base_task = rng.choice(task_list) + profile = supervisor.sample_profile(ep) + mutated, is_solvable = generator.mutate(base_task) + + aman_obs, dman_obs = env.reset(episode_id=ep, mutated_task=mutated) + sup_desc = SUPERVISOR_PROFILES[profile]["description"] + + def _chat(system, user): + msgs = [{"role": "system", "content": system}, {"role": "user", "content": user}] + return tokenizer.apply_chat_template(msgs, tokenize=False, add_generation_prompt=True) + + def _gen(prompt): + import torch as _torch + inputs = tokenizer(prompt, return_tensors="pt").to(model.device) + with _torch.no_grad(): + out = model.generate( + **inputs, max_new_tokens=MAX_NEW_TOKENS, + temperature=TEMPERATURE, do_sample=True, + pad_token_id=tokenizer.eos_token_id, + ) + return tokenizer.decode(out[0][inputs["input_ids"].shape[1]:], skip_special_tokens=True) + + aman_comp = _gen(_chat(AMAN_SYSTEM + f"\n\nSUPERVISOR: {sup_desc}", aman_obs.to_prompt_text())) + dman_comp = _gen(_chat(DMAN_SYSTEM + f"\n\nSUPERVISOR: {sup_desc}", dman_obs.to_prompt_text())) + + aman_action = parse_aman_action(aman_comp) + dman_action = parse_dman_action(dman_comp) + if not aman_action or not dman_action: + continue + + aman_obs, dman_obs, _, done = env.step_bid(aman_action, dman_action) + if not done: + env.step_negotiate(aman_action, dman_action) + + result = env.finalize() + generator.update(result.composite_score) + + results["aman_rewards"].append(result.aman_reward) + results["dman_rewards"].append(result.dman_reward) + results["composite_scores"].append(result.composite_score) + results["conflict_counts"].append(result.per_role.cross_lane_conflicts) + results["coordination_scores"].append(result.per_role.coordination_score) + results["generator_difficulty"].append(generator.difficulty_level) + + print( + f" ep{ep:3d} | composite={result.composite_score:.3f} | " + f"AMAN={result.aman_reward:.3f} | DMAN={result.dman_reward:.3f} | " + f"coord={result.per_role.coordination_score:.3f} | " + f"gen_lvl={generator.difficulty_level}" + ) + + def _mean(lst): + return round(sum(lst) / max(1, len(lst)), 3) + + summary = { + "mean_composite": _mean(results["composite_scores"]), + "mean_aman_reward": _mean(results["aman_rewards"]), + "mean_dman_reward": _mean(results["dman_rewards"]), + "mean_coordination": _mean(results["coordination_scores"]), + "mean_conflicts": _mean(results["conflict_counts"]), + "final_gen_difficulty": results["generator_difficulty"][-1] if results["generator_difficulty"] else 1, + } + print("\n=== EVALUATION SUMMARY ===") + for k, v in summary.items(): + print(f" {k}: {v}") + + return {**results, "summary": summary} + + +# ── CLI ─────────────────────────────────────────────────────────────────────── + +def main() -> None: + parser = argparse.ArgumentParser(description="ATC Multi-Agent GRPO Training") + parser.add_argument("--model", default=DEFAULT_MODEL) + parser.add_argument("--output_dir", default=DEFAULT_OUTPUT) + parser.add_argument("--episodes", type=int, default=200) + parser.add_argument("--lora_rank", type=int, default=LORA_RANK) + parser.add_argument("--n_generations", type=int, default=None, + help="GRPO group size (default: N_GENERATIONS constant). " + "Use 2 on T4 Colab, 4 for best gradient quality.") + parser.add_argument("--batch_size", type=int, default=None) + parser.add_argument("--grad_accum", type=int, default=None) + parser.add_argument("--max_new_tokens", type=int, default=None) + parser.add_argument("--temperature", type=float, default=None) + parser.add_argument("--logging_steps", type=int, default=None) + parser.add_argument("--eval_episodes", type=int, default=EVAL_EPISODES) + parser.add_argument("--seed", type=int, default=42) + parser.add_argument("--no_eval", action="store_true", help="Skip before/after eval") + parser.add_argument("--eval_only", action="store_true") + parser.add_argument("--push_to_hub", action="store_true") + parser.add_argument("--hub_model_id", default=None) + parser.add_argument( + "--domain_episode_ratio", + type=float, + default=0.30, + help="Fraction of generated episodes that are ADAPT domain-transfer rows (0–1).", + ) + parser.add_argument( + "--adapt_focus", + action="store_true", + help="Include ADAPT rows in early curriculum stages and weight domain training.", + ) + parser.add_argument( + "--no_domain_stratify", + action="store_true", + help="Random domain task choice; default cycles all registered domain tasks.", + ) + parser.add_argument( + "--stage_epoch_scale", + type=float, + default=1.0, + help="Multiply per-stage training epochs (use <1 for quick plots).", + ) + parser.add_argument( + "--adapt_eval_episodes", + type=int, + default=None, + help="Episodes for ADAPT domain-pipeline eval (default: max(3, --eval_episodes)).", + ) + parser.add_argument( + "--sft_adapter", + default=None, + help="Directory with SFT LoRA (adapter_config.json + weights) to initialize GRPO.", + ) + args = parser.parse_args() + + # Allow CLI override of group size (useful for Colab memory tuning) + if args.n_generations is not None: + global N_GENERATIONS, BATCH_SIZE + N_GENERATIONS = args.n_generations + # Adjust batch size to stay divisible + if BATCH_SIZE % N_GENERATIONS != 0: + BATCH_SIZE = N_GENERATIONS + + global GRAD_ACCUM, MAX_NEW_TOKENS, LOGGING_STEPS, TEMPERATURE + if args.batch_size is not None: + BATCH_SIZE = max(1, args.batch_size) + if args.grad_accum is not None: + GRAD_ACCUM = max(1, args.grad_accum) + if args.max_new_tokens is not None: + MAX_NEW_TOKENS = max(32, args.max_new_tokens) + if args.temperature is not None: + TEMPERATURE = max(0.1, min(1.5, args.temperature)) + if args.logging_steps is not None: + LOGGING_STEPS = max(1, args.logging_steps) + + if args.eval_only: + evaluate(args.model, n_episodes=20, seed=args.seed) + else: + train( + model_name=args.model, + output_dir=args.output_dir, + n_episodes=args.episodes, + lora_rank=args.lora_rank, + seed=args.seed, + eval_episodes=max(3, args.eval_episodes), + push_to_hub=args.push_to_hub, + hub_model_id=args.hub_model_id, + run_eval=not args.no_eval, + domain_episode_ratio=float(args.domain_episode_ratio), + adapt_focus=bool(args.adapt_focus), + domain_stratify=not args.no_domain_stratify, + stage_epoch_scale=float(args.stage_epoch_scale), + adapt_eval_episodes=args.adapt_eval_episodes, + sft_adapter_dir=args.sft_adapter, + ) + + +if __name__ == "__main__": + main() diff --git a/training/train_sft.py b/training/train_sft.py new file mode 100644 index 0000000000000000000000000000000000000000..95a6a99352ea7c42a395e7e3fc945e1acb107a4c --- /dev/null +++ b/training/train_sft.py @@ -0,0 +1,483 @@ +"""Supervised fine-tuning (SFT) for JSON-formatted AMAN / DMAN / ADAPT outputs. + +Cold-starts the instruction model on strict JSON completions before GRPO so the +policy reliably parses tasks and matches ``parse_aman_action`` / +``parse_dman_action`` / ``parse_adapt_action``. + +Prerequisites (same stack as ``train_grpo.py``): + pip install torch unsloth unsloth-zoo trl transformers datasets accelerate peft bitsandbytes + +1) Build data: + python training/build_sft_dataset.py --out data/atc_sft.jsonl --episodes 500 + +2) Train LoRA SFT: + python training/train_sft.py --dataset data/atc_sft.jsonl --output_dir outputs/sft-json + +3) Point GRPO / inference at the saved adapter directory or merge to a HF model repo. + +TRL versions differ: ``SFTTrainer`` may expect ``max_seq_length`` / ``dataset_text_field`` +on the trainer, on ``SFTConfig``, or only under newer names (e.g. ``max_length``). This +script filters kwargs per installed signatures and falls back to ``transformers.Trainer`` +if ``SFTTrainer`` still fails (see stderr / traceback). +""" + +from __future__ import annotations + +import argparse +import inspect +import json +import os +import sys +import traceback +from pathlib import Path +from typing import Any, Dict, List, Optional, Tuple + +ROOT = Path(__file__).resolve().parent.parent +if str(ROOT) not in sys.path: + sys.path.insert(0, str(ROOT)) + + +def _require_training_deps(): + if sys.version_info >= (3, 14): + print("[ERROR] Python 3.14 not supported. Use 3.11 or 3.12.") + sys.exit(1) + try: + import torch # noqa: F401 + except ImportError as e: + print(f"[ERROR] torch missing: {e}") + sys.exit(1) + try: + import unsloth # noqa: F401 + from unsloth import FastLanguageModel + except Exception as e: + print(f"[ERROR] unsloth import failed: {e}") + print("Install: pip install unsloth unsloth-zoo") + sys.exit(1) + try: + from trl import SFTConfig, SFTTrainer + except ImportError as e: + print(f"[ERROR] trl import failed: {e}") + sys.exit(1) + return FastLanguageModel, SFTConfig, SFTTrainer + + +def _sig_keys(cls) -> set: + try: + return set(inspect.signature(cls.__init__).parameters.keys()) - {"self"} + except Exception: + return set() + + +def _pick(d: Dict[str, Any], keys: set) -> Dict[str, Any]: + return {k: v for k, v in d.items() if k in keys} + + +def _load_jsonl_rows(path: Path, agent_role: Optional[str]) -> List[Dict[str, Any]]: + rows: List[Dict[str, Any]] = [] + with open(path, encoding="utf-8") as fh: + for line in fh: + line = line.strip() + if not line: + continue + row = json.loads(line) + if agent_role and row.get("agent_role") != agent_role: + continue + rows.append(row) + if not rows: + raise SystemExit(f"No rows loaded from {path} (filter={agent_role!r})") + return rows + + +def _train_with_hf_trainer( + model, + tokenizer, + train_text_ds, + output_dir: Path, + *, + epochs: float, + batch_size: int, + grad_accum: int, + lr: float, + seed: int, + max_seq_length: int, + use_bf16: bool, + use_fp16: bool, +) -> None: + """HuggingFace ``Trainer`` + causal LM collator — stable across TRL versions (recommended for Colab).""" + from transformers import ( + DataCollatorForLanguageModeling, + Trainer, + TrainerCallback, + TrainingArguments, + ) + + class _EpochReportCallback(TrainerCallback): + """Print a clear summary at the end of each training epoch (HF Trainer).""" + + def __init__(self, label: str = "SFT") -> None: + self._label = label + + def on_epoch_end(self, args, state, control, **kwargs): + ep = float(getattr(state, "epoch", 0.0) or 0.0) + gs = int(getattr(state, "global_step", 0) or 0) + hist = list(getattr(state, "log_history", []) or []) + last = hist[-1] if hist else {} + loss = last.get("loss") + lr = last.get("learning_rate") + loss_s = f"{loss:.4f}" if isinstance(loss, (int, float)) else str(loss) + lr_s = f"{lr:.2e}" if isinstance(lr, (int, float)) else str(lr) + print( + f"\n{'='*60}\n" + f" [{self._label}] EPOCH END epoch={ep:.2f} global_step={gs}\n" + f" last_log: loss={loss_s} lr={lr_s}\n" + f"{'='*60}\n", + flush=True, + ) + + if getattr(tokenizer, "pad_token", None) is None and getattr(tokenizer, "eos_token", None) is not None: + tokenizer.pad_token = tokenizer.eos_token + + cfg = getattr(model, "config", None) + if cfg is not None: + cfg.use_cache = False + if hasattr(model, "enable_input_require_grads"): + try: + model.enable_input_require_grads() + except Exception: + pass + + def tok(batch: Dict[str, List[str]]) -> Dict[str, Any]: + return tokenizer( + batch["text"], + truncation=True, + max_length=max_seq_length, + padding=False, + ) + + tok_ds = train_text_ds.map(tok, batched=True, remove_columns=["text"]) + + steps_per_epoch = max(1, len(tok_ds) // max(1, batch_size * grad_accum)) + save_steps = max(1, min(200, steps_per_epoch)) + + ta_keys = _sig_keys(TrainingArguments) + ta_kw = dict( + output_dir=str(output_dir), + num_train_epochs=epochs, + per_device_train_batch_size=batch_size, + gradient_accumulation_steps=grad_accum, + learning_rate=lr, + logging_steps=max(1, min(10, steps_per_epoch)), + save_steps=save_steps, + save_total_limit=2, + seed=seed, + bf16=use_bf16, + fp16=use_fp16, + report_to="none", + remove_unused_columns=False, + ) + if "gradient_checkpointing" in ta_keys: + ta_kw["gradient_checkpointing"] = True + if "logging_strategy" in ta_keys: + ta_kw["logging_strategy"] = "epoch" + if "logging_first_step" in ta_keys: + ta_kw["logging_first_step"] = True + if "disable_tqdm" in ta_keys: + ta_kw["disable_tqdm"] = False + args = TrainingArguments(**_pick(ta_kw, ta_keys)) + collator = DataCollatorForLanguageModeling(tokenizer, mlm=False) + trainer = Trainer( + model=model, + args=args, + train_dataset=tok_ds, + data_collator=collator, + callbacks=[_EpochReportCallback("SFT")], + ) + trainer.train() + trainer.save_model(str(output_dir)) + tokenizer.save_pretrained(str(output_dir)) + + +def _try_sft_trainer( + SFTConfig, + SFTTrainer, + *, + model, + tokenizer, + train_ds, + output_dir: Path, + max_seq_length: int, + epochs: float, + batch_size: int, + grad_accum: int, + lr: float, + seed: int, + use_bf16: bool, + use_fp16: bool, +) -> Tuple[bool, Optional[str]]: + """Return (ok, error_message).""" + cfg_keys = _sig_keys(SFTConfig) + tr_keys = _sig_keys(SFTTrainer) + + n = len(train_ds) + steps_per_epoch = max(1, n // max(1, batch_size * grad_accum)) + save_steps = max(1, min(200, steps_per_epoch)) + + base_training = dict( + output_dir=str(output_dir), + num_train_epochs=epochs, + per_device_train_batch_size=batch_size, + gradient_accumulation_steps=grad_accum, + learning_rate=lr, + logging_steps=max(1, min(10, steps_per_epoch)), + save_steps=save_steps, + save_total_limit=3, + seed=seed, + bf16=use_bf16, + fp16=use_fp16, + report_to="none", + ) + if "remove_unused_columns" in cfg_keys: + base_training["remove_unused_columns"] = False + + # TRL renamed max_seq_length -> max_length on some releases + sft_specific: Dict[str, Any] = {} + if "max_seq_length" in cfg_keys: + sft_specific["max_seq_length"] = max_seq_length + elif "max_length" in cfg_keys: + sft_specific["max_length"] = max_seq_length + + if "dataset_text_field" in cfg_keys: + sft_specific["dataset_text_field"] = "text" + if "packing" in cfg_keys: + sft_specific["packing"] = False + + merged = {**base_training, **sft_specific} + cfg_kw = _pick(merged, cfg_keys) + + try: + sft_args = SFTConfig(**cfg_kw) + except TypeError as e: + return False, f"SFTConfig construction failed: {e}\nKeys tried: {sorted(cfg_kw.keys())}" + + t_kw: Dict[str, Any] = dict(model=model, args=sft_args, train_dataset=train_ds) + if "processing_class" in tr_keys: + t_kw["processing_class"] = tokenizer + elif "tokenizer" in tr_keys: + t_kw["tokenizer"] = tokenizer + else: + return False, "SFTTrainer has neither processing_class nor tokenizer parameter" + + # Some TRL builds take these on the trainer, not the config + if "max_seq_length" in tr_keys: + t_kw["max_seq_length"] = max_seq_length + elif "max_length" in tr_keys: + t_kw["max_length"] = max_seq_length + if "dataset_text_field" in tr_keys: + t_kw["dataset_text_field"] = "text" + if "packing" in tr_keys: + t_kw["packing"] = False + + try: + trainer = SFTTrainer(**_pick(t_kw, tr_keys)) + trainer.train() + trainer.save_model(str(output_dir)) + tokenizer.save_pretrained(str(output_dir)) + return True, None + except Exception as e: + return False, f"{type(e).__name__}: {e}\n{traceback.format_exc()}" + + +def main() -> None: + FastLanguageModel, SFTConfig, SFTTrainer = _require_training_deps() + import torch + from datasets import Dataset + + parser = argparse.ArgumentParser(description="SFT for ATC JSON agent outputs") + parser.add_argument("--dataset", type=Path, required=True, help="JSONL from build_sft_dataset.py") + parser.add_argument("--output_dir", type=Path, default=Path("outputs/atc-sft-json")) + parser.add_argument("--model", type=str, default="Qwen/Qwen2.5-1.5B-Instruct") + parser.add_argument("--max_seq_length", type=int, default=2048, help="Lower on T4 if OOM (e.g. 1024)") + parser.add_argument("--epochs", type=float, default=1.0) + parser.add_argument("--lr", type=float, default=2e-4) + parser.add_argument("--batch_size", type=int, default=2) + parser.add_argument("--grad_accum", type=int, default=4) + parser.add_argument("--lora_rank", type=int, default=16) + parser.add_argument("--seed", type=int, default=42) + parser.add_argument( + "--agent_role", + type=str, + default="", + help="If set, only rows with this agent_role (AMAN, DMAN, or ADAPT)", + ) + parser.add_argument( + "--no_hf_fallback", + action="store_true", + help="Do not fall back to transformers.Trainer if SFTTrainer fails (only for --trainer auto)", + ) + parser.add_argument( + "--trainer", + choices=("auto", "trl", "hf"), + default="hf", + help=( + "hf = HuggingFace Trainer only (default; most reliable on Colab). " + "trl = TRL SFTTrainer only. auto = try trl then hf on failure." + ), + ) + args = parser.parse_args() + args.output_dir.mkdir(parents=True, exist_ok=True) + + role_filter: Optional[str] = args.agent_role.strip() or None + if role_filter and role_filter not in ("AMAN", "DMAN", "ADAPT"): + raise SystemExit("--agent_role must be AMAN, DMAN, ADAPT, or empty") + + raw_rows = _load_jsonl_rows(args.dataset, role_filter) + model_source = args.model if os.path.isdir(args.model) else args.model + + print(f"[SFT] rows={len(raw_rows)} model={model_source} max_seq_length={args.max_seq_length}") + + try: + model, tokenizer = FastLanguageModel.from_pretrained( + model_name=model_source, + max_seq_length=args.max_seq_length, + load_in_4bit=True, + dtype=None, + ) + + LORA_ALPHA = args.lora_rank * 2 + LORA_TARGETS = ["q_proj", "v_proj", "k_proj", "o_proj"] + model = FastLanguageModel.get_peft_model( + model, + r=args.lora_rank, + lora_alpha=LORA_ALPHA, + target_modules=LORA_TARGETS, + lora_dropout=0.0, + bias="none", + use_gradient_checkpointing="unsloth", + random_state=args.seed, + ) + + text_rows: List[Dict[str, str]] = [] + for row in raw_rows: + if "messages" not in row: + raise ValueError(f"Row missing 'messages': keys={list(row.keys())}") + text = tokenizer.apply_chat_template( + row["messages"], + tokenize=False, + add_generation_prompt=False, + ) + text_rows.append({"text": text}) + + train_ds = Dataset.from_list(text_rows) + + use_bf16 = torch.cuda.is_available() and torch.cuda.get_device_capability()[0] >= 8 + use_fp16 = torch.cuda.is_available() and not use_bf16 + + ok_trl = False + used_hf = False + trainer_backend = "unknown" + + if args.trainer == "hf": + print("[SFT] Using HuggingFace Trainer backend (--trainer hf).") + _train_with_hf_trainer( + model, + tokenizer, + train_ds, + args.output_dir, + epochs=args.epochs, + batch_size=args.batch_size, + grad_accum=args.grad_accum, + lr=args.lr, + seed=args.seed, + max_seq_length=args.max_seq_length, + use_bf16=use_bf16, + use_fp16=use_fp16, + ) + used_hf = True + trainer_backend = "hf" + elif args.trainer == "trl": + ok_trl, err = _try_sft_trainer( + SFTConfig, + SFTTrainer, + model=model, + tokenizer=tokenizer, + train_ds=train_ds, + output_dir=args.output_dir, + max_seq_length=args.max_seq_length, + epochs=args.epochs, + batch_size=args.batch_size, + grad_accum=args.grad_accum, + lr=args.lr, + seed=args.seed, + use_bf16=use_bf16, + use_fp16=use_fp16, + ) + if not ok_trl: + print(err or "unknown TRL error", file=sys.stderr) + raise SystemExit(1) + trainer_backend = "trl" + else: + ok_trl, err = _try_sft_trainer( + SFTConfig, + SFTTrainer, + model=model, + tokenizer=tokenizer, + train_ds=train_ds, + output_dir=args.output_dir, + max_seq_length=args.max_seq_length, + epochs=args.epochs, + batch_size=args.batch_size, + grad_accum=args.grad_accum, + lr=args.lr, + seed=args.seed, + use_bf16=use_bf16, + use_fp16=use_fp16, + ) + if ok_trl: + trainer_backend = "trl" + else: + print("[WARN] SFTTrainer path failed:\n", err, file=sys.stderr) + if args.no_hf_fallback: + raise SystemExit(1) + print("[INFO] Falling back to transformers.Trainer …") + _train_with_hf_trainer( + model, + tokenizer, + train_ds, + args.output_dir, + epochs=args.epochs, + batch_size=args.batch_size, + grad_accum=args.grad_accum, + lr=args.lr, + seed=args.seed, + max_seq_length=args.max_seq_length, + use_bf16=use_bf16, + use_fp16=use_fp16, + ) + used_hf = True + trainer_backend = "hf" + + meta = { + "base_model": args.model, + "dataset": str(args.dataset), + "n_examples": len(train_ds), + "agent_role_filter": role_filter, + "lora_rank": args.lora_rank, + "max_seq_length": args.max_seq_length, + "trainer": args.trainer, + "trainer_backend": trainer_backend, + "used_sft_trainer": ok_trl, + "used_hf_trainer_fallback": args.trainer == "auto" and used_hf and not ok_trl, + "used_hf_trainer": args.trainer == "hf" or used_hf, + } + with open(args.output_dir / "sft_training_meta.json", "w", encoding="utf-8") as fh: + json.dump(meta, fh, indent=2) + print(f"[OK] SFT adapter saved to {args.output_dir}") + + except Exception: + print("[FATAL] SFT run crashed:", file=sys.stderr) + traceback.print_exc() + raise + + +if __name__ == "__main__": + main() diff --git a/training/visualization.py b/training/visualization.py new file mode 100644 index 0000000000000000000000000000000000000000..e5ba59603c305ae287d82321588147f4030f64db --- /dev/null +++ b/training/visualization.py @@ -0,0 +1,207 @@ +"""Reusable training visualization utilities. + +Provides `create_training_panel` and `refresh_training_panel` that work in +notebooks (interactive display) and headless servers (saves PNG snapshots). + +Keep implementations lightweight and robust for the DGX/A100 offline setup. +""" +from __future__ import annotations + +import os +from pathlib import Path +from typing import Any, Iterable, Optional, Tuple + +import matplotlib + +# Use non-interactive backend when DISPLAY not available (server-safe) +if not os.getenv("DISPLAY"): + matplotlib.use("Agg") + +import matplotlib.pyplot as plt +import numpy as np +import pandas as pd + + +def create_training_panel(figsize: Tuple[int, int] = (19, 13)) -> Tuple[plt.Figure, Any]: + """Create a 3x3 matplotlib panel for training visualisations. + + Returns (fig, axes) where axes is a 3x3 ndarray. + """ + plt.ion() + fig, axes = plt.subplots(3, 3, figsize=figsize) + return fig, axes + + +def _rolling_mean(values: Iterable[float], window: int = 5) -> np.ndarray: + s = pd.Series(list(values), dtype="float64") + return s.rolling(window=min(window, max(1, len(s))), min_periods=1).mean().to_numpy() + + +def _safe_legend(ax: Any, **kwargs: Any) -> None: + handles, labels = ax.get_legend_handles_labels() + if handles: + ax.legend(**kwargs) + + +def refresh_training_panel( + query_logs: Iterable[dict], + episode_logs: Iterable[dict], + fig: plt.Figure, + axes: Any, + save_path: Optional[Path] = None, + live_plot_every: int = 1, + rolling_window: int = 5, + force: bool = False, +) -> None: + """Refresh the panel using `query_logs` and `episode_logs`. + + If `save_path` is provided the figure will be saved (headless-friendly). + """ + _ql = list(query_logs) + _el = list(episode_logs) + qdf = pd.DataFrame(_ql) if _ql else pd.DataFrame() + edf = pd.DataFrame(_el) if _el else pd.DataFrame() + + if qdf.empty and edf.empty: + return + + # Clear axes + for ax in axes.flat: + ax.clear() + + # 1) Reward over global steps + rolling trend + ax = axes[0, 0] + if not qdf.empty: + for role, grp in qdf.groupby("role"): + grp = grp.sort_values("step") + ax.plot(grp["step"], grp["reward"], alpha=0.30, marker=".", linewidth=1.0, label=f"{role} raw") + ax.plot(grp["step"], _rolling_mean(grp["reward"], rolling_window), linewidth=2.0, label=f"{role} roll") + ax.set_title("Reward by Global Step (raw + rolling)") + ax.set_xlabel("Step") + ax.set_ylabel("Reward") + ax.grid(True) + _safe_legend(ax, fontsize=7, ncol=2) + + # 2) Weighted loss over steps + ax = axes[0, 1] + if not qdf.empty: + for role, grp in qdf.groupby("role"): + grp = grp.sort_values("step") + y = pd.Series(grp.get("weighted_loss", [])).replace([np.inf, -np.inf], np.nan).ffill().bfill().fillna(0) + ax.plot(grp["step"], y, alpha=0.30, marker=".", linewidth=1.0, label=f"{role} raw") + ax.plot(grp["step"], _rolling_mean(y, rolling_window), linewidth=2.0, label=f"{role} roll") + ax.set_title("Weighted Loss by Step (raw + rolling)") + ax.set_xlabel("Step") + ax.set_ylabel("Weighted Loss") + ax.grid(True) + _safe_legend(ax, fontsize=7, ncol=2) + + # 3) Parse success cumulative mean + ax = axes[0, 2] + if not qdf.empty and "parse_ok" in qdf.columns: + for role, grp in qdf.groupby("role"): + grp = grp.sort_values("step") + cumulative = grp["parse_ok"].astype(float).expanding().mean() + ax.plot(grp["step"], cumulative, marker="o", linewidth=1.8, label=role) + ax.set_title("Parse Success Cumulative Mean") + ax.set_xlabel("Step") + ax.set_ylabel("Parse Success") + ax.set_ylim(0, 1.05) + ax.grid(True) + _safe_legend(ax, fontsize=8) + + # 4) Episode macro metrics + ax = axes[1, 0] + if not edf.empty: + edf = edf.sort_values("episode") + ax.plot(edf["episode"], edf["composite_score"], marker="o", label="composite") + ax.plot(edf["episode"], edf["coord_score"], marker="o", label="coord") + ax.plot(edf["episode"], edf["conflicts"], marker="x", label="conflicts") + ax.set_title("Episode Macro Metrics") + ax.set_xlabel("Episode") + ax.set_ylabel("Value") + ax.grid(True) + _safe_legend(ax, fontsize=8) + + # 5) Episode role rewards + ax = axes[1, 1] + if not edf.empty: + ax.plot(edf["episode"], edf.get("aman_reward", []), marker="o", label="AMAN reward") + ax.plot(edf["episode"], edf.get("dman_reward", []), marker="o", label="DMAN reward") + ax.plot(edf["episode"], edf.get("generator_reward", []), marker="x", label="Generator reward") + ax.plot(edf["episode"], edf.get("supervisor_score", []), marker="x", label="Supervisor score") + ax.set_title("Per-Episode Role Rewards") + ax.set_xlabel("Episode") + ax.set_ylabel("Reward / Score") + ax.grid(True) + _safe_legend(ax, fontsize=7, ncol=2) + + # 6) Reward distribution + ax = axes[1, 2] + if not qdf.empty: + bins = np.linspace(-1.0, 1.0, 16) + for role, grp in qdf.groupby("role"): + ax.hist(grp["reward"], bins=bins, alpha=0.35, label=role) + ax.set_title("Reward Distribution by Role") + ax.set_xlabel("Reward") + ax.set_ylabel("Count") + ax.grid(True) + _safe_legend(ax, fontsize=8) + + # 7) Prompt/completion size trends + ax = axes[2, 0] + if not qdf.empty: + for role, grp in qdf.groupby("role"): + grp = grp.sort_values("step") + ax.plot(grp["step"], _rolling_mean(grp.get("prompt_chars", []), rolling_window), linewidth=2.0, label=f"{role} prompt") + ax.plot(grp["step"], _rolling_mean(grp.get("completion_chars", []), rolling_window), linestyle="--", linewidth=1.8, label=f"{role} completion") + ax.set_title("Prompt vs Completion Length (rolling)") + ax.set_xlabel("Step") + ax.set_ylabel("Chars") + ax.grid(True) + _safe_legend(ax, fontsize=7, ncol=2) + + # 8) Mean composite by task + ax = axes[2, 1] + if not edf.empty: + mean_by_task = edf.groupby("task_id")["composite_score"].mean().sort_values() + ax.bar(mean_by_task.index.astype(str), mean_by_task.values, color="tab:green", alpha=0.8) + ax.tick_params(axis="x", labelrotation=20) + ax.set_title("Average Composite Score by Task") + ax.set_xlabel("Task") + ax.set_ylabel("Avg Composite") + ax.grid(True, axis="y") + + # 9) Mean composite by supervisor profile + ax = axes[2, 2] + if not edf.empty: + mean_by_sup = edf.groupby("supervisor_profile")["composite_score"].mean().sort_values() + ax.bar(mean_by_sup.index.astype(str), mean_by_sup.values, color="tab:orange", alpha=0.8) + ax.tick_params(axis="x", labelrotation=20) + ax.set_title("Average Composite by Supervisor Profile") + ax.set_xlabel("Supervisor Profile") + ax.set_ylabel("Avg Composite") + ax.grid(True, axis="y") + + fig.tight_layout() + + if save_path is not None: + try: + save_path.parent.mkdir(parents=True, exist_ok=True) + fig.savefig(str(save_path), dpi=150, bbox_inches="tight") + except Exception: + # swallowing save errors keeps training robust + pass + + # In interactive environments, show the figure + try: + from IPython.display import clear_output, display + + clear_output(wait=True) + display(fig) + except Exception: + # Not running in a notebook + pass + + +__all__ = ["create_training_panel", "refresh_training_panel"] diff --git a/uv.lock b/uv.lock new file mode 100644 index 0000000000000000000000000000000000000000..edc84073321aac6d47e07d6dbfb2cc4132f873d3 --- /dev/null +++ b/uv.lock @@ -0,0 +1,2536 @@ +version = 1 +revision = 3 +requires-python = ">=3.11" +resolution-markers = [ + "python_full_version >= '3.14' and sys_platform == 'win32'", + "python_full_version >= '3.14' and sys_platform == 'emscripten'", + "python_full_version >= '3.14' and sys_platform != 'emscripten' and sys_platform != 'win32'", + "python_full_version == '3.13.*' and sys_platform == 'win32'", + "python_full_version == '3.13.*' and sys_platform == 'emscripten'", + "python_full_version == '3.13.*' and sys_platform != 'emscripten' and sys_platform != 'win32'", + "python_full_version < '3.13' and sys_platform == 'win32'", + "python_full_version < '3.13' and sys_platform == 'emscripten'", + "python_full_version < '3.13' and sys_platform != 'emscripten' and sys_platform != 'win32'", +] + +[[package]] +name = "aiofile" +version = "3.9.0" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "caio" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/67/e2/d7cb819de8df6b5c1968a2756c3cb4122d4fa2b8fc768b53b7c9e5edb646/aiofile-3.9.0.tar.gz", hash = "sha256:e5ad718bb148b265b6df1b3752c4d1d83024b93da9bd599df74b9d9ffcf7919b", size = 17943, upload-time = "2024-10-08T10:39:35.846Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/50/25/da1f0b4dd970e52bf5a36c204c107e11a0c6d3ed195eba0bfbc664c312b2/aiofile-3.9.0-py3-none-any.whl", hash = "sha256:ce2f6c1571538cbdfa0143b04e16b208ecb0e9cb4148e528af8a640ed51cc8aa", size = 19539, upload-time = "2024-10-08T10:39:32.955Z" }, +] + +[[package]] +name = "aiofiles" +version = "24.1.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/0b/03/a88171e277e8caa88a4c77808c20ebb04ba74cc4681bf1e9416c862de237/aiofiles-24.1.0.tar.gz", hash = "sha256:22a075c9e5a3810f0c2e48f3008c94d68c65d763b9b03857924c99e57355166c", size = 30247, upload-time = "2024-06-24T11:02:03.584Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/a5/45/30bb92d442636f570cb5651bc661f52b610e2eec3f891a5dc3a4c3667db0/aiofiles-24.1.0-py3-none-any.whl", hash = "sha256:b4ec55f4195e3eb5d7abd1bf7e061763e864dd4954231fb8539a0ef8bb8260e5", size = 15896, upload-time = "2024-06-24T11:02:01.529Z" }, +] + +[[package]] +name = "annotated-doc" +version = "0.0.4" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/57/ba/046ceea27344560984e26a590f90bc7f4a75b06701f653222458922b558c/annotated_doc-0.0.4.tar.gz", hash = "sha256:fbcda96e87e9c92ad167c2e53839e57503ecfda18804ea28102353485033faa4", size = 7288, upload-time = "2025-11-10T22:07:42.062Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/1e/d3/26bf1008eb3d2daa8ef4cacc7f3bfdc11818d111f7e2d0201bc6e3b49d45/annotated_doc-0.0.4-py3-none-any.whl", hash = "sha256:571ac1dc6991c450b25a9c2d84a3705e2ae7a53467b5d111c24fa8baabbed320", size = 5303, upload-time = "2025-11-10T22:07:40.673Z" }, +] + +[[package]] +name = "annotated-types" +version = "0.7.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/ee/67/531ea369ba64dcff5ec9c3402f9f51bf748cec26dde048a2f973a4eea7f5/annotated_types-0.7.0.tar.gz", hash = "sha256:aff07c09a53a08bc8cfccb9c85b05f1aa9a2a6f23728d790723543408344ce89", size = 16081, upload-time = "2024-05-20T21:33:25.928Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/78/b6/6307fbef88d9b5ee7421e68d78a9f162e0da4900bc5f5793f6d3d0e34fb8/annotated_types-0.7.0-py3-none-any.whl", hash = "sha256:1f02e8b43a8fbbc3f3e0d4f0f4bfc8131bcb4eebe8849b8e5c773f3a1c582a53", size = 13643, upload-time = "2024-05-20T21:33:24.1Z" }, +] + +[[package]] +name = "anyio" +version = "4.13.0" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "idna" }, + { name = "typing-extensions", marker = "python_full_version < '3.13'" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/19/14/2c5dd9f512b66549ae92767a9c7b330ae88e1932ca57876909410251fe13/anyio-4.13.0.tar.gz", hash = "sha256:334b70e641fd2221c1505b3890c69882fe4a2df910cba14d97019b90b24439dc", size = 231622, upload-time = "2026-03-24T12:59:09.671Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/da/42/e921fccf5015463e32a3cf6ee7f980a6ed0f395ceeaa45060b61d86486c2/anyio-4.13.0-py3-none-any.whl", hash = "sha256:08b310f9e24a9594186fd75b4f73f4a4152069e3853f1ed8bfbf58369f4ad708", size = 114353, upload-time = "2026-03-24T12:59:08.246Z" }, +] + +[[package]] +name = "attrs" +version = "26.1.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/9a/8e/82a0fe20a541c03148528be8cac2408564a6c9a0cc7e9171802bc1d26985/attrs-26.1.0.tar.gz", hash = "sha256:d03ceb89cb322a8fd706d4fb91940737b6642aa36998fe130a9bc96c985eff32", size = 952055, upload-time = "2026-03-19T14:22:25.026Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/64/b4/17d4b0b2a2dc85a6df63d1157e028ed19f90d4cd97c36717afef2bc2f395/attrs-26.1.0-py3-none-any.whl", hash = "sha256:c647aa4a12dfbad9333ca4e71fe62ddc36f4e63b2d260a37a8b83d2f043ac309", size = 67548, upload-time = "2026-03-19T14:22:23.645Z" }, +] + +[[package]] +name = "audioop-lts" +version = "0.2.2" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/38/53/946db57842a50b2da2e0c1e34bd37f36f5aadba1a929a3971c5d7841dbca/audioop_lts-0.2.2.tar.gz", hash = "sha256:64d0c62d88e67b98a1a5e71987b7aa7b5bcffc7dcee65b635823dbdd0a8dbbd0", size = 30686, upload-time = "2025-08-05T16:43:17.409Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/de/d4/94d277ca941de5a507b07f0b592f199c22454eeaec8f008a286b3fbbacd6/audioop_lts-0.2.2-cp313-abi3-macosx_10_13_universal2.whl", hash = "sha256:fd3d4602dc64914d462924a08c1a9816435a2155d74f325853c1f1ac3b2d9800", size = 46523, upload-time = "2025-08-05T16:42:20.836Z" }, + { url = "https://files.pythonhosted.org/packages/f8/5a/656d1c2da4b555920ce4177167bfeb8623d98765594af59702c8873f60ec/audioop_lts-0.2.2-cp313-abi3-macosx_10_13_x86_64.whl", hash = "sha256:550c114a8df0aafe9a05442a1162dfc8fec37e9af1d625ae6060fed6e756f303", size = 27455, upload-time = "2025-08-05T16:42:22.283Z" }, + { url = "https://files.pythonhosted.org/packages/1b/83/ea581e364ce7b0d41456fb79d6ee0ad482beda61faf0cab20cbd4c63a541/audioop_lts-0.2.2-cp313-abi3-macosx_11_0_arm64.whl", hash = "sha256:9a13dc409f2564de15dd68be65b462ba0dde01b19663720c68c1140c782d1d75", size = 26997, upload-time = "2025-08-05T16:42:23.849Z" }, + { url = "https://files.pythonhosted.org/packages/b8/3b/e8964210b5e216e5041593b7d33e97ee65967f17c282e8510d19c666dab4/audioop_lts-0.2.2-cp313-abi3-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:51c916108c56aa6e426ce611946f901badac950ee2ddaf302b7ed35d9958970d", size = 85844, upload-time = "2025-08-05T16:42:25.208Z" }, + { url = "https://files.pythonhosted.org/packages/c7/2e/0a1c52faf10d51def20531a59ce4c706cb7952323b11709e10de324d6493/audioop_lts-0.2.2-cp313-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:47eba38322370347b1c47024defbd36374a211e8dd5b0dcbce7b34fdb6f8847b", size = 85056, upload-time = "2025-08-05T16:42:26.559Z" }, + { url = "https://files.pythonhosted.org/packages/75/e8/cd95eef479656cb75ab05dfece8c1f8c395d17a7c651d88f8e6e291a63ab/audioop_lts-0.2.2-cp313-abi3-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:ba7c3a7e5f23e215cb271516197030c32aef2e754252c4c70a50aaff7031a2c8", size = 93892, upload-time = "2025-08-05T16:42:27.902Z" }, + { url = "https://files.pythonhosted.org/packages/5c/1e/a0c42570b74f83efa5cca34905b3eef03f7ab09fe5637015df538a7f3345/audioop_lts-0.2.2-cp313-abi3-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:def246fe9e180626731b26e89816e79aae2276f825420a07b4a647abaa84becc", size = 96660, upload-time = "2025-08-05T16:42:28.9Z" }, + { url = "https://files.pythonhosted.org/packages/50/d5/8a0ae607ca07dbb34027bac8db805498ee7bfecc05fd2c148cc1ed7646e7/audioop_lts-0.2.2-cp313-abi3-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:e160bf9df356d841bb6c180eeeea1834085464626dc1b68fa4e1d59070affdc3", size = 79143, upload-time = "2025-08-05T16:42:29.929Z" }, + { url = "https://files.pythonhosted.org/packages/12/17/0d28c46179e7910bfb0bb62760ccb33edb5de973052cb2230b662c14ca2e/audioop_lts-0.2.2-cp313-abi3-musllinux_1_2_aarch64.whl", hash = "sha256:4b4cd51a57b698b2d06cb9993b7ac8dfe89a3b2878e96bc7948e9f19ff51dba6", size = 84313, upload-time = "2025-08-05T16:42:30.949Z" }, + { url = "https://files.pythonhosted.org/packages/84/ba/bd5d3806641564f2024e97ca98ea8f8811d4e01d9b9f9831474bc9e14f9e/audioop_lts-0.2.2-cp313-abi3-musllinux_1_2_ppc64le.whl", hash = "sha256:4a53aa7c16a60a6857e6b0b165261436396ef7293f8b5c9c828a3a203147ed4a", size = 93044, upload-time = "2025-08-05T16:42:31.959Z" }, + { url = "https://files.pythonhosted.org/packages/f9/5e/435ce8d5642f1f7679540d1e73c1c42d933331c0976eb397d1717d7f01a3/audioop_lts-0.2.2-cp313-abi3-musllinux_1_2_riscv64.whl", hash = "sha256:3fc38008969796f0f689f1453722a0f463da1b8a6fbee11987830bfbb664f623", size = 78766, upload-time = "2025-08-05T16:42:33.302Z" }, + { url = "https://files.pythonhosted.org/packages/ae/3b/b909e76b606cbfd53875693ec8c156e93e15a1366a012f0b7e4fb52d3c34/audioop_lts-0.2.2-cp313-abi3-musllinux_1_2_s390x.whl", hash = "sha256:15ab25dd3e620790f40e9ead897f91e79c0d3ce65fe193c8ed6c26cffdd24be7", size = 87640, upload-time = "2025-08-05T16:42:34.854Z" }, + { url = "https://files.pythonhosted.org/packages/30/e7/8f1603b4572d79b775f2140d7952f200f5e6c62904585d08a01f0a70393a/audioop_lts-0.2.2-cp313-abi3-musllinux_1_2_x86_64.whl", hash = "sha256:03f061a1915538fd96272bac9551841859dbb2e3bf73ebe4a23ef043766f5449", size = 86052, upload-time = "2025-08-05T16:42:35.839Z" }, + { url = "https://files.pythonhosted.org/packages/b5/96/c37846df657ccdda62ba1ae2b6534fa90e2e1b1742ca8dcf8ebd38c53801/audioop_lts-0.2.2-cp313-abi3-win32.whl", hash = "sha256:3bcddaaf6cc5935a300a8387c99f7a7fbbe212a11568ec6cf6e4bc458c048636", size = 26185, upload-time = "2025-08-05T16:42:37.04Z" }, + { url = "https://files.pythonhosted.org/packages/34/a5/9d78fdb5b844a83da8a71226c7bdae7cc638861085fff7a1d707cb4823fa/audioop_lts-0.2.2-cp313-abi3-win_amd64.whl", hash = "sha256:a2c2a947fae7d1062ef08c4e369e0ba2086049a5e598fda41122535557012e9e", size = 30503, upload-time = "2025-08-05T16:42:38.427Z" }, + { url = "https://files.pythonhosted.org/packages/34/25/20d8fde083123e90c61b51afb547bb0ea7e77bab50d98c0ab243d02a0e43/audioop_lts-0.2.2-cp313-abi3-win_arm64.whl", hash = "sha256:5f93a5db13927a37d2d09637ccca4b2b6b48c19cd9eda7b17a2e9f77edee6a6f", size = 24173, upload-time = "2025-08-05T16:42:39.704Z" }, + { url = "https://files.pythonhosted.org/packages/58/a7/0a764f77b5c4ac58dc13c01a580f5d32ae8c74c92020b961556a43e26d02/audioop_lts-0.2.2-cp313-cp313t-macosx_10_13_universal2.whl", hash = "sha256:73f80bf4cd5d2ca7814da30a120de1f9408ee0619cc75da87d0641273d202a09", size = 47096, upload-time = "2025-08-05T16:42:40.684Z" }, + { url = "https://files.pythonhosted.org/packages/aa/ed/ebebedde1a18848b085ad0fa54b66ceb95f1f94a3fc04f1cd1b5ccb0ed42/audioop_lts-0.2.2-cp313-cp313t-macosx_10_13_x86_64.whl", hash = "sha256:106753a83a25ee4d6f473f2be6b0966fc1c9af7e0017192f5531a3e7463dce58", size = 27748, upload-time = "2025-08-05T16:42:41.992Z" }, + { url = "https://files.pythonhosted.org/packages/cb/6e/11ca8c21af79f15dbb1c7f8017952ee8c810c438ce4e2b25638dfef2b02c/audioop_lts-0.2.2-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:fbdd522624141e40948ab3e8cdae6e04c748d78710e9f0f8d4dae2750831de19", size = 27329, upload-time = "2025-08-05T16:42:42.987Z" }, + { url = "https://files.pythonhosted.org/packages/84/52/0022f93d56d85eec5da6b9da6a958a1ef09e80c39f2cc0a590c6af81dcbb/audioop_lts-0.2.2-cp313-cp313t-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:143fad0311e8209ece30a8dbddab3b65ab419cbe8c0dde6e8828da25999be911", size = 92407, upload-time = "2025-08-05T16:42:44.336Z" }, + { url = "https://files.pythonhosted.org/packages/87/1d/48a889855e67be8718adbc7a01f3c01d5743c325453a5e81cf3717664aad/audioop_lts-0.2.2-cp313-cp313t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:dfbbc74ec68a0fd08cfec1f4b5e8cca3d3cd7de5501b01c4b5d209995033cde9", size = 91811, upload-time = "2025-08-05T16:42:45.325Z" }, + { url = "https://files.pythonhosted.org/packages/98/a6/94b7213190e8077547ffae75e13ed05edc488653c85aa5c41472c297d295/audioop_lts-0.2.2-cp313-cp313t-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:cfcac6aa6f42397471e4943e0feb2244549db5c5d01efcd02725b96af417f3fe", size = 100470, upload-time = "2025-08-05T16:42:46.468Z" }, + { url = "https://files.pythonhosted.org/packages/e9/e9/78450d7cb921ede0cfc33426d3a8023a3bda755883c95c868ee36db8d48d/audioop_lts-0.2.2-cp313-cp313t-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:752d76472d9804ac60f0078c79cdae8b956f293177acd2316cd1e15149aee132", size = 103878, upload-time = "2025-08-05T16:42:47.576Z" }, + { url = "https://files.pythonhosted.org/packages/4f/e2/cd5439aad4f3e34ae1ee852025dc6aa8f67a82b97641e390bf7bd9891d3e/audioop_lts-0.2.2-cp313-cp313t-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:83c381767e2cc10e93e40281a04852facc4cd9334550e0f392f72d1c0a9c5753", size = 84867, upload-time = "2025-08-05T16:42:49.003Z" }, + { url = "https://files.pythonhosted.org/packages/68/4b/9d853e9076c43ebba0d411e8d2aa19061083349ac695a7d082540bad64d0/audioop_lts-0.2.2-cp313-cp313t-musllinux_1_2_aarch64.whl", hash = "sha256:c0022283e9556e0f3643b7c3c03f05063ca72b3063291834cca43234f20c60bb", size = 90001, upload-time = "2025-08-05T16:42:50.038Z" }, + { url = "https://files.pythonhosted.org/packages/58/26/4bae7f9d2f116ed5593989d0e521d679b0d583973d203384679323d8fa85/audioop_lts-0.2.2-cp313-cp313t-musllinux_1_2_ppc64le.whl", hash = "sha256:a2d4f1513d63c795e82948e1305f31a6d530626e5f9f2605408b300ae6095093", size = 99046, upload-time = "2025-08-05T16:42:51.111Z" }, + { url = "https://files.pythonhosted.org/packages/b2/67/a9f4fb3e250dda9e9046f8866e9fa7d52664f8985e445c6b4ad6dfb55641/audioop_lts-0.2.2-cp313-cp313t-musllinux_1_2_riscv64.whl", hash = "sha256:c9c8e68d8b4a56fda8c025e538e639f8c5953f5073886b596c93ec9b620055e7", size = 84788, upload-time = "2025-08-05T16:42:52.198Z" }, + { url = "https://files.pythonhosted.org/packages/70/f7/3de86562db0121956148bcb0fe5b506615e3bcf6e63c4357a612b910765a/audioop_lts-0.2.2-cp313-cp313t-musllinux_1_2_s390x.whl", hash = "sha256:96f19de485a2925314f5020e85911fb447ff5fbef56e8c7c6927851b95533a1c", size = 94472, upload-time = "2025-08-05T16:42:53.59Z" }, + { url = "https://files.pythonhosted.org/packages/f1/32/fd772bf9078ae1001207d2df1eef3da05bea611a87dd0e8217989b2848fa/audioop_lts-0.2.2-cp313-cp313t-musllinux_1_2_x86_64.whl", hash = "sha256:e541c3ef484852ef36545f66209444c48b28661e864ccadb29daddb6a4b8e5f5", size = 92279, upload-time = "2025-08-05T16:42:54.632Z" }, + { url = "https://files.pythonhosted.org/packages/4f/41/affea7181592ab0ab560044632571a38edaf9130b84928177823fbf3176a/audioop_lts-0.2.2-cp313-cp313t-win32.whl", hash = "sha256:d5e73fa573e273e4f2e5ff96f9043858a5e9311e94ffefd88a3186a910c70917", size = 26568, upload-time = "2025-08-05T16:42:55.627Z" }, + { url = "https://files.pythonhosted.org/packages/28/2b/0372842877016641db8fc54d5c88596b542eec2f8f6c20a36fb6612bf9ee/audioop_lts-0.2.2-cp313-cp313t-win_amd64.whl", hash = "sha256:9191d68659eda01e448188f60364c7763a7ca6653ed3f87ebb165822153a8547", size = 30942, upload-time = "2025-08-05T16:42:56.674Z" }, + { url = "https://files.pythonhosted.org/packages/ee/ca/baf2b9cc7e96c179bb4a54f30fcd83e6ecb340031bde68f486403f943768/audioop_lts-0.2.2-cp313-cp313t-win_arm64.whl", hash = "sha256:c174e322bb5783c099aaf87faeb240c8d210686b04bd61dfd05a8e5a83d88969", size = 24603, upload-time = "2025-08-05T16:42:57.571Z" }, + { url = "https://files.pythonhosted.org/packages/5c/73/413b5a2804091e2c7d5def1d618e4837f1cb82464e230f827226278556b7/audioop_lts-0.2.2-cp314-cp314t-macosx_10_13_universal2.whl", hash = "sha256:f9ee9b52f5f857fbaf9d605a360884f034c92c1c23021fb90b2e39b8e64bede6", size = 47104, upload-time = "2025-08-05T16:42:58.518Z" }, + { url = "https://files.pythonhosted.org/packages/ae/8c/daa3308dc6593944410c2c68306a5e217f5c05b70a12e70228e7dd42dc5c/audioop_lts-0.2.2-cp314-cp314t-macosx_10_13_x86_64.whl", hash = "sha256:49ee1a41738a23e98d98b937a0638357a2477bc99e61b0f768a8f654f45d9b7a", size = 27754, upload-time = "2025-08-05T16:43:00.132Z" }, + { url = "https://files.pythonhosted.org/packages/4e/86/c2e0f627168fcf61781a8f72cab06b228fe1da4b9fa4ab39cfb791b5836b/audioop_lts-0.2.2-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:5b00be98ccd0fc123dcfad31d50030d25fcf31488cde9e61692029cd7394733b", size = 27332, upload-time = "2025-08-05T16:43:01.666Z" }, + { url = "https://files.pythonhosted.org/packages/c7/bd/35dce665255434f54e5307de39e31912a6f902d4572da7c37582809de14f/audioop_lts-0.2.2-cp314-cp314t-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:a6d2e0f9f7a69403e388894d4ca5ada5c47230716a03f2847cfc7bd1ecb589d6", size = 92396, upload-time = "2025-08-05T16:43:02.991Z" }, + { url = "https://files.pythonhosted.org/packages/2d/d2/deeb9f51def1437b3afa35aeb729d577c04bcd89394cb56f9239a9f50b6f/audioop_lts-0.2.2-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:f9b0b8a03ef474f56d1a842af1a2e01398b8f7654009823c6d9e0ecff4d5cfbf", size = 91811, upload-time = "2025-08-05T16:43:04.096Z" }, + { url = "https://files.pythonhosted.org/packages/76/3b/09f8b35b227cee28cc8231e296a82759ed80c1a08e349811d69773c48426/audioop_lts-0.2.2-cp314-cp314t-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:2b267b70747d82125f1a021506565bdc5609a2b24bcb4773c16d79d2bb260bbd", size = 100483, upload-time = "2025-08-05T16:43:05.085Z" }, + { url = "https://files.pythonhosted.org/packages/0b/15/05b48a935cf3b130c248bfdbdea71ce6437f5394ee8533e0edd7cfd93d5e/audioop_lts-0.2.2-cp314-cp314t-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:0337d658f9b81f4cd0fdb1f47635070cc084871a3d4646d9de74fdf4e7c3d24a", size = 103885, upload-time = "2025-08-05T16:43:06.197Z" }, + { url = "https://files.pythonhosted.org/packages/83/80/186b7fce6d35b68d3d739f228dc31d60b3412105854edb975aa155a58339/audioop_lts-0.2.2-cp314-cp314t-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:167d3b62586faef8b6b2275c3218796b12621a60e43f7e9d5845d627b9c9b80e", size = 84899, upload-time = "2025-08-05T16:43:07.291Z" }, + { url = "https://files.pythonhosted.org/packages/49/89/c78cc5ac6cb5828f17514fb12966e299c850bc885e80f8ad94e38d450886/audioop_lts-0.2.2-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:0d9385e96f9f6da847f4d571ce3cb15b5091140edf3db97276872647ce37efd7", size = 89998, upload-time = "2025-08-05T16:43:08.335Z" }, + { url = "https://files.pythonhosted.org/packages/4c/4b/6401888d0c010e586c2ca50fce4c903d70a6bb55928b16cfbdfd957a13da/audioop_lts-0.2.2-cp314-cp314t-musllinux_1_2_ppc64le.whl", hash = "sha256:48159d96962674eccdca9a3df280e864e8ac75e40a577cc97c5c42667ffabfc5", size = 99046, upload-time = "2025-08-05T16:43:09.367Z" }, + { url = "https://files.pythonhosted.org/packages/de/f8/c874ca9bb447dae0e2ef2e231f6c4c2b0c39e31ae684d2420b0f9e97ee68/audioop_lts-0.2.2-cp314-cp314t-musllinux_1_2_riscv64.whl", hash = "sha256:8fefe5868cd082db1186f2837d64cfbfa78b548ea0d0543e9b28935ccce81ce9", size = 84843, upload-time = "2025-08-05T16:43:10.749Z" }, + { url = "https://files.pythonhosted.org/packages/3e/c0/0323e66f3daebc13fd46b36b30c3be47e3fc4257eae44f1e77eb828c703f/audioop_lts-0.2.2-cp314-cp314t-musllinux_1_2_s390x.whl", hash = "sha256:58cf54380c3884fb49fdd37dfb7a772632b6701d28edd3e2904743c5e1773602", size = 94490, upload-time = "2025-08-05T16:43:12.131Z" }, + { url = "https://files.pythonhosted.org/packages/98/6b/acc7734ac02d95ab791c10c3f17ffa3584ccb9ac5c18fd771c638ed6d1f5/audioop_lts-0.2.2-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:088327f00488cdeed296edd9215ca159f3a5a5034741465789cad403fcf4bec0", size = 92297, upload-time = "2025-08-05T16:43:13.139Z" }, + { url = "https://files.pythonhosted.org/packages/13/c3/c3dc3f564ce6877ecd2a05f8d751b9b27a8c320c2533a98b0c86349778d0/audioop_lts-0.2.2-cp314-cp314t-win32.whl", hash = "sha256:068aa17a38b4e0e7de771c62c60bbca2455924b67a8814f3b0dee92b5820c0b3", size = 27331, upload-time = "2025-08-05T16:43:14.19Z" }, + { url = "https://files.pythonhosted.org/packages/72/bb/b4608537e9ffcb86449091939d52d24a055216a36a8bf66b936af8c3e7ac/audioop_lts-0.2.2-cp314-cp314t-win_amd64.whl", hash = "sha256:a5bf613e96f49712073de86f20dbdd4014ca18efd4d34ed18c75bd808337851b", size = 31697, upload-time = "2025-08-05T16:43:15.193Z" }, + { url = "https://files.pythonhosted.org/packages/f6/22/91616fe707a5c5510de2cac9b046a30defe7007ba8a0c04f9c08f27df312/audioop_lts-0.2.2-cp314-cp314t-win_arm64.whl", hash = "sha256:b492c3b040153e68b9fdaff5913305aaaba5bb433d8a7f73d5cf6a64ed3cc1dd", size = 25206, upload-time = "2025-08-05T16:43:16.444Z" }, +] + +[[package]] +name = "authlib" +version = "1.6.9" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "cryptography" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/af/98/00d3dd826d46959ad8e32af2dbb2398868fd9fd0683c26e56d0789bd0e68/authlib-1.6.9.tar.gz", hash = "sha256:d8f2421e7e5980cc1ddb4e32d3f5fa659cfaf60d8eaf3281ebed192e4ab74f04", size = 165134, upload-time = "2026-03-02T07:44:01.998Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/53/23/b65f568ed0c22f1efacb744d2db1a33c8068f384b8c9b482b52ebdbc3ef6/authlib-1.6.9-py2.py3-none-any.whl", hash = "sha256:f08b4c14e08f0861dc18a32357b33fbcfd2ea86cfe3fe149484b4d764c4a0ac3", size = 244197, upload-time = "2026-03-02T07:44:00.307Z" }, +] + +[[package]] +name = "backports-tarfile" +version = "1.2.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/86/72/cd9b395f25e290e633655a100af28cb253e4393396264a98bd5f5951d50f/backports_tarfile-1.2.0.tar.gz", hash = "sha256:d75e02c268746e1b8144c278978b6e98e85de6ad16f8e4b0844a154557eca991", size = 86406, upload-time = "2024-05-28T17:01:54.731Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/b9/fa/123043af240e49752f1c4bd24da5053b6bd00cad78c2be53c0d1e8b975bc/backports.tarfile-1.2.0-py3-none-any.whl", hash = "sha256:77e284d754527b01fb1e6fa8a1afe577858ebe4e9dad8919e34c862cb399bc34", size = 30181, upload-time = "2024-05-28T17:01:53.112Z" }, +] + +[[package]] +name = "beartype" +version = "0.22.9" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/c7/94/1009e248bbfbab11397abca7193bea6626806be9a327d399810d523a07cb/beartype-0.22.9.tar.gz", hash = "sha256:8f82b54aa723a2848a56008d18875f91c1db02c32ef6a62319a002e3e25a975f", size = 1608866, upload-time = "2025-12-13T06:50:30.72Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/71/cc/18245721fa7747065ab478316c7fea7c74777d07f37ae60db2e84f8172e8/beartype-0.22.9-py3-none-any.whl", hash = "sha256:d16c9bbc61ea14637596c5f6fbff2ee99cbe3573e46a716401734ef50c3060c2", size = 1333658, upload-time = "2025-12-13T06:50:28.266Z" }, +] + +[[package]] +name = "brotli" +version = "1.2.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/f7/16/c92ca344d646e71a43b8bb353f0a6490d7f6e06210f8554c8f874e454285/brotli-1.2.0.tar.gz", hash = "sha256:e310f77e41941c13340a95976fe66a8a95b01e783d430eeaf7a2f87e0a57dd0a", size = 7388632, upload-time = "2025-11-05T18:39:42.86Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/7a/ef/f285668811a9e1ddb47a18cb0b437d5fc2760d537a2fe8a57875ad6f8448/brotli-1.2.0-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:15b33fe93cedc4caaff8a0bd1eb7e3dab1c61bb22a0bf5bdfdfd97cd7da79744", size = 863110, upload-time = "2025-11-05T18:38:12.978Z" }, + { url = "https://files.pythonhosted.org/packages/50/62/a3b77593587010c789a9d6eaa527c79e0848b7b860402cc64bc0bc28a86c/brotli-1.2.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:898be2be399c221d2671d29eed26b6b2713a02c2119168ed914e7d00ceadb56f", size = 445438, upload-time = "2025-11-05T18:38:14.208Z" }, + { url = "https://files.pythonhosted.org/packages/cd/e1/7fadd47f40ce5549dc44493877db40292277db373da5053aff181656e16e/brotli-1.2.0-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:350c8348f0e76fff0a0fd6c26755d2653863279d086d3aa2c290a6a7251135dd", size = 1534420, upload-time = "2025-11-05T18:38:15.111Z" }, + { url = "https://files.pythonhosted.org/packages/12/8b/1ed2f64054a5a008a4ccd2f271dbba7a5fb1a3067a99f5ceadedd4c1d5a7/brotli-1.2.0-cp311-cp311-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:2e1ad3fda65ae0d93fec742a128d72e145c9c7a99ee2fcd667785d99eb25a7fe", size = 1632619, upload-time = "2025-11-05T18:38:16.094Z" }, + { url = "https://files.pythonhosted.org/packages/89/5a/7071a621eb2d052d64efd5da2ef55ecdac7c3b0c6e4f9d519e9c66d987ef/brotli-1.2.0-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:40d918bce2b427a0c4ba189df7a006ac0c7277c180aee4617d99e9ccaaf59e6a", size = 1426014, upload-time = "2025-11-05T18:38:17.177Z" }, + { url = "https://files.pythonhosted.org/packages/26/6d/0971a8ea435af5156acaaccec1a505f981c9c80227633851f2810abd252a/brotli-1.2.0-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:2a7f1d03727130fc875448b65b127a9ec5d06d19d0148e7554384229706f9d1b", size = 1489661, upload-time = "2025-11-05T18:38:18.41Z" }, + { url = "https://files.pythonhosted.org/packages/f3/75/c1baca8b4ec6c96a03ef8230fab2a785e35297632f402ebb1e78a1e39116/brotli-1.2.0-cp311-cp311-musllinux_1_2_ppc64le.whl", hash = "sha256:9c79f57faa25d97900bfb119480806d783fba83cd09ee0b33c17623935b05fa3", size = 1599150, upload-time = "2025-11-05T18:38:19.792Z" }, + { url = "https://files.pythonhosted.org/packages/0d/1a/23fcfee1c324fd48a63d7ebf4bac3a4115bdb1b00e600f80f727d850b1ae/brotli-1.2.0-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:844a8ceb8483fefafc412f85c14f2aae2fb69567bf2a0de53cdb88b73e7c43ae", size = 1493505, upload-time = "2025-11-05T18:38:20.913Z" }, + { url = "https://files.pythonhosted.org/packages/36/e5/12904bbd36afeef53d45a84881a4810ae8810ad7e328a971ebbfd760a0b3/brotli-1.2.0-cp311-cp311-win32.whl", hash = "sha256:aa47441fa3026543513139cb8926a92a8e305ee9c71a6209ef7a97d91640ea03", size = 334451, upload-time = "2025-11-05T18:38:21.94Z" }, + { url = "https://files.pythonhosted.org/packages/02/8b/ecb5761b989629a4758c394b9301607a5880de61ee2ee5fe104b87149ebc/brotli-1.2.0-cp311-cp311-win_amd64.whl", hash = "sha256:022426c9e99fd65d9475dce5c195526f04bb8be8907607e27e747893f6ee3e24", size = 369035, upload-time = "2025-11-05T18:38:22.941Z" }, + { url = "https://files.pythonhosted.org/packages/11/ee/b0a11ab2315c69bb9b45a2aaed022499c9c24a205c3a49c3513b541a7967/brotli-1.2.0-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:35d382625778834a7f3061b15423919aa03e4f5da34ac8e02c074e4b75ab4f84", size = 861543, upload-time = "2025-11-05T18:38:24.183Z" }, + { url = "https://files.pythonhosted.org/packages/e1/2f/29c1459513cd35828e25531ebfcbf3e92a5e49f560b1777a9af7203eb46e/brotli-1.2.0-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:7a61c06b334bd99bc5ae84f1eeb36bfe01400264b3c352f968c6e30a10f9d08b", size = 444288, upload-time = "2025-11-05T18:38:25.139Z" }, + { url = "https://files.pythonhosted.org/packages/3d/6f/feba03130d5fceadfa3a1bb102cb14650798c848b1df2a808356f939bb16/brotli-1.2.0-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:acec55bb7c90f1dfc476126f9711a8e81c9af7fb617409a9ee2953115343f08d", size = 1528071, upload-time = "2025-11-05T18:38:26.081Z" }, + { url = "https://files.pythonhosted.org/packages/2b/38/f3abb554eee089bd15471057ba85f47e53a44a462cfce265d9bf7088eb09/brotli-1.2.0-cp312-cp312-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:260d3692396e1895c5034f204f0db022c056f9e2ac841593a4cf9426e2a3faca", size = 1626913, upload-time = "2025-11-05T18:38:27.284Z" }, + { url = "https://files.pythonhosted.org/packages/03/a7/03aa61fbc3c5cbf99b44d158665f9b0dd3d8059be16c460208d9e385c837/brotli-1.2.0-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:072e7624b1fc4d601036ab3f4f27942ef772887e876beff0301d261210bca97f", size = 1419762, upload-time = "2025-11-05T18:38:28.295Z" }, + { url = "https://files.pythonhosted.org/packages/21/1b/0374a89ee27d152a5069c356c96b93afd1b94eae83f1e004b57eb6ce2f10/brotli-1.2.0-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:adedc4a67e15327dfdd04884873c6d5a01d3e3b6f61406f99b1ed4865a2f6d28", size = 1484494, upload-time = "2025-11-05T18:38:29.29Z" }, + { url = "https://files.pythonhosted.org/packages/cf/57/69d4fe84a67aef4f524dcd075c6eee868d7850e85bf01d778a857d8dbe0a/brotli-1.2.0-cp312-cp312-musllinux_1_2_ppc64le.whl", hash = "sha256:7a47ce5c2288702e09dc22a44d0ee6152f2c7eda97b3c8482d826a1f3cfc7da7", size = 1593302, upload-time = "2025-11-05T18:38:30.639Z" }, + { url = "https://files.pythonhosted.org/packages/d5/3b/39e13ce78a8e9a621c5df3aeb5fd181fcc8caba8c48a194cd629771f6828/brotli-1.2.0-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:af43b8711a8264bb4e7d6d9a6d004c3a2019c04c01127a868709ec29962b6036", size = 1487913, upload-time = "2025-11-05T18:38:31.618Z" }, + { url = "https://files.pythonhosted.org/packages/62/28/4d00cb9bd76a6357a66fcd54b4b6d70288385584063f4b07884c1e7286ac/brotli-1.2.0-cp312-cp312-win32.whl", hash = "sha256:e99befa0b48f3cd293dafeacdd0d191804d105d279e0b387a32054c1180f3161", size = 334362, upload-time = "2025-11-05T18:38:32.939Z" }, + { url = "https://files.pythonhosted.org/packages/1c/4e/bc1dcac9498859d5e353c9b153627a3752868a9d5f05ce8dedd81a2354ab/brotli-1.2.0-cp312-cp312-win_amd64.whl", hash = "sha256:b35c13ce241abdd44cb8ca70683f20c0c079728a36a996297adb5334adfc1c44", size = 369115, upload-time = "2025-11-05T18:38:33.765Z" }, + { url = "https://files.pythonhosted.org/packages/6c/d4/4ad5432ac98c73096159d9ce7ffeb82d151c2ac84adcc6168e476bb54674/brotli-1.2.0-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:9e5825ba2c9998375530504578fd4d5d1059d09621a02065d1b6bfc41a8e05ab", size = 861523, upload-time = "2025-11-05T18:38:34.67Z" }, + { url = "https://files.pythonhosted.org/packages/91/9f/9cc5bd03ee68a85dc4bc89114f7067c056a3c14b3d95f171918c088bf88d/brotli-1.2.0-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:0cf8c3b8ba93d496b2fae778039e2f5ecc7cff99df84df337ca31d8f2252896c", size = 444289, upload-time = "2025-11-05T18:38:35.6Z" }, + { url = "https://files.pythonhosted.org/packages/2e/b6/fe84227c56a865d16a6614e2c4722864b380cb14b13f3e6bef441e73a85a/brotli-1.2.0-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:c8565e3cdc1808b1a34714b553b262c5de5fbda202285782173ec137fd13709f", size = 1528076, upload-time = "2025-11-05T18:38:36.639Z" }, + { url = "https://files.pythonhosted.org/packages/55/de/de4ae0aaca06c790371cf6e7ee93a024f6b4bb0568727da8c3de112e726c/brotli-1.2.0-cp313-cp313-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:26e8d3ecb0ee458a9804f47f21b74845cc823fd1bb19f02272be70774f56e2a6", size = 1626880, upload-time = "2025-11-05T18:38:37.623Z" }, + { url = "https://files.pythonhosted.org/packages/5f/16/a1b22cbea436642e071adcaf8d4b350a2ad02f5e0ad0da879a1be16188a0/brotli-1.2.0-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:67a91c5187e1eec76a61625c77a6c8c785650f5b576ca732bd33ef58b0dff49c", size = 1419737, upload-time = "2025-11-05T18:38:38.729Z" }, + { url = "https://files.pythonhosted.org/packages/46/63/c968a97cbb3bdbf7f974ef5a6ab467a2879b82afbc5ffb65b8acbb744f95/brotli-1.2.0-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:4ecdb3b6dc36e6d6e14d3a1bdc6c1057c8cbf80db04031d566eb6080ce283a48", size = 1484440, upload-time = "2025-11-05T18:38:39.916Z" }, + { url = "https://files.pythonhosted.org/packages/06/9d/102c67ea5c9fc171f423e8399e585dabea29b5bc79b05572891e70013cdd/brotli-1.2.0-cp313-cp313-musllinux_1_2_ppc64le.whl", hash = "sha256:3e1b35d56856f3ed326b140d3c6d9db91740f22e14b06e840fe4bb1923439a18", size = 1593313, upload-time = "2025-11-05T18:38:41.24Z" }, + { url = "https://files.pythonhosted.org/packages/9e/4a/9526d14fa6b87bc827ba1755a8440e214ff90de03095cacd78a64abe2b7d/brotli-1.2.0-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:54a50a9dad16b32136b2241ddea9e4df159b41247b2ce6aac0b3276a66a8f1e5", size = 1487945, upload-time = "2025-11-05T18:38:42.277Z" }, + { url = "https://files.pythonhosted.org/packages/5b/e8/3fe1ffed70cbef83c5236166acaed7bb9c766509b157854c80e2f766b38c/brotli-1.2.0-cp313-cp313-win32.whl", hash = "sha256:1b1d6a4efedd53671c793be6dd760fcf2107da3a52331ad9ea429edf0902f27a", size = 334368, upload-time = "2025-11-05T18:38:43.345Z" }, + { url = "https://files.pythonhosted.org/packages/ff/91/e739587be970a113b37b821eae8097aac5a48e5f0eca438c22e4c7dd8648/brotli-1.2.0-cp313-cp313-win_amd64.whl", hash = "sha256:b63daa43d82f0cdabf98dee215b375b4058cce72871fd07934f179885aad16e8", size = 369116, upload-time = "2025-11-05T18:38:44.609Z" }, + { url = "https://files.pythonhosted.org/packages/17/e1/298c2ddf786bb7347a1cd71d63a347a79e5712a7c0cba9e3c3458ebd976f/brotli-1.2.0-cp314-cp314-macosx_10_15_universal2.whl", hash = "sha256:6c12dad5cd04530323e723787ff762bac749a7b256a5bece32b2243dd5c27b21", size = 863080, upload-time = "2025-11-05T18:38:45.503Z" }, + { url = "https://files.pythonhosted.org/packages/84/0c/aac98e286ba66868b2b3b50338ffbd85a35c7122e9531a73a37a29763d38/brotli-1.2.0-cp314-cp314-macosx_10_15_x86_64.whl", hash = "sha256:3219bd9e69868e57183316ee19c84e03e8f8b5a1d1f2667e1aa8c2f91cb061ac", size = 445453, upload-time = "2025-11-05T18:38:46.433Z" }, + { url = "https://files.pythonhosted.org/packages/ec/f1/0ca1f3f99ae300372635ab3fe2f7a79fa335fee3d874fa7f9e68575e0e62/brotli-1.2.0-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:963a08f3bebd8b75ac57661045402da15991468a621f014be54e50f53a58d19e", size = 1528168, upload-time = "2025-11-05T18:38:47.371Z" }, + { url = "https://files.pythonhosted.org/packages/d6/a6/2ebfc8f766d46df8d3e65b880a2e220732395e6d7dc312c1e1244b0f074a/brotli-1.2.0-cp314-cp314-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:9322b9f8656782414b37e6af884146869d46ab85158201d82bab9abbcb971dc7", size = 1627098, upload-time = "2025-11-05T18:38:48.385Z" }, + { url = "https://files.pythonhosted.org/packages/f3/2f/0976d5b097ff8a22163b10617f76b2557f15f0f39d6a0fe1f02b1a53e92b/brotli-1.2.0-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:cf9cba6f5b78a2071ec6fb1e7bd39acf35071d90a81231d67e92d637776a6a63", size = 1419861, upload-time = "2025-11-05T18:38:49.372Z" }, + { url = "https://files.pythonhosted.org/packages/9c/97/d76df7176a2ce7616ff94c1fb72d307c9a30d2189fe877f3dd99af00ea5a/brotli-1.2.0-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:7547369c4392b47d30a3467fe8c3330b4f2e0f7730e45e3103d7d636678a808b", size = 1484594, upload-time = "2025-11-05T18:38:50.655Z" }, + { url = "https://files.pythonhosted.org/packages/d3/93/14cf0b1216f43df5609f5b272050b0abd219e0b54ea80b47cef9867b45e7/brotli-1.2.0-cp314-cp314-musllinux_1_2_ppc64le.whl", hash = "sha256:fc1530af5c3c275b8524f2e24841cbe2599d74462455e9bae5109e9ff42e9361", size = 1593455, upload-time = "2025-11-05T18:38:51.624Z" }, + { url = "https://files.pythonhosted.org/packages/b3/73/3183c9e41ca755713bdf2cc1d0810df742c09484e2e1ddd693bee53877c1/brotli-1.2.0-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:d2d085ded05278d1c7f65560aae97b3160aeb2ea2c0b3e26204856beccb60888", size = 1488164, upload-time = "2025-11-05T18:38:53.079Z" }, + { url = "https://files.pythonhosted.org/packages/64/6a/0c78d8f3a582859236482fd9fa86a65a60328a00983006bcf6d83b7b2253/brotli-1.2.0-cp314-cp314-win32.whl", hash = "sha256:832c115a020e463c2f67664560449a7bea26b0c1fdd690352addad6d0a08714d", size = 339280, upload-time = "2025-11-05T18:38:54.02Z" }, + { url = "https://files.pythonhosted.org/packages/f5/10/56978295c14794b2c12007b07f3e41ba26acda9257457d7085b0bb3bb90c/brotli-1.2.0-cp314-cp314-win_amd64.whl", hash = "sha256:e7c0af964e0b4e3412a0ebf341ea26ec767fa0b4cf81abb5e897c9338b5ad6a3", size = 375639, upload-time = "2025-11-05T18:38:55.67Z" }, +] + +[[package]] +name = "cachetools" +version = "7.0.5" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/af/dd/57fe3fdb6e65b25a5987fd2cdc7e22db0aef508b91634d2e57d22928d41b/cachetools-7.0.5.tar.gz", hash = "sha256:0cd042c24377200c1dcd225f8b7b12b0ca53cc2c961b43757e774ebe190fd990", size = 37367, upload-time = "2026-03-09T20:51:29.451Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/06/f3/39cf3367b8107baa44f861dc802cbf16263c945b62d8265d36034fc07bea/cachetools-7.0.5-py3-none-any.whl", hash = "sha256:46bc8ebefbe485407621d0a4264b23c080cedd913921bad7ac3ed2f26c183114", size = 13918, upload-time = "2026-03-09T20:51:27.33Z" }, +] + +[[package]] +name = "caio" +version = "0.9.25" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/92/88/b8527e1b00c1811db339a1df8bd1ae49d146fcea9d6a5c40e3a80aaeb38d/caio-0.9.25.tar.gz", hash = "sha256:16498e7f81d1d0f5a4c0ad3f2540e65fe25691376e0a5bd367f558067113ed10", size = 26781, upload-time = "2025-12-26T15:21:36.501Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/ec/90/543f556fcfcfa270713eef906b6352ab048e1e557afec12925c991dc93c2/caio-0.9.25-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:d6956d9e4a27021c8bd6c9677f3a59eb1d820cc32d0343cea7961a03b1371965", size = 36839, upload-time = "2025-12-26T15:21:40.267Z" }, + { url = "https://files.pythonhosted.org/packages/51/3b/36f3e8ec38dafe8de4831decd2e44c69303d2a3892d16ceda42afed44e1b/caio-0.9.25-cp311-cp311-manylinux2010_x86_64.manylinux2014_x86_64.manylinux_2_12_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:bf84bfa039f25ad91f4f52944452a5f6f405e8afab4d445450978cd6241d1478", size = 80255, upload-time = "2025-12-26T15:22:20.271Z" }, + { url = "https://files.pythonhosted.org/packages/df/ce/65e64867d928e6aff1b4f0e12dba0ef6d5bf412c240dc1df9d421ac10573/caio-0.9.25-cp311-cp311-manylinux_2_34_aarch64.whl", hash = "sha256:ae3d62587332bce600f861a8de6256b1014d6485cfd25d68c15caf1611dd1f7c", size = 80052, upload-time = "2026-03-04T22:08:20.402Z" }, + { url = "https://files.pythonhosted.org/packages/46/90/e278863c47e14ec58309aa2e38a45882fbe67b4cc29ec9bc8f65852d3e45/caio-0.9.25-cp311-cp311-manylinux_2_34_x86_64.whl", hash = "sha256:fc220b8533dcf0f238a6b1a4a937f92024c71e7b10b5a2dfc1c73604a25709bc", size = 78273, upload-time = "2026-03-04T22:08:21.368Z" }, + { url = "https://files.pythonhosted.org/packages/d3/25/79c98ebe12df31548ba4eaf44db11b7cad6b3e7b4203718335620939083c/caio-0.9.25-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:fb7ff95af4c31ad3f03179149aab61097a71fd85e05f89b4786de0359dffd044", size = 36983, upload-time = "2025-12-26T15:21:36.075Z" }, + { url = "https://files.pythonhosted.org/packages/a3/2b/21288691f16d479945968a0a4f2856818c1c5be56881d51d4dac9b255d26/caio-0.9.25-cp312-cp312-manylinux2010_x86_64.manylinux2014_x86_64.manylinux_2_12_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:97084e4e30dfa598449d874c4d8e0c8d5ea17d2f752ef5e48e150ff9d240cd64", size = 82012, upload-time = "2025-12-26T15:22:20.983Z" }, + { url = "https://files.pythonhosted.org/packages/03/c4/8a1b580875303500a9c12b9e0af58cb82e47f5bcf888c2457742a138273c/caio-0.9.25-cp312-cp312-manylinux_2_34_aarch64.whl", hash = "sha256:4fa69eba47e0f041b9d4f336e2ad40740681c43e686b18b191b6c5f4c5544bfb", size = 81502, upload-time = "2026-03-04T22:08:22.381Z" }, + { url = "https://files.pythonhosted.org/packages/d1/1c/0fe770b8ffc8362c48134d1592d653a81a3d8748d764bec33864db36319d/caio-0.9.25-cp312-cp312-manylinux_2_34_x86_64.whl", hash = "sha256:6bebf6f079f1341d19f7386db9b8b1f07e8cc15ae13bfdaff573371ba0575d69", size = 80200, upload-time = "2026-03-04T22:08:23.382Z" }, + { url = "https://files.pythonhosted.org/packages/31/57/5e6ff127e6f62c9f15d989560435c642144aa4210882f9494204bc892305/caio-0.9.25-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:d6c2a3411af97762a2b03840c3cec2f7f728921ff8adda53d7ea2315a8563451", size = 36979, upload-time = "2025-12-26T15:21:35.484Z" }, + { url = "https://files.pythonhosted.org/packages/a3/9f/f21af50e72117eb528c422d4276cbac11fb941b1b812b182e0a9c70d19c5/caio-0.9.25-cp313-cp313-manylinux2010_x86_64.manylinux2014_x86_64.manylinux_2_12_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:0998210a4d5cd5cb565b32ccfe4e53d67303f868a76f212e002a8554692870e6", size = 81900, upload-time = "2025-12-26T15:22:21.919Z" }, + { url = "https://files.pythonhosted.org/packages/9c/12/c39ae2a4037cb10ad5eb3578eb4d5f8c1a2575c62bba675f3406b7ef0824/caio-0.9.25-cp313-cp313-manylinux_2_34_aarch64.whl", hash = "sha256:1a177d4777141b96f175fe2c37a3d96dec7911ed9ad5f02bac38aaa1c936611f", size = 81523, upload-time = "2026-03-04T22:08:25.187Z" }, + { url = "https://files.pythonhosted.org/packages/22/59/f8f2e950eb4f1a5a3883e198dca514b9d475415cb6cd7b78b9213a0dd45a/caio-0.9.25-cp313-cp313-manylinux_2_34_x86_64.whl", hash = "sha256:9ed3cfb28c0e99fec5e208c934e5c157d0866aa9c32aa4dc5e9b6034af6286b7", size = 80243, upload-time = "2026-03-04T22:08:26.449Z" }, + { url = "https://files.pythonhosted.org/packages/69/ca/a08fdc7efdcc24e6a6131a93c85be1f204d41c58f474c42b0670af8c016b/caio-0.9.25-cp314-cp314-macosx_10_15_universal2.whl", hash = "sha256:fab6078b9348e883c80a5e14b382e6ad6aabbc4429ca034e76e730cf464269db", size = 36978, upload-time = "2025-12-26T15:21:41.055Z" }, + { url = "https://files.pythonhosted.org/packages/5e/6c/d4d24f65e690213c097174d26eda6831f45f4734d9d036d81790a27e7b78/caio-0.9.25-cp314-cp314-manylinux2010_x86_64.manylinux2014_x86_64.manylinux_2_12_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:44a6b58e52d488c75cfaa5ecaa404b2b41cc965e6c417e03251e868ecd5b6d77", size = 81832, upload-time = "2025-12-26T15:22:22.757Z" }, + { url = "https://files.pythonhosted.org/packages/87/a4/e534cf7d2d0e8d880e25dd61e8d921ffcfe15bd696734589826f5a2df727/caio-0.9.25-cp314-cp314-manylinux_2_34_aarch64.whl", hash = "sha256:628a630eb7fb22381dd8e3c8ab7f59e854b9c806639811fc3f4310c6bd711d79", size = 81565, upload-time = "2026-03-04T22:08:27.483Z" }, + { url = "https://files.pythonhosted.org/packages/3f/ed/bf81aeac1d290017e5e5ac3e880fd56ee15e50a6d0353986799d1bc5cfd5/caio-0.9.25-cp314-cp314-manylinux_2_34_x86_64.whl", hash = "sha256:0ba16aa605ccb174665357fc729cf500679c2d94d5f1458a6f0d5ca48f2060a7", size = 80071, upload-time = "2026-03-04T22:08:28.751Z" }, + { url = "https://files.pythonhosted.org/packages/86/93/1f76c8d1bafe3b0614e06b2195784a3765bbf7b0a067661af9e2dd47fc33/caio-0.9.25-py3-none-any.whl", hash = "sha256:06c0bb02d6b929119b1cfbe1ca403c768b2013a369e2db46bfa2a5761cf82e40", size = 19087, upload-time = "2025-12-26T15:22:00.221Z" }, +] + +[[package]] +name = "certifi" +version = "2026.2.25" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/af/2d/7bf41579a8986e348fa033a31cdd0e4121114f6bce2457e8876010b092dd/certifi-2026.2.25.tar.gz", hash = "sha256:e887ab5cee78ea814d3472169153c2d12cd43b14bd03329a39a9c6e2e80bfba7", size = 155029, upload-time = "2026-02-25T02:54:17.342Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/9a/3c/c17fb3ca2d9c3acff52e30b309f538586f9f5b9c9cf454f3845fc9af4881/certifi-2026.2.25-py3-none-any.whl", hash = "sha256:027692e4402ad994f1c42e52a4997a9763c646b73e4096e4d5d6db8af1d6f0fa", size = 153684, upload-time = "2026-02-25T02:54:15.766Z" }, +] + +[[package]] +name = "cffi" +version = "2.0.0" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "pycparser", marker = "implementation_name != 'PyPy'" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/eb/56/b1ba7935a17738ae8453301356628e8147c79dbb825bcbc73dc7401f9846/cffi-2.0.0.tar.gz", hash = "sha256:44d1b5909021139fe36001ae048dbdde8214afa20200eda0f64c068cac5d5529", size = 523588, upload-time = "2025-09-08T23:24:04.541Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/12/4a/3dfd5f7850cbf0d06dc84ba9aa00db766b52ca38d8b86e3a38314d52498c/cffi-2.0.0-cp311-cp311-macosx_10_13_x86_64.whl", hash = "sha256:b4c854ef3adc177950a8dfc81a86f5115d2abd545751a304c5bcf2c2c7283cfe", size = 184344, upload-time = "2025-09-08T23:22:26.456Z" }, + { url = "https://files.pythonhosted.org/packages/4f/8b/f0e4c441227ba756aafbe78f117485b25bb26b1c059d01f137fa6d14896b/cffi-2.0.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:2de9a304e27f7596cd03d16f1b7c72219bd944e99cc52b84d0145aefb07cbd3c", size = 180560, upload-time = "2025-09-08T23:22:28.197Z" }, + { url = "https://files.pythonhosted.org/packages/b1/b7/1200d354378ef52ec227395d95c2576330fd22a869f7a70e88e1447eb234/cffi-2.0.0-cp311-cp311-manylinux1_i686.manylinux2014_i686.manylinux_2_17_i686.manylinux_2_5_i686.whl", hash = "sha256:baf5215e0ab74c16e2dd324e8ec067ef59e41125d3eade2b863d294fd5035c92", size = 209613, upload-time = "2025-09-08T23:22:29.475Z" }, + { url = "https://files.pythonhosted.org/packages/b8/56/6033f5e86e8cc9bb629f0077ba71679508bdf54a9a5e112a3c0b91870332/cffi-2.0.0-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:730cacb21e1bdff3ce90babf007d0a0917cc3e6492f336c2f0134101e0944f93", size = 216476, upload-time = "2025-09-08T23:22:31.063Z" }, + { url = "https://files.pythonhosted.org/packages/dc/7f/55fecd70f7ece178db2f26128ec41430d8720f2d12ca97bf8f0a628207d5/cffi-2.0.0-cp311-cp311-manylinux2014_ppc64le.manylinux_2_17_ppc64le.whl", hash = "sha256:6824f87845e3396029f3820c206e459ccc91760e8fa24422f8b0c3d1731cbec5", size = 203374, upload-time = "2025-09-08T23:22:32.507Z" }, + { url = "https://files.pythonhosted.org/packages/84/ef/a7b77c8bdc0f77adc3b46888f1ad54be8f3b7821697a7b89126e829e676a/cffi-2.0.0-cp311-cp311-manylinux2014_s390x.manylinux_2_17_s390x.whl", hash = "sha256:9de40a7b0323d889cf8d23d1ef214f565ab154443c42737dfe52ff82cf857664", size = 202597, upload-time = "2025-09-08T23:22:34.132Z" }, + { url = "https://files.pythonhosted.org/packages/d7/91/500d892b2bf36529a75b77958edfcd5ad8e2ce4064ce2ecfeab2125d72d1/cffi-2.0.0-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:8941aaadaf67246224cee8c3803777eed332a19d909b47e29c9842ef1e79ac26", size = 215574, upload-time = "2025-09-08T23:22:35.443Z" }, + { url = "https://files.pythonhosted.org/packages/44/64/58f6255b62b101093d5df22dcb752596066c7e89dd725e0afaed242a61be/cffi-2.0.0-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:a05d0c237b3349096d3981b727493e22147f934b20f6f125a3eba8f994bec4a9", size = 218971, upload-time = "2025-09-08T23:22:36.805Z" }, + { url = "https://files.pythonhosted.org/packages/ab/49/fa72cebe2fd8a55fbe14956f9970fe8eb1ac59e5df042f603ef7c8ba0adc/cffi-2.0.0-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:94698a9c5f91f9d138526b48fe26a199609544591f859c870d477351dc7b2414", size = 211972, upload-time = "2025-09-08T23:22:38.436Z" }, + { url = "https://files.pythonhosted.org/packages/0b/28/dd0967a76aab36731b6ebfe64dec4e981aff7e0608f60c2d46b46982607d/cffi-2.0.0-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:5fed36fccc0612a53f1d4d9a816b50a36702c28a2aa880cb8a122b3466638743", size = 217078, upload-time = "2025-09-08T23:22:39.776Z" }, + { url = "https://files.pythonhosted.org/packages/2b/c0/015b25184413d7ab0a410775fdb4a50fca20f5589b5dab1dbbfa3baad8ce/cffi-2.0.0-cp311-cp311-win32.whl", hash = "sha256:c649e3a33450ec82378822b3dad03cc228b8f5963c0c12fc3b1e0ab940f768a5", size = 172076, upload-time = "2025-09-08T23:22:40.95Z" }, + { url = "https://files.pythonhosted.org/packages/ae/8f/dc5531155e7070361eb1b7e4c1a9d896d0cb21c49f807a6c03fd63fc877e/cffi-2.0.0-cp311-cp311-win_amd64.whl", hash = "sha256:66f011380d0e49ed280c789fbd08ff0d40968ee7b665575489afa95c98196ab5", size = 182820, upload-time = "2025-09-08T23:22:42.463Z" }, + { url = "https://files.pythonhosted.org/packages/95/5c/1b493356429f9aecfd56bc171285a4c4ac8697f76e9bbbbb105e537853a1/cffi-2.0.0-cp311-cp311-win_arm64.whl", hash = "sha256:c6638687455baf640e37344fe26d37c404db8b80d037c3d29f58fe8d1c3b194d", size = 177635, upload-time = "2025-09-08T23:22:43.623Z" }, + { url = "https://files.pythonhosted.org/packages/ea/47/4f61023ea636104d4f16ab488e268b93008c3d0bb76893b1b31db1f96802/cffi-2.0.0-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:6d02d6655b0e54f54c4ef0b94eb6be0607b70853c45ce98bd278dc7de718be5d", size = 185271, upload-time = "2025-09-08T23:22:44.795Z" }, + { url = "https://files.pythonhosted.org/packages/df/a2/781b623f57358e360d62cdd7a8c681f074a71d445418a776eef0aadb4ab4/cffi-2.0.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:8eca2a813c1cb7ad4fb74d368c2ffbbb4789d377ee5bb8df98373c2cc0dee76c", size = 181048, upload-time = "2025-09-08T23:22:45.938Z" }, + { url = "https://files.pythonhosted.org/packages/ff/df/a4f0fbd47331ceeba3d37c2e51e9dfc9722498becbeec2bd8bc856c9538a/cffi-2.0.0-cp312-cp312-manylinux1_i686.manylinux2014_i686.manylinux_2_17_i686.manylinux_2_5_i686.whl", hash = "sha256:21d1152871b019407d8ac3985f6775c079416c282e431a4da6afe7aefd2bccbe", size = 212529, upload-time = "2025-09-08T23:22:47.349Z" }, + { url = "https://files.pythonhosted.org/packages/d5/72/12b5f8d3865bf0f87cf1404d8c374e7487dcf097a1c91c436e72e6badd83/cffi-2.0.0-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:b21e08af67b8a103c71a250401c78d5e0893beff75e28c53c98f4de42f774062", size = 220097, upload-time = "2025-09-08T23:22:48.677Z" }, + { url = "https://files.pythonhosted.org/packages/c2/95/7a135d52a50dfa7c882ab0ac17e8dc11cec9d55d2c18dda414c051c5e69e/cffi-2.0.0-cp312-cp312-manylinux2014_ppc64le.manylinux_2_17_ppc64le.whl", hash = "sha256:1e3a615586f05fc4065a8b22b8152f0c1b00cdbc60596d187c2a74f9e3036e4e", size = 207983, upload-time = "2025-09-08T23:22:50.06Z" }, + { url = "https://files.pythonhosted.org/packages/3a/c8/15cb9ada8895957ea171c62dc78ff3e99159ee7adb13c0123c001a2546c1/cffi-2.0.0-cp312-cp312-manylinux2014_s390x.manylinux_2_17_s390x.whl", hash = "sha256:81afed14892743bbe14dacb9e36d9e0e504cd204e0b165062c488942b9718037", size = 206519, upload-time = "2025-09-08T23:22:51.364Z" }, + { url = "https://files.pythonhosted.org/packages/78/2d/7fa73dfa841b5ac06c7b8855cfc18622132e365f5b81d02230333ff26e9e/cffi-2.0.0-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:3e17ed538242334bf70832644a32a7aae3d83b57567f9fd60a26257e992b79ba", size = 219572, upload-time = "2025-09-08T23:22:52.902Z" }, + { url = "https://files.pythonhosted.org/packages/07/e0/267e57e387b4ca276b90f0434ff88b2c2241ad72b16d31836adddfd6031b/cffi-2.0.0-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:3925dd22fa2b7699ed2617149842d2e6adde22b262fcbfada50e3d195e4b3a94", size = 222963, upload-time = "2025-09-08T23:22:54.518Z" }, + { url = "https://files.pythonhosted.org/packages/b6/75/1f2747525e06f53efbd878f4d03bac5b859cbc11c633d0fb81432d98a795/cffi-2.0.0-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:2c8f814d84194c9ea681642fd164267891702542f028a15fc97d4674b6206187", size = 221361, upload-time = "2025-09-08T23:22:55.867Z" }, + { url = "https://files.pythonhosted.org/packages/7b/2b/2b6435f76bfeb6bbf055596976da087377ede68df465419d192acf00c437/cffi-2.0.0-cp312-cp312-win32.whl", hash = "sha256:da902562c3e9c550df360bfa53c035b2f241fed6d9aef119048073680ace4a18", size = 172932, upload-time = "2025-09-08T23:22:57.188Z" }, + { url = "https://files.pythonhosted.org/packages/f8/ed/13bd4418627013bec4ed6e54283b1959cf6db888048c7cf4b4c3b5b36002/cffi-2.0.0-cp312-cp312-win_amd64.whl", hash = "sha256:da68248800ad6320861f129cd9c1bf96ca849a2771a59e0344e88681905916f5", size = 183557, upload-time = "2025-09-08T23:22:58.351Z" }, + { url = "https://files.pythonhosted.org/packages/95/31/9f7f93ad2f8eff1dbc1c3656d7ca5bfd8fb52c9d786b4dcf19b2d02217fa/cffi-2.0.0-cp312-cp312-win_arm64.whl", hash = "sha256:4671d9dd5ec934cb9a73e7ee9676f9362aba54f7f34910956b84d727b0d73fb6", size = 177762, upload-time = "2025-09-08T23:22:59.668Z" }, + { url = "https://files.pythonhosted.org/packages/4b/8d/a0a47a0c9e413a658623d014e91e74a50cdd2c423f7ccfd44086ef767f90/cffi-2.0.0-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:00bdf7acc5f795150faa6957054fbbca2439db2f775ce831222b66f192f03beb", size = 185230, upload-time = "2025-09-08T23:23:00.879Z" }, + { url = "https://files.pythonhosted.org/packages/4a/d2/a6c0296814556c68ee32009d9c2ad4f85f2707cdecfd7727951ec228005d/cffi-2.0.0-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:45d5e886156860dc35862657e1494b9bae8dfa63bf56796f2fb56e1679fc0bca", size = 181043, upload-time = "2025-09-08T23:23:02.231Z" }, + { url = "https://files.pythonhosted.org/packages/b0/1e/d22cc63332bd59b06481ceaac49d6c507598642e2230f201649058a7e704/cffi-2.0.0-cp313-cp313-manylinux1_i686.manylinux2014_i686.manylinux_2_17_i686.manylinux_2_5_i686.whl", hash = "sha256:07b271772c100085dd28b74fa0cd81c8fb1a3ba18b21e03d7c27f3436a10606b", size = 212446, upload-time = "2025-09-08T23:23:03.472Z" }, + { url = "https://files.pythonhosted.org/packages/a9/f5/a2c23eb03b61a0b8747f211eb716446c826ad66818ddc7810cc2cc19b3f2/cffi-2.0.0-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:d48a880098c96020b02d5a1f7d9251308510ce8858940e6fa99ece33f610838b", size = 220101, upload-time = "2025-09-08T23:23:04.792Z" }, + { url = "https://files.pythonhosted.org/packages/f2/7f/e6647792fc5850d634695bc0e6ab4111ae88e89981d35ac269956605feba/cffi-2.0.0-cp313-cp313-manylinux2014_ppc64le.manylinux_2_17_ppc64le.whl", hash = "sha256:f93fd8e5c8c0a4aa1f424d6173f14a892044054871c771f8566e4008eaa359d2", size = 207948, upload-time = "2025-09-08T23:23:06.127Z" }, + { url = "https://files.pythonhosted.org/packages/cb/1e/a5a1bd6f1fb30f22573f76533de12a00bf274abcdc55c8edab639078abb6/cffi-2.0.0-cp313-cp313-manylinux2014_s390x.manylinux_2_17_s390x.whl", hash = "sha256:dd4f05f54a52fb558f1ba9f528228066954fee3ebe629fc1660d874d040ae5a3", size = 206422, upload-time = "2025-09-08T23:23:07.753Z" }, + { url = "https://files.pythonhosted.org/packages/98/df/0a1755e750013a2081e863e7cd37e0cdd02664372c754e5560099eb7aa44/cffi-2.0.0-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:c8d3b5532fc71b7a77c09192b4a5a200ea992702734a2e9279a37f2478236f26", size = 219499, upload-time = "2025-09-08T23:23:09.648Z" }, + { url = "https://files.pythonhosted.org/packages/50/e1/a969e687fcf9ea58e6e2a928ad5e2dd88cc12f6f0ab477e9971f2309b57c/cffi-2.0.0-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:d9b29c1f0ae438d5ee9acb31cadee00a58c46cc9c0b2f9038c6b0b3470877a8c", size = 222928, upload-time = "2025-09-08T23:23:10.928Z" }, + { url = "https://files.pythonhosted.org/packages/36/54/0362578dd2c9e557a28ac77698ed67323ed5b9775ca9d3fe73fe191bb5d8/cffi-2.0.0-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:6d50360be4546678fc1b79ffe7a66265e28667840010348dd69a314145807a1b", size = 221302, upload-time = "2025-09-08T23:23:12.42Z" }, + { url = "https://files.pythonhosted.org/packages/eb/6d/bf9bda840d5f1dfdbf0feca87fbdb64a918a69bca42cfa0ba7b137c48cb8/cffi-2.0.0-cp313-cp313-win32.whl", hash = "sha256:74a03b9698e198d47562765773b4a8309919089150a0bb17d829ad7b44b60d27", size = 172909, upload-time = "2025-09-08T23:23:14.32Z" }, + { url = "https://files.pythonhosted.org/packages/37/18/6519e1ee6f5a1e579e04b9ddb6f1676c17368a7aba48299c3759bbc3c8b3/cffi-2.0.0-cp313-cp313-win_amd64.whl", hash = "sha256:19f705ada2530c1167abacb171925dd886168931e0a7b78f5bffcae5c6b5be75", size = 183402, upload-time = "2025-09-08T23:23:15.535Z" }, + { url = "https://files.pythonhosted.org/packages/cb/0e/02ceeec9a7d6ee63bb596121c2c8e9b3a9e150936f4fbef6ca1943e6137c/cffi-2.0.0-cp313-cp313-win_arm64.whl", hash = "sha256:256f80b80ca3853f90c21b23ee78cd008713787b1b1e93eae9f3d6a7134abd91", size = 177780, upload-time = "2025-09-08T23:23:16.761Z" }, + { url = "https://files.pythonhosted.org/packages/92/c4/3ce07396253a83250ee98564f8d7e9789fab8e58858f35d07a9a2c78de9f/cffi-2.0.0-cp314-cp314-macosx_10_13_x86_64.whl", hash = "sha256:fc33c5141b55ed366cfaad382df24fe7dcbc686de5be719b207bb248e3053dc5", size = 185320, upload-time = "2025-09-08T23:23:18.087Z" }, + { url = "https://files.pythonhosted.org/packages/59/dd/27e9fa567a23931c838c6b02d0764611c62290062a6d4e8ff7863daf9730/cffi-2.0.0-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:c654de545946e0db659b3400168c9ad31b5d29593291482c43e3564effbcee13", size = 181487, upload-time = "2025-09-08T23:23:19.622Z" }, + { url = "https://files.pythonhosted.org/packages/d6/43/0e822876f87ea8a4ef95442c3d766a06a51fc5298823f884ef87aaad168c/cffi-2.0.0-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:24b6f81f1983e6df8db3adc38562c83f7d4a0c36162885ec7f7b77c7dcbec97b", size = 220049, upload-time = "2025-09-08T23:23:20.853Z" }, + { url = "https://files.pythonhosted.org/packages/b4/89/76799151d9c2d2d1ead63c2429da9ea9d7aac304603de0c6e8764e6e8e70/cffi-2.0.0-cp314-cp314-manylinux2014_ppc64le.manylinux_2_17_ppc64le.whl", hash = "sha256:12873ca6cb9b0f0d3a0da705d6086fe911591737a59f28b7936bdfed27c0d47c", size = 207793, upload-time = "2025-09-08T23:23:22.08Z" }, + { url = "https://files.pythonhosted.org/packages/bb/dd/3465b14bb9e24ee24cb88c9e3730f6de63111fffe513492bf8c808a3547e/cffi-2.0.0-cp314-cp314-manylinux2014_s390x.manylinux_2_17_s390x.whl", hash = "sha256:d9b97165e8aed9272a6bb17c01e3cc5871a594a446ebedc996e2397a1c1ea8ef", size = 206300, upload-time = "2025-09-08T23:23:23.314Z" }, + { url = "https://files.pythonhosted.org/packages/47/d9/d83e293854571c877a92da46fdec39158f8d7e68da75bf73581225d28e90/cffi-2.0.0-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:afb8db5439b81cf9c9d0c80404b60c3cc9c3add93e114dcae767f1477cb53775", size = 219244, upload-time = "2025-09-08T23:23:24.541Z" }, + { url = "https://files.pythonhosted.org/packages/2b/0f/1f177e3683aead2bb00f7679a16451d302c436b5cbf2505f0ea8146ef59e/cffi-2.0.0-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:737fe7d37e1a1bffe70bd5754ea763a62a066dc5913ca57e957824b72a85e205", size = 222828, upload-time = "2025-09-08T23:23:26.143Z" }, + { url = "https://files.pythonhosted.org/packages/c6/0f/cafacebd4b040e3119dcb32fed8bdef8dfe94da653155f9d0b9dc660166e/cffi-2.0.0-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:38100abb9d1b1435bc4cc340bb4489635dc2f0da7456590877030c9b3d40b0c1", size = 220926, upload-time = "2025-09-08T23:23:27.873Z" }, + { url = "https://files.pythonhosted.org/packages/3e/aa/df335faa45b395396fcbc03de2dfcab242cd61a9900e914fe682a59170b1/cffi-2.0.0-cp314-cp314-win32.whl", hash = "sha256:087067fa8953339c723661eda6b54bc98c5625757ea62e95eb4898ad5e776e9f", size = 175328, upload-time = "2025-09-08T23:23:44.61Z" }, + { url = "https://files.pythonhosted.org/packages/bb/92/882c2d30831744296ce713f0feb4c1cd30f346ef747b530b5318715cc367/cffi-2.0.0-cp314-cp314-win_amd64.whl", hash = "sha256:203a48d1fb583fc7d78a4c6655692963b860a417c0528492a6bc21f1aaefab25", size = 185650, upload-time = "2025-09-08T23:23:45.848Z" }, + { url = "https://files.pythonhosted.org/packages/9f/2c/98ece204b9d35a7366b5b2c6539c350313ca13932143e79dc133ba757104/cffi-2.0.0-cp314-cp314-win_arm64.whl", hash = "sha256:dbd5c7a25a7cb98f5ca55d258b103a2054f859a46ae11aaf23134f9cc0d356ad", size = 180687, upload-time = "2025-09-08T23:23:47.105Z" }, + { url = "https://files.pythonhosted.org/packages/3e/61/c768e4d548bfa607abcda77423448df8c471f25dbe64fb2ef6d555eae006/cffi-2.0.0-cp314-cp314t-macosx_10_13_x86_64.whl", hash = "sha256:9a67fc9e8eb39039280526379fb3a70023d77caec1852002b4da7e8b270c4dd9", size = 188773, upload-time = "2025-09-08T23:23:29.347Z" }, + { url = "https://files.pythonhosted.org/packages/2c/ea/5f76bce7cf6fcd0ab1a1058b5af899bfbef198bea4d5686da88471ea0336/cffi-2.0.0-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:7a66c7204d8869299919db4d5069a82f1561581af12b11b3c9f48c584eb8743d", size = 185013, upload-time = "2025-09-08T23:23:30.63Z" }, + { url = "https://files.pythonhosted.org/packages/be/b4/c56878d0d1755cf9caa54ba71e5d049479c52f9e4afc230f06822162ab2f/cffi-2.0.0-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:7cc09976e8b56f8cebd752f7113ad07752461f48a58cbba644139015ac24954c", size = 221593, upload-time = "2025-09-08T23:23:31.91Z" }, + { url = "https://files.pythonhosted.org/packages/e0/0d/eb704606dfe8033e7128df5e90fee946bbcb64a04fcdaa97321309004000/cffi-2.0.0-cp314-cp314t-manylinux2014_ppc64le.manylinux_2_17_ppc64le.whl", hash = "sha256:92b68146a71df78564e4ef48af17551a5ddd142e5190cdf2c5624d0c3ff5b2e8", size = 209354, upload-time = "2025-09-08T23:23:33.214Z" }, + { url = "https://files.pythonhosted.org/packages/d8/19/3c435d727b368ca475fb8742ab97c9cb13a0de600ce86f62eab7fa3eea60/cffi-2.0.0-cp314-cp314t-manylinux2014_s390x.manylinux_2_17_s390x.whl", hash = "sha256:b1e74d11748e7e98e2f426ab176d4ed720a64412b6a15054378afdb71e0f37dc", size = 208480, upload-time = "2025-09-08T23:23:34.495Z" }, + { url = "https://files.pythonhosted.org/packages/d0/44/681604464ed9541673e486521497406fadcc15b5217c3e326b061696899a/cffi-2.0.0-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:28a3a209b96630bca57cce802da70c266eb08c6e97e5afd61a75611ee6c64592", size = 221584, upload-time = "2025-09-08T23:23:36.096Z" }, + { url = "https://files.pythonhosted.org/packages/25/8e/342a504ff018a2825d395d44d63a767dd8ebc927ebda557fecdaca3ac33a/cffi-2.0.0-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:7553fb2090d71822f02c629afe6042c299edf91ba1bf94951165613553984512", size = 224443, upload-time = "2025-09-08T23:23:37.328Z" }, + { url = "https://files.pythonhosted.org/packages/e1/5e/b666bacbbc60fbf415ba9988324a132c9a7a0448a9a8f125074671c0f2c3/cffi-2.0.0-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:6c6c373cfc5c83a975506110d17457138c8c63016b563cc9ed6e056a82f13ce4", size = 223437, upload-time = "2025-09-08T23:23:38.945Z" }, + { url = "https://files.pythonhosted.org/packages/a0/1d/ec1a60bd1a10daa292d3cd6bb0b359a81607154fb8165f3ec95fe003b85c/cffi-2.0.0-cp314-cp314t-win32.whl", hash = "sha256:1fc9ea04857caf665289b7a75923f2c6ed559b8298a1b8c49e59f7dd95c8481e", size = 180487, upload-time = "2025-09-08T23:23:40.423Z" }, + { url = "https://files.pythonhosted.org/packages/bf/41/4c1168c74fac325c0c8156f04b6749c8b6a8f405bbf91413ba088359f60d/cffi-2.0.0-cp314-cp314t-win_amd64.whl", hash = "sha256:d68b6cef7827e8641e8ef16f4494edda8b36104d79773a334beaa1e3521430f6", size = 191726, upload-time = "2025-09-08T23:23:41.742Z" }, + { url = "https://files.pythonhosted.org/packages/ae/3a/dbeec9d1ee0844c679f6bb5d6ad4e9f198b1224f4e7a32825f47f6192b0c/cffi-2.0.0-cp314-cp314t-win_arm64.whl", hash = "sha256:0a1527a803f0a659de1af2e1fd700213caba79377e27e4693648c2923da066f9", size = 184195, upload-time = "2025-09-08T23:23:43.004Z" }, +] + +[[package]] +name = "charset-normalizer" +version = "3.4.6" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/7b/60/e3bec1881450851b087e301bedc3daa9377a4d45f1c26aa90b0b235e38aa/charset_normalizer-3.4.6.tar.gz", hash = "sha256:1ae6b62897110aa7c79ea2f5dd38d1abca6db663687c0b1ad9aed6f6bae3d9d6", size = 143363, upload-time = "2026-03-15T18:53:25.478Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/62/28/ff6f234e628a2de61c458be2779cb182bc03f6eec12200d4a525bbfc9741/charset_normalizer-3.4.6-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:82060f995ab5003a2d6e0f4ad29065b7672b6593c8c63559beefe5b443242c3e", size = 293582, upload-time = "2026-03-15T18:50:25.454Z" }, + { url = "https://files.pythonhosted.org/packages/1c/b7/b1a117e5385cbdb3205f6055403c2a2a220c5ea80b8716c324eaf75c5c95/charset_normalizer-3.4.6-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:60c74963d8350241a79cb8feea80e54d518f72c26db618862a8f53e5023deaf9", size = 197240, upload-time = "2026-03-15T18:50:27.196Z" }, + { url = "https://files.pythonhosted.org/packages/a1/5f/2574f0f09f3c3bc1b2f992e20bce6546cb1f17e111c5be07308dc5427956/charset_normalizer-3.4.6-cp311-cp311-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:f6e4333fb15c83f7d1482a76d45a0818897b3d33f00efd215528ff7c51b8e35d", size = 217363, upload-time = "2026-03-15T18:50:28.601Z" }, + { url = "https://files.pythonhosted.org/packages/4a/d1/0ae20ad77bc949ddd39b51bf383b6ca932f2916074c95cad34ae465ab71f/charset_normalizer-3.4.6-cp311-cp311-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:bc72863f4d9aba2e8fd9085e63548a324ba706d2ea2c83b260da08a59b9482de", size = 212994, upload-time = "2026-03-15T18:50:30.102Z" }, + { url = "https://files.pythonhosted.org/packages/60/ac/3233d262a310c1b12633536a07cde5ddd16985e6e7e238e9f3f9423d8eb9/charset_normalizer-3.4.6-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:9cc4fc6c196d6a8b76629a70ddfcd4635a6898756e2d9cac5565cf0654605d73", size = 204697, upload-time = "2026-03-15T18:50:31.654Z" }, + { url = "https://files.pythonhosted.org/packages/25/3c/8a18fc411f085b82303cfb7154eed5bd49c77035eb7608d049468b53f87c/charset_normalizer-3.4.6-cp311-cp311-manylinux_2_31_armv7l.whl", hash = "sha256:0c173ce3a681f309f31b87125fecec7a5d1347261ea11ebbb856fa6006b23c8c", size = 191673, upload-time = "2026-03-15T18:50:33.433Z" }, + { url = "https://files.pythonhosted.org/packages/ff/a7/11cfe61d6c5c5c7438d6ba40919d0306ed83c9ab957f3d4da2277ff67836/charset_normalizer-3.4.6-cp311-cp311-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:c907cdc8109f6c619e6254212e794d6548373cc40e1ec75e6e3823d9135d29cc", size = 201120, upload-time = "2026-03-15T18:50:35.105Z" }, + { url = "https://files.pythonhosted.org/packages/b5/10/cf491fa1abd47c02f69687046b896c950b92b6cd7337a27e6548adbec8e4/charset_normalizer-3.4.6-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:404a1e552cf5b675a87f0651f8b79f5f1e6fd100ee88dc612f89aa16abd4486f", size = 200911, upload-time = "2026-03-15T18:50:36.819Z" }, + { url = "https://files.pythonhosted.org/packages/28/70/039796160b48b18ed466fde0af84c1b090c4e288fae26cd674ad04a2d703/charset_normalizer-3.4.6-cp311-cp311-musllinux_1_2_armv7l.whl", hash = "sha256:e3c701e954abf6fc03a49f7c579cc80c2c6cc52525340ca3186c41d3f33482ef", size = 192516, upload-time = "2026-03-15T18:50:38.228Z" }, + { url = "https://files.pythonhosted.org/packages/ff/34/c56f3223393d6ff3124b9e78f7de738047c2d6bc40a4f16ac0c9d7a1cb3c/charset_normalizer-3.4.6-cp311-cp311-musllinux_1_2_ppc64le.whl", hash = "sha256:7a6967aaf043bceabab5412ed6bd6bd26603dae84d5cb75bf8d9a74a4959d398", size = 218795, upload-time = "2026-03-15T18:50:39.664Z" }, + { url = "https://files.pythonhosted.org/packages/e8/3b/ce2d4f86c5282191a041fdc5a4ce18f1c6bd40a5bd1f74cf8625f08d51c1/charset_normalizer-3.4.6-cp311-cp311-musllinux_1_2_riscv64.whl", hash = "sha256:5feb91325bbceade6afab43eb3b508c63ee53579fe896c77137ded51c6b6958e", size = 201833, upload-time = "2026-03-15T18:50:41.552Z" }, + { url = "https://files.pythonhosted.org/packages/3b/9b/b6a9f76b0fd7c5b5ec58b228ff7e85095370282150f0bd50b3126f5506d6/charset_normalizer-3.4.6-cp311-cp311-musllinux_1_2_s390x.whl", hash = "sha256:f820f24b09e3e779fe84c3c456cb4108a7aa639b0d1f02c28046e11bfcd088ed", size = 213920, upload-time = "2026-03-15T18:50:43.33Z" }, + { url = "https://files.pythonhosted.org/packages/ae/98/7bc23513a33d8172365ed30ee3a3b3fe1ece14a395e5fc94129541fc6003/charset_normalizer-3.4.6-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:b35b200d6a71b9839a46b9b7fff66b6638bb52fc9658aa58796b0326595d3021", size = 206951, upload-time = "2026-03-15T18:50:44.789Z" }, + { url = "https://files.pythonhosted.org/packages/32/73/c0b86f3d1458468e11aec870e6b3feac931facbe105a894b552b0e518e79/charset_normalizer-3.4.6-cp311-cp311-win32.whl", hash = "sha256:9ca4c0b502ab399ef89248a2c84c54954f77a070f28e546a85e91da627d1301e", size = 143703, upload-time = "2026-03-15T18:50:46.103Z" }, + { url = "https://files.pythonhosted.org/packages/c6/e3/76f2facfe8eddee0bbd38d2594e709033338eae44ebf1738bcefe0a06185/charset_normalizer-3.4.6-cp311-cp311-win_amd64.whl", hash = "sha256:a9e68c9d88823b274cf1e72f28cb5dc89c990edf430b0bfd3e2fb0785bfeabf4", size = 153857, upload-time = "2026-03-15T18:50:47.563Z" }, + { url = "https://files.pythonhosted.org/packages/e2/dc/9abe19c9b27e6cd3636036b9d1b387b78c40dedbf0b47f9366737684b4b0/charset_normalizer-3.4.6-cp311-cp311-win_arm64.whl", hash = "sha256:97d0235baafca5f2b09cf332cc275f021e694e8362c6bb9c96fc9a0eb74fc316", size = 142751, upload-time = "2026-03-15T18:50:49.234Z" }, + { url = "https://files.pythonhosted.org/packages/e5/62/c0815c992c9545347aeea7859b50dc9044d147e2e7278329c6e02ac9a616/charset_normalizer-3.4.6-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:2ef7fedc7a6ecbe99969cd09632516738a97eeb8bd7258bf8a0f23114c057dab", size = 295154, upload-time = "2026-03-15T18:50:50.88Z" }, + { url = "https://files.pythonhosted.org/packages/a8/37/bdca6613c2e3c58c7421891d80cc3efa1d32e882f7c4a7ee6039c3fc951a/charset_normalizer-3.4.6-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:a4ea868bc28109052790eb2b52a9ab33f3aa7adc02f96673526ff47419490e21", size = 199191, upload-time = "2026-03-15T18:50:52.658Z" }, + { url = "https://files.pythonhosted.org/packages/6c/92/9934d1bbd69f7f398b38c5dae1cbf9cc672e7c34a4adf7b17c0a9c17d15d/charset_normalizer-3.4.6-cp312-cp312-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:836ab36280f21fc1a03c99cd05c6b7af70d2697e374c7af0b61ed271401a72a2", size = 218674, upload-time = "2026-03-15T18:50:54.102Z" }, + { url = "https://files.pythonhosted.org/packages/af/90/25f6ab406659286be929fd89ab0e78e38aa183fc374e03aa3c12d730af8a/charset_normalizer-3.4.6-cp312-cp312-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:f1ce721c8a7dfec21fcbdfe04e8f68174183cf4e8188e0645e92aa23985c57ff", size = 215259, upload-time = "2026-03-15T18:50:55.616Z" }, + { url = "https://files.pythonhosted.org/packages/4e/ef/79a463eb0fff7f96afa04c1d4c51f8fc85426f918db467854bfb6a569ce3/charset_normalizer-3.4.6-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:0e28d62a8fc7a1fa411c43bd65e346f3bce9716dc51b897fbe930c5987b402d5", size = 207276, upload-time = "2026-03-15T18:50:57.054Z" }, + { url = "https://files.pythonhosted.org/packages/f7/72/d0426afec4b71dc159fa6b4e68f868cd5a3ecd918fec5813a15d292a7d10/charset_normalizer-3.4.6-cp312-cp312-manylinux_2_31_armv7l.whl", hash = "sha256:530d548084c4a9f7a16ed4a294d459b4f229db50df689bfe92027452452943a0", size = 195161, upload-time = "2026-03-15T18:50:58.686Z" }, + { url = "https://files.pythonhosted.org/packages/bf/18/c82b06a68bfcb6ce55e508225d210c7e6a4ea122bfc0748892f3dc4e8e11/charset_normalizer-3.4.6-cp312-cp312-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:30f445ae60aad5e1f8bdbb3108e39f6fbc09f4ea16c815c66578878325f8f15a", size = 203452, upload-time = "2026-03-15T18:51:00.196Z" }, + { url = "https://files.pythonhosted.org/packages/44/d6/0c25979b92f8adafdbb946160348d8d44aa60ce99afdc27df524379875cb/charset_normalizer-3.4.6-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:ac2393c73378fea4e52aa56285a3d64be50f1a12395afef9cce47772f60334c2", size = 202272, upload-time = "2026-03-15T18:51:01.703Z" }, + { url = "https://files.pythonhosted.org/packages/2e/3d/7fea3e8fe84136bebbac715dd1221cc25c173c57a699c030ab9b8900cbb7/charset_normalizer-3.4.6-cp312-cp312-musllinux_1_2_armv7l.whl", hash = "sha256:90ca27cd8da8118b18a52d5f547859cc1f8354a00cd1e8e5120df3e30d6279e5", size = 195622, upload-time = "2026-03-15T18:51:03.526Z" }, + { url = "https://files.pythonhosted.org/packages/57/8a/d6f7fd5cb96c58ef2f681424fbca01264461336d2a7fc875e4446b1f1346/charset_normalizer-3.4.6-cp312-cp312-musllinux_1_2_ppc64le.whl", hash = "sha256:8e5a94886bedca0f9b78fecd6afb6629142fd2605aa70a125d49f4edc6037ee6", size = 220056, upload-time = "2026-03-15T18:51:05.269Z" }, + { url = "https://files.pythonhosted.org/packages/16/50/478cdda782c8c9c3fb5da3cc72dd7f331f031e7f1363a893cdd6ca0f8de0/charset_normalizer-3.4.6-cp312-cp312-musllinux_1_2_riscv64.whl", hash = "sha256:695f5c2823691a25f17bc5d5ffe79fa90972cc34b002ac6c843bb8a1720e950d", size = 203751, upload-time = "2026-03-15T18:51:06.858Z" }, + { url = "https://files.pythonhosted.org/packages/75/fc/cc2fcac943939c8e4d8791abfa139f685e5150cae9f94b60f12520feaa9b/charset_normalizer-3.4.6-cp312-cp312-musllinux_1_2_s390x.whl", hash = "sha256:231d4da14bcd9301310faf492051bee27df11f2bc7549bc0bb41fef11b82daa2", size = 216563, upload-time = "2026-03-15T18:51:08.564Z" }, + { url = "https://files.pythonhosted.org/packages/a8/b7/a4add1d9a5f68f3d037261aecca83abdb0ab15960a3591d340e829b37298/charset_normalizer-3.4.6-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:a056d1ad2633548ca18ffa2f85c202cfb48b68615129143915b8dc72a806a923", size = 209265, upload-time = "2026-03-15T18:51:10.312Z" }, + { url = "https://files.pythonhosted.org/packages/6c/18/c094561b5d64a24277707698e54b7f67bd17a4f857bbfbb1072bba07c8bf/charset_normalizer-3.4.6-cp312-cp312-win32.whl", hash = "sha256:c2274ca724536f173122f36c98ce188fd24ce3dad886ec2b7af859518ce008a4", size = 144229, upload-time = "2026-03-15T18:51:11.694Z" }, + { url = "https://files.pythonhosted.org/packages/ab/20/0567efb3a8fd481b8f34f739ebddc098ed062a59fed41a8d193a61939e8f/charset_normalizer-3.4.6-cp312-cp312-win_amd64.whl", hash = "sha256:c8ae56368f8cc97c7e40a7ee18e1cedaf8e780cd8bc5ed5ac8b81f238614facb", size = 154277, upload-time = "2026-03-15T18:51:13.004Z" }, + { url = "https://files.pythonhosted.org/packages/15/57/28d79b44b51933119e21f65479d0864a8d5893e494cf5daab15df0247c17/charset_normalizer-3.4.6-cp312-cp312-win_arm64.whl", hash = "sha256:899d28f422116b08be5118ef350c292b36fc15ec2daeb9ea987c89281c7bb5c4", size = 142817, upload-time = "2026-03-15T18:51:14.408Z" }, + { url = "https://files.pythonhosted.org/packages/1e/1d/4fdabeef4e231153b6ed7567602f3b68265ec4e5b76d6024cf647d43d981/charset_normalizer-3.4.6-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:11afb56037cbc4b1555a34dd69151e8e069bee82e613a73bef6e714ce733585f", size = 294823, upload-time = "2026-03-15T18:51:15.755Z" }, + { url = "https://files.pythonhosted.org/packages/47/7b/20e809b89c69d37be748d98e84dce6820bf663cf19cf6b942c951a3e8f41/charset_normalizer-3.4.6-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:423fb7e748a08f854a08a222b983f4df1912b1daedce51a72bd24fe8f26a1843", size = 198527, upload-time = "2026-03-15T18:51:17.177Z" }, + { url = "https://files.pythonhosted.org/packages/37/a6/4f8d27527d59c039dce6f7622593cdcd3d70a8504d87d09eb11e9fdc6062/charset_normalizer-3.4.6-cp313-cp313-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:d73beaac5e90173ac3deb9928a74763a6d230f494e4bfb422c217a0ad8e629bf", size = 218388, upload-time = "2026-03-15T18:51:18.934Z" }, + { url = "https://files.pythonhosted.org/packages/f6/9b/4770ccb3e491a9bacf1c46cc8b812214fe367c86a96353ccc6daf87b01ec/charset_normalizer-3.4.6-cp313-cp313-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:d60377dce4511655582e300dc1e5a5f24ba0cb229005a1d5c8d0cb72bb758ab8", size = 214563, upload-time = "2026-03-15T18:51:20.374Z" }, + { url = "https://files.pythonhosted.org/packages/2b/58/a199d245894b12db0b957d627516c78e055adc3a0d978bc7f65ddaf7c399/charset_normalizer-3.4.6-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:530e8cebeea0d76bdcf93357aa5e41336f48c3dc709ac52da2bb167c5b8271d9", size = 206587, upload-time = "2026-03-15T18:51:21.807Z" }, + { url = "https://files.pythonhosted.org/packages/7e/70/3def227f1ec56f5c69dfc8392b8bd63b11a18ca8178d9211d7cc5e5e4f27/charset_normalizer-3.4.6-cp313-cp313-manylinux_2_31_armv7l.whl", hash = "sha256:a26611d9987b230566f24a0a125f17fe0de6a6aff9f25c9f564aaa2721a5fb88", size = 194724, upload-time = "2026-03-15T18:51:23.508Z" }, + { url = "https://files.pythonhosted.org/packages/58/ab/9318352e220c05efd31c2779a23b50969dc94b985a2efa643ed9077bfca5/charset_normalizer-3.4.6-cp313-cp313-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:34315ff4fc374b285ad7f4a0bf7dcbfe769e1b104230d40f49f700d4ab6bbd84", size = 202956, upload-time = "2026-03-15T18:51:25.239Z" }, + { url = "https://files.pythonhosted.org/packages/75/13/f3550a3ac25b70f87ac98c40d3199a8503676c2f1620efbf8d42095cfc40/charset_normalizer-3.4.6-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:5f8ddd609f9e1af8c7bd6e2aca279c931aefecd148a14402d4e368f3171769fd", size = 201923, upload-time = "2026-03-15T18:51:26.682Z" }, + { url = "https://files.pythonhosted.org/packages/1b/db/c5c643b912740b45e8eec21de1bbab8e7fc085944d37e1e709d3dcd9d72f/charset_normalizer-3.4.6-cp313-cp313-musllinux_1_2_armv7l.whl", hash = "sha256:80d0a5615143c0b3225e5e3ef22c8d5d51f3f72ce0ea6fb84c943546c7b25b6c", size = 195366, upload-time = "2026-03-15T18:51:28.129Z" }, + { url = "https://files.pythonhosted.org/packages/5a/67/3b1c62744f9b2448443e0eb160d8b001c849ec3fef591e012eda6484787c/charset_normalizer-3.4.6-cp313-cp313-musllinux_1_2_ppc64le.whl", hash = "sha256:92734d4d8d187a354a556626c221cd1a892a4e0802ccb2af432a1d85ec012194", size = 219752, upload-time = "2026-03-15T18:51:29.556Z" }, + { url = "https://files.pythonhosted.org/packages/f6/98/32ffbaf7f0366ffb0445930b87d103f6b406bc2c271563644bde8a2b1093/charset_normalizer-3.4.6-cp313-cp313-musllinux_1_2_riscv64.whl", hash = "sha256:613f19aa6e082cf96e17e3ffd89383343d0d589abda756b7764cf78361fd41dc", size = 203296, upload-time = "2026-03-15T18:51:30.921Z" }, + { url = "https://files.pythonhosted.org/packages/41/12/5d308c1bbe60cabb0c5ef511574a647067e2a1f631bc8634fcafaccd8293/charset_normalizer-3.4.6-cp313-cp313-musllinux_1_2_s390x.whl", hash = "sha256:2b1a63e8224e401cafe7739f77efd3f9e7f5f2026bda4aead8e59afab537784f", size = 215956, upload-time = "2026-03-15T18:51:32.399Z" }, + { url = "https://files.pythonhosted.org/packages/53/e9/5f85f6c5e20669dbe56b165c67b0260547dea97dba7e187938833d791687/charset_normalizer-3.4.6-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:6cceb5473417d28edd20c6c984ab6fee6c6267d38d906823ebfe20b03d607dc2", size = 208652, upload-time = "2026-03-15T18:51:34.214Z" }, + { url = "https://files.pythonhosted.org/packages/f1/11/897052ea6af56df3eef3ca94edafee410ca699ca0c7b87960ad19932c55e/charset_normalizer-3.4.6-cp313-cp313-win32.whl", hash = "sha256:d7de2637729c67d67cf87614b566626057e95c303bc0a55ffe391f5205e7003d", size = 143940, upload-time = "2026-03-15T18:51:36.15Z" }, + { url = "https://files.pythonhosted.org/packages/a1/5c/724b6b363603e419829f561c854b87ed7c7e31231a7908708ac086cdf3e2/charset_normalizer-3.4.6-cp313-cp313-win_amd64.whl", hash = "sha256:572d7c822caf521f0525ba1bce1a622a0b85cf47ffbdae6c9c19e3b5ac3c4389", size = 154101, upload-time = "2026-03-15T18:51:37.876Z" }, + { url = "https://files.pythonhosted.org/packages/01/a5/7abf15b4c0968e47020f9ca0935fb3274deb87cb288cd187cad92e8cdffd/charset_normalizer-3.4.6-cp313-cp313-win_arm64.whl", hash = "sha256:a4474d924a47185a06411e0064b803c68be044be2d60e50e8bddcc2649957c1f", size = 143109, upload-time = "2026-03-15T18:51:39.565Z" }, + { url = "https://files.pythonhosted.org/packages/25/6f/ffe1e1259f384594063ea1869bfb6be5cdb8bc81020fc36c3636bc8302a1/charset_normalizer-3.4.6-cp314-cp314-macosx_10_15_universal2.whl", hash = "sha256:9cc6e6d9e571d2f863fa77700701dae73ed5f78881efc8b3f9a4398772ff53e8", size = 294458, upload-time = "2026-03-15T18:51:41.134Z" }, + { url = "https://files.pythonhosted.org/packages/56/60/09bb6c13a8c1016c2ed5c6a6488e4ffef506461aa5161662bd7636936fb1/charset_normalizer-3.4.6-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:ef5960d965e67165d75b7c7ffc60a83ec5abfc5c11b764ec13ea54fbef8b4421", size = 199277, upload-time = "2026-03-15T18:51:42.953Z" }, + { url = "https://files.pythonhosted.org/packages/00/50/dcfbb72a5138bbefdc3332e8d81a23494bf67998b4b100703fd15fa52d81/charset_normalizer-3.4.6-cp314-cp314-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:b3694e3f87f8ac7ce279d4355645b3c878d24d1424581b46282f24b92f5a4ae2", size = 218758, upload-time = "2026-03-15T18:51:44.339Z" }, + { url = "https://files.pythonhosted.org/packages/03/b3/d79a9a191bb75f5aa81f3aaaa387ef29ce7cb7a9e5074ba8ea095cc073c2/charset_normalizer-3.4.6-cp314-cp314-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:5d11595abf8dd942a77883a39d81433739b287b6aa71620f15164f8096221b30", size = 215299, upload-time = "2026-03-15T18:51:45.871Z" }, + { url = "https://files.pythonhosted.org/packages/76/7e/bc8911719f7084f72fd545f647601ea3532363927f807d296a8c88a62c0d/charset_normalizer-3.4.6-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:7bda6eebafd42133efdca535b04ccb338ab29467b3f7bf79569883676fc628db", size = 206811, upload-time = "2026-03-15T18:51:47.308Z" }, + { url = "https://files.pythonhosted.org/packages/e2/40/c430b969d41dda0c465aa36cc7c2c068afb67177bef50905ac371b28ccc7/charset_normalizer-3.4.6-cp314-cp314-manylinux_2_31_armv7l.whl", hash = "sha256:bbc8c8650c6e51041ad1be191742b8b421d05bbd3410f43fa2a00c8db87678e8", size = 193706, upload-time = "2026-03-15T18:51:48.849Z" }, + { url = "https://files.pythonhosted.org/packages/48/15/e35e0590af254f7df984de1323640ef375df5761f615b6225ba8deb9799a/charset_normalizer-3.4.6-cp314-cp314-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:22c6f0c2fbc31e76c3b8a86fba1a56eda6166e238c29cdd3d14befdb4a4e4815", size = 202706, upload-time = "2026-03-15T18:51:50.257Z" }, + { url = "https://files.pythonhosted.org/packages/5e/bd/f736f7b9cc5e93a18b794a50346bb16fbfd6b37f99e8f306f7951d27c17c/charset_normalizer-3.4.6-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:7edbed096e4a4798710ed6bc75dcaa2a21b68b6c356553ac4823c3658d53743a", size = 202497, upload-time = "2026-03-15T18:51:52.012Z" }, + { url = "https://files.pythonhosted.org/packages/9d/ba/2cc9e3e7dfdf7760a6ed8da7446d22536f3d0ce114ac63dee2a5a3599e62/charset_normalizer-3.4.6-cp314-cp314-musllinux_1_2_armv7l.whl", hash = "sha256:7f9019c9cb613f084481bd6a100b12e1547cf2efe362d873c2e31e4035a6fa43", size = 193511, upload-time = "2026-03-15T18:51:53.723Z" }, + { url = "https://files.pythonhosted.org/packages/9e/cb/5be49b5f776e5613be07298c80e1b02a2d900f7a7de807230595c85a8b2e/charset_normalizer-3.4.6-cp314-cp314-musllinux_1_2_ppc64le.whl", hash = "sha256:58c948d0d086229efc484fe2f30c2d382c86720f55cd9bc33591774348ad44e0", size = 220133, upload-time = "2026-03-15T18:51:55.333Z" }, + { url = "https://files.pythonhosted.org/packages/83/43/99f1b5dad345accb322c80c7821071554f791a95ee50c1c90041c157ae99/charset_normalizer-3.4.6-cp314-cp314-musllinux_1_2_riscv64.whl", hash = "sha256:419a9d91bd238052642a51938af8ac05da5b3343becde08d5cdeab9046df9ee1", size = 203035, upload-time = "2026-03-15T18:51:56.736Z" }, + { url = "https://files.pythonhosted.org/packages/87/9a/62c2cb6a531483b55dddff1a68b3d891a8b498f3ca555fbcf2978e804d9d/charset_normalizer-3.4.6-cp314-cp314-musllinux_1_2_s390x.whl", hash = "sha256:5273b9f0b5835ff0350c0828faea623c68bfa65b792720c453e22b25cc72930f", size = 216321, upload-time = "2026-03-15T18:51:58.17Z" }, + { url = "https://files.pythonhosted.org/packages/6e/79/94a010ff81e3aec7c293eb82c28f930918e517bc144c9906a060844462eb/charset_normalizer-3.4.6-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:0e901eb1049fdb80f5bd11ed5ea1e498ec423102f7a9b9e4645d5b8204ff2815", size = 208973, upload-time = "2026-03-15T18:51:59.998Z" }, + { url = "https://files.pythonhosted.org/packages/2a/57/4ecff6d4ec8585342f0c71bc03efaa99cb7468f7c91a57b105bcd561cea8/charset_normalizer-3.4.6-cp314-cp314-win32.whl", hash = "sha256:b4ff1d35e8c5bd078be89349b6f3a845128e685e751b6ea1169cf2160b344c4d", size = 144610, upload-time = "2026-03-15T18:52:02.213Z" }, + { url = "https://files.pythonhosted.org/packages/80/94/8434a02d9d7f168c25767c64671fead8d599744a05d6a6c877144c754246/charset_normalizer-3.4.6-cp314-cp314-win_amd64.whl", hash = "sha256:74119174722c4349af9708993118581686f343adc1c8c9c007d59be90d077f3f", size = 154962, upload-time = "2026-03-15T18:52:03.658Z" }, + { url = "https://files.pythonhosted.org/packages/46/4c/48f2cdbfd923026503dfd67ccea45c94fd8fe988d9056b468579c66ed62b/charset_normalizer-3.4.6-cp314-cp314-win_arm64.whl", hash = "sha256:e5bcc1a1ae744e0bb59641171ae53743760130600da8db48cbb6e4918e186e4e", size = 143595, upload-time = "2026-03-15T18:52:05.123Z" }, + { url = "https://files.pythonhosted.org/packages/31/93/8878be7569f87b14f1d52032946131bcb6ebbd8af3e20446bc04053dc3f1/charset_normalizer-3.4.6-cp314-cp314t-macosx_10_15_universal2.whl", hash = "sha256:ad8faf8df23f0378c6d527d8b0b15ea4a2e23c89376877c598c4870d1b2c7866", size = 314828, upload-time = "2026-03-15T18:52:06.831Z" }, + { url = "https://files.pythonhosted.org/packages/06/b6/fae511ca98aac69ecc35cde828b0a3d146325dd03d99655ad38fc2cc3293/charset_normalizer-3.4.6-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:f5ea69428fa1b49573eef0cc44a1d43bebd45ad0c611eb7d7eac760c7ae771bc", size = 208138, upload-time = "2026-03-15T18:52:08.239Z" }, + { url = "https://files.pythonhosted.org/packages/54/57/64caf6e1bf07274a1e0b7c160a55ee9e8c9ec32c46846ce59b9c333f7008/charset_normalizer-3.4.6-cp314-cp314t-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:06a7e86163334edfc5d20fe104db92fcd666e5a5df0977cb5680a506fe26cc8e", size = 224679, upload-time = "2026-03-15T18:52:10.043Z" }, + { url = "https://files.pythonhosted.org/packages/aa/cb/9ff5a25b9273ef160861b41f6937f86fae18b0792fe0a8e75e06acb08f1d/charset_normalizer-3.4.6-cp314-cp314t-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:e1f6e2f00a6b8edb562826e4632e26d063ac10307e80f7461f7de3ad8ef3f077", size = 223475, upload-time = "2026-03-15T18:52:11.854Z" }, + { url = "https://files.pythonhosted.org/packages/fc/97/440635fc093b8d7347502a377031f9605a1039c958f3cd18dcacffb37743/charset_normalizer-3.4.6-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:95b52c68d64c1878818687a473a10547b3292e82b6f6fe483808fb1468e2f52f", size = 215230, upload-time = "2026-03-15T18:52:13.325Z" }, + { url = "https://files.pythonhosted.org/packages/cd/24/afff630feb571a13f07c8539fbb502d2ab494019492aaffc78ef41f1d1d0/charset_normalizer-3.4.6-cp314-cp314t-manylinux_2_31_armv7l.whl", hash = "sha256:7504e9b7dc05f99a9bbb4525c67a2c155073b44d720470a148b34166a69c054e", size = 199045, upload-time = "2026-03-15T18:52:14.752Z" }, + { url = "https://files.pythonhosted.org/packages/e5/17/d1399ecdaf7e0498c327433e7eefdd862b41236a7e484355b8e0e5ebd64b/charset_normalizer-3.4.6-cp314-cp314t-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:172985e4ff804a7ad08eebec0a1640ece87ba5041d565fff23c8f99c1f389484", size = 211658, upload-time = "2026-03-15T18:52:16.278Z" }, + { url = "https://files.pythonhosted.org/packages/b5/38/16baa0affb957b3d880e5ac2144caf3f9d7de7bc4a91842e447fbb5e8b67/charset_normalizer-3.4.6-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:4be9f4830ba8741527693848403e2c457c16e499100963ec711b1c6f2049b7c7", size = 210769, upload-time = "2026-03-15T18:52:17.782Z" }, + { url = "https://files.pythonhosted.org/packages/05/34/c531bc6ac4c21da9ddfddb3107be2287188b3ea4b53b70fc58f2a77ac8d8/charset_normalizer-3.4.6-cp314-cp314t-musllinux_1_2_armv7l.whl", hash = "sha256:79090741d842f564b1b2827c0b82d846405b744d31e84f18d7a7b41c20e473ff", size = 201328, upload-time = "2026-03-15T18:52:19.553Z" }, + { url = "https://files.pythonhosted.org/packages/fa/73/a5a1e9ca5f234519c1953608a03fe109c306b97fdfb25f09182babad51a7/charset_normalizer-3.4.6-cp314-cp314t-musllinux_1_2_ppc64le.whl", hash = "sha256:87725cfb1a4f1f8c2fc9890ae2f42094120f4b44db9360be5d99a4c6b0e03a9e", size = 225302, upload-time = "2026-03-15T18:52:21.043Z" }, + { url = "https://files.pythonhosted.org/packages/ba/f6/cd782923d112d296294dea4bcc7af5a7ae0f86ab79f8fefbda5526b6cfc0/charset_normalizer-3.4.6-cp314-cp314t-musllinux_1_2_riscv64.whl", hash = "sha256:fcce033e4021347d80ed9c66dcf1e7b1546319834b74445f561d2e2221de5659", size = 211127, upload-time = "2026-03-15T18:52:22.491Z" }, + { url = "https://files.pythonhosted.org/packages/0e/c5/0b6898950627af7d6103a449b22320372c24c6feda91aa24e201a478d161/charset_normalizer-3.4.6-cp314-cp314t-musllinux_1_2_s390x.whl", hash = "sha256:ca0276464d148c72defa8bb4390cce01b4a0e425f3b50d1435aa6d7a18107602", size = 222840, upload-time = "2026-03-15T18:52:24.113Z" }, + { url = "https://files.pythonhosted.org/packages/7d/25/c4bba773bef442cbdc06111d40daa3de5050a676fa26e85090fc54dd12f0/charset_normalizer-3.4.6-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:197c1a244a274bb016dd8b79204850144ef77fe81c5b797dc389327adb552407", size = 216890, upload-time = "2026-03-15T18:52:25.541Z" }, + { url = "https://files.pythonhosted.org/packages/35/1a/05dacadb0978da72ee287b0143097db12f2e7e8d3ffc4647da07a383b0b7/charset_normalizer-3.4.6-cp314-cp314t-win32.whl", hash = "sha256:2a24157fa36980478dd1770b585c0f30d19e18f4fb0c47c13aa568f871718579", size = 155379, upload-time = "2026-03-15T18:52:27.05Z" }, + { url = "https://files.pythonhosted.org/packages/5d/7a/d269d834cb3a76291651256f3b9a5945e81d0a49ab9f4a498964e83c0416/charset_normalizer-3.4.6-cp314-cp314t-win_amd64.whl", hash = "sha256:cd5e2801c89992ed8c0a3f0293ae83c159a60d9a5d685005383ef4caca77f2c4", size = 169043, upload-time = "2026-03-15T18:52:28.502Z" }, + { url = "https://files.pythonhosted.org/packages/23/06/28b29fba521a37a8932c6a84192175c34d49f84a6d4773fa63d05f9aff22/charset_normalizer-3.4.6-cp314-cp314t-win_arm64.whl", hash = "sha256:47955475ac79cc504ef2704b192364e51d0d473ad452caedd0002605f780101c", size = 148523, upload-time = "2026-03-15T18:52:29.956Z" }, + { url = "https://files.pythonhosted.org/packages/2a/68/687187c7e26cb24ccbd88e5069f5ef00eba804d36dde11d99aad0838ab45/charset_normalizer-3.4.6-py3-none-any.whl", hash = "sha256:947cf925bc916d90adba35a64c82aace04fa39b46b52d4630ece166655905a69", size = 61455, upload-time = "2026-03-15T18:53:23.833Z" }, +] + +[[package]] +name = "click" +version = "8.3.1" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "colorama", marker = "sys_platform == 'win32'" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/3d/fa/656b739db8587d7b5dfa22e22ed02566950fbfbcdc20311993483657a5c0/click-8.3.1.tar.gz", hash = "sha256:12ff4785d337a1bb490bb7e9c2b1ee5da3112e94a8622f26a6c77f5d2fc6842a", size = 295065, upload-time = "2025-11-15T20:45:42.706Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/98/78/01c019cdb5d6498122777c1a43056ebb3ebfeef2076d9d026bfe15583b2b/click-8.3.1-py3-none-any.whl", hash = "sha256:981153a64e25f12d547d3426c367a4857371575ee7ad18df2a6183ab0545b2a6", size = 108274, upload-time = "2025-11-15T20:45:41.139Z" }, +] + +[[package]] +name = "colorama" +version = "0.4.6" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/d8/53/6f443c9a4a8358a93a6792e2acffb9d9d5cb0a5cfd8802644b7b1c9a02e4/colorama-0.4.6.tar.gz", hash = "sha256:08695f5cb7ed6e0531a20572697297273c47b8cae5a63ffc6d6ed5c201be6e44", size = 27697, upload-time = "2022-10-25T02:36:22.414Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/d1/d6/3965ed04c63042e047cb6a3e6ed1a63a35087b6a609aa3a15ed8ac56c221/colorama-0.4.6-py2.py3-none-any.whl", hash = "sha256:4f1d9991f5acc0ca119f9d443620b77f9d6b33703e51011c16baf57afb285fc6", size = 25335, upload-time = "2022-10-25T02:36:20.889Z" }, +] + +[[package]] +name = "cryptography" +version = "46.0.6" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "cffi", marker = "platform_python_implementation != 'PyPy'" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/a4/ba/04b1bd4218cbc58dc90ce967106d51582371b898690f3ae0402876cc4f34/cryptography-46.0.6.tar.gz", hash = "sha256:27550628a518c5c6c903d84f637fbecf287f6cb9ced3804838a1295dc1fd0759", size = 750542, upload-time = "2026-03-25T23:34:53.396Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/47/23/9285e15e3bc57325b0a72e592921983a701efc1ee8f91c06c5f0235d86d9/cryptography-46.0.6-cp311-abi3-macosx_10_9_universal2.whl", hash = "sha256:64235194bad039a10bb6d2d930ab3323baaec67e2ce36215fd0952fad0930ca8", size = 7176401, upload-time = "2026-03-25T23:33:22.096Z" }, + { url = "https://files.pythonhosted.org/packages/60/f8/e61f8f13950ab6195b31913b42d39f0f9afc7d93f76710f299b5ec286ae6/cryptography-46.0.6-cp311-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:26031f1e5ca62fcb9d1fcb34b2b60b390d1aacaa15dc8b895a9ed00968b97b30", size = 4275275, upload-time = "2026-03-25T23:33:23.844Z" }, + { url = "https://files.pythonhosted.org/packages/19/69/732a736d12c2631e140be2348b4ad3d226302df63ef64d30dfdb8db7ad1c/cryptography-46.0.6-cp311-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:9a693028b9cbe51b5a1136232ee8f2bc242e4e19d456ded3fa7c86e43c713b4a", size = 4425320, upload-time = "2026-03-25T23:33:25.703Z" }, + { url = "https://files.pythonhosted.org/packages/d4/12/123be7292674abf76b21ac1fc0e1af50661f0e5b8f0ec8285faac18eb99e/cryptography-46.0.6-cp311-abi3-manylinux_2_28_aarch64.whl", hash = "sha256:67177e8a9f421aa2d3a170c3e56eca4e0128883cf52a071a7cbf53297f18b175", size = 4278082, upload-time = "2026-03-25T23:33:27.423Z" }, + { url = "https://files.pythonhosted.org/packages/5b/ba/d5e27f8d68c24951b0a484924a84c7cdaed7502bac9f18601cd357f8b1d2/cryptography-46.0.6-cp311-abi3-manylinux_2_28_ppc64le.whl", hash = "sha256:d9528b535a6c4f8ff37847144b8986a9a143585f0540fbcb1a98115b543aa463", size = 4926514, upload-time = "2026-03-25T23:33:29.206Z" }, + { url = "https://files.pythonhosted.org/packages/34/71/1ea5a7352ae516d5512d17babe7e1b87d9db5150b21f794b1377eac1edc0/cryptography-46.0.6-cp311-abi3-manylinux_2_28_x86_64.whl", hash = "sha256:22259338084d6ae497a19bae5d4c66b7ca1387d3264d1c2c0e72d9e9b6a77b97", size = 4457766, upload-time = "2026-03-25T23:33:30.834Z" }, + { url = "https://files.pythonhosted.org/packages/01/59/562be1e653accee4fdad92c7a2e88fced26b3fdfce144047519bbebc299e/cryptography-46.0.6-cp311-abi3-manylinux_2_31_armv7l.whl", hash = "sha256:760997a4b950ff00d418398ad73fbc91aa2894b5c1db7ccb45b4f68b42a63b3c", size = 3986535, upload-time = "2026-03-25T23:33:33.02Z" }, + { url = "https://files.pythonhosted.org/packages/d6/8b/b1ebfeb788bf4624d36e45ed2662b8bd43a05ff62157093c1539c1288a18/cryptography-46.0.6-cp311-abi3-manylinux_2_34_aarch64.whl", hash = "sha256:3dfa6567f2e9e4c5dceb8ccb5a708158a2a871052fa75c8b78cb0977063f1507", size = 4277618, upload-time = "2026-03-25T23:33:34.567Z" }, + { url = "https://files.pythonhosted.org/packages/dd/52/a005f8eabdb28df57c20f84c44d397a755782d6ff6d455f05baa2785bd91/cryptography-46.0.6-cp311-abi3-manylinux_2_34_ppc64le.whl", hash = "sha256:cdcd3edcbc5d55757e5f5f3d330dd00007ae463a7e7aa5bf132d1f22a4b62b19", size = 4890802, upload-time = "2026-03-25T23:33:37.034Z" }, + { url = "https://files.pythonhosted.org/packages/ec/4d/8e7d7245c79c617d08724e2efa397737715ca0ec830ecb3c91e547302555/cryptography-46.0.6-cp311-abi3-manylinux_2_34_x86_64.whl", hash = "sha256:d4e4aadb7fc1f88687f47ca20bb7227981b03afaae69287029da08096853b738", size = 4457425, upload-time = "2026-03-25T23:33:38.904Z" }, + { url = "https://files.pythonhosted.org/packages/1d/5c/f6c3596a1430cec6f949085f0e1a970638d76f81c3ea56d93d564d04c340/cryptography-46.0.6-cp311-abi3-musllinux_1_2_aarch64.whl", hash = "sha256:2b417edbe8877cda9022dde3a008e2deb50be9c407eef034aeeb3a8b11d9db3c", size = 4405530, upload-time = "2026-03-25T23:33:40.842Z" }, + { url = "https://files.pythonhosted.org/packages/7e/c9/9f9cea13ee2dbde070424e0c4f621c091a91ffcc504ffea5e74f0e1daeff/cryptography-46.0.6-cp311-abi3-musllinux_1_2_x86_64.whl", hash = "sha256:380343e0653b1c9d7e1f55b52aaa2dbb2fdf2730088d48c43ca1c7c0abb7cc2f", size = 4667896, upload-time = "2026-03-25T23:33:42.781Z" }, + { url = "https://files.pythonhosted.org/packages/ad/b5/1895bc0821226f129bc74d00eccfc6a5969e2028f8617c09790bf89c185e/cryptography-46.0.6-cp311-abi3-win32.whl", hash = "sha256:bcb87663e1f7b075e48c3be3ecb5f0b46c8fc50b50a97cf264e7f60242dca3f2", size = 3026348, upload-time = "2026-03-25T23:33:45.021Z" }, + { url = "https://files.pythonhosted.org/packages/c3/f8/c9bcbf0d3e6ad288b9d9aa0b1dee04b063d19e8c4f871855a03ab3a297ab/cryptography-46.0.6-cp311-abi3-win_amd64.whl", hash = "sha256:6739d56300662c468fddb0e5e291f9b4d084bead381667b9e654c7dd81705124", size = 3483896, upload-time = "2026-03-25T23:33:46.649Z" }, + { url = "https://files.pythonhosted.org/packages/01/41/3a578f7fd5c70611c0aacba52cd13cb364a5dee895a5c1d467208a9380b0/cryptography-46.0.6-cp314-cp314t-macosx_10_9_universal2.whl", hash = "sha256:2ef9e69886cbb137c2aef9772c2e7138dc581fad4fcbcf13cc181eb5a3ab6275", size = 7117147, upload-time = "2026-03-25T23:33:48.249Z" }, + { url = "https://files.pythonhosted.org/packages/fa/87/887f35a6fca9dde90cad08e0de0c89263a8e59b2d2ff904fd9fcd8025b6f/cryptography-46.0.6-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:7f417f034f91dcec1cb6c5c35b07cdbb2ef262557f701b4ecd803ee8cefed4f4", size = 4266221, upload-time = "2026-03-25T23:33:49.874Z" }, + { url = "https://files.pythonhosted.org/packages/aa/a8/0a90c4f0b0871e0e3d1ed126aed101328a8a57fd9fd17f00fb67e82a51ca/cryptography-46.0.6-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:d24c13369e856b94892a89ddf70b332e0b70ad4a5c43cf3e9cb71d6d7ffa1f7b", size = 4408952, upload-time = "2026-03-25T23:33:52.128Z" }, + { url = "https://files.pythonhosted.org/packages/16/0b/b239701eb946523e4e9f329336e4ff32b1247e109cbab32d1a7b61da8ed7/cryptography-46.0.6-cp314-cp314t-manylinux_2_28_aarch64.whl", hash = "sha256:aad75154a7ac9039936d50cf431719a2f8d4ed3d3c277ac03f3339ded1a5e707", size = 4270141, upload-time = "2026-03-25T23:33:54.11Z" }, + { url = "https://files.pythonhosted.org/packages/0f/a8/976acdd4f0f30df7b25605f4b9d3d89295351665c2091d18224f7ad5cdbf/cryptography-46.0.6-cp314-cp314t-manylinux_2_28_ppc64le.whl", hash = "sha256:3c21d92ed15e9cfc6eb64c1f5a0326db22ca9c2566ca46d845119b45b4400361", size = 4904178, upload-time = "2026-03-25T23:33:55.725Z" }, + { url = "https://files.pythonhosted.org/packages/b1/1b/bf0e01a88efd0e59679b69f42d4afd5bced8700bb5e80617b2d63a3741af/cryptography-46.0.6-cp314-cp314t-manylinux_2_28_x86_64.whl", hash = "sha256:4668298aef7cddeaf5c6ecc244c2302a2b8e40f384255505c22875eebb47888b", size = 4441812, upload-time = "2026-03-25T23:33:57.364Z" }, + { url = "https://files.pythonhosted.org/packages/bb/8b/11df86de2ea389c65aa1806f331cae145f2ed18011f30234cc10ca253de8/cryptography-46.0.6-cp314-cp314t-manylinux_2_31_armv7l.whl", hash = "sha256:8ce35b77aaf02f3b59c90b2c8a05c73bac12cea5b4e8f3fbece1f5fddea5f0ca", size = 3963923, upload-time = "2026-03-25T23:33:59.361Z" }, + { url = "https://files.pythonhosted.org/packages/91/e0/207fb177c3a9ef6a8108f234208c3e9e76a6aa8cf20d51932916bd43bda0/cryptography-46.0.6-cp314-cp314t-manylinux_2_34_aarch64.whl", hash = "sha256:c89eb37fae9216985d8734c1afd172ba4927f5a05cfd9bf0e4863c6d5465b013", size = 4269695, upload-time = "2026-03-25T23:34:00.909Z" }, + { url = "https://files.pythonhosted.org/packages/21/5e/19f3260ed1e95bced52ace7501fabcd266df67077eeb382b79c81729d2d3/cryptography-46.0.6-cp314-cp314t-manylinux_2_34_ppc64le.whl", hash = "sha256:ed418c37d095aeddf5336898a132fba01091f0ac5844e3e8018506f014b6d2c4", size = 4869785, upload-time = "2026-03-25T23:34:02.796Z" }, + { url = "https://files.pythonhosted.org/packages/10/38/cd7864d79aa1d92ef6f1a584281433419b955ad5a5ba8d1eb6c872165bcb/cryptography-46.0.6-cp314-cp314t-manylinux_2_34_x86_64.whl", hash = "sha256:69cf0056d6947edc6e6760e5f17afe4bea06b56a9ac8a06de9d2bd6b532d4f3a", size = 4441404, upload-time = "2026-03-25T23:34:04.35Z" }, + { url = "https://files.pythonhosted.org/packages/09/0a/4fe7a8d25fed74419f91835cf5829ade6408fd1963c9eae9c4bce390ecbb/cryptography-46.0.6-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:8e7304c4f4e9490e11efe56af6713983460ee0780f16c63f219984dab3af9d2d", size = 4397549, upload-time = "2026-03-25T23:34:06.342Z" }, + { url = "https://files.pythonhosted.org/packages/5f/a0/7d738944eac6513cd60a8da98b65951f4a3b279b93479a7e8926d9cd730b/cryptography-46.0.6-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:b928a3ca837c77a10e81a814a693f2295200adb3352395fad024559b7be7a736", size = 4651874, upload-time = "2026-03-25T23:34:07.916Z" }, + { url = "https://files.pythonhosted.org/packages/cb/f1/c2326781ca05208845efca38bf714f76939ae446cd492d7613808badedf1/cryptography-46.0.6-cp314-cp314t-win32.whl", hash = "sha256:97c8115b27e19e592a05c45d0dd89c57f81f841cc9880e353e0d3bf25b2139ed", size = 3001511, upload-time = "2026-03-25T23:34:09.892Z" }, + { url = "https://files.pythonhosted.org/packages/c9/57/fe4a23eb549ac9d903bd4698ffda13383808ef0876cc912bcb2838799ece/cryptography-46.0.6-cp314-cp314t-win_amd64.whl", hash = "sha256:c797e2517cb7880f8297e2c0f43bb910e91381339336f75d2c1c2cbf811b70b4", size = 3471692, upload-time = "2026-03-25T23:34:11.613Z" }, + { url = "https://files.pythonhosted.org/packages/c4/cc/f330e982852403da79008552de9906804568ae9230da8432f7496ce02b71/cryptography-46.0.6-cp38-abi3-macosx_10_9_universal2.whl", hash = "sha256:12cae594e9473bca1a7aceb90536060643128bb274fcea0fc459ab90f7d1ae7a", size = 7162776, upload-time = "2026-03-25T23:34:13.308Z" }, + { url = "https://files.pythonhosted.org/packages/49/b3/dc27efd8dcc4bff583b3f01d4a3943cd8b5821777a58b3a6a5f054d61b79/cryptography-46.0.6-cp38-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:639301950939d844a9e1c4464d7e07f902fe9a7f6b215bb0d4f28584729935d8", size = 4270529, upload-time = "2026-03-25T23:34:15.019Z" }, + { url = "https://files.pythonhosted.org/packages/e6/05/e8d0e6eb4f0d83365b3cb0e00eb3c484f7348db0266652ccd84632a3d58d/cryptography-46.0.6-cp38-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:ed3775295fb91f70b4027aeba878d79b3e55c0b3e97eaa4de71f8f23a9f2eb77", size = 4414827, upload-time = "2026-03-25T23:34:16.604Z" }, + { url = "https://files.pythonhosted.org/packages/2f/97/daba0f5d2dc6d855e2dcb70733c812558a7977a55dd4a6722756628c44d1/cryptography-46.0.6-cp38-abi3-manylinux_2_28_aarch64.whl", hash = "sha256:8927ccfbe967c7df312ade694f987e7e9e22b2425976ddbf28271d7e58845290", size = 4271265, upload-time = "2026-03-25T23:34:18.586Z" }, + { url = "https://files.pythonhosted.org/packages/89/06/fe1fce39a37ac452e58d04b43b0855261dac320a2ebf8f5260dd55b201a9/cryptography-46.0.6-cp38-abi3-manylinux_2_28_ppc64le.whl", hash = "sha256:b12c6b1e1651e42ab5de8b1e00dc3b6354fdfd778e7fa60541ddacc27cd21410", size = 4916800, upload-time = "2026-03-25T23:34:20.561Z" }, + { url = "https://files.pythonhosted.org/packages/ff/8a/b14f3101fe9c3592603339eb5d94046c3ce5f7fc76d6512a2d40efd9724e/cryptography-46.0.6-cp38-abi3-manylinux_2_28_x86_64.whl", hash = "sha256:063b67749f338ca9c5a0b7fe438a52c25f9526b851e24e6c9310e7195aad3b4d", size = 4448771, upload-time = "2026-03-25T23:34:22.406Z" }, + { url = "https://files.pythonhosted.org/packages/01/b3/0796998056a66d1973fd52ee89dc1bb3b6581960a91ad4ac705f182d398f/cryptography-46.0.6-cp38-abi3-manylinux_2_31_armv7l.whl", hash = "sha256:02fad249cb0e090b574e30b276a3da6a149e04ee2f049725b1f69e7b8351ec70", size = 3978333, upload-time = "2026-03-25T23:34:24.281Z" }, + { url = "https://files.pythonhosted.org/packages/c5/3d/db200af5a4ffd08918cd55c08399dc6c9c50b0bc72c00a3246e099d3a849/cryptography-46.0.6-cp38-abi3-manylinux_2_34_aarch64.whl", hash = "sha256:7e6142674f2a9291463e5e150090b95a8519b2fb6e6aaec8917dd8d094ce750d", size = 4271069, upload-time = "2026-03-25T23:34:25.895Z" }, + { url = "https://files.pythonhosted.org/packages/d7/18/61acfd5b414309d74ee838be321c636fe71815436f53c9f0334bf19064fa/cryptography-46.0.6-cp38-abi3-manylinux_2_34_ppc64le.whl", hash = "sha256:456b3215172aeefb9284550b162801d62f5f264a081049a3e94307fe20792cfa", size = 4878358, upload-time = "2026-03-25T23:34:27.67Z" }, + { url = "https://files.pythonhosted.org/packages/8b/65/5bf43286d566f8171917cae23ac6add941654ccf085d739195a4eacf1674/cryptography-46.0.6-cp38-abi3-manylinux_2_34_x86_64.whl", hash = "sha256:341359d6c9e68834e204ceaf25936dffeafea3829ab80e9503860dcc4f4dac58", size = 4448061, upload-time = "2026-03-25T23:34:29.375Z" }, + { url = "https://files.pythonhosted.org/packages/e0/25/7e49c0fa7205cf3597e525d156a6bce5b5c9de1fd7e8cb01120e459f205a/cryptography-46.0.6-cp38-abi3-musllinux_1_2_aarch64.whl", hash = "sha256:9a9c42a2723999a710445bc0d974e345c32adfd8d2fac6d8a251fa829ad31cfb", size = 4399103, upload-time = "2026-03-25T23:34:32.036Z" }, + { url = "https://files.pythonhosted.org/packages/44/46/466269e833f1c4718d6cd496ffe20c56c9c8d013486ff66b4f69c302a68d/cryptography-46.0.6-cp38-abi3-musllinux_1_2_x86_64.whl", hash = "sha256:6617f67b1606dfd9fe4dbfa354a9508d4a6d37afe30306fe6c101b7ce3274b72", size = 4659255, upload-time = "2026-03-25T23:34:33.679Z" }, + { url = "https://files.pythonhosted.org/packages/0a/09/ddc5f630cc32287d2c953fc5d32705e63ec73e37308e5120955316f53827/cryptography-46.0.6-cp38-abi3-win32.whl", hash = "sha256:7f6690b6c55e9c5332c0b59b9c8a3fb232ebf059094c17f9019a51e9827df91c", size = 3010660, upload-time = "2026-03-25T23:34:35.418Z" }, + { url = "https://files.pythonhosted.org/packages/1b/82/ca4893968aeb2709aacfb57a30dec6fa2ab25b10fa9f064b8882ce33f599/cryptography-46.0.6-cp38-abi3-win_amd64.whl", hash = "sha256:79e865c642cfc5c0b3eb12af83c35c5aeff4fa5c672dc28c43721c2c9fdd2f0f", size = 3471160, upload-time = "2026-03-25T23:34:37.191Z" }, + { url = "https://files.pythonhosted.org/packages/2e/84/7ccff00ced5bac74b775ce0beb7d1be4e8637536b522b5df9b73ada42da2/cryptography-46.0.6-pp311-pypy311_pp73-macosx_11_0_arm64.whl", hash = "sha256:2ea0f37e9a9cf0df2952893ad145fd9627d326a59daec9b0802480fa3bcd2ead", size = 3475444, upload-time = "2026-03-25T23:34:38.944Z" }, + { url = "https://files.pythonhosted.org/packages/bc/1f/4c926f50df7749f000f20eede0c896769509895e2648db5da0ed55db711d/cryptography-46.0.6-pp311-pypy311_pp73-manylinux_2_28_aarch64.whl", hash = "sha256:a3e84d5ec9ba01f8fd03802b2147ba77f0c8f2617b2aff254cedd551844209c8", size = 4218227, upload-time = "2026-03-25T23:34:40.871Z" }, + { url = "https://files.pythonhosted.org/packages/c6/65/707be3ffbd5f786028665c3223e86e11c4cda86023adbc56bd72b1b6bab5/cryptography-46.0.6-pp311-pypy311_pp73-manylinux_2_28_x86_64.whl", hash = "sha256:12f0fa16cc247b13c43d56d7b35287ff1569b5b1f4c5e87e92cc4fcc00cd10c0", size = 4381399, upload-time = "2026-03-25T23:34:42.609Z" }, + { url = "https://files.pythonhosted.org/packages/f3/6d/73557ed0ef7d73d04d9aba745d2c8e95218213687ee5e76b7d236a5030fc/cryptography-46.0.6-pp311-pypy311_pp73-manylinux_2_34_aarch64.whl", hash = "sha256:50575a76e2951fe7dbd1f56d181f8c5ceeeb075e9ff88e7ad997d2f42af06e7b", size = 4217595, upload-time = "2026-03-25T23:34:44.205Z" }, + { url = "https://files.pythonhosted.org/packages/9e/c5/e1594c4eec66a567c3ac4400008108a415808be2ce13dcb9a9045c92f1a0/cryptography-46.0.6-pp311-pypy311_pp73-manylinux_2_34_x86_64.whl", hash = "sha256:90e5f0a7b3be5f40c3a0a0eafb32c681d8d2c181fc2a1bdabe9b3f611d9f6b1a", size = 4380912, upload-time = "2026-03-25T23:34:46.328Z" }, + { url = "https://files.pythonhosted.org/packages/1a/89/843b53614b47f97fe1abc13f9a86efa5ec9e275292c457af1d4a60dc80e0/cryptography-46.0.6-pp311-pypy311_pp73-win_amd64.whl", hash = "sha256:6728c49e3b2c180ef26f8e9f0a883a2c585638db64cf265b49c9ba10652d430e", size = 3409955, upload-time = "2026-03-25T23:34:48.465Z" }, +] + +[[package]] +name = "cyclopts" +version = "4.10.1" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "attrs" }, + { name = "docstring-parser" }, + { name = "rich" }, + { name = "rich-rst" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/6c/c4/2ce2ca1451487dc7d59f09334c3fa1182c46cfcf0a2d5f19f9b26d53ac74/cyclopts-4.10.1.tar.gz", hash = "sha256:ad4e4bb90576412d32276b14a76f55d43353753d16217f2c3cd5bdceba7f15a0", size = 166623, upload-time = "2026-03-23T14:43:01.098Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/8a/0b/2261922126b2e50c601fe22d7ff5194e0a4d50e654836260c0665e24d862/cyclopts-4.10.1-py3-none-any.whl", hash = "sha256:35f37257139380a386d9fe4475e1e7c87ca7795765ef4f31abba579fcfcb6ecd", size = 204331, upload-time = "2026-03-23T14:43:02.625Z" }, +] + +[[package]] +name = "distro" +version = "1.9.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/fc/f8/98eea607f65de6527f8a2e8885fc8015d3e6f5775df186e443e0964a11c3/distro-1.9.0.tar.gz", hash = "sha256:2fa77c6fd8940f116ee1d6b94a2f90b13b5ea8d019b98bc8bafdcabcdd9bdbed", size = 60722, upload-time = "2023-12-24T09:54:32.31Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/12/b3/231ffd4ab1fc9d679809f356cebee130ac7daa00d6d6f3206dd4fd137e9e/distro-1.9.0-py3-none-any.whl", hash = "sha256:7bffd925d65168f85027d8da9af6bddab658135b840670a223589bc0c8ef02b2", size = 20277, upload-time = "2023-12-24T09:54:30.421Z" }, +] + +[[package]] +name = "dnspython" +version = "2.8.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/8c/8b/57666417c0f90f08bcafa776861060426765fdb422eb10212086fb811d26/dnspython-2.8.0.tar.gz", hash = "sha256:181d3c6996452cb1189c4046c61599b84a5a86e099562ffde77d26984ff26d0f", size = 368251, upload-time = "2025-09-07T18:58:00.022Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/ba/5a/18ad964b0086c6e62e2e7500f7edc89e3faa45033c71c1893d34eed2b2de/dnspython-2.8.0-py3-none-any.whl", hash = "sha256:01d9bbc4a2d76bf0db7c1f729812ded6d912bd318d3b1cf81d30c0f845dbf3af", size = 331094, upload-time = "2025-09-07T18:57:58.071Z" }, +] + +[[package]] +name = "docstring-parser" +version = "0.17.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/b2/9d/c3b43da9515bd270df0f80548d9944e389870713cc1fe2b8fb35fe2bcefd/docstring_parser-0.17.0.tar.gz", hash = "sha256:583de4a309722b3315439bb31d64ba3eebada841f2e2cee23b99df001434c912", size = 27442, upload-time = "2025-07-21T07:35:01.868Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/55/e2/2537ebcff11c1ee1ff17d8d0b6f4db75873e3b0fb32c2d4a2ee31ecb310a/docstring_parser-0.17.0-py3-none-any.whl", hash = "sha256:cf2569abd23dce8099b300f9b4fa8191e9582dda731fd533daf54c4551658708", size = 36896, upload-time = "2025-07-21T07:35:00.684Z" }, +] + +[[package]] +name = "docutils" +version = "0.22.4" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/ae/b6/03bb70946330e88ffec97aefd3ea75ba575cb2e762061e0e62a213befee8/docutils-0.22.4.tar.gz", hash = "sha256:4db53b1fde9abecbb74d91230d32ab626d94f6badfc575d6db9194a49df29968", size = 2291750, upload-time = "2025-12-18T19:00:26.443Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/02/10/5da547df7a391dcde17f59520a231527b8571e6f46fc8efb02ccb370ab12/docutils-0.22.4-py3-none-any.whl", hash = "sha256:d0013f540772d1420576855455d050a2180186c91c15779301ac2ccb3eeb68de", size = 633196, upload-time = "2025-12-18T19:00:18.077Z" }, +] + +[[package]] +name = "email-validator" +version = "2.3.0" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "dnspython" }, + { name = "idna" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/f5/22/900cb125c76b7aaa450ce02fd727f452243f2e91a61af068b40adba60ea9/email_validator-2.3.0.tar.gz", hash = "sha256:9fc05c37f2f6cf439ff414f8fc46d917929974a82244c20eb10231ba60c54426", size = 51238, upload-time = "2025-08-26T13:09:06.831Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/de/15/545e2b6cf2e3be84bc1ed85613edd75b8aea69807a71c26f4ca6a9258e82/email_validator-2.3.0-py3-none-any.whl", hash = "sha256:80f13f623413e6b197ae73bb10bf4eb0908faf509ad8362c5edeb0be7fd450b4", size = 35604, upload-time = "2025-08-26T13:09:05.858Z" }, +] + +[[package]] +name = "exceptiongroup" +version = "1.3.1" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "typing-extensions", marker = "python_full_version < '3.13'" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/50/79/66800aadf48771f6b62f7eb014e352e5d06856655206165d775e675a02c9/exceptiongroup-1.3.1.tar.gz", hash = "sha256:8b412432c6055b0b7d14c310000ae93352ed6754f70fa8f7c34141f91c4e3219", size = 30371, upload-time = "2025-11-21T23:01:54.787Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/8a/0e/97c33bf5009bdbac74fd2beace167cab3f978feb69cc36f1ef79360d6c4e/exceptiongroup-1.3.1-py3-none-any.whl", hash = "sha256:a7a39a3bd276781e98394987d3a5701d0c4edffb633bb7a5144577f82c773598", size = 16740, upload-time = "2025-11-21T23:01:53.443Z" }, +] + +[[package]] +name = "fastapi" +version = "0.135.3" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "annotated-doc" }, + { name = "pydantic" }, + { name = "starlette" }, + { name = "typing-extensions" }, + { name = "typing-inspection" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/f7/e6/7adb4c5fa231e82c35b8f5741a9f2d055f520c29af5546fd70d3e8e1cd2e/fastapi-0.135.3.tar.gz", hash = "sha256:bd6d7caf1a2bdd8d676843cdcd2287729572a1ef524fc4d65c17ae002a1be654", size = 396524, upload-time = "2026-04-01T16:23:58.188Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/84/a4/5caa2de7f917a04ada20018eccf60d6cc6145b0199d55ca3711b0fc08312/fastapi-0.135.3-py3-none-any.whl", hash = "sha256:9b0f590c813acd13d0ab43dd8494138eb58e484bfac405db1f3187cfc5810d98", size = 117734, upload-time = "2026-04-01T16:23:59.328Z" }, +] + +[[package]] +name = "fastmcp" +version = "3.2.0" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "authlib" }, + { name = "cyclopts" }, + { name = "exceptiongroup" }, + { name = "httpx" }, + { name = "jsonref" }, + { name = "jsonschema-path" }, + { name = "mcp" }, + { name = "openapi-pydantic" }, + { name = "opentelemetry-api" }, + { name = "packaging" }, + { name = "platformdirs" }, + { name = "py-key-value-aio", extra = ["filetree", "keyring", "memory"] }, + { name = "pydantic", extra = ["email"] }, + { name = "pyperclip" }, + { name = "python-dotenv" }, + { name = "pyyaml" }, + { name = "rich" }, + { name = "uncalled-for" }, + { name = "uvicorn" }, + { name = "watchfiles" }, + { name = "websockets" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/d0/32/4f1b2cfd7b50db89114949f90158b1dcc2c92a1917b9f57c0ff24e47a2f4/fastmcp-3.2.0.tar.gz", hash = "sha256:d4830b8ffc3592d3d9c76dc0f398904cf41f04910e41a0de38cc1004e0903bef", size = 26318581, upload-time = "2026-03-30T20:25:37.692Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/4f/67/684fa2d2de1e7504549d4ca457b4f854ccec3cd3be03bd86b33b599fbf58/fastmcp-3.2.0-py3-none-any.whl", hash = "sha256:e71aba3df16f86f546a4a9e513261d3233bcc92bef0dfa647bac3fa33623f681", size = 705550, upload-time = "2026-03-30T20:25:35.499Z" }, +] + +[[package]] +name = "ffmpy" +version = "1.0.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/7d/d2/1c4c582d71bcc65c76fa69fab85de6257d50fdf6fd4a2317c53917e9a581/ffmpy-1.0.0.tar.gz", hash = "sha256:b12932e95435c8820f1cd041024402765f821971e4bae753b327fc02a6e12f8b", size = 5101, upload-time = "2025-11-11T06:24:23.856Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/55/56/dd3669eccebb6d8ac81e624542ebd53fe6f08e1b8f2f8d50aeb7e3b83f99/ffmpy-1.0.0-py3-none-any.whl", hash = "sha256:5640e5f0fd03fb6236d0e119b16ccf6522db1c826fdf35dcb87087b60fd7504f", size = 5614, upload-time = "2025-11-11T06:24:22.818Z" }, +] + +[[package]] +name = "filelock" +version = "3.25.2" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/94/b8/00651a0f559862f3bb7d6f7477b192afe3f583cc5e26403b44e59a55ab34/filelock-3.25.2.tar.gz", hash = "sha256:b64ece2b38f4ca29dd3e810287aa8c48182bbecd1ae6e9ae126c9b35f1382694", size = 40480, upload-time = "2026-03-11T20:45:38.487Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/a4/a5/842ae8f0c08b61d6484b52f99a03510a3a72d23141942d216ebe81fefbce/filelock-3.25.2-py3-none-any.whl", hash = "sha256:ca8afb0da15f229774c9ad1b455ed96e85a81373065fb10446672f64444ddf70", size = 26759, upload-time = "2026-03-11T20:45:37.437Z" }, +] + +[[package]] +name = "fsspec" +version = "2026.3.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/e1/cf/b50ddf667c15276a9ab15a70ef5f257564de271957933ffea49d2cdbcdfb/fsspec-2026.3.0.tar.gz", hash = "sha256:1ee6a0e28677557f8c2f994e3eea77db6392b4de9cd1f5d7a9e87a0ae9d01b41", size = 313547, upload-time = "2026-03-27T19:11:14.892Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/d5/1f/5f4a3cd9e4440e9d9bc78ad0a91a1c8d46b4d429d5239ebe6793c9fe5c41/fsspec-2026.3.0-py3-none-any.whl", hash = "sha256:d2ceafaad1b3457968ed14efa28798162f1638dbb5d2a6868a2db002a5ee39a4", size = 202595, upload-time = "2026-03-27T19:11:13.595Z" }, +] + +[[package]] +name = "gradio" +version = "6.10.0" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "aiofiles" }, + { name = "anyio" }, + { name = "audioop-lts", marker = "python_full_version >= '3.13'" }, + { name = "brotli" }, + { name = "fastapi" }, + { name = "ffmpy" }, + { name = "gradio-client" }, + { name = "groovy" }, + { name = "hf-gradio" }, + { name = "httpx" }, + { name = "huggingface-hub" }, + { name = "jinja2" }, + { name = "markupsafe" }, + { name = "numpy" }, + { name = "orjson" }, + { name = "packaging" }, + { name = "pandas" }, + { name = "pillow" }, + { name = "pydantic" }, + { name = "pydub" }, + { name = "python-multipart" }, + { name = "pytz" }, + { name = "pyyaml" }, + { name = "safehttpx" }, + { name = "semantic-version" }, + { name = "starlette" }, + { name = "tomlkit" }, + { name = "typer" }, + { name = "typing-extensions" }, + { name = "uvicorn" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/c4/74/740c507b076263f9064ca39c5c244d773c8d4063e1ce630b57d6197ac50f/gradio-6.10.0.tar.gz", hash = "sha256:f76797536f5b62bc1558f622017351133d0087ee5f51aab139af04e82ed3bf2a", size = 58021607, upload-time = "2026-03-24T21:20:13.399Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/cd/ba/fc89989d0a62e4d38c82f54c44b1145e455466a688297cc69cdcbf321ea5/gradio-6.10.0-py3-none-any.whl", hash = "sha256:e20035ef046a30266c0b5ddbe05f2168193d06914dd89eebe2decde77ec510fe", size = 42962248, upload-time = "2026-03-24T21:20:09.938Z" }, +] + +[[package]] +name = "gradio-client" +version = "2.4.0" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "fsspec" }, + { name = "httpx" }, + { name = "huggingface-hub" }, + { name = "packaging" }, + { name = "typing-extensions" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/4e/4a/ddfaa8b3fef0238768a42301a3361981af1afd90f92c27adfe6cd031eca7/gradio_client-2.4.0.tar.gz", hash = "sha256:781885374f86759b8db5195e13e716c301d14e48e0442aef63362f1eeea4cce2", size = 58203, upload-time = "2026-03-24T21:20:25.276Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/f0/b3/10cb03cf684aab2bec97cb0b9bbba4f93e7a20c6e0f3b4100c235a55ad93/gradio_client-2.4.0-py3-none-any.whl", hash = "sha256:7c170807b924ed6056b2a1fa9d659d349dd20567c00ee0b4dc249dc1e2def620", size = 59156, upload-time = "2026-03-24T21:20:24.018Z" }, +] + +[[package]] +name = "groovy" +version = "0.1.2" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/52/36/bbdede67400277bef33d3ec0e6a31750da972c469f75966b4930c753218f/groovy-0.1.2.tar.gz", hash = "sha256:25c1dc09b3f9d7e292458aa762c6beb96ea037071bf5e917fc81fb78d2231083", size = 17325, upload-time = "2025-02-28T20:24:56.068Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/28/27/3d6dcadc8a3214d8522c1e7f6a19554e33659be44546d44a2f7572ac7d2a/groovy-0.1.2-py3-none-any.whl", hash = "sha256:7f7975bab18c729a257a8b1ae9dcd70b7cafb1720481beae47719af57c35fa64", size = 14090, upload-time = "2025-02-28T20:24:55.152Z" }, +] + +[[package]] +name = "h11" +version = "0.16.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/01/ee/02a2c011bdab74c6fb3c75474d40b3052059d95df7e73351460c8588d963/h11-0.16.0.tar.gz", hash = "sha256:4e35b956cf45792e4caa5885e69fba00bdbc6ffafbfa020300e549b208ee5ff1", size = 101250, upload-time = "2025-04-24T03:35:25.427Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/04/4b/29cac41a4d98d144bf5f6d33995617b185d14b22401f75ca86f384e87ff1/h11-0.16.0-py3-none-any.whl", hash = "sha256:63cf8bbe7522de3bf65932fda1d9c2772064ffb3dae62d55932da54b31cb6c86", size = 37515, upload-time = "2025-04-24T03:35:24.344Z" }, +] + +[[package]] +name = "hf-gradio" +version = "0.3.0" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "gradio-client" }, + { name = "typer" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/48/d8/1771d6f1591099ecd10776782d08c6f87e7c2501f9e9e6ffb7c2ecc07d0c/hf_gradio-0.3.0.tar.gz", hash = "sha256:e74a0f9eab14a1d6f54c523c2192aa5283ca51f01605f661b2542387da5b9fc0", size = 6235, upload-time = "2026-03-27T13:13:43.9Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/4c/52/04816d2a15691a63cec3187e3e592c4493448eb4834492eadd532972b035/hf_gradio-0.3.0-py3-none-any.whl", hash = "sha256:159d33d1f0affae8164d29c0c51a63dfcc0bbc90803b07c6f139137206a796ae", size = 4154, upload-time = "2026-03-23T19:50:08.586Z" }, +] + +[[package]] +name = "hf-xet" +version = "1.4.3" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/53/92/ec9ad04d0b5728dca387a45af7bc98fbb0d73b2118759f5f6038b61a57e8/hf_xet-1.4.3.tar.gz", hash = "sha256:8ddedb73c8c08928c793df2f3401ec26f95be7f7e516a7bee2fbb546f6676113", size = 670477, upload-time = "2026-03-31T22:40:07.874Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/72/43/724d307b34e353da0abd476e02f72f735cdd2bc86082dee1b32ea0bfee1d/hf_xet-1.4.3-cp313-cp313t-macosx_10_12_x86_64.whl", hash = "sha256:7551659ba4f1e1074e9623996f28c3873682530aee0a846b7f2f066239228144", size = 3800935, upload-time = "2026-03-31T22:39:49.618Z" }, + { url = "https://files.pythonhosted.org/packages/2b/d2/8bee5996b699262edb87dbb54118d287c0e1b2fc78af7cdc41857ba5e3c4/hf_xet-1.4.3-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:bee693ada985e7045997f05f081d0e12c4c08bd7626dc397f8a7c487e6c04f7f", size = 3558942, upload-time = "2026-03-31T22:39:47.938Z" }, + { url = "https://files.pythonhosted.org/packages/c3/a1/e993d09cbe251196fb60812b09a58901c468127b7259d2bf0f68bf6088eb/hf_xet-1.4.3-cp313-cp313t-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:21644b404bb0100fe3857892f752c4d09642586fd988e61501c95bbf44b393a3", size = 4207657, upload-time = "2026-03-31T22:39:39.69Z" }, + { url = "https://files.pythonhosted.org/packages/64/44/9eb6d21e5c34c63e5e399803a6932fa983cabdf47c0ecbcfe7ea97684b8c/hf_xet-1.4.3-cp313-cp313t-manylinux_2_28_aarch64.whl", hash = "sha256:987f09cfe418237812896a6736b81b1af02a3a6dcb4b4944425c4c4fca7a7cf8", size = 3986765, upload-time = "2026-03-31T22:39:37.936Z" }, + { url = "https://files.pythonhosted.org/packages/ea/7b/8ad6f16fdb82f5f7284a34b5ec48645bd575bdcd2f6f0d1644775909c486/hf_xet-1.4.3-cp313-cp313t-musllinux_1_2_aarch64.whl", hash = "sha256:60cf7fc43a99da0a853345cf86d23738c03983ee5249613a6305d3e57a5dca74", size = 4188162, upload-time = "2026-03-31T22:39:58.382Z" }, + { url = "https://files.pythonhosted.org/packages/1b/c4/39d6e136cbeea9ca5a23aad4b33024319222adbdc059ebcda5fc7d9d5ff4/hf_xet-1.4.3-cp313-cp313t-musllinux_1_2_x86_64.whl", hash = "sha256:2815a49a7a59f3e2edf0cf113ae88e8cb2ca2a221bf353fb60c609584f4884d4", size = 4424525, upload-time = "2026-03-31T22:40:00.225Z" }, + { url = "https://files.pythonhosted.org/packages/46/f2/adc32dae6bdbc367853118b9878139ac869419a4ae7ba07185dc31251b76/hf_xet-1.4.3-cp313-cp313t-win_amd64.whl", hash = "sha256:42ee323265f1e6a81b0e11094564fb7f7e0ec75b5105ffd91ae63f403a11931b", size = 3671610, upload-time = "2026-03-31T22:40:10.42Z" }, + { url = "https://files.pythonhosted.org/packages/e2/19/25d897dcc3f81953e0c2cde9ec186c7a0fee413eb0c9a7a9130d87d94d3a/hf_xet-1.4.3-cp313-cp313t-win_arm64.whl", hash = "sha256:27c976ba60079fb8217f485b9c5c7fcd21c90b0367753805f87cb9f3cdc4418a", size = 3528529, upload-time = "2026-03-31T22:40:09.106Z" }, + { url = "https://files.pythonhosted.org/packages/ec/36/3e8f85ca9fe09b8de2b2e10c63b3b3353d7dda88a0b3d426dffbe7b8313b/hf_xet-1.4.3-cp314-cp314t-macosx_10_12_x86_64.whl", hash = "sha256:5251d5ece3a81815bae9abab41cf7ddb7bcb8f56411bce0827f4a3071c92fdc6", size = 3801019, upload-time = "2026-03-31T22:39:56.651Z" }, + { url = "https://files.pythonhosted.org/packages/b5/9c/defb6cb1de28bccb7bd8d95f6e60f72a3d3fa4cb3d0329c26fb9a488bfe7/hf_xet-1.4.3-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:1feb0f3abeacee143367c326a128a2e2b60868ec12a36c225afb1d6c5a05e6d2", size = 3558746, upload-time = "2026-03-31T22:39:54.766Z" }, + { url = "https://files.pythonhosted.org/packages/c1/bd/8d001191893178ff8e826e46ad5299446e62b93cd164e17b0ffea08832ec/hf_xet-1.4.3-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:8b301fc150290ca90b4fccd079829b84bb4786747584ae08b94b4577d82fb791", size = 4207692, upload-time = "2026-03-31T22:39:46.246Z" }, + { url = "https://files.pythonhosted.org/packages/ce/48/6790b402803250e9936435613d3a78b9aaeee7973439f0918848dde58309/hf_xet-1.4.3-cp314-cp314t-manylinux_2_28_aarch64.whl", hash = "sha256:d972fbe95ddc0d3c0fc49b31a8a69f47db35c1e3699bf316421705741aab6653", size = 3986281, upload-time = "2026-03-31T22:39:44.648Z" }, + { url = "https://files.pythonhosted.org/packages/51/56/ea62552fe53db652a9099eda600b032d75554d0e86c12a73824bfedef88b/hf_xet-1.4.3-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:c5b48db1ee344a805a1b9bd2cda9b6b65fe77ed3787bd6e87ad5521141d317cd", size = 4187414, upload-time = "2026-03-31T22:40:04.951Z" }, + { url = "https://files.pythonhosted.org/packages/7d/f5/bc1456d4638061bea997e6d2db60a1a613d7b200e0755965ec312dc1ef79/hf_xet-1.4.3-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:22bdc1f5fb8b15bf2831440b91d1c9bbceeb7e10c81a12e8d75889996a5c9da8", size = 4424368, upload-time = "2026-03-31T22:40:06.347Z" }, + { url = "https://files.pythonhosted.org/packages/e4/76/ab597bae87e1f06d18d3ecb8ed7f0d3c9a37037fc32ce76233d369273c64/hf_xet-1.4.3-cp314-cp314t-win_amd64.whl", hash = "sha256:0392c79b7cf48418cd61478c1a925246cf10639f4cd9d94368d8ca1e8df9ea07", size = 3672280, upload-time = "2026-03-31T22:40:16.401Z" }, + { url = "https://files.pythonhosted.org/packages/62/05/2e462d34e23a09a74d73785dbed71cc5dbad82a72eee2ad60a72a554155d/hf_xet-1.4.3-cp314-cp314t-win_arm64.whl", hash = "sha256:681c92a07796325778a79d76c67011764ecc9042a8c3579332b61b63ae512075", size = 3528945, upload-time = "2026-03-31T22:40:14.995Z" }, + { url = "https://files.pythonhosted.org/packages/ac/9f/9c23e4a447b8f83120798f9279d0297a4d1360bdbf59ef49ebec78fe2545/hf_xet-1.4.3-cp37-abi3-macosx_10_12_x86_64.whl", hash = "sha256:d0da85329eaf196e03e90b84c2d0aca53bd4573d097a75f99609e80775f98025", size = 3805048, upload-time = "2026-03-31T22:39:53.105Z" }, + { url = "https://files.pythonhosted.org/packages/0b/f8/7aacb8e5f4a7899d39c787b5984e912e6c18b11be136ef13947d7a66d265/hf_xet-1.4.3-cp37-abi3-macosx_11_0_arm64.whl", hash = "sha256:e23717ce4186b265f69afa66e6f0069fe7efbf331546f5c313d00e123dc84583", size = 3562178, upload-time = "2026-03-31T22:39:51.295Z" }, + { url = "https://files.pythonhosted.org/packages/df/9a/a24b26dc8a65f0ecc0fe5be981a19e61e7ca963b85e062c083f3a9100529/hf_xet-1.4.3-cp37-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:fc360b70c815bf340ed56c7b8c63aacf11762a4b099b2fe2c9bd6d6068668c08", size = 4212320, upload-time = "2026-03-31T22:39:42.922Z" }, + { url = "https://files.pythonhosted.org/packages/53/60/46d493db155d2ee2801b71fb1b0fd67696359047fdd8caee2c914cc50c79/hf_xet-1.4.3-cp37-abi3-manylinux_2_28_aarch64.whl", hash = "sha256:39f2d2e9654cd9b4319885733993807aab6de9dfbd34c42f0b78338d6617421f", size = 3991546, upload-time = "2026-03-31T22:39:41.335Z" }, + { url = "https://files.pythonhosted.org/packages/bc/f5/067363e1c96c6b17256910830d1b54099d06287e10f4ec6ec4e7e08371fc/hf_xet-1.4.3-cp37-abi3-musllinux_1_2_aarch64.whl", hash = "sha256:49ad8a8cead2b56051aa84d7fce3e1335efe68df3cf6c058f22a65513885baac", size = 4193200, upload-time = "2026-03-31T22:40:01.936Z" }, + { url = "https://files.pythonhosted.org/packages/42/4b/53951592882d9c23080c7644542fda34a3813104e9e11fa1a7d82d419cb8/hf_xet-1.4.3-cp37-abi3-musllinux_1_2_x86_64.whl", hash = "sha256:7716d62015477a70ea272d2d68cd7cad140f61c52ee452e133e139abfe2c17ba", size = 4429392, upload-time = "2026-03-31T22:40:03.492Z" }, + { url = "https://files.pythonhosted.org/packages/8a/21/75a6c175b4e79662ad8e62f46a40ce341d8d6b206b06b4320d07d55b188c/hf_xet-1.4.3-cp37-abi3-win_amd64.whl", hash = "sha256:6b591fcad34e272a5b02607485e4f2a1334aebf1bc6d16ce8eb1eb8978ac2021", size = 3677359, upload-time = "2026-03-31T22:40:13.619Z" }, + { url = "https://files.pythonhosted.org/packages/8a/7c/44314ecd0e89f8b2b51c9d9e5e7a60a9c1c82024ac471d415860557d3cd8/hf_xet-1.4.3-cp37-abi3-win_arm64.whl", hash = "sha256:7c2c7e20bcfcc946dc67187c203463f5e932e395845d098cc2a93f5b67ca0b47", size = 3533664, upload-time = "2026-03-31T22:40:12.152Z" }, +] + +[[package]] +name = "httpcore" +version = "1.0.9" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "certifi" }, + { name = "h11" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/06/94/82699a10bca87a5556c9c59b5963f2d039dbd239f25bc2a63907a05a14cb/httpcore-1.0.9.tar.gz", hash = "sha256:6e34463af53fd2ab5d807f399a9b45ea31c3dfa2276f15a2c3f00afff6e176e8", size = 85484, upload-time = "2025-04-24T22:06:22.219Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/7e/f5/f66802a942d491edb555dd61e3a9961140fd64c90bce1eafd741609d334d/httpcore-1.0.9-py3-none-any.whl", hash = "sha256:2d400746a40668fc9dec9810239072b40b4484b640a8c38fd654a024c7a1bf55", size = 78784, upload-time = "2025-04-24T22:06:20.566Z" }, +] + +[[package]] +name = "httpx" +version = "0.28.1" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "anyio" }, + { name = "certifi" }, + { name = "httpcore" }, + { name = "idna" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/b1/df/48c586a5fe32a0f01324ee087459e112ebb7224f646c0b5023f5e79e9956/httpx-0.28.1.tar.gz", hash = "sha256:75e98c5f16b0f35b567856f597f06ff2270a374470a5c2392242528e3e3e42fc", size = 141406, upload-time = "2024-12-06T15:37:23.222Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/2a/39/e50c7c3a983047577ee07d2a9e53faf5a69493943ec3f6a384bdc792deb2/httpx-0.28.1-py3-none-any.whl", hash = "sha256:d909fcccc110f8c7faf814ca82a9a4d816bc5a6dbfea25d6591d6985b8ba59ad", size = 73517, upload-time = "2024-12-06T15:37:21.509Z" }, +] + +[[package]] +name = "httpx-sse" +version = "0.4.3" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/0f/4c/751061ffa58615a32c31b2d82e8482be8dd4a89154f003147acee90f2be9/httpx_sse-0.4.3.tar.gz", hash = "sha256:9b1ed0127459a66014aec3c56bebd93da3c1bc8bb6618c8082039a44889a755d", size = 15943, upload-time = "2025-10-10T21:48:22.271Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/d2/fd/6668e5aec43ab844de6fc74927e155a3b37bf40d7c3790e49fc0406b6578/httpx_sse-0.4.3-py3-none-any.whl", hash = "sha256:0ac1c9fe3c0afad2e0ebb25a934a59f4c7823b60792691f779fad2c5568830fc", size = 8960, upload-time = "2025-10-10T21:48:21.158Z" }, +] + +[[package]] +name = "huggingface-hub" +version = "1.8.0" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "filelock" }, + { name = "fsspec" }, + { name = "hf-xet", marker = "platform_machine == 'AMD64' or platform_machine == 'aarch64' or platform_machine == 'amd64' or platform_machine == 'arm64' or platform_machine == 'x86_64'" }, + { name = "httpx" }, + { name = "packaging" }, + { name = "pyyaml" }, + { name = "tqdm" }, + { name = "typer" }, + { name = "typing-extensions" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/8e/2a/a847fd02261cd051da218baf99f90ee7c7040c109a01833db4f838f25256/huggingface_hub-1.8.0.tar.gz", hash = "sha256:c5627b2fd521e00caf8eff4ac965ba988ea75167fad7ee72e17f9b7183ec63f3", size = 735839, upload-time = "2026-03-25T16:01:28.152Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/a9/ae/8a3a16ea4d202cb641b51d2681bdd3d482c1c592d7570b3fa264730829ce/huggingface_hub-1.8.0-py3-none-any.whl", hash = "sha256:d3eb5047bd4e33c987429de6020d4810d38a5bef95b3b40df9b17346b7f353f2", size = 625208, upload-time = "2026-03-25T16:01:26.603Z" }, +] + +[[package]] +name = "idna" +version = "3.11" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/6f/6d/0703ccc57f3a7233505399edb88de3cbd678da106337b9fcde432b65ed60/idna-3.11.tar.gz", hash = "sha256:795dafcc9c04ed0c1fb032c2aa73654d8e8c5023a7df64a53f39190ada629902", size = 194582, upload-time = "2025-10-12T14:55:20.501Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/0e/61/66938bbb5fc52dbdf84594873d5b51fb1f7c7794e9c0f5bd885f30bc507b/idna-3.11-py3-none-any.whl", hash = "sha256:771a87f49d9defaf64091e6e6fe9c18d4833f140bd19464795bc32d966ca37ea", size = 71008, upload-time = "2025-10-12T14:55:18.883Z" }, +] + +[[package]] +name = "importlib-metadata" +version = "8.7.1" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "zipp" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/f3/49/3b30cad09e7771a4982d9975a8cbf64f00d4a1ececb53297f1d9a7be1b10/importlib_metadata-8.7.1.tar.gz", hash = "sha256:49fef1ae6440c182052f407c8d34a68f72efc36db9ca90dc0113398f2fdde8bb", size = 57107, upload-time = "2025-12-21T10:00:19.278Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/fa/5e/f8e9a1d23b9c20a551a8a02ea3637b4642e22c2626e3a13a9a29cdea99eb/importlib_metadata-8.7.1-py3-none-any.whl", hash = "sha256:5a1f80bf1daa489495071efbb095d75a634cf28a8bc299581244063b53176151", size = 27865, upload-time = "2025-12-21T10:00:18.329Z" }, +] + +[[package]] +name = "iniconfig" +version = "2.3.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/72/34/14ca021ce8e5dfedc35312d08ba8bf51fdd999c576889fc2c24cb97f4f10/iniconfig-2.3.0.tar.gz", hash = "sha256:c76315c77db068650d49c5b56314774a7804df16fee4402c1f19d6d15d8c4730", size = 20503, upload-time = "2025-10-18T21:55:43.219Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/cb/b1/3846dd7f199d53cb17f49cba7e651e9ce294d8497c8c150530ed11865bb8/iniconfig-2.3.0-py3-none-any.whl", hash = "sha256:f631c04d2c48c52b84d0d0549c99ff3859c98df65b3101406327ecc7d53fbf12", size = 7484, upload-time = "2025-10-18T21:55:41.639Z" }, +] + +[[package]] +name = "jaraco-classes" +version = "3.4.0" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "more-itertools" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/06/c0/ed4a27bc5571b99e3cff68f8a9fa5b56ff7df1c2251cc715a652ddd26402/jaraco.classes-3.4.0.tar.gz", hash = "sha256:47a024b51d0239c0dd8c8540c6c7f484be3b8fcf0b2d85c13825780d3b3f3acd", size = 11780, upload-time = "2024-03-31T07:27:36.643Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/7f/66/b15ce62552d84bbfcec9a4873ab79d993a1dd4edb922cbfccae192bd5b5f/jaraco.classes-3.4.0-py3-none-any.whl", hash = "sha256:f662826b6bed8cace05e7ff873ce0f9283b5c924470fe664fff1c2f00f581790", size = 6777, upload-time = "2024-03-31T07:27:34.792Z" }, +] + +[[package]] +name = "jaraco-context" +version = "6.1.2" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "backports-tarfile", marker = "python_full_version < '3.12'" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/af/50/4763cd07e722bb6285316d390a164bc7e479db9d90daa769f22578f698b4/jaraco_context-6.1.2.tar.gz", hash = "sha256:f1a6c9d391e661cc5b8d39861ff077a7dc24dc23833ccee564b234b81c82dfe3", size = 16801, upload-time = "2026-03-20T22:13:33.922Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/f2/58/bc8954bda5fcda97bd7c19be11b85f91973d67a706ed4a3aec33e7de22db/jaraco_context-6.1.2-py3-none-any.whl", hash = "sha256:bf8150b79a2d5d91ae48629d8b427a8f7ba0e1097dd6202a9059f29a36379535", size = 7871, upload-time = "2026-03-20T22:13:32.808Z" }, +] + +[[package]] +name = "jaraco-functools" +version = "4.4.0" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "more-itertools" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/0f/27/056e0638a86749374d6f57d0b0db39f29509cce9313cf91bdc0ac4d91084/jaraco_functools-4.4.0.tar.gz", hash = "sha256:da21933b0417b89515562656547a77b4931f98176eb173644c0d35032a33d6bb", size = 19943, upload-time = "2025-12-21T09:29:43.6Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/fd/c4/813bb09f0985cb21e959f21f2464169eca882656849adf727ac7bb7e1767/jaraco_functools-4.4.0-py3-none-any.whl", hash = "sha256:9eec1e36f45c818d9bf307c8948eb03b2b56cd44087b3cdc989abca1f20b9176", size = 10481, upload-time = "2025-12-21T09:29:42.27Z" }, +] + +[[package]] +name = "jeepney" +version = "0.9.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/7b/6f/357efd7602486741aa73ffc0617fb310a29b588ed0fd69c2399acbb85b0c/jeepney-0.9.0.tar.gz", hash = "sha256:cf0e9e845622b81e4a28df94c40345400256ec608d0e55bb8a3feaa9163f5732", size = 106758, upload-time = "2025-02-27T18:51:01.684Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/b2/a3/e137168c9c44d18eff0376253da9f1e9234d0239e0ee230d2fee6cea8e55/jeepney-0.9.0-py3-none-any.whl", hash = "sha256:97e5714520c16fc0a45695e5365a2e11b81ea79bba796e26f9f1d178cb182683", size = 49010, upload-time = "2025-02-27T18:51:00.104Z" }, +] + +[[package]] +name = "jinja2" +version = "3.1.6" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "markupsafe" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/df/bf/f7da0350254c0ed7c72f3e33cef02e048281fec7ecec5f032d4aac52226b/jinja2-3.1.6.tar.gz", hash = "sha256:0137fb05990d35f1275a587e9aee6d56da821fc83491a0fb838183be43f66d6d", size = 245115, upload-time = "2025-03-05T20:05:02.478Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/62/a1/3d680cbfd5f4b8f15abc1d571870c5fc3e594bb582bc3b64ea099db13e56/jinja2-3.1.6-py3-none-any.whl", hash = "sha256:85ece4451f492d0c13c5dd7c13a64681a86afae63a5f347908daf103ce6d2f67", size = 134899, upload-time = "2025-03-05T20:05:00.369Z" }, +] + +[[package]] +name = "jiter" +version = "0.13.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/0d/5e/4ec91646aee381d01cdb9974e30882c9cd3b8c5d1079d6b5ff4af522439a/jiter-0.13.0.tar.gz", hash = "sha256:f2839f9c2c7e2dffc1bc5929a510e14ce0a946be9365fd1219e7ef342dae14f4", size = 164847, upload-time = "2026-02-02T12:37:56.441Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/71/29/499f8c9eaa8a16751b1c0e45e6f5f1761d180da873d417996cc7bddc8eef/jiter-0.13.0-cp311-cp311-macosx_10_12_x86_64.whl", hash = "sha256:ea026e70a9a28ebbdddcbcf0f1323128a8db66898a06eaad3a4e62d2f554d096", size = 311157, upload-time = "2026-02-02T12:35:37.758Z" }, + { url = "https://files.pythonhosted.org/packages/50/f6/566364c777d2ab450b92100bea11333c64c38d32caf8dc378b48e5b20c46/jiter-0.13.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:66aa3e663840152d18cc8ff1e4faad3dd181373491b9cfdc6004b92198d67911", size = 319729, upload-time = "2026-02-02T12:35:39.246Z" }, + { url = "https://files.pythonhosted.org/packages/73/dd/560f13ec5e4f116d8ad2658781646cca91b617ae3b8758d4a5076b278f70/jiter-0.13.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c3524798e70655ff19aec58c7d05adb1f074fecff62da857ea9be2b908b6d701", size = 354766, upload-time = "2026-02-02T12:35:40.662Z" }, + { url = "https://files.pythonhosted.org/packages/7c/0d/061faffcfe94608cbc28a0d42a77a74222bdf5055ccdbe5fd2292b94f510/jiter-0.13.0-cp311-cp311-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:ec7e287d7fbd02cb6e22f9a00dd9c9cd504c40a61f2c61e7e1f9690a82726b4c", size = 362587, upload-time = "2026-02-02T12:35:42.025Z" }, + { url = "https://files.pythonhosted.org/packages/92/c9/c66a7864982fd38a9773ec6e932e0398d1262677b8c60faecd02ffb67bf3/jiter-0.13.0-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:47455245307e4debf2ce6c6e65a717550a0244231240dcf3b8f7d64e4c2f22f4", size = 487537, upload-time = "2026-02-02T12:35:43.459Z" }, + { url = "https://files.pythonhosted.org/packages/6c/86/84eb4352cd3668f16d1a88929b5888a3fe0418ea8c1dfc2ad4e7bf6e069a/jiter-0.13.0-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:ee9da221dca6e0429c2704c1b3655fe7b025204a71d4d9b73390c759d776d165", size = 373717, upload-time = "2026-02-02T12:35:44.928Z" }, + { url = "https://files.pythonhosted.org/packages/6e/09/9fe4c159358176f82d4390407a03f506a8659ed13ca3ac93a843402acecf/jiter-0.13.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:24ab43126d5e05f3d53a36a8e11eb2f23304c6c1117844aaaf9a0aa5e40b5018", size = 362683, upload-time = "2026-02-02T12:35:46.636Z" }, + { url = "https://files.pythonhosted.org/packages/c9/5e/85f3ab9caca0c1d0897937d378b4a515cae9e119730563572361ea0c48ae/jiter-0.13.0-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:9da38b4fedde4fb528c740c2564628fbab737166a0e73d6d46cb4bb5463ff411", size = 392345, upload-time = "2026-02-02T12:35:48.088Z" }, + { url = "https://files.pythonhosted.org/packages/12/4c/05b8629ad546191939e6f0c2f17e29f542a398f4a52fb987bc70b6d1eb8b/jiter-0.13.0-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:0b34c519e17658ed88d5047999a93547f8889f3c1824120c26ad6be5f27b6cf5", size = 517775, upload-time = "2026-02-02T12:35:49.482Z" }, + { url = "https://files.pythonhosted.org/packages/4d/88/367ea2eb6bc582c7052e4baf5ddf57ebe5ab924a88e0e09830dfb585c02d/jiter-0.13.0-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:d2a6394e6af690d462310a86b53c47ad75ac8c21dc79f120714ea449979cb1d3", size = 551325, upload-time = "2026-02-02T12:35:51.104Z" }, + { url = "https://files.pythonhosted.org/packages/f3/12/fa377ffb94a2f28c41afaed093e0d70cfe512035d5ecb0cad0ae4792d35e/jiter-0.13.0-cp311-cp311-win32.whl", hash = "sha256:0f0c065695f616a27c920a56ad0d4fc46415ef8b806bf8fc1cacf25002bd24e1", size = 204709, upload-time = "2026-02-02T12:35:52.467Z" }, + { url = "https://files.pythonhosted.org/packages/cb/16/8e8203ce92f844dfcd3d9d6a5a7322c77077248dbb12da52d23193a839cd/jiter-0.13.0-cp311-cp311-win_amd64.whl", hash = "sha256:0733312953b909688ae3c2d58d043aa040f9f1a6a75693defed7bc2cc4bf2654", size = 204560, upload-time = "2026-02-02T12:35:53.925Z" }, + { url = "https://files.pythonhosted.org/packages/44/26/97cc40663deb17b9e13c3a5cf29251788c271b18ee4d262c8f94798b8336/jiter-0.13.0-cp311-cp311-win_arm64.whl", hash = "sha256:5d9b34ad56761b3bf0fbe8f7e55468704107608512350962d3317ffd7a4382d5", size = 189608, upload-time = "2026-02-02T12:35:55.304Z" }, + { url = "https://files.pythonhosted.org/packages/2e/30/7687e4f87086829955013ca12a9233523349767f69653ebc27036313def9/jiter-0.13.0-cp312-cp312-macosx_10_12_x86_64.whl", hash = "sha256:0a2bd69fc1d902e89925fc34d1da51b2128019423d7b339a45d9e99c894e0663", size = 307958, upload-time = "2026-02-02T12:35:57.165Z" }, + { url = "https://files.pythonhosted.org/packages/c3/27/e57f9a783246ed95481e6749cc5002a8a767a73177a83c63ea71f0528b90/jiter-0.13.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:f917a04240ef31898182f76a332f508f2cc4b57d2b4d7ad2dbfebbfe167eb505", size = 318597, upload-time = "2026-02-02T12:35:58.591Z" }, + { url = "https://files.pythonhosted.org/packages/cf/52/e5719a60ac5d4d7c5995461a94ad5ef962a37c8bf5b088390e6fad59b2ff/jiter-0.13.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c1e2b199f446d3e82246b4fd9236d7cb502dc2222b18698ba0d986d2fecc6152", size = 348821, upload-time = "2026-02-02T12:36:00.093Z" }, + { url = "https://files.pythonhosted.org/packages/61/db/c1efc32b8ba4c740ab3fc2d037d8753f67685f475e26b9d6536a4322bcdd/jiter-0.13.0-cp312-cp312-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:04670992b576fa65bd056dbac0c39fe8bd67681c380cb2b48efa885711d9d726", size = 364163, upload-time = "2026-02-02T12:36:01.937Z" }, + { url = "https://files.pythonhosted.org/packages/55/8a/fb75556236047c8806995671a18e4a0ad646ed255276f51a20f32dceaeec/jiter-0.13.0-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:5a1aff1fbdb803a376d4d22a8f63f8e7ccbce0b4890c26cc7af9e501ab339ef0", size = 483709, upload-time = "2026-02-02T12:36:03.41Z" }, + { url = "https://files.pythonhosted.org/packages/7e/16/43512e6ee863875693a8e6f6d532e19d650779d6ba9a81593ae40a9088ff/jiter-0.13.0-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:3b3fb8c2053acaef8580809ac1d1f7481a0a0bdc012fd7f5d8b18fb696a5a089", size = 370480, upload-time = "2026-02-02T12:36:04.791Z" }, + { url = "https://files.pythonhosted.org/packages/f8/4c/09b93e30e984a187bc8aaa3510e1ec8dcbdcd71ca05d2f56aac0492453aa/jiter-0.13.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:bdaba7d87e66f26a2c45d8cbadcbfc4bf7884182317907baf39cfe9775bb4d93", size = 360735, upload-time = "2026-02-02T12:36:06.994Z" }, + { url = "https://files.pythonhosted.org/packages/1a/1b/46c5e349019874ec5dfa508c14c37e29864ea108d376ae26d90bee238cd7/jiter-0.13.0-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:7b88d649135aca526da172e48083da915ec086b54e8e73a425ba50999468cc08", size = 391814, upload-time = "2026-02-02T12:36:08.368Z" }, + { url = "https://files.pythonhosted.org/packages/15/9e/26184760e85baee7162ad37b7912797d2077718476bf91517641c92b3639/jiter-0.13.0-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:e404ea551d35438013c64b4f357b0474c7abf9f781c06d44fcaf7a14c69ff9e2", size = 513990, upload-time = "2026-02-02T12:36:09.993Z" }, + { url = "https://files.pythonhosted.org/packages/e9/34/2c9355247d6debad57a0a15e76ab1566ab799388042743656e566b3b7de1/jiter-0.13.0-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:1f4748aad1b4a93c8bdd70f604d0f748cdc0e8744c5547798acfa52f10e79228", size = 548021, upload-time = "2026-02-02T12:36:11.376Z" }, + { url = "https://files.pythonhosted.org/packages/ac/4a/9f2c23255d04a834398b9c2e0e665382116911dc4d06b795710503cdad25/jiter-0.13.0-cp312-cp312-win32.whl", hash = "sha256:0bf670e3b1445fc4d31612199f1744f67f889ee1bbae703c4b54dc097e5dd394", size = 203024, upload-time = "2026-02-02T12:36:12.682Z" }, + { url = "https://files.pythonhosted.org/packages/09/ee/f0ae675a957ae5a8f160be3e87acea6b11dc7b89f6b7ab057e77b2d2b13a/jiter-0.13.0-cp312-cp312-win_amd64.whl", hash = "sha256:15db60e121e11fe186c0b15236bd5d18381b9ddacdcf4e659feb96fc6c969c92", size = 205424, upload-time = "2026-02-02T12:36:13.93Z" }, + { url = "https://files.pythonhosted.org/packages/1b/02/ae611edf913d3cbf02c97cdb90374af2082c48d7190d74c1111dde08bcdd/jiter-0.13.0-cp312-cp312-win_arm64.whl", hash = "sha256:41f92313d17989102f3cb5dd533a02787cdb99454d494344b0361355da52fcb9", size = 186818, upload-time = "2026-02-02T12:36:15.308Z" }, + { url = "https://files.pythonhosted.org/packages/91/9c/7ee5a6ff4b9991e1a45263bfc46731634c4a2bde27dfda6c8251df2d958c/jiter-0.13.0-cp313-cp313-macosx_10_12_x86_64.whl", hash = "sha256:1f8a55b848cbabf97d861495cd65f1e5c590246fabca8b48e1747c4dfc8f85bf", size = 306897, upload-time = "2026-02-02T12:36:16.748Z" }, + { url = "https://files.pythonhosted.org/packages/7c/02/be5b870d1d2be5dd6a91bdfb90f248fbb7dcbd21338f092c6b89817c3dbf/jiter-0.13.0-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:f556aa591c00f2c45eb1b89f68f52441a016034d18b65da60e2d2875bbbf344a", size = 317507, upload-time = "2026-02-02T12:36:18.351Z" }, + { url = "https://files.pythonhosted.org/packages/da/92/b25d2ec333615f5f284f3a4024f7ce68cfa0604c322c6808b2344c7f5d2b/jiter-0.13.0-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f7e1d61da332ec412350463891923f960c3073cf1aae93b538f0bb4c8cd46efb", size = 350560, upload-time = "2026-02-02T12:36:19.746Z" }, + { url = "https://files.pythonhosted.org/packages/be/ec/74dcb99fef0aca9fbe56b303bf79f6bd839010cb18ad41000bf6cc71eec0/jiter-0.13.0-cp313-cp313-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:3097d665a27bc96fd9bbf7f86178037db139f319f785e4757ce7ccbf390db6c2", size = 363232, upload-time = "2026-02-02T12:36:21.243Z" }, + { url = "https://files.pythonhosted.org/packages/1b/37/f17375e0bb2f6a812d4dd92d7616e41917f740f3e71343627da9db2824ce/jiter-0.13.0-cp313-cp313-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:9d01ecc3a8cbdb6f25a37bd500510550b64ddf9f7d64a107d92f3ccb25035d0f", size = 483727, upload-time = "2026-02-02T12:36:22.688Z" }, + { url = "https://files.pythonhosted.org/packages/77/d2/a71160a5ae1a1e66c1395b37ef77da67513b0adba73b993a27fbe47eb048/jiter-0.13.0-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:ed9bbc30f5d60a3bdf63ae76beb3f9db280d7f195dfcfa61af792d6ce912d159", size = 370799, upload-time = "2026-02-02T12:36:24.106Z" }, + { url = "https://files.pythonhosted.org/packages/01/99/ed5e478ff0eb4e8aa5fd998f9d69603c9fd3f32de3bd16c2b1194f68361c/jiter-0.13.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:98fbafb6e88256f4454de33c1f40203d09fc33ed19162a68b3b257b29ca7f663", size = 359120, upload-time = "2026-02-02T12:36:25.519Z" }, + { url = "https://files.pythonhosted.org/packages/16/be/7ffd08203277a813f732ba897352797fa9493faf8dc7995b31f3d9cb9488/jiter-0.13.0-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:5467696f6b827f1116556cb0db620440380434591e93ecee7fd14d1a491b6daa", size = 390664, upload-time = "2026-02-02T12:36:26.866Z" }, + { url = "https://files.pythonhosted.org/packages/d1/84/e0787856196d6d346264d6dcccb01f741e5f0bd014c1d9a2ebe149caf4f3/jiter-0.13.0-cp313-cp313-musllinux_1_1_aarch64.whl", hash = "sha256:2d08c9475d48b92892583df9da592a0e2ac49bcd41fae1fec4f39ba6cf107820", size = 513543, upload-time = "2026-02-02T12:36:28.217Z" }, + { url = "https://files.pythonhosted.org/packages/65/50/ecbd258181c4313cf79bca6c88fb63207d04d5bf5e4f65174114d072aa55/jiter-0.13.0-cp313-cp313-musllinux_1_1_x86_64.whl", hash = "sha256:aed40e099404721d7fcaf5b89bd3b4568a4666358bcac7b6b15c09fb6252ab68", size = 547262, upload-time = "2026-02-02T12:36:29.678Z" }, + { url = "https://files.pythonhosted.org/packages/27/da/68f38d12e7111d2016cd198161b36e1f042bd115c169255bcb7ec823a3bf/jiter-0.13.0-cp313-cp313-win32.whl", hash = "sha256:36ebfbcffafb146d0e6ffb3e74d51e03d9c35ce7c625c8066cdbfc7b953bdc72", size = 200630, upload-time = "2026-02-02T12:36:31.808Z" }, + { url = "https://files.pythonhosted.org/packages/25/65/3bd1a972c9a08ecd22eb3b08a95d1941ebe6938aea620c246cf426ae09c2/jiter-0.13.0-cp313-cp313-win_amd64.whl", hash = "sha256:8d76029f077379374cf0dbc78dbe45b38dec4a2eb78b08b5194ce836b2517afc", size = 202602, upload-time = "2026-02-02T12:36:33.679Z" }, + { url = "https://files.pythonhosted.org/packages/15/fe/13bd3678a311aa67686bb303654792c48206a112068f8b0b21426eb6851e/jiter-0.13.0-cp313-cp313-win_arm64.whl", hash = "sha256:bb7613e1a427cfcb6ea4544f9ac566b93d5bf67e0d48c787eca673ff9c9dff2b", size = 185939, upload-time = "2026-02-02T12:36:35.065Z" }, + { url = "https://files.pythonhosted.org/packages/49/19/a929ec002ad3228bc97ca01dbb14f7632fffdc84a95ec92ceaf4145688ae/jiter-0.13.0-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:fa476ab5dd49f3bf3a168e05f89358c75a17608dbabb080ef65f96b27c19ab10", size = 316616, upload-time = "2026-02-02T12:36:36.579Z" }, + { url = "https://files.pythonhosted.org/packages/52/56/d19a9a194afa37c1728831e5fb81b7722c3de18a3109e8f282bfc23e587a/jiter-0.13.0-cp313-cp313t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ade8cb6ff5632a62b7dbd4757d8c5573f7a2e9ae285d6b5b841707d8363205ef", size = 346850, upload-time = "2026-02-02T12:36:38.058Z" }, + { url = "https://files.pythonhosted.org/packages/36/4a/94e831c6bf287754a8a019cb966ed39ff8be6ab78cadecf08df3bb02d505/jiter-0.13.0-cp313-cp313t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9950290340acc1adaded363edd94baebcee7dabdfa8bee4790794cd5cfad2af6", size = 358551, upload-time = "2026-02-02T12:36:39.417Z" }, + { url = "https://files.pythonhosted.org/packages/a2/ec/a4c72c822695fa80e55d2b4142b73f0012035d9fcf90eccc56bc060db37c/jiter-0.13.0-cp313-cp313t-win_amd64.whl", hash = "sha256:2b4972c6df33731aac0742b64fd0d18e0a69bc7d6e03108ce7d40c85fd9e3e6d", size = 201950, upload-time = "2026-02-02T12:36:40.791Z" }, + { url = "https://files.pythonhosted.org/packages/b6/00/393553ec27b824fbc29047e9c7cd4a3951d7fbe4a76743f17e44034fa4e4/jiter-0.13.0-cp313-cp313t-win_arm64.whl", hash = "sha256:701a1e77d1e593c1b435315ff625fd071f0998c5f02792038a5ca98899261b7d", size = 185852, upload-time = "2026-02-02T12:36:42.077Z" }, + { url = "https://files.pythonhosted.org/packages/6e/f5/f1997e987211f6f9bd71b8083047b316208b4aca0b529bb5f8c96c89ef3e/jiter-0.13.0-cp314-cp314-macosx_10_12_x86_64.whl", hash = "sha256:cc5223ab19fe25e2f0bf2643204ad7318896fe3729bf12fde41b77bfc4fafff0", size = 308804, upload-time = "2026-02-02T12:36:43.496Z" }, + { url = "https://files.pythonhosted.org/packages/cd/8f/5482a7677731fd44881f0204981ce2d7175db271f82cba2085dd2212e095/jiter-0.13.0-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:9776ebe51713acf438fd9b4405fcd86893ae5d03487546dae7f34993217f8a91", size = 318787, upload-time = "2026-02-02T12:36:45.071Z" }, + { url = "https://files.pythonhosted.org/packages/f3/b9/7257ac59778f1cd025b26a23c5520a36a424f7f1b068f2442a5b499b7464/jiter-0.13.0-cp314-cp314-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:879e768938e7b49b5e90b7e3fecc0dbec01b8cb89595861fb39a8967c5220d09", size = 353880, upload-time = "2026-02-02T12:36:47.365Z" }, + { url = "https://files.pythonhosted.org/packages/c3/87/719eec4a3f0841dad99e3d3604ee4cba36af4419a76f3cb0b8e2e691ad67/jiter-0.13.0-cp314-cp314-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:682161a67adea11e3aae9038c06c8b4a9a71023228767477d683f69903ebc607", size = 366702, upload-time = "2026-02-02T12:36:48.871Z" }, + { url = "https://files.pythonhosted.org/packages/d2/65/415f0a75cf6921e43365a1bc227c565cb949caca8b7532776e430cbaa530/jiter-0.13.0-cp314-cp314-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:a13b68cd1cd8cc9de8f244ebae18ccb3e4067ad205220ef324c39181e23bbf66", size = 486319, upload-time = "2026-02-02T12:36:53.006Z" }, + { url = "https://files.pythonhosted.org/packages/54/a2/9e12b48e82c6bbc6081fd81abf915e1443add1b13d8fc586e1d90bb02bb8/jiter-0.13.0-cp314-cp314-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:87ce0f14c6c08892b610686ae8be350bf368467b6acd5085a5b65441e2bf36d2", size = 372289, upload-time = "2026-02-02T12:36:54.593Z" }, + { url = "https://files.pythonhosted.org/packages/4e/c1/e4693f107a1789a239c759a432e9afc592366f04e901470c2af89cfd28e1/jiter-0.13.0-cp314-cp314-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:0c365005b05505a90d1c47856420980d0237adf82f70c4aff7aebd3c1cc143ad", size = 360165, upload-time = "2026-02-02T12:36:56.112Z" }, + { url = "https://files.pythonhosted.org/packages/17/08/91b9ea976c1c758240614bd88442681a87672eebc3d9a6dde476874e706b/jiter-0.13.0-cp314-cp314-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:1317fdffd16f5873e46ce27d0e0f7f4f90f0cdf1d86bf6abeaea9f63ca2c401d", size = 389634, upload-time = "2026-02-02T12:36:57.495Z" }, + { url = "https://files.pythonhosted.org/packages/18/23/58325ef99390d6d40427ed6005bf1ad54f2577866594bcf13ce55675f87d/jiter-0.13.0-cp314-cp314-musllinux_1_1_aarch64.whl", hash = "sha256:c05b450d37ba0c9e21c77fef1f205f56bcee2330bddca68d344baebfc55ae0df", size = 514933, upload-time = "2026-02-02T12:36:58.909Z" }, + { url = "https://files.pythonhosted.org/packages/5b/25/69f1120c7c395fd276c3996bb8adefa9c6b84c12bb7111e5c6ccdcd8526d/jiter-0.13.0-cp314-cp314-musllinux_1_1_x86_64.whl", hash = "sha256:775e10de3849d0631a97c603f996f518159272db00fdda0a780f81752255ee9d", size = 548842, upload-time = "2026-02-02T12:37:00.433Z" }, + { url = "https://files.pythonhosted.org/packages/18/05/981c9669d86850c5fbb0d9e62bba144787f9fba84546ba43d624ee27ef29/jiter-0.13.0-cp314-cp314-win32.whl", hash = "sha256:632bf7c1d28421c00dd8bbb8a3bac5663e1f57d5cd5ed962bce3c73bf62608e6", size = 202108, upload-time = "2026-02-02T12:37:01.718Z" }, + { url = "https://files.pythonhosted.org/packages/8d/96/cdcf54dd0b0341db7d25413229888a346c7130bd20820530905fdb65727b/jiter-0.13.0-cp314-cp314-win_amd64.whl", hash = "sha256:f22ef501c3f87ede88f23f9b11e608581c14f04db59b6a801f354397ae13739f", size = 204027, upload-time = "2026-02-02T12:37:03.075Z" }, + { url = "https://files.pythonhosted.org/packages/fb/f9/724bcaaab7a3cd727031fe4f6995cb86c4bd344909177c186699c8dec51a/jiter-0.13.0-cp314-cp314-win_arm64.whl", hash = "sha256:07b75fe09a4ee8e0c606200622e571e44943f47254f95e2436c8bdcaceb36d7d", size = 187199, upload-time = "2026-02-02T12:37:04.414Z" }, + { url = "https://files.pythonhosted.org/packages/62/92/1661d8b9fd6a3d7a2d89831db26fe3c1509a287d83ad7838831c7b7a5c7e/jiter-0.13.0-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:964538479359059a35fb400e769295d4b315ae61e4105396d355a12f7fef09f0", size = 318423, upload-time = "2026-02-02T12:37:05.806Z" }, + { url = "https://files.pythonhosted.org/packages/4f/3b/f77d342a54d4ebcd128e520fc58ec2f5b30a423b0fd26acdfc0c6fef8e26/jiter-0.13.0-cp314-cp314t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e104da1db1c0991b3eaed391ccd650ae8d947eab1480c733e5a3fb28d4313e40", size = 351438, upload-time = "2026-02-02T12:37:07.189Z" }, + { url = "https://files.pythonhosted.org/packages/76/b3/ba9a69f0e4209bd3331470c723c2f5509e6f0482e416b612431a5061ed71/jiter-0.13.0-cp314-cp314t-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:0e3a5f0cde8ff433b8e88e41aa40131455420fb3649a3c7abdda6145f8cb7202", size = 364774, upload-time = "2026-02-02T12:37:08.579Z" }, + { url = "https://files.pythonhosted.org/packages/b3/16/6cdb31fa342932602458dbb631bfbd47f601e03d2e4950740e0b2100b570/jiter-0.13.0-cp314-cp314t-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:57aab48f40be1db920a582b30b116fe2435d184f77f0e4226f546794cedd9cf0", size = 487238, upload-time = "2026-02-02T12:37:10.066Z" }, + { url = "https://files.pythonhosted.org/packages/ed/b1/956cc7abaca8d95c13aa8d6c9b3f3797241c246cd6e792934cc4c8b250d2/jiter-0.13.0-cp314-cp314t-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:7772115877c53f62beeb8fd853cab692dbc04374ef623b30f997959a4c0e7e95", size = 372892, upload-time = "2026-02-02T12:37:11.656Z" }, + { url = "https://files.pythonhosted.org/packages/26/c4/97ecde8b1e74f67b8598c57c6fccf6df86ea7861ed29da84629cdbba76c4/jiter-0.13.0-cp314-cp314t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:1211427574b17b633cfceba5040de8081e5abf114f7a7602f73d2e16f9fdaa59", size = 360309, upload-time = "2026-02-02T12:37:13.244Z" }, + { url = "https://files.pythonhosted.org/packages/4b/d7/eabe3cf46715854ccc80be2cd78dd4c36aedeb30751dbf85a1d08c14373c/jiter-0.13.0-cp314-cp314t-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:7beae3a3d3b5212d3a55d2961db3c292e02e302feb43fce6a3f7a31b90ea6dfe", size = 389607, upload-time = "2026-02-02T12:37:14.881Z" }, + { url = "https://files.pythonhosted.org/packages/df/2d/03963fc0804e6109b82decfb9974eb92df3797fe7222428cae12f8ccaa0c/jiter-0.13.0-cp314-cp314t-musllinux_1_1_aarch64.whl", hash = "sha256:e5562a0f0e90a6223b704163ea28e831bd3a9faa3512a711f031611e6b06c939", size = 514986, upload-time = "2026-02-02T12:37:16.326Z" }, + { url = "https://files.pythonhosted.org/packages/f6/6c/8c83b45eb3eb1c1e18d841fe30b4b5bc5619d781267ca9bc03e005d8fd0a/jiter-0.13.0-cp314-cp314t-musllinux_1_1_x86_64.whl", hash = "sha256:6c26a424569a59140fb51160a56df13f438a2b0967365e987889186d5fc2f6f9", size = 548756, upload-time = "2026-02-02T12:37:17.736Z" }, + { url = "https://files.pythonhosted.org/packages/47/66/eea81dfff765ed66c68fd2ed8c96245109e13c896c2a5015c7839c92367e/jiter-0.13.0-cp314-cp314t-win32.whl", hash = "sha256:24dc96eca9f84da4131cdf87a95e6ce36765c3b156fc9ae33280873b1c32d5f6", size = 201196, upload-time = "2026-02-02T12:37:19.101Z" }, + { url = "https://files.pythonhosted.org/packages/ff/32/4ac9c7a76402f8f00d00842a7f6b83b284d0cf7c1e9d4227bc95aa6d17fa/jiter-0.13.0-cp314-cp314t-win_amd64.whl", hash = "sha256:0a8d76c7524087272c8ae913f5d9d608bd839154b62c4322ef65723d2e5bb0b8", size = 204215, upload-time = "2026-02-02T12:37:20.495Z" }, + { url = "https://files.pythonhosted.org/packages/f9/8e/7def204fea9f9be8b3c21a6f2dd6c020cf56c7d5ff753e0e23ed7f9ea57e/jiter-0.13.0-cp314-cp314t-win_arm64.whl", hash = "sha256:2c26cf47e2cad140fa23b6d58d435a7c0161f5c514284802f25e87fddfe11024", size = 187152, upload-time = "2026-02-02T12:37:22.124Z" }, + { url = "https://files.pythonhosted.org/packages/79/b3/3c29819a27178d0e461a8571fb63c6ae38be6dc36b78b3ec2876bbd6a910/jiter-0.13.0-graalpy311-graalpy242_311_native-macosx_10_12_x86_64.whl", hash = "sha256:b1cbfa133241d0e6bdab48dcdc2604e8ba81512f6bbd68ec3e8e1357dd3c316c", size = 307016, upload-time = "2026-02-02T12:37:42.755Z" }, + { url = "https://files.pythonhosted.org/packages/eb/ae/60993e4b07b1ac5ebe46da7aa99fdbb802eb986c38d26e3883ac0125c4e0/jiter-0.13.0-graalpy311-graalpy242_311_native-macosx_11_0_arm64.whl", hash = "sha256:db367d8be9fad6e8ebbac4a7578b7af562e506211036cba2c06c3b998603c3d2", size = 305024, upload-time = "2026-02-02T12:37:44.774Z" }, + { url = "https://files.pythonhosted.org/packages/77/fa/2227e590e9cf98803db2811f172b2d6460a21539ab73006f251c66f44b14/jiter-0.13.0-graalpy311-graalpy242_311_native-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:45f6f8efb2f3b0603092401dc2df79fa89ccbc027aaba4174d2d4133ed661434", size = 339337, upload-time = "2026-02-02T12:37:46.668Z" }, + { url = "https://files.pythonhosted.org/packages/2d/92/015173281f7eb96c0ef580c997da8ef50870d4f7f4c9e03c845a1d62ae04/jiter-0.13.0-graalpy311-graalpy242_311_native-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:597245258e6ad085d064780abfb23a284d418d3e61c57362d9449c6c7317ee2d", size = 346395, upload-time = "2026-02-02T12:37:48.09Z" }, + { url = "https://files.pythonhosted.org/packages/80/60/e50fa45dd7e2eae049f0ce964663849e897300433921198aef94b6ffa23a/jiter-0.13.0-graalpy312-graalpy250_312_native-macosx_10_12_x86_64.whl", hash = "sha256:3d744a6061afba08dd7ae375dcde870cffb14429b7477e10f67e9e6d68772a0a", size = 305169, upload-time = "2026-02-02T12:37:50.376Z" }, + { url = "https://files.pythonhosted.org/packages/d2/73/a009f41c5eed71c49bec53036c4b33555afcdee70682a18c6f66e396c039/jiter-0.13.0-graalpy312-graalpy250_312_native-macosx_11_0_arm64.whl", hash = "sha256:ff732bd0a0e778f43d5009840f20b935e79087b4dc65bd36f1cd0f9b04b8ff7f", size = 303808, upload-time = "2026-02-02T12:37:52.092Z" }, + { url = "https://files.pythonhosted.org/packages/c4/10/528b439290763bff3d939268085d03382471b442f212dca4ff5f12802d43/jiter-0.13.0-graalpy312-graalpy250_312_native-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ab44b178f7981fcaea7e0a5df20e773c663d06ffda0198f1a524e91b2fde7e59", size = 337384, upload-time = "2026-02-02T12:37:53.582Z" }, + { url = "https://files.pythonhosted.org/packages/67/8a/a342b2f0251f3dac4ca17618265d93bf244a2a4d089126e81e4c1056ac50/jiter-0.13.0-graalpy312-graalpy250_312_native-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:7bb00b6d26db67a05fe3e12c76edc75f32077fb51deed13822dc648fa373bc19", size = 343768, upload-time = "2026-02-02T12:37:55.055Z" }, +] + +[[package]] +name = "jsonref" +version = "1.1.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/aa/0d/c1f3277e90ccdb50d33ed5ba1ec5b3f0a242ed8c1b1a85d3afeb68464dca/jsonref-1.1.0.tar.gz", hash = "sha256:32fe8e1d85af0fdefbebce950af85590b22b60f9e95443176adbde4e1ecea552", size = 8814, upload-time = "2023-01-16T16:10:04.455Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/0c/ec/e1db9922bceb168197a558a2b8c03a7963f1afe93517ddd3cf99f202f996/jsonref-1.1.0-py3-none-any.whl", hash = "sha256:590dc7773df6c21cbf948b5dac07a72a251db28b0238ceecce0a2abfa8ec30a9", size = 9425, upload-time = "2023-01-16T16:10:02.255Z" }, +] + +[[package]] +name = "jsonschema" +version = "4.26.0" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "attrs" }, + { name = "jsonschema-specifications" }, + { name = "referencing" }, + { name = "rpds-py" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/b3/fc/e067678238fa451312d4c62bf6e6cf5ec56375422aee02f9cb5f909b3047/jsonschema-4.26.0.tar.gz", hash = "sha256:0c26707e2efad8aa1bfc5b7ce170f3fccc2e4918ff85989ba9ffa9facb2be326", size = 366583, upload-time = "2026-01-07T13:41:07.246Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/69/90/f63fb5873511e014207a475e2bb4e8b2e570d655b00ac19a9a0ca0a385ee/jsonschema-4.26.0-py3-none-any.whl", hash = "sha256:d489f15263b8d200f8387e64b4c3a75f06629559fb73deb8fdfb525f2dab50ce", size = 90630, upload-time = "2026-01-07T13:41:05.306Z" }, +] + +[[package]] +name = "jsonschema-path" +version = "0.4.5" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "pathable" }, + { name = "pyyaml" }, + { name = "referencing" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/5b/8a/7e6102f2b8bdc6705a9eb5294f8f6f9ccd3a8420e8e8e19671d1dd773251/jsonschema_path-0.4.5.tar.gz", hash = "sha256:c6cd7d577ae290c7defd4f4029e86fdb248ca1bd41a07557795b3c95e5144918", size = 15113, upload-time = "2026-03-03T09:56:46.87Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/04/d5/4e96c44f6c1ea3d812cf5391d81a4f5abaa540abf8d04ecd7f66e0ed11df/jsonschema_path-0.4.5-py3-none-any.whl", hash = "sha256:7d77a2c3f3ec569a40efe5c5f942c44c1af2a6f96fe0866794c9ef5b8f87fd65", size = 19368, upload-time = "2026-03-03T09:56:45.39Z" }, +] + +[[package]] +name = "jsonschema-specifications" +version = "2025.9.1" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "referencing" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/19/74/a633ee74eb36c44aa6d1095e7cc5569bebf04342ee146178e2d36600708b/jsonschema_specifications-2025.9.1.tar.gz", hash = "sha256:b540987f239e745613c7a9176f3edb72b832a4ac465cf02712288397832b5e8d", size = 32855, upload-time = "2025-09-08T01:34:59.186Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/41/45/1a4ed80516f02155c51f51e8cedb3c1902296743db0bbc66608a0db2814f/jsonschema_specifications-2025.9.1-py3-none-any.whl", hash = "sha256:98802fee3a11ee76ecaca44429fda8a41bff98b00a0f2838151b113f210cc6fe", size = 18437, upload-time = "2025-09-08T01:34:57.871Z" }, +] + +[[package]] +name = "keyring" +version = "25.7.0" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "importlib-metadata", marker = "python_full_version < '3.12'" }, + { name = "jaraco-classes" }, + { name = "jaraco-context" }, + { name = "jaraco-functools" }, + { name = "jeepney", marker = "sys_platform == 'linux'" }, + { name = "pywin32-ctypes", marker = "sys_platform == 'win32'" }, + { name = "secretstorage", marker = "sys_platform == 'linux'" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/43/4b/674af6ef2f97d56f0ab5153bf0bfa28ccb6c3ed4d1babf4305449668807b/keyring-25.7.0.tar.gz", hash = "sha256:fe01bd85eb3f8fb3dd0405defdeac9a5b4f6f0439edbb3149577f244a2e8245b", size = 63516, upload-time = "2025-11-16T16:26:09.482Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/81/db/e655086b7f3a705df045bf0933bdd9c2f79bb3c97bfef1384598bb79a217/keyring-25.7.0-py3-none-any.whl", hash = "sha256:be4a0b195f149690c166e850609a477c532ddbfbaed96a404d4e43f8d5e2689f", size = 39160, upload-time = "2025-11-16T16:26:08.402Z" }, +] + +[[package]] +name = "markdown-it-py" +version = "4.0.0" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "mdurl" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/5b/f5/4ec618ed16cc4f8fb3b701563655a69816155e79e24a17b651541804721d/markdown_it_py-4.0.0.tar.gz", hash = "sha256:cb0a2b4aa34f932c007117b194e945bd74e0ec24133ceb5bac59009cda1cb9f3", size = 73070, upload-time = "2025-08-11T12:57:52.854Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/94/54/e7d793b573f298e1c9013b8c4dade17d481164aa517d1d7148619c2cedbf/markdown_it_py-4.0.0-py3-none-any.whl", hash = "sha256:87327c59b172c5011896038353a81343b6754500a08cd7a4973bb48c6d578147", size = 87321, upload-time = "2025-08-11T12:57:51.923Z" }, +] + +[[package]] +name = "markupsafe" +version = "3.0.3" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/7e/99/7690b6d4034fffd95959cbe0c02de8deb3098cc577c67bb6a24fe5d7caa7/markupsafe-3.0.3.tar.gz", hash = "sha256:722695808f4b6457b320fdc131280796bdceb04ab50fe1795cd540799ebe1698", size = 80313, upload-time = "2025-09-27T18:37:40.426Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/08/db/fefacb2136439fc8dd20e797950e749aa1f4997ed584c62cfb8ef7c2be0e/markupsafe-3.0.3-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:1cc7ea17a6824959616c525620e387f6dd30fec8cb44f649e31712db02123dad", size = 11631, upload-time = "2025-09-27T18:36:18.185Z" }, + { url = "https://files.pythonhosted.org/packages/e1/2e/5898933336b61975ce9dc04decbc0a7f2fee78c30353c5efba7f2d6ff27a/markupsafe-3.0.3-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:4bd4cd07944443f5a265608cc6aab442e4f74dff8088b0dfc8238647b8f6ae9a", size = 12058, upload-time = "2025-09-27T18:36:19.444Z" }, + { url = "https://files.pythonhosted.org/packages/1d/09/adf2df3699d87d1d8184038df46a9c80d78c0148492323f4693df54e17bb/markupsafe-3.0.3-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:6b5420a1d9450023228968e7e6a9ce57f65d148ab56d2313fcd589eee96a7a50", size = 24287, upload-time = "2025-09-27T18:36:20.768Z" }, + { url = "https://files.pythonhosted.org/packages/30/ac/0273f6fcb5f42e314c6d8cd99effae6a5354604d461b8d392b5ec9530a54/markupsafe-3.0.3-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:0bf2a864d67e76e5c9a34dc26ec616a66b9888e25e7b9460e1c76d3293bd9dbf", size = 22940, upload-time = "2025-09-27T18:36:22.249Z" }, + { url = "https://files.pythonhosted.org/packages/19/ae/31c1be199ef767124c042c6c3e904da327a2f7f0cd63a0337e1eca2967a8/markupsafe-3.0.3-cp311-cp311-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:bc51efed119bc9cfdf792cdeaa4d67e8f6fcccab66ed4bfdd6bde3e59bfcbb2f", size = 21887, upload-time = "2025-09-27T18:36:23.535Z" }, + { url = "https://files.pythonhosted.org/packages/b2/76/7edcab99d5349a4532a459e1fe64f0b0467a3365056ae550d3bcf3f79e1e/markupsafe-3.0.3-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:068f375c472b3e7acbe2d5318dea141359e6900156b5b2ba06a30b169086b91a", size = 23692, upload-time = "2025-09-27T18:36:24.823Z" }, + { url = "https://files.pythonhosted.org/packages/a4/28/6e74cdd26d7514849143d69f0bf2399f929c37dc2b31e6829fd2045b2765/markupsafe-3.0.3-cp311-cp311-musllinux_1_2_riscv64.whl", hash = "sha256:7be7b61bb172e1ed687f1754f8e7484f1c8019780f6f6b0786e76bb01c2ae115", size = 21471, upload-time = "2025-09-27T18:36:25.95Z" }, + { url = "https://files.pythonhosted.org/packages/62/7e/a145f36a5c2945673e590850a6f8014318d5577ed7e5920a4b3448e0865d/markupsafe-3.0.3-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:f9e130248f4462aaa8e2552d547f36ddadbeaa573879158d721bbd33dfe4743a", size = 22923, upload-time = "2025-09-27T18:36:27.109Z" }, + { url = "https://files.pythonhosted.org/packages/0f/62/d9c46a7f5c9adbeeeda52f5b8d802e1094e9717705a645efc71b0913a0a8/markupsafe-3.0.3-cp311-cp311-win32.whl", hash = "sha256:0db14f5dafddbb6d9208827849fad01f1a2609380add406671a26386cdf15a19", size = 14572, upload-time = "2025-09-27T18:36:28.045Z" }, + { url = "https://files.pythonhosted.org/packages/83/8a/4414c03d3f891739326e1783338e48fb49781cc915b2e0ee052aa490d586/markupsafe-3.0.3-cp311-cp311-win_amd64.whl", hash = "sha256:de8a88e63464af587c950061a5e6a67d3632e36df62b986892331d4620a35c01", size = 15077, upload-time = "2025-09-27T18:36:29.025Z" }, + { url = "https://files.pythonhosted.org/packages/35/73/893072b42e6862f319b5207adc9ae06070f095b358655f077f69a35601f0/markupsafe-3.0.3-cp311-cp311-win_arm64.whl", hash = "sha256:3b562dd9e9ea93f13d53989d23a7e775fdfd1066c33494ff43f5418bc8c58a5c", size = 13876, upload-time = "2025-09-27T18:36:29.954Z" }, + { url = "https://files.pythonhosted.org/packages/5a/72/147da192e38635ada20e0a2e1a51cf8823d2119ce8883f7053879c2199b5/markupsafe-3.0.3-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:d53197da72cc091b024dd97249dfc7794d6a56530370992a5e1a08983ad9230e", size = 11615, upload-time = "2025-09-27T18:36:30.854Z" }, + { url = "https://files.pythonhosted.org/packages/9a/81/7e4e08678a1f98521201c3079f77db69fb552acd56067661f8c2f534a718/markupsafe-3.0.3-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:1872df69a4de6aead3491198eaf13810b565bdbeec3ae2dc8780f14458ec73ce", size = 12020, upload-time = "2025-09-27T18:36:31.971Z" }, + { url = "https://files.pythonhosted.org/packages/1e/2c/799f4742efc39633a1b54a92eec4082e4f815314869865d876824c257c1e/markupsafe-3.0.3-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:3a7e8ae81ae39e62a41ec302f972ba6ae23a5c5396c8e60113e9066ef893da0d", size = 24332, upload-time = "2025-09-27T18:36:32.813Z" }, + { url = "https://files.pythonhosted.org/packages/3c/2e/8d0c2ab90a8c1d9a24f0399058ab8519a3279d1bd4289511d74e909f060e/markupsafe-3.0.3-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:d6dd0be5b5b189d31db7cda48b91d7e0a9795f31430b7f271219ab30f1d3ac9d", size = 22947, upload-time = "2025-09-27T18:36:33.86Z" }, + { url = "https://files.pythonhosted.org/packages/2c/54/887f3092a85238093a0b2154bd629c89444f395618842e8b0c41783898ea/markupsafe-3.0.3-cp312-cp312-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:94c6f0bb423f739146aec64595853541634bde58b2135f27f61c1ffd1cd4d16a", size = 21962, upload-time = "2025-09-27T18:36:35.099Z" }, + { url = "https://files.pythonhosted.org/packages/c9/2f/336b8c7b6f4a4d95e91119dc8521402461b74a485558d8f238a68312f11c/markupsafe-3.0.3-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:be8813b57049a7dc738189df53d69395eba14fb99345e0a5994914a3864c8a4b", size = 23760, upload-time = "2025-09-27T18:36:36.001Z" }, + { url = "https://files.pythonhosted.org/packages/32/43/67935f2b7e4982ffb50a4d169b724d74b62a3964bc1a9a527f5ac4f1ee2b/markupsafe-3.0.3-cp312-cp312-musllinux_1_2_riscv64.whl", hash = "sha256:83891d0e9fb81a825d9a6d61e3f07550ca70a076484292a70fde82c4b807286f", size = 21529, upload-time = "2025-09-27T18:36:36.906Z" }, + { url = "https://files.pythonhosted.org/packages/89/e0/4486f11e51bbba8b0c041098859e869e304d1c261e59244baa3d295d47b7/markupsafe-3.0.3-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:77f0643abe7495da77fb436f50f8dab76dbc6e5fd25d39589a0f1fe6548bfa2b", size = 23015, upload-time = "2025-09-27T18:36:37.868Z" }, + { url = "https://files.pythonhosted.org/packages/2f/e1/78ee7a023dac597a5825441ebd17170785a9dab23de95d2c7508ade94e0e/markupsafe-3.0.3-cp312-cp312-win32.whl", hash = "sha256:d88b440e37a16e651bda4c7c2b930eb586fd15ca7406cb39e211fcff3bf3017d", size = 14540, upload-time = "2025-09-27T18:36:38.761Z" }, + { url = "https://files.pythonhosted.org/packages/aa/5b/bec5aa9bbbb2c946ca2733ef9c4ca91c91b6a24580193e891b5f7dbe8e1e/markupsafe-3.0.3-cp312-cp312-win_amd64.whl", hash = "sha256:26a5784ded40c9e318cfc2bdb30fe164bdb8665ded9cd64d500a34fb42067b1c", size = 15105, upload-time = "2025-09-27T18:36:39.701Z" }, + { url = "https://files.pythonhosted.org/packages/e5/f1/216fc1bbfd74011693a4fd837e7026152e89c4bcf3e77b6692fba9923123/markupsafe-3.0.3-cp312-cp312-win_arm64.whl", hash = "sha256:35add3b638a5d900e807944a078b51922212fb3dedb01633a8defc4b01a3c85f", size = 13906, upload-time = "2025-09-27T18:36:40.689Z" }, + { url = "https://files.pythonhosted.org/packages/38/2f/907b9c7bbba283e68f20259574b13d005c121a0fa4c175f9bed27c4597ff/markupsafe-3.0.3-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:e1cf1972137e83c5d4c136c43ced9ac51d0e124706ee1c8aa8532c1287fa8795", size = 11622, upload-time = "2025-09-27T18:36:41.777Z" }, + { url = "https://files.pythonhosted.org/packages/9c/d9/5f7756922cdd676869eca1c4e3c0cd0df60ed30199ffd775e319089cb3ed/markupsafe-3.0.3-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:116bb52f642a37c115f517494ea5feb03889e04df47eeff5b130b1808ce7c219", size = 12029, upload-time = "2025-09-27T18:36:43.257Z" }, + { url = "https://files.pythonhosted.org/packages/00/07/575a68c754943058c78f30db02ee03a64b3c638586fba6a6dd56830b30a3/markupsafe-3.0.3-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:133a43e73a802c5562be9bbcd03d090aa5a1fe899db609c29e8c8d815c5f6de6", size = 24374, upload-time = "2025-09-27T18:36:44.508Z" }, + { url = "https://files.pythonhosted.org/packages/a9/21/9b05698b46f218fc0e118e1f8168395c65c8a2c750ae2bab54fc4bd4e0e8/markupsafe-3.0.3-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:ccfcd093f13f0f0b7fdd0f198b90053bf7b2f02a3927a30e63f3ccc9df56b676", size = 22980, upload-time = "2025-09-27T18:36:45.385Z" }, + { url = "https://files.pythonhosted.org/packages/7f/71/544260864f893f18b6827315b988c146b559391e6e7e8f7252839b1b846a/markupsafe-3.0.3-cp313-cp313-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:509fa21c6deb7a7a273d629cf5ec029bc209d1a51178615ddf718f5918992ab9", size = 21990, upload-time = "2025-09-27T18:36:46.916Z" }, + { url = "https://files.pythonhosted.org/packages/c2/28/b50fc2f74d1ad761af2f5dcce7492648b983d00a65b8c0e0cb457c82ebbe/markupsafe-3.0.3-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:a4afe79fb3de0b7097d81da19090f4df4f8d3a2b3adaa8764138aac2e44f3af1", size = 23784, upload-time = "2025-09-27T18:36:47.884Z" }, + { url = "https://files.pythonhosted.org/packages/ed/76/104b2aa106a208da8b17a2fb72e033a5a9d7073c68f7e508b94916ed47a9/markupsafe-3.0.3-cp313-cp313-musllinux_1_2_riscv64.whl", hash = "sha256:795e7751525cae078558e679d646ae45574b47ed6e7771863fcc079a6171a0fc", size = 21588, upload-time = "2025-09-27T18:36:48.82Z" }, + { url = "https://files.pythonhosted.org/packages/b5/99/16a5eb2d140087ebd97180d95249b00a03aa87e29cc224056274f2e45fd6/markupsafe-3.0.3-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:8485f406a96febb5140bfeca44a73e3ce5116b2501ac54fe953e488fb1d03b12", size = 23041, upload-time = "2025-09-27T18:36:49.797Z" }, + { url = "https://files.pythonhosted.org/packages/19/bc/e7140ed90c5d61d77cea142eed9f9c303f4c4806f60a1044c13e3f1471d0/markupsafe-3.0.3-cp313-cp313-win32.whl", hash = "sha256:bdd37121970bfd8be76c5fb069c7751683bdf373db1ed6c010162b2a130248ed", size = 14543, upload-time = "2025-09-27T18:36:51.584Z" }, + { url = "https://files.pythonhosted.org/packages/05/73/c4abe620b841b6b791f2edc248f556900667a5a1cf023a6646967ae98335/markupsafe-3.0.3-cp313-cp313-win_amd64.whl", hash = "sha256:9a1abfdc021a164803f4d485104931fb8f8c1efd55bc6b748d2f5774e78b62c5", size = 15113, upload-time = "2025-09-27T18:36:52.537Z" }, + { url = "https://files.pythonhosted.org/packages/f0/3a/fa34a0f7cfef23cf9500d68cb7c32dd64ffd58a12b09225fb03dd37d5b80/markupsafe-3.0.3-cp313-cp313-win_arm64.whl", hash = "sha256:7e68f88e5b8799aa49c85cd116c932a1ac15caaa3f5db09087854d218359e485", size = 13911, upload-time = "2025-09-27T18:36:53.513Z" }, + { url = "https://files.pythonhosted.org/packages/e4/d7/e05cd7efe43a88a17a37b3ae96e79a19e846f3f456fe79c57ca61356ef01/markupsafe-3.0.3-cp313-cp313t-macosx_10_13_x86_64.whl", hash = "sha256:218551f6df4868a8d527e3062d0fb968682fe92054e89978594c28e642c43a73", size = 11658, upload-time = "2025-09-27T18:36:54.819Z" }, + { url = "https://files.pythonhosted.org/packages/99/9e/e412117548182ce2148bdeacdda3bb494260c0b0184360fe0d56389b523b/markupsafe-3.0.3-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:3524b778fe5cfb3452a09d31e7b5adefeea8c5be1d43c4f810ba09f2ceb29d37", size = 12066, upload-time = "2025-09-27T18:36:55.714Z" }, + { url = "https://files.pythonhosted.org/packages/bc/e6/fa0ffcda717ef64a5108eaa7b4f5ed28d56122c9a6d70ab8b72f9f715c80/markupsafe-3.0.3-cp313-cp313t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:4e885a3d1efa2eadc93c894a21770e4bc67899e3543680313b09f139e149ab19", size = 25639, upload-time = "2025-09-27T18:36:56.908Z" }, + { url = "https://files.pythonhosted.org/packages/96/ec/2102e881fe9d25fc16cb4b25d5f5cde50970967ffa5dddafdb771237062d/markupsafe-3.0.3-cp313-cp313t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:8709b08f4a89aa7586de0aadc8da56180242ee0ada3999749b183aa23df95025", size = 23569, upload-time = "2025-09-27T18:36:57.913Z" }, + { url = "https://files.pythonhosted.org/packages/4b/30/6f2fce1f1f205fc9323255b216ca8a235b15860c34b6798f810f05828e32/markupsafe-3.0.3-cp313-cp313t-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:b8512a91625c9b3da6f127803b166b629725e68af71f8184ae7e7d54686a56d6", size = 23284, upload-time = "2025-09-27T18:36:58.833Z" }, + { url = "https://files.pythonhosted.org/packages/58/47/4a0ccea4ab9f5dcb6f79c0236d954acb382202721e704223a8aafa38b5c8/markupsafe-3.0.3-cp313-cp313t-musllinux_1_2_aarch64.whl", hash = "sha256:9b79b7a16f7fedff2495d684f2b59b0457c3b493778c9eed31111be64d58279f", size = 24801, upload-time = "2025-09-27T18:36:59.739Z" }, + { url = "https://files.pythonhosted.org/packages/6a/70/3780e9b72180b6fecb83a4814d84c3bf4b4ae4bf0b19c27196104149734c/markupsafe-3.0.3-cp313-cp313t-musllinux_1_2_riscv64.whl", hash = "sha256:12c63dfb4a98206f045aa9563db46507995f7ef6d83b2f68eda65c307c6829eb", size = 22769, upload-time = "2025-09-27T18:37:00.719Z" }, + { url = "https://files.pythonhosted.org/packages/98/c5/c03c7f4125180fc215220c035beac6b9cb684bc7a067c84fc69414d315f5/markupsafe-3.0.3-cp313-cp313t-musllinux_1_2_x86_64.whl", hash = "sha256:8f71bc33915be5186016f675cd83a1e08523649b0e33efdb898db577ef5bb009", size = 23642, upload-time = "2025-09-27T18:37:01.673Z" }, + { url = "https://files.pythonhosted.org/packages/80/d6/2d1b89f6ca4bff1036499b1e29a1d02d282259f3681540e16563f27ebc23/markupsafe-3.0.3-cp313-cp313t-win32.whl", hash = "sha256:69c0b73548bc525c8cb9a251cddf1931d1db4d2258e9599c28c07ef3580ef354", size = 14612, upload-time = "2025-09-27T18:37:02.639Z" }, + { url = "https://files.pythonhosted.org/packages/2b/98/e48a4bfba0a0ffcf9925fe2d69240bfaa19c6f7507b8cd09c70684a53c1e/markupsafe-3.0.3-cp313-cp313t-win_amd64.whl", hash = "sha256:1b4b79e8ebf6b55351f0d91fe80f893b4743f104bff22e90697db1590e47a218", size = 15200, upload-time = "2025-09-27T18:37:03.582Z" }, + { url = "https://files.pythonhosted.org/packages/0e/72/e3cc540f351f316e9ed0f092757459afbc595824ca724cbc5a5d4263713f/markupsafe-3.0.3-cp313-cp313t-win_arm64.whl", hash = "sha256:ad2cf8aa28b8c020ab2fc8287b0f823d0a7d8630784c31e9ee5edea20f406287", size = 13973, upload-time = "2025-09-27T18:37:04.929Z" }, + { url = "https://files.pythonhosted.org/packages/33/8a/8e42d4838cd89b7dde187011e97fe6c3af66d8c044997d2183fbd6d31352/markupsafe-3.0.3-cp314-cp314-macosx_10_13_x86_64.whl", hash = "sha256:eaa9599de571d72e2daf60164784109f19978b327a3910d3e9de8c97b5b70cfe", size = 11619, upload-time = "2025-09-27T18:37:06.342Z" }, + { url = "https://files.pythonhosted.org/packages/b5/64/7660f8a4a8e53c924d0fa05dc3a55c9cee10bbd82b11c5afb27d44b096ce/markupsafe-3.0.3-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:c47a551199eb8eb2121d4f0f15ae0f923d31350ab9280078d1e5f12b249e0026", size = 12029, upload-time = "2025-09-27T18:37:07.213Z" }, + { url = "https://files.pythonhosted.org/packages/da/ef/e648bfd021127bef5fa12e1720ffed0c6cbb8310c8d9bea7266337ff06de/markupsafe-3.0.3-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:f34c41761022dd093b4b6896d4810782ffbabe30f2d443ff5f083e0cbbb8c737", size = 24408, upload-time = "2025-09-27T18:37:09.572Z" }, + { url = "https://files.pythonhosted.org/packages/41/3c/a36c2450754618e62008bf7435ccb0f88053e07592e6028a34776213d877/markupsafe-3.0.3-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:457a69a9577064c05a97c41f4e65148652db078a3a509039e64d3467b9e7ef97", size = 23005, upload-time = "2025-09-27T18:37:10.58Z" }, + { url = "https://files.pythonhosted.org/packages/bc/20/b7fdf89a8456b099837cd1dc21974632a02a999ec9bf7ca3e490aacd98e7/markupsafe-3.0.3-cp314-cp314-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:e8afc3f2ccfa24215f8cb28dcf43f0113ac3c37c2f0f0806d8c70e4228c5cf4d", size = 22048, upload-time = "2025-09-27T18:37:11.547Z" }, + { url = "https://files.pythonhosted.org/packages/9a/a7/591f592afdc734f47db08a75793a55d7fbcc6902a723ae4cfbab61010cc5/markupsafe-3.0.3-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:ec15a59cf5af7be74194f7ab02d0f59a62bdcf1a537677ce67a2537c9b87fcda", size = 23821, upload-time = "2025-09-27T18:37:12.48Z" }, + { url = "https://files.pythonhosted.org/packages/7d/33/45b24e4f44195b26521bc6f1a82197118f74df348556594bd2262bda1038/markupsafe-3.0.3-cp314-cp314-musllinux_1_2_riscv64.whl", hash = "sha256:0eb9ff8191e8498cca014656ae6b8d61f39da5f95b488805da4bb029cccbfbaf", size = 21606, upload-time = "2025-09-27T18:37:13.485Z" }, + { url = "https://files.pythonhosted.org/packages/ff/0e/53dfaca23a69fbfbbf17a4b64072090e70717344c52eaaaa9c5ddff1e5f0/markupsafe-3.0.3-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:2713baf880df847f2bece4230d4d094280f4e67b1e813eec43b4c0e144a34ffe", size = 23043, upload-time = "2025-09-27T18:37:14.408Z" }, + { url = "https://files.pythonhosted.org/packages/46/11/f333a06fc16236d5238bfe74daccbca41459dcd8d1fa952e8fbd5dccfb70/markupsafe-3.0.3-cp314-cp314-win32.whl", hash = "sha256:729586769a26dbceff69f7a7dbbf59ab6572b99d94576a5592625d5b411576b9", size = 14747, upload-time = "2025-09-27T18:37:15.36Z" }, + { url = "https://files.pythonhosted.org/packages/28/52/182836104b33b444e400b14f797212f720cbc9ed6ba34c800639d154e821/markupsafe-3.0.3-cp314-cp314-win_amd64.whl", hash = "sha256:bdc919ead48f234740ad807933cdf545180bfbe9342c2bb451556db2ed958581", size = 15341, upload-time = "2025-09-27T18:37:16.496Z" }, + { url = "https://files.pythonhosted.org/packages/6f/18/acf23e91bd94fd7b3031558b1f013adfa21a8e407a3fdb32745538730382/markupsafe-3.0.3-cp314-cp314-win_arm64.whl", hash = "sha256:5a7d5dc5140555cf21a6fefbdbf8723f06fcd2f63ef108f2854de715e4422cb4", size = 14073, upload-time = "2025-09-27T18:37:17.476Z" }, + { url = "https://files.pythonhosted.org/packages/3c/f0/57689aa4076e1b43b15fdfa646b04653969d50cf30c32a102762be2485da/markupsafe-3.0.3-cp314-cp314t-macosx_10_13_x86_64.whl", hash = "sha256:1353ef0c1b138e1907ae78e2f6c63ff67501122006b0f9abad68fda5f4ffc6ab", size = 11661, upload-time = "2025-09-27T18:37:18.453Z" }, + { url = "https://files.pythonhosted.org/packages/89/c3/2e67a7ca217c6912985ec766c6393b636fb0c2344443ff9d91404dc4c79f/markupsafe-3.0.3-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:1085e7fbddd3be5f89cc898938f42c0b3c711fdcb37d75221de2666af647c175", size = 12069, upload-time = "2025-09-27T18:37:19.332Z" }, + { url = "https://files.pythonhosted.org/packages/f0/00/be561dce4e6ca66b15276e184ce4b8aec61fe83662cce2f7d72bd3249d28/markupsafe-3.0.3-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:1b52b4fb9df4eb9ae465f8d0c228a00624de2334f216f178a995ccdcf82c4634", size = 25670, upload-time = "2025-09-27T18:37:20.245Z" }, + { url = "https://files.pythonhosted.org/packages/50/09/c419f6f5a92e5fadde27efd190eca90f05e1261b10dbd8cbcb39cd8ea1dc/markupsafe-3.0.3-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:fed51ac40f757d41b7c48425901843666a6677e3e8eb0abcff09e4ba6e664f50", size = 23598, upload-time = "2025-09-27T18:37:21.177Z" }, + { url = "https://files.pythonhosted.org/packages/22/44/a0681611106e0b2921b3033fc19bc53323e0b50bc70cffdd19f7d679bb66/markupsafe-3.0.3-cp314-cp314t-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:f190daf01f13c72eac4efd5c430a8de82489d9cff23c364c3ea822545032993e", size = 23261, upload-time = "2025-09-27T18:37:22.167Z" }, + { url = "https://files.pythonhosted.org/packages/5f/57/1b0b3f100259dc9fffe780cfb60d4be71375510e435efec3d116b6436d43/markupsafe-3.0.3-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:e56b7d45a839a697b5eb268c82a71bd8c7f6c94d6fd50c3d577fa39a9f1409f5", size = 24835, upload-time = "2025-09-27T18:37:23.296Z" }, + { url = "https://files.pythonhosted.org/packages/26/6a/4bf6d0c97c4920f1597cc14dd720705eca0bf7c787aebc6bb4d1bead5388/markupsafe-3.0.3-cp314-cp314t-musllinux_1_2_riscv64.whl", hash = "sha256:f3e98bb3798ead92273dc0e5fd0f31ade220f59a266ffd8a4f6065e0a3ce0523", size = 22733, upload-time = "2025-09-27T18:37:24.237Z" }, + { url = "https://files.pythonhosted.org/packages/14/c7/ca723101509b518797fedc2fdf79ba57f886b4aca8a7d31857ba3ee8281f/markupsafe-3.0.3-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:5678211cb9333a6468fb8d8be0305520aa073f50d17f089b5b4b477ea6e67fdc", size = 23672, upload-time = "2025-09-27T18:37:25.271Z" }, + { url = "https://files.pythonhosted.org/packages/fb/df/5bd7a48c256faecd1d36edc13133e51397e41b73bb77e1a69deab746ebac/markupsafe-3.0.3-cp314-cp314t-win32.whl", hash = "sha256:915c04ba3851909ce68ccc2b8e2cd691618c4dc4c4232fb7982bca3f41fd8c3d", size = 14819, upload-time = "2025-09-27T18:37:26.285Z" }, + { url = "https://files.pythonhosted.org/packages/1a/8a/0402ba61a2f16038b48b39bccca271134be00c5c9f0f623208399333c448/markupsafe-3.0.3-cp314-cp314t-win_amd64.whl", hash = "sha256:4faffd047e07c38848ce017e8725090413cd80cbc23d86e55c587bf979e579c9", size = 15426, upload-time = "2025-09-27T18:37:27.316Z" }, + { url = "https://files.pythonhosted.org/packages/70/bc/6f1c2f612465f5fa89b95bead1f44dcb607670fd42891d8fdcd5d039f4f4/markupsafe-3.0.3-cp314-cp314t-win_arm64.whl", hash = "sha256:32001d6a8fc98c8cb5c947787c5d08b0a50663d139f1305bac5885d98d9b40fa", size = 14146, upload-time = "2025-09-27T18:37:28.327Z" }, +] + +[[package]] +name = "mcp" +version = "1.26.0" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "anyio" }, + { name = "httpx" }, + { name = "httpx-sse" }, + { name = "jsonschema" }, + { name = "pydantic" }, + { name = "pydantic-settings" }, + { name = "pyjwt", extra = ["crypto"] }, + { name = "python-multipart" }, + { name = "pywin32", marker = "sys_platform == 'win32'" }, + { name = "sse-starlette" }, + { name = "starlette" }, + { name = "typing-extensions" }, + { name = "typing-inspection" }, + { name = "uvicorn", marker = "sys_platform != 'emscripten'" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/fc/6d/62e76bbb8144d6ed86e202b5edd8a4cb631e7c8130f3f4893c3f90262b10/mcp-1.26.0.tar.gz", hash = "sha256:db6e2ef491eecc1a0d93711a76f28dec2e05999f93afd48795da1c1137142c66", size = 608005, upload-time = "2026-01-24T19:40:32.468Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/fd/d9/eaa1f80170d2b7c5ba23f3b59f766f3a0bb41155fbc32a69adfa1adaaef9/mcp-1.26.0-py3-none-any.whl", hash = "sha256:904a21c33c25aa98ddbeb47273033c435e595bbacfdb177f4bd87f6dceebe1ca", size = 233615, upload-time = "2026-01-24T19:40:30.652Z" }, +] + +[[package]] +name = "mdurl" +version = "0.1.2" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/d6/54/cfe61301667036ec958cb99bd3efefba235e65cdeb9c84d24a8293ba1d90/mdurl-0.1.2.tar.gz", hash = "sha256:bb413d29f5eea38f31dd4754dd7377d4465116fb207585f97bf925588687c1ba", size = 8729, upload-time = "2022-08-14T12:40:10.846Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/b3/38/89ba8ad64ae25be8de66a6d463314cf1eb366222074cfda9ee839c56a4b4/mdurl-0.1.2-py3-none-any.whl", hash = "sha256:84008a41e51615a49fc9966191ff91509e3c40b939176e643fd50a5c2196b8f8", size = 9979, upload-time = "2022-08-14T12:40:09.779Z" }, +] + +[[package]] +name = "more-itertools" +version = "10.8.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/ea/5d/38b681d3fce7a266dd9ab73c66959406d565b3e85f21d5e66e1181d93721/more_itertools-10.8.0.tar.gz", hash = "sha256:f638ddf8a1a0d134181275fb5d58b086ead7c6a72429ad725c67503f13ba30bd", size = 137431, upload-time = "2025-09-02T15:23:11.018Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/a4/8e/469e5a4a2f5855992e425f3cb33804cc07bf18d48f2db061aec61ce50270/more_itertools-10.8.0-py3-none-any.whl", hash = "sha256:52d4362373dcf7c52546bc4af9a86ee7c4579df9a8dc268be0a2f949d376cc9b", size = 69667, upload-time = "2025-09-02T15:23:09.635Z" }, +] + +[[package]] +name = "numpy" +version = "2.4.4" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/d7/9f/b8cef5bffa569759033adda9481211426f12f53299629b410340795c2514/numpy-2.4.4.tar.gz", hash = "sha256:2d390634c5182175533585cc89f3608a4682ccb173cc9bb940b2881c8d6f8fa0", size = 20731587, upload-time = "2026-03-29T13:22:01.298Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/ef/c6/4218570d8c8ecc9704b5157a3348e486e84ef4be0ed3e38218ab473c83d2/numpy-2.4.4-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:f983334aea213c99992053ede6168500e5f086ce74fbc4acc3f2b00f5762e9db", size = 16976799, upload-time = "2026-03-29T13:18:15.438Z" }, + { url = "https://files.pythonhosted.org/packages/dd/92/b4d922c4a5f5dab9ed44e6153908a5c665b71acf183a83b93b690996e39b/numpy-2.4.4-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:72944b19f2324114e9dc86a159787333b77874143efcf89a5167ef83cfee8af0", size = 14971552, upload-time = "2026-03-29T13:18:18.606Z" }, + { url = "https://files.pythonhosted.org/packages/8a/dc/df98c095978fa6ee7b9a9387d1d58cbb3d232d0e69ad169a4ce784bde4fd/numpy-2.4.4-cp311-cp311-macosx_14_0_arm64.whl", hash = "sha256:86b6f55f5a352b48d7fbfd2dbc3d5b780b2d79f4d3c121f33eb6efb22e9a2015", size = 5476566, upload-time = "2026-03-29T13:18:21.532Z" }, + { url = "https://files.pythonhosted.org/packages/28/34/b3fdcec6e725409223dd27356bdf5a3c2cc2282e428218ecc9cb7acc9763/numpy-2.4.4-cp311-cp311-macosx_14_0_x86_64.whl", hash = "sha256:ba1f4fc670ed79f876f70082eff4f9583c15fb9a4b89d6188412de4d18ae2f40", size = 6806482, upload-time = "2026-03-29T13:18:23.634Z" }, + { url = "https://files.pythonhosted.org/packages/68/62/63417c13aa35d57bee1337c67446761dc25ea6543130cf868eace6e8157b/numpy-2.4.4-cp311-cp311-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:8a87ec22c87be071b6bdbd27920b129b94f2fc964358ce38f3822635a3e2e03d", size = 15973376, upload-time = "2026-03-29T13:18:26.677Z" }, + { url = "https://files.pythonhosted.org/packages/cf/c5/9fcb7e0e69cef59cf10c746b84f7d58b08bc66a6b7d459783c5a4f6101a6/numpy-2.4.4-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:df3775294accfdd75f32c74ae39fcba920c9a378a2fc18a12b6820aa8c1fb502", size = 16925137, upload-time = "2026-03-29T13:18:30.14Z" }, + { url = "https://files.pythonhosted.org/packages/7e/43/80020edacb3f84b9efdd1591120a4296462c23fd8db0dde1666f6ef66f13/numpy-2.4.4-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:0d4e437e295f18ec29bc79daf55e8a47a9113df44d66f702f02a293d93a2d6dd", size = 17329414, upload-time = "2026-03-29T13:18:33.733Z" }, + { url = "https://files.pythonhosted.org/packages/fd/06/af0658593b18a5f73532d377188b964f239eb0894e664a6c12f484472f97/numpy-2.4.4-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:6aa3236c78803afbcb255045fbef97a9e25a1f6c9888357d205ddc42f4d6eba5", size = 18658397, upload-time = "2026-03-29T13:18:37.511Z" }, + { url = "https://files.pythonhosted.org/packages/e6/ce/13a09ed65f5d0ce5c7dd0669250374c6e379910f97af2c08c57b0608eee4/numpy-2.4.4-cp311-cp311-win32.whl", hash = "sha256:30caa73029a225b2d40d9fae193e008e24b2026b7ee1a867b7ee8d96ca1a448e", size = 6239499, upload-time = "2026-03-29T13:18:40.372Z" }, + { url = "https://files.pythonhosted.org/packages/bd/63/05d193dbb4b5eec1eca73822d80da98b511f8328ad4ae3ca4caf0f4db91d/numpy-2.4.4-cp311-cp311-win_amd64.whl", hash = "sha256:6bbe4eb67390b0a0265a2c25458f6b90a409d5d069f1041e6aff1e27e3d9a79e", size = 12614257, upload-time = "2026-03-29T13:18:42.95Z" }, + { url = "https://files.pythonhosted.org/packages/87/c5/8168052f080c26fa984c413305012be54741c9d0d74abd7fbeeccae3889f/numpy-2.4.4-cp311-cp311-win_arm64.whl", hash = "sha256:fcfe2045fd2e8f3cb0ce9d4ba6dba6333b8fa05bb8a4939c908cd43322d14c7e", size = 10486775, upload-time = "2026-03-29T13:18:45.835Z" }, + { url = "https://files.pythonhosted.org/packages/28/05/32396bec30fb2263770ee910142f49c1476d08e8ad41abf8403806b520ce/numpy-2.4.4-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:15716cfef24d3a9762e3acdf87e27f58dc823d1348f765bbea6bef8c639bfa1b", size = 16689272, upload-time = "2026-03-29T13:18:49.223Z" }, + { url = "https://files.pythonhosted.org/packages/c5/f3/a983d28637bfcd763a9c7aafdb6d5c0ebf3d487d1e1459ffdb57e2f01117/numpy-2.4.4-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:23cbfd4c17357c81021f21540da84ee282b9c8fba38a03b7b9d09ba6b951421e", size = 14699573, upload-time = "2026-03-29T13:18:52.629Z" }, + { url = "https://files.pythonhosted.org/packages/9b/fd/e5ecca1e78c05106d98028114f5c00d3eddb41207686b2b7de3e477b0e22/numpy-2.4.4-cp312-cp312-macosx_14_0_arm64.whl", hash = "sha256:8b3b60bb7cba2c8c81837661c488637eee696f59a877788a396d33150c35d842", size = 5204782, upload-time = "2026-03-29T13:18:55.579Z" }, + { url = "https://files.pythonhosted.org/packages/de/2f/702a4594413c1a8632092beae8aba00f1d67947389369b3777aed783fdca/numpy-2.4.4-cp312-cp312-macosx_14_0_x86_64.whl", hash = "sha256:e4a010c27ff6f210ff4c6ef34394cd61470d01014439b192ec22552ee867f2a8", size = 6552038, upload-time = "2026-03-29T13:18:57.769Z" }, + { url = "https://files.pythonhosted.org/packages/7f/37/eed308a8f56cba4d1fdf467a4fc67ef4ff4bf1c888f5fc980481890104b1/numpy-2.4.4-cp312-cp312-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:f9e75681b59ddaa5e659898085ae0eaea229d054f2ac0c7e563a62205a700121", size = 15670666, upload-time = "2026-03-29T13:19:00.341Z" }, + { url = "https://files.pythonhosted.org/packages/0a/0d/0e3ecece05b7a7e87ab9fb587855548da437a061326fff64a223b6dcb78a/numpy-2.4.4-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:81f4a14bee47aec54f883e0cad2d73986640c1590eb9bfaaba7ad17394481e6e", size = 16645480, upload-time = "2026-03-29T13:19:03.63Z" }, + { url = "https://files.pythonhosted.org/packages/34/49/f2312c154b82a286758ee2f1743336d50651f8b5195db18cdb63675ff649/numpy-2.4.4-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:62d6b0f03b694173f9fcb1fb317f7222fd0b0b103e784c6549f5e53a27718c44", size = 17020036, upload-time = "2026-03-29T13:19:07.428Z" }, + { url = "https://files.pythonhosted.org/packages/7b/e9/736d17bd77f1b0ec4f9901aaec129c00d59f5d84d5e79bba540ef12c2330/numpy-2.4.4-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:fbc356aae7adf9e6336d336b9c8111d390a05df88f1805573ebb0807bd06fd1d", size = 18368643, upload-time = "2026-03-29T13:19:10.775Z" }, + { url = "https://files.pythonhosted.org/packages/63/f6/d417977c5f519b17c8a5c3bc9e8304b0908b0e21136fe43bf628a1343914/numpy-2.4.4-cp312-cp312-win32.whl", hash = "sha256:0d35aea54ad1d420c812bfa0385c71cd7cc5bcf7c65fed95fc2cd02fe8c79827", size = 5961117, upload-time = "2026-03-29T13:19:13.464Z" }, + { url = "https://files.pythonhosted.org/packages/2d/5b/e1deebf88ff431b01b7406ca3583ab2bbb90972bbe1c568732e49c844f7e/numpy-2.4.4-cp312-cp312-win_amd64.whl", hash = "sha256:b5f0362dc928a6ecd9db58868fca5e48485205e3855957bdedea308f8672ea4a", size = 12320584, upload-time = "2026-03-29T13:19:16.155Z" }, + { url = "https://files.pythonhosted.org/packages/58/89/e4e856ac82a68c3ed64486a544977d0e7bdd18b8da75b78a577ca31c4395/numpy-2.4.4-cp312-cp312-win_arm64.whl", hash = "sha256:846300f379b5b12cc769334464656bc882e0735d27d9726568bc932fdc49d5ec", size = 10221450, upload-time = "2026-03-29T13:19:18.994Z" }, + { url = "https://files.pythonhosted.org/packages/14/1d/d0a583ce4fefcc3308806a749a536c201ed6b5ad6e1322e227ee4848979d/numpy-2.4.4-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:08f2e31ed5e6f04b118e49821397f12767934cfdd12a1ce86a058f91e004ee50", size = 16684933, upload-time = "2026-03-29T13:19:22.47Z" }, + { url = "https://files.pythonhosted.org/packages/c1/62/2b7a48fbb745d344742c0277f01286dead15f3f68e4f359fbfcf7b48f70f/numpy-2.4.4-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:e823b8b6edc81e747526f70f71a9c0a07ac4e7ad13020aa736bb7c9d67196115", size = 14694532, upload-time = "2026-03-29T13:19:25.581Z" }, + { url = "https://files.pythonhosted.org/packages/e5/87/499737bfba066b4a3bebff24a8f1c5b2dee410b209bc6668c9be692580f0/numpy-2.4.4-cp313-cp313-macosx_14_0_arm64.whl", hash = "sha256:4a19d9dba1a76618dd86b164d608566f393f8ec6ac7c44f0cc879011c45e65af", size = 5199661, upload-time = "2026-03-29T13:19:28.31Z" }, + { url = "https://files.pythonhosted.org/packages/cd/da/464d551604320d1491bc345efed99b4b7034143a85787aab78d5691d5a0e/numpy-2.4.4-cp313-cp313-macosx_14_0_x86_64.whl", hash = "sha256:d2a8490669bfe99a233298348acc2d824d496dee0e66e31b66a6022c2ad74a5c", size = 6547539, upload-time = "2026-03-29T13:19:30.97Z" }, + { url = "https://files.pythonhosted.org/packages/7d/90/8d23e3b0dafd024bf31bdec225b3bb5c2dbfa6912f8a53b8659f21216cbf/numpy-2.4.4-cp313-cp313-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:45dbed2ab436a9e826e302fcdcbe9133f9b0006e5af7168afb8963a6520da103", size = 15668806, upload-time = "2026-03-29T13:19:33.887Z" }, + { url = "https://files.pythonhosted.org/packages/d1/73/a9d864e42a01896bb5974475438f16086be9ba1f0d19d0bb7a07427c4a8b/numpy-2.4.4-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:c901b15172510173f5cb310eae652908340f8dede90fff9e3bf6c0d8dfd92f83", size = 16632682, upload-time = "2026-03-29T13:19:37.336Z" }, + { url = "https://files.pythonhosted.org/packages/34/fb/14570d65c3bde4e202a031210475ae9cde9b7686a2e7dc97ee67d2833b35/numpy-2.4.4-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:99d838547ace2c4aace6c4f76e879ddfe02bb58a80c1549928477862b7a6d6ed", size = 17019810, upload-time = "2026-03-29T13:19:40.963Z" }, + { url = "https://files.pythonhosted.org/packages/8a/77/2ba9d87081fd41f6d640c83f26fb7351e536b7ce6dd9061b6af5904e8e46/numpy-2.4.4-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:0aec54fd785890ecca25a6003fd9a5aed47ad607bbac5cd64f836ad8666f4959", size = 18357394, upload-time = "2026-03-29T13:19:44.859Z" }, + { url = "https://files.pythonhosted.org/packages/a2/23/52666c9a41708b0853fa3b1a12c90da38c507a3074883823126d4e9d5b30/numpy-2.4.4-cp313-cp313-win32.whl", hash = "sha256:07077278157d02f65c43b1b26a3886bce886f95d20aabd11f87932750dfb14ed", size = 5959556, upload-time = "2026-03-29T13:19:47.661Z" }, + { url = "https://files.pythonhosted.org/packages/57/fb/48649b4971cde70d817cf97a2a2fdc0b4d8308569f1dd2f2611959d2e0cf/numpy-2.4.4-cp313-cp313-win_amd64.whl", hash = "sha256:5c70f1cc1c4efbe316a572e2d8b9b9cc44e89b95f79ca3331553fbb63716e2bf", size = 12317311, upload-time = "2026-03-29T13:19:50.67Z" }, + { url = "https://files.pythonhosted.org/packages/ba/d8/11490cddd564eb4de97b4579ef6bfe6a736cc07e94c1598590ae25415e01/numpy-2.4.4-cp313-cp313-win_arm64.whl", hash = "sha256:ef4059d6e5152fa1a39f888e344c73fdc926e1b2dd58c771d67b0acfbf2aa67d", size = 10222060, upload-time = "2026-03-29T13:19:54.229Z" }, + { url = "https://files.pythonhosted.org/packages/99/5d/dab4339177a905aad3e2221c915b35202f1ec30d750dd2e5e9d9a72b804b/numpy-2.4.4-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:4bbc7f303d125971f60ec0aaad5e12c62d0d2c925f0ab1273debd0e4ba37aba5", size = 14822302, upload-time = "2026-03-29T13:19:57.585Z" }, + { url = "https://files.pythonhosted.org/packages/eb/e4/0564a65e7d3d97562ed6f9b0fd0fb0a6f559ee444092f105938b50043876/numpy-2.4.4-cp313-cp313t-macosx_14_0_arm64.whl", hash = "sha256:4d6d57903571f86180eb98f8f0c839fa9ebbfb031356d87f1361be91e433f5b7", size = 5327407, upload-time = "2026-03-29T13:20:00.601Z" }, + { url = "https://files.pythonhosted.org/packages/29/8d/35a3a6ce5ad371afa58b4700f1c820f8f279948cca32524e0a695b0ded83/numpy-2.4.4-cp313-cp313t-macosx_14_0_x86_64.whl", hash = "sha256:4636de7fd195197b7535f231b5de9e4b36d2c440b6e566d2e4e4746e6af0ca93", size = 6647631, upload-time = "2026-03-29T13:20:02.855Z" }, + { url = "https://files.pythonhosted.org/packages/f4/da/477731acbd5a58a946c736edfdabb2ac5b34c3d08d1ba1a7b437fa0884df/numpy-2.4.4-cp313-cp313t-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:ad2e2ef14e0b04e544ea2fa0a36463f847f113d314aa02e5b402fdf910ef309e", size = 15727691, upload-time = "2026-03-29T13:20:06.004Z" }, + { url = "https://files.pythonhosted.org/packages/e6/db/338535d9b152beabeb511579598418ba0212ce77cf9718edd70262cc4370/numpy-2.4.4-cp313-cp313t-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:5a285b3b96f951841799528cd1f4f01cd70e7e0204b4abebac9463eecfcf2a40", size = 16681241, upload-time = "2026-03-29T13:20:09.417Z" }, + { url = "https://files.pythonhosted.org/packages/e2/a9/ad248e8f58beb7a0219b413c9c7d8151c5d285f7f946c3e26695bdbbe2df/numpy-2.4.4-cp313-cp313t-musllinux_1_2_aarch64.whl", hash = "sha256:f8474c4241bc18b750be2abea9d7a9ec84f46ef861dbacf86a4f6e043401f79e", size = 17085767, upload-time = "2026-03-29T13:20:13.126Z" }, + { url = "https://files.pythonhosted.org/packages/b5/1a/3b88ccd3694681356f70da841630e4725a7264d6a885c8d442a697e1146b/numpy-2.4.4-cp313-cp313t-musllinux_1_2_x86_64.whl", hash = "sha256:4e874c976154687c1f71715b034739b45c7711bec81db01914770373d125e392", size = 18403169, upload-time = "2026-03-29T13:20:17.096Z" }, + { url = "https://files.pythonhosted.org/packages/c2/c9/fcfd5d0639222c6eac7f304829b04892ef51c96a75d479214d77e3ce6e33/numpy-2.4.4-cp313-cp313t-win32.whl", hash = "sha256:9c585a1790d5436a5374bac930dad6ed244c046ed91b2b2a3634eb2971d21008", size = 6083477, upload-time = "2026-03-29T13:20:20.195Z" }, + { url = "https://files.pythonhosted.org/packages/d5/e3/3938a61d1c538aaec8ed6fd6323f57b0c2d2d2219512434c5c878db76553/numpy-2.4.4-cp313-cp313t-win_amd64.whl", hash = "sha256:93e15038125dc1e5345d9b5b68aa7f996ec33b98118d18c6ca0d0b7d6198b7e8", size = 12457487, upload-time = "2026-03-29T13:20:22.946Z" }, + { url = "https://files.pythonhosted.org/packages/97/6a/7e345032cc60501721ef94e0e30b60f6b0bd601f9174ebd36389a2b86d40/numpy-2.4.4-cp313-cp313t-win_arm64.whl", hash = "sha256:0dfd3f9d3adbe2920b68b5cd3d51444e13a10792ec7154cd0a2f6e74d4ab3233", size = 10292002, upload-time = "2026-03-29T13:20:25.909Z" }, + { url = "https://files.pythonhosted.org/packages/6e/06/c54062f85f673dd5c04cbe2f14c3acb8c8b95e3384869bb8cc9bff8cb9df/numpy-2.4.4-cp314-cp314-macosx_10_15_x86_64.whl", hash = "sha256:f169b9a863d34f5d11b8698ead99febeaa17a13ca044961aa8e2662a6c7766a0", size = 16684353, upload-time = "2026-03-29T13:20:29.504Z" }, + { url = "https://files.pythonhosted.org/packages/4c/39/8a320264a84404c74cc7e79715de85d6130fa07a0898f67fb5cd5bd79908/numpy-2.4.4-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:2483e4584a1cb3092da4470b38866634bafb223cbcd551ee047633fd2584599a", size = 14704914, upload-time = "2026-03-29T13:20:33.547Z" }, + { url = "https://files.pythonhosted.org/packages/91/fb/287076b2614e1d1044235f50f03748f31fa287e3dbe6abeb35cdfa351eca/numpy-2.4.4-cp314-cp314-macosx_14_0_arm64.whl", hash = "sha256:2d19e6e2095506d1736b7d80595e0f252d76b89f5e715c35e06e937679ea7d7a", size = 5210005, upload-time = "2026-03-29T13:20:36.45Z" }, + { url = "https://files.pythonhosted.org/packages/63/eb/fcc338595309910de6ecabfcef2419a9ce24399680bfb149421fa2df1280/numpy-2.4.4-cp314-cp314-macosx_14_0_x86_64.whl", hash = "sha256:6a246d5914aa1c820c9443ddcee9c02bec3e203b0c080349533fae17727dfd1b", size = 6544974, upload-time = "2026-03-29T13:20:39.014Z" }, + { url = "https://files.pythonhosted.org/packages/44/5d/e7e9044032a716cdfaa3fba27a8e874bf1c5f1912a1ddd4ed071bf8a14a6/numpy-2.4.4-cp314-cp314-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:989824e9faf85f96ec9c7761cd8d29c531ad857bfa1daa930cba85baaecf1a9a", size = 15684591, upload-time = "2026-03-29T13:20:42.146Z" }, + { url = "https://files.pythonhosted.org/packages/98/7c/21252050676612625449b4807d6b695b9ce8a7c9e1c197ee6216c8a65c7c/numpy-2.4.4-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:27a8d92cd10f1382a67d7cf4db7ce18341b66438bdd9f691d7b0e48d104c2a9d", size = 16637700, upload-time = "2026-03-29T13:20:46.204Z" }, + { url = "https://files.pythonhosted.org/packages/b1/29/56d2bbef9465db24ef25393383d761a1af4f446a1df9b8cded4fe3a5a5d7/numpy-2.4.4-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:e44319a2953c738205bf3354537979eaa3998ed673395b964c1176083dd46252", size = 17035781, upload-time = "2026-03-29T13:20:50.242Z" }, + { url = "https://files.pythonhosted.org/packages/e3/2b/a35a6d7589d21f44cea7d0a98de5ddcbb3d421b2622a5c96b1edf18707c3/numpy-2.4.4-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:e892aff75639bbef0d2a2cfd55535510df26ff92f63c92cd84ef8d4ba5a5557f", size = 18362959, upload-time = "2026-03-29T13:20:54.019Z" }, + { url = "https://files.pythonhosted.org/packages/64/c9/d52ec581f2390e0f5f85cbfd80fb83d965fc15e9f0e1aec2195faa142cde/numpy-2.4.4-cp314-cp314-win32.whl", hash = "sha256:1378871da56ca8943c2ba674530924bb8ca40cd228358a3b5f302ad60cf875fc", size = 6008768, upload-time = "2026-03-29T13:20:56.912Z" }, + { url = "https://files.pythonhosted.org/packages/fa/22/4cc31a62a6c7b74a8730e31a4274c5dc80e005751e277a2ce38e675e4923/numpy-2.4.4-cp314-cp314-win_amd64.whl", hash = "sha256:715d1c092715954784bc79e1174fc2a90093dc4dc84ea15eb14dad8abdcdeb74", size = 12449181, upload-time = "2026-03-29T13:20:59.548Z" }, + { url = "https://files.pythonhosted.org/packages/70/2e/14cda6f4d8e396c612d1bf97f22958e92148801d7e4f110cabebdc0eef4b/numpy-2.4.4-cp314-cp314-win_arm64.whl", hash = "sha256:2c194dd721e54ecad9ad387c1d35e63dce5c4450c6dc7dd5611283dda239aabb", size = 10496035, upload-time = "2026-03-29T13:21:02.524Z" }, + { url = "https://files.pythonhosted.org/packages/b1/e8/8fed8c8d848d7ecea092dc3469643f9d10bc3a134a815a3b033da1d2039b/numpy-2.4.4-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:2aa0613a5177c264ff5921051a5719d20095ea586ca88cc802c5c218d1c67d3e", size = 14824958, upload-time = "2026-03-29T13:21:05.671Z" }, + { url = "https://files.pythonhosted.org/packages/05/1a/d8007a5138c179c2bf33ef44503e83d70434d2642877ee8fbb230e7c0548/numpy-2.4.4-cp314-cp314t-macosx_14_0_arm64.whl", hash = "sha256:42c16925aa5a02362f986765f9ebabf20de75cdefdca827d14315c568dcab113", size = 5330020, upload-time = "2026-03-29T13:21:08.635Z" }, + { url = "https://files.pythonhosted.org/packages/99/64/ffb99ac6ae93faf117bcbd5c7ba48a7f45364a33e8e458545d3633615dda/numpy-2.4.4-cp314-cp314t-macosx_14_0_x86_64.whl", hash = "sha256:874f200b2a981c647340f841730fc3a2b54c9d940566a3c4149099591e2c4c3d", size = 6650758, upload-time = "2026-03-29T13:21:10.949Z" }, + { url = "https://files.pythonhosted.org/packages/6e/6e/795cc078b78a384052e73b2f6281ff7a700e9bf53bcce2ee579d4f6dd879/numpy-2.4.4-cp314-cp314t-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:c9b39d38a9bd2ae1becd7eac1303d031c5c110ad31f2b319c6e7d98b135c934d", size = 15729948, upload-time = "2026-03-29T13:21:14.047Z" }, + { url = "https://files.pythonhosted.org/packages/5f/86/2acbda8cc2af5f3d7bfc791192863b9e3e19674da7b5e533fded124d1299/numpy-2.4.4-cp314-cp314t-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:b268594bccac7d7cf5844c7732e3f20c50921d94e36d7ec9b79e9857694b1b2f", size = 16679325, upload-time = "2026-03-29T13:21:17.561Z" }, + { url = "https://files.pythonhosted.org/packages/bc/59/cafd83018f4aa55e0ac6fa92aa066c0a1877b77a615ceff1711c260ffae8/numpy-2.4.4-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:ac6b31e35612a26483e20750126d30d0941f949426974cace8e6b5c58a3657b0", size = 17084883, upload-time = "2026-03-29T13:21:21.106Z" }, + { url = "https://files.pythonhosted.org/packages/f0/85/a42548db84e65ece46ab2caea3d3f78b416a47af387fcbb47ec28e660dc2/numpy-2.4.4-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:8e3ed142f2728df44263aaf5fb1f5b0b99f4070c553a0d7f033be65338329150", size = 18403474, upload-time = "2026-03-29T13:21:24.828Z" }, + { url = "https://files.pythonhosted.org/packages/ed/ad/483d9e262f4b831000062e5d8a45e342166ec8aaa1195264982bca267e62/numpy-2.4.4-cp314-cp314t-win32.whl", hash = "sha256:dddbbd259598d7240b18c9d87c56a9d2fb3b02fe266f49a7c101532e78c1d871", size = 6155500, upload-time = "2026-03-29T13:21:28.205Z" }, + { url = "https://files.pythonhosted.org/packages/c7/03/2fc4e14c7bd4ff2964b74ba90ecb8552540b6315f201df70f137faa5c589/numpy-2.4.4-cp314-cp314t-win_amd64.whl", hash = "sha256:a7164afb23be6e37ad90b2f10426149fd75aee07ca55653d2aa41e66c4ef697e", size = 12637755, upload-time = "2026-03-29T13:21:31.107Z" }, + { url = "https://files.pythonhosted.org/packages/58/78/548fb8e07b1a341746bfbecb32f2c268470f45fa028aacdbd10d9bc73aab/numpy-2.4.4-cp314-cp314t-win_arm64.whl", hash = "sha256:ba203255017337d39f89bdd58417f03c4426f12beed0440cfd933cb15f8669c7", size = 10566643, upload-time = "2026-03-29T13:21:34.339Z" }, + { url = "https://files.pythonhosted.org/packages/6b/33/8fae8f964a4f63ed528264ddf25d2b683d0b663e3cba26961eb838a7c1bd/numpy-2.4.4-pp311-pypy311_pp73-macosx_10_15_x86_64.whl", hash = "sha256:58c8b5929fcb8287cbd6f0a3fae19c6e03a5c48402ae792962ac465224a629a4", size = 16854491, upload-time = "2026-03-29T13:21:38.03Z" }, + { url = "https://files.pythonhosted.org/packages/bc/d0/1aabee441380b981cf8cdda3ae7a46aa827d1b5a8cce84d14598bc94d6d9/numpy-2.4.4-pp311-pypy311_pp73-macosx_11_0_arm64.whl", hash = "sha256:eea7ac5d2dce4189771cedb559c738a71512768210dc4e4753b107a2048b3d0e", size = 14895830, upload-time = "2026-03-29T13:21:41.509Z" }, + { url = "https://files.pythonhosted.org/packages/a5/b8/aafb0d1065416894fccf4df6b49ef22b8db045187949545bced89c034b8e/numpy-2.4.4-pp311-pypy311_pp73-macosx_14_0_arm64.whl", hash = "sha256:51fc224f7ca4d92656d5a5eb315f12eb5fe2c97a66249aa7b5f562528a3be38c", size = 5400927, upload-time = "2026-03-29T13:21:44.747Z" }, + { url = "https://files.pythonhosted.org/packages/d6/77/063baa20b08b431038c7f9ff5435540c7b7265c78cf56012a483019ca72d/numpy-2.4.4-pp311-pypy311_pp73-macosx_14_0_x86_64.whl", hash = "sha256:28a650663f7314afc3e6ec620f44f333c386aad9f6fc472030865dc0ebb26ee3", size = 6715557, upload-time = "2026-03-29T13:21:47.406Z" }, + { url = "https://files.pythonhosted.org/packages/c7/a8/379542d45a14f149444c5c4c4e7714707239ce9cc1de8c2803958889da14/numpy-2.4.4-pp311-pypy311_pp73-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:19710a9ca9992d7174e9c52f643d4272dcd1558c5f7af7f6f8190f633bd651a7", size = 15804253, upload-time = "2026-03-29T13:21:50.753Z" }, + { url = "https://files.pythonhosted.org/packages/a2/c8/f0a45426d6d21e7ea3310a15cf90c43a14d9232c31a837702dba437f3373/numpy-2.4.4-pp311-pypy311_pp73-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:9b2aec6af35c113b05695ebb5749a787acd63cafc83086a05771d1e1cd1e555f", size = 16753552, upload-time = "2026-03-29T13:21:54.344Z" }, + { url = "https://files.pythonhosted.org/packages/04/74/f4c001f4714c3ad9ce037e18cf2b9c64871a84951eaa0baf683a9ca9301c/numpy-2.4.4-pp311-pypy311_pp73-win_amd64.whl", hash = "sha256:f2cf083b324a467e1ab358c105f6cad5ea950f50524668a80c486ff1db24e119", size = 12509075, upload-time = "2026-03-29T13:21:57.644Z" }, +] + +[[package]] +name = "openai" +version = "2.30.0" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "anyio" }, + { name = "distro" }, + { name = "httpx" }, + { name = "jiter" }, + { name = "pydantic" }, + { name = "sniffio" }, + { name = "tqdm" }, + { name = "typing-extensions" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/88/15/52580c8fbc16d0675d516e8749806eda679b16de1e4434ea06fb6feaa610/openai-2.30.0.tar.gz", hash = "sha256:92f7661c990bda4b22a941806c83eabe4896c3094465030dd882a71abe80c885", size = 676084, upload-time = "2026-03-25T22:08:59.96Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/2a/9e/5bfa2270f902d5b92ab7d41ce0475b8630572e71e349b2a4996d14bdda93/openai-2.30.0-py3-none-any.whl", hash = "sha256:9a5ae616888eb2748ec5e0c5b955a51592e0b201a11f4262db920f2a78c5231d", size = 1146656, upload-time = "2026-03-25T22:08:58.2Z" }, +] + +[[package]] +name = "openapi-pydantic" +version = "0.5.1" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "pydantic" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/02/2e/58d83848dd1a79cb92ed8e63f6ba901ca282c5f09d04af9423ec26c56fd7/openapi_pydantic-0.5.1.tar.gz", hash = "sha256:ff6835af6bde7a459fb93eb93bb92b8749b754fc6e51b2f1590a19dc3005ee0d", size = 60892, upload-time = "2025-01-08T19:29:27.083Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/12/cf/03675d8bd8ecbf4445504d8071adab19f5f993676795708e36402ab38263/openapi_pydantic-0.5.1-py3-none-any.whl", hash = "sha256:a3a09ef4586f5bd760a8df7f43028b60cafb6d9f61de2acba9574766255ab146", size = 96381, upload-time = "2025-01-08T19:29:25.275Z" }, +] + +[[package]] +name = "openenv-atc-optimization" +version = "1.0.0" +source = { editable = "." } +dependencies = [ + { name = "fastapi" }, + { name = "openai" }, + { name = "openenv-core", extra = ["core"] }, + { name = "pydantic" }, + { name = "uvicorn" }, +] + +[package.optional-dependencies] +dev = [ + { name = "pytest" }, + { name = "requests" }, +] + +[package.metadata] +requires-dist = [ + { name = "fastapi", specifier = ">=0.128.0" }, + { name = "openai", specifier = ">=2.30.0" }, + { name = "openenv-core", extras = ["core"], specifier = ">=0.2.3" }, + { name = "pydantic", specifier = ">=2.12.0" }, + { name = "pytest", marker = "extra == 'dev'", specifier = ">=8.4.0" }, + { name = "requests", marker = "extra == 'dev'", specifier = ">=2.33.0" }, + { name = "uvicorn", specifier = ">=0.41.0" }, +] +provides-extras = ["dev"] + +[[package]] +name = "openenv-core" +version = "0.2.3" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "fastapi" }, + { name = "fastmcp" }, + { name = "gradio" }, + { name = "httpx" }, + { name = "huggingface-hub" }, + { name = "openai" }, + { name = "pydantic" }, + { name = "pyyaml" }, + { name = "requests" }, + { name = "rich" }, + { name = "tomli" }, + { name = "tomli-w" }, + { name = "typer" }, + { name = "uvicorn" }, + { name = "websockets" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/93/f3/41a5ed932a2507438c985e9d959dcaa1a6c46f293995c064348c0e52dd40/openenv_core-0.2.3.tar.gz", hash = "sha256:48aefd774474556297ce012b80f2ceb271db51253d7fd0838e6e2dcc329db0c3", size = 146944, upload-time = "2026-03-28T18:56:28.415Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/2f/22/38c339e370d198008f2c17ebdda1ae8f23bb4e1509dc7ae8eab6dc9b9cbe/openenv_core-0.2.3-py3-none-any.whl", hash = "sha256:f75a20c94452057a5f53a86e6d71a9f6a461524c3d6a865aa9344d257a92b795", size = 174557, upload-time = "2026-03-28T18:56:26.874Z" }, +] + +[package.optional-dependencies] +core = [ + { name = "fastapi" }, + { name = "pydantic" }, + { name = "requests" }, + { name = "uvicorn" }, + { name = "websockets" }, +] + +[[package]] +name = "opentelemetry-api" +version = "1.40.0" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "importlib-metadata" }, + { name = "typing-extensions" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/2c/1d/4049a9e8698361cc1a1aa03a6c59e4fa4c71e0c0f94a30f988a6876a2ae6/opentelemetry_api-1.40.0.tar.gz", hash = "sha256:159be641c0b04d11e9ecd576906462773eb97ae1b657730f0ecf64d32071569f", size = 70851, upload-time = "2026-03-04T14:17:21.555Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/5f/bf/93795954016c522008da367da292adceed71cca6ee1717e1d64c83089099/opentelemetry_api-1.40.0-py3-none-any.whl", hash = "sha256:82dd69331ae74b06f6a874704be0cfaa49a1650e1537d4a813b86ecef7d0ecf9", size = 68676, upload-time = "2026-03-04T14:17:01.24Z" }, +] + +[[package]] +name = "orjson" +version = "3.11.8" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/9d/1b/2024d06792d0779f9dbc51531b61c24f76c75b9f4ce05e6f3377a1814cea/orjson-3.11.8.tar.gz", hash = "sha256:96163d9cdc5a202703e9ad1b9ae757d5f0ca62f4fa0cc93d1f27b0e180cc404e", size = 5603832, upload-time = "2026-03-31T16:16:27.878Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/67/41/5aa7fa3b0f4dc6b47dcafc3cea909299c37e40e9972feabc8b6a74e2730d/orjson-3.11.8-cp311-cp311-macosx_10_15_x86_64.macosx_11_0_arm64.macosx_10_15_universal2.whl", hash = "sha256:003646067cc48b7fcab2ae0c562491c9b5d2cbd43f1e5f16d98fd118c5522d34", size = 229229, upload-time = "2026-03-31T16:14:50.424Z" }, + { url = "https://files.pythonhosted.org/packages/0a/d7/57e7f2458e0a2c41694f39fc830030a13053a84f837a5b73423dca1f0938/orjson-3.11.8-cp311-cp311-macosx_15_0_arm64.whl", hash = "sha256:ed193ce51d77a3830cad399a529cd4ef029968761f43ddc549e1bc62b40d88f8", size = 128871, upload-time = "2026-03-31T16:14:51.888Z" }, + { url = "https://files.pythonhosted.org/packages/53/4a/e0fdb9430983e6c46e0299559275025075568aad5d21dd606faee3703924/orjson-3.11.8-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f30491bc4f862aa15744b9738517454f1e46e56c972a2be87d70d727d5b2a8f8", size = 132104, upload-time = "2026-03-31T16:14:53.142Z" }, + { url = "https://files.pythonhosted.org/packages/08/4a/2025a60ff3f5c8522060cda46612d9b1efa653de66ed2908591d8d82f22d/orjson-3.11.8-cp311-cp311-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:6eda5b8b6be91d3f26efb7dc6e5e68ee805bc5617f65a328587b35255f138bf4", size = 130483, upload-time = "2026-03-31T16:14:54.605Z" }, + { url = "https://files.pythonhosted.org/packages/2d/3c/b9cde05bdc7b2385c66014e0620627da638d3d04e4954416ab48c31196c5/orjson-3.11.8-cp311-cp311-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:ee8db7bfb6fe03581bbab54d7c4124a6dd6a7f4273a38f7267197890f094675f", size = 135481, upload-time = "2026-03-31T16:14:55.901Z" }, + { url = "https://files.pythonhosted.org/packages/ff/f2/a8238e7734de7cb589fed319857a8025d509c89dc52fdcc88f39c6d03d5a/orjson-3.11.8-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:5d8b5231de76c528a46b57010bbd83fb51e056aa0220a372fd5065e978406f1c", size = 146819, upload-time = "2026-03-31T16:14:57.548Z" }, + { url = "https://files.pythonhosted.org/packages/db/10/dbf1e2a3cafea673b1b4350e371877b759060d6018a998643b7040e5de48/orjson-3.11.8-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:58a4a208a6fbfdb7a7327b8f201c6014f189f721fd55d047cafc4157af1bc62a", size = 132846, upload-time = "2026-03-31T16:14:58.91Z" }, + { url = "https://files.pythonhosted.org/packages/f8/fc/55e667ec9c85694038fcff00573d221b085d50777368ee3d77f38668bf3c/orjson-3.11.8-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:5f8952d6d2505c003e8f0224ff7858d341fa4e33fef82b91c4ff0ef070f2393c", size = 133580, upload-time = "2026-03-31T16:15:00.519Z" }, + { url = "https://files.pythonhosted.org/packages/7e/a6/c08c589a9aad0cb46c4831d17de212a2b6901f9d976814321ff8e69e8785/orjson-3.11.8-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:0022bb50f90da04b009ce32c512dc1885910daa7cb10b7b0cba4505b16db82a8", size = 142042, upload-time = "2026-03-31T16:15:01.906Z" }, + { url = "https://files.pythonhosted.org/packages/5c/cc/2f78ea241d52b717d2efc38878615fe80425bf2beb6e68c984dde257a766/orjson-3.11.8-cp311-cp311-musllinux_1_2_armv7l.whl", hash = "sha256:ff51f9d657d1afb6f410cb435792ce4e1fe427aab23d2fcd727a2876e21d4cb6", size = 423845, upload-time = "2026-03-31T16:15:03.703Z" }, + { url = "https://files.pythonhosted.org/packages/70/07/c17dcf05dd8045457538428a983bf1f1127928df5bf328cb24d2b7cddacb/orjson-3.11.8-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:6dbe9a97bdb4d8d9d5367b52a7c32549bba70b2739c58ef74a6964a6d05ae054", size = 147729, upload-time = "2026-03-31T16:15:05.203Z" }, + { url = "https://files.pythonhosted.org/packages/90/6c/0fb6e8a24e682e0958d71711ae6f39110e4b9cd8cab1357e2a89cb8e1951/orjson-3.11.8-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:a5c370674ebabe16c6ccac33ff80c62bf8a6e59439f5e9d40c1f5ab8fd2215b7", size = 136425, upload-time = "2026-03-31T16:15:07.052Z" }, + { url = "https://files.pythonhosted.org/packages/b2/35/4d3cc3a3d616035beb51b24a09bb872942dc452cf2df0c1d11ab35046d9f/orjson-3.11.8-cp311-cp311-win32.whl", hash = "sha256:0e32f7154299f42ae66f13488963269e5eccb8d588a65bc839ed986919fc9fac", size = 131870, upload-time = "2026-03-31T16:15:08.678Z" }, + { url = "https://files.pythonhosted.org/packages/13/26/9fe70f81d16b702f8c3a775e8731b50ad91d22dacd14c7599b60a0941cd1/orjson-3.11.8-cp311-cp311-win_amd64.whl", hash = "sha256:25e0c672a2e32348d2eb33057b41e754091f2835f87222e4675b796b92264f06", size = 127440, upload-time = "2026-03-31T16:15:09.994Z" }, + { url = "https://files.pythonhosted.org/packages/e8/c6/b038339f4145efd2859c1ca53097a52c0bb9cbdd24f947ebe146da1ad067/orjson-3.11.8-cp311-cp311-win_arm64.whl", hash = "sha256:9185589c1f2a944c17e26c9925dcdbc2df061cc4a145395c57f0c51f9b5dbfcd", size = 127399, upload-time = "2026-03-31T16:15:11.412Z" }, + { url = "https://files.pythonhosted.org/packages/01/f6/8d58b32ab32d9215973a1688aebd098252ee8af1766c0e4e36e7831f0295/orjson-3.11.8-cp312-cp312-macosx_10_15_x86_64.macosx_11_0_arm64.macosx_10_15_universal2.whl", hash = "sha256:1cd0b77e77c95758f8e1100139844e99f3ccc87e71e6fc8e1c027e55807c549f", size = 229233, upload-time = "2026-03-31T16:15:12.762Z" }, + { url = "https://files.pythonhosted.org/packages/a9/8b/2ffe35e71f6b92622e8ea4607bf33ecf7dfb51b3619dcfabfd36cbe2d0a5/orjson-3.11.8-cp312-cp312-macosx_15_0_arm64.whl", hash = "sha256:6a3d159d5ffa0e3961f353c4b036540996bf8b9697ccc38261c0eac1fd3347a6", size = 128772, upload-time = "2026-03-31T16:15:14.237Z" }, + { url = "https://files.pythonhosted.org/packages/27/d2/1f8682ae50d5c6897a563cb96bc106da8c9cb5b7b6e81a52e4cc086679b9/orjson-3.11.8-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:76070a76e9c5ae661e2d9848f216980d8d533e0f8143e6ed462807b242e3c5e8", size = 131946, upload-time = "2026-03-31T16:15:15.607Z" }, + { url = "https://files.pythonhosted.org/packages/52/4b/5500f76f0eece84226e0689cb48dcde081104c2fa6e2483d17ca13685ffb/orjson-3.11.8-cp312-cp312-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:54153d21520a71a4c82a0dbb4523e468941d549d221dc173de0f019678cf3813", size = 130368, upload-time = "2026-03-31T16:15:17.066Z" }, + { url = "https://files.pythonhosted.org/packages/da/4e/58b927e08fbe9840e6c920d9e299b051ea667463b1f39a56e668669f8508/orjson-3.11.8-cp312-cp312-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:469ac2125611b7c5741a0b3798cd9e5786cbad6345f9f400c77212be89563bec", size = 135540, upload-time = "2026-03-31T16:15:18.404Z" }, + { url = "https://files.pythonhosted.org/packages/56/7c/ba7cb871cba1bcd5cd02ee34f98d894c6cea96353ad87466e5aef2429c60/orjson-3.11.8-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:14778ffd0f6896aa613951a7fbf4690229aa7a543cb2bfbe9f358e08aafa9546", size = 146877, upload-time = "2026-03-31T16:15:19.833Z" }, + { url = "https://files.pythonhosted.org/packages/0b/5d/eb9c25fc1386696c6a342cd361c306452c75e0b55e86ad602dd4827a7fd7/orjson-3.11.8-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:ea56a955056a6d6c550cf18b3348656a9d9a4f02e2d0c02cabf3c73f1055d506", size = 132837, upload-time = "2026-03-31T16:15:21.282Z" }, + { url = "https://files.pythonhosted.org/packages/37/87/5ddeb7fc1fbd9004aeccab08426f34c81a5b4c25c7061281862b015fce2b/orjson-3.11.8-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:53a0f57e59a530d18a142f4d4ba6dfc708dc5fdedce45e98ff06b44930a2a48f", size = 133624, upload-time = "2026-03-31T16:15:22.641Z" }, + { url = "https://files.pythonhosted.org/packages/22/09/90048793db94ee4b2fcec4ac8e5ddb077367637d6650be896b3494b79bb7/orjson-3.11.8-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:9b48e274f8824567d74e2158199e269597edf00823a1b12b63d48462bbf5123e", size = 141904, upload-time = "2026-03-31T16:15:24.435Z" }, + { url = "https://files.pythonhosted.org/packages/c0/cf/eb284847487821a5d415e54149a6449ba9bfc5872ce63ab7be41b8ec401c/orjson-3.11.8-cp312-cp312-musllinux_1_2_armv7l.whl", hash = "sha256:3f262401086a3960586af06c054609365e98407151f5ea24a62893a40d80dbbb", size = 423742, upload-time = "2026-03-31T16:15:26.155Z" }, + { url = "https://files.pythonhosted.org/packages/44/09/e12423d327071c851c13e76936f144a96adacfc037394dec35ac3fc8d1e8/orjson-3.11.8-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:8e8c6218b614badf8e229b697865df4301afa74b791b6c9ade01d19a9953a942", size = 147806, upload-time = "2026-03-31T16:15:27.909Z" }, + { url = "https://files.pythonhosted.org/packages/b3/6d/37c2589ba864e582ffe7611643314785c6afb1f83c701654ef05daa8fcc7/orjson-3.11.8-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:093d489fa039ddade2db541097dbb484999fcc65fc2b0ff9819141e2ab364f25", size = 136485, upload-time = "2026-03-31T16:15:29.749Z" }, + { url = "https://files.pythonhosted.org/packages/be/c9/135194a02ab76b04ed9a10f68624b7ebd238bbe55548878b11ff15a0f352/orjson-3.11.8-cp312-cp312-win32.whl", hash = "sha256:e0950ed1bcb9893f4293fd5c5a7ee10934fbf82c4101c70be360db23ce24b7d2", size = 131966, upload-time = "2026-03-31T16:15:31.687Z" }, + { url = "https://files.pythonhosted.org/packages/ed/9a/9796f8fbe3cf30ce9cb696748dbb535e5c87be4bf4fe2e9ca498ef1fa8cf/orjson-3.11.8-cp312-cp312-win_amd64.whl", hash = "sha256:3cf17c141617b88ced4536b2135c552490f07799f6ad565948ea07bef0dcb9a6", size = 127441, upload-time = "2026-03-31T16:15:33.333Z" }, + { url = "https://files.pythonhosted.org/packages/cc/47/5aaf54524a7a4a0dd09dd778f3fa65dd2108290615b652e23d944152bc8e/orjson-3.11.8-cp312-cp312-win_arm64.whl", hash = "sha256:48854463b0572cc87dac7d981aa72ed8bf6deedc0511853dc76b8bbd5482d36d", size = 127364, upload-time = "2026-03-31T16:15:34.748Z" }, + { url = "https://files.pythonhosted.org/packages/66/7f/95fba509bb2305fab0073558f1e8c3a2ec4b2afe58ed9fcb7d3b8beafe94/orjson-3.11.8-cp313-cp313-macosx_10_15_x86_64.macosx_11_0_arm64.macosx_10_15_universal2.whl", hash = "sha256:3f23426851d98478c8970da5991f84784a76682213cd50eb73a1da56b95239dc", size = 229180, upload-time = "2026-03-31T16:15:36.426Z" }, + { url = "https://files.pythonhosted.org/packages/f6/9d/b237215c743ca073697d759b5503abd2cb8a0d7b9c9e21f524bcf176ab66/orjson-3.11.8-cp313-cp313-macosx_15_0_arm64.whl", hash = "sha256:ebaed4cef74a045b83e23537b52ef19a367c7e3f536751e355a2a394f8648559", size = 128754, upload-time = "2026-03-31T16:15:38.049Z" }, + { url = "https://files.pythonhosted.org/packages/42/3d/27d65b6d11e63f133781425f132807aef793ed25075fec686fc8e46dd528/orjson-3.11.8-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:97c8f5d3b62380b70c36ffacb2a356b7c6becec86099b177f73851ba095ef623", size = 131877, upload-time = "2026-03-31T16:15:39.484Z" }, + { url = "https://files.pythonhosted.org/packages/dd/cc/faee30cd8f00421999e40ef0eba7332e3a625ce91a58200a2f52c7fef235/orjson-3.11.8-cp313-cp313-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:436c4922968a619fb7fef1ccd4b8b3a76c13b67d607073914d675026e911a65c", size = 130361, upload-time = "2026-03-31T16:15:41.274Z" }, + { url = "https://files.pythonhosted.org/packages/5c/bb/a6c55896197f97b6d4b4e7c7fd77e7235517c34f5d6ad5aadd43c54c6d7c/orjson-3.11.8-cp313-cp313-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:1ab359aff0436d80bfe8a23b46b5fea69f1e18aaf1760a709b4787f1318b317f", size = 135521, upload-time = "2026-03-31T16:15:42.758Z" }, + { url = "https://files.pythonhosted.org/packages/9c/7c/ca3a3525aa32ff636ebb1778e77e3587b016ab2edb1b618b36ba96f8f2c0/orjson-3.11.8-cp313-cp313-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:f89b6d0b3a8d81e1929d3ab3d92bbc225688bd80a770c49432543928fe09ac55", size = 146862, upload-time = "2026-03-31T16:15:44.341Z" }, + { url = "https://files.pythonhosted.org/packages/3c/0c/18a9d7f18b5edd37344d1fd5be17e94dc652c67826ab749c6e5948a78112/orjson-3.11.8-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:29c009e7a2ca9ad0ed1376ce20dd692146a5d9fe4310848904b6b4fee5c5c137", size = 132847, upload-time = "2026-03-31T16:15:46.368Z" }, + { url = "https://files.pythonhosted.org/packages/23/91/7e722f352ad67ca573cee44de2a58fb810d0f4eb4e33276c6a557979fd8a/orjson-3.11.8-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:705b895b781b3e395c067129d8551655642dfe9437273211d5404e87ac752b53", size = 133637, upload-time = "2026-03-31T16:15:48.123Z" }, + { url = "https://files.pythonhosted.org/packages/af/04/32845ce13ac5bd1046ddb02ac9432ba856cc35f6d74dde95864fe0ad5523/orjson-3.11.8-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:88006eda83858a9fdf73985ce3804e885c2befb2f506c9a3723cdeb5a2880e3e", size = 141906, upload-time = "2026-03-31T16:15:49.626Z" }, + { url = "https://files.pythonhosted.org/packages/02/5e/c551387ddf2d7106d9039369862245c85738b828844d13b99ccb8d61fd06/orjson-3.11.8-cp313-cp313-musllinux_1_2_armv7l.whl", hash = "sha256:55120759e61309af7fcf9e961c6f6af3dde5921cdb3ee863ef63fd9db126cae6", size = 423722, upload-time = "2026-03-31T16:15:51.176Z" }, + { url = "https://files.pythonhosted.org/packages/00/a3/ecfe62434096f8a794d4976728cb59bcfc4a643977f21c2040545d37eb4c/orjson-3.11.8-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:98bdc6cb889d19bed01de46e67574a2eab61f5cc6b768ed50e8ac68e9d6ffab6", size = 147801, upload-time = "2026-03-31T16:15:52.939Z" }, + { url = "https://files.pythonhosted.org/packages/18/6d/0dce10b9f6643fdc59d99333871a38fa5a769d8e2fc34a18e5d2bfdee900/orjson-3.11.8-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:708c95f925a43ab9f34625e45dcdadf09ec8a6e7b664a938f2f8d5650f6c090b", size = 136460, upload-time = "2026-03-31T16:15:54.431Z" }, + { url = "https://files.pythonhosted.org/packages/01/d6/6dde4f31842d87099238f1f07b459d24edc1a774d20687187443ab044191/orjson-3.11.8-cp313-cp313-win32.whl", hash = "sha256:01c4e5a6695dc09098f2e6468a251bc4671c50922d4d745aff1a0a33a0cf5b8d", size = 131956, upload-time = "2026-03-31T16:15:56.081Z" }, + { url = "https://files.pythonhosted.org/packages/c1/f9/4e494a56e013db957fb77186b818b916d4695b8fa2aa612364974160e91b/orjson-3.11.8-cp313-cp313-win_amd64.whl", hash = "sha256:c154a35dd1330707450bb4d4e7dd1f17fa6f42267a40c1e8a1daa5e13719b4b8", size = 127410, upload-time = "2026-03-31T16:15:57.54Z" }, + { url = "https://files.pythonhosted.org/packages/57/7f/803203d00d6edb6e9e7eef421d4e1adbb5ea973e40b3533f3cfd9aeb374e/orjson-3.11.8-cp313-cp313-win_arm64.whl", hash = "sha256:4861bde57f4d253ab041e374f44023460e60e71efaa121f3c5f0ed457c3a701e", size = 127338, upload-time = "2026-03-31T16:15:59.106Z" }, + { url = "https://files.pythonhosted.org/packages/6d/35/b01910c3d6b85dc882442afe5060cbf719c7d1fc85749294beda23d17873/orjson-3.11.8-cp314-cp314-macosx_10_15_x86_64.macosx_11_0_arm64.macosx_10_15_universal2.whl", hash = "sha256:ec795530a73c269a55130498842aaa762e4a939f6ce481a7e986eeaa790e9da4", size = 229171, upload-time = "2026-03-31T16:16:00.651Z" }, + { url = "https://files.pythonhosted.org/packages/c2/56/c9ec97bd11240abef39b9e5d99a15462809c45f677420fd148a6c5e6295e/orjson-3.11.8-cp314-cp314-macosx_15_0_arm64.whl", hash = "sha256:c492a0e011c0f9066e9ceaa896fbc5b068c54d365fea5f3444b697ee01bc8625", size = 128746, upload-time = "2026-03-31T16:16:02.673Z" }, + { url = "https://files.pythonhosted.org/packages/3b/e4/66d4f30a90de45e2f0cbd9623588e8ae71eef7679dbe2ae954ed6d66a41f/orjson-3.11.8-cp314-cp314-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:883206d55b1bd5f5679ad5e6ddd3d1a5e3cac5190482927fdb8c78fb699193b5", size = 131867, upload-time = "2026-03-31T16:16:04.342Z" }, + { url = "https://files.pythonhosted.org/packages/19/30/2a645fc9286b928675e43fa2a3a16fb7b6764aa78cc719dc82141e00f30b/orjson-3.11.8-cp314-cp314-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:5774c1fdcc98b2259800b683b19599c133baeb11d60033e2095fd9d4667b82db", size = 124664, upload-time = "2026-03-31T16:16:05.837Z" }, + { url = "https://files.pythonhosted.org/packages/db/44/77b9a86d84a28d52ba3316d77737f6514e17118119ade3f91b639e859029/orjson-3.11.8-cp314-cp314-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:8ac7381c83dd3d4a6347e6635950aa448f54e7b8406a27c7ecb4a37e9f1ae08b", size = 129701, upload-time = "2026-03-31T16:16:07.407Z" }, + { url = "https://files.pythonhosted.org/packages/b3/ea/eff3d9bfe47e9bc6969c9181c58d9f71237f923f9c86a2d2f490cd898c82/orjson-3.11.8-cp314-cp314-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:14439063aebcb92401c11afc68ee4e407258d2752e62d748b6942dad20d2a70d", size = 141202, upload-time = "2026-03-31T16:16:09.48Z" }, + { url = "https://files.pythonhosted.org/packages/52/c8/90d4b4c60c84d62068d0cf9e4d8f0a4e05e76971d133ac0c60d818d4db20/orjson-3.11.8-cp314-cp314-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:fa72e71977bff96567b0f500fc5bfd2fdf915f34052c782a4c6ebbdaa97aa858", size = 127194, upload-time = "2026-03-31T16:16:11.02Z" }, + { url = "https://files.pythonhosted.org/packages/8d/c7/ea9e08d1f0ba981adffb629811148b44774d935171e7b3d780ae43c4c254/orjson-3.11.8-cp314-cp314-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:7679bc2f01bb0d219758f1a5f87bb7c8a81c0a186824a393b366876b4948e14f", size = 133639, upload-time = "2026-03-31T16:16:13.434Z" }, + { url = "https://files.pythonhosted.org/packages/6c/8c/ddbbfd6ba59453c8fc7fe1d0e5983895864e264c37481b2a791db635f046/orjson-3.11.8-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:14f7b8fcb35ef403b42fa5ecfa4ed032332a91f3dc7368fbce4184d59e1eae0d", size = 141914, upload-time = "2026-03-31T16:16:14.955Z" }, + { url = "https://files.pythonhosted.org/packages/4e/31/dbfbefec9df060d34ef4962cd0afcb6fa7a9ec65884cb78f04a7859526c3/orjson-3.11.8-cp314-cp314-musllinux_1_2_armv7l.whl", hash = "sha256:c2bdf7b2facc80b5e34f48a2d557727d5c5c57a8a450de122ae81fa26a81c1bc", size = 423800, upload-time = "2026-03-31T16:16:16.594Z" }, + { url = "https://files.pythonhosted.org/packages/87/cf/f74e9ae9803d4ab46b163494adba636c6d7ea955af5cc23b8aaa94cfd528/orjson-3.11.8-cp314-cp314-musllinux_1_2_i686.whl", hash = "sha256:ccd7ba1b0605813a0715171d39ec4c314cb97a9c85893c2c5c0c3a3729df38bf", size = 147837, upload-time = "2026-03-31T16:16:18.585Z" }, + { url = "https://files.pythonhosted.org/packages/64/e6/9214f017b5db85e84e68602792f742e5dc5249e963503d1b356bee611e01/orjson-3.11.8-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:cdbc8c9c02463fef4d3c53a9ba3336d05496ec8e1f1c53326a1e4acc11f5c600", size = 136441, upload-time = "2026-03-31T16:16:20.151Z" }, + { url = "https://files.pythonhosted.org/packages/24/dd/3590348818f58f837a75fb969b04cdf187ae197e14d60b5e5a794a38b79d/orjson-3.11.8-cp314-cp314-win32.whl", hash = "sha256:0b57f67710a8cd459e4e54eb96d5f77f3624eba0c661ba19a525807e42eccade", size = 131983, upload-time = "2026-03-31T16:16:21.823Z" }, + { url = "https://files.pythonhosted.org/packages/3f/0f/b6cb692116e05d058f31ceee819c70f097fa9167c82f67fabe7516289abc/orjson-3.11.8-cp314-cp314-win_amd64.whl", hash = "sha256:735e2262363dcbe05c35e3a8869898022af78f89dde9e256924dc02e99fe69ca", size = 127396, upload-time = "2026-03-31T16:16:23.685Z" }, + { url = "https://files.pythonhosted.org/packages/c0/d1/facb5b5051fabb0ef9d26c6544d87ef19a939a9a001198655d0d891062dd/orjson-3.11.8-cp314-cp314-win_arm64.whl", hash = "sha256:6ccdea2c213cf9f3d9490cbd5d427693c870753df41e6cb375bd79bcbafc8817", size = 127330, upload-time = "2026-03-31T16:16:25.496Z" }, +] + +[[package]] +name = "packaging" +version = "26.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/65/ee/299d360cdc32edc7d2cf530f3accf79c4fca01e96ffc950d8a52213bd8e4/packaging-26.0.tar.gz", hash = "sha256:00243ae351a257117b6a241061796684b084ed1c516a08c48a3f7e147a9d80b4", size = 143416, upload-time = "2026-01-21T20:50:39.064Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/b7/b9/c538f279a4e237a006a2c98387d081e9eb060d203d8ed34467cc0f0b9b53/packaging-26.0-py3-none-any.whl", hash = "sha256:b36f1fef9334a5588b4166f8bcd26a14e521f2b55e6b9de3aaa80d3ff7a37529", size = 74366, upload-time = "2026-01-21T20:50:37.788Z" }, +] + +[[package]] +name = "pandas" +version = "3.0.2" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "numpy" }, + { name = "python-dateutil" }, + { name = "tzdata", marker = "sys_platform == 'emscripten' or sys_platform == 'win32'" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/da/99/b342345300f13440fe9fe385c3c481e2d9a595ee3bab4d3219247ac94e9a/pandas-3.0.2.tar.gz", hash = "sha256:f4753e73e34c8d83221ba58f232433fca2748be8b18dbca02d242ed153945043", size = 4645855, upload-time = "2026-03-31T06:48:30.816Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/97/35/6411db530c618e0e0005187e35aa02ce60ae4c4c4d206964a2f978217c27/pandas-3.0.2-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:a727a73cbdba2f7458dc82449e2315899d5140b449015d822f515749a46cbbe0", size = 10326926, upload-time = "2026-03-31T06:46:08.29Z" }, + { url = "https://files.pythonhosted.org/packages/c4/d3/b7da1d5d7dbdc5ef52ed7debd2b484313b832982266905315dad5a0bf0b1/pandas-3.0.2-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:dbbd4aa20ca51e63b53bbde6a0fa4254b1aaabb74d2f542df7a7959feb1d760c", size = 9926987, upload-time = "2026-03-31T06:46:11.724Z" }, + { url = "https://files.pythonhosted.org/packages/52/77/9b1c2d6070b5dbe239a7bc889e21bfa58720793fb902d1e070695d87c6d0/pandas-3.0.2-cp311-cp311-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:339dda302bd8369dedeae979cb750e484d549b563c3f54f3922cb8ff4978c5eb", size = 10757067, upload-time = "2026-03-31T06:46:14.903Z" }, + { url = "https://files.pythonhosted.org/packages/20/17/ec40d981705654853726e7ac9aea9ddbb4a5d9cf54d8472222f4f3de06c2/pandas-3.0.2-cp311-cp311-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:61c2fd96d72b983a9891b2598f286befd4ad262161a609c92dc1652544b46b76", size = 11258787, upload-time = "2026-03-31T06:46:17.683Z" }, + { url = "https://files.pythonhosted.org/packages/90/e3/3f1126d43d3702ca8773871a81c9f15122a1f412342cc56284ffda5b1f70/pandas-3.0.2-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:c934008c733b8bbea273ea308b73b3156f0181e5b72960790b09c18a2794fe1e", size = 11771616, upload-time = "2026-03-31T06:46:20.532Z" }, + { url = "https://files.pythonhosted.org/packages/2e/cf/0f4e268e1f5062e44a6bda9f925806721cd4c95c2b808a4c82ebe914f96b/pandas-3.0.2-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:60a80bb4feacbef5e1447a3f82c33209c8b7e07f28d805cfd1fb951e5cb443aa", size = 12337623, upload-time = "2026-03-31T06:46:23.754Z" }, + { url = "https://files.pythonhosted.org/packages/44/a0/97a6339859d4acb2536efb24feb6708e82f7d33b2ed7e036f2983fcced82/pandas-3.0.2-cp311-cp311-win_amd64.whl", hash = "sha256:ed72cb3f45190874eb579c64fa92d9df74e98fd63e2be7f62bce5ace0ade61df", size = 9897372, upload-time = "2026-03-31T06:46:26.703Z" }, + { url = "https://files.pythonhosted.org/packages/8f/eb/781516b808a99ddf288143cec46b342b3016c3414d137da1fdc3290d8860/pandas-3.0.2-cp311-cp311-win_arm64.whl", hash = "sha256:f12b1a9e332c01e09510586f8ca9b108fd631fd656af82e452d7315ef6df5f9f", size = 9154922, upload-time = "2026-03-31T06:46:30.284Z" }, + { url = "https://files.pythonhosted.org/packages/f3/b0/c20bd4d6d3f736e6bd6b55794e9cd0a617b858eaad27c8f410ea05d953b7/pandas-3.0.2-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:232a70ebb568c0c4d2db4584f338c1577d81e3af63292208d615907b698a0f18", size = 10347921, upload-time = "2026-03-31T06:46:33.36Z" }, + { url = "https://files.pythonhosted.org/packages/35/d0/4831af68ce30cc2d03c697bea8450e3225a835ef497d0d70f31b8cdde965/pandas-3.0.2-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:970762605cff1ca0d3f71ed4f3a769ea8f85fc8e6348f6e110b8fea7e6eb5a14", size = 9888127, upload-time = "2026-03-31T06:46:36.253Z" }, + { url = "https://files.pythonhosted.org/packages/61/a9/16ea9346e1fc4a96e2896242d9bc674764fb9049b0044c0132502f7a771e/pandas-3.0.2-cp312-cp312-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:aff4e6f4d722e0652707d7bcb190c445fe58428500c6d16005b02401764b1b3d", size = 10399577, upload-time = "2026-03-31T06:46:39.224Z" }, + { url = "https://files.pythonhosted.org/packages/c4/a8/3a61a721472959ab0ce865ef05d10b0d6bfe27ce8801c99f33d4fa996e65/pandas-3.0.2-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:ef8b27695c3d3dc78403c9a7d5e59a62d5464a7e1123b4e0042763f7104dc74f", size = 10880030, upload-time = "2026-03-31T06:46:42.412Z" }, + { url = "https://files.pythonhosted.org/packages/da/65/7225c0ea4d6ce9cb2160a7fb7f39804871049f016e74782e5dade4d14109/pandas-3.0.2-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:f8d68083e49e16b84734eb1a4dcae4259a75c90fb6e2251ab9a00b61120c06ab", size = 11409468, upload-time = "2026-03-31T06:46:45.2Z" }, + { url = "https://files.pythonhosted.org/packages/fa/5b/46e7c76032639f2132359b5cf4c785dd8cf9aea5ea64699eac752f02b9db/pandas-3.0.2-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:32cc41f310ebd4a296d93515fcac312216adfedb1894e879303987b8f1e2b97d", size = 11936381, upload-time = "2026-03-31T06:46:48.293Z" }, + { url = "https://files.pythonhosted.org/packages/7b/8b/721a9cff6fa6a91b162eb51019c6243b82b3226c71bb6c8ef4a9bd65cbc6/pandas-3.0.2-cp312-cp312-win_amd64.whl", hash = "sha256:a4785e1d6547d8427c5208b748ae2efb64659a21bd82bf440d4262d02bfa02a4", size = 9744993, upload-time = "2026-03-31T06:46:51.488Z" }, + { url = "https://files.pythonhosted.org/packages/d5/18/7f0bd34ae27b28159aa80f2a6799f47fda34f7fb938a76e20c7b7fe3b200/pandas-3.0.2-cp312-cp312-win_arm64.whl", hash = "sha256:08504503f7101300107ecdc8df73658e4347586db5cfdadabc1592e9d7e7a0fd", size = 9056118, upload-time = "2026-03-31T06:46:54.548Z" }, + { url = "https://files.pythonhosted.org/packages/bf/ca/3e639a1ea6fcd0617ca4e8ca45f62a74de33a56ae6cd552735470b22c8d3/pandas-3.0.2-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:b5918ba197c951dec132b0c5929a00c0bf05d5942f590d3c10a807f6e15a57d3", size = 10321105, upload-time = "2026-03-31T06:46:57.327Z" }, + { url = "https://files.pythonhosted.org/packages/0b/77/dbc82ff2fb0e63c6564356682bf201edff0ba16c98630d21a1fb312a8182/pandas-3.0.2-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:d606a041c89c0a474a4702d532ab7e73a14fe35c8d427b972a625c8e46373668", size = 9864088, upload-time = "2026-03-31T06:46:59.935Z" }, + { url = "https://files.pythonhosted.org/packages/5c/2b/341f1b04bbca2e17e13cd3f08c215b70ef2c60c5356ef1e8c6857449edc7/pandas-3.0.2-cp313-cp313-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:710246ba0616e86891b58ab95f2495143bb2bc83ab6b06747c74216f583a6ac9", size = 10369066, upload-time = "2026-03-31T06:47:02.792Z" }, + { url = "https://files.pythonhosted.org/packages/12/c5/cbb1ffefb20a93d3f0e1fdcda699fb84976210d411b008f97f48bf6ce27e/pandas-3.0.2-cp313-cp313-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:5d3cfe227c725b1f3dff4278b43d8c784656a42a9325b63af6b1492a8232209e", size = 10876780, upload-time = "2026-03-31T06:47:06.205Z" }, + { url = "https://files.pythonhosted.org/packages/98/fe/2249ae5e0a69bd0ddf17353d0a5d26611d70970111f5b3600cdc8be883e7/pandas-3.0.2-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:c3b723df9087a9a9a840e263ebd9f88b64a12075d1bf2ea401a5a42f254f084d", size = 11375181, upload-time = "2026-03-31T06:47:09.383Z" }, + { url = "https://files.pythonhosted.org/packages/de/64/77a38b09e70b6464883b8d7584ab543e748e42c1b5d337a2ee088e0df741/pandas-3.0.2-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:a3096110bf9eac0070b7208465f2740e2d8a670d5cb6530b5bb884eca495fd39", size = 11928899, upload-time = "2026-03-31T06:47:12.686Z" }, + { url = "https://files.pythonhosted.org/packages/5e/52/42855bf626868413f761addd574acc6195880ae247a5346477a4361c3acb/pandas-3.0.2-cp313-cp313-win_amd64.whl", hash = "sha256:07a10f5c36512eead51bc578eb3354ad17578b22c013d89a796ab5eee90cd991", size = 9746574, upload-time = "2026-03-31T06:47:15.64Z" }, + { url = "https://files.pythonhosted.org/packages/88/39/21304ae06a25e8bf9fc820d69b29b2c495b2ae580d1e143146c309941760/pandas-3.0.2-cp313-cp313-win_arm64.whl", hash = "sha256:5fdbfa05931071aba28b408e59226186b01eb5e92bea2ab78b65863ca3228d84", size = 9047156, upload-time = "2026-03-31T06:47:18.595Z" }, + { url = "https://files.pythonhosted.org/packages/72/20/7defa8b27d4f330a903bb68eea33be07d839c5ea6bdda54174efcec0e1d2/pandas-3.0.2-cp313-cp313t-macosx_10_13_x86_64.whl", hash = "sha256:dbc20dea3b9e27d0e66d74c42b2d0c1bed9c2ffe92adea33633e3bedeb5ac235", size = 10756238, upload-time = "2026-03-31T06:47:22.012Z" }, + { url = "https://files.pythonhosted.org/packages/e9/95/49433c14862c636afc0e9b2db83ff16b3ad92959364e52b2955e44c8e94c/pandas-3.0.2-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:b75c347eff42497452116ce05ef461822d97ce5b9ff8df6edacb8076092c855d", size = 10408520, upload-time = "2026-03-31T06:47:25.197Z" }, + { url = "https://files.pythonhosted.org/packages/3b/f8/462ad2b5881d6b8ec8e5f7ed2ea1893faa02290d13870a1600fe72ad8efc/pandas-3.0.2-cp313-cp313t-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:d1478075142e83a5571782ad007fb201ed074bdeac7ebcc8890c71442e96adf7", size = 10324154, upload-time = "2026-03-31T06:47:28.097Z" }, + { url = "https://files.pythonhosted.org/packages/0a/65/d1e69b649cbcddda23ad6e4c40ef935340f6f652a006e5cbc3555ac8adb3/pandas-3.0.2-cp313-cp313t-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:5880314e69e763d4c8b27937090de570f1fb8d027059a7ada3f7f8e98bdcb677", size = 10714449, upload-time = "2026-03-31T06:47:30.85Z" }, + { url = "https://files.pythonhosted.org/packages/47/a4/85b59bc65b8190ea3689882db6cdf32a5003c0ccd5a586c30fdcc3ffc4fc/pandas-3.0.2-cp313-cp313t-musllinux_1_2_aarch64.whl", hash = "sha256:b5329e26898896f06035241a626d7c335daa479b9bbc82be7c2742d048e41172", size = 11338475, upload-time = "2026-03-31T06:47:34.026Z" }, + { url = "https://files.pythonhosted.org/packages/1e/c4/bc6966c6e38e5d9478b935272d124d80a589511ed1612a5d21d36f664c68/pandas-3.0.2-cp313-cp313t-musllinux_1_2_x86_64.whl", hash = "sha256:81526c4afd31971f8b62671442a4b2b51e0aa9acc3819c9f0f12a28b6fcf85f1", size = 11786568, upload-time = "2026-03-31T06:47:36.941Z" }, + { url = "https://files.pythonhosted.org/packages/e8/74/09298ca9740beed1d3504e073d67e128aa07e5ca5ca2824b0c674c0b8676/pandas-3.0.2-cp313-cp313t-win_amd64.whl", hash = "sha256:7cadd7e9a44ec13b621aec60f9150e744cfc7a3dd32924a7e2f45edff31823b0", size = 10488652, upload-time = "2026-03-31T06:47:40.612Z" }, + { url = "https://files.pythonhosted.org/packages/bb/40/c6ea527147c73b24fc15c891c3fcffe9c019793119c5742b8784a062c7db/pandas-3.0.2-cp314-cp314-macosx_10_15_x86_64.whl", hash = "sha256:db0dbfd2a6cdf3770aa60464d50333d8f3d9165b2f2671bcc299b72de5a6677b", size = 10326084, upload-time = "2026-03-31T06:47:43.834Z" }, + { url = "https://files.pythonhosted.org/packages/95/25/bdb9326c3b5455f8d4d3549fce7abcf967259de146fe2cf7a82368141948/pandas-3.0.2-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:0555c5882688a39317179ab4a0ed41d3ebc8812ab14c69364bbee8fb7a3f6288", size = 9914146, upload-time = "2026-03-31T06:47:46.67Z" }, + { url = "https://files.pythonhosted.org/packages/8d/77/3a227ff3337aa376c60d288e1d61c5d097131d0ac71f954d90a8f369e422/pandas-3.0.2-cp314-cp314-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:01f31a546acd5574ef77fe199bc90b55527c225c20ccda6601cf6b0fd5ed597c", size = 10444081, upload-time = "2026-03-31T06:47:49.681Z" }, + { url = "https://files.pythonhosted.org/packages/15/88/3cdd54fa279341afa10acf8d2b503556b1375245dccc9315659f795dd2e9/pandas-3.0.2-cp314-cp314-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:deeca1b5a931fdf0c2212c8a659ade6d3b1edc21f0914ce71ef24456ca7a6535", size = 10897535, upload-time = "2026-03-31T06:47:53.033Z" }, + { url = "https://files.pythonhosted.org/packages/06/9d/98cc7a7624f7932e40f434299260e2917b090a579d75937cb8a57b9d2de3/pandas-3.0.2-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:0f48afd9bb13300ffb5a3316973324c787054ba6665cda0da3fbd67f451995db", size = 11446992, upload-time = "2026-03-31T06:47:56.193Z" }, + { url = "https://files.pythonhosted.org/packages/9a/cd/19ff605cc3760e80602e6826ddef2824d8e7050ed80f2e11c4b079741dc3/pandas-3.0.2-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:6c4d8458b97a35717b62469a4ea0e85abd5ed8687277f5ccfc67f8a5126f8c53", size = 11968257, upload-time = "2026-03-31T06:47:59.137Z" }, + { url = "https://files.pythonhosted.org/packages/db/60/aba6a38de456e7341285102bede27514795c1eaa353bc0e7638b6b785356/pandas-3.0.2-cp314-cp314-win_amd64.whl", hash = "sha256:b35d14bb5d8285d9494fe93815a9e9307c0876e10f1e8e89ac5b88f728ec8dcf", size = 9865893, upload-time = "2026-03-31T06:48:02.038Z" }, + { url = "https://files.pythonhosted.org/packages/08/71/e5ec979dd2e8a093dacb8864598c0ff59a0cee0bbcdc0bfec16a51684d4f/pandas-3.0.2-cp314-cp314-win_arm64.whl", hash = "sha256:63d141b56ef686f7f0d714cfb8de4e320475b86bf4b620aa0b7da89af8cbdbbb", size = 9188644, upload-time = "2026-03-31T06:48:05.045Z" }, + { url = "https://files.pythonhosted.org/packages/f1/6c/7b45d85db19cae1eb524f2418ceaa9d85965dcf7b764ed151386b7c540f0/pandas-3.0.2-cp314-cp314t-macosx_10_15_x86_64.whl", hash = "sha256:140f0cffb1fa2524e874dde5b477d9defe10780d8e9e220d259b2c0874c89d9d", size = 10776246, upload-time = "2026-03-31T06:48:07.789Z" }, + { url = "https://files.pythonhosted.org/packages/a8/3e/7b00648b086c106e81766f25322b48aa8dfa95b55e621dbdf2fdd413a117/pandas-3.0.2-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:ae37e833ff4fed0ba352f6bdd8b73ba3ab3256a85e54edfd1ab51ae40cca0af8", size = 10424801, upload-time = "2026-03-31T06:48:10.897Z" }, + { url = "https://files.pythonhosted.org/packages/da/6e/558dd09a71b53b4008e7fc8a98ec6d447e9bfb63cdaeea10e5eb9b2dabe8/pandas-3.0.2-cp314-cp314t-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:4d888a5c678a419a5bb41a2a93818e8ed9fd3172246555c0b37b7cc27027effd", size = 10345643, upload-time = "2026-03-31T06:48:13.7Z" }, + { url = "https://files.pythonhosted.org/packages/be/e3/921c93b4d9a280409451dc8d07b062b503bbec0531d2627e73a756e99a82/pandas-3.0.2-cp314-cp314t-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:b444dc64c079e84df91baa8bf613d58405645461cabca929d9178f2cd392398d", size = 10743641, upload-time = "2026-03-31T06:48:16.659Z" }, + { url = "https://files.pythonhosted.org/packages/56/ca/fd17286f24fa3b4d067965d8d5d7e14fe557dd4f979a0b068ac0deaf8228/pandas-3.0.2-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:4544c7a54920de8eeacaa1466a6b7268ecfbc9bc64ab4dbb89c6bbe94d5e0660", size = 11361993, upload-time = "2026-03-31T06:48:19.475Z" }, + { url = "https://files.pythonhosted.org/packages/e4/a5/2f6ed612056819de445a433ca1f2821ac3dab7f150d569a59e9cc105de1d/pandas-3.0.2-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:734be7551687c00fbd760dc0522ed974f82ad230d4a10f54bf51b80d44a08702", size = 11815274, upload-time = "2026-03-31T06:48:22.695Z" }, + { url = "https://files.pythonhosted.org/packages/00/2f/b622683e99ec3ce00b0854bac9e80868592c5b051733f2cf3a868e5fea26/pandas-3.0.2-cp314-cp314t-win_amd64.whl", hash = "sha256:57a07209bebcbcf768d2d13c9b78b852f9a15978dac41b9e6421a81ad4cdd276", size = 10888530, upload-time = "2026-03-31T06:48:25.806Z" }, + { url = "https://files.pythonhosted.org/packages/cb/2b/f8434233fab2bd66a02ec014febe4e5adced20e2693e0e90a07d118ed30e/pandas-3.0.2-cp314-cp314t-win_arm64.whl", hash = "sha256:5371b72c2d4d415d08765f32d689217a43227484e81b2305b52076e328f6f482", size = 9455341, upload-time = "2026-03-31T06:48:28.418Z" }, +] + +[[package]] +name = "pathable" +version = "0.5.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/72/55/b748445cb4ea6b125626f15379be7c96d1035d4fa3e8fee362fa92298abf/pathable-0.5.0.tar.gz", hash = "sha256:d81938348a1cacb525e7c75166270644782c0fb9c8cecc16be033e71427e0ef1", size = 16655, upload-time = "2026-02-20T08:47:00.748Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/52/96/5a770e5c461462575474468e5af931cff9de036e7c2b4fea23c1c58d2cbe/pathable-0.5.0-py3-none-any.whl", hash = "sha256:646e3d09491a6351a0c82632a09c02cdf70a252e73196b36d8a15ba0a114f0a6", size = 16867, upload-time = "2026-02-20T08:46:59.536Z" }, +] + +[[package]] +name = "pillow" +version = "12.2.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/8c/21/c2bcdd5906101a30244eaffc1b6e6ce71a31bd0742a01eb89e660ebfac2d/pillow-12.2.0.tar.gz", hash = "sha256:a830b1a40919539d07806aa58e1b114df53ddd43213d9c8b75847eee6c0182b5", size = 46987819, upload-time = "2026-04-01T14:46:17.687Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/68/e1/748f5663efe6edcfc4e74b2b93edfb9b8b99b67f21a854c3ae416500a2d9/pillow-12.2.0-cp311-cp311-macosx_10_10_x86_64.whl", hash = "sha256:8be29e59487a79f173507c30ddf57e733a357f67881430449bb32614075a40ab", size = 5354347, upload-time = "2026-04-01T14:42:44.255Z" }, + { url = "https://files.pythonhosted.org/packages/47/a1/d5ff69e747374c33a3b53b9f98cca7889fce1fd03d79cdc4e1bccc6c5a87/pillow-12.2.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:71cde9a1e1551df7d34a25462fc60325e8a11a82cc2e2f54578e5e9a1e153d65", size = 4695873, upload-time = "2026-04-01T14:42:46.452Z" }, + { url = "https://files.pythonhosted.org/packages/df/21/e3fbdf54408a973c7f7f89a23b2cb97a7ef30c61ab4142af31eee6aebc88/pillow-12.2.0-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:f490f9368b6fc026f021db16d7ec2fbf7d89e2edb42e8ec09d2c60505f5729c7", size = 6280168, upload-time = "2026-04-01T14:42:49.228Z" }, + { url = "https://files.pythonhosted.org/packages/d3/f1/00b7278c7dd52b17ad4329153748f87b6756ec195ff786c2bdf12518337d/pillow-12.2.0-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:8bd7903a5f2a4545f6fd5935c90058b89d30045568985a71c79f5fd6edf9b91e", size = 8088188, upload-time = "2026-04-01T14:42:51.735Z" }, + { url = "https://files.pythonhosted.org/packages/ad/cf/220a5994ef1b10e70e85748b75649d77d506499352be135a4989c957b701/pillow-12.2.0-cp311-cp311-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:3997232e10d2920a68d25191392e3a4487d8183039e1c74c2297f00ed1c50705", size = 6394401, upload-time = "2026-04-01T14:42:54.343Z" }, + { url = "https://files.pythonhosted.org/packages/e9/bd/e51a61b1054f09437acfbc2ff9106c30d1eb76bc1453d428399946781253/pillow-12.2.0-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:e74473c875d78b8e9d5da2a70f7099549f9eb37ded4e2f6a463e60125bccd176", size = 7079655, upload-time = "2026-04-01T14:42:56.954Z" }, + { url = "https://files.pythonhosted.org/packages/6b/3d/45132c57d5fb4b5744567c3817026480ac7fc3ce5d4c47902bc0e7f6f853/pillow-12.2.0-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:56a3f9c60a13133a98ecff6197af34d7824de9b7b38c3654861a725c970c197b", size = 6503105, upload-time = "2026-04-01T14:42:59.847Z" }, + { url = "https://files.pythonhosted.org/packages/7d/2e/9df2fc1e82097b1df3dce58dc43286aa01068e918c07574711fcc53e6fb4/pillow-12.2.0-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:90e6f81de50ad6b534cab6e5aef77ff6e37722b2f5d908686f4a5c9eba17a909", size = 7203402, upload-time = "2026-04-01T14:43:02.664Z" }, + { url = "https://files.pythonhosted.org/packages/bd/2e/2941e42858ebb67e50ae741473de81c2984e6eff7b397017623c676e2e8d/pillow-12.2.0-cp311-cp311-win32.whl", hash = "sha256:8c984051042858021a54926eb597d6ee3012393ce9c181814115df4c60b9a808", size = 6378149, upload-time = "2026-04-01T14:43:05.274Z" }, + { url = "https://files.pythonhosted.org/packages/69/42/836b6f3cd7f3e5fa10a1f1a5420447c17966044c8fbf589cc0452d5502db/pillow-12.2.0-cp311-cp311-win_amd64.whl", hash = "sha256:6e6b2a0c538fc200b38ff9eb6628228b77908c319a005815f2dde585a0664b60", size = 7082626, upload-time = "2026-04-01T14:43:08.557Z" }, + { url = "https://files.pythonhosted.org/packages/c2/88/549194b5d6f1f494b485e493edc6693c0a16f4ada488e5bd974ed1f42fad/pillow-12.2.0-cp311-cp311-win_arm64.whl", hash = "sha256:9a8a34cc89c67a65ea7437ce257cea81a9dad65b29805f3ecee8c8fe8ff25ffe", size = 2463531, upload-time = "2026-04-01T14:43:10.743Z" }, + { url = "https://files.pythonhosted.org/packages/58/be/7482c8a5ebebbc6470b3eb791812fff7d5e0216c2be3827b30b8bb6603ed/pillow-12.2.0-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:2d192a155bbcec180f8564f693e6fd9bccff5a7af9b32e2e4bf8c9c69dbad6b5", size = 5308279, upload-time = "2026-04-01T14:43:13.246Z" }, + { url = "https://files.pythonhosted.org/packages/d8/95/0a351b9289c2b5cbde0bacd4a83ebc44023e835490a727b2a3bd60ddc0f4/pillow-12.2.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:f3f40b3c5a968281fd507d519e444c35f0ff171237f4fdde090dd60699458421", size = 4695490, upload-time = "2026-04-01T14:43:15.584Z" }, + { url = "https://files.pythonhosted.org/packages/de/af/4e8e6869cbed569d43c416fad3dc4ecb944cb5d9492defaed89ddd6fe871/pillow-12.2.0-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:03e7e372d5240cc23e9f07deca4d775c0817bffc641b01e9c3af208dbd300987", size = 6284462, upload-time = "2026-04-01T14:43:18.268Z" }, + { url = "https://files.pythonhosted.org/packages/e9/9e/c05e19657fd57841e476be1ab46c4d501bffbadbafdc31a6d665f8b737b6/pillow-12.2.0-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:b86024e52a1b269467a802258c25521e6d742349d760728092e1bc2d135b4d76", size = 8094744, upload-time = "2026-04-01T14:43:20.716Z" }, + { url = "https://files.pythonhosted.org/packages/2b/54/1789c455ed10176066b6e7e6da1b01e50e36f94ba584dc68d9eebfe9156d/pillow-12.2.0-cp312-cp312-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:7371b48c4fa448d20d2714c9a1f775a81155050d383333e0a6c15b1123dda005", size = 6398371, upload-time = "2026-04-01T14:43:23.443Z" }, + { url = "https://files.pythonhosted.org/packages/43/e3/fdc657359e919462369869f1c9f0e973f353f9a9ee295a39b1fea8ee1a77/pillow-12.2.0-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:62f5409336adb0663b7caa0da5c7d9e7bdbaae9ce761d34669420c2a801b2780", size = 7087215, upload-time = "2026-04-01T14:43:26.758Z" }, + { url = "https://files.pythonhosted.org/packages/8b/f8/2f6825e441d5b1959d2ca5adec984210f1ec086435b0ed5f52c19b3b8a6e/pillow-12.2.0-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:01afa7cf67f74f09523699b4e88c73fb55c13346d212a59a2db1f86b0a63e8c5", size = 6509783, upload-time = "2026-04-01T14:43:29.56Z" }, + { url = "https://files.pythonhosted.org/packages/67/f9/029a27095ad20f854f9dba026b3ea6428548316e057e6fc3545409e86651/pillow-12.2.0-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:fc3d34d4a8fbec3e88a79b92e5465e0f9b842b628675850d860b8bd300b159f5", size = 7212112, upload-time = "2026-04-01T14:43:32.091Z" }, + { url = "https://files.pythonhosted.org/packages/be/42/025cfe05d1be22dbfdb4f264fe9de1ccda83f66e4fc3aac94748e784af04/pillow-12.2.0-cp312-cp312-win32.whl", hash = "sha256:58f62cc0f00fd29e64b29f4fd923ffdb3859c9f9e6105bfc37ba1d08994e8940", size = 6378489, upload-time = "2026-04-01T14:43:34.601Z" }, + { url = "https://files.pythonhosted.org/packages/5d/7b/25a221d2c761c6a8ae21bfa3874988ff2583e19cf8a27bf2fee358df7942/pillow-12.2.0-cp312-cp312-win_amd64.whl", hash = "sha256:7f84204dee22a783350679a0333981df803dac21a0190d706a50475e361c93f5", size = 7084129, upload-time = "2026-04-01T14:43:37.213Z" }, + { url = "https://files.pythonhosted.org/packages/10/e1/542a474affab20fd4a0f1836cb234e8493519da6b76899e30bcc5d990b8b/pillow-12.2.0-cp312-cp312-win_arm64.whl", hash = "sha256:af73337013e0b3b46f175e79492d96845b16126ddf79c438d7ea7ff27783a414", size = 2463612, upload-time = "2026-04-01T14:43:39.421Z" }, + { url = "https://files.pythonhosted.org/packages/4a/01/53d10cf0dbad820a8db274d259a37ba50b88b24768ddccec07355382d5ad/pillow-12.2.0-cp313-cp313-ios_13_0_arm64_iphoneos.whl", hash = "sha256:8297651f5b5679c19968abefd6bb84d95fe30ef712eb1b2d9b2d31ca61267f4c", size = 4100837, upload-time = "2026-04-01T14:43:41.506Z" }, + { url = "https://files.pythonhosted.org/packages/0f/98/f3a6657ecb698c937f6c76ee564882945f29b79bad496abcba0e84659ec5/pillow-12.2.0-cp313-cp313-ios_13_0_arm64_iphonesimulator.whl", hash = "sha256:50d8520da2a6ce0af445fa6d648c4273c3eeefbc32d7ce049f22e8b5c3daecc2", size = 4176528, upload-time = "2026-04-01T14:43:43.773Z" }, + { url = "https://files.pythonhosted.org/packages/69/bc/8986948f05e3ea490b8442ea1c1d4d990b24a7e43d8a51b2c7d8b1dced36/pillow-12.2.0-cp313-cp313-ios_13_0_x86_64_iphonesimulator.whl", hash = "sha256:766cef22385fa1091258ad7e6216792b156dc16d8d3fa607e7545b2b72061f1c", size = 3640401, upload-time = "2026-04-01T14:43:45.87Z" }, + { url = "https://files.pythonhosted.org/packages/34/46/6c717baadcd62bc8ed51d238d521ab651eaa74838291bda1f86fe1f864c9/pillow-12.2.0-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:5d2fd0fa6b5d9d1de415060363433f28da8b1526c1c129020435e186794b3795", size = 5308094, upload-time = "2026-04-01T14:43:48.438Z" }, + { url = "https://files.pythonhosted.org/packages/71/43/905a14a8b17fdb1ccb58d282454490662d2cb89a6bfec26af6d3520da5ec/pillow-12.2.0-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:56b25336f502b6ed02e889f4ece894a72612fe885889a6e8c4c80239ff6e5f5f", size = 4695402, upload-time = "2026-04-01T14:43:51.292Z" }, + { url = "https://files.pythonhosted.org/packages/73/dd/42107efcb777b16fa0393317eac58f5b5cf30e8392e266e76e51cff28c3d/pillow-12.2.0-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:f1c943e96e85df3d3478f7b691f229887e143f81fedab9b20205349ab04d73ed", size = 6280005, upload-time = "2026-04-01T14:43:54.242Z" }, + { url = "https://files.pythonhosted.org/packages/a8/68/b93e09e5e8549019e61acf49f65b1a8530765a7f812c77a7461bca7e4494/pillow-12.2.0-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:03f6fab9219220f041c74aeaa2939ff0062bd5c364ba9ce037197f4c6d498cd9", size = 8090669, upload-time = "2026-04-01T14:43:57.335Z" }, + { url = "https://files.pythonhosted.org/packages/4b/6e/3ccb54ce8ec4ddd1accd2d89004308b7b0b21c4ac3d20fa70af4760a4330/pillow-12.2.0-cp313-cp313-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:5cdfebd752ec52bf5bb4e35d9c64b40826bc5b40a13df7c3cda20a2c03a0f5ed", size = 6395194, upload-time = "2026-04-01T14:43:59.864Z" }, + { url = "https://files.pythonhosted.org/packages/67/ee/21d4e8536afd1a328f01b359b4d3997b291ffd35a237c877b331c1c3b71c/pillow-12.2.0-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:eedf4b74eda2b5a4b2b2fb4c006d6295df3bf29e459e198c90ea48e130dc75c3", size = 7082423, upload-time = "2026-04-01T14:44:02.74Z" }, + { url = "https://files.pythonhosted.org/packages/78/5f/e9f86ab0146464e8c133fe85df987ed9e77e08b29d8d35f9f9f4d6f917ba/pillow-12.2.0-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:00a2865911330191c0b818c59103b58a5e697cae67042366970a6b6f1b20b7f9", size = 6505667, upload-time = "2026-04-01T14:44:05.381Z" }, + { url = "https://files.pythonhosted.org/packages/ed/1e/409007f56a2fdce61584fd3acbc2bbc259857d555196cedcadc68c015c82/pillow-12.2.0-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:1e1757442ed87f4912397c6d35a0db6a7b52592156014706f17658ff58bbf795", size = 7208580, upload-time = "2026-04-01T14:44:08.39Z" }, + { url = "https://files.pythonhosted.org/packages/23/c4/7349421080b12fb35414607b8871e9534546c128a11965fd4a7002ccfbee/pillow-12.2.0-cp313-cp313-win32.whl", hash = "sha256:144748b3af2d1b358d41286056d0003f47cb339b8c43a9ea42f5fea4d8c66b6e", size = 6375896, upload-time = "2026-04-01T14:44:11.197Z" }, + { url = "https://files.pythonhosted.org/packages/3f/82/8a3739a5e470b3c6cbb1d21d315800d8e16bff503d1f16b03a4ec3212786/pillow-12.2.0-cp313-cp313-win_amd64.whl", hash = "sha256:390ede346628ccc626e5730107cde16c42d3836b89662a115a921f28440e6a3b", size = 7081266, upload-time = "2026-04-01T14:44:13.947Z" }, + { url = "https://files.pythonhosted.org/packages/c3/25/f968f618a062574294592f668218f8af564830ccebdd1fa6200f598e65c5/pillow-12.2.0-cp313-cp313-win_arm64.whl", hash = "sha256:8023abc91fba39036dbce14a7d6535632f99c0b857807cbbbf21ecc9f4717f06", size = 2463508, upload-time = "2026-04-01T14:44:16.312Z" }, + { url = "https://files.pythonhosted.org/packages/4d/a4/b342930964e3cb4dce5038ae34b0eab4653334995336cd486c5a8c25a00c/pillow-12.2.0-cp313-cp313t-macosx_10_13_x86_64.whl", hash = "sha256:042db20a421b9bafecc4b84a8b6e444686bd9d836c7fd24542db3e7df7baad9b", size = 5309927, upload-time = "2026-04-01T14:44:18.89Z" }, + { url = "https://files.pythonhosted.org/packages/9f/de/23198e0a65a9cf06123f5435a5d95cea62a635697f8f03d134d3f3a96151/pillow-12.2.0-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:dd025009355c926a84a612fecf58bb315a3f6814b17ead51a8e48d3823d9087f", size = 4698624, upload-time = "2026-04-01T14:44:21.115Z" }, + { url = "https://files.pythonhosted.org/packages/01/a6/1265e977f17d93ea37aa28aa81bad4fa597933879fac2520d24e021c8da3/pillow-12.2.0-cp313-cp313t-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:88ddbc66737e277852913bd1e07c150cc7bb124539f94c4e2df5344494e0a612", size = 6321252, upload-time = "2026-04-01T14:44:23.663Z" }, + { url = "https://files.pythonhosted.org/packages/3c/83/5982eb4a285967baa70340320be9f88e57665a387e3a53a7f0db8231a0cd/pillow-12.2.0-cp313-cp313t-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:d362d1878f00c142b7e1a16e6e5e780f02be8195123f164edf7eddd911eefe7c", size = 8126550, upload-time = "2026-04-01T14:44:26.772Z" }, + { url = "https://files.pythonhosted.org/packages/4e/48/6ffc514adce69f6050d0753b1a18fd920fce8cac87620d5a31231b04bfc5/pillow-12.2.0-cp313-cp313t-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:2c727a6d53cb0018aadd8018c2b938376af27914a68a492f59dfcaca650d5eea", size = 6433114, upload-time = "2026-04-01T14:44:29.615Z" }, + { url = "https://files.pythonhosted.org/packages/36/a3/f9a77144231fb8d40ee27107b4463e205fa4677e2ca2548e14da5cf18dce/pillow-12.2.0-cp313-cp313t-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:efd8c21c98c5cc60653bcb311bef2ce0401642b7ce9d09e03a7da87c878289d4", size = 7115667, upload-time = "2026-04-01T14:44:32.773Z" }, + { url = "https://files.pythonhosted.org/packages/c1/fc/ac4ee3041e7d5a565e1c4fd72a113f03b6394cc72ab7089d27608f8aaccb/pillow-12.2.0-cp313-cp313t-musllinux_1_2_aarch64.whl", hash = "sha256:9f08483a632889536b8139663db60f6724bfcb443c96f1b18855860d7d5c0fd4", size = 6538966, upload-time = "2026-04-01T14:44:35.252Z" }, + { url = "https://files.pythonhosted.org/packages/c0/a8/27fb307055087f3668f6d0a8ccb636e7431d56ed0750e07a60547b1e083e/pillow-12.2.0-cp313-cp313t-musllinux_1_2_x86_64.whl", hash = "sha256:dac8d77255a37e81a2efcbd1fc05f1c15ee82200e6c240d7e127e25e365c39ea", size = 7238241, upload-time = "2026-04-01T14:44:37.875Z" }, + { url = "https://files.pythonhosted.org/packages/ad/4b/926ab182c07fccae9fcb120043464e1ff1564775ec8864f21a0ebce6ac25/pillow-12.2.0-cp313-cp313t-win32.whl", hash = "sha256:ee3120ae9dff32f121610bb08e4313be87e03efeadfc6c0d18f89127e24d0c24", size = 6379592, upload-time = "2026-04-01T14:44:40.336Z" }, + { url = "https://files.pythonhosted.org/packages/c2/c4/f9e476451a098181b30050cc4c9a3556b64c02cf6497ea421ac047e89e4b/pillow-12.2.0-cp313-cp313t-win_amd64.whl", hash = "sha256:325ca0528c6788d2a6c3d40e3568639398137346c3d6e66bb61db96b96511c98", size = 7085542, upload-time = "2026-04-01T14:44:43.251Z" }, + { url = "https://files.pythonhosted.org/packages/00/a4/285f12aeacbe2d6dc36c407dfbbe9e96d4a80b0fb710a337f6d2ad978c75/pillow-12.2.0-cp313-cp313t-win_arm64.whl", hash = "sha256:2e5a76d03a6c6dcef67edabda7a52494afa4035021a79c8558e14af25313d453", size = 2465765, upload-time = "2026-04-01T14:44:45.996Z" }, + { url = "https://files.pythonhosted.org/packages/bf/98/4595daa2365416a86cb0d495248a393dfc84e96d62ad080c8546256cb9c0/pillow-12.2.0-cp314-cp314-ios_13_0_arm64_iphoneos.whl", hash = "sha256:3adc9215e8be0448ed6e814966ecf3d9952f0ea40eb14e89a102b87f450660d8", size = 4100848, upload-time = "2026-04-01T14:44:48.48Z" }, + { url = "https://files.pythonhosted.org/packages/0b/79/40184d464cf89f6663e18dfcf7ca21aae2491fff1a16127681bf1fa9b8cf/pillow-12.2.0-cp314-cp314-ios_13_0_arm64_iphonesimulator.whl", hash = "sha256:6a9adfc6d24b10f89588096364cc726174118c62130c817c2837c60cf08a392b", size = 4176515, upload-time = "2026-04-01T14:44:51.353Z" }, + { url = "https://files.pythonhosted.org/packages/b0/63/703f86fd4c422a9cf722833670f4f71418fb116b2853ff7da722ea43f184/pillow-12.2.0-cp314-cp314-ios_13_0_x86_64_iphonesimulator.whl", hash = "sha256:6a6e67ea2e6feda684ed370f9a1c52e7a243631c025ba42149a2cc5934dec295", size = 3640159, upload-time = "2026-04-01T14:44:53.588Z" }, + { url = "https://files.pythonhosted.org/packages/71/e0/fb22f797187d0be2270f83500aab851536101b254bfa1eae10795709d283/pillow-12.2.0-cp314-cp314-macosx_10_15_x86_64.whl", hash = "sha256:2bb4a8d594eacdfc59d9e5ad972aa8afdd48d584ffd5f13a937a664c3e7db0ed", size = 5312185, upload-time = "2026-04-01T14:44:56.039Z" }, + { url = "https://files.pythonhosted.org/packages/ba/8c/1a9e46228571de18f8e28f16fabdfc20212a5d019f3e3303452b3f0a580d/pillow-12.2.0-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:80b2da48193b2f33ed0c32c38140f9d3186583ce7d516526d462645fd98660ae", size = 4695386, upload-time = "2026-04-01T14:44:58.663Z" }, + { url = "https://files.pythonhosted.org/packages/70/62/98f6b7f0c88b9addd0e87c217ded307b36be024d4ff8869a812b241d1345/pillow-12.2.0-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:22db17c68434de69d8ecfc2fe821569195c0c373b25cccb9cbdacf2c6e53c601", size = 6280384, upload-time = "2026-04-01T14:45:01.5Z" }, + { url = "https://files.pythonhosted.org/packages/5e/03/688747d2e91cfbe0e64f316cd2e8005698f76ada3130d0194664174fa5de/pillow-12.2.0-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:7b14cc0106cd9aecda615dd6903840a058b4700fcb817687d0ee4fc8b6e389be", size = 8091599, upload-time = "2026-04-01T14:45:04.5Z" }, + { url = "https://files.pythonhosted.org/packages/f6/35/577e22b936fcdd66537329b33af0b4ccfefaeabd8aec04b266528cddb33c/pillow-12.2.0-cp314-cp314-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:8cbeb542b2ebc6fcdacabf8aca8c1a97c9b3ad3927d46b8723f9d4f033288a0f", size = 6396021, upload-time = "2026-04-01T14:45:07.117Z" }, + { url = "https://files.pythonhosted.org/packages/11/8d/d2532ad2a603ca2b93ad9f5135732124e57811d0168155852f37fbce2458/pillow-12.2.0-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:4bfd07bc812fbd20395212969e41931001fd59eb55a60658b0e5710872e95286", size = 7083360, upload-time = "2026-04-01T14:45:09.763Z" }, + { url = "https://files.pythonhosted.org/packages/5e/26/d325f9f56c7e039034897e7380e9cc202b1e368bfd04d4cbe6a441f02885/pillow-12.2.0-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:9aba9a17b623ef750a4d11b742cbafffeb48a869821252b30ee21b5e91392c50", size = 6507628, upload-time = "2026-04-01T14:45:12.378Z" }, + { url = "https://files.pythonhosted.org/packages/5f/f7/769d5632ffb0988f1c5e7660b3e731e30f7f8ec4318e94d0a5d674eb65a4/pillow-12.2.0-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:deede7c263feb25dba4e82ea23058a235dcc2fe1f6021025dc71f2b618e26104", size = 7209321, upload-time = "2026-04-01T14:45:15.122Z" }, + { url = "https://files.pythonhosted.org/packages/6a/7a/c253e3c645cd47f1aceea6a8bacdba9991bf45bb7dfe927f7c893e89c93c/pillow-12.2.0-cp314-cp314-win32.whl", hash = "sha256:632ff19b2778e43162304d50da0181ce24ac5bb8180122cbe1bf4673428328c7", size = 6479723, upload-time = "2026-04-01T14:45:17.797Z" }, + { url = "https://files.pythonhosted.org/packages/cd/8b/601e6566b957ca50e28725cb6c355c59c2c8609751efbecd980db44e0349/pillow-12.2.0-cp314-cp314-win_amd64.whl", hash = "sha256:4e6c62e9d237e9b65fac06857d511e90d8461a32adcc1b9065ea0c0fa3a28150", size = 7217400, upload-time = "2026-04-01T14:45:20.529Z" }, + { url = "https://files.pythonhosted.org/packages/d6/94/220e46c73065c3e2951bb91c11a1fb636c8c9ad427ac3ce7d7f3359b9b2f/pillow-12.2.0-cp314-cp314-win_arm64.whl", hash = "sha256:b1c1fbd8a5a1af3412a0810d060a78b5136ec0836c8a4ef9aa11807f2a22f4e1", size = 2554835, upload-time = "2026-04-01T14:45:23.162Z" }, + { url = "https://files.pythonhosted.org/packages/b6/ab/1b426a3974cb0e7da5c29ccff4807871d48110933a57207b5a676cccc155/pillow-12.2.0-cp314-cp314t-macosx_10_15_x86_64.whl", hash = "sha256:57850958fe9c751670e49b2cecf6294acc99e562531f4bd317fa5ddee2068463", size = 5314225, upload-time = "2026-04-01T14:45:25.637Z" }, + { url = "https://files.pythonhosted.org/packages/19/1e/dce46f371be2438eecfee2a1960ee2a243bbe5e961890146d2dee1ff0f12/pillow-12.2.0-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:d5d38f1411c0ed9f97bcb49b7bd59b6b7c314e0e27420e34d99d844b9ce3b6f3", size = 4698541, upload-time = "2026-04-01T14:45:28.355Z" }, + { url = "https://files.pythonhosted.org/packages/55/c3/7fbecf70adb3a0c33b77a300dc52e424dc22ad8cdc06557a2e49523b703d/pillow-12.2.0-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:5c0a9f29ca8e79f09de89293f82fc9b0270bb4af1d58bc98f540cc4aedf03166", size = 6322251, upload-time = "2026-04-01T14:45:30.924Z" }, + { url = "https://files.pythonhosted.org/packages/1c/3c/7fbc17cfb7e4fe0ef1642e0abc17fc6c94c9f7a16be41498e12e2ba60408/pillow-12.2.0-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:1610dd6c61621ae1cf811bef44d77e149ce3f7b95afe66a4512f8c59f25d9ebe", size = 8127807, upload-time = "2026-04-01T14:45:33.908Z" }, + { url = "https://files.pythonhosted.org/packages/ff/c3/a8ae14d6defd2e448493ff512fae903b1e9bd40b72efb6ec55ce0048c8ce/pillow-12.2.0-cp314-cp314t-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:0a34329707af4f73cf1782a36cd2289c0368880654a2c11f027bcee9052d35dd", size = 6433935, upload-time = "2026-04-01T14:45:36.623Z" }, + { url = "https://files.pythonhosted.org/packages/6e/32/2880fb3a074847ac159d8f902cb43278a61e85f681661e7419e6596803ed/pillow-12.2.0-cp314-cp314t-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:8e9c4f5b3c546fa3458a29ab22646c1c6c787ea8f5ef51300e5a60300736905e", size = 7116720, upload-time = "2026-04-01T14:45:39.258Z" }, + { url = "https://files.pythonhosted.org/packages/46/87/495cc9c30e0129501643f24d320076f4cc54f718341df18cc70ec94c44e1/pillow-12.2.0-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:fb043ee2f06b41473269765c2feae53fc2e2fbf96e5e22ca94fb5ad677856f06", size = 6540498, upload-time = "2026-04-01T14:45:41.879Z" }, + { url = "https://files.pythonhosted.org/packages/18/53/773f5edca692009d883a72211b60fdaf8871cbef075eaa9d577f0a2f989e/pillow-12.2.0-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:f278f034eb75b4e8a13a54a876cc4a5ab39173d2cdd93a638e1b467fc545ac43", size = 7239413, upload-time = "2026-04-01T14:45:44.705Z" }, + { url = "https://files.pythonhosted.org/packages/c9/e4/4b64a97d71b2a83158134abbb2f5bd3f8a2ea691361282f010998f339ec7/pillow-12.2.0-cp314-cp314t-win32.whl", hash = "sha256:6bb77b2dcb06b20f9f4b4a8454caa581cd4dd0643a08bacf821216a16d9c8354", size = 6482084, upload-time = "2026-04-01T14:45:47.568Z" }, + { url = "https://files.pythonhosted.org/packages/ba/13/306d275efd3a3453f72114b7431c877d10b1154014c1ebbedd067770d629/pillow-12.2.0-cp314-cp314t-win_amd64.whl", hash = "sha256:6562ace0d3fb5f20ed7290f1f929cae41b25ae29528f2af1722966a0a02e2aa1", size = 7225152, upload-time = "2026-04-01T14:45:50.032Z" }, + { url = "https://files.pythonhosted.org/packages/ff/6e/cf826fae916b8658848d7b9f38d88da6396895c676e8086fc0988073aaf8/pillow-12.2.0-cp314-cp314t-win_arm64.whl", hash = "sha256:aa88ccfe4e32d362816319ed727a004423aab09c5cea43c01a4b435643fa34eb", size = 2556579, upload-time = "2026-04-01T14:45:52.529Z" }, + { url = "https://files.pythonhosted.org/packages/4e/b7/2437044fb910f499610356d1352e3423753c98e34f915252aafecc64889f/pillow-12.2.0-pp311-pypy311_pp73-macosx_10_15_x86_64.whl", hash = "sha256:0538bd5e05efec03ae613fd89c4ce0368ecd2ba239cc25b9f9be7ed426b0af1f", size = 5273969, upload-time = "2026-04-01T14:45:55.538Z" }, + { url = "https://files.pythonhosted.org/packages/f6/f4/8316e31de11b780f4ac08ef3654a75555e624a98db1056ecb2122d008d5a/pillow-12.2.0-pp311-pypy311_pp73-macosx_11_0_arm64.whl", hash = "sha256:394167b21da716608eac917c60aa9b969421b5dcbbe02ae7f013e7b85811c69d", size = 4659674, upload-time = "2026-04-01T14:45:58.093Z" }, + { url = "https://files.pythonhosted.org/packages/d4/37/664fca7201f8bb2aa1d20e2c3d5564a62e6ae5111741966c8319ca802361/pillow-12.2.0-pp311-pypy311_pp73-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:5d04bfa02cc2d23b497d1e90a0f927070043f6cbf303e738300532379a4b4e0f", size = 5288479, upload-time = "2026-04-01T14:46:01.141Z" }, + { url = "https://files.pythonhosted.org/packages/49/62/5b0ed78fce87346be7a5cfcfaaad91f6a1f98c26f86bdbafa2066c647ef6/pillow-12.2.0-pp311-pypy311_pp73-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:0c838a5125cee37e68edec915651521191cef1e6aa336b855f495766e77a366e", size = 7032230, upload-time = "2026-04-01T14:46:03.874Z" }, + { url = "https://files.pythonhosted.org/packages/c3/28/ec0fc38107fc32536908034e990c47914c57cd7c5a3ece4d8d8f7ffd7e27/pillow-12.2.0-pp311-pypy311_pp73-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:4a6c9fa44005fa37a91ebfc95d081e8079757d2e904b27103f4f5fa6f0bf78c0", size = 5355404, upload-time = "2026-04-01T14:46:06.33Z" }, + { url = "https://files.pythonhosted.org/packages/5e/8b/51b0eddcfa2180d60e41f06bd6d0a62202b20b59c68f5a132e615b75aecf/pillow-12.2.0-pp311-pypy311_pp73-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:25373b66e0dd5905ed63fa3cae13c82fbddf3079f2c8bf15c6fb6a35586324c1", size = 6002215, upload-time = "2026-04-01T14:46:08.83Z" }, + { url = "https://files.pythonhosted.org/packages/bc/60/5382c03e1970de634027cee8e1b7d39776b778b81812aaf45b694dfe9e28/pillow-12.2.0-pp311-pypy311_pp73-win_amd64.whl", hash = "sha256:bfa9c230d2fe991bed5318a5f119bd6780cda2915cca595393649fc118ab895e", size = 7080946, upload-time = "2026-04-01T14:46:11.734Z" }, +] + +[[package]] +name = "platformdirs" +version = "4.9.4" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/19/56/8d4c30c8a1d07013911a8fdbd8f89440ef9f08d07a1b50ab8ca8be5a20f9/platformdirs-4.9.4.tar.gz", hash = "sha256:1ec356301b7dc906d83f371c8f487070e99d3ccf9e501686456394622a01a934", size = 28737, upload-time = "2026-03-05T18:34:13.271Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/63/d7/97f7e3a6abb67d8080dd406fd4df842c2be0efaf712d1c899c32a075027c/platformdirs-4.9.4-py3-none-any.whl", hash = "sha256:68a9a4619a666ea6439f2ff250c12a853cd1cbd5158d258bd824a7df6be2f868", size = 21216, upload-time = "2026-03-05T18:34:12.172Z" }, +] + +[[package]] +name = "pluggy" +version = "1.6.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/f9/e2/3e91f31a7d2b083fe6ef3fa267035b518369d9511ffab804f839851d2779/pluggy-1.6.0.tar.gz", hash = "sha256:7dcc130b76258d33b90f61b658791dede3486c3e6bfb003ee5c9bfb396dd22f3", size = 69412, upload-time = "2025-05-15T12:30:07.975Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/54/20/4d324d65cc6d9205fabedc306948156824eb9f0ee1633355a8f7ec5c66bf/pluggy-1.6.0-py3-none-any.whl", hash = "sha256:e920276dd6813095e9377c0bc5566d94c932c33b27a3e3945d8389c374dd4746", size = 20538, upload-time = "2025-05-15T12:30:06.134Z" }, +] + +[[package]] +name = "py-key-value-aio" +version = "0.4.4" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "beartype" }, + { name = "typing-extensions" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/04/3c/0397c072a38d4bc580994b42e0c90c5f44f679303489e4376289534735e5/py_key_value_aio-0.4.4.tar.gz", hash = "sha256:e3012e6243ed7cc09bb05457bd4d03b1ba5c2b1ca8700096b3927db79ffbbe55", size = 92300, upload-time = "2026-02-16T21:21:43.245Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/32/69/f1b537ee70b7def42d63124a539ed3026a11a3ffc3086947a1ca6e861868/py_key_value_aio-0.4.4-py3-none-any.whl", hash = "sha256:18e17564ecae61b987f909fc2cd41ee2012c84b4b1dcb8c055cf8b4bc1bf3f5d", size = 152291, upload-time = "2026-02-16T21:21:44.241Z" }, +] + +[package.optional-dependencies] +filetree = [ + { name = "aiofile" }, + { name = "anyio" }, +] +keyring = [ + { name = "keyring" }, +] +memory = [ + { name = "cachetools" }, +] + +[[package]] +name = "pycparser" +version = "3.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/1b/7d/92392ff7815c21062bea51aa7b87d45576f649f16458d78b7cf94b9ab2e6/pycparser-3.0.tar.gz", hash = "sha256:600f49d217304a5902ac3c37e1281c9fe94e4d0489de643a9504c5cdfdfc6b29", size = 103492, upload-time = "2026-01-21T14:26:51.89Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/0c/c3/44f3fbbfa403ea2a7c779186dc20772604442dde72947e7d01069cbe98e3/pycparser-3.0-py3-none-any.whl", hash = "sha256:b727414169a36b7d524c1c3e31839a521725078d7b2ff038656844266160a992", size = 48172, upload-time = "2026-01-21T14:26:50.693Z" }, +] + +[[package]] +name = "pydantic" +version = "2.12.5" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "annotated-types" }, + { name = "pydantic-core" }, + { name = "typing-extensions" }, + { name = "typing-inspection" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/69/44/36f1a6e523abc58ae5f928898e4aca2e0ea509b5aa6f6f392a5d882be928/pydantic-2.12.5.tar.gz", hash = "sha256:4d351024c75c0f085a9febbb665ce8c0c6ec5d30e903bdb6394b7ede26aebb49", size = 821591, upload-time = "2025-11-26T15:11:46.471Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/5a/87/b70ad306ebb6f9b585f114d0ac2137d792b48be34d732d60e597c2f8465a/pydantic-2.12.5-py3-none-any.whl", hash = "sha256:e561593fccf61e8a20fc46dfc2dfe075b8be7d0188df33f221ad1f0139180f9d", size = 463580, upload-time = "2025-11-26T15:11:44.605Z" }, +] + +[package.optional-dependencies] +email = [ + { name = "email-validator" }, +] + +[[package]] +name = "pydantic-core" +version = "2.41.5" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "typing-extensions" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/71/70/23b021c950c2addd24ec408e9ab05d59b035b39d97cdc1130e1bce647bb6/pydantic_core-2.41.5.tar.gz", hash = "sha256:08daa51ea16ad373ffd5e7606252cc32f07bc72b28284b6bc9c6df804816476e", size = 460952, upload-time = "2025-11-04T13:43:49.098Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/e8/72/74a989dd9f2084b3d9530b0915fdda64ac48831c30dbf7c72a41a5232db8/pydantic_core-2.41.5-cp311-cp311-macosx_10_12_x86_64.whl", hash = "sha256:a3a52f6156e73e7ccb0f8cced536adccb7042be67cb45f9562e12b319c119da6", size = 2105873, upload-time = "2025-11-04T13:39:31.373Z" }, + { url = "https://files.pythonhosted.org/packages/12/44/37e403fd9455708b3b942949e1d7febc02167662bf1a7da5b78ee1ea2842/pydantic_core-2.41.5-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:7f3bf998340c6d4b0c9a2f02d6a400e51f123b59565d74dc60d252ce888c260b", size = 1899826, upload-time = "2025-11-04T13:39:32.897Z" }, + { url = "https://files.pythonhosted.org/packages/33/7f/1d5cab3ccf44c1935a359d51a8a2a9e1a654b744b5e7f80d41b88d501eec/pydantic_core-2.41.5-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:378bec5c66998815d224c9ca994f1e14c0c21cb95d2f52b6021cc0b2a58f2a5a", size = 1917869, upload-time = "2025-11-04T13:39:34.469Z" }, + { url = "https://files.pythonhosted.org/packages/6e/6a/30d94a9674a7fe4f4744052ed6c5e083424510be1e93da5bc47569d11810/pydantic_core-2.41.5-cp311-cp311-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:e7b576130c69225432866fe2f4a469a85a54ade141d96fd396dffcf607b558f8", size = 2063890, upload-time = "2025-11-04T13:39:36.053Z" }, + { url = "https://files.pythonhosted.org/packages/50/be/76e5d46203fcb2750e542f32e6c371ffa9b8ad17364cf94bb0818dbfb50c/pydantic_core-2.41.5-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:6cb58b9c66f7e4179a2d5e0f849c48eff5c1fca560994d6eb6543abf955a149e", size = 2229740, upload-time = "2025-11-04T13:39:37.753Z" }, + { url = "https://files.pythonhosted.org/packages/d3/ee/fed784df0144793489f87db310a6bbf8118d7b630ed07aa180d6067e653a/pydantic_core-2.41.5-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:88942d3a3dff3afc8288c21e565e476fc278902ae4d6d134f1eeda118cc830b1", size = 2350021, upload-time = "2025-11-04T13:39:40.94Z" }, + { url = "https://files.pythonhosted.org/packages/c8/be/8fed28dd0a180dca19e72c233cbf58efa36df055e5b9d90d64fd1740b828/pydantic_core-2.41.5-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f31d95a179f8d64d90f6831d71fa93290893a33148d890ba15de25642c5d075b", size = 2066378, upload-time = "2025-11-04T13:39:42.523Z" }, + { url = "https://files.pythonhosted.org/packages/b0/3b/698cf8ae1d536a010e05121b4958b1257f0b5522085e335360e53a6b1c8b/pydantic_core-2.41.5-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:c1df3d34aced70add6f867a8cf413e299177e0c22660cc767218373d0779487b", size = 2175761, upload-time = "2025-11-04T13:39:44.553Z" }, + { url = "https://files.pythonhosted.org/packages/b8/ba/15d537423939553116dea94ce02f9c31be0fa9d0b806d427e0308ec17145/pydantic_core-2.41.5-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:4009935984bd36bd2c774e13f9a09563ce8de4abaa7226f5108262fa3e637284", size = 2146303, upload-time = "2025-11-04T13:39:46.238Z" }, + { url = "https://files.pythonhosted.org/packages/58/7f/0de669bf37d206723795f9c90c82966726a2ab06c336deba4735b55af431/pydantic_core-2.41.5-cp311-cp311-musllinux_1_1_armv7l.whl", hash = "sha256:34a64bc3441dc1213096a20fe27e8e128bd3ff89921706e83c0b1ac971276594", size = 2340355, upload-time = "2025-11-04T13:39:48.002Z" }, + { url = "https://files.pythonhosted.org/packages/e5/de/e7482c435b83d7e3c3ee5ee4451f6e8973cff0eb6007d2872ce6383f6398/pydantic_core-2.41.5-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:c9e19dd6e28fdcaa5a1de679aec4141f691023916427ef9bae8584f9c2fb3b0e", size = 2319875, upload-time = "2025-11-04T13:39:49.705Z" }, + { url = "https://files.pythonhosted.org/packages/fe/e6/8c9e81bb6dd7560e33b9053351c29f30c8194b72f2d6932888581f503482/pydantic_core-2.41.5-cp311-cp311-win32.whl", hash = "sha256:2c010c6ded393148374c0f6f0bf89d206bf3217f201faa0635dcd56bd1520f6b", size = 1987549, upload-time = "2025-11-04T13:39:51.842Z" }, + { url = "https://files.pythonhosted.org/packages/11/66/f14d1d978ea94d1bc21fc98fcf570f9542fe55bfcc40269d4e1a21c19bf7/pydantic_core-2.41.5-cp311-cp311-win_amd64.whl", hash = "sha256:76ee27c6e9c7f16f47db7a94157112a2f3a00e958bc626e2f4ee8bec5c328fbe", size = 2011305, upload-time = "2025-11-04T13:39:53.485Z" }, + { url = "https://files.pythonhosted.org/packages/56/d8/0e271434e8efd03186c5386671328154ee349ff0354d83c74f5caaf096ed/pydantic_core-2.41.5-cp311-cp311-win_arm64.whl", hash = "sha256:4bc36bbc0b7584de96561184ad7f012478987882ebf9f9c389b23f432ea3d90f", size = 1972902, upload-time = "2025-11-04T13:39:56.488Z" }, + { url = "https://files.pythonhosted.org/packages/5f/5d/5f6c63eebb5afee93bcaae4ce9a898f3373ca23df3ccaef086d0233a35a7/pydantic_core-2.41.5-cp312-cp312-macosx_10_12_x86_64.whl", hash = "sha256:f41a7489d32336dbf2199c8c0a215390a751c5b014c2c1c5366e817202e9cdf7", size = 2110990, upload-time = "2025-11-04T13:39:58.079Z" }, + { url = "https://files.pythonhosted.org/packages/aa/32/9c2e8ccb57c01111e0fd091f236c7b371c1bccea0fa85247ac55b1e2b6b6/pydantic_core-2.41.5-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:070259a8818988b9a84a449a2a7337c7f430a22acc0859c6b110aa7212a6d9c0", size = 1896003, upload-time = "2025-11-04T13:39:59.956Z" }, + { url = "https://files.pythonhosted.org/packages/68/b8/a01b53cb0e59139fbc9e4fda3e9724ede8de279097179be4ff31f1abb65a/pydantic_core-2.41.5-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e96cea19e34778f8d59fe40775a7a574d95816eb150850a85a7a4c8f4b94ac69", size = 1919200, upload-time = "2025-11-04T13:40:02.241Z" }, + { url = "https://files.pythonhosted.org/packages/38/de/8c36b5198a29bdaade07b5985e80a233a5ac27137846f3bc2d3b40a47360/pydantic_core-2.41.5-cp312-cp312-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:ed2e99c456e3fadd05c991f8f437ef902e00eedf34320ba2b0842bd1c3ca3a75", size = 2052578, upload-time = "2025-11-04T13:40:04.401Z" }, + { url = "https://files.pythonhosted.org/packages/00/b5/0e8e4b5b081eac6cb3dbb7e60a65907549a1ce035a724368c330112adfdd/pydantic_core-2.41.5-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:65840751b72fbfd82c3c640cff9284545342a4f1eb1586ad0636955b261b0b05", size = 2208504, upload-time = "2025-11-04T13:40:06.072Z" }, + { url = "https://files.pythonhosted.org/packages/77/56/87a61aad59c7c5b9dc8caad5a41a5545cba3810c3e828708b3d7404f6cef/pydantic_core-2.41.5-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:e536c98a7626a98feb2d3eaf75944ef6f3dbee447e1f841eae16f2f0a72d8ddc", size = 2335816, upload-time = "2025-11-04T13:40:07.835Z" }, + { url = "https://files.pythonhosted.org/packages/0d/76/941cc9f73529988688a665a5c0ecff1112b3d95ab48f81db5f7606f522d3/pydantic_core-2.41.5-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:eceb81a8d74f9267ef4081e246ffd6d129da5d87e37a77c9bde550cb04870c1c", size = 2075366, upload-time = "2025-11-04T13:40:09.804Z" }, + { url = "https://files.pythonhosted.org/packages/d3/43/ebef01f69baa07a482844faaa0a591bad1ef129253ffd0cdaa9d8a7f72d3/pydantic_core-2.41.5-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:d38548150c39b74aeeb0ce8ee1d8e82696f4a4e16ddc6de7b1d8823f7de4b9b5", size = 2171698, upload-time = "2025-11-04T13:40:12.004Z" }, + { url = "https://files.pythonhosted.org/packages/b1/87/41f3202e4193e3bacfc2c065fab7706ebe81af46a83d3e27605029c1f5a6/pydantic_core-2.41.5-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:c23e27686783f60290e36827f9c626e63154b82b116d7fe9adba1fda36da706c", size = 2132603, upload-time = "2025-11-04T13:40:13.868Z" }, + { url = "https://files.pythonhosted.org/packages/49/7d/4c00df99cb12070b6bccdef4a195255e6020a550d572768d92cc54dba91a/pydantic_core-2.41.5-cp312-cp312-musllinux_1_1_armv7l.whl", hash = "sha256:482c982f814460eabe1d3bb0adfdc583387bd4691ef00b90575ca0d2b6fe2294", size = 2329591, upload-time = "2025-11-04T13:40:15.672Z" }, + { url = "https://files.pythonhosted.org/packages/cc/6a/ebf4b1d65d458f3cda6a7335d141305dfa19bdc61140a884d165a8a1bbc7/pydantic_core-2.41.5-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:bfea2a5f0b4d8d43adf9d7b8bf019fb46fdd10a2e5cde477fbcb9d1fa08c68e1", size = 2319068, upload-time = "2025-11-04T13:40:17.532Z" }, + { url = "https://files.pythonhosted.org/packages/49/3b/774f2b5cd4192d5ab75870ce4381fd89cf218af999515baf07e7206753f0/pydantic_core-2.41.5-cp312-cp312-win32.whl", hash = "sha256:b74557b16e390ec12dca509bce9264c3bbd128f8a2c376eaa68003d7f327276d", size = 1985908, upload-time = "2025-11-04T13:40:19.309Z" }, + { url = "https://files.pythonhosted.org/packages/86/45/00173a033c801cacf67c190fef088789394feaf88a98a7035b0e40d53dc9/pydantic_core-2.41.5-cp312-cp312-win_amd64.whl", hash = "sha256:1962293292865bca8e54702b08a4f26da73adc83dd1fcf26fbc875b35d81c815", size = 2020145, upload-time = "2025-11-04T13:40:21.548Z" }, + { url = "https://files.pythonhosted.org/packages/f9/22/91fbc821fa6d261b376a3f73809f907cec5ca6025642c463d3488aad22fb/pydantic_core-2.41.5-cp312-cp312-win_arm64.whl", hash = "sha256:1746d4a3d9a794cacae06a5eaaccb4b8643a131d45fbc9af23e353dc0a5ba5c3", size = 1976179, upload-time = "2025-11-04T13:40:23.393Z" }, + { url = "https://files.pythonhosted.org/packages/87/06/8806241ff1f70d9939f9af039c6c35f2360cf16e93c2ca76f184e76b1564/pydantic_core-2.41.5-cp313-cp313-macosx_10_12_x86_64.whl", hash = "sha256:941103c9be18ac8daf7b7adca8228f8ed6bb7a1849020f643b3a14d15b1924d9", size = 2120403, upload-time = "2025-11-04T13:40:25.248Z" }, + { url = "https://files.pythonhosted.org/packages/94/02/abfa0e0bda67faa65fef1c84971c7e45928e108fe24333c81f3bfe35d5f5/pydantic_core-2.41.5-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:112e305c3314f40c93998e567879e887a3160bb8689ef3d2c04b6cc62c33ac34", size = 1896206, upload-time = "2025-11-04T13:40:27.099Z" }, + { url = "https://files.pythonhosted.org/packages/15/df/a4c740c0943e93e6500f9eb23f4ca7ec9bf71b19e608ae5b579678c8d02f/pydantic_core-2.41.5-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:0cbaad15cb0c90aa221d43c00e77bb33c93e8d36e0bf74760cd00e732d10a6a0", size = 1919307, upload-time = "2025-11-04T13:40:29.806Z" }, + { url = "https://files.pythonhosted.org/packages/9a/e3/6324802931ae1d123528988e0e86587c2072ac2e5394b4bc2bc34b61ff6e/pydantic_core-2.41.5-cp313-cp313-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:03ca43e12fab6023fc79d28ca6b39b05f794ad08ec2feccc59a339b02f2b3d33", size = 2063258, upload-time = "2025-11-04T13:40:33.544Z" }, + { url = "https://files.pythonhosted.org/packages/c9/d4/2230d7151d4957dd79c3044ea26346c148c98fbf0ee6ebd41056f2d62ab5/pydantic_core-2.41.5-cp313-cp313-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:dc799088c08fa04e43144b164feb0c13f9a0bc40503f8df3e9fde58a3c0c101e", size = 2214917, upload-time = "2025-11-04T13:40:35.479Z" }, + { url = "https://files.pythonhosted.org/packages/e6/9f/eaac5df17a3672fef0081b6c1bb0b82b33ee89aa5cec0d7b05f52fd4a1fa/pydantic_core-2.41.5-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:97aeba56665b4c3235a0e52b2c2f5ae9cd071b8a8310ad27bddb3f7fb30e9aa2", size = 2332186, upload-time = "2025-11-04T13:40:37.436Z" }, + { url = "https://files.pythonhosted.org/packages/cf/4e/35a80cae583a37cf15604b44240e45c05e04e86f9cfd766623149297e971/pydantic_core-2.41.5-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:406bf18d345822d6c21366031003612b9c77b3e29ffdb0f612367352aab7d586", size = 2073164, upload-time = "2025-11-04T13:40:40.289Z" }, + { url = "https://files.pythonhosted.org/packages/bf/e3/f6e262673c6140dd3305d144d032f7bd5f7497d3871c1428521f19f9efa2/pydantic_core-2.41.5-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:b93590ae81f7010dbe380cdeab6f515902ebcbefe0b9327cc4804d74e93ae69d", size = 2179146, upload-time = "2025-11-04T13:40:42.809Z" }, + { url = "https://files.pythonhosted.org/packages/75/c7/20bd7fc05f0c6ea2056a4565c6f36f8968c0924f19b7d97bbfea55780e73/pydantic_core-2.41.5-cp313-cp313-musllinux_1_1_aarch64.whl", hash = "sha256:01a3d0ab748ee531f4ea6c3e48ad9dac84ddba4b0d82291f87248f2f9de8d740", size = 2137788, upload-time = "2025-11-04T13:40:44.752Z" }, + { url = "https://files.pythonhosted.org/packages/3a/8d/34318ef985c45196e004bc46c6eab2eda437e744c124ef0dbe1ff2c9d06b/pydantic_core-2.41.5-cp313-cp313-musllinux_1_1_armv7l.whl", hash = "sha256:6561e94ba9dacc9c61bce40e2d6bdc3bfaa0259d3ff36ace3b1e6901936d2e3e", size = 2340133, upload-time = "2025-11-04T13:40:46.66Z" }, + { url = "https://files.pythonhosted.org/packages/9c/59/013626bf8c78a5a5d9350d12e7697d3d4de951a75565496abd40ccd46bee/pydantic_core-2.41.5-cp313-cp313-musllinux_1_1_x86_64.whl", hash = "sha256:915c3d10f81bec3a74fbd4faebe8391013ba61e5a1a8d48c4455b923bdda7858", size = 2324852, upload-time = "2025-11-04T13:40:48.575Z" }, + { url = "https://files.pythonhosted.org/packages/1a/d9/c248c103856f807ef70c18a4f986693a46a8ffe1602e5d361485da502d20/pydantic_core-2.41.5-cp313-cp313-win32.whl", hash = "sha256:650ae77860b45cfa6e2cdafc42618ceafab3a2d9a3811fcfbd3bbf8ac3c40d36", size = 1994679, upload-time = "2025-11-04T13:40:50.619Z" }, + { url = "https://files.pythonhosted.org/packages/9e/8b/341991b158ddab181cff136acd2552c9f35bd30380422a639c0671e99a91/pydantic_core-2.41.5-cp313-cp313-win_amd64.whl", hash = "sha256:79ec52ec461e99e13791ec6508c722742ad745571f234ea6255bed38c6480f11", size = 2019766, upload-time = "2025-11-04T13:40:52.631Z" }, + { url = "https://files.pythonhosted.org/packages/73/7d/f2f9db34af103bea3e09735bb40b021788a5e834c81eedb541991badf8f5/pydantic_core-2.41.5-cp313-cp313-win_arm64.whl", hash = "sha256:3f84d5c1b4ab906093bdc1ff10484838aca54ef08de4afa9de0f5f14d69639cd", size = 1981005, upload-time = "2025-11-04T13:40:54.734Z" }, + { url = "https://files.pythonhosted.org/packages/ea/28/46b7c5c9635ae96ea0fbb779e271a38129df2550f763937659ee6c5dbc65/pydantic_core-2.41.5-cp314-cp314-macosx_10_12_x86_64.whl", hash = "sha256:3f37a19d7ebcdd20b96485056ba9e8b304e27d9904d233d7b1015db320e51f0a", size = 2119622, upload-time = "2025-11-04T13:40:56.68Z" }, + { url = "https://files.pythonhosted.org/packages/74/1a/145646e5687e8d9a1e8d09acb278c8535ebe9e972e1f162ed338a622f193/pydantic_core-2.41.5-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:1d1d9764366c73f996edd17abb6d9d7649a7eb690006ab6adbda117717099b14", size = 1891725, upload-time = "2025-11-04T13:40:58.807Z" }, + { url = "https://files.pythonhosted.org/packages/23/04/e89c29e267b8060b40dca97bfc64a19b2a3cf99018167ea1677d96368273/pydantic_core-2.41.5-cp314-cp314-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:25e1c2af0fce638d5f1988b686f3b3ea8cd7de5f244ca147c777769e798a9cd1", size = 1915040, upload-time = "2025-11-04T13:41:00.853Z" }, + { url = "https://files.pythonhosted.org/packages/84/a3/15a82ac7bd97992a82257f777b3583d3e84bdb06ba6858f745daa2ec8a85/pydantic_core-2.41.5-cp314-cp314-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:506d766a8727beef16b7adaeb8ee6217c64fc813646b424d0804d67c16eddb66", size = 2063691, upload-time = "2025-11-04T13:41:03.504Z" }, + { url = "https://files.pythonhosted.org/packages/74/9b/0046701313c6ef08c0c1cf0e028c67c770a4e1275ca73131563c5f2a310a/pydantic_core-2.41.5-cp314-cp314-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:4819fa52133c9aa3c387b3328f25c1facc356491e6135b459f1de698ff64d869", size = 2213897, upload-time = "2025-11-04T13:41:05.804Z" }, + { url = "https://files.pythonhosted.org/packages/8a/cd/6bac76ecd1b27e75a95ca3a9a559c643b3afcd2dd62086d4b7a32a18b169/pydantic_core-2.41.5-cp314-cp314-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:2b761d210c9ea91feda40d25b4efe82a1707da2ef62901466a42492c028553a2", size = 2333302, upload-time = "2025-11-04T13:41:07.809Z" }, + { url = "https://files.pythonhosted.org/packages/4c/d2/ef2074dc020dd6e109611a8be4449b98cd25e1b9b8a303c2f0fca2f2bcf7/pydantic_core-2.41.5-cp314-cp314-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:22f0fb8c1c583a3b6f24df2470833b40207e907b90c928cc8d3594b76f874375", size = 2064877, upload-time = "2025-11-04T13:41:09.827Z" }, + { url = "https://files.pythonhosted.org/packages/18/66/e9db17a9a763d72f03de903883c057b2592c09509ccfe468187f2a2eef29/pydantic_core-2.41.5-cp314-cp314-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:2782c870e99878c634505236d81e5443092fba820f0373997ff75f90f68cd553", size = 2180680, upload-time = "2025-11-04T13:41:12.379Z" }, + { url = "https://files.pythonhosted.org/packages/d3/9e/3ce66cebb929f3ced22be85d4c2399b8e85b622db77dad36b73c5387f8f8/pydantic_core-2.41.5-cp314-cp314-musllinux_1_1_aarch64.whl", hash = "sha256:0177272f88ab8312479336e1d777f6b124537d47f2123f89cb37e0accea97f90", size = 2138960, upload-time = "2025-11-04T13:41:14.627Z" }, + { url = "https://files.pythonhosted.org/packages/a6/62/205a998f4327d2079326b01abee48e502ea739d174f0a89295c481a2272e/pydantic_core-2.41.5-cp314-cp314-musllinux_1_1_armv7l.whl", hash = "sha256:63510af5e38f8955b8ee5687740d6ebf7c2a0886d15a6d65c32814613681bc07", size = 2339102, upload-time = "2025-11-04T13:41:16.868Z" }, + { url = "https://files.pythonhosted.org/packages/3c/0d/f05e79471e889d74d3d88f5bd20d0ed189ad94c2423d81ff8d0000aab4ff/pydantic_core-2.41.5-cp314-cp314-musllinux_1_1_x86_64.whl", hash = "sha256:e56ba91f47764cc14f1daacd723e3e82d1a89d783f0f5afe9c364b8bb491ccdb", size = 2326039, upload-time = "2025-11-04T13:41:18.934Z" }, + { url = "https://files.pythonhosted.org/packages/ec/e1/e08a6208bb100da7e0c4b288eed624a703f4d129bde2da475721a80cab32/pydantic_core-2.41.5-cp314-cp314-win32.whl", hash = "sha256:aec5cf2fd867b4ff45b9959f8b20ea3993fc93e63c7363fe6851424c8a7e7c23", size = 1995126, upload-time = "2025-11-04T13:41:21.418Z" }, + { url = "https://files.pythonhosted.org/packages/48/5d/56ba7b24e9557f99c9237e29f5c09913c81eeb2f3217e40e922353668092/pydantic_core-2.41.5-cp314-cp314-win_amd64.whl", hash = "sha256:8e7c86f27c585ef37c35e56a96363ab8de4e549a95512445b85c96d3e2f7c1bf", size = 2015489, upload-time = "2025-11-04T13:41:24.076Z" }, + { url = "https://files.pythonhosted.org/packages/4e/bb/f7a190991ec9e3e0ba22e4993d8755bbc4a32925c0b5b42775c03e8148f9/pydantic_core-2.41.5-cp314-cp314-win_arm64.whl", hash = "sha256:e672ba74fbc2dc8eea59fb6d4aed6845e6905fc2a8afe93175d94a83ba2a01a0", size = 1977288, upload-time = "2025-11-04T13:41:26.33Z" }, + { url = "https://files.pythonhosted.org/packages/92/ed/77542d0c51538e32e15afe7899d79efce4b81eee631d99850edc2f5e9349/pydantic_core-2.41.5-cp314-cp314t-macosx_10_12_x86_64.whl", hash = "sha256:8566def80554c3faa0e65ac30ab0932b9e3a5cd7f8323764303d468e5c37595a", size = 2120255, upload-time = "2025-11-04T13:41:28.569Z" }, + { url = "https://files.pythonhosted.org/packages/bb/3d/6913dde84d5be21e284439676168b28d8bbba5600d838b9dca99de0fad71/pydantic_core-2.41.5-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:b80aa5095cd3109962a298ce14110ae16b8c1aece8b72f9dafe81cf597ad80b3", size = 1863760, upload-time = "2025-11-04T13:41:31.055Z" }, + { url = "https://files.pythonhosted.org/packages/5a/f0/e5e6b99d4191da102f2b0eb9687aaa7f5bea5d9964071a84effc3e40f997/pydantic_core-2.41.5-cp314-cp314t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:3006c3dd9ba34b0c094c544c6006cc79e87d8612999f1a5d43b769b89181f23c", size = 1878092, upload-time = "2025-11-04T13:41:33.21Z" }, + { url = "https://files.pythonhosted.org/packages/71/48/36fb760642d568925953bcc8116455513d6e34c4beaa37544118c36aba6d/pydantic_core-2.41.5-cp314-cp314t-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:72f6c8b11857a856bcfa48c86f5368439f74453563f951e473514579d44aa612", size = 2053385, upload-time = "2025-11-04T13:41:35.508Z" }, + { url = "https://files.pythonhosted.org/packages/20/25/92dc684dd8eb75a234bc1c764b4210cf2646479d54b47bf46061657292a8/pydantic_core-2.41.5-cp314-cp314t-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:5cb1b2f9742240e4bb26b652a5aeb840aa4b417c7748b6f8387927bc6e45e40d", size = 2218832, upload-time = "2025-11-04T13:41:37.732Z" }, + { url = "https://files.pythonhosted.org/packages/e2/09/f53e0b05023d3e30357d82eb35835d0f6340ca344720a4599cd663dca599/pydantic_core-2.41.5-cp314-cp314t-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:bd3d54f38609ff308209bd43acea66061494157703364ae40c951f83ba99a1a9", size = 2327585, upload-time = "2025-11-04T13:41:40Z" }, + { url = "https://files.pythonhosted.org/packages/aa/4e/2ae1aa85d6af35a39b236b1b1641de73f5a6ac4d5a7509f77b814885760c/pydantic_core-2.41.5-cp314-cp314t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:2ff4321e56e879ee8d2a879501c8e469414d948f4aba74a2d4593184eb326660", size = 2041078, upload-time = "2025-11-04T13:41:42.323Z" }, + { url = "https://files.pythonhosted.org/packages/cd/13/2e215f17f0ef326fc72afe94776edb77525142c693767fc347ed6288728d/pydantic_core-2.41.5-cp314-cp314t-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:d0d2568a8c11bf8225044aa94409e21da0cb09dcdafe9ecd10250b2baad531a9", size = 2173914, upload-time = "2025-11-04T13:41:45.221Z" }, + { url = "https://files.pythonhosted.org/packages/02/7a/f999a6dcbcd0e5660bc348a3991c8915ce6599f4f2c6ac22f01d7a10816c/pydantic_core-2.41.5-cp314-cp314t-musllinux_1_1_aarch64.whl", hash = "sha256:a39455728aabd58ceabb03c90e12f71fd30fa69615760a075b9fec596456ccc3", size = 2129560, upload-time = "2025-11-04T13:41:47.474Z" }, + { url = "https://files.pythonhosted.org/packages/3a/b1/6c990ac65e3b4c079a4fb9f5b05f5b013afa0f4ed6780a3dd236d2cbdc64/pydantic_core-2.41.5-cp314-cp314t-musllinux_1_1_armv7l.whl", hash = "sha256:239edca560d05757817c13dc17c50766136d21f7cd0fac50295499ae24f90fdf", size = 2329244, upload-time = "2025-11-04T13:41:49.992Z" }, + { url = "https://files.pythonhosted.org/packages/d9/02/3c562f3a51afd4d88fff8dffb1771b30cfdfd79befd9883ee094f5b6c0d8/pydantic_core-2.41.5-cp314-cp314t-musllinux_1_1_x86_64.whl", hash = "sha256:2a5e06546e19f24c6a96a129142a75cee553cc018ffee48a460059b1185f4470", size = 2331955, upload-time = "2025-11-04T13:41:54.079Z" }, + { url = "https://files.pythonhosted.org/packages/5c/96/5fb7d8c3c17bc8c62fdb031c47d77a1af698f1d7a406b0f79aaa1338f9ad/pydantic_core-2.41.5-cp314-cp314t-win32.whl", hash = "sha256:b4ececa40ac28afa90871c2cc2b9ffd2ff0bf749380fbdf57d165fd23da353aa", size = 1988906, upload-time = "2025-11-04T13:41:56.606Z" }, + { url = "https://files.pythonhosted.org/packages/22/ed/182129d83032702912c2e2d8bbe33c036f342cc735737064668585dac28f/pydantic_core-2.41.5-cp314-cp314t-win_amd64.whl", hash = "sha256:80aa89cad80b32a912a65332f64a4450ed00966111b6615ca6816153d3585a8c", size = 1981607, upload-time = "2025-11-04T13:41:58.889Z" }, + { url = "https://files.pythonhosted.org/packages/9f/ed/068e41660b832bb0b1aa5b58011dea2a3fe0ba7861ff38c4d4904c1c1a99/pydantic_core-2.41.5-cp314-cp314t-win_arm64.whl", hash = "sha256:35b44f37a3199f771c3eaa53051bc8a70cd7b54f333531c59e29fd4db5d15008", size = 1974769, upload-time = "2025-11-04T13:42:01.186Z" }, + { url = "https://files.pythonhosted.org/packages/11/72/90fda5ee3b97e51c494938a4a44c3a35a9c96c19bba12372fb9c634d6f57/pydantic_core-2.41.5-graalpy311-graalpy242_311_native-macosx_10_12_x86_64.whl", hash = "sha256:b96d5f26b05d03cc60f11a7761a5ded1741da411e7fe0909e27a5e6a0cb7b034", size = 2115441, upload-time = "2025-11-04T13:42:39.557Z" }, + { url = "https://files.pythonhosted.org/packages/1f/53/8942f884fa33f50794f119012dc6a1a02ac43a56407adaac20463df8e98f/pydantic_core-2.41.5-graalpy311-graalpy242_311_native-macosx_11_0_arm64.whl", hash = "sha256:634e8609e89ceecea15e2d61bc9ac3718caaaa71963717bf3c8f38bfde64242c", size = 1930291, upload-time = "2025-11-04T13:42:42.169Z" }, + { url = "https://files.pythonhosted.org/packages/79/c8/ecb9ed9cd942bce09fc888ee960b52654fbdbede4ba6c2d6e0d3b1d8b49c/pydantic_core-2.41.5-graalpy311-graalpy242_311_native-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:93e8740d7503eb008aa2df04d3b9735f845d43ae845e6dcd2be0b55a2da43cd2", size = 1948632, upload-time = "2025-11-04T13:42:44.564Z" }, + { url = "https://files.pythonhosted.org/packages/2e/1b/687711069de7efa6af934e74f601e2a4307365e8fdc404703afc453eab26/pydantic_core-2.41.5-graalpy311-graalpy242_311_native-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f15489ba13d61f670dcc96772e733aad1a6f9c429cc27574c6cdaed82d0146ad", size = 2138905, upload-time = "2025-11-04T13:42:47.156Z" }, + { url = "https://files.pythonhosted.org/packages/09/32/59b0c7e63e277fa7911c2fc70ccfb45ce4b98991e7ef37110663437005af/pydantic_core-2.41.5-graalpy312-graalpy250_312_native-macosx_10_12_x86_64.whl", hash = "sha256:7da7087d756b19037bc2c06edc6c170eeef3c3bafcb8f532ff17d64dc427adfd", size = 2110495, upload-time = "2025-11-04T13:42:49.689Z" }, + { url = "https://files.pythonhosted.org/packages/aa/81/05e400037eaf55ad400bcd318c05bb345b57e708887f07ddb2d20e3f0e98/pydantic_core-2.41.5-graalpy312-graalpy250_312_native-macosx_11_0_arm64.whl", hash = "sha256:aabf5777b5c8ca26f7824cb4a120a740c9588ed58df9b2d196ce92fba42ff8dc", size = 1915388, upload-time = "2025-11-04T13:42:52.215Z" }, + { url = "https://files.pythonhosted.org/packages/6e/0d/e3549b2399f71d56476b77dbf3cf8937cec5cd70536bdc0e374a421d0599/pydantic_core-2.41.5-graalpy312-graalpy250_312_native-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c007fe8a43d43b3969e8469004e9845944f1a80e6acd47c150856bb87f230c56", size = 1942879, upload-time = "2025-11-04T13:42:56.483Z" }, + { url = "https://files.pythonhosted.org/packages/f7/07/34573da085946b6a313d7c42f82f16e8920bfd730665de2d11c0c37a74b5/pydantic_core-2.41.5-graalpy312-graalpy250_312_native-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:76d0819de158cd855d1cbb8fcafdf6f5cf1eb8e470abe056d5d161106e38062b", size = 2139017, upload-time = "2025-11-04T13:42:59.471Z" }, + { url = "https://files.pythonhosted.org/packages/5f/9b/1b3f0e9f9305839d7e84912f9e8bfbd191ed1b1ef48083609f0dabde978c/pydantic_core-2.41.5-pp311-pypy311_pp73-macosx_10_12_x86_64.whl", hash = "sha256:b2379fa7ed44ddecb5bfe4e48577d752db9fc10be00a6b7446e9663ba143de26", size = 2101980, upload-time = "2025-11-04T13:43:25.97Z" }, + { url = "https://files.pythonhosted.org/packages/a4/ed/d71fefcb4263df0da6a85b5d8a7508360f2f2e9b3bf5814be9c8bccdccc1/pydantic_core-2.41.5-pp311-pypy311_pp73-macosx_11_0_arm64.whl", hash = "sha256:266fb4cbf5e3cbd0b53669a6d1b039c45e3ce651fd5442eff4d07c2cc8d66808", size = 1923865, upload-time = "2025-11-04T13:43:28.763Z" }, + { url = "https://files.pythonhosted.org/packages/ce/3a/626b38db460d675f873e4444b4bb030453bbe7b4ba55df821d026a0493c4/pydantic_core-2.41.5-pp311-pypy311_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:58133647260ea01e4d0500089a8c4f07bd7aa6ce109682b1426394988d8aaacc", size = 2134256, upload-time = "2025-11-04T13:43:31.71Z" }, + { url = "https://files.pythonhosted.org/packages/83/d9/8412d7f06f616bbc053d30cb4e5f76786af3221462ad5eee1f202021eb4e/pydantic_core-2.41.5-pp311-pypy311_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:287dad91cfb551c363dc62899a80e9e14da1f0e2b6ebde82c806612ca2a13ef1", size = 2174762, upload-time = "2025-11-04T13:43:34.744Z" }, + { url = "https://files.pythonhosted.org/packages/55/4c/162d906b8e3ba3a99354e20faa1b49a85206c47de97a639510a0e673f5da/pydantic_core-2.41.5-pp311-pypy311_pp73-musllinux_1_1_aarch64.whl", hash = "sha256:03b77d184b9eb40240ae9fd676ca364ce1085f203e1b1256f8ab9984dca80a84", size = 2143141, upload-time = "2025-11-04T13:43:37.701Z" }, + { url = "https://files.pythonhosted.org/packages/1f/f2/f11dd73284122713f5f89fc940f370d035fa8e1e078d446b3313955157fe/pydantic_core-2.41.5-pp311-pypy311_pp73-musllinux_1_1_armv7l.whl", hash = "sha256:a668ce24de96165bb239160b3d854943128f4334822900534f2fe947930e5770", size = 2330317, upload-time = "2025-11-04T13:43:40.406Z" }, + { url = "https://files.pythonhosted.org/packages/88/9d/b06ca6acfe4abb296110fb1273a4d848a0bfb2ff65f3ee92127b3244e16b/pydantic_core-2.41.5-pp311-pypy311_pp73-musllinux_1_1_x86_64.whl", hash = "sha256:f14f8f046c14563f8eb3f45f499cc658ab8d10072961e07225e507adb700e93f", size = 2316992, upload-time = "2025-11-04T13:43:43.602Z" }, + { url = "https://files.pythonhosted.org/packages/36/c7/cfc8e811f061c841d7990b0201912c3556bfeb99cdcb7ed24adc8d6f8704/pydantic_core-2.41.5-pp311-pypy311_pp73-win_amd64.whl", hash = "sha256:56121965f7a4dc965bff783d70b907ddf3d57f6eba29b6d2e5dabfaf07799c51", size = 2145302, upload-time = "2025-11-04T13:43:46.64Z" }, +] + +[[package]] +name = "pydantic-settings" +version = "2.13.1" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "pydantic" }, + { name = "python-dotenv" }, + { name = "typing-inspection" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/52/6d/fffca34caecc4a3f97bda81b2098da5e8ab7efc9a66e819074a11955d87e/pydantic_settings-2.13.1.tar.gz", hash = "sha256:b4c11847b15237fb0171e1462bf540e294affb9b86db4d9aa5c01730bdbe4025", size = 223826, upload-time = "2026-02-19T13:45:08.055Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/00/4b/ccc026168948fec4f7555b9164c724cf4125eac006e176541483d2c959be/pydantic_settings-2.13.1-py3-none-any.whl", hash = "sha256:d56fd801823dbeae7f0975e1f8c8e25c258eb75d278ea7abb5d9cebb01b56237", size = 58929, upload-time = "2026-02-19T13:45:06.034Z" }, +] + +[[package]] +name = "pydub" +version = "0.25.1" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/fe/9a/e6bca0eed82db26562c73b5076539a4a08d3cffd19c3cc5913a3e61145fd/pydub-0.25.1.tar.gz", hash = "sha256:980a33ce9949cab2a569606b65674d748ecbca4f0796887fd6f46173a7b0d30f", size = 38326, upload-time = "2021-03-10T02:09:54.659Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/a6/53/d78dc063216e62fc55f6b2eebb447f6a4b0a59f55c8406376f76bf959b08/pydub-0.25.1-py2.py3-none-any.whl", hash = "sha256:65617e33033874b59d87db603aa1ed450633288aefead953b30bded59cb599a6", size = 32327, upload-time = "2021-03-10T02:09:53.503Z" }, +] + +[[package]] +name = "pygments" +version = "2.20.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/c3/b2/bc9c9196916376152d655522fdcebac55e66de6603a76a02bca1b6414f6c/pygments-2.20.0.tar.gz", hash = "sha256:6757cd03768053ff99f3039c1a36d6c0aa0b263438fcab17520b30a303a82b5f", size = 4955991, upload-time = "2026-03-29T13:29:33.898Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/f4/7e/a72dd26f3b0f4f2bf1dd8923c85f7ceb43172af56d63c7383eb62b332364/pygments-2.20.0-py3-none-any.whl", hash = "sha256:81a9e26dd42fd28a23a2d169d86d7ac03b46e2f8b59ed4698fb4785f946d0176", size = 1231151, upload-time = "2026-03-29T13:29:30.038Z" }, +] + +[[package]] +name = "pyjwt" +version = "2.12.1" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/c2/27/a3b6e5bf6ff856d2509292e95c8f57f0df7017cf5394921fc4e4ef40308a/pyjwt-2.12.1.tar.gz", hash = "sha256:c74a7a2adf861c04d002db713dd85f84beb242228e671280bf709d765b03672b", size = 102564, upload-time = "2026-03-13T19:27:37.25Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/e5/7a/8dd906bd22e79e47397a61742927f6747fe93242ef86645ee9092e610244/pyjwt-2.12.1-py3-none-any.whl", hash = "sha256:28ca37c070cad8ba8cd9790cd940535d40274d22f80ab87f3ac6a713e6e8454c", size = 29726, upload-time = "2026-03-13T19:27:35.677Z" }, +] + +[package.optional-dependencies] +crypto = [ + { name = "cryptography" }, +] + +[[package]] +name = "pyperclip" +version = "1.11.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/e8/52/d87eba7cb129b81563019d1679026e7a112ef76855d6159d24754dbd2a51/pyperclip-1.11.0.tar.gz", hash = "sha256:244035963e4428530d9e3a6101a1ef97209c6825edab1567beac148ccc1db1b6", size = 12185, upload-time = "2025-09-26T14:40:37.245Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/df/80/fc9d01d5ed37ba4c42ca2b55b4339ae6e200b456be3a1aaddf4a9fa99b8c/pyperclip-1.11.0-py3-none-any.whl", hash = "sha256:299403e9ff44581cb9ba2ffeed69c7aa96a008622ad0c46cb575ca75b5b84273", size = 11063, upload-time = "2025-09-26T14:40:36.069Z" }, +] + +[[package]] +name = "pytest" +version = "9.0.2" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "colorama", marker = "sys_platform == 'win32'" }, + { name = "iniconfig" }, + { name = "packaging" }, + { name = "pluggy" }, + { name = "pygments" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/d1/db/7ef3487e0fb0049ddb5ce41d3a49c235bf9ad299b6a25d5780a89f19230f/pytest-9.0.2.tar.gz", hash = "sha256:75186651a92bd89611d1d9fc20f0b4345fd827c41ccd5c299a868a05d70edf11", size = 1568901, upload-time = "2025-12-06T21:30:51.014Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/3b/ab/b3226f0bd7cdcf710fbede2b3548584366da3b19b5021e74f5bde2a8fa3f/pytest-9.0.2-py3-none-any.whl", hash = "sha256:711ffd45bf766d5264d487b917733b453d917afd2b0ad65223959f59089f875b", size = 374801, upload-time = "2025-12-06T21:30:49.154Z" }, +] + +[[package]] +name = "python-dateutil" +version = "2.9.0.post0" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "six" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/66/c0/0c8b6ad9f17a802ee498c46e004a0eb49bc148f2fd230864601a86dcf6db/python-dateutil-2.9.0.post0.tar.gz", hash = "sha256:37dd54208da7e1cd875388217d5e00ebd4179249f90fb72437e91a35459a0ad3", size = 342432, upload-time = "2024-03-01T18:36:20.211Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/ec/57/56b9bcc3c9c6a792fcbaf139543cee77261f3651ca9da0c93f5c1221264b/python_dateutil-2.9.0.post0-py2.py3-none-any.whl", hash = "sha256:a8b2bc7bffae282281c8140a97d3aa9c14da0b136dfe83f850eea9a5f7470427", size = 229892, upload-time = "2024-03-01T18:36:18.57Z" }, +] + +[[package]] +name = "python-dotenv" +version = "1.2.2" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/82/ed/0301aeeac3e5353ef3d94b6ec08bbcabd04a72018415dcb29e588514bba8/python_dotenv-1.2.2.tar.gz", hash = "sha256:2c371a91fbd7ba082c2c1dc1f8bf89ca22564a087c2c287cd9b662adde799cf3", size = 50135, upload-time = "2026-03-01T16:00:26.196Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/0b/d7/1959b9648791274998a9c3526f6d0ec8fd2233e4d4acce81bbae76b44b2a/python_dotenv-1.2.2-py3-none-any.whl", hash = "sha256:1d8214789a24de455a8b8bd8ae6fe3c6b69a5e3d64aa8a8e5d68e694bbcb285a", size = 22101, upload-time = "2026-03-01T16:00:25.09Z" }, +] + +[[package]] +name = "python-multipart" +version = "0.0.22" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/94/01/979e98d542a70714b0cb2b6728ed0b7c46792b695e3eaec3e20711271ca3/python_multipart-0.0.22.tar.gz", hash = "sha256:7340bef99a7e0032613f56dc36027b959fd3b30a787ed62d310e951f7c3a3a58", size = 37612, upload-time = "2026-01-25T10:15:56.219Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/1b/d0/397f9626e711ff749a95d96b7af99b9c566a9bb5129b8e4c10fc4d100304/python_multipart-0.0.22-py3-none-any.whl", hash = "sha256:2b2cd894c83d21bf49d702499531c7bafd057d730c201782048f7945d82de155", size = 24579, upload-time = "2026-01-25T10:15:54.811Z" }, +] + +[[package]] +name = "pytz" +version = "2026.1.post1" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/56/db/b8721d71d945e6a8ac63c0fc900b2067181dbb50805958d4d4661cf7d277/pytz-2026.1.post1.tar.gz", hash = "sha256:3378dde6a0c3d26719182142c56e60c7f9af7e968076f31aae569d72a0358ee1", size = 321088, upload-time = "2026-03-03T07:47:50.683Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/10/99/781fe0c827be2742bcc775efefccb3b048a3a9c6ce9aec0cbf4a101677e5/pytz-2026.1.post1-py2.py3-none-any.whl", hash = "sha256:f2fd16142fda348286a75e1a524be810bb05d444e5a081f37f7affc635035f7a", size = 510489, upload-time = "2026-03-03T07:47:49.167Z" }, +] + +[[package]] +name = "pywin32" +version = "311" +source = { registry = "https://pypi.org/simple" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/7c/af/449a6a91e5d6db51420875c54f6aff7c97a86a3b13a0b4f1a5c13b988de3/pywin32-311-cp311-cp311-win32.whl", hash = "sha256:184eb5e436dea364dcd3d2316d577d625c0351bf237c4e9a5fabbcfa5a58b151", size = 8697031, upload-time = "2025-07-14T20:13:13.266Z" }, + { url = "https://files.pythonhosted.org/packages/51/8f/9bb81dd5bb77d22243d33c8397f09377056d5c687aa6d4042bea7fbf8364/pywin32-311-cp311-cp311-win_amd64.whl", hash = "sha256:3ce80b34b22b17ccbd937a6e78e7225d80c52f5ab9940fe0506a1a16f3dab503", size = 9508308, upload-time = "2025-07-14T20:13:15.147Z" }, + { url = "https://files.pythonhosted.org/packages/44/7b/9c2ab54f74a138c491aba1b1cd0795ba61f144c711daea84a88b63dc0f6c/pywin32-311-cp311-cp311-win_arm64.whl", hash = "sha256:a733f1388e1a842abb67ffa8e7aad0e70ac519e09b0f6a784e65a136ec7cefd2", size = 8703930, upload-time = "2025-07-14T20:13:16.945Z" }, + { url = "https://files.pythonhosted.org/packages/e7/ab/01ea1943d4eba0f850c3c61e78e8dd59757ff815ff3ccd0a84de5f541f42/pywin32-311-cp312-cp312-win32.whl", hash = "sha256:750ec6e621af2b948540032557b10a2d43b0cee2ae9758c54154d711cc852d31", size = 8706543, upload-time = "2025-07-14T20:13:20.765Z" }, + { url = "https://files.pythonhosted.org/packages/d1/a8/a0e8d07d4d051ec7502cd58b291ec98dcc0c3fff027caad0470b72cfcc2f/pywin32-311-cp312-cp312-win_amd64.whl", hash = "sha256:b8c095edad5c211ff31c05223658e71bf7116daa0ecf3ad85f3201ea3190d067", size = 9495040, upload-time = "2025-07-14T20:13:22.543Z" }, + { url = "https://files.pythonhosted.org/packages/ba/3a/2ae996277b4b50f17d61f0603efd8253cb2d79cc7ae159468007b586396d/pywin32-311-cp312-cp312-win_arm64.whl", hash = "sha256:e286f46a9a39c4a18b319c28f59b61de793654af2f395c102b4f819e584b5852", size = 8710102, upload-time = "2025-07-14T20:13:24.682Z" }, + { url = "https://files.pythonhosted.org/packages/a5/be/3fd5de0979fcb3994bfee0d65ed8ca9506a8a1260651b86174f6a86f52b3/pywin32-311-cp313-cp313-win32.whl", hash = "sha256:f95ba5a847cba10dd8c4d8fefa9f2a6cf283b8b88ed6178fa8a6c1ab16054d0d", size = 8705700, upload-time = "2025-07-14T20:13:26.471Z" }, + { url = "https://files.pythonhosted.org/packages/e3/28/e0a1909523c6890208295a29e05c2adb2126364e289826c0a8bc7297bd5c/pywin32-311-cp313-cp313-win_amd64.whl", hash = "sha256:718a38f7e5b058e76aee1c56ddd06908116d35147e133427e59a3983f703a20d", size = 9494700, upload-time = "2025-07-14T20:13:28.243Z" }, + { url = "https://files.pythonhosted.org/packages/04/bf/90339ac0f55726dce7d794e6d79a18a91265bdf3aa70b6b9ca52f35e022a/pywin32-311-cp313-cp313-win_arm64.whl", hash = "sha256:7b4075d959648406202d92a2310cb990fea19b535c7f4a78d3f5e10b926eeb8a", size = 8709318, upload-time = "2025-07-14T20:13:30.348Z" }, + { url = "https://files.pythonhosted.org/packages/c9/31/097f2e132c4f16d99a22bfb777e0fd88bd8e1c634304e102f313af69ace5/pywin32-311-cp314-cp314-win32.whl", hash = "sha256:b7a2c10b93f8986666d0c803ee19b5990885872a7de910fc460f9b0c2fbf92ee", size = 8840714, upload-time = "2025-07-14T20:13:32.449Z" }, + { url = "https://files.pythonhosted.org/packages/90/4b/07c77d8ba0e01349358082713400435347df8426208171ce297da32c313d/pywin32-311-cp314-cp314-win_amd64.whl", hash = "sha256:3aca44c046bd2ed8c90de9cb8427f581c479e594e99b5c0bb19b29c10fd6cb87", size = 9656800, upload-time = "2025-07-14T20:13:34.312Z" }, + { url = "https://files.pythonhosted.org/packages/c0/d2/21af5c535501a7233e734b8af901574572da66fcc254cb35d0609c9080dd/pywin32-311-cp314-cp314-win_arm64.whl", hash = "sha256:a508e2d9025764a8270f93111a970e1d0fbfc33f4153b388bb649b7eec4f9b42", size = 8932540, upload-time = "2025-07-14T20:13:36.379Z" }, +] + +[[package]] +name = "pywin32-ctypes" +version = "0.2.3" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/85/9f/01a1a99704853cb63f253eea009390c88e7131c67e66a0a02099a8c917cb/pywin32-ctypes-0.2.3.tar.gz", hash = "sha256:d162dc04946d704503b2edc4d55f3dba5c1d539ead017afa00142c38b9885755", size = 29471, upload-time = "2024-08-14T10:15:34.626Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/de/3d/8161f7711c017e01ac9f008dfddd9410dff3674334c233bde66e7ba65bbf/pywin32_ctypes-0.2.3-py3-none-any.whl", hash = "sha256:8a1513379d709975552d202d942d9837758905c8d01eb82b8bcc30918929e7b8", size = 30756, upload-time = "2024-08-14T10:15:33.187Z" }, +] + +[[package]] +name = "pyyaml" +version = "6.0.3" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/05/8e/961c0007c59b8dd7729d542c61a4d537767a59645b82a0b521206e1e25c2/pyyaml-6.0.3.tar.gz", hash = "sha256:d76623373421df22fb4cf8817020cbb7ef15c725b9d5e45f17e189bfc384190f", size = 130960, upload-time = "2025-09-25T21:33:16.546Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/6d/16/a95b6757765b7b031c9374925bb718d55e0a9ba8a1b6a12d25962ea44347/pyyaml-6.0.3-cp311-cp311-macosx_10_13_x86_64.whl", hash = "sha256:44edc647873928551a01e7a563d7452ccdebee747728c1080d881d68af7b997e", size = 185826, upload-time = "2025-09-25T21:31:58.655Z" }, + { url = "https://files.pythonhosted.org/packages/16/19/13de8e4377ed53079ee996e1ab0a9c33ec2faf808a4647b7b4c0d46dd239/pyyaml-6.0.3-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:652cb6edd41e718550aad172851962662ff2681490a8a711af6a4d288dd96824", size = 175577, upload-time = "2025-09-25T21:32:00.088Z" }, + { url = "https://files.pythonhosted.org/packages/0c/62/d2eb46264d4b157dae1275b573017abec435397aa59cbcdab6fc978a8af4/pyyaml-6.0.3-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:10892704fc220243f5305762e276552a0395f7beb4dbf9b14ec8fd43b57f126c", size = 775556, upload-time = "2025-09-25T21:32:01.31Z" }, + { url = "https://files.pythonhosted.org/packages/10/cb/16c3f2cf3266edd25aaa00d6c4350381c8b012ed6f5276675b9eba8d9ff4/pyyaml-6.0.3-cp311-cp311-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:850774a7879607d3a6f50d36d04f00ee69e7fc816450e5f7e58d7f17f1ae5c00", size = 882114, upload-time = "2025-09-25T21:32:03.376Z" }, + { url = "https://files.pythonhosted.org/packages/71/60/917329f640924b18ff085ab889a11c763e0b573da888e8404ff486657602/pyyaml-6.0.3-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:b8bb0864c5a28024fac8a632c443c87c5aa6f215c0b126c449ae1a150412f31d", size = 806638, upload-time = "2025-09-25T21:32:04.553Z" }, + { url = "https://files.pythonhosted.org/packages/dd/6f/529b0f316a9fd167281a6c3826b5583e6192dba792dd55e3203d3f8e655a/pyyaml-6.0.3-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:1d37d57ad971609cf3c53ba6a7e365e40660e3be0e5175fa9f2365a379d6095a", size = 767463, upload-time = "2025-09-25T21:32:06.152Z" }, + { url = "https://files.pythonhosted.org/packages/f2/6a/b627b4e0c1dd03718543519ffb2f1deea4a1e6d42fbab8021936a4d22589/pyyaml-6.0.3-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:37503bfbfc9d2c40b344d06b2199cf0e96e97957ab1c1b546fd4f87e53e5d3e4", size = 794986, upload-time = "2025-09-25T21:32:07.367Z" }, + { url = "https://files.pythonhosted.org/packages/45/91/47a6e1c42d9ee337c4839208f30d9f09caa9f720ec7582917b264defc875/pyyaml-6.0.3-cp311-cp311-win32.whl", hash = "sha256:8098f252adfa6c80ab48096053f512f2321f0b998f98150cea9bd23d83e1467b", size = 142543, upload-time = "2025-09-25T21:32:08.95Z" }, + { url = "https://files.pythonhosted.org/packages/da/e3/ea007450a105ae919a72393cb06f122f288ef60bba2dc64b26e2646fa315/pyyaml-6.0.3-cp311-cp311-win_amd64.whl", hash = "sha256:9f3bfb4965eb874431221a3ff3fdcddc7e74e3b07799e0e84ca4a0f867d449bf", size = 158763, upload-time = "2025-09-25T21:32:09.96Z" }, + { url = "https://files.pythonhosted.org/packages/d1/33/422b98d2195232ca1826284a76852ad5a86fe23e31b009c9886b2d0fb8b2/pyyaml-6.0.3-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:7f047e29dcae44602496db43be01ad42fc6f1cc0d8cd6c83d342306c32270196", size = 182063, upload-time = "2025-09-25T21:32:11.445Z" }, + { url = "https://files.pythonhosted.org/packages/89/a0/6cf41a19a1f2f3feab0e9c0b74134aa2ce6849093d5517a0c550fe37a648/pyyaml-6.0.3-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:fc09d0aa354569bc501d4e787133afc08552722d3ab34836a80547331bb5d4a0", size = 173973, upload-time = "2025-09-25T21:32:12.492Z" }, + { url = "https://files.pythonhosted.org/packages/ed/23/7a778b6bd0b9a8039df8b1b1d80e2e2ad78aa04171592c8a5c43a56a6af4/pyyaml-6.0.3-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:9149cad251584d5fb4981be1ecde53a1ca46c891a79788c0df828d2f166bda28", size = 775116, upload-time = "2025-09-25T21:32:13.652Z" }, + { url = "https://files.pythonhosted.org/packages/65/30/d7353c338e12baef4ecc1b09e877c1970bd3382789c159b4f89d6a70dc09/pyyaml-6.0.3-cp312-cp312-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:5fdec68f91a0c6739b380c83b951e2c72ac0197ace422360e6d5a959d8d97b2c", size = 844011, upload-time = "2025-09-25T21:32:15.21Z" }, + { url = "https://files.pythonhosted.org/packages/8b/9d/b3589d3877982d4f2329302ef98a8026e7f4443c765c46cfecc8858c6b4b/pyyaml-6.0.3-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:ba1cc08a7ccde2d2ec775841541641e4548226580ab850948cbfda66a1befcdc", size = 807870, upload-time = "2025-09-25T21:32:16.431Z" }, + { url = "https://files.pythonhosted.org/packages/05/c0/b3be26a015601b822b97d9149ff8cb5ead58c66f981e04fedf4e762f4bd4/pyyaml-6.0.3-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:8dc52c23056b9ddd46818a57b78404882310fb473d63f17b07d5c40421e47f8e", size = 761089, upload-time = "2025-09-25T21:32:17.56Z" }, + { url = "https://files.pythonhosted.org/packages/be/8e/98435a21d1d4b46590d5459a22d88128103f8da4c2d4cb8f14f2a96504e1/pyyaml-6.0.3-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:41715c910c881bc081f1e8872880d3c650acf13dfa8214bad49ed4cede7c34ea", size = 790181, upload-time = "2025-09-25T21:32:18.834Z" }, + { url = "https://files.pythonhosted.org/packages/74/93/7baea19427dcfbe1e5a372d81473250b379f04b1bd3c4c5ff825e2327202/pyyaml-6.0.3-cp312-cp312-win32.whl", hash = "sha256:96b533f0e99f6579b3d4d4995707cf36df9100d67e0c8303a0c55b27b5f99bc5", size = 137658, upload-time = "2025-09-25T21:32:20.209Z" }, + { url = "https://files.pythonhosted.org/packages/86/bf/899e81e4cce32febab4fb42bb97dcdf66bc135272882d1987881a4b519e9/pyyaml-6.0.3-cp312-cp312-win_amd64.whl", hash = "sha256:5fcd34e47f6e0b794d17de1b4ff496c00986e1c83f7ab2fb8fcfe9616ff7477b", size = 154003, upload-time = "2025-09-25T21:32:21.167Z" }, + { url = "https://files.pythonhosted.org/packages/1a/08/67bd04656199bbb51dbed1439b7f27601dfb576fb864099c7ef0c3e55531/pyyaml-6.0.3-cp312-cp312-win_arm64.whl", hash = "sha256:64386e5e707d03a7e172c0701abfb7e10f0fb753ee1d773128192742712a98fd", size = 140344, upload-time = "2025-09-25T21:32:22.617Z" }, + { url = "https://files.pythonhosted.org/packages/d1/11/0fd08f8192109f7169db964b5707a2f1e8b745d4e239b784a5a1dd80d1db/pyyaml-6.0.3-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:8da9669d359f02c0b91ccc01cac4a67f16afec0dac22c2ad09f46bee0697eba8", size = 181669, upload-time = "2025-09-25T21:32:23.673Z" }, + { url = "https://files.pythonhosted.org/packages/b1/16/95309993f1d3748cd644e02e38b75d50cbc0d9561d21f390a76242ce073f/pyyaml-6.0.3-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:2283a07e2c21a2aa78d9c4442724ec1eb15f5e42a723b99cb3d822d48f5f7ad1", size = 173252, upload-time = "2025-09-25T21:32:25.149Z" }, + { url = "https://files.pythonhosted.org/packages/50/31/b20f376d3f810b9b2371e72ef5adb33879b25edb7a6d072cb7ca0c486398/pyyaml-6.0.3-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:ee2922902c45ae8ccada2c5b501ab86c36525b883eff4255313a253a3160861c", size = 767081, upload-time = "2025-09-25T21:32:26.575Z" }, + { url = "https://files.pythonhosted.org/packages/49/1e/a55ca81e949270d5d4432fbbd19dfea5321eda7c41a849d443dc92fd1ff7/pyyaml-6.0.3-cp313-cp313-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:a33284e20b78bd4a18c8c2282d549d10bc8408a2a7ff57653c0cf0b9be0afce5", size = 841159, upload-time = "2025-09-25T21:32:27.727Z" }, + { url = "https://files.pythonhosted.org/packages/74/27/e5b8f34d02d9995b80abcef563ea1f8b56d20134d8f4e5e81733b1feceb2/pyyaml-6.0.3-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:0f29edc409a6392443abf94b9cf89ce99889a1dd5376d94316ae5145dfedd5d6", size = 801626, upload-time = "2025-09-25T21:32:28.878Z" }, + { url = "https://files.pythonhosted.org/packages/f9/11/ba845c23988798f40e52ba45f34849aa8a1f2d4af4b798588010792ebad6/pyyaml-6.0.3-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:f7057c9a337546edc7973c0d3ba84ddcdf0daa14533c2065749c9075001090e6", size = 753613, upload-time = "2025-09-25T21:32:30.178Z" }, + { url = "https://files.pythonhosted.org/packages/3d/e0/7966e1a7bfc0a45bf0a7fb6b98ea03fc9b8d84fa7f2229e9659680b69ee3/pyyaml-6.0.3-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:eda16858a3cab07b80edaf74336ece1f986ba330fdb8ee0d6c0d68fe82bc96be", size = 794115, upload-time = "2025-09-25T21:32:31.353Z" }, + { url = "https://files.pythonhosted.org/packages/de/94/980b50a6531b3019e45ddeada0626d45fa85cbe22300844a7983285bed3b/pyyaml-6.0.3-cp313-cp313-win32.whl", hash = "sha256:d0eae10f8159e8fdad514efdc92d74fd8d682c933a6dd088030f3834bc8e6b26", size = 137427, upload-time = "2025-09-25T21:32:32.58Z" }, + { url = "https://files.pythonhosted.org/packages/97/c9/39d5b874e8b28845e4ec2202b5da735d0199dbe5b8fb85f91398814a9a46/pyyaml-6.0.3-cp313-cp313-win_amd64.whl", hash = "sha256:79005a0d97d5ddabfeeea4cf676af11e647e41d81c9a7722a193022accdb6b7c", size = 154090, upload-time = "2025-09-25T21:32:33.659Z" }, + { url = "https://files.pythonhosted.org/packages/73/e8/2bdf3ca2090f68bb3d75b44da7bbc71843b19c9f2b9cb9b0f4ab7a5a4329/pyyaml-6.0.3-cp313-cp313-win_arm64.whl", hash = "sha256:5498cd1645aa724a7c71c8f378eb29ebe23da2fc0d7a08071d89469bf1d2defb", size = 140246, upload-time = "2025-09-25T21:32:34.663Z" }, + { url = "https://files.pythonhosted.org/packages/9d/8c/f4bd7f6465179953d3ac9bc44ac1a8a3e6122cf8ada906b4f96c60172d43/pyyaml-6.0.3-cp314-cp314-macosx_10_13_x86_64.whl", hash = "sha256:8d1fab6bb153a416f9aeb4b8763bc0f22a5586065f86f7664fc23339fc1c1fac", size = 181814, upload-time = "2025-09-25T21:32:35.712Z" }, + { url = "https://files.pythonhosted.org/packages/bd/9c/4d95bb87eb2063d20db7b60faa3840c1b18025517ae857371c4dd55a6b3a/pyyaml-6.0.3-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:34d5fcd24b8445fadc33f9cf348c1047101756fd760b4dacb5c3e99755703310", size = 173809, upload-time = "2025-09-25T21:32:36.789Z" }, + { url = "https://files.pythonhosted.org/packages/92/b5/47e807c2623074914e29dabd16cbbdd4bf5e9b2db9f8090fa64411fc5382/pyyaml-6.0.3-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:501a031947e3a9025ed4405a168e6ef5ae3126c59f90ce0cd6f2bfc477be31b7", size = 766454, upload-time = "2025-09-25T21:32:37.966Z" }, + { url = "https://files.pythonhosted.org/packages/02/9e/e5e9b168be58564121efb3de6859c452fccde0ab093d8438905899a3a483/pyyaml-6.0.3-cp314-cp314-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:b3bc83488de33889877a0f2543ade9f70c67d66d9ebb4ac959502e12de895788", size = 836355, upload-time = "2025-09-25T21:32:39.178Z" }, + { url = "https://files.pythonhosted.org/packages/88/f9/16491d7ed2a919954993e48aa941b200f38040928474c9e85ea9e64222c3/pyyaml-6.0.3-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:c458b6d084f9b935061bc36216e8a69a7e293a2f1e68bf956dcd9e6cbcd143f5", size = 794175, upload-time = "2025-09-25T21:32:40.865Z" }, + { url = "https://files.pythonhosted.org/packages/dd/3f/5989debef34dc6397317802b527dbbafb2b4760878a53d4166579111411e/pyyaml-6.0.3-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:7c6610def4f163542a622a73fb39f534f8c101d690126992300bf3207eab9764", size = 755228, upload-time = "2025-09-25T21:32:42.084Z" }, + { url = "https://files.pythonhosted.org/packages/d7/ce/af88a49043cd2e265be63d083fc75b27b6ed062f5f9fd6cdc223ad62f03e/pyyaml-6.0.3-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:5190d403f121660ce8d1d2c1bb2ef1bd05b5f68533fc5c2ea899bd15f4399b35", size = 789194, upload-time = "2025-09-25T21:32:43.362Z" }, + { url = "https://files.pythonhosted.org/packages/23/20/bb6982b26a40bb43951265ba29d4c246ef0ff59c9fdcdf0ed04e0687de4d/pyyaml-6.0.3-cp314-cp314-win_amd64.whl", hash = "sha256:4a2e8cebe2ff6ab7d1050ecd59c25d4c8bd7e6f400f5f82b96557ac0abafd0ac", size = 156429, upload-time = "2025-09-25T21:32:57.844Z" }, + { url = "https://files.pythonhosted.org/packages/f4/f4/a4541072bb9422c8a883ab55255f918fa378ecf083f5b85e87fc2b4eda1b/pyyaml-6.0.3-cp314-cp314-win_arm64.whl", hash = "sha256:93dda82c9c22deb0a405ea4dc5f2d0cda384168e466364dec6255b293923b2f3", size = 143912, upload-time = "2025-09-25T21:32:59.247Z" }, + { url = "https://files.pythonhosted.org/packages/7c/f9/07dd09ae774e4616edf6cda684ee78f97777bdd15847253637a6f052a62f/pyyaml-6.0.3-cp314-cp314t-macosx_10_13_x86_64.whl", hash = "sha256:02893d100e99e03eda1c8fd5c441d8c60103fd175728e23e431db1b589cf5ab3", size = 189108, upload-time = "2025-09-25T21:32:44.377Z" }, + { url = "https://files.pythonhosted.org/packages/4e/78/8d08c9fb7ce09ad8c38ad533c1191cf27f7ae1effe5bb9400a46d9437fcf/pyyaml-6.0.3-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:c1ff362665ae507275af2853520967820d9124984e0f7466736aea23d8611fba", size = 183641, upload-time = "2025-09-25T21:32:45.407Z" }, + { url = "https://files.pythonhosted.org/packages/7b/5b/3babb19104a46945cf816d047db2788bcaf8c94527a805610b0289a01c6b/pyyaml-6.0.3-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:6adc77889b628398debc7b65c073bcb99c4a0237b248cacaf3fe8a557563ef6c", size = 831901, upload-time = "2025-09-25T21:32:48.83Z" }, + { url = "https://files.pythonhosted.org/packages/8b/cc/dff0684d8dc44da4d22a13f35f073d558c268780ce3c6ba1b87055bb0b87/pyyaml-6.0.3-cp314-cp314t-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:a80cb027f6b349846a3bf6d73b5e95e782175e52f22108cfa17876aaeff93702", size = 861132, upload-time = "2025-09-25T21:32:50.149Z" }, + { url = "https://files.pythonhosted.org/packages/b1/5e/f77dc6b9036943e285ba76b49e118d9ea929885becb0a29ba8a7c75e29fe/pyyaml-6.0.3-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:00c4bdeba853cc34e7dd471f16b4114f4162dc03e6b7afcc2128711f0eca823c", size = 839261, upload-time = "2025-09-25T21:32:51.808Z" }, + { url = "https://files.pythonhosted.org/packages/ce/88/a9db1376aa2a228197c58b37302f284b5617f56a5d959fd1763fb1675ce6/pyyaml-6.0.3-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:66e1674c3ef6f541c35191caae2d429b967b99e02040f5ba928632d9a7f0f065", size = 805272, upload-time = "2025-09-25T21:32:52.941Z" }, + { url = "https://files.pythonhosted.org/packages/da/92/1446574745d74df0c92e6aa4a7b0b3130706a4142b2d1a5869f2eaa423c6/pyyaml-6.0.3-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:16249ee61e95f858e83976573de0f5b2893b3677ba71c9dd36b9cf8be9ac6d65", size = 829923, upload-time = "2025-09-25T21:32:54.537Z" }, + { url = "https://files.pythonhosted.org/packages/f0/7a/1c7270340330e575b92f397352af856a8c06f230aa3e76f86b39d01b416a/pyyaml-6.0.3-cp314-cp314t-win_amd64.whl", hash = "sha256:4ad1906908f2f5ae4e5a8ddfce73c320c2a1429ec52eafd27138b7f1cbe341c9", size = 174062, upload-time = "2025-09-25T21:32:55.767Z" }, + { url = "https://files.pythonhosted.org/packages/f1/12/de94a39c2ef588c7e6455cfbe7343d3b2dc9d6b6b2f40c4c6565744c873d/pyyaml-6.0.3-cp314-cp314t-win_arm64.whl", hash = "sha256:ebc55a14a21cb14062aa4162f906cd962b28e2e9ea38f9b4391244cd8de4ae0b", size = 149341, upload-time = "2025-09-25T21:32:56.828Z" }, +] + +[[package]] +name = "referencing" +version = "0.37.0" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "attrs" }, + { name = "rpds-py" }, + { name = "typing-extensions", marker = "python_full_version < '3.13'" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/22/f5/df4e9027acead3ecc63e50fe1e36aca1523e1719559c499951bb4b53188f/referencing-0.37.0.tar.gz", hash = "sha256:44aefc3142c5b842538163acb373e24cce6632bd54bdb01b21ad5863489f50d8", size = 78036, upload-time = "2025-10-13T15:30:48.871Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/2c/58/ca301544e1fa93ed4f80d724bf5b194f6e4b945841c5bfd555878eea9fcb/referencing-0.37.0-py3-none-any.whl", hash = "sha256:381329a9f99628c9069361716891d34ad94af76e461dcb0335825aecc7692231", size = 26766, upload-time = "2025-10-13T15:30:47.625Z" }, +] + +[[package]] +name = "requests" +version = "2.33.1" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "certifi" }, + { name = "charset-normalizer" }, + { name = "idna" }, + { name = "urllib3" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/5f/a4/98b9c7c6428a668bf7e42ebb7c79d576a1c3c1e3ae2d47e674b468388871/requests-2.33.1.tar.gz", hash = "sha256:18817f8c57c6263968bc123d237e3b8b08ac046f5456bd1e307ee8f4250d3517", size = 134120, upload-time = "2026-03-30T16:09:15.531Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/d7/8e/7540e8a2036f79a125c1d2ebadf69ed7901608859186c856fa0388ef4197/requests-2.33.1-py3-none-any.whl", hash = "sha256:4e6d1ef462f3626a1f0a0a9c42dd93c63bad33f9f1c1937509b8c5c8718ab56a", size = 64947, upload-time = "2026-03-30T16:09:13.83Z" }, +] + +[[package]] +name = "rich" +version = "14.3.3" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "markdown-it-py" }, + { name = "pygments" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/b3/c6/f3b320c27991c46f43ee9d856302c70dc2d0fb2dba4842ff739d5f46b393/rich-14.3.3.tar.gz", hash = "sha256:b8daa0b9e4eef54dd8cf7c86c03713f53241884e814f4e2f5fb342fe520f639b", size = 230582, upload-time = "2026-02-19T17:23:12.474Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/14/25/b208c5683343959b670dc001595f2f3737e051da617f66c31f7c4fa93abc/rich-14.3.3-py3-none-any.whl", hash = "sha256:793431c1f8619afa7d3b52b2cdec859562b950ea0d4b6b505397612db8d5362d", size = 310458, upload-time = "2026-02-19T17:23:13.732Z" }, +] + +[[package]] +name = "rich-rst" +version = "1.3.2" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "docutils" }, + { name = "rich" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/bc/6d/a506aaa4a9eaa945ed8ab2b7347859f53593864289853c5d6d62b77246e0/rich_rst-1.3.2.tar.gz", hash = "sha256:a1196fdddf1e364b02ec68a05e8ff8f6914fee10fbca2e6b6735f166bb0da8d4", size = 14936, upload-time = "2025-10-14T16:49:45.332Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/13/2f/b4530fbf948867702d0a3f27de4a6aab1d156f406d72852ab902c4d04de9/rich_rst-1.3.2-py3-none-any.whl", hash = "sha256:a99b4907cbe118cf9d18b0b44de272efa61f15117c61e39ebdc431baf5df722a", size = 12567, upload-time = "2025-10-14T16:49:42.953Z" }, +] + +[[package]] +name = "rpds-py" +version = "0.30.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/20/af/3f2f423103f1113b36230496629986e0ef7e199d2aa8392452b484b38ced/rpds_py-0.30.0.tar.gz", hash = "sha256:dd8ff7cf90014af0c0f787eea34794ebf6415242ee1d6fa91eaba725cc441e84", size = 69469, upload-time = "2025-11-30T20:24:38.837Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/4d/6e/f964e88b3d2abee2a82c1ac8366da848fce1c6d834dc2132c3fda3970290/rpds_py-0.30.0-cp311-cp311-macosx_10_12_x86_64.whl", hash = "sha256:a2bffea6a4ca9f01b3f8e548302470306689684e61602aa3d141e34da06cf425", size = 370157, upload-time = "2025-11-30T20:21:53.789Z" }, + { url = "https://files.pythonhosted.org/packages/94/ba/24e5ebb7c1c82e74c4e4f33b2112a5573ddc703915b13a073737b59b86e0/rpds_py-0.30.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:dc4f992dfe1e2bc3ebc7444f6c7051b4bc13cd8e33e43511e8ffd13bf407010d", size = 359676, upload-time = "2025-11-30T20:21:55.475Z" }, + { url = "https://files.pythonhosted.org/packages/84/86/04dbba1b087227747d64d80c3b74df946b986c57af0a9f0c98726d4d7a3b/rpds_py-0.30.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:422c3cb9856d80b09d30d2eb255d0754b23e090034e1deb4083f8004bd0761e4", size = 389938, upload-time = "2025-11-30T20:21:57.079Z" }, + { url = "https://files.pythonhosted.org/packages/42/bb/1463f0b1722b7f45431bdd468301991d1328b16cffe0b1c2918eba2c4eee/rpds_py-0.30.0-cp311-cp311-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:07ae8a593e1c3c6b82ca3292efbe73c30b61332fd612e05abee07c79359f292f", size = 402932, upload-time = "2025-11-30T20:21:58.47Z" }, + { url = "https://files.pythonhosted.org/packages/99/ee/2520700a5c1f2d76631f948b0736cdf9b0acb25abd0ca8e889b5c62ac2e3/rpds_py-0.30.0-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:12f90dd7557b6bd57f40abe7747e81e0c0b119bef015ea7726e69fe550e394a4", size = 525830, upload-time = "2025-11-30T20:21:59.699Z" }, + { url = "https://files.pythonhosted.org/packages/e0/ad/bd0331f740f5705cc555a5e17fdf334671262160270962e69a2bdef3bf76/rpds_py-0.30.0-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:99b47d6ad9a6da00bec6aabe5a6279ecd3c06a329d4aa4771034a21e335c3a97", size = 412033, upload-time = "2025-11-30T20:22:00.991Z" }, + { url = "https://files.pythonhosted.org/packages/f8/1e/372195d326549bb51f0ba0f2ecb9874579906b97e08880e7a65c3bef1a99/rpds_py-0.30.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:33f559f3104504506a44bb666b93a33f5d33133765b0c216a5bf2f1e1503af89", size = 390828, upload-time = "2025-11-30T20:22:02.723Z" }, + { url = "https://files.pythonhosted.org/packages/ab/2b/d88bb33294e3e0c76bc8f351a3721212713629ffca1700fa94979cb3eae8/rpds_py-0.30.0-cp311-cp311-manylinux_2_31_riscv64.whl", hash = "sha256:946fe926af6e44f3697abbc305ea168c2c31d3e3ef1058cf68f379bf0335a78d", size = 404683, upload-time = "2025-11-30T20:22:04.367Z" }, + { url = "https://files.pythonhosted.org/packages/50/32/c759a8d42bcb5289c1fac697cd92f6fe01a018dd937e62ae77e0e7f15702/rpds_py-0.30.0-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:495aeca4b93d465efde585977365187149e75383ad2684f81519f504f5c13038", size = 421583, upload-time = "2025-11-30T20:22:05.814Z" }, + { url = "https://files.pythonhosted.org/packages/2b/81/e729761dbd55ddf5d84ec4ff1f47857f4374b0f19bdabfcf929164da3e24/rpds_py-0.30.0-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:d9a0ca5da0386dee0655b4ccdf46119df60e0f10da268d04fe7cc87886872ba7", size = 572496, upload-time = "2025-11-30T20:22:07.713Z" }, + { url = "https://files.pythonhosted.org/packages/14/f6/69066a924c3557c9c30baa6ec3a0aa07526305684c6f86c696b08860726c/rpds_py-0.30.0-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:8d6d1cc13664ec13c1b84241204ff3b12f9bb82464b8ad6e7a5d3486975c2eed", size = 598669, upload-time = "2025-11-30T20:22:09.312Z" }, + { url = "https://files.pythonhosted.org/packages/5f/48/905896b1eb8a05630d20333d1d8ffd162394127b74ce0b0784ae04498d32/rpds_py-0.30.0-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:3896fa1be39912cf0757753826bc8bdc8ca331a28a7c4ae46b7a21280b06bb85", size = 561011, upload-time = "2025-11-30T20:22:11.309Z" }, + { url = "https://files.pythonhosted.org/packages/22/16/cd3027c7e279d22e5eb431dd3c0fbc677bed58797fe7581e148f3f68818b/rpds_py-0.30.0-cp311-cp311-win32.whl", hash = "sha256:55f66022632205940f1827effeff17c4fa7ae1953d2b74a8581baaefb7d16f8c", size = 221406, upload-time = "2025-11-30T20:22:13.101Z" }, + { url = "https://files.pythonhosted.org/packages/fa/5b/e7b7aa136f28462b344e652ee010d4de26ee9fd16f1bfd5811f5153ccf89/rpds_py-0.30.0-cp311-cp311-win_amd64.whl", hash = "sha256:a51033ff701fca756439d641c0ad09a41d9242fa69121c7d8769604a0a629825", size = 236024, upload-time = "2025-11-30T20:22:14.853Z" }, + { url = "https://files.pythonhosted.org/packages/14/a6/364bba985e4c13658edb156640608f2c9e1d3ea3c81b27aa9d889fff0e31/rpds_py-0.30.0-cp311-cp311-win_arm64.whl", hash = "sha256:47b0ef6231c58f506ef0b74d44e330405caa8428e770fec25329ed2cb971a229", size = 229069, upload-time = "2025-11-30T20:22:16.577Z" }, + { url = "https://files.pythonhosted.org/packages/03/e7/98a2f4ac921d82f33e03f3835f5bf3a4a40aa1bfdc57975e74a97b2b4bdd/rpds_py-0.30.0-cp312-cp312-macosx_10_12_x86_64.whl", hash = "sha256:a161f20d9a43006833cd7068375a94d035714d73a172b681d8881820600abfad", size = 375086, upload-time = "2025-11-30T20:22:17.93Z" }, + { url = "https://files.pythonhosted.org/packages/4d/a1/bca7fd3d452b272e13335db8d6b0b3ecde0f90ad6f16f3328c6fb150c889/rpds_py-0.30.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:6abc8880d9d036ecaafe709079969f56e876fcf107f7a8e9920ba6d5a3878d05", size = 359053, upload-time = "2025-11-30T20:22:19.297Z" }, + { url = "https://files.pythonhosted.org/packages/65/1c/ae157e83a6357eceff62ba7e52113e3ec4834a84cfe07fa4b0757a7d105f/rpds_py-0.30.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ca28829ae5f5d569bb62a79512c842a03a12576375d5ece7d2cadf8abe96ec28", size = 390763, upload-time = "2025-11-30T20:22:21.661Z" }, + { url = "https://files.pythonhosted.org/packages/d4/36/eb2eb8515e2ad24c0bd43c3ee9cd74c33f7ca6430755ccdb240fd3144c44/rpds_py-0.30.0-cp312-cp312-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:a1010ed9524c73b94d15919ca4d41d8780980e1765babf85f9a2f90d247153dd", size = 408951, upload-time = "2025-11-30T20:22:23.408Z" }, + { url = "https://files.pythonhosted.org/packages/d6/65/ad8dc1784a331fabbd740ef6f71ce2198c7ed0890dab595adb9ea2d775a1/rpds_py-0.30.0-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:f8d1736cfb49381ba528cd5baa46f82fdc65c06e843dab24dd70b63d09121b3f", size = 514622, upload-time = "2025-11-30T20:22:25.16Z" }, + { url = "https://files.pythonhosted.org/packages/63/8e/0cfa7ae158e15e143fe03993b5bcd743a59f541f5952e1546b1ac1b5fd45/rpds_py-0.30.0-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:d948b135c4693daff7bc2dcfc4ec57237a29bd37e60c2fabf5aff2bbacf3e2f1", size = 414492, upload-time = "2025-11-30T20:22:26.505Z" }, + { url = "https://files.pythonhosted.org/packages/60/1b/6f8f29f3f995c7ffdde46a626ddccd7c63aefc0efae881dc13b6e5d5bb16/rpds_py-0.30.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:47f236970bccb2233267d89173d3ad2703cd36a0e2a6e92d0560d333871a3d23", size = 394080, upload-time = "2025-11-30T20:22:27.934Z" }, + { url = "https://files.pythonhosted.org/packages/6d/d5/a266341051a7a3ca2f4b750a3aa4abc986378431fc2da508c5034d081b70/rpds_py-0.30.0-cp312-cp312-manylinux_2_31_riscv64.whl", hash = "sha256:2e6ecb5a5bcacf59c3f912155044479af1d0b6681280048b338b28e364aca1f6", size = 408680, upload-time = "2025-11-30T20:22:29.341Z" }, + { url = "https://files.pythonhosted.org/packages/10/3b/71b725851df9ab7a7a4e33cf36d241933da66040d195a84781f49c50490c/rpds_py-0.30.0-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:a8fa71a2e078c527c3e9dc9fc5a98c9db40bcc8a92b4e8858e36d329f8684b51", size = 423589, upload-time = "2025-11-30T20:22:31.469Z" }, + { url = "https://files.pythonhosted.org/packages/00/2b/e59e58c544dc9bd8bd8384ecdb8ea91f6727f0e37a7131baeff8d6f51661/rpds_py-0.30.0-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:73c67f2db7bc334e518d097c6d1e6fed021bbc9b7d678d6cc433478365d1d5f5", size = 573289, upload-time = "2025-11-30T20:22:32.997Z" }, + { url = "https://files.pythonhosted.org/packages/da/3e/a18e6f5b460893172a7d6a680e86d3b6bc87a54c1f0b03446a3c8c7b588f/rpds_py-0.30.0-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:5ba103fb455be00f3b1c2076c9d4264bfcb037c976167a6047ed82f23153f02e", size = 599737, upload-time = "2025-11-30T20:22:34.419Z" }, + { url = "https://files.pythonhosted.org/packages/5c/e2/714694e4b87b85a18e2c243614974413c60aa107fd815b8cbc42b873d1d7/rpds_py-0.30.0-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:7cee9c752c0364588353e627da8a7e808a66873672bcb5f52890c33fd965b394", size = 563120, upload-time = "2025-11-30T20:22:35.903Z" }, + { url = "https://files.pythonhosted.org/packages/6f/ab/d5d5e3bcedb0a77f4f613706b750e50a5a3ba1c15ccd3665ecc636c968fd/rpds_py-0.30.0-cp312-cp312-win32.whl", hash = "sha256:1ab5b83dbcf55acc8b08fc62b796ef672c457b17dbd7820a11d6c52c06839bdf", size = 223782, upload-time = "2025-11-30T20:22:37.271Z" }, + { url = "https://files.pythonhosted.org/packages/39/3b/f786af9957306fdc38a74cef405b7b93180f481fb48453a114bb6465744a/rpds_py-0.30.0-cp312-cp312-win_amd64.whl", hash = "sha256:a090322ca841abd453d43456ac34db46e8b05fd9b3b4ac0c78bcde8b089f959b", size = 240463, upload-time = "2025-11-30T20:22:39.021Z" }, + { url = "https://files.pythonhosted.org/packages/f3/d2/b91dc748126c1559042cfe41990deb92c4ee3e2b415f6b5234969ffaf0cc/rpds_py-0.30.0-cp312-cp312-win_arm64.whl", hash = "sha256:669b1805bd639dd2989b281be2cfd951c6121b65e729d9b843e9639ef1fd555e", size = 230868, upload-time = "2025-11-30T20:22:40.493Z" }, + { url = "https://files.pythonhosted.org/packages/ed/dc/d61221eb88ff410de3c49143407f6f3147acf2538c86f2ab7ce65ae7d5f9/rpds_py-0.30.0-cp313-cp313-macosx_10_12_x86_64.whl", hash = "sha256:f83424d738204d9770830d35290ff3273fbb02b41f919870479fab14b9d303b2", size = 374887, upload-time = "2025-11-30T20:22:41.812Z" }, + { url = "https://files.pythonhosted.org/packages/fd/32/55fb50ae104061dbc564ef15cc43c013dc4a9f4527a1f4d99baddf56fe5f/rpds_py-0.30.0-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:e7536cd91353c5273434b4e003cbda89034d67e7710eab8761fd918ec6c69cf8", size = 358904, upload-time = "2025-11-30T20:22:43.479Z" }, + { url = "https://files.pythonhosted.org/packages/58/70/faed8186300e3b9bdd138d0273109784eea2396c68458ed580f885dfe7ad/rpds_py-0.30.0-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:2771c6c15973347f50fece41fc447c054b7ac2ae0502388ce3b6738cd366e3d4", size = 389945, upload-time = "2025-11-30T20:22:44.819Z" }, + { url = "https://files.pythonhosted.org/packages/bd/a8/073cac3ed2c6387df38f71296d002ab43496a96b92c823e76f46b8af0543/rpds_py-0.30.0-cp313-cp313-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:0a59119fc6e3f460315fe9d08149f8102aa322299deaa5cab5b40092345c2136", size = 407783, upload-time = "2025-11-30T20:22:46.103Z" }, + { url = "https://files.pythonhosted.org/packages/77/57/5999eb8c58671f1c11eba084115e77a8899d6e694d2a18f69f0ba471ec8b/rpds_py-0.30.0-cp313-cp313-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:76fec018282b4ead0364022e3c54b60bf368b9d926877957a8624b58419169b7", size = 515021, upload-time = "2025-11-30T20:22:47.458Z" }, + { url = "https://files.pythonhosted.org/packages/e0/af/5ab4833eadc36c0a8ed2bc5c0de0493c04f6c06de223170bd0798ff98ced/rpds_py-0.30.0-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:692bef75a5525db97318e8cd061542b5a79812d711ea03dbc1f6f8dbb0c5f0d2", size = 414589, upload-time = "2025-11-30T20:22:48.872Z" }, + { url = "https://files.pythonhosted.org/packages/b7/de/f7192e12b21b9e9a68a6d0f249b4af3fdcdff8418be0767a627564afa1f1/rpds_py-0.30.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9027da1ce107104c50c81383cae773ef5c24d296dd11c99e2629dbd7967a20c6", size = 394025, upload-time = "2025-11-30T20:22:50.196Z" }, + { url = "https://files.pythonhosted.org/packages/91/c4/fc70cd0249496493500e7cc2de87504f5aa6509de1e88623431fec76d4b6/rpds_py-0.30.0-cp313-cp313-manylinux_2_31_riscv64.whl", hash = "sha256:9cf69cdda1f5968a30a359aba2f7f9aa648a9ce4b580d6826437f2b291cfc86e", size = 408895, upload-time = "2025-11-30T20:22:51.87Z" }, + { url = "https://files.pythonhosted.org/packages/58/95/d9275b05ab96556fefff73a385813eb66032e4c99f411d0795372d9abcea/rpds_py-0.30.0-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:a4796a717bf12b9da9d3ad002519a86063dcac8988b030e405704ef7d74d2d9d", size = 422799, upload-time = "2025-11-30T20:22:53.341Z" }, + { url = "https://files.pythonhosted.org/packages/06/c1/3088fc04b6624eb12a57eb814f0d4997a44b0d208d6cace713033ff1a6ba/rpds_py-0.30.0-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:5d4c2aa7c50ad4728a094ebd5eb46c452e9cb7edbfdb18f9e1221f597a73e1e7", size = 572731, upload-time = "2025-11-30T20:22:54.778Z" }, + { url = "https://files.pythonhosted.org/packages/d8/42/c612a833183b39774e8ac8fecae81263a68b9583ee343db33ab571a7ce55/rpds_py-0.30.0-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:ba81a9203d07805435eb06f536d95a266c21e5b2dfbf6517748ca40c98d19e31", size = 599027, upload-time = "2025-11-30T20:22:56.212Z" }, + { url = "https://files.pythonhosted.org/packages/5f/60/525a50f45b01d70005403ae0e25f43c0384369ad24ffe46e8d9068b50086/rpds_py-0.30.0-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:945dccface01af02675628334f7cf49c2af4c1c904748efc5cf7bbdf0b579f95", size = 563020, upload-time = "2025-11-30T20:22:58.2Z" }, + { url = "https://files.pythonhosted.org/packages/0b/5d/47c4655e9bcd5ca907148535c10e7d489044243cc9941c16ed7cd53be91d/rpds_py-0.30.0-cp313-cp313-win32.whl", hash = "sha256:b40fb160a2db369a194cb27943582b38f79fc4887291417685f3ad693c5a1d5d", size = 223139, upload-time = "2025-11-30T20:23:00.209Z" }, + { url = "https://files.pythonhosted.org/packages/f2/e1/485132437d20aa4d3e1d8b3fb5a5e65aa8139f1e097080c2a8443201742c/rpds_py-0.30.0-cp313-cp313-win_amd64.whl", hash = "sha256:806f36b1b605e2d6a72716f321f20036b9489d29c51c91f4dd29a3e3afb73b15", size = 240224, upload-time = "2025-11-30T20:23:02.008Z" }, + { url = "https://files.pythonhosted.org/packages/24/95/ffd128ed1146a153d928617b0ef673960130be0009c77d8fbf0abe306713/rpds_py-0.30.0-cp313-cp313-win_arm64.whl", hash = "sha256:d96c2086587c7c30d44f31f42eae4eac89b60dabbac18c7669be3700f13c3ce1", size = 230645, upload-time = "2025-11-30T20:23:03.43Z" }, + { url = "https://files.pythonhosted.org/packages/ff/1b/b10de890a0def2a319a2626334a7f0ae388215eb60914dbac8a3bae54435/rpds_py-0.30.0-cp313-cp313t-macosx_10_12_x86_64.whl", hash = "sha256:eb0b93f2e5c2189ee831ee43f156ed34e2a89a78a66b98cadad955972548be5a", size = 364443, upload-time = "2025-11-30T20:23:04.878Z" }, + { url = "https://files.pythonhosted.org/packages/0d/bf/27e39f5971dc4f305a4fb9c672ca06f290f7c4e261c568f3dea16a410d47/rpds_py-0.30.0-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:922e10f31f303c7c920da8981051ff6d8c1a56207dbdf330d9047f6d30b70e5e", size = 353375, upload-time = "2025-11-30T20:23:06.342Z" }, + { url = "https://files.pythonhosted.org/packages/40/58/442ada3bba6e8e6615fc00483135c14a7538d2ffac30e2d933ccf6852232/rpds_py-0.30.0-cp313-cp313t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:cdc62c8286ba9bf7f47befdcea13ea0e26bf294bda99758fd90535cbaf408000", size = 383850, upload-time = "2025-11-30T20:23:07.825Z" }, + { url = "https://files.pythonhosted.org/packages/14/14/f59b0127409a33c6ef6f5c1ebd5ad8e32d7861c9c7adfa9a624fc3889f6c/rpds_py-0.30.0-cp313-cp313t-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:47f9a91efc418b54fb8190a6b4aa7813a23fb79c51f4bb84e418f5476c38b8db", size = 392812, upload-time = "2025-11-30T20:23:09.228Z" }, + { url = "https://files.pythonhosted.org/packages/b3/66/e0be3e162ac299b3a22527e8913767d869e6cc75c46bd844aa43fb81ab62/rpds_py-0.30.0-cp313-cp313t-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:1f3587eb9b17f3789ad50824084fa6f81921bbf9a795826570bda82cb3ed91f2", size = 517841, upload-time = "2025-11-30T20:23:11.186Z" }, + { url = "https://files.pythonhosted.org/packages/3d/55/fa3b9cf31d0c963ecf1ba777f7cf4b2a2c976795ac430d24a1f43d25a6ba/rpds_py-0.30.0-cp313-cp313t-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:39c02563fc592411c2c61d26b6c5fe1e51eaa44a75aa2c8735ca88b0d9599daa", size = 408149, upload-time = "2025-11-30T20:23:12.864Z" }, + { url = "https://files.pythonhosted.org/packages/60/ca/780cf3b1a32b18c0f05c441958d3758f02544f1d613abf9488cd78876378/rpds_py-0.30.0-cp313-cp313t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:51a1234d8febafdfd33a42d97da7a43f5dcb120c1060e352a3fbc0c6d36e2083", size = 383843, upload-time = "2025-11-30T20:23:14.638Z" }, + { url = "https://files.pythonhosted.org/packages/82/86/d5f2e04f2aa6247c613da0c1dd87fcd08fa17107e858193566048a1e2f0a/rpds_py-0.30.0-cp313-cp313t-manylinux_2_31_riscv64.whl", hash = "sha256:eb2c4071ab598733724c08221091e8d80e89064cd472819285a9ab0f24bcedb9", size = 396507, upload-time = "2025-11-30T20:23:16.105Z" }, + { url = "https://files.pythonhosted.org/packages/4b/9a/453255d2f769fe44e07ea9785c8347edaf867f7026872e76c1ad9f7bed92/rpds_py-0.30.0-cp313-cp313t-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:6bdfdb946967d816e6adf9a3d8201bfad269c67efe6cefd7093ef959683c8de0", size = 414949, upload-time = "2025-11-30T20:23:17.539Z" }, + { url = "https://files.pythonhosted.org/packages/a3/31/622a86cdc0c45d6df0e9ccb6becdba5074735e7033c20e401a6d9d0e2ca0/rpds_py-0.30.0-cp313-cp313t-musllinux_1_2_aarch64.whl", hash = "sha256:c77afbd5f5250bf27bf516c7c4a016813eb2d3e116139aed0096940c5982da94", size = 565790, upload-time = "2025-11-30T20:23:19.029Z" }, + { url = "https://files.pythonhosted.org/packages/1c/5d/15bbf0fb4a3f58a3b1c67855ec1efcc4ceaef4e86644665fff03e1b66d8d/rpds_py-0.30.0-cp313-cp313t-musllinux_1_2_i686.whl", hash = "sha256:61046904275472a76c8c90c9ccee9013d70a6d0f73eecefd38c1ae7c39045a08", size = 590217, upload-time = "2025-11-30T20:23:20.885Z" }, + { url = "https://files.pythonhosted.org/packages/6d/61/21b8c41f68e60c8cc3b2e25644f0e3681926020f11d06ab0b78e3c6bbff1/rpds_py-0.30.0-cp313-cp313t-musllinux_1_2_x86_64.whl", hash = "sha256:4c5f36a861bc4b7da6516dbdf302c55313afa09b81931e8280361a4f6c9a2d27", size = 555806, upload-time = "2025-11-30T20:23:22.488Z" }, + { url = "https://files.pythonhosted.org/packages/f9/39/7e067bb06c31de48de3eb200f9fc7c58982a4d3db44b07e73963e10d3be9/rpds_py-0.30.0-cp313-cp313t-win32.whl", hash = "sha256:3d4a69de7a3e50ffc214ae16d79d8fbb0922972da0356dcf4d0fdca2878559c6", size = 211341, upload-time = "2025-11-30T20:23:24.449Z" }, + { url = "https://files.pythonhosted.org/packages/0a/4d/222ef0b46443cf4cf46764d9c630f3fe4abaa7245be9417e56e9f52b8f65/rpds_py-0.30.0-cp313-cp313t-win_amd64.whl", hash = "sha256:f14fc5df50a716f7ece6a80b6c78bb35ea2ca47c499e422aa4463455dd96d56d", size = 225768, upload-time = "2025-11-30T20:23:25.908Z" }, + { url = "https://files.pythonhosted.org/packages/86/81/dad16382ebbd3d0e0328776d8fd7ca94220e4fa0798d1dc5e7da48cb3201/rpds_py-0.30.0-cp314-cp314-macosx_10_12_x86_64.whl", hash = "sha256:68f19c879420aa08f61203801423f6cd5ac5f0ac4ac82a2368a9fcd6a9a075e0", size = 362099, upload-time = "2025-11-30T20:23:27.316Z" }, + { url = "https://files.pythonhosted.org/packages/2b/60/19f7884db5d5603edf3c6bce35408f45ad3e97e10007df0e17dd57af18f8/rpds_py-0.30.0-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:ec7c4490c672c1a0389d319b3a9cfcd098dcdc4783991553c332a15acf7249be", size = 353192, upload-time = "2025-11-30T20:23:29.151Z" }, + { url = "https://files.pythonhosted.org/packages/bf/c4/76eb0e1e72d1a9c4703c69607cec123c29028bff28ce41588792417098ac/rpds_py-0.30.0-cp314-cp314-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f251c812357a3fed308d684a5079ddfb9d933860fc6de89f2b7ab00da481e65f", size = 384080, upload-time = "2025-11-30T20:23:30.785Z" }, + { url = "https://files.pythonhosted.org/packages/72/87/87ea665e92f3298d1b26d78814721dc39ed8d2c74b86e83348d6b48a6f31/rpds_py-0.30.0-cp314-cp314-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:ac98b175585ecf4c0348fd7b29c3864bda53b805c773cbf7bfdaffc8070c976f", size = 394841, upload-time = "2025-11-30T20:23:32.209Z" }, + { url = "https://files.pythonhosted.org/packages/77/ad/7783a89ca0587c15dcbf139b4a8364a872a25f861bdb88ed99f9b0dec985/rpds_py-0.30.0-cp314-cp314-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:3e62880792319dbeb7eb866547f2e35973289e7d5696c6e295476448f5b63c87", size = 516670, upload-time = "2025-11-30T20:23:33.742Z" }, + { url = "https://files.pythonhosted.org/packages/5b/3c/2882bdac942bd2172f3da574eab16f309ae10a3925644e969536553cb4ee/rpds_py-0.30.0-cp314-cp314-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:4e7fc54e0900ab35d041b0601431b0a0eb495f0851a0639b6ef90f7741b39a18", size = 408005, upload-time = "2025-11-30T20:23:35.253Z" }, + { url = "https://files.pythonhosted.org/packages/ce/81/9a91c0111ce1758c92516a3e44776920b579d9a7c09b2b06b642d4de3f0f/rpds_py-0.30.0-cp314-cp314-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:47e77dc9822d3ad616c3d5759ea5631a75e5809d5a28707744ef79d7a1bcfcad", size = 382112, upload-time = "2025-11-30T20:23:36.842Z" }, + { url = "https://files.pythonhosted.org/packages/cf/8e/1da49d4a107027e5fbc64daeab96a0706361a2918da10cb41769244b805d/rpds_py-0.30.0-cp314-cp314-manylinux_2_31_riscv64.whl", hash = "sha256:b4dc1a6ff022ff85ecafef7979a2c6eb423430e05f1165d6688234e62ba99a07", size = 399049, upload-time = "2025-11-30T20:23:38.343Z" }, + { url = "https://files.pythonhosted.org/packages/df/5a/7ee239b1aa48a127570ec03becbb29c9d5a9eb092febbd1699d567cae859/rpds_py-0.30.0-cp314-cp314-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:4559c972db3a360808309e06a74628b95eaccbf961c335c8fe0d590cf587456f", size = 415661, upload-time = "2025-11-30T20:23:40.263Z" }, + { url = "https://files.pythonhosted.org/packages/70/ea/caa143cf6b772f823bc7929a45da1fa83569ee49b11d18d0ada7f5ee6fd6/rpds_py-0.30.0-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:0ed177ed9bded28f8deb6ab40c183cd1192aa0de40c12f38be4d59cd33cb5c65", size = 565606, upload-time = "2025-11-30T20:23:42.186Z" }, + { url = "https://files.pythonhosted.org/packages/64/91/ac20ba2d69303f961ad8cf55bf7dbdb4763f627291ba3d0d7d67333cced9/rpds_py-0.30.0-cp314-cp314-musllinux_1_2_i686.whl", hash = "sha256:ad1fa8db769b76ea911cb4e10f049d80bf518c104f15b3edb2371cc65375c46f", size = 591126, upload-time = "2025-11-30T20:23:44.086Z" }, + { url = "https://files.pythonhosted.org/packages/21/20/7ff5f3c8b00c8a95f75985128c26ba44503fb35b8e0259d812766ea966c7/rpds_py-0.30.0-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:46e83c697b1f1c72b50e5ee5adb4353eef7406fb3f2043d64c33f20ad1c2fc53", size = 553371, upload-time = "2025-11-30T20:23:46.004Z" }, + { url = "https://files.pythonhosted.org/packages/72/c7/81dadd7b27c8ee391c132a6b192111ca58d866577ce2d9b0ca157552cce0/rpds_py-0.30.0-cp314-cp314-win32.whl", hash = "sha256:ee454b2a007d57363c2dfd5b6ca4a5d7e2c518938f8ed3b706e37e5d470801ed", size = 215298, upload-time = "2025-11-30T20:23:47.696Z" }, + { url = "https://files.pythonhosted.org/packages/3e/d2/1aaac33287e8cfb07aab2e6b8ac1deca62f6f65411344f1433c55e6f3eb8/rpds_py-0.30.0-cp314-cp314-win_amd64.whl", hash = "sha256:95f0802447ac2d10bcc69f6dc28fe95fdf17940367b21d34e34c737870758950", size = 228604, upload-time = "2025-11-30T20:23:49.501Z" }, + { url = "https://files.pythonhosted.org/packages/e8/95/ab005315818cc519ad074cb7784dae60d939163108bd2b394e60dc7b5461/rpds_py-0.30.0-cp314-cp314-win_arm64.whl", hash = "sha256:613aa4771c99f03346e54c3f038e4cc574ac09a3ddfb0e8878487335e96dead6", size = 222391, upload-time = "2025-11-30T20:23:50.96Z" }, + { url = "https://files.pythonhosted.org/packages/9e/68/154fe0194d83b973cdedcdcc88947a2752411165930182ae41d983dcefa6/rpds_py-0.30.0-cp314-cp314t-macosx_10_12_x86_64.whl", hash = "sha256:7e6ecfcb62edfd632e56983964e6884851786443739dbfe3582947e87274f7cb", size = 364868, upload-time = "2025-11-30T20:23:52.494Z" }, + { url = "https://files.pythonhosted.org/packages/83/69/8bbc8b07ec854d92a8b75668c24d2abcb1719ebf890f5604c61c9369a16f/rpds_py-0.30.0-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:a1d0bc22a7cdc173fedebb73ef81e07faef93692b8c1ad3733b67e31e1b6e1b8", size = 353747, upload-time = "2025-11-30T20:23:54.036Z" }, + { url = "https://files.pythonhosted.org/packages/ab/00/ba2e50183dbd9abcce9497fa5149c62b4ff3e22d338a30d690f9af970561/rpds_py-0.30.0-cp314-cp314t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:0d08f00679177226c4cb8c5265012eea897c8ca3b93f429e546600c971bcbae7", size = 383795, upload-time = "2025-11-30T20:23:55.556Z" }, + { url = "https://files.pythonhosted.org/packages/05/6f/86f0272b84926bcb0e4c972262f54223e8ecc556b3224d281e6598fc9268/rpds_py-0.30.0-cp314-cp314t-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:5965af57d5848192c13534f90f9dd16464f3c37aaf166cc1da1cae1fd5a34898", size = 393330, upload-time = "2025-11-30T20:23:57.033Z" }, + { url = "https://files.pythonhosted.org/packages/cb/e9/0e02bb2e6dc63d212641da45df2b0bf29699d01715913e0d0f017ee29438/rpds_py-0.30.0-cp314-cp314t-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:9a4e86e34e9ab6b667c27f3211ca48f73dba7cd3d90f8d5b11be56e5dbc3fb4e", size = 518194, upload-time = "2025-11-30T20:23:58.637Z" }, + { url = "https://files.pythonhosted.org/packages/ee/ca/be7bca14cf21513bdf9c0606aba17d1f389ea2b6987035eb4f62bd923f25/rpds_py-0.30.0-cp314-cp314t-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:e5d3e6b26f2c785d65cc25ef1e5267ccbe1b069c5c21b8cc724efee290554419", size = 408340, upload-time = "2025-11-30T20:24:00.2Z" }, + { url = "https://files.pythonhosted.org/packages/c2/c7/736e00ebf39ed81d75544c0da6ef7b0998f8201b369acf842f9a90dc8fce/rpds_py-0.30.0-cp314-cp314t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:626a7433c34566535b6e56a1b39a7b17ba961e97ce3b80ec62e6f1312c025551", size = 383765, upload-time = "2025-11-30T20:24:01.759Z" }, + { url = "https://files.pythonhosted.org/packages/4a/3f/da50dfde9956aaf365c4adc9533b100008ed31aea635f2b8d7b627e25b49/rpds_py-0.30.0-cp314-cp314t-manylinux_2_31_riscv64.whl", hash = "sha256:acd7eb3f4471577b9b5a41baf02a978e8bdeb08b4b355273994f8b87032000a8", size = 396834, upload-time = "2025-11-30T20:24:03.687Z" }, + { url = "https://files.pythonhosted.org/packages/4e/00/34bcc2565b6020eab2623349efbdec810676ad571995911f1abdae62a3a0/rpds_py-0.30.0-cp314-cp314t-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:fe5fa731a1fa8a0a56b0977413f8cacac1768dad38d16b3a296712709476fbd5", size = 415470, upload-time = "2025-11-30T20:24:05.232Z" }, + { url = "https://files.pythonhosted.org/packages/8c/28/882e72b5b3e6f718d5453bd4d0d9cf8df36fddeb4ddbbab17869d5868616/rpds_py-0.30.0-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:74a3243a411126362712ee1524dfc90c650a503502f135d54d1b352bd01f2404", size = 565630, upload-time = "2025-11-30T20:24:06.878Z" }, + { url = "https://files.pythonhosted.org/packages/3b/97/04a65539c17692de5b85c6e293520fd01317fd878ea1995f0367d4532fb1/rpds_py-0.30.0-cp314-cp314t-musllinux_1_2_i686.whl", hash = "sha256:3e8eeb0544f2eb0d2581774be4c3410356eba189529a6b3e36bbbf9696175856", size = 591148, upload-time = "2025-11-30T20:24:08.445Z" }, + { url = "https://files.pythonhosted.org/packages/85/70/92482ccffb96f5441aab93e26c4d66489eb599efdcf96fad90c14bbfb976/rpds_py-0.30.0-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:dbd936cde57abfee19ab3213cf9c26be06d60750e60a8e4dd85d1ab12c8b1f40", size = 556030, upload-time = "2025-11-30T20:24:10.956Z" }, + { url = "https://files.pythonhosted.org/packages/20/53/7c7e784abfa500a2b6b583b147ee4bb5a2b3747a9166bab52fec4b5b5e7d/rpds_py-0.30.0-cp314-cp314t-win32.whl", hash = "sha256:dc824125c72246d924f7f796b4f63c1e9dc810c7d9e2355864b3c3a73d59ade0", size = 211570, upload-time = "2025-11-30T20:24:12.735Z" }, + { url = "https://files.pythonhosted.org/packages/d0/02/fa464cdfbe6b26e0600b62c528b72d8608f5cc49f96b8d6e38c95d60c676/rpds_py-0.30.0-cp314-cp314t-win_amd64.whl", hash = "sha256:27f4b0e92de5bfbc6f86e43959e6edd1425c33b5e69aab0984a72047f2bcf1e3", size = 226532, upload-time = "2025-11-30T20:24:14.634Z" }, + { url = "https://files.pythonhosted.org/packages/69/71/3f34339ee70521864411f8b6992e7ab13ac30d8e4e3309e07c7361767d91/rpds_py-0.30.0-pp311-pypy311_pp73-macosx_10_12_x86_64.whl", hash = "sha256:c2262bdba0ad4fc6fb5545660673925c2d2a5d9e2e0fb603aad545427be0fc58", size = 372292, upload-time = "2025-11-30T20:24:16.537Z" }, + { url = "https://files.pythonhosted.org/packages/57/09/f183df9b8f2d66720d2ef71075c59f7e1b336bec7ee4c48f0a2b06857653/rpds_py-0.30.0-pp311-pypy311_pp73-macosx_11_0_arm64.whl", hash = "sha256:ee6af14263f25eedc3bb918a3c04245106a42dfd4f5c2285ea6f997b1fc3f89a", size = 362128, upload-time = "2025-11-30T20:24:18.086Z" }, + { url = "https://files.pythonhosted.org/packages/7a/68/5c2594e937253457342e078f0cc1ded3dd7b2ad59afdbf2d354869110a02/rpds_py-0.30.0-pp311-pypy311_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:3adbb8179ce342d235c31ab8ec511e66c73faa27a47e076ccc92421add53e2bb", size = 391542, upload-time = "2025-11-30T20:24:20.092Z" }, + { url = "https://files.pythonhosted.org/packages/49/5c/31ef1afd70b4b4fbdb2800249f34c57c64beb687495b10aec0365f53dfc4/rpds_py-0.30.0-pp311-pypy311_pp73-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:250fa00e9543ac9b97ac258bd37367ff5256666122c2d0f2bc97577c60a1818c", size = 404004, upload-time = "2025-11-30T20:24:22.231Z" }, + { url = "https://files.pythonhosted.org/packages/e3/63/0cfbea38d05756f3440ce6534d51a491d26176ac045e2707adc99bb6e60a/rpds_py-0.30.0-pp311-pypy311_pp73-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:9854cf4f488b3d57b9aaeb105f06d78e5529d3145b1e4a41750167e8c213c6d3", size = 527063, upload-time = "2025-11-30T20:24:24.302Z" }, + { url = "https://files.pythonhosted.org/packages/42/e6/01e1f72a2456678b0f618fc9a1a13f882061690893c192fcad9f2926553a/rpds_py-0.30.0-pp311-pypy311_pp73-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:993914b8e560023bc0a8bf742c5f303551992dcb85e247b1e5c7f4a7d145bda5", size = 413099, upload-time = "2025-11-30T20:24:25.916Z" }, + { url = "https://files.pythonhosted.org/packages/b8/25/8df56677f209003dcbb180765520c544525e3ef21ea72279c98b9aa7c7fb/rpds_py-0.30.0-pp311-pypy311_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:58edca431fb9b29950807e301826586e5bbf24163677732429770a697ffe6738", size = 392177, upload-time = "2025-11-30T20:24:27.834Z" }, + { url = "https://files.pythonhosted.org/packages/4a/b4/0a771378c5f16f8115f796d1f437950158679bcd2a7c68cf251cfb00ed5b/rpds_py-0.30.0-pp311-pypy311_pp73-manylinux_2_31_riscv64.whl", hash = "sha256:dea5b552272a944763b34394d04577cf0f9bd013207bc32323b5a89a53cf9c2f", size = 406015, upload-time = "2025-11-30T20:24:29.457Z" }, + { url = "https://files.pythonhosted.org/packages/36/d8/456dbba0af75049dc6f63ff295a2f92766b9d521fa00de67a2bd6427d57a/rpds_py-0.30.0-pp311-pypy311_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:ba3af48635eb83d03f6c9735dfb21785303e73d22ad03d489e88adae6eab8877", size = 423736, upload-time = "2025-11-30T20:24:31.22Z" }, + { url = "https://files.pythonhosted.org/packages/13/64/b4d76f227d5c45a7e0b796c674fd81b0a6c4fbd48dc29271857d8219571c/rpds_py-0.30.0-pp311-pypy311_pp73-musllinux_1_2_aarch64.whl", hash = "sha256:dff13836529b921e22f15cb099751209a60009731a68519630a24d61f0b1b30a", size = 573981, upload-time = "2025-11-30T20:24:32.934Z" }, + { url = "https://files.pythonhosted.org/packages/20/91/092bacadeda3edf92bf743cc96a7be133e13a39cdbfd7b5082e7ab638406/rpds_py-0.30.0-pp311-pypy311_pp73-musllinux_1_2_i686.whl", hash = "sha256:1b151685b23929ab7beec71080a8889d4d6d9fa9a983d213f07121205d48e2c4", size = 599782, upload-time = "2025-11-30T20:24:35.169Z" }, + { url = "https://files.pythonhosted.org/packages/d1/b7/b95708304cd49b7b6f82fdd039f1748b66ec2b21d6a45180910802f1abf1/rpds_py-0.30.0-pp311-pypy311_pp73-musllinux_1_2_x86_64.whl", hash = "sha256:ac37f9f516c51e5753f27dfdef11a88330f04de2d564be3991384b2f3535d02e", size = 562191, upload-time = "2025-11-30T20:24:36.853Z" }, +] + +[[package]] +name = "safehttpx" +version = "0.1.7" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "httpx" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/89/d1/4282284d9cf1ee873607a46442da977fc3c985059315ab23610be31d5885/safehttpx-0.1.7.tar.gz", hash = "sha256:db201c0978c41eddb8bb480f3eee59dd67304fdd91646035e9d9a720049a9d23", size = 10385, upload-time = "2025-10-24T18:30:09.783Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/2e/a3/0f0b7d78e2f1eb9e8e1afbff1d2bff8d60144aee17aca51c065b516743dd/safehttpx-0.1.7-py3-none-any.whl", hash = "sha256:c4f4a162db6993464d7ca3d7cc4af0ffc6515a606dfd220b9f82c6945d869cde", size = 8959, upload-time = "2025-10-24T18:30:08.733Z" }, +] + +[[package]] +name = "secretstorage" +version = "3.5.0" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "cryptography", marker = "sys_platform != 'emscripten' and sys_platform != 'win32'" }, + { name = "jeepney", marker = "sys_platform != 'emscripten' and sys_platform != 'win32'" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/1c/03/e834bcd866f2f8a49a85eaff47340affa3bfa391ee9912a952a1faa68c7b/secretstorage-3.5.0.tar.gz", hash = "sha256:f04b8e4689cbce351744d5537bf6b1329c6fc68f91fa666f60a380edddcd11be", size = 19884, upload-time = "2025-11-23T19:02:53.191Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/b7/46/f5af3402b579fd5e11573ce652019a67074317e18c1935cc0b4ba9b35552/secretstorage-3.5.0-py3-none-any.whl", hash = "sha256:0ce65888c0725fcb2c5bc0fdb8e5438eece02c523557ea40ce0703c266248137", size = 15554, upload-time = "2025-11-23T19:02:51.545Z" }, +] + +[[package]] +name = "semantic-version" +version = "2.10.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/7d/31/f2289ce78b9b473d582568c234e104d2a342fd658cc288a7553d83bb8595/semantic_version-2.10.0.tar.gz", hash = "sha256:bdabb6d336998cbb378d4b9db3a4b56a1e3235701dc05ea2690d9a997ed5041c", size = 52289, upload-time = "2022-05-26T13:35:23.454Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/6a/23/8146aad7d88f4fcb3a6218f41a60f6c2d4e3a72de72da1825dc7c8f7877c/semantic_version-2.10.0-py2.py3-none-any.whl", hash = "sha256:de78a3b8e0feda74cabc54aab2da702113e33ac9d9eb9d2389bcf1f58b7d9177", size = 15552, upload-time = "2022-05-26T13:35:21.206Z" }, +] + +[[package]] +name = "shellingham" +version = "1.5.4" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/58/15/8b3609fd3830ef7b27b655beb4b4e9c62313a4e8da8c676e142cc210d58e/shellingham-1.5.4.tar.gz", hash = "sha256:8dbca0739d487e5bd35ab3ca4b36e11c4078f3a234bfce294b0a0291363404de", size = 10310, upload-time = "2023-10-24T04:13:40.426Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/e0/f9/0595336914c5619e5f28a1fb793285925a8cd4b432c9da0a987836c7f822/shellingham-1.5.4-py2.py3-none-any.whl", hash = "sha256:7ecfff8f2fd72616f7481040475a65b2bf8af90a56c89140852d1120324e8686", size = 9755, upload-time = "2023-10-24T04:13:38.866Z" }, +] + +[[package]] +name = "six" +version = "1.17.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/94/e7/b2c673351809dca68a0e064b6af791aa332cf192da575fd474ed7d6f16a2/six-1.17.0.tar.gz", hash = "sha256:ff70335d468e7eb6ec65b95b99d3a2836546063f63acc5171de367e834932a81", size = 34031, upload-time = "2024-12-04T17:35:28.174Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/b7/ce/149a00dd41f10bc29e5921b496af8b574d8413afcd5e30dfa0ed46c2cc5e/six-1.17.0-py2.py3-none-any.whl", hash = "sha256:4721f391ed90541fddacab5acf947aa0d3dc7d27b2e1e8eda2be8970586c3274", size = 11050, upload-time = "2024-12-04T17:35:26.475Z" }, +] + +[[package]] +name = "sniffio" +version = "1.3.1" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/a2/87/a6771e1546d97e7e041b6ae58d80074f81b7d5121207425c964ddf5cfdbd/sniffio-1.3.1.tar.gz", hash = "sha256:f4324edc670a0f49750a81b895f35c3adb843cca46f0530f79fc1babb23789dc", size = 20372, upload-time = "2024-02-25T23:20:04.057Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/e9/44/75a9c9421471a6c4805dbf2356f7c181a29c1879239abab1ea2cc8f38b40/sniffio-1.3.1-py3-none-any.whl", hash = "sha256:2f6da418d1f1e0fddd844478f41680e794e6051915791a034ff65e5f100525a2", size = 10235, upload-time = "2024-02-25T23:20:01.196Z" }, +] + +[[package]] +name = "sse-starlette" +version = "3.3.4" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "anyio" }, + { name = "starlette" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/26/8c/f9290339ef6d79badbc010f067cd769d6601ec11a57d78569c683fb4dd87/sse_starlette-3.3.4.tar.gz", hash = "sha256:aaf92fc067af8a5427192895ac028e947b484ac01edbc3caf00e7e7137c7bef1", size = 32427, upload-time = "2026-03-29T09:00:23.307Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/f8/7f/3de5402f39890ac5660b86bcf5c03f9d855dad5c4ed764866d7b592b46fd/sse_starlette-3.3.4-py3-none-any.whl", hash = "sha256:84bb06e58939a8b38d8341f1bc9792f06c2b53f48c608dd207582b664fc8f3c1", size = 14330, upload-time = "2026-03-29T09:00:21.846Z" }, +] + +[[package]] +name = "starlette" +version = "0.52.1" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "anyio" }, + { name = "typing-extensions", marker = "python_full_version < '3.13'" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/c4/68/79977123bb7be889ad680d79a40f339082c1978b5cfcf62c2d8d196873ac/starlette-0.52.1.tar.gz", hash = "sha256:834edd1b0a23167694292e94f597773bc3f89f362be6effee198165a35d62933", size = 2653702, upload-time = "2026-01-18T13:34:11.062Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/81/0d/13d1d239a25cbfb19e740db83143e95c772a1fe10202dda4b76792b114dd/starlette-0.52.1-py3-none-any.whl", hash = "sha256:0029d43eb3d273bc4f83a08720b4912ea4b071087a3b48db01b7c839f7954d74", size = 74272, upload-time = "2026-01-18T13:34:09.188Z" }, +] + +[[package]] +name = "tomli" +version = "2.4.1" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/22/de/48c59722572767841493b26183a0d1cc411d54fd759c5607c4590b6563a6/tomli-2.4.1.tar.gz", hash = "sha256:7c7e1a961a0b2f2472c1ac5b69affa0ae1132c39adcb67aba98568702b9cc23f", size = 17543, upload-time = "2026-03-25T20:22:03.828Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/f4/11/db3d5885d8528263d8adc260bb2d28ebf1270b96e98f0e0268d32b8d9900/tomli-2.4.1-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:f8f0fc26ec2cc2b965b7a3b87cd19c5c6b8c5e5f436b984e85f486d652285c30", size = 154704, upload-time = "2026-03-25T20:21:10.473Z" }, + { url = "https://files.pythonhosted.org/packages/6d/f7/675db52c7e46064a9aa928885a9b20f4124ecb9bc2e1ce74c9106648d202/tomli-2.4.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:4ab97e64ccda8756376892c53a72bd1f964e519c77236368527f758fbc36a53a", size = 149454, upload-time = "2026-03-25T20:21:12.036Z" }, + { url = "https://files.pythonhosted.org/packages/61/71/81c50943cf953efa35bce7646caab3cf457a7d8c030b27cfb40d7235f9ee/tomli-2.4.1-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:96481a5786729fd470164b47cdb3e0e58062a496f455ee41b4403be77cb5a076", size = 237561, upload-time = "2026-03-25T20:21:13.098Z" }, + { url = "https://files.pythonhosted.org/packages/48/c1/f41d9cb618acccca7df82aaf682f9b49013c9397212cb9f53219e3abac37/tomli-2.4.1-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:5a881ab208c0baf688221f8cecc5401bd291d67e38a1ac884d6736cbcd8247e9", size = 243824, upload-time = "2026-03-25T20:21:14.569Z" }, + { url = "https://files.pythonhosted.org/packages/22/e4/5a816ecdd1f8ca51fb756ef684b90f2780afc52fc67f987e3c61d800a46d/tomli-2.4.1-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:47149d5bd38761ac8be13a84864bf0b7b70bc051806bc3669ab1cbc56216b23c", size = 242227, upload-time = "2026-03-25T20:21:15.712Z" }, + { url = "https://files.pythonhosted.org/packages/6b/49/2b2a0ef529aa6eec245d25f0c703e020a73955ad7edf73e7f54ddc608aa5/tomli-2.4.1-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:ec9bfaf3ad2df51ace80688143a6a4ebc09a248f6ff781a9945e51937008fcbc", size = 247859, upload-time = "2026-03-25T20:21:17.001Z" }, + { url = "https://files.pythonhosted.org/packages/83/bd/6c1a630eaca337e1e78c5903104f831bda934c426f9231429396ce3c3467/tomli-2.4.1-cp311-cp311-win32.whl", hash = "sha256:ff2983983d34813c1aeb0fa89091e76c3a22889ee83ab27c5eeb45100560c049", size = 97204, upload-time = "2026-03-25T20:21:18.079Z" }, + { url = "https://files.pythonhosted.org/packages/42/59/71461df1a885647e10b6bb7802d0b8e66480c61f3f43079e0dcd315b3954/tomli-2.4.1-cp311-cp311-win_amd64.whl", hash = "sha256:5ee18d9ebdb417e384b58fe414e8d6af9f4e7a0ae761519fb50f721de398dd4e", size = 108084, upload-time = "2026-03-25T20:21:18.978Z" }, + { url = "https://files.pythonhosted.org/packages/b8/83/dceca96142499c069475b790e7913b1044c1a4337e700751f48ed723f883/tomli-2.4.1-cp311-cp311-win_arm64.whl", hash = "sha256:c2541745709bad0264b7d4705ad453b76ccd191e64aa6f0fc66b69a293a45ece", size = 95285, upload-time = "2026-03-25T20:21:20.309Z" }, + { url = "https://files.pythonhosted.org/packages/c1/ba/42f134a3fe2b370f555f44b1d72feebb94debcab01676bf918d0cb70e9aa/tomli-2.4.1-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:c742f741d58a28940ce01d58f0ab2ea3ced8b12402f162f4d534dfe18ba1cd6a", size = 155924, upload-time = "2026-03-25T20:21:21.626Z" }, + { url = "https://files.pythonhosted.org/packages/dc/c7/62d7a17c26487ade21c5422b646110f2162f1fcc95980ef7f63e73c68f14/tomli-2.4.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:7f86fd587c4ed9dd76f318225e7d9b29cfc5a9d43de44e5754db8d1128487085", size = 150018, upload-time = "2026-03-25T20:21:23.002Z" }, + { url = "https://files.pythonhosted.org/packages/5c/05/79d13d7c15f13bdef410bdd49a6485b1c37d28968314eabee452c22a7fda/tomli-2.4.1-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:ff18e6a727ee0ab0388507b89d1bc6a22b138d1e2fa56d1ad494586d61d2eae9", size = 244948, upload-time = "2026-03-25T20:21:24.04Z" }, + { url = "https://files.pythonhosted.org/packages/10/90/d62ce007a1c80d0b2c93e02cab211224756240884751b94ca72df8a875ca/tomli-2.4.1-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:136443dbd7e1dee43c68ac2694fde36b2849865fa258d39bf822c10e8068eac5", size = 253341, upload-time = "2026-03-25T20:21:25.177Z" }, + { url = "https://files.pythonhosted.org/packages/1a/7e/caf6496d60152ad4ed09282c1885cca4eea150bfd007da84aea07bcc0a3e/tomli-2.4.1-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:5e262d41726bc187e69af7825504c933b6794dc3fbd5945e41a79bb14c31f585", size = 248159, upload-time = "2026-03-25T20:21:26.364Z" }, + { url = "https://files.pythonhosted.org/packages/99/e7/c6f69c3120de34bbd882c6fba7975f3d7a746e9218e56ab46a1bc4b42552/tomli-2.4.1-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:5cb41aa38891e073ee49d55fbc7839cfdb2bc0e600add13874d048c94aadddd1", size = 253290, upload-time = "2026-03-25T20:21:27.46Z" }, + { url = "https://files.pythonhosted.org/packages/d6/2f/4a3c322f22c5c66c4b836ec58211641a4067364f5dcdd7b974b4c5da300c/tomli-2.4.1-cp312-cp312-win32.whl", hash = "sha256:da25dc3563bff5965356133435b757a795a17b17d01dbc0f42fb32447ddfd917", size = 98141, upload-time = "2026-03-25T20:21:28.492Z" }, + { url = "https://files.pythonhosted.org/packages/24/22/4daacd05391b92c55759d55eaee21e1dfaea86ce5c571f10083360adf534/tomli-2.4.1-cp312-cp312-win_amd64.whl", hash = "sha256:52c8ef851d9a240f11a88c003eacb03c31fc1c9c4ec64a99a0f922b93874fda9", size = 108847, upload-time = "2026-03-25T20:21:29.386Z" }, + { url = "https://files.pythonhosted.org/packages/68/fd/70e768887666ddd9e9f5d85129e84910f2db2796f9096aa02b721a53098d/tomli-2.4.1-cp312-cp312-win_arm64.whl", hash = "sha256:f758f1b9299d059cc3f6546ae2af89670cb1c4d48ea29c3cacc4fe7de3058257", size = 95088, upload-time = "2026-03-25T20:21:30.677Z" }, + { url = "https://files.pythonhosted.org/packages/07/06/b823a7e818c756d9a7123ba2cda7d07bc2dd32835648d1a7b7b7a05d848d/tomli-2.4.1-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:36d2bd2ad5fb9eaddba5226aa02c8ec3fa4f192631e347b3ed28186d43be6b54", size = 155866, upload-time = "2026-03-25T20:21:31.65Z" }, + { url = "https://files.pythonhosted.org/packages/14/6f/12645cf7f08e1a20c7eb8c297c6f11d31c1b50f316a7e7e1e1de6e2e7b7e/tomli-2.4.1-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:eb0dc4e38e6a1fd579e5d50369aa2e10acfc9cace504579b2faabb478e76941a", size = 149887, upload-time = "2026-03-25T20:21:33.028Z" }, + { url = "https://files.pythonhosted.org/packages/5c/e0/90637574e5e7212c09099c67ad349b04ec4d6020324539297b634a0192b0/tomli-2.4.1-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:c7f2c7f2b9ca6bdeef8f0fa897f8e05085923eb091721675170254cbc5b02897", size = 243704, upload-time = "2026-03-25T20:21:34.51Z" }, + { url = "https://files.pythonhosted.org/packages/10/8f/d3ddb16c5a4befdf31a23307f72828686ab2096f068eaf56631e136c1fdd/tomli-2.4.1-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:f3c6818a1a86dd6dca7ddcaaf76947d5ba31aecc28cb1b67009a5877c9a64f3f", size = 251628, upload-time = "2026-03-25T20:21:36.012Z" }, + { url = "https://files.pythonhosted.org/packages/e3/f1/dbeeb9116715abee2485bf0a12d07a8f31af94d71608c171c45f64c0469d/tomli-2.4.1-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:d312ef37c91508b0ab2cee7da26ec0b3ed2f03ce12bd87a588d771ae15dcf82d", size = 247180, upload-time = "2026-03-25T20:21:37.136Z" }, + { url = "https://files.pythonhosted.org/packages/d3/74/16336ffd19ed4da28a70959f92f506233bd7cfc2332b20bdb01591e8b1d1/tomli-2.4.1-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:51529d40e3ca50046d7606fa99ce3956a617f9b36380da3b7f0dd3dd28e68cb5", size = 251674, upload-time = "2026-03-25T20:21:38.298Z" }, + { url = "https://files.pythonhosted.org/packages/16/f9/229fa3434c590ddf6c0aa9af64d3af4b752540686cace29e6281e3458469/tomli-2.4.1-cp313-cp313-win32.whl", hash = "sha256:2190f2e9dd7508d2a90ded5ed369255980a1bcdd58e52f7fe24b8162bf9fedbd", size = 97976, upload-time = "2026-03-25T20:21:39.316Z" }, + { url = "https://files.pythonhosted.org/packages/6a/1e/71dfd96bcc1c775420cb8befe7a9d35f2e5b1309798f009dca17b7708c1e/tomli-2.4.1-cp313-cp313-win_amd64.whl", hash = "sha256:8d65a2fbf9d2f8352685bc1364177ee3923d6baf5e7f43ea4959d7d8bc326a36", size = 108755, upload-time = "2026-03-25T20:21:40.248Z" }, + { url = "https://files.pythonhosted.org/packages/83/7a/d34f422a021d62420b78f5c538e5b102f62bea616d1d75a13f0a88acb04a/tomli-2.4.1-cp313-cp313-win_arm64.whl", hash = "sha256:4b605484e43cdc43f0954ddae319fb75f04cc10dd80d830540060ee7cd0243cd", size = 95265, upload-time = "2026-03-25T20:21:41.219Z" }, + { url = "https://files.pythonhosted.org/packages/3c/fb/9a5c8d27dbab540869f7c1f8eb0abb3244189ce780ba9cd73f3770662072/tomli-2.4.1-cp314-cp314-macosx_10_15_x86_64.whl", hash = "sha256:fd0409a3653af6c147209d267a0e4243f0ae46b011aa978b1080359fddc9b6cf", size = 155726, upload-time = "2026-03-25T20:21:42.23Z" }, + { url = "https://files.pythonhosted.org/packages/62/05/d2f816630cc771ad836af54f5001f47a6f611d2d39535364f148b6a92d6b/tomli-2.4.1-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:a120733b01c45e9a0c34aeef92bf0cf1d56cfe81ed9d47d562f9ed591a9828ac", size = 149859, upload-time = "2026-03-25T20:21:43.386Z" }, + { url = "https://files.pythonhosted.org/packages/ce/48/66341bdb858ad9bd0ceab5a86f90eddab127cf8b046418009f2125630ecb/tomli-2.4.1-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:559db847dc486944896521f68d8190be1c9e719fced785720d2216fe7022b662", size = 244713, upload-time = "2026-03-25T20:21:44.474Z" }, + { url = "https://files.pythonhosted.org/packages/df/6d/c5fad00d82b3c7a3ab6189bd4b10e60466f22cfe8a08a9394185c8a8111c/tomli-2.4.1-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:01f520d4f53ef97964a240a035ec2a869fe1a37dde002b57ebc4417a27ccd853", size = 252084, upload-time = "2026-03-25T20:21:45.62Z" }, + { url = "https://files.pythonhosted.org/packages/00/71/3a69e86f3eafe8c7a59d008d245888051005bd657760e96d5fbfb0b740c2/tomli-2.4.1-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:7f94b27a62cfad8496c8d2513e1a222dd446f095fca8987fceef261225538a15", size = 247973, upload-time = "2026-03-25T20:21:46.937Z" }, + { url = "https://files.pythonhosted.org/packages/67/50/361e986652847fec4bd5e4a0208752fbe64689c603c7ae5ea7cb16b1c0ca/tomli-2.4.1-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:ede3e6487c5ef5d28634ba3f31f989030ad6af71edfb0055cbbd14189ff240ba", size = 256223, upload-time = "2026-03-25T20:21:48.467Z" }, + { url = "https://files.pythonhosted.org/packages/8c/9a/b4173689a9203472e5467217e0154b00e260621caa227b6fa01feab16998/tomli-2.4.1-cp314-cp314-win32.whl", hash = "sha256:3d48a93ee1c9b79c04bb38772ee1b64dcf18ff43085896ea460ca8dec96f35f6", size = 98973, upload-time = "2026-03-25T20:21:49.526Z" }, + { url = "https://files.pythonhosted.org/packages/14/58/640ac93bf230cd27d002462c9af0d837779f8773bc03dee06b5835208214/tomli-2.4.1-cp314-cp314-win_amd64.whl", hash = "sha256:88dceee75c2c63af144e456745e10101eb67361050196b0b6af5d717254dddf7", size = 109082, upload-time = "2026-03-25T20:21:50.506Z" }, + { url = "https://files.pythonhosted.org/packages/d5/2f/702d5e05b227401c1068f0d386d79a589bb12bf64c3d2c72ce0631e3bc49/tomli-2.4.1-cp314-cp314-win_arm64.whl", hash = "sha256:b8c198f8c1805dc42708689ed6864951fd2494f924149d3e4bce7710f8eb5232", size = 96490, upload-time = "2026-03-25T20:21:51.474Z" }, + { url = "https://files.pythonhosted.org/packages/45/4b/b877b05c8ba62927d9865dd980e34a755de541eb65fffba52b4cc495d4d2/tomli-2.4.1-cp314-cp314t-macosx_10_15_x86_64.whl", hash = "sha256:d4d8fe59808a54658fcc0160ecfb1b30f9089906c50b23bcb4c69eddc19ec2b4", size = 164263, upload-time = "2026-03-25T20:21:52.543Z" }, + { url = "https://files.pythonhosted.org/packages/24/79/6ab420d37a270b89f7195dec5448f79400d9e9c1826df982f3f8e97b24fd/tomli-2.4.1-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:7008df2e7655c495dd12d2a4ad038ff878d4ca4b81fccaf82b714e07eae4402c", size = 160736, upload-time = "2026-03-25T20:21:53.674Z" }, + { url = "https://files.pythonhosted.org/packages/02/e0/3630057d8eb170310785723ed5adcdfb7d50cb7e6455f85ba8a3deed642b/tomli-2.4.1-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:1d8591993e228b0c930c4bb0db464bdad97b3289fb981255d6c9a41aedc84b2d", size = 270717, upload-time = "2026-03-25T20:21:55.129Z" }, + { url = "https://files.pythonhosted.org/packages/7a/b4/1613716072e544d1a7891f548d8f9ec6ce2faf42ca65acae01d76ea06bb0/tomli-2.4.1-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:734e20b57ba95624ecf1841e72b53f6e186355e216e5412de414e3c51e5e3c41", size = 278461, upload-time = "2026-03-25T20:21:56.228Z" }, + { url = "https://files.pythonhosted.org/packages/05/38/30f541baf6a3f6df77b3df16b01ba319221389e2da59427e221ef417ac0c/tomli-2.4.1-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:8a650c2dbafa08d42e51ba0b62740dae4ecb9338eefa093aa5c78ceb546fcd5c", size = 274855, upload-time = "2026-03-25T20:21:57.653Z" }, + { url = "https://files.pythonhosted.org/packages/77/a3/ec9dd4fd2c38e98de34223b995a3b34813e6bdadf86c75314c928350ed14/tomli-2.4.1-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:504aa796fe0569bb43171066009ead363de03675276d2d121ac1a4572397870f", size = 283144, upload-time = "2026-03-25T20:21:59.089Z" }, + { url = "https://files.pythonhosted.org/packages/ef/be/605a6261cac79fba2ec0c9827e986e00323a1945700969b8ee0b30d85453/tomli-2.4.1-cp314-cp314t-win32.whl", hash = "sha256:b1d22e6e9387bf4739fbe23bfa80e93f6b0373a7f1b96c6227c32bef95a4d7a8", size = 108683, upload-time = "2026-03-25T20:22:00.214Z" }, + { url = "https://files.pythonhosted.org/packages/12/64/da524626d3b9cc40c168a13da8335fe1c51be12c0a63685cc6db7308daae/tomli-2.4.1-cp314-cp314t-win_amd64.whl", hash = "sha256:2c1c351919aca02858f740c6d33adea0c5deea37f9ecca1cc1ef9e884a619d26", size = 121196, upload-time = "2026-03-25T20:22:01.169Z" }, + { url = "https://files.pythonhosted.org/packages/5a/cd/e80b62269fc78fc36c9af5a6b89c835baa8af28ff5ad28c7028d60860320/tomli-2.4.1-cp314-cp314t-win_arm64.whl", hash = "sha256:eab21f45c7f66c13f2a9e0e1535309cee140182a9cdae1e041d02e47291e8396", size = 100393, upload-time = "2026-03-25T20:22:02.137Z" }, + { url = "https://files.pythonhosted.org/packages/7b/61/cceae43728b7de99d9b847560c262873a1f6c98202171fd5ed62640b494b/tomli-2.4.1-py3-none-any.whl", hash = "sha256:0d85819802132122da43cb86656f8d1f8c6587d54ae7dcaf30e90533028b49fe", size = 14583, upload-time = "2026-03-25T20:22:03.012Z" }, +] + +[[package]] +name = "tomli-w" +version = "1.2.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/19/75/241269d1da26b624c0d5e110e8149093c759b7a286138f4efd61a60e75fe/tomli_w-1.2.0.tar.gz", hash = "sha256:2dd14fac5a47c27be9cd4c976af5a12d87fb1f0b4512f81d69cce3b35ae25021", size = 7184, upload-time = "2025-01-15T12:07:24.262Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/c7/18/c86eb8e0202e32dd3df50d43d7ff9854f8e0603945ff398974c1d91ac1ef/tomli_w-1.2.0-py3-none-any.whl", hash = "sha256:188306098d013b691fcadc011abd66727d3c414c571bb01b1a174ba8c983cf90", size = 6675, upload-time = "2025-01-15T12:07:22.074Z" }, +] + +[[package]] +name = "tomlkit" +version = "0.13.3" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/cc/18/0bbf3884e9eaa38819ebe46a7bd25dcd56b67434402b66a58c4b8e552575/tomlkit-0.13.3.tar.gz", hash = "sha256:430cf247ee57df2b94ee3fbe588e71d362a941ebb545dec29b53961d61add2a1", size = 185207, upload-time = "2025-06-05T07:13:44.947Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/bd/75/8539d011f6be8e29f339c42e633aae3cb73bffa95dd0f9adec09b9c58e85/tomlkit-0.13.3-py3-none-any.whl", hash = "sha256:c89c649d79ee40629a9fda55f8ace8c6a1b42deb912b2a8fd8d942ddadb606b0", size = 38901, upload-time = "2025-06-05T07:13:43.546Z" }, +] + +[[package]] +name = "tqdm" +version = "4.67.3" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "colorama", marker = "sys_platform == 'win32'" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/09/a9/6ba95a270c6f1fbcd8dac228323f2777d886cb206987444e4bce66338dd4/tqdm-4.67.3.tar.gz", hash = "sha256:7d825f03f89244ef73f1d4ce193cb1774a8179fd96f31d7e1dcde62092b960bb", size = 169598, upload-time = "2026-02-03T17:35:53.048Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/16/e1/3079a9ff9b8e11b846c6ac5c8b5bfb7ff225eee721825310c91b3b50304f/tqdm-4.67.3-py3-none-any.whl", hash = "sha256:ee1e4c0e59148062281c49d80b25b67771a127c85fc9676d3be5f243206826bf", size = 78374, upload-time = "2026-02-03T17:35:50.982Z" }, +] + +[[package]] +name = "typer" +version = "0.24.1" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "annotated-doc" }, + { name = "click" }, + { name = "rich" }, + { name = "shellingham" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/f5/24/cb09efec5cc954f7f9b930bf8279447d24618bb6758d4f6adf2574c41780/typer-0.24.1.tar.gz", hash = "sha256:e39b4732d65fbdcde189ae76cf7cd48aeae72919dea1fdfc16593be016256b45", size = 118613, upload-time = "2026-02-21T16:54:40.609Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/4a/91/48db081e7a63bb37284f9fbcefda7c44c277b18b0e13fbc36ea2335b71e6/typer-0.24.1-py3-none-any.whl", hash = "sha256:112c1f0ce578bfb4cab9ffdabc68f031416ebcc216536611ba21f04e9aa84c9e", size = 56085, upload-time = "2026-02-21T16:54:41.616Z" }, +] + +[[package]] +name = "typing-extensions" +version = "4.15.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/72/94/1a15dd82efb362ac84269196e94cf00f187f7ed21c242792a923cdb1c61f/typing_extensions-4.15.0.tar.gz", hash = "sha256:0cea48d173cc12fa28ecabc3b837ea3cf6f38c6d1136f85cbaaf598984861466", size = 109391, upload-time = "2025-08-25T13:49:26.313Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/18/67/36e9267722cc04a6b9f15c7f3441c2363321a3ea07da7ae0c0707beb2a9c/typing_extensions-4.15.0-py3-none-any.whl", hash = "sha256:f0fa19c6845758ab08074a0cfa8b7aecb71c999ca73d62883bc25cc018c4e548", size = 44614, upload-time = "2025-08-25T13:49:24.86Z" }, +] + +[[package]] +name = "typing-inspection" +version = "0.4.2" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "typing-extensions" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/55/e3/70399cb7dd41c10ac53367ae42139cf4b1ca5f36bb3dc6c9d33acdb43655/typing_inspection-0.4.2.tar.gz", hash = "sha256:ba561c48a67c5958007083d386c3295464928b01faa735ab8547c5692e87f464", size = 75949, upload-time = "2025-10-01T02:14:41.687Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/dc/9b/47798a6c91d8bdb567fe2698fe81e0c6b7cb7ef4d13da4114b41d239f65d/typing_inspection-0.4.2-py3-none-any.whl", hash = "sha256:4ed1cacbdc298c220f1bd249ed5287caa16f34d44ef4e9c3d0cbad5b521545e7", size = 14611, upload-time = "2025-10-01T02:14:40.154Z" }, +] + +[[package]] +name = "tzdata" +version = "2025.3" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/5e/a7/c202b344c5ca7daf398f3b8a477eeb205cf3b6f32e7ec3a6bac0629ca975/tzdata-2025.3.tar.gz", hash = "sha256:de39c2ca5dc7b0344f2eba86f49d614019d29f060fc4ebc8a417896a620b56a7", size = 196772, upload-time = "2025-12-13T17:45:35.667Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/c7/b0/003792df09decd6849a5e39c28b513c06e84436a54440380862b5aeff25d/tzdata-2025.3-py2.py3-none-any.whl", hash = "sha256:06a47e5700f3081aab02b2e513160914ff0694bce9947d6b76ebd6bf57cfc5d1", size = 348521, upload-time = "2025-12-13T17:45:33.889Z" }, +] + +[[package]] +name = "uncalled-for" +version = "0.2.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/02/7c/b5b7d8136f872e3f13b0584e576886de0489d7213a12de6bebf29ff6ebfc/uncalled_for-0.2.0.tar.gz", hash = "sha256:b4f8fdbcec328c5a113807d653e041c5094473dd4afa7c34599ace69ccb7e69f", size = 49488, upload-time = "2026-02-27T17:40:58.137Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/ff/7f/4320d9ce3be404e6310b915c3629fe27bf1e2f438a1a7a3cb0396e32e9a9/uncalled_for-0.2.0-py3-none-any.whl", hash = "sha256:2c0bd338faff5f930918f79e7eb9ff48290df2cb05fcc0b40a7f334e55d4d85f", size = 11351, upload-time = "2026-02-27T17:40:56.804Z" }, +] + +[[package]] +name = "urllib3" +version = "2.6.3" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/c7/24/5f1b3bdffd70275f6661c76461e25f024d5a38a46f04aaca912426a2b1d3/urllib3-2.6.3.tar.gz", hash = "sha256:1b62b6884944a57dbe321509ab94fd4d3b307075e0c2eae991ac71ee15ad38ed", size = 435556, upload-time = "2026-01-07T16:24:43.925Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/39/08/aaaad47bc4e9dc8c725e68f9d04865dbcb2052843ff09c97b08904852d84/urllib3-2.6.3-py3-none-any.whl", hash = "sha256:bf272323e553dfb2e87d9bfd225ca7b0f467b919d7bbd355436d3fd37cb0acd4", size = 131584, upload-time = "2026-01-07T16:24:42.685Z" }, +] + +[[package]] +name = "uvicorn" +version = "0.42.0" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "click" }, + { name = "h11" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/e3/ad/4a96c425be6fb67e0621e62d86c402b4a17ab2be7f7c055d9bd2f638b9e2/uvicorn-0.42.0.tar.gz", hash = "sha256:9b1f190ce15a2dd22e7758651d9b6d12df09a13d51ba5bf4fc33c383a48e1775", size = 85393, upload-time = "2026-03-16T06:19:50.077Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/0a/89/f8827ccff89c1586027a105e5630ff6139a64da2515e24dafe860bd9ae4d/uvicorn-0.42.0-py3-none-any.whl", hash = "sha256:96c30f5c7abe6f74ae8900a70e92b85ad6613b745d4879eb9b16ccad15645359", size = 68830, upload-time = "2026-03-16T06:19:48.325Z" }, +] + +[[package]] +name = "watchfiles" +version = "1.1.1" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "anyio" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/c2/c9/8869df9b2a2d6c59d79220a4db37679e74f807c559ffe5265e08b227a210/watchfiles-1.1.1.tar.gz", hash = "sha256:a173cb5c16c4f40ab19cecf48a534c409f7ea983ab8fed0741304a1c0a31b3f2", size = 94440, upload-time = "2025-10-14T15:06:21.08Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/1f/f8/2c5f479fb531ce2f0564eda479faecf253d886b1ab3630a39b7bf7362d46/watchfiles-1.1.1-cp311-cp311-macosx_10_12_x86_64.whl", hash = "sha256:f57b396167a2565a4e8b5e56a5a1c537571733992b226f4f1197d79e94cf0ae5", size = 406529, upload-time = "2025-10-14T15:04:32.899Z" }, + { url = "https://files.pythonhosted.org/packages/fe/cd/f515660b1f32f65df671ddf6f85bfaca621aee177712874dc30a97397977/watchfiles-1.1.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:421e29339983e1bebc281fab40d812742268ad057db4aee8c4d2bce0af43b741", size = 394384, upload-time = "2025-10-14T15:04:33.761Z" }, + { url = "https://files.pythonhosted.org/packages/7b/c3/28b7dc99733eab43fca2d10f55c86e03bd6ab11ca31b802abac26b23d161/watchfiles-1.1.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:6e43d39a741e972bab5d8100b5cdacf69db64e34eb19b6e9af162bccf63c5cc6", size = 448789, upload-time = "2025-10-14T15:04:34.679Z" }, + { url = "https://files.pythonhosted.org/packages/4a/24/33e71113b320030011c8e4316ccca04194bf0cbbaeee207f00cbc7d6b9f5/watchfiles-1.1.1-cp311-cp311-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:f537afb3276d12814082a2e9b242bdcf416c2e8fd9f799a737990a1dbe906e5b", size = 460521, upload-time = "2025-10-14T15:04:35.963Z" }, + { url = "https://files.pythonhosted.org/packages/f4/c3/3c9a55f255aa57b91579ae9e98c88704955fa9dac3e5614fb378291155df/watchfiles-1.1.1-cp311-cp311-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:b2cd9e04277e756a2e2d2543d65d1e2166d6fd4c9b183f8808634fda23f17b14", size = 488722, upload-time = "2025-10-14T15:04:37.091Z" }, + { url = "https://files.pythonhosted.org/packages/49/36/506447b73eb46c120169dc1717fe2eff07c234bb3232a7200b5f5bd816e9/watchfiles-1.1.1-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:5f3f58818dc0b07f7d9aa7fe9eb1037aecb9700e63e1f6acfed13e9fef648f5d", size = 596088, upload-time = "2025-10-14T15:04:38.39Z" }, + { url = "https://files.pythonhosted.org/packages/82/ab/5f39e752a9838ec4d52e9b87c1e80f1ee3ccdbe92e183c15b6577ab9de16/watchfiles-1.1.1-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:9bb9f66367023ae783551042d31b1d7fd422e8289eedd91f26754a66f44d5cff", size = 472923, upload-time = "2025-10-14T15:04:39.666Z" }, + { url = "https://files.pythonhosted.org/packages/af/b9/a419292f05e302dea372fa7e6fda5178a92998411f8581b9830d28fb9edb/watchfiles-1.1.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:aebfd0861a83e6c3d1110b78ad54704486555246e542be3e2bb94195eabb2606", size = 456080, upload-time = "2025-10-14T15:04:40.643Z" }, + { url = "https://files.pythonhosted.org/packages/b0/c3/d5932fd62bde1a30c36e10c409dc5d54506726f08cb3e1d8d0ba5e2bc8db/watchfiles-1.1.1-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:5fac835b4ab3c6487b5dbad78c4b3724e26bcc468e886f8ba8cc4306f68f6701", size = 629432, upload-time = "2025-10-14T15:04:41.789Z" }, + { url = "https://files.pythonhosted.org/packages/f7/77/16bddd9779fafb795f1a94319dc965209c5641db5bf1edbbccace6d1b3c0/watchfiles-1.1.1-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:399600947b170270e80134ac854e21b3ccdefa11a9529a3decc1327088180f10", size = 623046, upload-time = "2025-10-14T15:04:42.718Z" }, + { url = "https://files.pythonhosted.org/packages/46/ef/f2ecb9a0f342b4bfad13a2787155c6ee7ce792140eac63a34676a2feeef2/watchfiles-1.1.1-cp311-cp311-win32.whl", hash = "sha256:de6da501c883f58ad50db3a32ad397b09ad29865b5f26f64c24d3e3281685849", size = 271473, upload-time = "2025-10-14T15:04:43.624Z" }, + { url = "https://files.pythonhosted.org/packages/94/bc/f42d71125f19731ea435c3948cad148d31a64fccde3867e5ba4edee901f9/watchfiles-1.1.1-cp311-cp311-win_amd64.whl", hash = "sha256:35c53bd62a0b885bf653ebf6b700d1bf05debb78ad9292cf2a942b23513dc4c4", size = 287598, upload-time = "2025-10-14T15:04:44.516Z" }, + { url = "https://files.pythonhosted.org/packages/57/c9/a30f897351f95bbbfb6abcadafbaca711ce1162f4db95fc908c98a9165f3/watchfiles-1.1.1-cp311-cp311-win_arm64.whl", hash = "sha256:57ca5281a8b5e27593cb7d82c2ac927ad88a96ed406aa446f6344e4328208e9e", size = 277210, upload-time = "2025-10-14T15:04:45.883Z" }, + { url = "https://files.pythonhosted.org/packages/74/d5/f039e7e3c639d9b1d09b07ea412a6806d38123f0508e5f9b48a87b0a76cc/watchfiles-1.1.1-cp312-cp312-macosx_10_12_x86_64.whl", hash = "sha256:8c89f9f2f740a6b7dcc753140dd5e1ab9215966f7a3530d0c0705c83b401bd7d", size = 404745, upload-time = "2025-10-14T15:04:46.731Z" }, + { url = "https://files.pythonhosted.org/packages/a5/96/a881a13aa1349827490dab2d363c8039527060cfcc2c92cc6d13d1b1049e/watchfiles-1.1.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:bd404be08018c37350f0d6e34676bd1e2889990117a2b90070b3007f172d0610", size = 391769, upload-time = "2025-10-14T15:04:48.003Z" }, + { url = "https://files.pythonhosted.org/packages/4b/5b/d3b460364aeb8da471c1989238ea0e56bec24b6042a68046adf3d9ddb01c/watchfiles-1.1.1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:8526e8f916bb5b9a0a777c8317c23ce65de259422bba5b31325a6fa6029d33af", size = 449374, upload-time = "2025-10-14T15:04:49.179Z" }, + { url = "https://files.pythonhosted.org/packages/b9/44/5769cb62d4ed055cb17417c0a109a92f007114a4e07f30812a73a4efdb11/watchfiles-1.1.1-cp312-cp312-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:2edc3553362b1c38d9f06242416a5d8e9fe235c204a4072e988ce2e5bb1f69f6", size = 459485, upload-time = "2025-10-14T15:04:50.155Z" }, + { url = "https://files.pythonhosted.org/packages/19/0c/286b6301ded2eccd4ffd0041a1b726afda999926cf720aab63adb68a1e36/watchfiles-1.1.1-cp312-cp312-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:30f7da3fb3f2844259cba4720c3fc7138eb0f7b659c38f3bfa65084c7fc7abce", size = 488813, upload-time = "2025-10-14T15:04:51.059Z" }, + { url = "https://files.pythonhosted.org/packages/c7/2b/8530ed41112dd4a22f4dcfdb5ccf6a1baad1ff6eed8dc5a5f09e7e8c41c7/watchfiles-1.1.1-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:f8979280bdafff686ba5e4d8f97840f929a87ed9cdf133cbbd42f7766774d2aa", size = 594816, upload-time = "2025-10-14T15:04:52.031Z" }, + { url = "https://files.pythonhosted.org/packages/ce/d2/f5f9fb49489f184f18470d4f99f4e862a4b3e9ac2865688eb2099e3d837a/watchfiles-1.1.1-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:dcc5c24523771db3a294c77d94771abcfcb82a0e0ee8efd910c37c59ec1b31bb", size = 475186, upload-time = "2025-10-14T15:04:53.064Z" }, + { url = "https://files.pythonhosted.org/packages/cf/68/5707da262a119fb06fbe214d82dd1fe4a6f4af32d2d14de368d0349eb52a/watchfiles-1.1.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:1db5d7ae38ff20153d542460752ff397fcf5c96090c1230803713cf3147a6803", size = 456812, upload-time = "2025-10-14T15:04:55.174Z" }, + { url = "https://files.pythonhosted.org/packages/66/ab/3cbb8756323e8f9b6f9acb9ef4ec26d42b2109bce830cc1f3468df20511d/watchfiles-1.1.1-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:28475ddbde92df1874b6c5c8aaeb24ad5be47a11f87cde5a28ef3835932e3e94", size = 630196, upload-time = "2025-10-14T15:04:56.22Z" }, + { url = "https://files.pythonhosted.org/packages/78/46/7152ec29b8335f80167928944a94955015a345440f524d2dfe63fc2f437b/watchfiles-1.1.1-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:36193ed342f5b9842edd3532729a2ad55c4160ffcfa3700e0d54be496b70dd43", size = 622657, upload-time = "2025-10-14T15:04:57.521Z" }, + { url = "https://files.pythonhosted.org/packages/0a/bf/95895e78dd75efe9a7f31733607f384b42eb5feb54bd2eb6ed57cc2e94f4/watchfiles-1.1.1-cp312-cp312-win32.whl", hash = "sha256:859e43a1951717cc8de7f4c77674a6d389b106361585951d9e69572823f311d9", size = 272042, upload-time = "2025-10-14T15:04:59.046Z" }, + { url = "https://files.pythonhosted.org/packages/87/0a/90eb755f568de2688cb220171c4191df932232c20946966c27a59c400850/watchfiles-1.1.1-cp312-cp312-win_amd64.whl", hash = "sha256:91d4c9a823a8c987cce8fa2690923b069966dabb196dd8d137ea2cede885fde9", size = 288410, upload-time = "2025-10-14T15:05:00.081Z" }, + { url = "https://files.pythonhosted.org/packages/36/76/f322701530586922fbd6723c4f91ace21364924822a8772c549483abed13/watchfiles-1.1.1-cp312-cp312-win_arm64.whl", hash = "sha256:a625815d4a2bdca61953dbba5a39d60164451ef34c88d751f6c368c3ea73d404", size = 278209, upload-time = "2025-10-14T15:05:01.168Z" }, + { url = "https://files.pythonhosted.org/packages/bb/f4/f750b29225fe77139f7ae5de89d4949f5a99f934c65a1f1c0b248f26f747/watchfiles-1.1.1-cp313-cp313-macosx_10_12_x86_64.whl", hash = "sha256:130e4876309e8686a5e37dba7d5e9bc77e6ed908266996ca26572437a5271e18", size = 404321, upload-time = "2025-10-14T15:05:02.063Z" }, + { url = "https://files.pythonhosted.org/packages/2b/f9/f07a295cde762644aa4c4bb0f88921d2d141af45e735b965fb2e87858328/watchfiles-1.1.1-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:5f3bde70f157f84ece3765b42b4a52c6ac1a50334903c6eaf765362f6ccca88a", size = 391783, upload-time = "2025-10-14T15:05:03.052Z" }, + { url = "https://files.pythonhosted.org/packages/bc/11/fc2502457e0bea39a5c958d86d2cb69e407a4d00b85735ca724bfa6e0d1a/watchfiles-1.1.1-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:14e0b1fe858430fc0251737ef3824c54027bedb8c37c38114488b8e131cf8219", size = 449279, upload-time = "2025-10-14T15:05:04.004Z" }, + { url = "https://files.pythonhosted.org/packages/e3/1f/d66bc15ea0b728df3ed96a539c777acfcad0eb78555ad9efcaa1274688f0/watchfiles-1.1.1-cp313-cp313-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:f27db948078f3823a6bb3b465180db8ebecf26dd5dae6f6180bd87383b6b4428", size = 459405, upload-time = "2025-10-14T15:05:04.942Z" }, + { url = "https://files.pythonhosted.org/packages/be/90/9f4a65c0aec3ccf032703e6db02d89a157462fbb2cf20dd415128251cac0/watchfiles-1.1.1-cp313-cp313-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:059098c3a429f62fc98e8ec62b982230ef2c8df68c79e826e37b895bc359a9c0", size = 488976, upload-time = "2025-10-14T15:05:05.905Z" }, + { url = "https://files.pythonhosted.org/packages/37/57/ee347af605d867f712be7029bb94c8c071732a4b44792e3176fa3c612d39/watchfiles-1.1.1-cp313-cp313-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:bfb5862016acc9b869bb57284e6cb35fdf8e22fe59f7548858e2f971d045f150", size = 595506, upload-time = "2025-10-14T15:05:06.906Z" }, + { url = "https://files.pythonhosted.org/packages/a8/78/cc5ab0b86c122047f75e8fc471c67a04dee395daf847d3e59381996c8707/watchfiles-1.1.1-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:319b27255aacd9923b8a276bb14d21a5f7ff82564c744235fc5eae58d95422ae", size = 474936, upload-time = "2025-10-14T15:05:07.906Z" }, + { url = "https://files.pythonhosted.org/packages/62/da/def65b170a3815af7bd40a3e7010bf6ab53089ef1b75d05dd5385b87cf08/watchfiles-1.1.1-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c755367e51db90e75b19454b680903631d41f9e3607fbd941d296a020c2d752d", size = 456147, upload-time = "2025-10-14T15:05:09.138Z" }, + { url = "https://files.pythonhosted.org/packages/57/99/da6573ba71166e82d288d4df0839128004c67d2778d3b566c138695f5c0b/watchfiles-1.1.1-cp313-cp313-musllinux_1_1_aarch64.whl", hash = "sha256:c22c776292a23bfc7237a98f791b9ad3144b02116ff10d820829ce62dff46d0b", size = 630007, upload-time = "2025-10-14T15:05:10.117Z" }, + { url = "https://files.pythonhosted.org/packages/a8/51/7439c4dd39511368849eb1e53279cd3454b4a4dbace80bab88feeb83c6b5/watchfiles-1.1.1-cp313-cp313-musllinux_1_1_x86_64.whl", hash = "sha256:3a476189be23c3686bc2f4321dd501cb329c0a0469e77b7b534ee10129ae6374", size = 622280, upload-time = "2025-10-14T15:05:11.146Z" }, + { url = "https://files.pythonhosted.org/packages/95/9c/8ed97d4bba5db6fdcdb2b298d3898f2dd5c20f6b73aee04eabe56c59677e/watchfiles-1.1.1-cp313-cp313-win32.whl", hash = "sha256:bf0a91bfb5574a2f7fc223cf95eeea79abfefa404bf1ea5e339c0c1560ae99a0", size = 272056, upload-time = "2025-10-14T15:05:12.156Z" }, + { url = "https://files.pythonhosted.org/packages/1f/f3/c14e28429f744a260d8ceae18bf58c1d5fa56b50d006a7a9f80e1882cb0d/watchfiles-1.1.1-cp313-cp313-win_amd64.whl", hash = "sha256:52e06553899e11e8074503c8e716d574adeeb7e68913115c4b3653c53f9bae42", size = 288162, upload-time = "2025-10-14T15:05:13.208Z" }, + { url = "https://files.pythonhosted.org/packages/dc/61/fe0e56c40d5cd29523e398d31153218718c5786b5e636d9ae8ae79453d27/watchfiles-1.1.1-cp313-cp313-win_arm64.whl", hash = "sha256:ac3cc5759570cd02662b15fbcd9d917f7ecd47efe0d6b40474eafd246f91ea18", size = 277909, upload-time = "2025-10-14T15:05:14.49Z" }, + { url = "https://files.pythonhosted.org/packages/79/42/e0a7d749626f1e28c7108a99fb9bf524b501bbbeb9b261ceecde644d5a07/watchfiles-1.1.1-cp313-cp313t-macosx_10_12_x86_64.whl", hash = "sha256:563b116874a9a7ce6f96f87cd0b94f7faf92d08d0021e837796f0a14318ef8da", size = 403389, upload-time = "2025-10-14T15:05:15.777Z" }, + { url = "https://files.pythonhosted.org/packages/15/49/08732f90ce0fbbc13913f9f215c689cfc9ced345fb1bcd8829a50007cc8d/watchfiles-1.1.1-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:3ad9fe1dae4ab4212d8c91e80b832425e24f421703b5a42ef2e4a1e215aff051", size = 389964, upload-time = "2025-10-14T15:05:16.85Z" }, + { url = "https://files.pythonhosted.org/packages/27/0d/7c315d4bd5f2538910491a0393c56bf70d333d51bc5b34bee8e68e8cea19/watchfiles-1.1.1-cp313-cp313t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ce70f96a46b894b36eba678f153f052967a0d06d5b5a19b336ab0dbbd029f73e", size = 448114, upload-time = "2025-10-14T15:05:17.876Z" }, + { url = "https://files.pythonhosted.org/packages/c3/24/9e096de47a4d11bc4df41e9d1e61776393eac4cb6eb11b3e23315b78b2cc/watchfiles-1.1.1-cp313-cp313t-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:cb467c999c2eff23a6417e58d75e5828716f42ed8289fe6b77a7e5a91036ca70", size = 460264, upload-time = "2025-10-14T15:05:18.962Z" }, + { url = "https://files.pythonhosted.org/packages/cc/0f/e8dea6375f1d3ba5fcb0b3583e2b493e77379834c74fd5a22d66d85d6540/watchfiles-1.1.1-cp313-cp313t-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:836398932192dae4146c8f6f737d74baeac8b70ce14831a239bdb1ca882fc261", size = 487877, upload-time = "2025-10-14T15:05:20.094Z" }, + { url = "https://files.pythonhosted.org/packages/ac/5b/df24cfc6424a12deb41503b64d42fbea6b8cb357ec62ca84a5a3476f654a/watchfiles-1.1.1-cp313-cp313t-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:743185e7372b7bc7c389e1badcc606931a827112fbbd37f14c537320fca08620", size = 595176, upload-time = "2025-10-14T15:05:21.134Z" }, + { url = "https://files.pythonhosted.org/packages/8f/b5/853b6757f7347de4e9b37e8cc3289283fb983cba1ab4d2d7144694871d9c/watchfiles-1.1.1-cp313-cp313t-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:afaeff7696e0ad9f02cbb8f56365ff4686ab205fcf9c4c5b6fdfaaa16549dd04", size = 473577, upload-time = "2025-10-14T15:05:22.306Z" }, + { url = "https://files.pythonhosted.org/packages/e1/f7/0a4467be0a56e80447c8529c9fce5b38eab4f513cb3d9bf82e7392a5696b/watchfiles-1.1.1-cp313-cp313t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3f7eb7da0eb23aa2ba036d4f616d46906013a68caf61b7fdbe42fc8b25132e77", size = 455425, upload-time = "2025-10-14T15:05:23.348Z" }, + { url = "https://files.pythonhosted.org/packages/8e/e0/82583485ea00137ddf69bc84a2db88bd92ab4a6e3c405e5fb878ead8d0e7/watchfiles-1.1.1-cp313-cp313t-musllinux_1_1_aarch64.whl", hash = "sha256:831a62658609f0e5c64178211c942ace999517f5770fe9436be4c2faeba0c0ef", size = 628826, upload-time = "2025-10-14T15:05:24.398Z" }, + { url = "https://files.pythonhosted.org/packages/28/9a/a785356fccf9fae84c0cc90570f11702ae9571036fb25932f1242c82191c/watchfiles-1.1.1-cp313-cp313t-musllinux_1_1_x86_64.whl", hash = "sha256:f9a2ae5c91cecc9edd47e041a930490c31c3afb1f5e6d71de3dc671bfaca02bf", size = 622208, upload-time = "2025-10-14T15:05:25.45Z" }, + { url = "https://files.pythonhosted.org/packages/c3/f4/0872229324ef69b2c3edec35e84bd57a1289e7d3fe74588048ed8947a323/watchfiles-1.1.1-cp314-cp314-macosx_10_12_x86_64.whl", hash = "sha256:d1715143123baeeaeadec0528bb7441103979a1d5f6fd0e1f915383fea7ea6d5", size = 404315, upload-time = "2025-10-14T15:05:26.501Z" }, + { url = "https://files.pythonhosted.org/packages/7b/22/16d5331eaed1cb107b873f6ae1b69e9ced582fcf0c59a50cd84f403b1c32/watchfiles-1.1.1-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:39574d6370c4579d7f5d0ad940ce5b20db0e4117444e39b6d8f99db5676c52fd", size = 390869, upload-time = "2025-10-14T15:05:27.649Z" }, + { url = "https://files.pythonhosted.org/packages/b2/7e/5643bfff5acb6539b18483128fdc0ef2cccc94a5b8fbda130c823e8ed636/watchfiles-1.1.1-cp314-cp314-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:7365b92c2e69ee952902e8f70f3ba6360d0d596d9299d55d7d386df84b6941fb", size = 449919, upload-time = "2025-10-14T15:05:28.701Z" }, + { url = "https://files.pythonhosted.org/packages/51/2e/c410993ba5025a9f9357c376f48976ef0e1b1aefb73b97a5ae01a5972755/watchfiles-1.1.1-cp314-cp314-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:bfff9740c69c0e4ed32416f013f3c45e2ae42ccedd1167ef2d805c000b6c71a5", size = 460845, upload-time = "2025-10-14T15:05:30.064Z" }, + { url = "https://files.pythonhosted.org/packages/8e/a4/2df3b404469122e8680f0fcd06079317e48db58a2da2950fb45020947734/watchfiles-1.1.1-cp314-cp314-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:b27cf2eb1dda37b2089e3907d8ea92922b673c0c427886d4edc6b94d8dfe5db3", size = 489027, upload-time = "2025-10-14T15:05:31.064Z" }, + { url = "https://files.pythonhosted.org/packages/ea/84/4587ba5b1f267167ee715b7f66e6382cca6938e0a4b870adad93e44747e6/watchfiles-1.1.1-cp314-cp314-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:526e86aced14a65a5b0ec50827c745597c782ff46b571dbfe46192ab9e0b3c33", size = 595615, upload-time = "2025-10-14T15:05:32.074Z" }, + { url = "https://files.pythonhosted.org/packages/6a/0f/c6988c91d06e93cd0bb3d4a808bcf32375ca1904609835c3031799e3ecae/watchfiles-1.1.1-cp314-cp314-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:04e78dd0b6352db95507fd8cb46f39d185cf8c74e4cf1e4fbad1d3df96faf510", size = 474836, upload-time = "2025-10-14T15:05:33.209Z" }, + { url = "https://files.pythonhosted.org/packages/b4/36/ded8aebea91919485b7bbabbd14f5f359326cb5ec218cd67074d1e426d74/watchfiles-1.1.1-cp314-cp314-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:5c85794a4cfa094714fb9c08d4a218375b2b95b8ed1666e8677c349906246c05", size = 455099, upload-time = "2025-10-14T15:05:34.189Z" }, + { url = "https://files.pythonhosted.org/packages/98/e0/8c9bdba88af756a2fce230dd365fab2baf927ba42cd47521ee7498fd5211/watchfiles-1.1.1-cp314-cp314-musllinux_1_1_aarch64.whl", hash = "sha256:74d5012b7630714b66be7b7b7a78855ef7ad58e8650c73afc4c076a1f480a8d6", size = 630626, upload-time = "2025-10-14T15:05:35.216Z" }, + { url = "https://files.pythonhosted.org/packages/2a/84/a95db05354bf2d19e438520d92a8ca475e578c647f78f53197f5a2f17aaf/watchfiles-1.1.1-cp314-cp314-musllinux_1_1_x86_64.whl", hash = "sha256:8fbe85cb3201c7d380d3d0b90e63d520f15d6afe217165d7f98c9c649654db81", size = 622519, upload-time = "2025-10-14T15:05:36.259Z" }, + { url = "https://files.pythonhosted.org/packages/1d/ce/d8acdc8de545de995c339be67711e474c77d643555a9bb74a9334252bd55/watchfiles-1.1.1-cp314-cp314-win32.whl", hash = "sha256:3fa0b59c92278b5a7800d3ee7733da9d096d4aabcfabb9a928918bd276ef9b9b", size = 272078, upload-time = "2025-10-14T15:05:37.63Z" }, + { url = "https://files.pythonhosted.org/packages/c4/c9/a74487f72d0451524be827e8edec251da0cc1fcf111646a511ae752e1a3d/watchfiles-1.1.1-cp314-cp314-win_amd64.whl", hash = "sha256:c2047d0b6cea13b3316bdbafbfa0c4228ae593d995030fda39089d36e64fc03a", size = 287664, upload-time = "2025-10-14T15:05:38.95Z" }, + { url = "https://files.pythonhosted.org/packages/df/b8/8ac000702cdd496cdce998c6f4ee0ca1f15977bba51bdf07d872ebdfc34c/watchfiles-1.1.1-cp314-cp314-win_arm64.whl", hash = "sha256:842178b126593addc05acf6fce960d28bc5fae7afbaa2c6c1b3a7b9460e5be02", size = 277154, upload-time = "2025-10-14T15:05:39.954Z" }, + { url = "https://files.pythonhosted.org/packages/47/a8/e3af2184707c29f0f14b1963c0aace6529f9d1b8582d5b99f31bbf42f59e/watchfiles-1.1.1-cp314-cp314t-macosx_10_12_x86_64.whl", hash = "sha256:88863fbbc1a7312972f1c511f202eb30866370ebb8493aef2812b9ff28156a21", size = 403820, upload-time = "2025-10-14T15:05:40.932Z" }, + { url = "https://files.pythonhosted.org/packages/c0/ec/e47e307c2f4bd75f9f9e8afbe3876679b18e1bcec449beca132a1c5ffb2d/watchfiles-1.1.1-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:55c7475190662e202c08c6c0f4d9e345a29367438cf8e8037f3155e10a88d5a5", size = 390510, upload-time = "2025-10-14T15:05:41.945Z" }, + { url = "https://files.pythonhosted.org/packages/d5/a0/ad235642118090f66e7b2f18fd5c42082418404a79205cdfca50b6309c13/watchfiles-1.1.1-cp314-cp314t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:3f53fa183d53a1d7a8852277c92b967ae99c2d4dcee2bfacff8868e6e30b15f7", size = 448408, upload-time = "2025-10-14T15:05:43.385Z" }, + { url = "https://files.pythonhosted.org/packages/df/85/97fa10fd5ff3332ae17e7e40e20784e419e28521549780869f1413742e9d/watchfiles-1.1.1-cp314-cp314t-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:6aae418a8b323732fa89721d86f39ec8f092fc2af67f4217a2b07fd3e93c6101", size = 458968, upload-time = "2025-10-14T15:05:44.404Z" }, + { url = "https://files.pythonhosted.org/packages/47/c2/9059c2e8966ea5ce678166617a7f75ecba6164375f3b288e50a40dc6d489/watchfiles-1.1.1-cp314-cp314t-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:f096076119da54a6080e8920cbdaac3dbee667eb91dcc5e5b78840b87415bd44", size = 488096, upload-time = "2025-10-14T15:05:45.398Z" }, + { url = "https://files.pythonhosted.org/packages/94/44/d90a9ec8ac309bc26db808a13e7bfc0e4e78b6fc051078a554e132e80160/watchfiles-1.1.1-cp314-cp314t-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:00485f441d183717038ed2e887a7c868154f216877653121068107b227a2f64c", size = 596040, upload-time = "2025-10-14T15:05:46.502Z" }, + { url = "https://files.pythonhosted.org/packages/95/68/4e3479b20ca305cfc561db3ed207a8a1c745ee32bf24f2026a129d0ddb6e/watchfiles-1.1.1-cp314-cp314t-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:a55f3e9e493158d7bfdb60a1165035f1cf7d320914e7b7ea83fe22c6023b58fc", size = 473847, upload-time = "2025-10-14T15:05:47.484Z" }, + { url = "https://files.pythonhosted.org/packages/4f/55/2af26693fd15165c4ff7857e38330e1b61ab8c37d15dc79118cdba115b7a/watchfiles-1.1.1-cp314-cp314t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8c91ed27800188c2ae96d16e3149f199d62f86c7af5f5f4d2c61a3ed8cd3666c", size = 455072, upload-time = "2025-10-14T15:05:48.928Z" }, + { url = "https://files.pythonhosted.org/packages/66/1d/d0d200b10c9311ec25d2273f8aad8c3ef7cc7ea11808022501811208a750/watchfiles-1.1.1-cp314-cp314t-musllinux_1_1_aarch64.whl", hash = "sha256:311ff15a0bae3714ffb603e6ba6dbfba4065ab60865d15a6ec544133bdb21099", size = 629104, upload-time = "2025-10-14T15:05:49.908Z" }, + { url = "https://files.pythonhosted.org/packages/e3/bd/fa9bb053192491b3867ba07d2343d9f2252e00811567d30ae8d0f78136fe/watchfiles-1.1.1-cp314-cp314t-musllinux_1_1_x86_64.whl", hash = "sha256:a916a2932da8f8ab582f242c065f5c81bed3462849ca79ee357dd9551b0e9b01", size = 622112, upload-time = "2025-10-14T15:05:50.941Z" }, + { url = "https://files.pythonhosted.org/packages/d3/8e/e500f8b0b77be4ff753ac94dc06b33d8f0d839377fee1b78e8c8d8f031bf/watchfiles-1.1.1-pp311-pypy311_pp73-macosx_10_12_x86_64.whl", hash = "sha256:db476ab59b6765134de1d4fe96a1a9c96ddf091683599be0f26147ea1b2e4b88", size = 408250, upload-time = "2025-10-14T15:06:10.264Z" }, + { url = "https://files.pythonhosted.org/packages/bd/95/615e72cd27b85b61eec764a5ca51bd94d40b5adea5ff47567d9ebc4d275a/watchfiles-1.1.1-pp311-pypy311_pp73-macosx_11_0_arm64.whl", hash = "sha256:89eef07eee5e9d1fda06e38822ad167a044153457e6fd997f8a858ab7564a336", size = 396117, upload-time = "2025-10-14T15:06:11.28Z" }, + { url = "https://files.pythonhosted.org/packages/c9/81/e7fe958ce8a7fb5c73cc9fb07f5aeaf755e6aa72498c57d760af760c91f8/watchfiles-1.1.1-pp311-pypy311_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ce19e06cbda693e9e7686358af9cd6f5d61312ab8b00488bc36f5aabbaf77e24", size = 450493, upload-time = "2025-10-14T15:06:12.321Z" }, + { url = "https://files.pythonhosted.org/packages/6e/d4/ed38dd3b1767193de971e694aa544356e63353c33a85d948166b5ff58b9e/watchfiles-1.1.1-pp311-pypy311_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3e6f39af2eab0118338902798b5aa6664f46ff66bc0280de76fca67a7f262a49", size = 457546, upload-time = "2025-10-14T15:06:13.372Z" }, +] + +[[package]] +name = "websockets" +version = "16.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/04/24/4b2031d72e840ce4c1ccb255f693b15c334757fc50023e4db9537080b8c4/websockets-16.0.tar.gz", hash = "sha256:5f6261a5e56e8d5c42a4497b364ea24d94d9563e8fbd44e78ac40879c60179b5", size = 179346, upload-time = "2026-01-10T09:23:47.181Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/f2/db/de907251b4ff46ae804ad0409809504153b3f30984daf82a1d84a9875830/websockets-16.0-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:31a52addea25187bde0797a97d6fc3d2f92b6f72a9370792d65a6e84615ac8a8", size = 177340, upload-time = "2026-01-10T09:22:34.539Z" }, + { url = "https://files.pythonhosted.org/packages/f3/fa/abe89019d8d8815c8781e90d697dec52523fb8ebe308bf11664e8de1877e/websockets-16.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:417b28978cdccab24f46400586d128366313e8a96312e4b9362a4af504f3bbad", size = 175022, upload-time = "2026-01-10T09:22:36.332Z" }, + { url = "https://files.pythonhosted.org/packages/58/5d/88ea17ed1ded2079358b40d31d48abe90a73c9e5819dbcde1606e991e2ad/websockets-16.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:af80d74d4edfa3cb9ed973a0a5ba2b2a549371f8a741e0800cb07becdd20f23d", size = 175319, upload-time = "2026-01-10T09:22:37.602Z" }, + { url = "https://files.pythonhosted.org/packages/d2/ae/0ee92b33087a33632f37a635e11e1d99d429d3d323329675a6022312aac2/websockets-16.0-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:08d7af67b64d29823fed316505a89b86705f2b7981c07848fb5e3ea3020c1abe", size = 184631, upload-time = "2026-01-10T09:22:38.789Z" }, + { url = "https://files.pythonhosted.org/packages/c8/c5/27178df583b6c5b31b29f526ba2da5e2f864ecc79c99dae630a85d68c304/websockets-16.0-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:7be95cfb0a4dae143eaed2bcba8ac23f4892d8971311f1b06f3c6b78952ee70b", size = 185870, upload-time = "2026-01-10T09:22:39.893Z" }, + { url = "https://files.pythonhosted.org/packages/87/05/536652aa84ddc1c018dbb7e2c4cbcd0db884580bf8e95aece7593fde526f/websockets-16.0-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:d6297ce39ce5c2e6feb13c1a996a2ded3b6832155fcfc920265c76f24c7cceb5", size = 185361, upload-time = "2026-01-10T09:22:41.016Z" }, + { url = "https://files.pythonhosted.org/packages/6d/e2/d5332c90da12b1e01f06fb1b85c50cfc489783076547415bf9f0a659ec19/websockets-16.0-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:1c1b30e4f497b0b354057f3467f56244c603a79c0d1dafce1d16c283c25f6e64", size = 184615, upload-time = "2026-01-10T09:22:42.442Z" }, + { url = "https://files.pythonhosted.org/packages/77/fb/d3f9576691cae9253b51555f841bc6600bf0a983a461c79500ace5a5b364/websockets-16.0-cp311-cp311-win32.whl", hash = "sha256:5f451484aeb5cafee1ccf789b1b66f535409d038c56966d6101740c1614b86c6", size = 178246, upload-time = "2026-01-10T09:22:43.654Z" }, + { url = "https://files.pythonhosted.org/packages/54/67/eaff76b3dbaf18dcddabc3b8c1dba50b483761cccff67793897945b37408/websockets-16.0-cp311-cp311-win_amd64.whl", hash = "sha256:8d7f0659570eefb578dacde98e24fb60af35350193e4f56e11190787bee77dac", size = 178684, upload-time = "2026-01-10T09:22:44.941Z" }, + { url = "https://files.pythonhosted.org/packages/84/7b/bac442e6b96c9d25092695578dda82403c77936104b5682307bd4deb1ad4/websockets-16.0-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:71c989cbf3254fbd5e84d3bff31e4da39c43f884e64f2551d14bb3c186230f00", size = 177365, upload-time = "2026-01-10T09:22:46.787Z" }, + { url = "https://files.pythonhosted.org/packages/b0/fe/136ccece61bd690d9c1f715baaeefd953bb2360134de73519d5df19d29ca/websockets-16.0-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:8b6e209ffee39ff1b6d0fa7bfef6de950c60dfb91b8fcead17da4ee539121a79", size = 175038, upload-time = "2026-01-10T09:22:47.999Z" }, + { url = "https://files.pythonhosted.org/packages/40/1e/9771421ac2286eaab95b8575b0cb701ae3663abf8b5e1f64f1fd90d0a673/websockets-16.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:86890e837d61574c92a97496d590968b23c2ef0aeb8a9bc9421d174cd378ae39", size = 175328, upload-time = "2026-01-10T09:22:49.809Z" }, + { url = "https://files.pythonhosted.org/packages/18/29/71729b4671f21e1eaa5d6573031ab810ad2936c8175f03f97f3ff164c802/websockets-16.0-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:9b5aca38b67492ef518a8ab76851862488a478602229112c4b0d58d63a7a4d5c", size = 184915, upload-time = "2026-01-10T09:22:51.071Z" }, + { url = "https://files.pythonhosted.org/packages/97/bb/21c36b7dbbafc85d2d480cd65df02a1dc93bf76d97147605a8e27ff9409d/websockets-16.0-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:e0334872c0a37b606418ac52f6ab9cfd17317ac26365f7f65e203e2d0d0d359f", size = 186152, upload-time = "2026-01-10T09:22:52.224Z" }, + { url = "https://files.pythonhosted.org/packages/4a/34/9bf8df0c0cf88fa7bfe36678dc7b02970c9a7d5e065a3099292db87b1be2/websockets-16.0-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:a0b31e0b424cc6b5a04b8838bbaec1688834b2383256688cf47eb97412531da1", size = 185583, upload-time = "2026-01-10T09:22:53.443Z" }, + { url = "https://files.pythonhosted.org/packages/47/88/4dd516068e1a3d6ab3c7c183288404cd424a9a02d585efbac226cb61ff2d/websockets-16.0-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:485c49116d0af10ac698623c513c1cc01c9446c058a4e61e3bf6c19dff7335a2", size = 184880, upload-time = "2026-01-10T09:22:55.033Z" }, + { url = "https://files.pythonhosted.org/packages/91/d6/7d4553ad4bf1c0421e1ebd4b18de5d9098383b5caa1d937b63df8d04b565/websockets-16.0-cp312-cp312-win32.whl", hash = "sha256:eaded469f5e5b7294e2bdca0ab06becb6756ea86894a47806456089298813c89", size = 178261, upload-time = "2026-01-10T09:22:56.251Z" }, + { url = "https://files.pythonhosted.org/packages/c3/f0/f3a17365441ed1c27f850a80b2bc680a0fa9505d733fe152fdf5e98c1c0b/websockets-16.0-cp312-cp312-win_amd64.whl", hash = "sha256:5569417dc80977fc8c2d43a86f78e0a5a22fee17565d78621b6bb264a115d4ea", size = 178693, upload-time = "2026-01-10T09:22:57.478Z" }, + { url = "https://files.pythonhosted.org/packages/cc/9c/baa8456050d1c1b08dd0ec7346026668cbc6f145ab4e314d707bb845bf0d/websockets-16.0-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:878b336ac47938b474c8f982ac2f7266a540adc3fa4ad74ae96fea9823a02cc9", size = 177364, upload-time = "2026-01-10T09:22:59.333Z" }, + { url = "https://files.pythonhosted.org/packages/7e/0c/8811fc53e9bcff68fe7de2bcbe75116a8d959ac699a3200f4847a8925210/websockets-16.0-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:52a0fec0e6c8d9a784c2c78276a48a2bdf099e4ccc2a4cad53b27718dbfd0230", size = 175039, upload-time = "2026-01-10T09:23:01.171Z" }, + { url = "https://files.pythonhosted.org/packages/aa/82/39a5f910cb99ec0b59e482971238c845af9220d3ab9fa76dd9162cda9d62/websockets-16.0-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:e6578ed5b6981005df1860a56e3617f14a6c307e6a71b4fff8c48fdc50f3ed2c", size = 175323, upload-time = "2026-01-10T09:23:02.341Z" }, + { url = "https://files.pythonhosted.org/packages/bd/28/0a25ee5342eb5d5f297d992a77e56892ecb65e7854c7898fb7d35e9b33bd/websockets-16.0-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:95724e638f0f9c350bb1c2b0a7ad0e83d9cc0c9259f3ea94e40d7b02a2179ae5", size = 184975, upload-time = "2026-01-10T09:23:03.756Z" }, + { url = "https://files.pythonhosted.org/packages/f9/66/27ea52741752f5107c2e41fda05e8395a682a1e11c4e592a809a90c6a506/websockets-16.0-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:c0204dc62a89dc9d50d682412c10b3542d748260d743500a85c13cd1ee4bde82", size = 186203, upload-time = "2026-01-10T09:23:05.01Z" }, + { url = "https://files.pythonhosted.org/packages/37/e5/8e32857371406a757816a2b471939d51c463509be73fa538216ea52b792a/websockets-16.0-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:52ac480f44d32970d66763115edea932f1c5b1312de36df06d6b219f6741eed8", size = 185653, upload-time = "2026-01-10T09:23:06.301Z" }, + { url = "https://files.pythonhosted.org/packages/9b/67/f926bac29882894669368dc73f4da900fcdf47955d0a0185d60103df5737/websockets-16.0-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:6e5a82b677f8f6f59e8dfc34ec06ca6b5b48bc4fcda346acd093694cc2c24d8f", size = 184920, upload-time = "2026-01-10T09:23:07.492Z" }, + { url = "https://files.pythonhosted.org/packages/3c/a1/3d6ccdcd125b0a42a311bcd15a7f705d688f73b2a22d8cf1c0875d35d34a/websockets-16.0-cp313-cp313-win32.whl", hash = "sha256:abf050a199613f64c886ea10f38b47770a65154dc37181bfaff70c160f45315a", size = 178255, upload-time = "2026-01-10T09:23:09.245Z" }, + { url = "https://files.pythonhosted.org/packages/6b/ae/90366304d7c2ce80f9b826096a9e9048b4bb760e44d3b873bb272cba696b/websockets-16.0-cp313-cp313-win_amd64.whl", hash = "sha256:3425ac5cf448801335d6fdc7ae1eb22072055417a96cc6b31b3861f455fbc156", size = 178689, upload-time = "2026-01-10T09:23:10.483Z" }, + { url = "https://files.pythonhosted.org/packages/f3/1d/e88022630271f5bd349ed82417136281931e558d628dd52c4d8621b4a0b2/websockets-16.0-cp314-cp314-macosx_10_15_universal2.whl", hash = "sha256:8cc451a50f2aee53042ac52d2d053d08bf89bcb31ae799cb4487587661c038a0", size = 177406, upload-time = "2026-01-10T09:23:12.178Z" }, + { url = "https://files.pythonhosted.org/packages/f2/78/e63be1bf0724eeb4616efb1ae1c9044f7c3953b7957799abb5915bffd38e/websockets-16.0-cp314-cp314-macosx_10_15_x86_64.whl", hash = "sha256:daa3b6ff70a9241cf6c7fc9e949d41232d9d7d26fd3522b1ad2b4d62487e9904", size = 175085, upload-time = "2026-01-10T09:23:13.511Z" }, + { url = "https://files.pythonhosted.org/packages/bb/f4/d3c9220d818ee955ae390cf319a7c7a467beceb24f05ee7aaaa2414345ba/websockets-16.0-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:fd3cb4adb94a2a6e2b7c0d8d05cb94e6f1c81a0cf9dc2694fb65c7e8d94c42e4", size = 175328, upload-time = "2026-01-10T09:23:14.727Z" }, + { url = "https://files.pythonhosted.org/packages/63/bc/d3e208028de777087e6fb2b122051a6ff7bbcca0d6df9d9c2bf1dd869ae9/websockets-16.0-cp314-cp314-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:781caf5e8eee67f663126490c2f96f40906594cb86b408a703630f95550a8c3e", size = 185044, upload-time = "2026-01-10T09:23:15.939Z" }, + { url = "https://files.pythonhosted.org/packages/ad/6e/9a0927ac24bd33a0a9af834d89e0abc7cfd8e13bed17a86407a66773cc0e/websockets-16.0-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:caab51a72c51973ca21fa8a18bd8165e1a0183f1ac7066a182ff27107b71e1a4", size = 186279, upload-time = "2026-01-10T09:23:17.148Z" }, + { url = "https://files.pythonhosted.org/packages/b9/ca/bf1c68440d7a868180e11be653c85959502efd3a709323230314fda6e0b3/websockets-16.0-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:19c4dc84098e523fd63711e563077d39e90ec6702aff4b5d9e344a60cb3c0cb1", size = 185711, upload-time = "2026-01-10T09:23:18.372Z" }, + { url = "https://files.pythonhosted.org/packages/c4/f8/fdc34643a989561f217bb477cbc47a3a07212cbda91c0e4389c43c296ebf/websockets-16.0-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:a5e18a238a2b2249c9a9235466b90e96ae4795672598a58772dd806edc7ac6d3", size = 184982, upload-time = "2026-01-10T09:23:19.652Z" }, + { url = "https://files.pythonhosted.org/packages/dd/d1/574fa27e233764dbac9c52730d63fcf2823b16f0856b3329fc6268d6ae4f/websockets-16.0-cp314-cp314-win32.whl", hash = "sha256:a069d734c4a043182729edd3e9f247c3b2a4035415a9172fd0f1b71658a320a8", size = 177915, upload-time = "2026-01-10T09:23:21.458Z" }, + { url = "https://files.pythonhosted.org/packages/8a/f1/ae6b937bf3126b5134ce1f482365fde31a357c784ac51852978768b5eff4/websockets-16.0-cp314-cp314-win_amd64.whl", hash = "sha256:c0ee0e63f23914732c6d7e0cce24915c48f3f1512ec1d079ed01fc629dab269d", size = 178381, upload-time = "2026-01-10T09:23:22.715Z" }, + { url = "https://files.pythonhosted.org/packages/06/9b/f791d1db48403e1f0a27577a6beb37afae94254a8c6f08be4a23e4930bc0/websockets-16.0-cp314-cp314t-macosx_10_15_universal2.whl", hash = "sha256:a35539cacc3febb22b8f4d4a99cc79b104226a756aa7400adc722e83b0d03244", size = 177737, upload-time = "2026-01-10T09:23:24.523Z" }, + { url = "https://files.pythonhosted.org/packages/bd/40/53ad02341fa33b3ce489023f635367a4ac98b73570102ad2cdd770dacc9a/websockets-16.0-cp314-cp314t-macosx_10_15_x86_64.whl", hash = "sha256:b784ca5de850f4ce93ec85d3269d24d4c82f22b7212023c974c401d4980ebc5e", size = 175268, upload-time = "2026-01-10T09:23:25.781Z" }, + { url = "https://files.pythonhosted.org/packages/74/9b/6158d4e459b984f949dcbbb0c5d270154c7618e11c01029b9bbd1bb4c4f9/websockets-16.0-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:569d01a4e7fba956c5ae4fc988f0d4e187900f5497ce46339c996dbf24f17641", size = 175486, upload-time = "2026-01-10T09:23:27.033Z" }, + { url = "https://files.pythonhosted.org/packages/e5/2d/7583b30208b639c8090206f95073646c2c9ffd66f44df967981a64f849ad/websockets-16.0-cp314-cp314t-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:50f23cdd8343b984957e4077839841146f67a3d31ab0d00e6b824e74c5b2f6e8", size = 185331, upload-time = "2026-01-10T09:23:28.259Z" }, + { url = "https://files.pythonhosted.org/packages/45/b0/cce3784eb519b7b5ad680d14b9673a31ab8dcb7aad8b64d81709d2430aa8/websockets-16.0-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:152284a83a00c59b759697b7f9e9cddf4e3c7861dd0d964b472b70f78f89e80e", size = 186501, upload-time = "2026-01-10T09:23:29.449Z" }, + { url = "https://files.pythonhosted.org/packages/19/60/b8ebe4c7e89fb5f6cdf080623c9d92789a53636950f7abacfc33fe2b3135/websockets-16.0-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:bc59589ab64b0022385f429b94697348a6a234e8ce22544e3681b2e9331b5944", size = 186062, upload-time = "2026-01-10T09:23:31.368Z" }, + { url = "https://files.pythonhosted.org/packages/88/a8/a080593f89b0138b6cba1b28f8df5673b5506f72879322288b031337c0b8/websockets-16.0-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:32da954ffa2814258030e5a57bc73a3635463238e797c7375dc8091327434206", size = 185356, upload-time = "2026-01-10T09:23:32.627Z" }, + { url = "https://files.pythonhosted.org/packages/c2/b6/b9afed2afadddaf5ebb2afa801abf4b0868f42f8539bfe4b071b5266c9fe/websockets-16.0-cp314-cp314t-win32.whl", hash = "sha256:5a4b4cc550cb665dd8a47f868c8d04c8230f857363ad3c9caf7a0c3bf8c61ca6", size = 178085, upload-time = "2026-01-10T09:23:33.816Z" }, + { url = "https://files.pythonhosted.org/packages/9f/3e/28135a24e384493fa804216b79a6a6759a38cc4ff59118787b9fb693df93/websockets-16.0-cp314-cp314t-win_amd64.whl", hash = "sha256:b14dc141ed6d2dde437cddb216004bcac6a1df0935d79656387bd41632ba0bbd", size = 178531, upload-time = "2026-01-10T09:23:35.016Z" }, + { url = "https://files.pythonhosted.org/packages/72/07/c98a68571dcf256e74f1f816b8cc5eae6eb2d3d5cfa44d37f801619d9166/websockets-16.0-pp311-pypy311_pp73-macosx_10_15_x86_64.whl", hash = "sha256:349f83cd6c9a415428ee1005cadb5c2c56f4389bc06a9af16103c3bc3dcc8b7d", size = 174947, upload-time = "2026-01-10T09:23:36.166Z" }, + { url = "https://files.pythonhosted.org/packages/7e/52/93e166a81e0305b33fe416338be92ae863563fe7bce446b0f687b9df5aea/websockets-16.0-pp311-pypy311_pp73-macosx_11_0_arm64.whl", hash = "sha256:4a1aba3340a8dca8db6eb5a7986157f52eb9e436b74813764241981ca4888f03", size = 175260, upload-time = "2026-01-10T09:23:37.409Z" }, + { url = "https://files.pythonhosted.org/packages/56/0c/2dbf513bafd24889d33de2ff0368190a0e69f37bcfa19009ef819fe4d507/websockets-16.0-pp311-pypy311_pp73-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:f4a32d1bd841d4bcbffdcb3d2ce50c09c3909fbead375ab28d0181af89fd04da", size = 176071, upload-time = "2026-01-10T09:23:39.158Z" }, + { url = "https://files.pythonhosted.org/packages/a5/8f/aea9c71cc92bf9b6cc0f7f70df8f0b420636b6c96ef4feee1e16f80f75dd/websockets-16.0-pp311-pypy311_pp73-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:0298d07ee155e2e9fda5be8a9042200dd2e3bb0b8a38482156576f863a9d457c", size = 176968, upload-time = "2026-01-10T09:23:41.031Z" }, + { url = "https://files.pythonhosted.org/packages/9a/3f/f70e03f40ffc9a30d817eef7da1be72ee4956ba8d7255c399a01b135902a/websockets-16.0-pp311-pypy311_pp73-win_amd64.whl", hash = "sha256:a653aea902e0324b52f1613332ddf50b00c06fdaf7e92624fbf8c77c78fa5767", size = 178735, upload-time = "2026-01-10T09:23:42.259Z" }, + { url = "https://files.pythonhosted.org/packages/6f/28/258ebab549c2bf3e64d2b0217b973467394a9cea8c42f70418ca2c5d0d2e/websockets-16.0-py3-none-any.whl", hash = "sha256:1637db62fad1dc833276dded54215f2c7fa46912301a24bd94d45d46a011ceec", size = 171598, upload-time = "2026-01-10T09:23:45.395Z" }, +] + +[[package]] +name = "zipp" +version = "3.23.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/e3/02/0f2892c661036d50ede074e376733dca2ae7c6eb617489437771209d4180/zipp-3.23.0.tar.gz", hash = "sha256:a07157588a12518c9d4034df3fbbee09c814741a33ff63c05fa29d26a2404166", size = 25547, upload-time = "2025-06-08T17:06:39.4Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/2e/54/647ade08bf0db230bfea292f893923872fd20be6ac6f53b2b936ba839d75/zipp-3.23.0-py3-none-any.whl", hash = "sha256:071652d6115ed432f5ce1d34c336c0adfd6a884660d1e9712a256d3d3bd4b14e", size = 10276, upload-time = "2025-06-08T17:06:38.034Z" }, +]