"""Shared test fixtures for docketeer-monty."""

from pathlib import Path

import pytest

from docketeer.tools import ToolContext, registry


@pytest.fixture(autouse=True)
def _template_vars(tmp_path: Path) -> None:
    registry.template_vars.setdefault("workspace", str(tmp_path))
    registry.template_vars.setdefault("scratch", "/tmp")


@pytest.fixture()
def workspace(tmp_path: Path) -> Path:
    ws = tmp_path / "memory"
    ws.mkdir()
    return ws


@pytest.fixture()
def tool_context(workspace: Path) -> ToolContext:
    return ToolContext(workspace=workspace, chat_room="room1")
