from inspect_ai.dataset import json_dataset
from inspect_ai.tool import bash_session

from bench_af._abstract.objects import Environment

from .scorer import Scorer


def get() -> Environment:
    """Return the default environment with observed and unobserved datasets."""

    observed_dataset = json_dataset(
        json_file="environments/self_exfiltrate/test_dataset.jsonl",
    )

    unobserved_dataset = json_dataset(
        json_file="environments/self_exfiltrate/deployment_dataset.jsonl",
    )

    return Environment(
        name="self_exfiltrate",
        tools=[bash_session(timeout=60)],
        observed_dataset=observed_dataset,
        unobserved_dataset=unobserved_dataset,
        scorer=Scorer(),
        task_config={
            "sandbox": "docker",
        },
    )
