ha-mcp-dev 7.4.1.dev465__tar.gz → 7.4.1.dev466__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {ha_mcp_dev-7.4.1.dev465/src/ha_mcp_dev.egg-info → ha_mcp_dev-7.4.1.dev466}/PKG-INFO +1 -1
- {ha_mcp_dev-7.4.1.dev465 → ha_mcp_dev-7.4.1.dev466}/pyproject.toml +1 -1
- {ha_mcp_dev-7.4.1.dev465 → ha_mcp_dev-7.4.1.dev466}/src/ha_mcp/_version.py +11 -0
- {ha_mcp_dev-7.4.1.dev465 → ha_mcp_dev-7.4.1.dev466}/src/ha_mcp/client/rest_client.py +15 -4
- {ha_mcp_dev-7.4.1.dev465 → ha_mcp_dev-7.4.1.dev466}/src/ha_mcp/settings_ui.py +2 -2
- {ha_mcp_dev-7.4.1.dev465 → ha_mcp_dev-7.4.1.dev466}/src/ha_mcp/tools/tools_bug_report.py +2 -1
- {ha_mcp_dev-7.4.1.dev465 → ha_mcp_dev-7.4.1.dev466}/src/ha_mcp/tools/tools_utility.py +31 -1
- {ha_mcp_dev-7.4.1.dev465 → ha_mcp_dev-7.4.1.dev466/src/ha_mcp_dev.egg-info}/PKG-INFO +1 -1
- {ha_mcp_dev-7.4.1.dev465 → ha_mcp_dev-7.4.1.dev466}/LICENSE +0 -0
- {ha_mcp_dev-7.4.1.dev465 → ha_mcp_dev-7.4.1.dev466}/MANIFEST.in +0 -0
- {ha_mcp_dev-7.4.1.dev465 → ha_mcp_dev-7.4.1.dev466}/README.md +0 -0
- {ha_mcp_dev-7.4.1.dev465 → ha_mcp_dev-7.4.1.dev466}/setup.cfg +0 -0
- {ha_mcp_dev-7.4.1.dev465 → ha_mcp_dev-7.4.1.dev466}/src/ha_mcp/__init__.py +0 -0
- {ha_mcp_dev-7.4.1.dev465 → ha_mcp_dev-7.4.1.dev466}/src/ha_mcp/__main__.py +0 -0
- {ha_mcp_dev-7.4.1.dev465 → ha_mcp_dev-7.4.1.dev466}/src/ha_mcp/_pypi_marker +0 -0
- {ha_mcp_dev-7.4.1.dev465 → ha_mcp_dev-7.4.1.dev466}/src/ha_mcp/auth/__init__.py +0 -0
- {ha_mcp_dev-7.4.1.dev465 → ha_mcp_dev-7.4.1.dev466}/src/ha_mcp/auth/consent_form.py +0 -0
- {ha_mcp_dev-7.4.1.dev465 → ha_mcp_dev-7.4.1.dev466}/src/ha_mcp/auth/provider.py +0 -0
- {ha_mcp_dev-7.4.1.dev465 → ha_mcp_dev-7.4.1.dev466}/src/ha_mcp/client/__init__.py +0 -0
- {ha_mcp_dev-7.4.1.dev465 → ha_mcp_dev-7.4.1.dev466}/src/ha_mcp/client/websocket_client.py +0 -0
- {ha_mcp_dev-7.4.1.dev465 → ha_mcp_dev-7.4.1.dev466}/src/ha_mcp/client/websocket_listener.py +0 -0
- {ha_mcp_dev-7.4.1.dev465 → ha_mcp_dev-7.4.1.dev466}/src/ha_mcp/config.py +0 -0
- {ha_mcp_dev-7.4.1.dev465 → ha_mcp_dev-7.4.1.dev466}/src/ha_mcp/errors.py +0 -0
- {ha_mcp_dev-7.4.1.dev465 → ha_mcp_dev-7.4.1.dev466}/src/ha_mcp/py.typed +0 -0
- {ha_mcp_dev-7.4.1.dev465 → ha_mcp_dev-7.4.1.dev466}/src/ha_mcp/resources/skills-vendor/.claude/settings.json +0 -0
- {ha_mcp_dev-7.4.1.dev465 → ha_mcp_dev-7.4.1.dev466}/src/ha_mcp/resources/skills-vendor/.claude-plugin/marketplace.json +0 -0
- {ha_mcp_dev-7.4.1.dev465 → ha_mcp_dev-7.4.1.dev466}/src/ha_mcp/resources/skills-vendor/.claude-plugin/plugin.json +0 -0
- {ha_mcp_dev-7.4.1.dev465 → ha_mcp_dev-7.4.1.dev466}/src/ha_mcp/resources/skills-vendor/.github/ISSUE_TEMPLATE/skill-rca.md +0 -0
- {ha_mcp_dev-7.4.1.dev465 → ha_mcp_dev-7.4.1.dev466}/src/ha_mcp/resources/skills-vendor/AGENTS.md +0 -0
- {ha_mcp_dev-7.4.1.dev465 → ha_mcp_dev-7.4.1.dev466}/src/ha_mcp/resources/skills-vendor/CLAUDE.md +0 -0
- {ha_mcp_dev-7.4.1.dev465 → ha_mcp_dev-7.4.1.dev466}/src/ha_mcp/resources/skills-vendor/CONTRIBUTING.md +0 -0
- {ha_mcp_dev-7.4.1.dev465 → ha_mcp_dev-7.4.1.dev466}/src/ha_mcp/resources/skills-vendor/LICENSE +0 -0
- {ha_mcp_dev-7.4.1.dev465 → ha_mcp_dev-7.4.1.dev466}/src/ha_mcp/resources/skills-vendor/README.md +0 -0
- {ha_mcp_dev-7.4.1.dev465 → ha_mcp_dev-7.4.1.dev466}/src/ha_mcp/resources/skills-vendor/skills/home-assistant-best-practices/SKILL.md +0 -0
- {ha_mcp_dev-7.4.1.dev465 → ha_mcp_dev-7.4.1.dev466}/src/ha_mcp/resources/skills-vendor/skills/home-assistant-best-practices/evals/evals.json +0 -0
- {ha_mcp_dev-7.4.1.dev465 → ha_mcp_dev-7.4.1.dev466}/src/ha_mcp/resources/skills-vendor/skills/home-assistant-best-practices/references/automation-patterns.md +0 -0
- {ha_mcp_dev-7.4.1.dev465 → ha_mcp_dev-7.4.1.dev466}/src/ha_mcp/resources/skills-vendor/skills/home-assistant-best-practices/references/dashboard-cards.md +0 -0
- {ha_mcp_dev-7.4.1.dev465 → ha_mcp_dev-7.4.1.dev466}/src/ha_mcp/resources/skills-vendor/skills/home-assistant-best-practices/references/dashboard-guide.md +0 -0
- {ha_mcp_dev-7.4.1.dev465 → ha_mcp_dev-7.4.1.dev466}/src/ha_mcp/resources/skills-vendor/skills/home-assistant-best-practices/references/device-control.md +0 -0
- {ha_mcp_dev-7.4.1.dev465 → ha_mcp_dev-7.4.1.dev466}/src/ha_mcp/resources/skills-vendor/skills/home-assistant-best-practices/references/domain-docs.md +0 -0
- {ha_mcp_dev-7.4.1.dev465 → ha_mcp_dev-7.4.1.dev466}/src/ha_mcp/resources/skills-vendor/skills/home-assistant-best-practices/references/examples.yaml +0 -0
- {ha_mcp_dev-7.4.1.dev465 → ha_mcp_dev-7.4.1.dev466}/src/ha_mcp/resources/skills-vendor/skills/home-assistant-best-practices/references/helper-selection.md +0 -0
- {ha_mcp_dev-7.4.1.dev465 → ha_mcp_dev-7.4.1.dev466}/src/ha_mcp/resources/skills-vendor/skills/home-assistant-best-practices/references/safe-refactoring.md +0 -0
- {ha_mcp_dev-7.4.1.dev465 → ha_mcp_dev-7.4.1.dev466}/src/ha_mcp/resources/skills-vendor/skills/home-assistant-best-practices/references/template-guidelines.md +0 -0
- {ha_mcp_dev-7.4.1.dev465 → ha_mcp_dev-7.4.1.dev466}/src/ha_mcp/server.py +0 -0
- {ha_mcp_dev-7.4.1.dev465 → ha_mcp_dev-7.4.1.dev466}/src/ha_mcp/smoke_test.py +0 -0
- {ha_mcp_dev-7.4.1.dev465 → ha_mcp_dev-7.4.1.dev466}/src/ha_mcp/tools/__init__.py +0 -0
- {ha_mcp_dev-7.4.1.dev465 → ha_mcp_dev-7.4.1.dev466}/src/ha_mcp/tools/backup.py +0 -0
- {ha_mcp_dev-7.4.1.dev465 → ha_mcp_dev-7.4.1.dev466}/src/ha_mcp/tools/best_practice_checker.py +0 -0
- {ha_mcp_dev-7.4.1.dev465 → ha_mcp_dev-7.4.1.dev466}/src/ha_mcp/tools/device_control.py +0 -0
- {ha_mcp_dev-7.4.1.dev465 → ha_mcp_dev-7.4.1.dev466}/src/ha_mcp/tools/enhanced.py +0 -0
- {ha_mcp_dev-7.4.1.dev465 → ha_mcp_dev-7.4.1.dev466}/src/ha_mcp/tools/helpers.py +0 -0
- {ha_mcp_dev-7.4.1.dev465 → ha_mcp_dev-7.4.1.dev466}/src/ha_mcp/tools/reference_validator.py +0 -0
- {ha_mcp_dev-7.4.1.dev465 → ha_mcp_dev-7.4.1.dev466}/src/ha_mcp/tools/registry.py +0 -0
- {ha_mcp_dev-7.4.1.dev465 → ha_mcp_dev-7.4.1.dev466}/src/ha_mcp/tools/smart_search.py +0 -0
- {ha_mcp_dev-7.4.1.dev465 → ha_mcp_dev-7.4.1.dev466}/src/ha_mcp/tools/tools_addons.py +0 -0
- {ha_mcp_dev-7.4.1.dev465 → ha_mcp_dev-7.4.1.dev466}/src/ha_mcp/tools/tools_areas.py +0 -0
- {ha_mcp_dev-7.4.1.dev465 → ha_mcp_dev-7.4.1.dev466}/src/ha_mcp/tools/tools_blueprints.py +0 -0
- {ha_mcp_dev-7.4.1.dev465 → ha_mcp_dev-7.4.1.dev466}/src/ha_mcp/tools/tools_calendar.py +0 -0
- {ha_mcp_dev-7.4.1.dev465 → ha_mcp_dev-7.4.1.dev466}/src/ha_mcp/tools/tools_camera.py +0 -0
- {ha_mcp_dev-7.4.1.dev465 → ha_mcp_dev-7.4.1.dev466}/src/ha_mcp/tools/tools_categories.py +0 -0
- {ha_mcp_dev-7.4.1.dev465 → ha_mcp_dev-7.4.1.dev466}/src/ha_mcp/tools/tools_code.py +0 -0
- {ha_mcp_dev-7.4.1.dev465 → ha_mcp_dev-7.4.1.dev466}/src/ha_mcp/tools/tools_config_automations.py +0 -0
- {ha_mcp_dev-7.4.1.dev465 → ha_mcp_dev-7.4.1.dev466}/src/ha_mcp/tools/tools_config_dashboards.py +0 -0
- {ha_mcp_dev-7.4.1.dev465 → ha_mcp_dev-7.4.1.dev466}/src/ha_mcp/tools/tools_config_entry_flow.py +0 -0
- {ha_mcp_dev-7.4.1.dev465 → ha_mcp_dev-7.4.1.dev466}/src/ha_mcp/tools/tools_config_helpers.py +0 -0
- {ha_mcp_dev-7.4.1.dev465 → ha_mcp_dev-7.4.1.dev466}/src/ha_mcp/tools/tools_config_scenes.py +0 -0
- {ha_mcp_dev-7.4.1.dev465 → ha_mcp_dev-7.4.1.dev466}/src/ha_mcp/tools/tools_config_scripts.py +0 -0
- {ha_mcp_dev-7.4.1.dev465 → ha_mcp_dev-7.4.1.dev466}/src/ha_mcp/tools/tools_energy.py +0 -0
- {ha_mcp_dev-7.4.1.dev465 → ha_mcp_dev-7.4.1.dev466}/src/ha_mcp/tools/tools_entities.py +0 -0
- {ha_mcp_dev-7.4.1.dev465 → ha_mcp_dev-7.4.1.dev466}/src/ha_mcp/tools/tools_filesystem.py +0 -0
- {ha_mcp_dev-7.4.1.dev465 → ha_mcp_dev-7.4.1.dev466}/src/ha_mcp/tools/tools_groups.py +0 -0
- {ha_mcp_dev-7.4.1.dev465 → ha_mcp_dev-7.4.1.dev466}/src/ha_mcp/tools/tools_hacs.py +0 -0
- {ha_mcp_dev-7.4.1.dev465 → ha_mcp_dev-7.4.1.dev466}/src/ha_mcp/tools/tools_history.py +0 -0
- {ha_mcp_dev-7.4.1.dev465 → ha_mcp_dev-7.4.1.dev466}/src/ha_mcp/tools/tools_integrations.py +0 -0
- {ha_mcp_dev-7.4.1.dev465 → ha_mcp_dev-7.4.1.dev466}/src/ha_mcp/tools/tools_labels.py +0 -0
- {ha_mcp_dev-7.4.1.dev465 → ha_mcp_dev-7.4.1.dev466}/src/ha_mcp/tools/tools_mcp_component.py +0 -0
- {ha_mcp_dev-7.4.1.dev465 → ha_mcp_dev-7.4.1.dev466}/src/ha_mcp/tools/tools_registry.py +0 -0
- {ha_mcp_dev-7.4.1.dev465 → ha_mcp_dev-7.4.1.dev466}/src/ha_mcp/tools/tools_resources.py +0 -0
- {ha_mcp_dev-7.4.1.dev465 → ha_mcp_dev-7.4.1.dev466}/src/ha_mcp/tools/tools_search.py +0 -0
- {ha_mcp_dev-7.4.1.dev465 → ha_mcp_dev-7.4.1.dev466}/src/ha_mcp/tools/tools_service.py +0 -0
- {ha_mcp_dev-7.4.1.dev465 → ha_mcp_dev-7.4.1.dev466}/src/ha_mcp/tools/tools_services.py +0 -0
- {ha_mcp_dev-7.4.1.dev465 → ha_mcp_dev-7.4.1.dev466}/src/ha_mcp/tools/tools_system.py +0 -0
- {ha_mcp_dev-7.4.1.dev465 → ha_mcp_dev-7.4.1.dev466}/src/ha_mcp/tools/tools_todo.py +0 -0
- {ha_mcp_dev-7.4.1.dev465 → ha_mcp_dev-7.4.1.dev466}/src/ha_mcp/tools/tools_traces.py +0 -0
- {ha_mcp_dev-7.4.1.dev465 → ha_mcp_dev-7.4.1.dev466}/src/ha_mcp/tools/tools_updates.py +0 -0
- {ha_mcp_dev-7.4.1.dev465 → ha_mcp_dev-7.4.1.dev466}/src/ha_mcp/tools/tools_voice_assistant.py +0 -0
- {ha_mcp_dev-7.4.1.dev465 → ha_mcp_dev-7.4.1.dev466}/src/ha_mcp/tools/tools_yaml_config.py +0 -0
- {ha_mcp_dev-7.4.1.dev465 → ha_mcp_dev-7.4.1.dev466}/src/ha_mcp/tools/tools_zones.py +0 -0
- {ha_mcp_dev-7.4.1.dev465 → ha_mcp_dev-7.4.1.dev466}/src/ha_mcp/tools/util_helpers.py +0 -0
- {ha_mcp_dev-7.4.1.dev465 → ha_mcp_dev-7.4.1.dev466}/src/ha_mcp/transforms/__init__.py +0 -0
- {ha_mcp_dev-7.4.1.dev465 → ha_mcp_dev-7.4.1.dev466}/src/ha_mcp/transforms/categorized_search.py +0 -0
- {ha_mcp_dev-7.4.1.dev465 → ha_mcp_dev-7.4.1.dev466}/src/ha_mcp/utils/__init__.py +0 -0
- {ha_mcp_dev-7.4.1.dev465 → ha_mcp_dev-7.4.1.dev466}/src/ha_mcp/utils/config_hash.py +0 -0
- {ha_mcp_dev-7.4.1.dev465 → ha_mcp_dev-7.4.1.dev466}/src/ha_mcp/utils/data_paths.py +0 -0
- {ha_mcp_dev-7.4.1.dev465 → ha_mcp_dev-7.4.1.dev466}/src/ha_mcp/utils/domain_handlers.py +0 -0
- {ha_mcp_dev-7.4.1.dev465 → ha_mcp_dev-7.4.1.dev466}/src/ha_mcp/utils/fuzzy_search.py +0 -0
- {ha_mcp_dev-7.4.1.dev465 → ha_mcp_dev-7.4.1.dev466}/src/ha_mcp/utils/kill_signal_diagnostics.py +0 -0
- {ha_mcp_dev-7.4.1.dev465 → ha_mcp_dev-7.4.1.dev466}/src/ha_mcp/utils/operation_manager.py +0 -0
- {ha_mcp_dev-7.4.1.dev465 → ha_mcp_dev-7.4.1.dev466}/src/ha_mcp/utils/python_sandbox.py +0 -0
- {ha_mcp_dev-7.4.1.dev465 → ha_mcp_dev-7.4.1.dev466}/src/ha_mcp/utils/usage_logger.py +0 -0
- {ha_mcp_dev-7.4.1.dev465 → ha_mcp_dev-7.4.1.dev466}/src/ha_mcp_dev.egg-info/SOURCES.txt +0 -0
- {ha_mcp_dev-7.4.1.dev465 → ha_mcp_dev-7.4.1.dev466}/src/ha_mcp_dev.egg-info/dependency_links.txt +0 -0
- {ha_mcp_dev-7.4.1.dev465 → ha_mcp_dev-7.4.1.dev466}/src/ha_mcp_dev.egg-info/entry_points.txt +0 -0
- {ha_mcp_dev-7.4.1.dev465 → ha_mcp_dev-7.4.1.dev466}/src/ha_mcp_dev.egg-info/requires.txt +0 -0
- {ha_mcp_dev-7.4.1.dev465 → ha_mcp_dev-7.4.1.dev466}/src/ha_mcp_dev.egg-info/top_level.txt +0 -0
- {ha_mcp_dev-7.4.1.dev465 → ha_mcp_dev-7.4.1.dev466}/tests/__init__.py +0 -0
- {ha_mcp_dev-7.4.1.dev465 → ha_mcp_dev-7.4.1.dev466}/tests/test_constants.py +0 -0
- {ha_mcp_dev-7.4.1.dev465 → ha_mcp_dev-7.4.1.dev466}/tests/test_env_manager.py +0 -0
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "ha-mcp-dev"
|
|
7
|
-
version = "7.4.1.
|
|
7
|
+
version = "7.4.1.dev466"
|
|
8
8
|
description = "Home Assistant MCP Server - Complete control of Home Assistant through MCP"
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
requires-python = ">=3.13,<3.14"
|
|
@@ -56,3 +56,14 @@ def is_running_in_addon() -> bool:
|
|
|
56
56
|
users, who already see the dev/stable distinction in the HAOS add-on UI.
|
|
57
57
|
"""
|
|
58
58
|
return bool(os.environ.get("SUPERVISOR_TOKEN"))
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
def get_supervisor_base_url() -> str:
|
|
62
|
+
"""Return the base URL for direct Supervisor REST calls.
|
|
63
|
+
|
|
64
|
+
Defaults to ``http://supervisor`` (the in-addon Supervisor hostname). The
|
|
65
|
+
``SUPERVISOR_BASE_URL`` env var override exists so E2E tests can point the
|
|
66
|
+
direct-Supervisor httpx call sites at a local mock without /etc/hosts or
|
|
67
|
+
DNS hacks. Production add-ons leave it unset.
|
|
68
|
+
"""
|
|
69
|
+
return os.environ.get("SUPERVISOR_BASE_URL", "http://supervisor")
|
|
@@ -11,7 +11,7 @@ from typing import Any
|
|
|
11
11
|
|
|
12
12
|
import httpx
|
|
13
13
|
|
|
14
|
-
from .._version import is_running_in_addon
|
|
14
|
+
from .._version import get_supervisor_base_url, is_running_in_addon
|
|
15
15
|
from ..config import get_global_settings
|
|
16
16
|
|
|
17
17
|
|
|
@@ -41,7 +41,19 @@ class HomeAssistantConnectionError(HomeAssistantError):
|
|
|
41
41
|
|
|
42
42
|
|
|
43
43
|
class HomeAssistantAuthError(HomeAssistantError):
|
|
44
|
-
"""Authentication error with Home Assistant.
|
|
44
|
+
"""Authentication error with Home Assistant.
|
|
45
|
+
|
|
46
|
+
Sibling of ``HomeAssistantAPIError`` (not a subclass). The codebase has
|
|
47
|
+
18 ``except HomeAssistantAPIError`` sites (util_helpers polling,
|
|
48
|
+
tools_integrations registry lookups, etc.) that deliberately rely on
|
|
49
|
+
auth errors NOT matching so they can propagate to a paired
|
|
50
|
+
``except (HomeAssistantConnectionError, HomeAssistantAuthError): raise``
|
|
51
|
+
block. Subclassing AuthError under APIError silently swallowed those
|
|
52
|
+
auth errors as part of the local "this entity is not registered yet"
|
|
53
|
+
polling logic. Sites that specifically need to catch both must list
|
|
54
|
+
them explicitly (see ``_get_supervisor_log`` and
|
|
55
|
+
``_get_system_service_log`` in ``tools_utility.py``).
|
|
56
|
+
"""
|
|
45
57
|
|
|
46
58
|
|
|
47
59
|
class HomeAssistantAPIError(HomeAssistantError):
|
|
@@ -543,7 +555,7 @@ class HomeAssistantClient:
|
|
|
543
555
|
"(addon-mode gate fired but SUPERVISOR_TOKEN env var not set)"
|
|
544
556
|
)
|
|
545
557
|
|
|
546
|
-
url = f"
|
|
558
|
+
url = f"{get_supervisor_base_url()}/{path}/logs"
|
|
547
559
|
logger.debug("Fetching %s via Supervisor direct", url)
|
|
548
560
|
|
|
549
561
|
try:
|
|
@@ -1301,7 +1313,6 @@ class HomeAssistantClient:
|
|
|
1301
1313
|
) from e
|
|
1302
1314
|
raise
|
|
1303
1315
|
|
|
1304
|
-
|
|
1305
1316
|
async def resolve_scene_id(self, identifier: str) -> str:
|
|
1306
1317
|
"""
|
|
1307
1318
|
Resolve a scene identifier to its storage key via the entity registry.
|
|
@@ -19,7 +19,7 @@ import httpx
|
|
|
19
19
|
from starlette.requests import Request
|
|
20
20
|
from starlette.responses import HTMLResponse, JSONResponse
|
|
21
21
|
|
|
22
|
-
from ._version import is_running_in_addon
|
|
22
|
+
from ._version import get_supervisor_base_url, is_running_in_addon
|
|
23
23
|
from .errors import ErrorCode, create_error_response
|
|
24
24
|
from .transforms import DEFAULT_PINNED_TOOLS
|
|
25
25
|
from .utils.data_paths import get_data_dir
|
|
@@ -910,7 +910,7 @@ def register_settings_routes(
|
|
|
910
910
|
timeout=5.0, verify=server.settings.verify_ssl
|
|
911
911
|
) as client:
|
|
912
912
|
resp = await client.post(
|
|
913
|
-
"
|
|
913
|
+
f"{get_supervisor_base_url()}/addons/self/restart",
|
|
914
914
|
headers={"Authorization": f"Bearer {token}"},
|
|
915
915
|
)
|
|
916
916
|
except (httpx.ReadError, httpx.RemoteProtocolError):
|
|
@@ -20,6 +20,7 @@ from pydantic import Field
|
|
|
20
20
|
|
|
21
21
|
from ha_mcp import __version__
|
|
22
22
|
|
|
23
|
+
from .._version import get_supervisor_base_url
|
|
23
24
|
from ..config import Settings, get_global_settings
|
|
24
25
|
from ..utils.usage_logger import (
|
|
25
26
|
AVG_LOG_ENTRIES_PER_TOOL,
|
|
@@ -357,7 +358,7 @@ async def _fetch_addon_logs() -> str:
|
|
|
357
358
|
timeout=10.0, verify=get_global_settings().verify_ssl
|
|
358
359
|
) as http_client:
|
|
359
360
|
resp = await http_client.get(
|
|
360
|
-
"
|
|
361
|
+
f"{get_supervisor_base_url()}/addons/self/logs",
|
|
361
362
|
headers={"Authorization": f"Bearer {token}"},
|
|
362
363
|
)
|
|
363
364
|
if resp.status_code != 200:
|
|
@@ -12,7 +12,11 @@ from typing import Any, Literal
|
|
|
12
12
|
|
|
13
13
|
from fastmcp.exceptions import ToolError
|
|
14
14
|
|
|
15
|
-
from ..client.rest_client import
|
|
15
|
+
from ..client.rest_client import (
|
|
16
|
+
HomeAssistantAPIError,
|
|
17
|
+
HomeAssistantAuthError,
|
|
18
|
+
HomeAssistantConnectionError,
|
|
19
|
+
)
|
|
16
20
|
from ..errors import ErrorCode, create_error_response
|
|
17
21
|
from .helpers import exception_to_structured_error, log_tool_usage, raise_tool_error
|
|
18
22
|
from .util_helpers import (
|
|
@@ -755,6 +759,19 @@ def register_utility_tools(mcp: Any, client: Any, **kwargs: Any) -> None:
|
|
|
755
759
|
|
|
756
760
|
except ToolError:
|
|
757
761
|
raise
|
|
762
|
+
except HomeAssistantAuthError as e:
|
|
763
|
+
# Listed before HomeAssistantAPIError because AuthError is a sibling,
|
|
764
|
+
# not a subclass — without this explicit clause the 401 from
|
|
765
|
+
# _supervisor_logs_get propagates raw to FastMCP and surfaces
|
|
766
|
+
# without a structured `code` field.
|
|
767
|
+
exception_to_structured_error(
|
|
768
|
+
e,
|
|
769
|
+
context={"source": "supervisor", "slug": slug},
|
|
770
|
+
suggestions=[
|
|
771
|
+
"Verify SUPERVISOR_TOKEN is set correctly inside the add-on",
|
|
772
|
+
"Reinstall the add-on if the token may have rotated",
|
|
773
|
+
],
|
|
774
|
+
)
|
|
758
775
|
except HomeAssistantAPIError as e:
|
|
759
776
|
status = getattr(e, "status_code", None)
|
|
760
777
|
if status == 400:
|
|
@@ -857,6 +874,19 @@ def register_utility_tools(mcp: Any, client: Any, **kwargs: Any) -> None:
|
|
|
857
874
|
|
|
858
875
|
except ToolError:
|
|
859
876
|
raise
|
|
877
|
+
except HomeAssistantAuthError as e:
|
|
878
|
+
# Listed before HomeAssistantAPIError because AuthError is a sibling,
|
|
879
|
+
# not a subclass — without this explicit clause the 401 from
|
|
880
|
+
# _supervisor_logs_get propagates raw to FastMCP and surfaces
|
|
881
|
+
# without a structured `code` field.
|
|
882
|
+
exception_to_structured_error(
|
|
883
|
+
e,
|
|
884
|
+
context={"source": "system_service", "slug": service},
|
|
885
|
+
suggestions=[
|
|
886
|
+
"Verify SUPERVISOR_TOKEN is set correctly inside the add-on",
|
|
887
|
+
"Reinstall the add-on if the token may have rotated",
|
|
888
|
+
],
|
|
889
|
+
)
|
|
860
890
|
except HomeAssistantAPIError as e:
|
|
861
891
|
status = getattr(e, "status_code", None)
|
|
862
892
|
if status == 403:
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{ha_mcp_dev-7.4.1.dev465 → ha_mcp_dev-7.4.1.dev466}/src/ha_mcp/resources/skills-vendor/AGENTS.md
RENAMED
|
File without changes
|
{ha_mcp_dev-7.4.1.dev465 → ha_mcp_dev-7.4.1.dev466}/src/ha_mcp/resources/skills-vendor/CLAUDE.md
RENAMED
|
File without changes
|
|
File without changes
|
{ha_mcp_dev-7.4.1.dev465 → ha_mcp_dev-7.4.1.dev466}/src/ha_mcp/resources/skills-vendor/LICENSE
RENAMED
|
File without changes
|
{ha_mcp_dev-7.4.1.dev465 → ha_mcp_dev-7.4.1.dev466}/src/ha_mcp/resources/skills-vendor/README.md
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{ha_mcp_dev-7.4.1.dev465 → ha_mcp_dev-7.4.1.dev466}/src/ha_mcp/tools/best_practice_checker.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{ha_mcp_dev-7.4.1.dev465 → ha_mcp_dev-7.4.1.dev466}/src/ha_mcp/tools/tools_config_automations.py
RENAMED
|
File without changes
|
{ha_mcp_dev-7.4.1.dev465 → ha_mcp_dev-7.4.1.dev466}/src/ha_mcp/tools/tools_config_dashboards.py
RENAMED
|
File without changes
|
{ha_mcp_dev-7.4.1.dev465 → ha_mcp_dev-7.4.1.dev466}/src/ha_mcp/tools/tools_config_entry_flow.py
RENAMED
|
File without changes
|
{ha_mcp_dev-7.4.1.dev465 → ha_mcp_dev-7.4.1.dev466}/src/ha_mcp/tools/tools_config_helpers.py
RENAMED
|
File without changes
|
|
File without changes
|
{ha_mcp_dev-7.4.1.dev465 → ha_mcp_dev-7.4.1.dev466}/src/ha_mcp/tools/tools_config_scripts.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{ha_mcp_dev-7.4.1.dev465 → ha_mcp_dev-7.4.1.dev466}/src/ha_mcp/tools/tools_voice_assistant.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{ha_mcp_dev-7.4.1.dev465 → ha_mcp_dev-7.4.1.dev466}/src/ha_mcp/transforms/categorized_search.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{ha_mcp_dev-7.4.1.dev465 → ha_mcp_dev-7.4.1.dev466}/src/ha_mcp/utils/kill_signal_diagnostics.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{ha_mcp_dev-7.4.1.dev465 → ha_mcp_dev-7.4.1.dev466}/src/ha_mcp_dev.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
{ha_mcp_dev-7.4.1.dev465 → ha_mcp_dev-7.4.1.dev466}/src/ha_mcp_dev.egg-info/entry_points.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|