把偏好库和文风库做成可提交的种子,方便数据丢了还能合并恢复。

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-09-30 12:00:12 +08:00
co-authored by Cursor
parent 832f8e4962
commit a11c460223
7 changed files with 252 additions and 1 deletions
+18
View File
@@ -0,0 +1,18 @@
# 库种子(git 备份)
本目录保存偏好库、文风库的可提交种子,便于数据丢失后恢复。
- `preferences.json` / `style-packs.json`:与用户目录中同名文件同形(`version: 1` + `entries`)。
- 运行时库仍在用户数据目录;本目录只作仓库备份与恢复源。
恢复(合并写入,不覆盖已有同 id 正文):
```bash
npx tsx src/cli/restore-library-seeds.ts
```
导出当前用户库到本目录(覆盖种子文件,便于更新 git 备份):
```bash
npx tsx src/cli/restore-library-seeds.ts --export
```
+19
View File
@@ -0,0 +1,19 @@
{
"version": 1,
"entries": [
{
"id": "starter-no-user-ntr-victim",
"content": "用户代入角色不做被 NTR 的一方(恋人/伴侣与第三者发生性或背叛性感情,用户角色受害或被欺瞒)。用户角色 NTR 别人不受此限。",
"status": "active",
"createdAt": "2026-01-01T00:00:00.000Z",
"updatedAt": "2026-01-01T00:00:00.000Z"
},
{
"id": "starter-default-male-hetero-yuri-ok",
"content": "禁止对男同性恋内容的直接描写,减少或忽略间接描写。默认用户角色为男性,情爱与性吸引朝向女性;女同性恋内容可写。",
"status": "active",
"createdAt": "2026-01-01T00:00:00.000Z",
"updatedAt": "2026-01-01T00:00:00.000Z"
}
]
}
+4
View File
@@ -0,0 +1,4 @@
{
"version": 1,
"entries": []
}