Merge pull request 'Enable DeepSeek cache warming + HTTP/2 compression' (#17) from fix/deepseek-cache-warming-http2 into main

This commit is contained in:
clawdie 2026-06-04 13:21:58 +02:00 committed by 123kupola
parent 3bc802bc66
commit ee79110250
2 changed files with 19 additions and 0 deletions

View file

@ -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() {

View file

@ -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" <<EOF
# Colibri control plane service defaults for the Clawdie ISO.
# Merge into /etc/rc.conf or /etc/rc.conf.d/colibri_daemon.