chore: post-commit formatting churn

This commit is contained in:
Raphael Westphal
2026-08-18 13:10:15 +02:00
parent 05ad577eea
commit 345025b070
4 changed files with 30 additions and 28 deletions
+6 -6
View File
@@ -6,18 +6,18 @@ REMOTE="${1:-alarm}"
REMOTE_DIR="${2:-/zdata/root/dockerFiles/lvmh}" REMOTE_DIR="${2:-/zdata/root/dockerFiles/lvmh}"
if ! ssh "$REMOTE" "test -f $REMOTE_DIR/.env" 2>/dev/null; then if ! ssh "$REMOTE" "test -f $REMOTE_DIR/.env" 2>/dev/null; then
echo "ERROR: $REMOTE:$REMOTE_DIR/.env missing. Create it first (see .env.example):" echo "ERROR: $REMOTE:$REMOTE_DIR/.env missing. Create it first (see .env.example):"
echo " ssh $REMOTE 'mkdir -p $REMOTE_DIR && cat > $REMOTE_DIR/.env' <<EOF echo " ssh $REMOTE 'mkdir -p $REMOTE_DIR && cat > $REMOTE_DIR/.env' <<EOF
LVMH_TOKEN=... LVMH_TOKEN=...
ZAI_RENAUD_API_KEY=... ZAI_RENAUD_API_KEY=...
EOF" EOF"
exit 1 exit 1
fi fi
rsync -az --delete \ rsync -az --delete \
--exclude .git --exclude node_modules --exclude web/dist \ --exclude .git --exclude node_modules --exclude web/dist \
--exclude .env --exclude .scratch --exclude .pi \ --exclude .env --exclude .scratch --exclude .pi \
./ "$REMOTE:$REMOTE_DIR/" ./ "$REMOTE:$REMOTE_DIR/"
ssh "$REMOTE" "cd $REMOTE_DIR && docker compose build lvmh && docker compose up -d && docker compose ps" ssh "$REMOTE" "cd $REMOTE_DIR && docker compose build lvmh && docker compose up -d && docker compose ps"
echo "Deployed: http://$REMOTE:8686" echo "Deployed: http://$REMOTE:8686"
+4 -2
View File
@@ -9,10 +9,12 @@ BASE="http://$HOST:8686"
auth=(-H "Authorization: Bearer $TOKEN") auth=(-H "Authorization: Bearer $TOKEN")
echo "== sessions ==" echo "== sessions =="
curl -fsS "${auth[@]}" "$BASE/api/sessions" | head -c 400; echo curl -fsS "${auth[@]}" "$BASE/api/sessions" | head -c 400
echo
echo "== gitlab status ==" echo "== gitlab status =="
curl -fsS "${auth[@]}" "$BASE/api/gitlab/status"; echo curl -fsS "${auth[@]}" "$BASE/api/gitlab/status"
echo
echo "== web dist ==" echo "== web dist =="
curl -fsS "$BASE/" | grep -o '<title>[^<]*</title>' || echo "no title tag" curl -fsS "$BASE/" | grep -o '<title>[^<]*</title>' || echo "no title tag"
+1 -1
View File
@@ -18,7 +18,7 @@ services:
volumes: volumes:
- /var/run/docker.sock:/var/run/docker.sock - /var/run/docker.sock:/var/run/docker.sock
- lvmh-data:/data - lvmh-data:/data
- .:/app/build:ro # repo checkout (rsynced by deploy.sh) - .:/app/build:ro # repo checkout (rsynced by deploy.sh)
# daemon rebuilds lvmh-worker from /app/build/docker/worker.Dockerfile # daemon rebuilds lvmh-worker from /app/build/docker/worker.Dockerfile
networks: networks:
lvmh-net: lvmh-net:
+19 -19
View File
@@ -4,29 +4,29 @@
import { createAgentSession } from "@earendil-works/pi-coding-agent"; import { createAgentSession } from "@earendil-works/pi-coding-agent";
process.on("unhandledRejection", (err) => { process.on("unhandledRejection", (err) => {
console.error("[lvmh-bridge] unhandledRejection:", err); console.error("[lvmh-bridge] unhandledRejection:", err);
}); });
try { try {
const { session } = await createAgentSession(); const { session } = await createAgentSession();
console.error(`[lvmh-bridge] session up, cwd=${process.cwd()}`); console.error(`[lvmh-bridge] session up, cwd=${process.cwd()}`);
session.subscribe((event) => { session.subscribe((event) => {
// Keep the loop warm; the extension does the mirroring. // Keep the loop warm; the extension does the mirroring.
if (event.type === "agent_settled") { if (event.type === "agent_settled") {
console.error("[lvmh-bridge] agent settled"); console.error("[lvmh-bridge] agent settled");
} }
}); });
for (const sig of ["SIGTERM", "SIGINT"]) { for (const sig of ["SIGTERM", "SIGINT"]) {
process.on(sig, () => { process.on(sig, () => {
console.error(`[lvmh-bridge] ${sig}, exiting`); console.error(`[lvmh-bridge] ${sig}, exiting`);
process.exit(0); process.exit(0);
}); });
} }
// Stay alive forever. // Stay alive forever.
setInterval(() => {}, 1 << 30); setInterval(() => {}, 1 << 30);
} catch (err) { } catch (err) {
console.error("[lvmh-bridge] failed to create agent session", err); console.error("[lvmh-bridge] failed to create agent session", err);
process.exit(1); process.exit(1);
} }