3 Commits
Author SHA1 Message Date
CangShui 61aa053816 feat: add foreground monitor command with live status + recent logs
- serve now periodically writes account-pool state (active/cooldown/
  disabled, cooldown until, token expiry) to workbuddy-status.json,
  refreshed every 3s and immediately on cooldown/disable/refresh events
- new 'monitor' command runs in foreground: refreshes a live panel of
  all accounts (usable/cooldown/expired + reasons) every N seconds,
  optionally showing recent logs via journalctl (-journal) or a log
  file (-logfile)
- statusSnapshotFile excluded from git via .gitignore
- unit tests for tailLines and status snapshot states
2026-09-04 09:36:51 +08:00
CangShui 818d0c223e feat: auto-disable accounts on expired/revoked auth
- Detect auth failure (HTTP 401/403, invalid token, login expired)
  during token refresh and upstream requests
- Disable the account from round-robin scheduling immediately,
  delete its credential file, and write a persistent .disabled marker
- status/runServe console shows disabled accounts with reason and
  re-login command; re-login clears the marker and restores scheduling
- Background refresher skips disabled accounts; refresh command reports
  skipped count
- Unit tests for auth-failure detection, disabled skip, marker
  persistence/restore/clear
2026-09-04 04:12:11 +08:00
CangShui 169e65d8b2 Initial release v1.1.0: WorkBuddy Local Gateway
- Pure Go, zero CGO, single binary, cross-platform (Windows/Linux/macOS)
- Full model passthrough to Tencent CodeBuddy upstream
- CLI login with ASCII QR, auto token refresh
- OpenAI-compatible API with SSE streaming + non-stream aggregation
- Reasoning-effort passthrough only when client explicitly requests
- No credentials, secrets, IPs or sensitive domains in repo
2026-09-04 00:03:58 +08:00