6adaae2ec3
Per the 4-criteria decision rule: Tool + ToolPreset fail C1 (only used by
tool_presets + tool_bias), fail C2 (no state machine), fail C3 (no
dedicated test file), borderline C4 (~15 lines each). MERGE into the
existing src/tool_presets.py which already has ToolPresetManager.
This commit:
1. Adds Tool + ToolPreset class definitions to src/tool_presets.py at
the top (after the stdlib imports). Both classes are used by
ToolPresetManager and the tests.
2. Removes Tool + ToolPreset from src/models.py.
3. Adds lazy re-exports via the existing __getattr__ in src/models.py
(EAGER import would deadlock because src.tool_presets imports
BiasProfile from src.models; the lazy __getattr__ breaks the cycle).
4. Updates src/tool_presets.py import: from
'from src.models import ToolPreset, BiasProfile' to
'from src.models import BiasProfile' (ToolPreset is now local).
Verification: VC8 (Tool + ToolPreset)
from src.tool_presets import Tool, ToolPreset # OK
from src.models import Tool, ToolPreset # OK (lazy __getattr__)
Tool is Tool returns True
ToolPreset is ToolPreset returns True
Tests verified (7/7 PASS):
tests/test_tool_preset_manager.py (4 tests)
tests/test_bias_models.py (3 tests)
Consumer check:
src/ai_client.py: from src.models import FileItem, ToolPreset, BiasProfile, Tool
src/app_controller.py: (no Tool/ToolPreset import)
src/tool_bias.py: from src.models import Tool, ToolPreset, BiasProfile
All resolve via re-export/lazy __getattr__.
The lazy __getattr__ pattern is the same mechanism used for the
Pydantic proxies (GenerateRequest / ConfirmRequest) and for PROVIDERS.
Phase 5 will migrate Tool/ToolPreset to a similar lazy pattern in
the re-export block (or drop them entirely after the consumer
migration).