Split view, personal modes, budget warnings, server move script
- Up to three chats side by side (#/s/a+b+c), "Open beside" in the sidebar menu
- File manager tabs of a chat stored per user on the server (/sessions/{id}/tabs)
- Personal modes for every user (Settings → My modes, /account/modes)
- Budget meters (total, provider, images, opencode Go windows) with push warnings
for admins at the warning share and 100 %, shown in the status overlay
- scripts/move-server.sh: move to another Docker host with bind mounts (Unraid);
scripts/smoke-test.sh
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
81ee084ff2
commit
d152ad836d
26 files changed
+836
-52
No files matched your search
Executable
+36
@@ -0,0 +1,36 @@
|
||||
#!/usr/bin/env bash
|
||||
# Quick check of a running CodeCraft: health, version, web UI, terminal client download.
|
||||
#
|
||||
# Usage: scripts/smoke-test.sh [URL] [EXPECTED_VERSION]
|
||||
# URL base URL (default http://127.0.0.1:8787)
|
||||
# EXPECTED_VERSION e.g. 202611-00003 (without "v"); checked when given
|
||||
#
|
||||
# Exit code 0 when everything answers, 1 otherwise.
|
||||
set -uo pipefail
|
||||
|
||||
url="${1:-http://127.0.0.1:8787}"
|
||||
url="${url%/}"
|
||||
want="${2:-}"
|
||||
want="${want#v}"
|
||||
fail=0
|
||||
check() { if [[ "$2" == ok ]]; then printf ' ok %s\n' "$1"; else printf ' FAIL %s (%s)\n' "$1" "$2"; fail=1; fi; }
|
||||
|
||||
echo "smoke test: $url"
|
||||
health=""
|
||||
for _ in $(seq 1 60); do
|
||||
health=$(curl -fsS -m 5 "$url/api/health" 2>/dev/null) && break
|
||||
sleep 2
|
||||
done
|
||||
[[ -n "$health" ]] && check "health" ok || check "health" "no answer after 2 minutes"
|
||||
if [[ -n "$health" ]]; then
|
||||
version=$(sed -n 's/.*"version":"\([^"]*\)".*/\1/p' <<<"$health")
|
||||
if [[ -n "$want" && "$version" != "$want" ]]; then check "version $version" "expected $want"; else check "version ${version:-?}" ok; fi
|
||||
grep -q '"ok":true' <<<"$health" && check "server reports ok" ok || check "server reports ok" "$health"
|
||||
fi
|
||||
code=$(curl -s -o /dev/null -m 10 -w '%{http_code}' "$url/")
|
||||
[[ "$code" == 200 ]] && check "web UI" ok || check "web UI" "HTTP $code"
|
||||
code=$(curl -s -o /dev/null -m 10 -w '%{http_code}' "$url/cli/install.sh")
|
||||
[[ "$code" == 200 ]] && check "terminal client install script" ok || check "terminal client install script" "HTTP $code"
|
||||
code=$(curl -s -o /dev/null -m 60 -w '%{http_code}' "$url/cli/download/linux-x86_64")
|
||||
[[ "$code" == 200 ]] && check "terminal client download" ok || check "terminal client download" "HTTP $code"
|
||||
exit $fail
|
||||
Reference in new issue
Block a user