Compare commits

..

14 Commits

Author SHA1 Message Date
Alexandre
0030556525 Expose Claude Desktop headroom dashboard 2026-07-08 14:31:22 +02:00
Alexandre
905ce7bc0f Merge pull request #2830 from ToledoEM/fix/manyfold-assume-ssl-redirect
Fix/manyfold assume ssl redirect
2026-07-08 13:57:20 +02:00
Alexandre
19fe564e17 Add conditional export for ANTHROPIC_BASE_URL 2026-07-08 13:32:01 +02:00
Alexandre
6248cb3c21 Reorder gain report checks for better logic 2026-07-08 13:30:06 +02:00
ToledoEM
eff8577e37 Use latest tag for manyfold base image 2026-07-08 12:26:06 +01:00
github-actions
1bd0c6f054 GitHub bot: changelog [nobuild] 2026-07-08 11:22:49 +00:00
Alexandre
976e9bcc03 nobuild
Removed 3000/tcp port configuration from YAML.
2026-07-08 13:14:40 +02:00
Alexandre
1dab8b9344 Update config.yaml 2026-07-08 13:14:25 +02:00
ToledoEM
7667605e6b Fix manyfold HTTPS redirect loop 2026-07-08 12:11:09 +01:00
GitHub Actions
03e470a83a Revert "Update config.yaml"
This reverts commit b922673192.
2026-07-08 10:43:39 +00:00
Alexandre
b922673192 Update config.yaml 2026-07-08 12:41:24 +02:00
github-actions
ba37ee203e GitHub bot: changelog [nobuild] 2026-07-08 08:54:47 +00:00
Alexandre
55035b4ee8 Update config.yaml 2026-07-08 10:48:28 +02:00
Alexandre
fffec89eaf Update run 2026-07-08 07:33:47 +02:00
13 changed files with 70 additions and 13 deletions

View File

@@ -1,3 +1,7 @@
## source-20260708-2 (08-07-2026)
- Minor bugs fixed
## source-20260708 (08-07-2026)
- Minor bugs fixed
## source-20260706-update (06-07-2026)
- Minor bugs fixed
## source-20260706 (06-07-2026)

View File

@@ -127,5 +127,5 @@ slug: birdnet-go-dev
udev: true
url: https://github.com/alexbelgium/hassio-addons
usb: true
version: "source-20260706"
version: "source-20260708-2"
video: true

View File

@@ -1,3 +1,8 @@
## 1.8 (08-07-2026)
- Expose the Headroom live savings dashboard on mapped port `8787` when `install_headroom` is enabled, while keeping the proxy local-only if the port mapping is disabled.
- Map `8787/tcp` by default and document the dashboard URL.
## 1.7 (07-07-2026)
- Add an hourly rtk + headroom token-savings report to the add-on log (`claude-gains-report.sh`, seeded via `/defaults/crontabs/root` and run by the base image's cron). Lets you confirm at a glance that both tools keep running and see accumulated gains — if the numbers stop growing, the tool has stopped working.

View File

@@ -25,6 +25,7 @@ Claude Desktop sign-in requires a claude.ai plan that supports the Desktop app.
- Baked-in `git` and GitHub CLI (`gh`) with optional startup credential configuration.
- Custom script support through the repository standard `claude_desktop.sh` script.
- Optional bundled Claude Code optimization tools: headroom, rtk, and caveman.
- Headroom dashboard exposed on mapped port `8787` when `install_headroom` is enabled.
- Low-power defaults: GPU device mapping, `AUTO_GPU=1`, `SELKIES_FRAMERATE=30`, `/tmp` tmpfs, and `$HOME/.cache` redirected to `/tmp/cache`.
## Options
@@ -38,7 +39,7 @@ Claude Desktop sign-in requires a claude.ai plan that supports the Desktop app.
| `DRINODE` | | Optional GPU device override for Selkies. |
| `DNS_server` | `8.8.8.8` | DNS server used by the standard DNS module. |
| `auto_update` | `true` | Check Anthropic's apt repository and upgrade `claude-desktop` at add-on startup. |
| `install_headroom` | `true` | Register the baked-in `headroom` MCP server in Claude Desktop, exposing its `headroom_compress`/`headroom_retrieve`/`headroom_stats` context-compression tools inside the app. (Claude Desktop overrides `ANTHROPIC_BASE_URL`, so transparent proxy compression is not possible — MCP is the supported path; see [headroom #869](https://github.com/headroomlabs-ai/headroom/issues/869).) Disabling removes the entry again. |
| `install_headroom` | `true` | Register the baked-in `headroom` MCP server in Claude Desktop, start the Headroom proxy backend, and expose the Headroom dashboard on mapped port `8787` at `/dashboard` when that port is open. This exposes the `headroom_compress`/`headroom_retrieve`/`headroom_stats` context-compression tools inside the app. (Claude Desktop overrides `ANTHROPIC_BASE_URL`, so transparent proxy compression is not possible — MCP is the supported path; see [headroom #869](https://github.com/headroomlabs-ai/headroom/issues/869).) Disabling removes the MCP entry and stops the backend/dashboard service. |
| `install_rtk` | `true` | Configure the rtk Claude Code `PreToolUse` hook in the persistent Claude Code settings. |
| `install_caveman` | `true` | Install the caveman Claude Code plugin into the persistent Claude Code home. |
| `install_github_cli` | `true` | Enable first-start checks and setup for the baked-in `git` and `gh` commands. |
@@ -63,6 +64,10 @@ The add-on includes the repository standard custom-script executor. On first sta
Persistent state is stored in the configured `data_location`. Claude Desktop stores sign-in data below `~/.config/Claude`, and Claude Code/tool configuration is stored below `~/.claude`. Volatile cache data is redirected to `/tmp/cache` through `$XDG_CACHE_HOME` and `$HOME/.cache`.
## Headroom dashboard
When `install_headroom` is enabled, the add-on starts the local Headroom proxy backend and maps port `8787` by default. Open `http://<home-assistant-host>:8787/dashboard` to view the Headroom live savings dashboard. If you disable the `8787/tcp` port mapping, the backend binds to localhost for MCP use only and the dashboard is not externally exposed.
[aarch64-shield]: https://img.shields.io/badge/aarch64-yes-green.svg
[amd64-shield]: https://img.shields.io/badge/amd64-yes-green.svg
[maintenance-shield]: https://img.shields.io/maintenance/yes/2026.svg

View File

@@ -53,11 +53,11 @@ options:
panel_admin: false
panel_icon: mdi:robot-happy
ports:
3000/tcp: null
3001/tcp: null
8787/tcp: 8787
ports_description:
3000/tcp: Web interface
3001/tcp: Web interface https
8787/tcp: Headroom dashboard and proxy
privileged:
- SYS_ADMIN
- DAC_READ_SEARCH
@@ -90,5 +90,5 @@ slug: claude_desktop
tmpfs: true
udev: true
url: https://github.com/alexbelgium/hassio-addons
version: "1.7"
version: "1.8"
video: true

View File

@@ -20,6 +20,9 @@ if [ -s "$CLAUDE_DESKTOP_COMMAND_FILE" ]; then
else
CLAUDE_DESKTOP_COMMAND="$DEFAULT_CLAUDE_DESKTOP_COMMAND"
fi
if bashio::config.true 'install_headroom'; then
export ANTHROPIC_BASE_URL="http://127.0.0.1:8787"
fi
# Launch the configured command. If a custom/wrapped command fails to start, fall back to
# the plain Claude Desktop launch so the desktop app still comes up for the user.

View File

@@ -6,10 +6,19 @@
# client are unaffected. Without this backend the MCP tools cannot store/retrieve compressed
# content and no savings are ever recorded.
declare port=8787
declare host=127.0.0.1
# Expose the built-in Headroom dashboard only when the add-on option is enabled
# and Home Assistant has mapped the Headroom port. The port is mapped by default
# in config.yaml, so users can open http://<ha-host>:8787/dashboard to inspect
# live savings, while disabling install_headroom still leaves the service idle.
if [[ -n "$(bashio::addon.port "${port}")" ]]; then
host=0.0.0.0
fi
if bashio::config.true 'install_headroom' && command -v headroom >/dev/null 2>&1; then
bashio::log.info "svc-headroom: starting headroom proxy on 127.0.0.1:${port} (MCP backend only; no client routing)"
exec headroom proxy --host 127.0.0.1 --port "${port}"
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
fi
bashio::log.info "svc-headroom: install_headroom disabled or headroom not found; idling"

View File

@@ -24,12 +24,11 @@ fi
if ! $have_rtk && ! $headroom_enabled; then exit 0; fi
echo "===== claude gains report $(date '+%Y-%m-%d %H:%M:%S') ====="
if $have_rtk; then
echo "--- rtk gain ---"
rtk gain 2>&1 || echo "[warn] rtk gain failed"
fi
if $headroom_enabled; then
echo "--- headroom savings ---"
headroom savings 2>&1 || echo "[warn] headroom savings failed"
elif $have_rtk; then
echo "--- rtk gain ---"
rtk gain 2>&1 || echo "[warn] rtk gain failed"
fi
echo "===== end gains report ====="

View File

@@ -1,3 +1,8 @@
## 0.146.1-3 (2026-07-08)
- Fix forced HTTPS redirect loop on the plain-HTTP UI by re-adding the `assume_ssl` disable workaround.
- Export `PUBLIC_PORT` alongside `public_hostname` so generated links point at port 3214.
- Document `public_hostname` in README (accepts hostname or server IP).
## 0.146.1-2 (06-07-2026)
- Minor bugs fixed

View File

@@ -1,4 +1,4 @@
ARG BUILD_FROM=ghcr.io/manyfold3d/manyfold-solo:0.135.0
ARG BUILD_FROM=ghcr.io/manyfold3d/manyfold-solo:latest
FROM ${BUILD_FROM}
# hadolint ignore=DL3041

View File

@@ -53,6 +53,7 @@ Local development alternative on the HA host:
## Options
- `secret_key_base`: App secret used by Rails to sign/encrypt sessions and tokens. See [Secret Key Base](#secret-key-base) below.
- `public_hostname`: Hostname or server IP used to generate links (mailer and "Open in slicer" download URLs). Leave blank to auto-detect from Home Assistant's configured external URL, falling back to `homeassistant.local`.
- `puid` / `pgid`: Ownership applied to writable mapped directories (`/config` paths).
- `multiuser`: Toggle Manyfold multiuser mode.
- `library_path`: Scanned/indexed path.

View File

@@ -1,7 +1,7 @@
name: "Manyfold"
slug: manyfold
description: "Manyfold 3D model manager as a Home Assistant add-on, using the upstream image with configurable library/index paths."
version: "0.146.1-2"
version: "0.146.1-3"
url: "https://github.com/alexbelgium/hassio-addons/tree/master/manyfold"
image: ghcr.io/alexbelgium/manyfold-{arch}
arch:

View File

@@ -153,16 +153,39 @@ generate_secret() {
head -c 64 /dev/urandom | od -An -tx1 | tr -d ' \n'
}
# Manyfold's production.rb sets config.assume_ssl = PUBLIC_HOSTNAME.present?,
# with no separate env var to opt out. assume_ssl makes Rails treat every
# request as if it arrived over HTTPS (for a proxy that terminates SSL
# upstream), which is wrong here: this add-on serves plain HTTP directly on
# port 3214 with no TLS termination, so it produces bad https:// redirects
# (e.g. to /users/sign_in) that browsers can't complete. Force it back off
# via an initializer dropped into whichever app directory is found, since we
# still need PUBLIC_HOSTNAME set for correct link generation elsewhere.
disable_assume_ssl() {
local app_dir="$1"
local initializer_dir="${app_dir}/config/initializers"
[[ -d "$initializer_dir" ]] || return 0
cat > "${initializer_dir}/manyfold_addon_disable_assume_ssl.rb" << 'EOF'
# Added by the Manyfold Home Assistant add-on: this add-on has no
# SSL-terminating reverse proxy in front of it, so assuming SSL produces
# incorrect https:// redirects on a plain-HTTP port.
Rails.application.config.assume_ssl = false
EOF
}
start_manyfold() {
if [[ -x /usr/src/app/bin/docker-entrypoint.sh ]]; then
log "Starting Manyfold via /usr/src/app/bin/docker-entrypoint.sh foreman start"
cd /usr/src/app
disable_assume_ssl /usr/src/app
exec ./bin/docker-entrypoint.sh foreman start
fi
if [[ -x /app/bin/docker-entrypoint.sh ]]; then
log "Starting Manyfold via /app/bin/docker-entrypoint.sh foreman start"
cd /app
disable_assume_ssl /app
exec ./bin/docker-entrypoint.sh foreman start
fi
@@ -189,8 +212,10 @@ start_manyfold() {
if [[ -d /usr/src/app ]]; then
cd /usr/src/app
disable_assume_ssl /usr/src/app
elif [[ -d /app ]]; then
cd /app
disable_assume_ssl /app
fi
if command -v bundle >/dev/null 2>&1; then
@@ -272,6 +297,7 @@ export MANYFOLD_MULTIUSER="$MULTIUSER"
export MANYFOLD_LIBRARY_PATH="$LIBRARY_PATH"
export MANYFOLD_THUMBNAILS_PATH="$THUMBNAILS_PATH"
export PUBLIC_HOSTNAME
export PUBLIC_PORT="3214"
export RAILS_LOG_LEVEL="$LOG_LEVEL"
export MANYFOLD_LOG_LEVEL="$LOG_LEVEL"
export WEB_CONCURRENCY