Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
60 commits
Select commit Hold shift + click to select a range
7b83b28
docs: add agent recovery merge design
ZingerLittleBee Apr 16, 2026
048de64
docs: refine agent recovery merge design
ZingerLittleBee Apr 16, 2026
a49380d
docs: clarify recovery merge spec details
ZingerLittleBee Apr 16, 2026
8885cab
docs: add agent recovery merge plan
ZingerLittleBee Apr 16, 2026
29ff2c1
feat(agent): add atomic recovery token rebind support
ZingerLittleBee Apr 16, 2026
375d229
test(agent): add exact-named rebind token test
ZingerLittleBee Apr 16, 2026
4fc69a3
fix(agent): harden recovery token persistence
ZingerLittleBee Apr 16, 2026
a4965f9
refactor(agent): co-locate recovery persistence tests
ZingerLittleBee Apr 16, 2026
c892882
style(agent): satisfy clippy for recovery persistence
ZingerLittleBee Apr 16, 2026
9a6a946
fix(common): bump protocol version for recovery rebind
ZingerLittleBee Apr 16, 2026
e3a3a58
fix(agent): stop old socket immediately after rebind ack
ZingerLittleBee Apr 16, 2026
afa425d
fix(server): handle rebind agent messages for protocol compat
ZingerLittleBee Apr 16, 2026
4f283ac
fix(agent): keep persisted token at toml top level
ZingerLittleBee Apr 16, 2026
bded125
fix(agent): scope token replacement to top-level toml
ZingerLittleBee Apr 16, 2026
da6bec3
feat(server): persist recovery jobs in sqlite
ZingerLittleBee Apr 16, 2026
e9e1adf
fix(agent): reject token persistence under env override
ZingerLittleBee Apr 16, 2026
44ac5f8
fix(agent): keep bootstrap token persistence best effort
ZingerLittleBee Apr 16, 2026
0f615f5
fix(server): enforce unique active recovery jobs
ZingerLittleBee Apr 16, 2026
c10ea85
fix(server): block cross-role active recovery collisions
ZingerLittleBee Apr 16, 2026
18b71dc
feat(server): add recovery candidate and job api
ZingerLittleBee Apr 16, 2026
ca59f11
fix(server): tighten recovery api contract
ZingerLittleBee Apr 16, 2026
9fad518
fix(server): align recovery candidate preconditions
ZingerLittleBee Apr 16, 2026
feaafc9
feat(server): add recovery write freeze guards
ZingerLittleBee Apr 16, 2026
e943959
fix(server): gate event-rule writes behind recovery lock
ZingerLittleBee Apr 16, 2026
2ebff96
fix(server): gate ip-change audit behind recovery lock
ZingerLittleBee Apr 16, 2026
be0779a
feat(common): add recovery browser protocol payloads
ZingerLittleBee Apr 16, 2026
3ec2fc0
fix(server): re-check recovery lock at each write site
ZingerLittleBee Apr 16, 2026
09d8415
fix(server): bridge recovery browser payload compatibility
ZingerLittleBee Apr 16, 2026
926f34d
fix(server): gate docker cleanup persistence during recovery
ZingerLittleBee Apr 16, 2026
4b652d7
fix(common): tolerate unknown recovery status values
ZingerLittleBee Apr 16, 2026
6c94b0d
fix(server): keep traffic cache updates during recovery freeze
ZingerLittleBee Apr 16, 2026
b4254fe
feat(server): add recovery merge service core
ZingerLittleBee Apr 16, 2026
14927c0
fix(common): avoid wiping recovery state on normal updates
ZingerLittleBee Apr 16, 2026
d0f0f93
fix(server): harden recovery merge stage semantics
ZingerLittleBee Apr 16, 2026
952be84
fix(server): tighten recovery write freeze behavior
ZingerLittleBee Apr 16, 2026
91ab659
fix(server): finish recovery lock write-site coverage
ZingerLittleBee Apr 16, 2026
840caf4
fix(server): tighten recovery merge service boundaries
ZingerLittleBee Apr 16, 2026
9837a40
fix(server): prevent recovery stage regression on retry
ZingerLittleBee Apr 16, 2026
13170d3
fix(server): keep recovery merge transitions monotonic
ZingerLittleBee Apr 16, 2026
5103a8e
feat(server): wire recovery lifecycle into api and ws
ZingerLittleBee Apr 16, 2026
02966dd
fix(server): route rebind failures through recovery service
ZingerLittleBee Apr 16, 2026
d514d2e
fix(server): complete recovery rebind dispatch flow
ZingerLittleBee Apr 16, 2026
f708be7
fix(server): harden recovery dispatch and browser snapshots
ZingerLittleBee Apr 16, 2026
a5eaab0
test(server): align rebind failure recovery update expectation
ZingerLittleBee Apr 16, 2026
49a108c
fix(server): align recovery start validation and tests
ZingerLittleBee Apr 16, 2026
3b5b253
fix(server): recheck recovery start preconditions before dispatch
ZingerLittleBee Apr 16, 2026
7ffad3e
fix(server): harden recovery rebind dispatch safety
ZingerLittleBee Apr 16, 2026
1824b38
test(server): prime recovery source before start flow
ZingerLittleBee Apr 16, 2026
8ebea2a
feat(server): merge recovered server history into target identity
ZingerLittleBee Apr 16, 2026
cfeece9
fix(server): make recovery merge atomic and preserve identity
ZingerLittleBee Apr 16, 2026
093b3a6
refactor(server): add txn-capable traffic merge helpers
ZingerLittleBee Apr 16, 2026
b38f3d6
feat(web): add recovery merge workflow UI
ZingerLittleBee Apr 16, 2026
ff3f438
docs: add recovery merge guidance and api endpoints
ZingerLittleBee Apr 16, 2026
8e6a5ad
test(server): seed recovery candidate source protocol state
ZingerLittleBee Apr 16, 2026
abfed86
style(web): satisfy recovery workflow lint
ZingerLittleBee Apr 16, 2026
56d0c12
fix(web): narrow recovery websocket message types
ZingerLittleBee Apr 16, 2026
8d4d63e
fix(recovery): address follow-up review findings
ZingerLittleBee Apr 16, 2026
968774e
fix(server): remove unused traffic merge wrappers
ZingerLittleBee Apr 16, 2026
c271668
fix(agent): satisfy directory entry sort lint
ZingerLittleBee Apr 16, 2026
8bd2bbf
fix(server): use capability default constant for new servers
ZingerLittleBee Apr 16, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions apps/docs/content/docs/cn/api-reference.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,9 @@ API Key 格式为 `serverbee_` 前缀 + 43 字符随机字符串,创建时仅
| POST/PUT/DELETE | `/api/servers/*` | 服务器管理 |
| PUT | `/api/servers/batch-capabilities` | 批量更新功能开关 |
| POST | `/api/servers/{id}/upgrade` | 触发 Agent 升级 |
| GET | `/api/servers/{target_id}/recovery-candidates` | 列出推荐的恢复候选项 |
| GET | `/api/servers/recovery-jobs/{job_id}` | 获取恢复任务详情 |
| POST | `/api/servers/{target_id}/recover-merge` | 启动 Agent 恢复任务 |
| CRUD | `/api/server-groups/*` | 服务器分组管理 |
| CRUD | `/api/notifications/*` | 通知渠道管理 |
| CRUD | `/api/notification-groups/*` | 通知组管理 |
Expand Down
13 changes: 13 additions & 0 deletions apps/docs/content/docs/cn/server.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,19 @@ Auto Discovery Key 用于 Agent 首次自动注册,优先级如下:

为减少重复的占位服务器,Agent 在可读取稳定机器标识时会携带指纹,相同机器重复注册会复用原有服务器记录。你还可以通过 `auth.max_servers` 软限制自动注册创建的新服务器数量;如果历史失败注册留下了离线占位条目,可在 `/servers` 页面使用 **Clean up unconnected** 清理。

## 恢复重装后的 Agent

如果一台已有服务器重装系统后重新注册成了一条新的临时在线节点,可以在原来的离线服务器详情页里发起恢复:

1. 打开原来的离线服务器
2. 点击 **恢复 Agent**
3. 选择推荐的在线替代节点
4. 启动恢复任务

恢复会保留原始服务器记录,并要求替代 Agent 重新绑定到原来的服务器身份,后续恢复流程会继续在这个基础上执行。

这个恢复流程用于“同一台逻辑机器重装后重新接回”。它不适用于任意两条服务器记录的合并,也不适用于迁移到完全不同的硬件主机。

## OAuth 设置

ServerBee 支持通过 OAuth 第三方登录,目前支持以下提供商:
Expand Down
3 changes: 3 additions & 0 deletions apps/docs/content/docs/en/api-reference.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,9 @@ API keys use the format `serverbee_` prefix + 43-character random string. The ke
| POST/PUT/DELETE | `/api/servers/*` | Server management |
| PUT | `/api/servers/batch-capabilities` | Batch update capabilities |
| POST | `/api/servers/{id}/upgrade` | Trigger agent upgrade |
| GET | `/api/servers/{target_id}/recovery-candidates` | List recommended recovery candidates |
| GET | `/api/servers/recovery-jobs/{job_id}` | Get recovery job details |
| POST | `/api/servers/{target_id}/recover-merge` | Start an agent recovery job |
| CRUD | `/api/server-groups/*` | Server group management |
| CRUD | `/api/notifications/*` | Notification channel management |
| CRUD | `/api/notification-groups/*` | Notification group management |
Expand Down
13 changes: 13 additions & 0 deletions apps/docs/content/docs/en/server.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,19 @@ The full key is printed to the logs on first startup and can also be viewed or r

To reduce duplicate placeholder servers, agents reuse the existing server row when they re-register with the same machine fingerprint. You can also set `auth.max_servers` to soft-cap new auto-registered servers, and use **Clean up unconnected** on the Servers page to remove offline placeholders that never finished initialization.

## Recovering a Reinstalled Agent

If an existing server was reinstalled and then re-registered as a new temporary online node, you can recover it from the original offline server detail page:

1. Open the original offline server.
2. Click **Recover Agent**.
3. Choose the recommended online replacement candidate.
4. Start the recovery job.

The original server record is kept. The replacement agent is asked to rebind onto the original server identity, and the recovery flow continues from there.

Recovery is designed for reinstalling the same logical machine. It is not intended for arbitrary record merges or hardware migrations to a different host.

## GeoIP Setup

To enable geographic location detection for your agents:
Expand Down
Loading
Loading