14 Commits
Author SHA1 Message Date
CangShui d8c70ca9f5 Update README.md 2026-09-14 21:59:01 +08:00
CangShui 1ee094ffa1 feat: OpenAI Responses API + session normalization (v1.8.1)
- add /v1/responses (and /responses): OpenAI Responses API support
  - streaming semantic events, non-streaming aggregation, function tools
  - input item / content / tool / tool_choice conversion to chat format
- ensure first message is system: fix upstream 11128
  "first message is not system prompt" for non-harness clients
  (assistant/tool-leading or missing system); normalize developer role
- fix tool call delta merging (applyToolCallDelta) across streamed chunks
- refactor handleChatCompletions: extract upstreamChat for 429 cooldown
  fallback across the account pool
- bump version to 1.8.1
- tests: 37 passing (session normalization, responses conversion,
  tool call merge, responses<->chat mapping)
v1.8.1
2026-09-13 17:43:01 +08:00
CangShui 5ac6ee7975 feat: intl site (workbuddy.ai) support + credential hot-reload + build script
- login -intl: sign in via www.workbuddy.ai (browser-based, OneID email/SSO flow)
- per-credential edition routing for refresh/chat upstreams (cn | intl)
- mixed cn/intl account pool with round-robin and 429 cooldown fallback
- English rate-limit message parsing (reset time extraction)
- credential hot-reload: auto discover/add/update/remove credential files while serving (-reload-interval, default 5s, 0=off)
- exclude workbuddy-status.json from credential auto-discovery
- status/monitor/snapshot show per-account site label
- add build.ps1 cross-platform build script; harden .gitignore
v1.7.0
2026-09-05 05:32:09 +08:00
CangShui 20f7fdded3 Update README.md 2026-09-04 16:37:40 +08:00
CangShui 4d5d315125 Update README.md 2026-09-04 12:22:15 +08:00
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
v1.5.0
2026-09-04 09:36:51 +08:00
CangShui 86b70baf29 feat: print loaded credential file list at end of startup banner
- After the per-account status block, print a summary line listing all
  loaded credential files (e.g. '已加载凭据文件 (2): workbuddy.json,
  workbuddy2.json') so the count is visible even when journalctl/
  systemctl truncates the earlier log lines
v1.4.2
2026-09-04 08:48:21 +08:00
CangShui 0484db4b3a feat: show all accounts with full status in serve startup banner
- Startup banner now prints every account's complete status (nickname,
  UID, enterprise, domain, cooldown state, token validity, expiry)
  instead of a single-line summary
- Extracted shared formatAccountStatus() used by both status command
  and serve startup output, keeping them consistent
- Shows disabled accounts with reason and re-login hint at startup
v1.4.1
2026-09-04 08:42:03 +08:00
CangShui 9fcd99f152 feat: auto-discover all workbuddy*.json in working directory
- When neither -auth nor -auth-dir is specified, scan the working
  directory for all workbuddy*.json files and build the account pool
  from them (multi-account without any flags)
- Example: /opt/workbuddy-gateway with workbuddy.json + workbuddy2.json
  is automatically loaded as a 2-account pool under systemd
- loadDisabledMarkers also auto-discovers *.json.disabled markers
- Fallback to default workbuddy.json when no credential files found
- Unit tests for auto-discovery and fallback behavior
v1.4.0
2026-09-04 08:13:38 +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
v1.3.0
2026-09-04 04:12:11 +08:00
CangShui f96a874d2a feat: multi-account pool with round-robin and 429 auto-cooldown
- Support multiple CodeBuddy accounts: -auth comma-separated or -auth-dir
- Round-robin request distribution to balance quota usage across accounts
- Auto-parse 429 rate-limit reset time (e.g. '将在 ... UTC+8 重置'),
  cooldown-block the offending account until reset, failover to others
- Per-account serialization lock (same account queues, different accounts parallel)
- status/refresh commands now cover the whole account pool
- Unit tests for reset-time parsing, rate-limit detection and round-robin
v1.2.0
2026-09-04 03:54:32 +08:00
CangShui e82b5f4212 docs: point download links to GitHub Releases 2026-09-04 00:12:02 +08:00
CangShui 946f540cb1 Update README.md 2026-09-04 00:06:33 +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
v1.1.0
2026-09-04 00:03:58 +08:00