mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-08-17 02:17:20 +02:00
fix(claude_desktop): fail open on Headroom API changes
This commit is contained in:
@@ -19,6 +19,22 @@ if [ -z "$REAL_HEADROOM" ]; then
|
|||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# The adapter intentionally uses a small, stable subset of the upstream MCP
|
||||||
|
# server. Since Headroom is installed unpinned at image build time, verify that
|
||||||
|
# subset before replacing the command. A future incompatible Headroom release
|
||||||
|
# therefore keeps its native MCP server instead of breaking Claude startup.
|
||||||
|
if ! /lsiopy/bin/python3 - <<'PY'
|
||||||
|
from headroom.ccr.mcp_server import HeadroomMCPServer
|
||||||
|
|
||||||
|
for name in ("run_stdio", "cleanup", "_compress_content"):
|
||||||
|
if not callable(getattr(HeadroomMCPServer, name, None)):
|
||||||
|
raise SystemExit(f"HeadroomMCPServer.{name} is unavailable")
|
||||||
|
PY
|
||||||
|
then
|
||||||
|
bashio::log.warning "Installed Headroom is incompatible with the single-runtime MCP adapter; preserving the native MCP server"
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
wrapper="$(mktemp /usr/local/bin/.headroom-wrapper.XXXXXX)"
|
wrapper="$(mktemp /usr/local/bin/.headroom-wrapper.XXXXXX)"
|
||||||
cleanup() {
|
cleanup() {
|
||||||
rm -f "$wrapper"
|
rm -f "$wrapper"
|
||||||
|
|||||||
Reference in New Issue
Block a user