chore(rebrand): finish codewhale release surfaces

This commit is contained in:
Hunter Bown
2026-05-23 13:41:46 -05:00
parent 6de8ba363f
commit ddaabbfed2
50 changed files with 269 additions and 254 deletions
+4 -3
View File
@@ -8,7 +8,7 @@ The active root `.cnb.yml` does two things:
- runs Feishu bridge and version-drift checks when CNB receives `main`;
- builds Linux x64 release assets from `v*` tags, creates the CNB release, and
uploads `deepseek-linux-x64`, `deepseek-tui-linux-x64`, and
uploads `codewhale-linux-x64`, `codewhale-tui-linux-x64`, and
`deepseek-artifacts-sha256.txt`.
The files in this directory are retained as deploy-button templates for Tencent
@@ -37,9 +37,10 @@ Optional:
- `DEEPSEEK_REPO_URL`: defaults to the CNB mirror URL
- `LIGHTHOUSE_SSH_PORT`: defaults to `22`
The server side should already have `/opt/whalebro/deepseek-tui`,
The server side should already have `/opt/whalebro/codewhale`,
`/etc/deepseek/runtime.env`, `/etc/deepseek/feishu-bridge.env`, and the
systemd services from `docs/TENCENT_LIGHTHOUSE_HK.md`.
`codewhale-runtime` / `codewhale-feishu-bridge` systemd services from
`docs/TENCENT_LIGHTHOUSE_HK.md`.
## Safety Notes
+18 -18
View File
@@ -40,7 +40,7 @@ main:
LIGHTHOUSE_SSH_PORT="${LIGHTHOUSE_SSH_PORT:-22}"
DEEPSEEK_REPO_BRANCH="${DEEPSEEK_REPO_BRANCH:-main}"
DEEPSEEK_REPO_URL="${DEEPSEEK_REPO_URL:-https://cnb.cool/deepseek-tui.com/DeepSeek-TUI.git}"
DEEPSEEK_REPO_URL="${DEEPSEEK_REPO_URL:-https://cnb.cool/codewhale.net/codewhale.git}"
install -m 700 -d ~/.ssh
printf '%s\n' "$LIGHTHOUSE_SSH_PRIVATE_KEY" > ~/.ssh/id_ed25519
@@ -51,37 +51,37 @@ main:
"DEEPSEEK_REPO_BRANCH='$DEEPSEEK_REPO_BRANCH' DEEPSEEK_REPO_URL='$DEEPSEEK_REPO_URL' bash -s" <<'REMOTE'
set -euo pipefail
if [ ! -d /opt/whalebro/deepseek-tui/.git ]; then
sudo -u deepseek git clone --branch "$DEEPSEEK_REPO_BRANCH" "$DEEPSEEK_REPO_URL" /opt/whalebro/deepseek-tui
if [ ! -d /opt/whalebro/codewhale/.git ]; then
sudo -u codewhale git clone --branch "$DEEPSEEK_REPO_BRANCH" "$DEEPSEEK_REPO_URL" /opt/whalebro/codewhale
fi
cd /opt/whalebro/deepseek-tui
if [ -n "$(sudo -u deepseek git status --porcelain)" ]; then
echo "Refusing to deploy over a dirty /opt/whalebro/deepseek-tui checkout." >&2
sudo -u deepseek git status --short
cd /opt/whalebro/codewhale
if [ -n "$(sudo -u codewhale git status --porcelain)" ]; then
echo "Refusing to deploy over a dirty /opt/whalebro/codewhale checkout." >&2
sudo -u codewhale git status --short
exit 1
fi
sudo -u deepseek git fetch --all --tags
if sudo -u deepseek git rev-parse --verify --quiet "refs/remotes/origin/$DEEPSEEK_REPO_BRANCH" >/dev/null; then
sudo -u deepseek git checkout -B "$DEEPSEEK_REPO_BRANCH" "origin/$DEEPSEEK_REPO_BRANCH"
elif sudo -u deepseek git rev-parse --verify --quiet "refs/tags/$DEEPSEEK_REPO_BRANCH" >/dev/null; then
sudo -u deepseek git checkout --detach "$DEEPSEEK_REPO_BRANCH"
sudo -u codewhale git fetch --all --tags
if sudo -u codewhale git rev-parse --verify --quiet "refs/remotes/origin/$DEEPSEEK_REPO_BRANCH" >/dev/null; then
sudo -u codewhale git checkout -B "$DEEPSEEK_REPO_BRANCH" "origin/$DEEPSEEK_REPO_BRANCH"
elif sudo -u codewhale git rev-parse --verify --quiet "refs/tags/$DEEPSEEK_REPO_BRANCH" >/dev/null; then
sudo -u codewhale git checkout --detach "$DEEPSEEK_REPO_BRANCH"
else
sudo -u deepseek git checkout "$DEEPSEEK_REPO_BRANCH"
sudo -u deepseek git pull --ff-only
sudo -u codewhale git checkout "$DEEPSEEK_REPO_BRANCH"
sudo -u codewhale git pull --ff-only
fi
sudo -iu deepseek bash -lc '
sudo -iu codewhale bash -lc '
set -euo pipefail
. "$HOME/.cargo/env"
cd /opt/whalebro/deepseek-tui
cd /opt/whalebro/codewhale
cargo install --path crates/cli --locked --force
cargo install --path crates/tui --locked --force
'
sudo bash scripts/tencent-lighthouse/install-services.sh
sudo systemctl restart deepseek-runtime
sudo systemctl restart deepseek-feishu-bridge
sudo systemctl restart codewhale-runtime
sudo systemctl restart codewhale-feishu-bridge
sudo bash scripts/tencent-lighthouse/doctor.sh
REMOTE
@@ -3,12 +3,12 @@
environments:
- name: lighthouse-hk
description: Deploy DeepSeek TUI to Tencent Lighthouse Hong Kong.
description: Deploy Codewhale to Tencent Lighthouse Hong Kong.
env:
name: lighthouse-hk
button:
- name: Deploy Lighthouse
description: Update /opt/whalebro/deepseek-tui, restart services, and run the Lighthouse doctor.
description: Update /opt/whalebro/codewhale, restart services, and run the Lighthouse doctor.
event: web_trigger_lighthouse
isDefault: true
permissions:
@@ -13,7 +13,7 @@ DEEPSEEK_AUTO_APPROVE=false
DEEPSEEK_CHAT_ALLOWLIST=
DEEPSEEK_ALLOW_UNLISTED=false
FEISHU_THREAD_MAP_PATH=/var/lib/deepseek-feishu-bridge/thread-map.json
FEISHU_THREAD_MAP_PATH=/var/lib/codewhale-feishu-bridge/thread-map.json
FEISHU_ALLOW_GROUPS=false
FEISHU_REQUIRE_PREFIX_IN_GROUP=true
FEISHU_GROUP_PREFIX=/ds
@@ -0,0 +1,21 @@
[Unit]
Description=Codewhale Feishu/Lark Phone Bridge
Wants=network-online.target codewhale-runtime.service
After=network-online.target codewhale-runtime.service
[Service]
Type=simple
User=codewhale
Group=codewhale
WorkingDirectory=/opt/codewhale/bridge
EnvironmentFile=/etc/deepseek/feishu-bridge.env
ExecStart=/usr/bin/node /opt/codewhale/bridge/src/index.mjs
Restart=on-failure
RestartSec=5
NoNewPrivileges=true
PrivateTmp=true
ProtectSystem=full
ReadWritePaths=/var/lib/codewhale-feishu-bridge
[Install]
WantedBy=multi-user.target
@@ -0,0 +1,21 @@
[Unit]
Description=Codewhale Runtime API
Wants=network-online.target
After=network-online.target
[Service]
Type=simple
User=codewhale
Group=codewhale
WorkingDirectory=/opt/whalebro
EnvironmentFile=/etc/deepseek/runtime.env
ExecStart=/home/codewhale/.cargo/bin/codewhale serve --http --host 127.0.0.1 --port ${DEEPSEEK_RUNTIME_PORT} --workers ${DEEPSEEK_RUNTIME_WORKERS} --auth-token ${DEEPSEEK_RUNTIME_TOKEN}
Restart=on-failure
RestartSec=5
NoNewPrivileges=true
PrivateTmp=true
ProtectSystem=full
ReadWritePaths=/home/codewhale/.deepseek /opt/whalebro
[Install]
WantedBy=multi-user.target
@@ -1,21 +0,0 @@
[Unit]
Description=DeepSeek Feishu/Lark Phone Bridge
Wants=network-online.target deepseek-runtime.service
After=network-online.target deepseek-runtime.service
[Service]
Type=simple
User=deepseek
Group=deepseek
WorkingDirectory=/opt/deepseek/bridge
EnvironmentFile=/etc/deepseek/feishu-bridge.env
ExecStart=/usr/bin/node /opt/deepseek/bridge/src/index.mjs
Restart=on-failure
RestartSec=5
NoNewPrivileges=true
PrivateTmp=true
ProtectSystem=full
ReadWritePaths=/var/lib/deepseek-feishu-bridge
[Install]
WantedBy=multi-user.target
@@ -1,21 +0,0 @@
[Unit]
Description=DeepSeek TUI Runtime API
Wants=network-online.target
After=network-online.target
[Service]
Type=simple
User=deepseek
Group=deepseek
WorkingDirectory=/opt/whalebro
EnvironmentFile=/etc/deepseek/runtime.env
ExecStart=/home/deepseek/.cargo/bin/deepseek serve --http --host 127.0.0.1 --port ${DEEPSEEK_RUNTIME_PORT} --workers ${DEEPSEEK_RUNTIME_WORKERS} --auth-token ${DEEPSEEK_RUNTIME_TOKEN}
Restart=on-failure
RestartSec=5
NoNewPrivileges=true
PrivateTmp=true
ProtectSystem=full
ReadWritePaths=/home/deepseek/.deepseek /opt/whalebro
[Install]
WantedBy=multi-user.target