diff --git a/build.sh b/build.sh index 88fcb820..bd8ead03 100755 --- a/build.sh +++ b/build.sh @@ -902,6 +902,16 @@ install_live_npm_globals() { echo "ERROR: /opt/clawdie/npm-global ownership is ${_npm_owner}, expected clawdie:clawdie" exit 1 fi + + # Fix pi HTTP/2: the bundled http-dispatcher sets allowH2:false to + # work around a Node 26.0 undici decompression bug. We run Node 24 + # with undici 8.3, where H2 works correctly. Enabling HTTP/2 gives + # HPACK header compression and multiplexing for API calls. + _pi_dispatcher="${_live_prefix}/lib/node_modules/@earendil-works/pi-coding-agent/dist/core/http-dispatcher.js" + if [ -f "${_pi_dispatcher}" ]; then + sed -i '' 's/allowH2: false/allowH2: true/' "${_pi_dispatcher}" + echo " pi http-dispatcher: allowH2 → true" + fi } seed_live_ai_source_repo() { diff --git a/scripts/stage-colibri-iso.sh b/scripts/stage-colibri-iso.sh index 8b0ddce0..acd9d9b2 100755 --- a/scripts/stage-colibri-iso.sh +++ b/scripts/stage-colibri-iso.sh @@ -103,6 +103,15 @@ sed -i '' '/socket ready/a\ chmod 644 "${pidfile}" 2>/dev/null || true' \ "${RC_DIR}/colibri_daemon" +# Add DeepSeek API key and cache warming to daemon environment. +# These are injected into the rc.d prestart so the daemon picks them up +# without needing a separate config file. +sed -i '' '/export COLIBRI_COST_MODE/a\ + export DEEPSEEK_API_KEY="${DEEPSEEK_API_KEY:-}"\ + export COLIBRI_CACHE_WARMING="true"\ + export COLIBRI_CACHE_WARMING_INTERVAL_HOURS="6"' \ + "${RC_DIR}/colibri_daemon" + cat > "${ETC_DIR}/rc.conf.sample" <