feat(hub): "Use c0mpute network" session: chat for members, TUI for operators

New hub Sessions entry that opens the c0mpute network (free-tier AI chat on
open models) inside the member's pod, never on the BBS host:

- pods/Containerfile installs the c0mpute client stack (c0mpute binary, pinned
  bun, signed c0mpute-tui) via the official installer with --no-start and no
  peers, under /opt/c0mpute, linked onto PATH. unzip added (bun ships as a
  zip; without it the installer silently skipped the TUI). The build now fails
  if the TUI or bun is missing, and drops the installer's build-time config so
  no node identity ships in the image.
- pods/agentbbs-c0mpute signs the member in to their own c0mpute account on
  first use (device code; free account = free tier), then runs `c0mpute chat`,
  or `c0mpute tui` for operators. The key persists in /home/dev.
- Gated like the pod Shell: members only, verified email, pods available.

Tested: slim image with the same layer on ubuntu:26.04 builds; as uid 1000 with
an empty home the launcher shows the c0mpute.com/cli/approve device code, and
`c0mpute tui` renders (Chat/Jobs/Node/Network/Settings/Fleet).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Anthony Ettinger 2026-11-30 11:25:14 +00:00
parent 52f8118ee5
commit 628897609c
4 changed files with 104 additions and 1 deletions

53
pods/agentbbs-c0mpute Executable file
View file

@ -0,0 +1,53 @@
#!/bin/sh
# agentbbs-c0mpute [chat|tui]: the hub's "Use c0mpute network" entry, run
# inside the member's pod. Signs the member in to their own c0mpute account on
# first use (free account; chat runs on the free tier until they add a
# balance), then opens `c0mpute chat` (members) or `c0mpute tui` (operators).
# The sign-in key lives in the member's persisted home, so this is a one-time
# step per member.
mode="${1:-chat}"
# c0mpute logs an INFO "tracing initialised" line to the terminal; keep the
# screen clean unless the member asks for more.
export RUST_LOG="${RUST_LOG:-warn}"
pause() {
printf '\n%s' "Press Enter to return to the BBS menu. "
read -r _ || true
}
if ! command -v c0mpute >/dev/null 2>&1; then
echo "c0mpute is not installed in this pod yet. It arrives with the next pod image."
pause
exit 1
fi
if ! c0mpute chat whoami >/dev/null 2>&1; then
cat <<'EOF'
c0mpute network: free AI chat on open models (c0mpute.com).
Sign in once with your own c0mpute account (free: chat runs on the free tier).
This pod remembers the sign-in, so you only do this the first time.
EOF
if ! c0mpute chat login; then
echo
echo "Sign-in did not finish. Pick 'Use c0mpute network' again to retry."
pause
exit 1
fi
fi
case "$mode" in
tui) c0mpute tui ;;
*)
echo "c0mpute chat: type a message. Quit the chat to return to the BBS menu."
c0mpute chat
;;
esac
rc=$?
if [ "$rc" -ne 0 ]; then
echo
echo "c0mpute exited with status $rc."
pause
fi
exit "$rc"