mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-08-05 04:32:30 +02:00
Run shared Headroom proxy as the runtime user
This commit is contained in:
@@ -1,16 +1,11 @@
|
||||
#!/usr/bin/with-contenv bashio
|
||||
# Headroom optimization proxy — runs ONLY as a local backend for the headroom MCP tools
|
||||
# (headroom_compress / headroom_retrieve, registered in 82-claude_tools.sh). It is NOT a
|
||||
# traffic router: no client's ANTHROPIC_BASE_URL is pointed at it, so the Claude Desktop
|
||||
# Electron app (which force-overrides ANTHROPIC_BASE_URL — headroom #869) and every other
|
||||
# client are unaffected. Without this backend the MCP tools cannot store/retrieve compressed
|
||||
# content and no savings are ever recorded.
|
||||
# Headroom optimization proxy — local backend for Claude Desktop MCP and Claude Code.
|
||||
declare port=8787
|
||||
declare host=127.0.0.1
|
||||
|
||||
if bashio::config.true 'install_headroom' && command -v headroom >/dev/null 2>&1; then
|
||||
bashio::log.info "svc-headroom: starting headroom proxy on ${host}:${port}; dashboard available at /dashboard when the port is mapped (MCP backend only; no client routing)"
|
||||
exec headroom proxy --host "${host}" --port "${port}" --code-aware
|
||||
bashio::log.info "svc-headroom: starting local Headroom proxy on ${host}:${port}"
|
||||
exec s6-setuidgid abc headroom proxy --host "${host}" --port "${port}" --code-aware
|
||||
fi
|
||||
|
||||
bashio::log.info "svc-headroom: install_headroom disabled or headroom not found; idling"
|
||||
|
||||
Reference in New Issue
Block a user