refactor(subscriptions): extract SNAPSHOT_ACTIONS/COLLECT_ACTIONS to subscriptions/queries.py

Moves the subscription query dicts out of tools/live.py into a new
subscriptions/queries.py module so subscriptions/resources.py can
import them without creating a cross-layer subscriptions→tools dependency.
This commit is contained in:
Jacob Magar
2026-03-15 21:43:18 -04:00
parent e87a33ef1a
commit 7c99fe1527
3 changed files with 48 additions and 39 deletions

View File

@@ -116,3 +116,10 @@ async def test_subscribe_collect_returns_multiple_events(mock_ws):
assert len(result) == 2
assert result[0]["notificationAdded"]["id"] == "1"
def test_snapshot_actions_importable_from_subscriptions() -> None:
from unraid_mcp.subscriptions.queries import COLLECT_ACTIONS, SNAPSHOT_ACTIONS
assert "cpu" in SNAPSHOT_ACTIONS
assert "log_tail" in COLLECT_ACTIONS