Run daemon on packaged Bare runtime
Rolling release / release (push) Canceled after 14m9s
CI / verify (push) Canceled after 14m18s

This commit is contained in:
2026-09-11 15:52:53 -04:00
parent 562f1a6316
commit a3314db1e9
30 changed files with 2953 additions and 65 deletions
+10 -8
View File
@@ -2,19 +2,21 @@
set -euo pipefail
ROOT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
cd "${ROOT_DIR}"
case "$(uname -m)" in
x86_64|amd64) BARE="${ROOT_DIR}/node_modules/bare-runtime-linux-x64/bin/bare" ;;
aarch64|arm64) BARE="${ROOT_DIR}/node_modules/bare-runtime-linux-arm64/bin/bare" ;;
*) BARE="" ;;
esac
BARE="${BARE:-$(command -v bare || true)}"
[[ -x "${BARE}" ]] || { echo "Packaged Bare runtime not found; reinstall the rolling bundle." >&2; exit 1; }
echo "JARVIS-QVAC first-run setup"
echo "The daemon is GPU-gated and keeps QVAC behind one master owner."
echo
echo "[1/5] GPU and QVAC preflight"
npm run gpu-doctor || true
if command -v timeout >/dev/null; then
timeout --foreground 30s npm run qvac:doctor || echo "QVAC doctor timed out or reported an unavailable host dependency; continuing with local setup."
else
npm run qvac:doctor || true
fi
"${BARE}" packaging/bare-run.js daemon/gpu-doctor.js || true
echo
echo "[2/5] Microphone and PipeWire preflight"
npm run voice-doctor || true
"${BARE}" packaging/bare-run.js daemon/voice-doctor.js || true
echo
echo "[3/5] Wake phrase and model profile"
read -r -p "Wake phrase [hey jarvis]: " WAKE_PHRASE
@@ -29,7 +31,7 @@ read -r -p "Enable TTS preview? [Y/n]: " TTS_CHOICE
TTS_ENABLED=true
[[ "${TTS_CHOICE:-Y}" =~ ^[Nn]$ ]] && TTS_ENABLED=false
mkdir -p "${HOME}/.config/jarvis"
node -e 'const fs=require("fs"); const p=process.argv[1], phrase=process.argv[2], profile=process.argv[3], tts=process.argv[4]==="true"; let c={}; try{c=JSON.parse(fs.readFileSync(p,"utf8"))}catch{}; Object.assign(c,{wakePhrase:phrase,modelProfile:profile,ttsEnabled:tts}); fs.writeFileSync(p,JSON.stringify(c,null,2)+"\n")' "${HOME}/.config/jarvis/config.json" "${WAKE_PHRASE}" "${MODEL_PROFILE}" "${TTS_ENABLED}"
"${BARE}" packaging/write-config.js "${HOME}/.config/jarvis/config.json" "${WAKE_PHRASE}" "${MODEL_PROFILE}" "${TTS_ENABLED}"
echo "Saved wake phrase: ${WAKE_PHRASE}; model profile: ${MODEL_PROFILE}; TTS: ${TTS_ENABLED}"
echo
echo "[4/5] TTS preview"