Skip to content

Commit f024ea2

Browse files
authored
Merge pull request #276 from Rabithua/develop
Release: merge develop into main
2 parents d32a139 + 8773588 commit f024ea2

141 files changed

Lines changed: 13341 additions & 2359 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ jobs:
2929

3030
- name: Install dependencies
3131
working-directory: ${{ matrix.path }}
32-
run: bun install
32+
run: bun install --frozen-lockfile
3333

3434
- name: Run ESLint
3535
working-directory: ${{ matrix.path }}

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ yarn.lock
2020
pnpm-lock.yaml
2121
bun.lockb
2222
bun.lock
23+
!server/bun.lock
24+
!web/bun.lock
2325
.idea
2426
.vscode
2527
.cursor

doc/README.zh.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ iOS App 支持连接到你自部署的后端。
108108

109109
AI 记忆是可选能力,默认关闭。它已经可以在 `develop` 镜像中使用,并会在包含 AI 记忆的下一个稳定版发布后进入稳定镜像。管理员可以在 `管理 -> AI 相关` 配置对话模型和向量模型后启用。Rote 支持 OpenAI-compatible 供应商,包括 OpenAI、OpenRouter、Ollama / LM Studio、DeepSeek、SiliconFlow、DashScope / Qwen、Zhipu GLM、Moonshot / Kimi、Volcengine Ark、Tencent Hunyuan、Baidu Qianfan,以及自定义 OpenAI-compatible 接口。
110110

111-
只有已登录且邮箱已验证的用户可以使用 AI 功能。AI 对话只保存在当前浏览器会话中,不会持久化写入数据库。只有在管理员开启 AI 向量存储和自动索引后,笔记与文章才会进入向量索引。
111+
只有已登录且已认证的用户可以使用 AI 功能。AI 对话只保存在当前浏览器会话中,不会持久化写入数据库。只有在管理员开启 AI 向量存储和自动索引后,笔记与文章才会进入向量索引。
112112

113113
### 详细说明
114114

doc/userguide/API-ENDPOINTS.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,8 @@ AI 与向量存储默认关闭,需要管理员在后台配置供应商并显
215215
| `/admin/users` | GET | 管理员 | 用户列表(分页/筛选/搜索) |
216216
| `/admin/users/:userId` | GET | 管理员 | 用户详情 |
217217
| `/admin/users/:userId/role` | PUT | 超级管理员 | 更新用户角色 |
218-
| `/admin/users/:userId/verify-email` | PUT | 管理员 | 验证用户邮箱 |
218+
| `/admin/users/:userId/certification` | PUT | 管理员 | 认证用户 |
219+
| `/admin/users/:userId/certification` | DELETE | 管理员 | 取消用户认证 |
219220
| `/admin/users/:userId` | DELETE | 超级管理员 | 删除用户 |
220221
| `/admin/roles/stats` | GET | 管理员 | 角色统计 |
221222

doc/userguide/API-KEY-GUIDE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -386,7 +386,7 @@ When generating or updating an API Key, you can specify which permissions it sho
386386
"data": {
387387
"id": "user_id",
388388
"email": "user@example.com",
389-
"emailVerified": true,
389+
"certified": true,
390390
"username": "username",
391391
"nickname": "User Nickname",
392392
"description": "User description",

doc/userguide/ARTICLE-API.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
- **authorId**: 作者 ID(UUID 格式)
1616
- **createdAt**: 创建时间(ISO 8601 格式)
1717
- **updatedAt**: 更新时间(ISO 8601 格式)
18-
- **author**: 作者信息对象(包含 `username``nickname``avatar``emailVerified`
18+
- **author**: 作者信息对象(包含 `username``nickname``avatar``certified`
1919
- **title**: 从 Markdown 内容解析的标题(计算字段,取第一个 `#` 标题)
2020
- **summary**: 从 Markdown 内容解析的摘要(计算字段)
2121

@@ -156,7 +156,7 @@ curl -X GET 'https://your-domain.com/v2/api/articles/<ARTICLE_ID>' \
156156
"username": "demo",
157157
"nickname": "演示用户",
158158
"avatar": "https://example.com/avatar.jpg",
159-
"emailVerified": true
159+
"certified": true
160160
}
161161
}
162162
}
@@ -295,7 +295,7 @@ curl -X GET 'https://your-domain.com/v2/api/articles/by-note/<NOTE_ID>'
295295
"username": "demo",
296296
"nickname": "演示用户",
297297
"avatar": "https://example.com/avatar.jpg",
298-
"emailVerified": true
298+
"certified": true
299299
}
300300
}
301301
}
@@ -380,7 +380,7 @@ curl -X POST 'https://your-domain.com/v2/api/articles/refs/<NOTE_ID>' \
380380
"username": "demo",
381381
"nickname": "演示用户",
382382
"avatar": "https://example.com/avatar.jpg",
383-
"emailVerified": true
383+
"certified": true
384384
}
385385
}
386386
}

doc/userguide/LOCAL-AI.zh.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ Rote 支持让已登录用户在自己的电脑上运行模型。模型请求由
77
- 访客不能进入 AI 页面。
88
- 所有已登录用户都可以使用本地模型进行普通对话。
99
- 只有满足站点原有 AI 使用条件的用户,才能让本地模型检索自己的 Rote 数据:
10-
- 邮箱已验证
10+
- 用户已认证
1111
- 管理员已启用 AI 与向量能力;
1212
- 笔记已经完成向量索引。
1313
- 本地模型配置与桥接器 Token 仅保存在当前浏览器设备。
@@ -22,12 +22,11 @@ llama-server \
2222
--alias gemma-4-12b-it-local \
2323
--host 127.0.0.1 \
2424
--port 8080 \
25-
--ctx-size 8192 \
2625
--jinja \
2726
-ngl 99
2827
```
2928

30-
16GB 内存设备如果出现内存压力,可以把 `--ctx-size` 调低至 `4096`
29+
如果需要限制上下文或 16GB 内存设备出现内存压力,可以手动添加 `--ctx-size 4096`
3130

3231
## 2. 启动本地桥接器
3332

doc/userguide/ROTE-API.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
- **createdAt**: 创建时间(ISO 8601 格式)
2424
- **updatedAt**: 更新时间(ISO 8601 格式)
2525
- **attachmentIds**: 附件 ID 数组(可选,创建/更新时使用)
26-
- **author**: 作者信息对象(包含 `username``nickname``avatar``emailVerified`
26+
- **author**: 作者信息对象(包含 `username``nickname``avatar``certified`
2727
- **attachments**: 附件数组,每个附件包含:
2828
- `id`: 附件 ID(UUID 格式)
2929
- `url`: 附件原始 URL
@@ -144,7 +144,7 @@ curl -X POST 'https://your-domain.com/v2/api/notes/' \
144144
"username": "demo",
145145
"nickname": "演示用户",
146146
"avatar": "https://example.com/avatar.jpg",
147-
"emailVerified": true
147+
"certified": true
148148
},
149149
"attachments": [],
150150
"reactions": [],
@@ -269,7 +269,7 @@ curl -X GET 'https://your-domain.com/v2/api/notes/<NOTE_ID>' \
269269
"username": "demo",
270270
"nickname": "演示用户",
271271
"avatar": "https://example.com/avatar.jpg",
272-
"emailVerified": true
272+
"certified": true
273273
},
274274
"attachments": [
275275
{
@@ -487,7 +487,7 @@ curl -X PUT 'https://your-domain.com/v2/api/notes/<NOTE_ID>' \
487487
"username": "demo",
488488
"nickname": "演示用户",
489489
"avatar": "https://example.com/avatar.jpg",
490-
"emailVerified": true
490+
"certified": true
491491
},
492492
"attachments": [],
493493
"reactions": [],
@@ -579,7 +579,7 @@ curl -X GET 'https://your-domain.com/v2/api/notes/random' \
579579
"username": "demo",
580580
"nickname": "演示用户",
581581
"avatar": "https://example.com/avatar.jpg",
582-
"emailVerified": true
582+
"certified": true
583583
},
584584
"attachments": [],
585585
"reactions": [],

doc/userguide/SITE-API.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,7 @@ curl -X GET 'https://your-domain.com/v2/api/site/config-status'
268268

269269
---
270270

271-
### 探索页可见性与邮箱验证策略说明
271+
### 探索页可见性与用户认证策略说明
272272

273273
探索页中公开笔记的展示,除了依赖笔记本身为 `public` 状态外,还受到以下两个配置的共同影响:
274274

@@ -277,8 +277,8 @@ curl -X GET 'https://your-domain.com/v2/api/site/config-status'
277277
- 当为 `false` 时,用户的公开笔记不会出现在「探索」页推荐中,但仍可以通过直接链接访问。
278278

279279
- **系统级安全配置**(仅管理员可在管理后台 / Admin API 中配置)
280-
- `security.requireVerifiedEmailForExplore`: boolean
281-
- 当为 `true` 时,只有**邮箱已验证** (`emailVerified = true`) 且 `allowExplore !== false` 的用户,其公开笔记才会被纳入探索页候选集合。
280+
- `security.requireCertifiedUserForExplore`: boolean
281+
- 当为 `true` 时,只有**已认证** (`certified = true`) 且 `allowExplore !== false` 的用户,其公开笔记才会被纳入探索页候选集合。
282282
- 当为 `false` 时,只要 `allowExplore !== false`,公开笔记即可参与探索页展示。
283283

284284
实现层面,探索页相关接口在数据库查询阶段就会同时考虑上述两个条件进行过滤,从而保证:

doc/userguide/USER-API.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,14 +38,14 @@ curl -X GET 'https://your-domain.com/v2/api/users/demo'
3838
"cover": "https://example.com/cover.jpg",
3939
"description": "用户简介",
4040
"createdAt": "2024-01-01T00:00:00.000Z",
41-
"emailVerified": true
41+
"certified": true
4242
}
4343
}
4444
```
4545

4646
字段说明:
4747

48-
- `emailVerified`: boolean - 用户邮箱是否已完成验证(供前端显示认证状态使用)
48+
- `certified`: boolean - 用户是否已认证(供前端显示认证状态使用)
4949

5050
可能的错误:
5151

@@ -74,7 +74,7 @@ curl -X GET 'https://your-domain.com/v2/api/users/me/profile' \
7474
"message": "success",
7575
"data": {
7676
"id": "uuid",
77-
"emailVerified": true,
77+
"certified": true,
7878
"email": "demo@example.com",
7979
"username": "demo",
8080
"nickname": "Demo",
@@ -93,7 +93,7 @@ curl -X GET 'https://your-domain.com/v2/api/users/me/profile' \
9393

9494
字段补充说明:
9595

96-
- `emailVerified`: boolean - 当前用户邮箱是否已完成验证(供前端提示与安全策略使用)
96+
- `certified`: boolean - 当前用户是否已认证(供前端提示与安全策略使用)
9797
- `allowExplore`: boolean - 是否允许该用户的公开笔记出现在「探索」页(见下文用户设置接口)
9898
- `authProvider`: string - 认证提供商,可能的值:
9999
- `'local'`: 本地账户(通过用户名密码注册/登录)
@@ -430,7 +430,7 @@ Content-Disposition: attachment; filename=demo-2024-01-01-12-00-00.json
430430
"username": "demo",
431431
"nickname": "Demo",
432432
"avatar": "https://example.com/avatar.jpg",
433-
"emailVerified": true
433+
"certified": true
434434
},
435435
"attachments": [],
436436
"reactions": []

0 commit comments

Comments
 (0)