luckytri 1.0.0 → 1.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (139) hide show
  1. package/.github/SECURITY.md +4 -4
  2. package/README.en.md +252 -250
  3. package/README.md +252 -250
  4. package/bin/luckytri.js +5 -1
  5. package/docs/en/CHANGELOG.md +8 -0
  6. package/docs/en/connect.md +18 -18
  7. package/docs/en/guide.md +202 -216
  8. package/docs/en/npm-release.md +25 -25
  9. package/docs/zh/CHANGELOG.md +8 -0
  10. package/docs/zh/connect.md +17 -17
  11. package/docs/zh/guide.md +202 -216
  12. package/docs/zh/npm-release.md +33 -33
  13. package/package.json +110 -108
  14. package/plugins/sdk/index.d.ts +155 -155
  15. package/plugins/sdk/testing.js +58 -58
  16. package/plugins/weather/index.js +82 -82
  17. package/plugins/weather/luckytri-plugin.json +29 -29
  18. package/public/app/assets/ChatsPage-BhlJHseG.js +3 -0
  19. package/public/app/assets/Empty-DP6WMGHi.js +2 -0
  20. package/public/app/assets/Field-CtbdqaiB.js +1 -0
  21. package/public/app/assets/HeartPage-32BeTPn2.js +1 -0
  22. package/public/app/assets/LifePage-CxSm0XKI.js +1 -0
  23. package/public/app/assets/MemoryPage-BeKBcPCY.js +1 -0
  24. package/public/app/assets/NaturePage-NEPYl2HS.js +3 -0
  25. package/public/app/assets/PeoplePage-DxtpekwM.js +1 -0
  26. package/public/app/assets/PluginsPage-CVVQwEBI.css +1 -0
  27. package/public/app/assets/PluginsPage-DksEZbUU.js +2 -0
  28. package/public/app/assets/{SystemPage-CAMPoYqM.css → SystemPage-BkRu0Rvx.css} +1 -1
  29. package/public/app/assets/SystemPage-BvzJlHuY.js +1 -0
  30. package/public/app/assets/TimePage-7-awH5XL.js +3 -0
  31. package/public/app/assets/index-4rItIkD-.js +4 -0
  32. package/public/app/assets/{index-YDz1ree1.css → index-DY4e15Kh.css} +1 -1
  33. package/public/app/assets/{knowledge-DG0e0uKw.js → knowledge-C6_HvoyB.js} +1 -1
  34. package/public/app/assets/media-SMfTT-yc.js +1 -0
  35. package/public/app/index.html +3 -3
  36. package/public/guide.en.html +72 -99
  37. package/public/guide.html +44 -86
  38. package/public/tutorial.en.md +25 -39
  39. package/public/tutorial.md +25 -39
  40. package/scripts/backup.js +311 -311
  41. package/scripts/browser.js +41 -41
  42. package/scripts/import-data.js +128 -0
  43. package/scripts/launch.js +101 -94
  44. package/scripts/plugin.js +150 -150
  45. package/scripts/reset-password.js +22 -0
  46. package/scripts/runtime.js +25 -25
  47. package/scripts/service.js +56 -47
  48. package/scripts/setup.js +50 -50
  49. package/scripts/start-server.js +41 -41
  50. package/scripts/stop.js +36 -36
  51. package/server/app.js +112 -96
  52. package/server/auth.js +217 -0
  53. package/server/channels/contract.js +57 -57
  54. package/server/channels/hub.js +165 -165
  55. package/server/channels/index.js +28 -25
  56. package/server/channels/onebot/index.js +335 -336
  57. package/server/channels/onebot/token.js +22 -3
  58. package/server/core/capabilities.js +208 -208
  59. package/server/core/events.js +64 -60
  60. package/server/core/image-preprocessor.js +208 -208
  61. package/server/core/model-manager.js +1213 -1213
  62. package/server/core/net-guard.js +49 -49
  63. package/server/core/orchestrator.js +569 -569
  64. package/server/core/perceivers.js +91 -91
  65. package/server/core/persona-manager.js +243 -243
  66. package/server/core/repository.js +293 -293
  67. package/server/core/response-validator.js +508 -508
  68. package/server/core/turn-processor.js +630 -630
  69. package/server/core/turn.js +236 -236
  70. package/server/core/vision-manager.js +633 -633
  71. package/server/i18n/errors.js +548 -497
  72. package/server/i18n/labels.js +649 -653
  73. package/server/index.js +151 -102
  74. package/server/knowledge/manager.js +386 -386
  75. package/server/knowledge/schema.js +12 -8
  76. package/server/local-access.js +32 -0
  77. package/server/mind/anticipations.js +507 -507
  78. package/server/mind/api.js +703 -703
  79. package/server/mind/budget.js +152 -152
  80. package/server/mind/context-selection.js +61 -61
  81. package/server/mind/day-planner.js +324 -324
  82. package/server/mind/evidence.js +148 -148
  83. package/server/mind/index.js +445 -445
  84. package/server/mind/life/diary.js +786 -786
  85. package/server/mind/life/index.js +1049 -1049
  86. package/server/mind/observations.js +84 -84
  87. package/server/mind/own-day.js +324 -324
  88. package/server/mind/own-voice.js +318 -318
  89. package/server/mind/senses.js +53 -53
  90. package/server/mind/time/activity-clock.js +196 -196
  91. package/server/mind/time/availability.js +69 -69
  92. package/server/mind/time/commitment-review.js +198 -198
  93. package/server/mind/time/executor.js +512 -512
  94. package/server/mind/time/experiences.js +128 -128
  95. package/server/mind/time/games.js +562 -562
  96. package/server/mind/time/index.js +739 -739
  97. package/server/mind/time/intent.js +166 -166
  98. package/server/mind/time/kinds.js +171 -171
  99. package/server/mind/time/plugin-activity.js +207 -207
  100. package/server/mind/time/tasks.js +587 -587
  101. package/server/mind/util.js +110 -110
  102. package/server/mind/view.js +273 -273
  103. package/server/paths.js +102 -102
  104. package/server/plugins/api.js +204 -204
  105. package/server/plugins/host.js +967 -967
  106. package/server/plugins/install.js +295 -295
  107. package/server/plugins/manifest.js +201 -201
  108. package/server/plugins/permissions.js +42 -42
  109. package/server/plugins/runner/guard.mjs +36 -36
  110. package/server/plugins/runner/worker.mjs +250 -250
  111. package/server/plugins/schema.js +91 -91
  112. package/server/plugins/zip.js +112 -112
  113. package/server/startup-lock.js +118 -118
  114. package/server/storage/archive.js +242 -241
  115. package/server/storage/backup-cleanup-worker.js +8 -8
  116. package/server/storage/backup-cleanup.js +415 -414
  117. package/server/storage/backup-lock.js +76 -76
  118. package/server/storage/backup-scheduler.js +131 -131
  119. package/server/storage/data-package.js +298 -0
  120. package/server/storage/data-transfer-api.js +50 -0
  121. package/server/storage/data-transfer-worker.js +18 -0
  122. package/server/storage/data-transfer.js +415 -0
  123. package/server/storage/store.js +202 -199
  124. package/server/studio/readiness.js +181 -190
  125. package/server/studio/settings.js +236 -236
  126. package/public/app/assets/ChatsPage-C-FcRapR.js +0 -3
  127. package/public/app/assets/Empty-CpP5kQHH.js +0 -2
  128. package/public/app/assets/Field-D4gY-INU.js +0 -1
  129. package/public/app/assets/HeartPage-CPy_thQd.js +0 -1
  130. package/public/app/assets/LifePage-CxWvwmSf.js +0 -1
  131. package/public/app/assets/MemoryPage-DC4rhQ68.js +0 -1
  132. package/public/app/assets/NaturePage-IvYw04Zq.js +0 -3
  133. package/public/app/assets/PeoplePage-Cqefm9-q.js +0 -1
  134. package/public/app/assets/PluginsPage-DKSaKvXb.js +0 -2
  135. package/public/app/assets/PluginsPage-HyBe5D8w.css +0 -1
  136. package/public/app/assets/SystemPage-CJmtJkrK.js +0 -1
  137. package/public/app/assets/TimePage-Cw44inM4.js +0 -3
  138. package/public/app/assets/index-BheRW-1t.js +0 -4
  139. package/public/app/assets/media-BzPDBm7e.js +0 -1
@@ -1,497 +1,548 @@
1
- // English for the messages the API returns as `error`. The Chinese text is the
2
- // key, exactly as the code writes it. `{0}` stands for a value the code puts
3
- // into the message; patterns are used when a message carries one.
4
- export const ERRORS = {
5
- "LUCKYTRI_HOME / --home 必须是绝对路径 (must be an absolute path)":
6
- "LUCKYTRI_HOME / --home must be an absolute path",
7
- "用户数据不能存放在 npm 安装目录内 (user data cannot live inside the npm package)":
8
- "User data cannot live inside the npm package",
9
- // app.js
10
- 不允许跨站访问: "Cross-site access is not allowed",
11
- 请输入管理令牌: "Enter the admin token",
12
- "请提交 JSON 对象": "Submit a JSON object",
13
- 请求内容过大: "The request is too large",
14
- "JSON 格式无效": "The JSON is invalid",
15
- "请求失败,请检查输入或服务日志":
16
- "The request failed. Check the input or the service log.",
17
- 备份整理不可用: "Backup cleanup is unavailable",
18
- "清理规则无效:保留天数为 1–3650,完整备份数量为 0–100":
19
- "Invalid cleanup rules: retain full backups for 1–3650 days and up to 0–100 copies",
20
- 选择的备份信息无效: "The selected backup details are invalid",
21
- "备份已变化或属于必须保留的恢复点,请刷新列表":
22
- "A backup changed or is a protected restore point. Refresh the list.",
23
- 清理方式无效: "Invalid cleanup mode",
24
- 不能重复选择同一份备份: "The same backup cannot be selected twice",
25
- "缺少同一实例近 72 小时内可校验的自动备份,已停止清理":
26
- "No verifiable automatic backup of this instance from the last 72 hours is available. Cleanup stopped.",
27
- "备份目录正在被使用,请稍后再试":
28
- "The backup folder is in use. Try again later.",
29
- 备份文件已变化或不可删除: "The backup changed or cannot be removed",
30
- "部分备份未清理,请刷新列表后重试":
31
- "Some backups were not removed. Refresh the list and try again.",
32
- "备份在清理期间发生变化,已停止后续清理":
33
- "A backup changed during cleanup. The remaining cleanup stopped.",
34
- "备份或清理正在进行,请稍后再试":
35
- "A backup or cleanup is running. Try again later.",
36
- "请先选择要清理的备份,单次最多 100 份":
37
- "Select backups to remove, up to 100 at a time",
38
-
39
- // channels
40
- "这个会话属于另一种 QQ 接入方式,当前不能向它发送":
41
- "This session belongs to the other QQ connection method and cannot be sent to right now",
42
- 这个会话的通道没有接上: "The channel for this session is not connected",
43
- 这个通道不能接上: "This channel cannot be connected",
44
- "QQ 尚未连接": "QQ is not connected yet",
45
- "QQ 连接已断开": "The QQ connection was lost",
46
- "无法连接 QQ 开放平台": "Could not reach the QQ Open Platform",
47
- "QQ 开放平台没有找到鉴权接口":
48
- "The QQ Open Platform has no authentication endpoint",
49
- "无法获取 AccessToken": "Could not get an AccessToken",
50
- "尚未填写 AppID 和 AppSecret":
51
- "AppID and AppSecret have not been entered yet",
52
- "QQ 开放平台没有返回网关地址":
53
- "The QQ Open Platform returned no gateway address",
54
- "QQ 官方机器人尚未连接": "The QQ official bot is not connected yet",
55
- "这个会话不属于当前连接的 QQ 官方机器人":
56
- "This session does not belong to the QQ official bot that is connected",
57
- 会话身份不完整: "The session identity is incomplete",
58
- "会话 ID 无效": "The session ID is invalid",
59
-
60
- // core/api.js
61
- 会话不存在: "The session does not exist",
62
- 归档开关无效: "The archive switch is invalid",
63
- 没有要修改的内容: "Nothing to change",
64
- "请先移出面板,再永久删除会话":
65
- "Remove it from the panel first, then delete the session for good",
66
- "模型档案数量应为 0–30": "The number of model profiles must be 0–30",
67
- "模型 ID 重复": "Duplicate model ID",
68
- 模型档案不存在: "The model profile does not exist",
69
- 版本无效: "The version is invalid",
70
- 版本不存在: "The version does not exist",
71
- "近期原文条数应在 10–500 之间":
72
- "Recent raw messages must be between 10 and 500",
73
- 上下文压缩开关无效: "The context compression switch is invalid",
74
- 最大聚合时间不能小于基础窗口:
75
- "The maximum batching time cannot be shorter than the base window",
76
- 节能看图开关无效: "The image-saving switch is invalid",
77
- 开关无效: "The switch is invalid",
78
- 视觉兼容模型必须开启视觉能力:
79
- "A vision-compatible model must have vision turned on",
80
- 备用模型无效: "The backup model is invalid",
81
- 请从模型库中选择具体的备用模型:
82
- "Pick a specific backup model from the model library",
83
- 备用模型不能和主模型相同:
84
- "The backup model cannot be the same as the main model",
85
- 日志不存在: "The log does not exist",
86
- 已有回放正在运行: "A replay is already running",
87
- 回放消息序号范围无效: "The replay message range is invalid",
88
- "请选择 1–100 条人类消息": "Choose 1–100 human messages",
89
- 请先开启模拟模式: "Turn on simulation mode first",
90
- "请选择会话并输入消息和有效的用户 ID":
91
- "Choose a session and enter a message and a valid user ID",
92
-
93
- // core
94
- "输入预算太小,无法容纳语境与人格":
95
- "The input budget is too small to hold the context and persona",
96
- "当前消息批次和引用链超过预算,请增加模型输入预算":
97
- "The current message batch and quote chain exceed the budget. Raise the model input budget.",
98
- 语境摘要格式无效: "The context summary format is invalid",
99
- "API 地址无效": "The API URL is invalid",
100
- 模型名称必填: "The model name is required",
101
- "模型尚未配置 API Key": "The model has no API key yet",
102
- 输入与输出预算之和不能超过上下文窗口:
103
- "Input plus output budget cannot exceed the context window",
104
- 采样参数无效: "The sampling parameters are invalid",
105
- "模型输出被截断,请增加输出预算":
106
- "The model output was cut off. Raise the output budget.",
107
- 向量接口返回数量与输入不一致:
108
- "The vector API returned a different count than the input",
109
- 向量接口返回重复或无效的输入编号:
110
- "The vector API returned duplicate or invalid input indexes",
111
- "向量接口未返回 embedding": "The vector API returned no embedding",
112
- 向量接口返回无效数值: "The vector API returned invalid numbers",
113
- "请先在「系统 → 连接 QQ」填写 AppID":
114
- "Enter the AppID under System → Connect QQ first",
115
- "请填写有效的群 openid / 用户 openid 和名称":
116
- "Enter a valid group openid / user openid and a name",
117
- "请填写有效的群号/QQ号和名称":
118
- "Enter a valid group number / QQ number and a name",
119
- 会话名称无效: "The session name is invalid",
120
- "回合输出不是 JSON 对象": "The turn output is not a JSON object",
121
- "回合输出缺少 choice": "The turn output has no choice",
122
-
123
- // model calls (shown in the call log)
124
- "当前批次、引用与人格超过模型输入预算,请增加 Max Input Tokens":
125
- "The current batch, quotes and persona exceed the model's input budget. Raise Max Input Tokens.",
126
- "模型 API HTTP 402:账户余额或额度不足,请在供应商后台检查或切换模型":
127
- "Model API HTTP 402: the account balance or quota is not enough. Check the provider's console or switch models.",
128
- "临时网络连接中断,等待后重试":
129
- "The network connection dropped briefly; waiting to retry",
130
- "尚未配置模型,请先在模型库中添加":
131
- "No model is configured yet. Add one in the model library first.",
132
- 所选模型档案不存在: "The chosen model profile does not exist",
133
- "服务返回空正文,重试一次":
134
- "The service returned an empty body; retrying once",
135
- "输出达到本阶段上限,放宽到模型输出上限重试一次":
136
- "The output hit this stage's limit; retrying once with the model's full output limit",
137
- 错误: "error",
138
-
139
- // vision
140
- 图片地址不可访问: "The image address cannot be reached",
141
- 图片下载失败: "The image download failed",
142
- 图片超过大小限制: "The image is over the size limit",
143
- 图片像素超过处理限制: "The image has too many pixels to process",
144
- 图片处理超时: "Image processing timed out",
145
- "QQ 图片读取超时": "QQ image retrieval timed out",
146
- 图片下载超时: "The image download timed out",
147
- 图片跳转无效: "The image redirect is invalid",
148
- 图片跳转过多: "Too many image redirects",
149
- 图片读取失败: "The image could not be read",
150
- 本地图片不存在: "The local image does not exist",
151
- 本地图片无法读取: "The local image could not be read",
152
- 不是支持的图片格式: "This image format is not supported",
153
-
154
- // database-archive.js
155
- "数据库来自更新版本,请先升级 LuckyTri;未修改数据":
156
- "The database comes from a newer version. Upgrade LuckyTri first; nothing was changed.",
157
- 数据库完整性检查失败: "The database integrity check failed",
158
- 数据库引用检查失败: "The database reference check failed",
159
- "这不是 LuckyTri 数据库": "This is not a LuckyTri database",
160
- 备份校验清单不匹配: "The backup checksum list does not match",
161
- "恢复目标或伴随文件已存在,请选一个新文件;未覆盖任何数据":
162
- "The restore target or its companion file already exists. Choose a new file; nothing was overwritten.",
163
- 恢复目标已被其他进程创建: "The restore target was created by another process",
164
- "数据库版本较新,请升级 LuckyTri;未修改数据":
165
- "The database version is newer. Upgrade LuckyTri; nothing was changed.",
166
- "绑定外网地址前必须设置 ADMIN_TOKEN":
167
- "ADMIN_TOKEN must be set before binding to a public address",
168
-
169
- // knowledge
170
- 知识向量未启用: "Knowledge vectors are not enabled",
171
- "请选择会话、用户 ID 并填写记忆":
172
- "Choose a session and user ID, and enter the memory",
173
- 请选择会话: "Choose a session",
174
- 记忆内容无效: "The memory content is invalid",
175
- 记忆状态无效: "The memory state is invalid",
176
- "置信度与重要性应在0–1": "Confidence and importance must be 0–1",
177
- 过期时间无效: "The expiry time is invalid",
178
- 锁定状态无效: "The lock state is invalid",
179
- 选择两条记忆并输入合并内容: "Choose two memories and enter the merged text",
180
- 只能合并同范围同用户的未锁定记忆:
181
- "Only unlocked memories of the same scope and user can be merged",
182
- "请输入 1–4000 字检索内容": "Enter 1–4000 characters to search",
183
- 向量开关无效: "The vector switch is invalid",
184
- 密钥格式无效: "The key format is invalid",
185
- "向量 API 地址无效": "The vector API URL is invalid",
186
- 启用向量需要独立地址和模型名:
187
- "Enabling vectors needs a separate URL and model name",
188
- 向量数量与输入不一致: "The vector count does not match the input",
189
- 向量内容无效: "The vector content is invalid",
190
- 向量维度不一致: "The vector dimensions are inconsistent",
191
- 知识库名称无效: "The collection name is invalid",
192
- 知识库不存在: "The collection does not exist",
193
- "文档内容应为 1–400000 字": "The document must be 1–400000 characters",
194
- 文档切分后为空: "The document is empty after splitting",
195
- 文档没有可建立向量的段落: "The document has no passages to vectorize",
196
- 请先启用知识向量模型: "Enable the knowledge vector model first",
197
- "文档已变化,请重新建立向量": "The document changed. Rebuild its vectors.",
198
- 文档不存在: "The document does not exist",
199
-
200
- // plugins
201
- 插件不存在: "The plugin does not exist",
202
- 还有权限没有同意: "Some permissions have not been accepted",
203
- 插件权限无效: "A plugin permission is invalid",
204
- 插件设置项无效: "A plugin setting is invalid",
205
- 插件入口无效: "The plugin entry is invalid",
206
- 插件没有在运行: "The plugin is not running",
207
- 插件消息过大: "The plugin message is too large",
208
- 插件请求超时: "The plugin request timed out",
209
- 未知的插件调用: "Unknown plugin call",
210
- 插件没有这个权限: "The plugin does not have this permission",
211
- 插件保存的内容过大: "What the plugin stored is too large",
212
- 这个地址不能访问: "This address cannot be reached",
213
- 这个网站不在插件的允许范围内: "This site is outside the plugin's allowlist",
214
- 跳转过多: "Too many redirects",
215
- 今天放到书架上的资料已经够多了: "Enough material was put on the shelf today",
216
- 资料内容过大或是空的: "The material is empty or too large",
217
- 插件没有声明这个活动: "The plugin did not declare this activity",
218
- 插件没有声明这个行动: "The plugin did not declare this action",
219
- 插件没有声明这种感知: "The plugin did not declare this perception",
220
- 插件没有声明这个通道: "The plugin did not declare this channel",
221
- 消息不完整: "The message is incomplete",
222
- 插件预算已经用完: "The plugin budget is used up",
223
- 插件接口无效: "The plugin route is invalid",
224
- 插件接口不存在: "The plugin route does not exist",
225
- 插件贡献的名字无效: "A name the plugin contributes is invalid",
226
- 插件清单无法读取: "The plugin manifest could not be read",
227
- 插件清单无效: "The plugin manifest is invalid",
228
- 插件标识无效: "The plugin id is invalid",
229
- 插件版本号无效: "The plugin version is invalid",
230
- "插件 API 版本不兼容": "The plugin API version is not compatible",
231
- "插件不支持这个 LuckyTri 版本":
232
- "The plugin does not support this version of LuckyTri",
233
- 插件网络主机无效: "A plugin network host is invalid",
234
- 压缩包无法读取: "The archive could not be read",
235
- 压缩包文件过多: "The archive has too many files",
236
- 压缩包不能加密: "The archive must not be encrypted",
237
- 压缩包格式不受支持: "This archive format is not supported",
238
- 压缩包不能包含链接: "The archive must not contain links",
239
- 压缩包路径无效: "An archive path is invalid",
240
- 压缩包内容不完整: "The archive contents are incomplete",
241
- 压缩包解压后过大: "The archive is too large when unpacked",
242
- 插件包下载失败: "The plugin package could not be downloaded",
243
- 插件包过大: "The plugin package is too large",
244
- 插件包校验不符: "The plugin package checksum does not match",
245
- 插件包和索引不一致: "The plugin package does not match the index",
246
- 这次导入已经过期: "This import has expired",
247
- 插件索引无效: "The plugin index is invalid",
248
- 插件仓库地址无效: "The plugin repository address is invalid",
249
- 没有可以退回的版本: "There is no earlier version to return to",
250
-
251
- // mind
252
- 类型无效: "The type is invalid",
253
- 内容无效: "The content is invalid",
254
- 缺少来源: "A source is missing",
255
- 日期无效: "The date is invalid",
256
- 日期不在合理范围: "The date is outside a sensible range",
257
- 与撤销过的内容相同: "Same as something already undone",
258
- 约定不存在: "The promise does not exist",
259
- "TA 还不认识这个人": "TA does not know this person yet",
260
- 在天性页修改: "Change it on the Nature page",
261
- "TA 正在想别的事": "TA is thinking about something else",
262
- 请选择要撤销的内容: "Choose what to undo",
263
- "请输入 1–1000 字的试聊内容": "Enter 1–1000 characters for the trial chat",
264
- "正在试聊,请稍等": "A trial chat is running. Please wait.",
265
- 试聊失败: "The trial chat failed",
266
- "每日 Token 上限无效": "The daily token limit is invalid",
267
- "预算份额应在 0–0.9": "Budget shares must be 0–0.9",
268
- "后台份额之和不能超过 95%":
269
- "Background shares cannot add up to more than 95%",
270
- 需要选定有效的开始时间: "A valid start time is needed",
271
- "需要选定 5 至 240 分钟的投入时间": "A time of 5 to 240 minutes is needed",
272
- "所选开始时间在睡眠安排中,需要重新选择":
273
- "The chosen start time falls in her sleep schedule; choose again",
274
- 安排包含无效内容: "The plan contains invalid content",
275
- 需要把行动内容想具体: "The action needs to be thought through",
276
- 行动无效: "The action is invalid",
277
- 没有等待同意的行动: "There is no action waiting for approval",
278
- 这件事已经过期: "This action has expired",
279
- 行动超时: "The action timed out",
280
- 感知类型无效: "The perception type is invalid",
281
- 感知超时: "Perception timed out",
282
- 这段经历不存在: "This experience does not exist",
283
- 活动类型无效: "The activity type is invalid",
284
- 不能覆盖内置的活动: "A built-in activity cannot be replaced",
285
- 需要自己选定要玩的游戏: "She needs to choose the game to play herself",
286
- 没有得到明确的时间安排: "No clear time plan was given",
287
- 空内容: "Empty content",
288
- 疑似凭据: "Looks like a credential",
289
- 不能把私下说法写进群里的面貌:
290
- "Private remarks cannot be written into a face used in a group",
291
- 来源不能带到这个会话: "The source cannot be carried into this session",
292
- 没有新的经历: "No new experience",
293
- 没有变化: "No change",
294
- 线索不存在: "The strand does not exist",
295
- 面貌版本不存在: "The face version does not exist",
296
- 关系变化不存在: "The relationship change does not exist",
297
- 相遇不存在: "The encounter does not exist",
298
- 不能撤销这类内容: "This kind of content cannot be undone",
299
- 日记格式无效: "The diary format is invalid",
300
- 回顾格式无效: "The reflection format is invalid",
301
- 未保存: "Not saved",
302
- 身份回看输出格式无效: "The self-review output format is invalid",
303
- 记忆不存在: "The memory does not exist",
304
- 允许复述时也必须允许想起:
305
- "If repeating is allowed, recalling must be allowed too",
306
- 授权到期时间无效: "The authorization expiry is invalid",
307
- 分寸标签无效: "The discretion label is invalid",
308
- "记忆已锁定,请先解锁": "The memory is locked. Unlock it first.",
309
- 请选择要删除的记忆: "Choose the memories to delete",
310
- "请选择 1–500 条记忆": "Choose 1–500 memories",
311
- "全选删除不需要传入记忆 ID": "Select-all deletion does not take memory IDs",
312
- 只能删除当前会话中存在的记忆:
313
- "Only memories that exist in the current session can be deleted",
314
- "只能删除当前会话的记忆,共享或继承记忆请单独管理":
315
- "Only this session's memories can be deleted; manage shared or inherited memories separately",
316
- "包含已锁定记忆,请先解锁后再删除":
317
- "Contains locked memories. Unlock them before deleting.",
318
- 记忆整理格式无效: "The memory sorting format is invalid",
319
- 名字无效: "The name is invalid",
320
- 性别无效: "The gender is invalid",
321
- 天性正文无效: "The nature text is invalid",
322
- 列表字段必须是文本列表: "List fields must be lists of text",
323
- "性格刻度应在 0–100": "Character scales must be 0–100",
324
- 表达字段无效: "The expression field is invalid",
325
- 作息时间无效: "The daily rhythm time is invalid",
326
- "天性只能改两次。用完之后,由 TA 自己从经历里生长。":
327
- "Nature can be changed only twice. After that, TA grows from her own experience.",
328
- 自己的安排格式无效: "Her own plan format is invalid",
329
- 愿望未保存: "The wish was not saved",
330
- "自己的念头含有无效来源或敏感内容,未保存":
331
- "Her thought has an invalid source or sensitive content and was not saved",
332
- "没有玩过的经历,不能写成她的样子":
333
- "What she has not played cannot be written into who she is",
334
- 来源不在本次经历中: "The source is not part of this experience",
335
- 线索不存在或已撤销: "The strand does not exist or was undone",
336
- 对不上她说过的话: "Does not match what she said",
337
- 手记不存在: "The note does not exist",
338
- 状态无效: "The status is invalid",
339
- "这条手记有后续修正,请隐藏以保留轨迹":
340
- "This note has later corrections. Hide it to keep the trail.",
341
- 搜索提供方无效: "The search provider is invalid",
342
- 作品不存在: "The work does not exist",
343
- "开始时间格式应为 YYYY-MM-DD HH:mm":
344
- "The start time must be in YYYY-MM-DD HH:mm format",
345
- 约定回看格式无效: "The promise review format is invalid",
346
- 活动成果格式无效: "The activity result format is invalid",
347
- 时间设置超出范围: "The time settings are out of range",
348
- "活动速度应在 1 至 2 之间": "Activity speed must be between 1 and 2",
349
- 任务已变化: "The task has changed",
350
- 完成需要实际成果: "Completing needs an actual result",
351
- 完成需要已提交的实际成果: "Completing needs a submitted result",
352
- 等待可用模型: "Waiting for an available model",
353
- 今日独处预算不足: "Not enough budget for time alone today",
354
- "实例已停止,资料结果未提交":
355
- "The instance stopped; the material result was not submitted",
356
- 搜索配置格式无效: "The search settings format is invalid",
357
- 搜索地址无效: "The search URL is invalid",
358
- 查询用途无效: "The query purpose is invalid",
359
- 查询只能包含资料主题: "A query may only contain the material topic",
360
- "搜索接口未返回有效 JSON,请核对提供方与完整搜索地址":
361
- "The search API did not return valid JSON. Check the provider and the full search URL.",
362
- "任务已经变化,资料结果未提交":
363
- "The task changed; the material result was not submitted",
364
- "正在测试搜索连接,请稍后":
365
- "A search connection test is running. Please try again shortly.",
366
- "正在推进活动步骤,请稍后测试":
367
- "An activity step is in progress. Test again shortly.",
368
- 只有真实完成稿可以交付: "Only a genuinely finished piece can be delivered",
369
- 正文包含其他会话的私下内容:
370
- "The text contains private content from another session",
371
- 作品来源不允许在此会话分享:
372
- "The work's source does not allow sharing in this session",
373
- 需要明确分享选择: "A clear sharing choice is needed",
374
- 成果整理格式无效: "The result-sorting format is invalid",
375
- 汇报涉及私下内容: "The report touches private content",
376
- 需要几句自然汇报: "A few natural sentences of report are needed",
377
- 汇报需要简短的一句一句说:
378
- "The report needs to be said in short, separate sentences",
379
- 汇报包含不适合公开的信息:
380
- "The report contains information not suitable to share",
381
- "请回看后整理,不要复制正文": "Review and rephrase it; do not copy the text",
382
- 没有可整理的任务: "No tasks to sort out",
383
- "任务目标或权限范围不同,不能合并":
384
- "Tasks with different goals or permission scopes cannot be merged",
385
- 已有成果的任务不能改成未执行:
386
- "A task that already has results cannot be reset to not run",
387
- 任务内容无效: "The task content is invalid",
388
- 缺少真实来源: "A real source is missing",
389
- 优先级无效: "The priority is invalid",
390
- "事项已变化,不能覆盖安排":
391
- "The item changed and the plan cannot be overwritten",
392
- 时间安排无效: "The time plan is invalid",
393
- "所选时间与已有安排重叠,需要重新选定":
394
- "The chosen time overlaps an existing plan; choose again",
395
- 事项已变化: "The item has changed",
396
- 任务不存在: "The task does not exist",
397
- "这条记录已合并,请调整唯一任务":
398
- "This record was merged; adjust the single task instead",
399
- 任务已经结束: "The task has already ended",
400
- 不能直接标记完成: "It cannot be marked done directly",
401
- "投入时间应为 5 至 240 分钟": "The time to spend must be 5 to 240 minutes",
402
- 任务租约已经改变: "The task lease has changed",
403
- 作品正文格式无效: "The work text format is invalid",
404
- "单篇过长,请接续新篇章": "This piece is too long; continue in a new piece",
405
- 活动草稿已不可用: "The activity draft is no longer available",
406
- 项目不存在: "The project does not exist",
407
- 建议类型无效: "The suggestion type is invalid",
408
- 不适合长期自述或含私下内容:
409
- "Not suitable as a lasting self-description, or contains private content",
410
- 缺少亲历来源: "A first-hand source is missing",
411
- 自述需要模型之外的新经历:
412
- "A self-description needs new experience beyond the model",
413
- 没有实质变化: "No substantial change",
414
- 没有新的亲历来源: "No new first-hand source",
415
- 未知性格维度: "Unknown character dimension",
416
- 没有方向: "No direction",
417
- 缺少可用的理由: "No usable reason was given",
418
- 性格变化需要模型之外的经历:
419
- "A character change needs experience beyond the model",
420
- 这段经历已经改变过它: "This experience has already changed it",
421
- "今天这项性格已经改变过,留些时间检验":
422
- "This trait already changed today; give it time to settle",
423
- 已到边界: "Already at the limit",
424
-
425
- // studio
426
- 反馈类型无效: "The feedback type is invalid",
427
- 只能评价已发送的回复: "Only replies that were sent can be rated",
428
- "模型 ID 无效": "The model ID is invalid",
429
- 找不到这个已保存的模型: "That saved model was not found",
430
- 连接测试正在进行: "A connection test is already running",
431
- "请先配置模型 API Key": "Set the model API key first",
432
- "接口已响应,但 JSON 输出不符合预期":
433
- "The API responded, but its JSON output was not as expected",
434
- 文本配置无效: "The text setting is invalid",
435
- 接入方式无效: "The connection method is invalid",
436
- "接入方式已由环境变量 LUCKYTRI_CHANNEL 固定":
437
- "The connection method is fixed by the LUCKYTRI_CHANNEL environment variable",
438
- "AppID 格式无效": "The AppID format is invalid",
439
- "AppSecret 格式无效": "The AppSecret format is invalid",
440
- 开关配置无效: "The switch setting is invalid",
441
- 数值配置超出范围: "A numeric setting is out of range",
442
- 模型服务商预设无效: "The model provider preset is invalid",
443
- 思考强度无效: "The thinking effort is invalid",
444
- 模型名称不能为空: "The model name cannot be empty",
445
- };
446
-
447
- // Messages that carry a value. `{0}`, `{1}` are filled with what the code put
448
- // in; the values are passed through the dictionaries again.
449
- export const ERROR_PATTERNS = [
450
- ["删除失败({0})", "Removal failed ({0})"],
451
- ["清理工作异常结束:{0}", "Cleanup ended unexpectedly: {0}"],
452
- ["{0} Prompt 无效", "{0} prompt is invalid"],
453
- ["模型请求失败 HTTP {0}:{1}", "The model request failed with HTTP {0}: {1}"],
454
- ["模型请求失败 HTTP {0}", "The model request failed with HTTP {0}"],
455
- [
456
- "模型响应超时({0} 秒内没有返回)",
457
- "The model did not respond within {0} seconds",
458
- ],
459
- [
460
- "模型服务网络连接失败({0},已自动重试)",
461
- "The connection to the model service failed ({0}); it was retried automatically",
462
- ],
463
- [
464
- "这个模型服务连续失败,已暂停请求,约 {0} 秒后自动恢复",
465
- "This model service failed repeatedly and is paused; it resumes automatically in about {0} seconds",
466
- ],
467
- [
468
- "主模型 {0} 请求失败({1}),这一步改用备用模型 {2}",
469
- "The main model {0} failed ({1}); this step uses the backup model {2}",
470
- ],
471
- [
472
- "模型服务暂时返回 HTTP {0},等待后重试",
473
- "The model service returned HTTP {0} for now; waiting to retry",
474
- ],
475
- [
476
- "模型输出不是有效 JSON,重试一次:{0}",
477
- "The model output was not valid JSON; retrying once: {0}",
478
- ],
479
- ["{0} 超出范围", "{0} is out of range"],
480
- ["{0} 必须是正整数", "{0} must be a positive integer"],
481
- ["{0} 必须是开关", "{0} must be a switch"],
482
- [
483
- "QQ 开放平台关闭了连接({0}),请检查机器人状态与权限",
484
- "The QQ Open Platform closed the connection ({0}). Check the bot's status and permissions.",
485
- ],
486
- ["向量接口失败 HTTP {0}", "The vector API failed with HTTP {0}"],
487
- ["图片下载失败 HTTP {0}", "The image download failed with HTTP {0}"],
488
- ["搜索接口 HTTP {0}:{1}", "Search API HTTP {0}: {1}"],
489
- [
490
- "这些设置已经不存在:{0}。名字和天性在「TA → 天性」里修改",
491
- "These settings no longer exist: {0}. Change the name and nature under TA → Nature.",
492
- ],
493
- [
494
- "搜索连接失败({0}),请检查网络和代理;代理状态改变后可重启实例",
495
- "The search connection failed ({0}). Check the network and proxy; restart the instance after the proxy changes.",
496
- ],
497
- ];
1
+ // English for the messages the API returns as `error`. The Chinese text is the
2
+ // key, exactly as the code writes it. `{0}` stands for a value the code puts
3
+ // into the message; patterns are used when a message carries one.
4
+ export const ERRORS = {
5
+ 数据清单过大: "The data manifest is too large",
6
+ 数据文件包含不支持的数据库结构:
7
+ "The file contains unsupported database structures",
8
+ "不是有效的 LuckyTri 数据文件": "This is not a valid LuckyTri data file",
9
+ 数据包已损坏: "The data package is damaged",
10
+ 当前实例不支持文件导入: "This instance does not support file imports",
11
+ "当前数据库仍在使用,请稍后导入":
12
+ "The database is still in use. Import it later.",
13
+ 请上传数据包或数据库文件: "Upload a data package or database file",
14
+ 数据任务不存在: "The data operation does not exist",
15
+ 数据处理失败: "Data processing failed",
16
+ "数据已导入,但自动重启未完成。请手动重新启动实例。":
17
+ "Data was imported, but the automatic restart did not complete. Restart the instance manually.",
18
+ "临时数据文件正在使用,请稍后再试":
19
+ "Temporary data files are in use. Try again later.",
20
+ "数据处理被中断,请重新操作":
21
+ "Data processing was interrupted. Start the operation again.",
22
+ "数据处理或备份正在进行,请稍后再试":
23
+ "Data processing or backup is in progress. Try again later.",
24
+ 当前实例不支持文件导入导出:
25
+ "This instance does not support file import and export",
26
+ 数据文件超过导入大小限制: "The data file exceeds the import size limit",
27
+ 数据文件为空: "The data file is empty",
28
+ 数据上传失败: "Data upload failed",
29
+ 导出文件尚未就绪或已过期: "The export is not ready or has expired",
30
+ "当前实例不支持自动导入,请使用恢复命令":
31
+ "Automatic import is unavailable. Use the recovery command.",
32
+ 导入数据尚未就绪或已过期: "The import is not ready or has expired",
33
+ "数据处理正在进行,请稍后再试":
34
+ "Data processing is in progress. Try again later.",
35
+ 磁盘空间不足: "There is not enough disk space",
36
+ 数据文件无法校验: "The data file could not be verified",
37
+ "导入未完成,原数据已保留。请重新上传或查看运行日志。":
38
+ "Import could not complete. The original data was retained. Upload again or check the runtime log.",
39
+ "导入启动未完成,未替换运行数据。请重新启动实例。":
40
+ "Import could not start. The running data was not replaced. Restart the instance.",
41
+ 请使用本机命令重置管理密码:
42
+ "Use the local CLI to reset the management password",
43
+ "LUCKYTRI_HOME / --home 必须是绝对路径 (must be an absolute path)":
44
+ "LUCKYTRI_HOME / --home must be an absolute path",
45
+ "用户数据不能存放在 npm 安装目录内 (user data cannot live inside the npm package)":
46
+ "User data cannot live inside the npm package",
47
+ // app.js
48
+ 不允许跨站访问: "Cross-site access is not allowed",
49
+ 请先登录管理台: "Sign in to the studio first",
50
+ "密码长度应为 8–256 个字符": "The password must contain 8–256 characters",
51
+ "尝试次数过多,请稍后再试": "Too many attempts. Please try again later.",
52
+ 首次设置密码请在本机打开管理台:
53
+ "Open the studio on this computer to set the first password",
54
+ "管理密码已设置,请登录":
55
+ "A management password is already set. Please sign in.",
56
+ 密码不正确: "Incorrect password",
57
+ 当前密码不正确: "The current password is incorrect",
58
+ "密码已变化,请重新登录": "The password changed. Please sign in again.",
59
+ 本机服务凭据必须是普通文件:
60
+ "The local service credential must be a regular file",
61
+ "本机服务凭据无效,请检查实例目录":
62
+ "The local service credential is invalid. Check the instance directory.",
63
+ "请提交 JSON 对象": "Submit a JSON object",
64
+ 请求内容过大: "The request is too large",
65
+ "JSON 格式无效": "The JSON is invalid",
66
+ "请求失败,请检查输入或服务日志":
67
+ "The request failed. Check the input or the service log.",
68
+ 备份整理不可用: "Backup cleanup is unavailable",
69
+ "清理规则无效:保留天数为 1–3650,完整备份数量为 0–100":
70
+ "Invalid cleanup rules: retain full backups for 1–3650 days and up to 0–100 copies",
71
+ 选择的备份信息无效: "The selected backup details are invalid",
72
+ "备份已变化或属于必须保留的恢复点,请刷新列表":
73
+ "A backup changed or is a protected restore point. Refresh the list.",
74
+ 清理方式无效: "Invalid cleanup mode",
75
+ 不能重复选择同一份备份: "The same backup cannot be selected twice",
76
+ "缺少同一实例近 72 小时内可校验的自动备份,已停止清理":
77
+ "No verifiable automatic backup of this instance from the last 72 hours is available. Cleanup stopped.",
78
+ "备份目录正在被使用,请稍后再试":
79
+ "The backup folder is in use. Try again later.",
80
+ 备份文件已变化或不可删除: "The backup changed or cannot be removed",
81
+ "部分备份未清理,请刷新列表后重试":
82
+ "Some backups were not removed. Refresh the list and try again.",
83
+ "备份在清理期间发生变化,已停止后续清理":
84
+ "A backup changed during cleanup. The remaining cleanup stopped.",
85
+ "备份或清理正在进行,请稍后再试":
86
+ "A backup or cleanup is running. Try again later.",
87
+ "请先选择要清理的备份,单次最多 100 份":
88
+ "Select backups to remove, up to 100 at a time",
89
+
90
+ // channels
91
+ "这个会话属于另一种 QQ 接入方式,当前不能向它发送":
92
+ "This session belongs to the other QQ connection method and cannot be sent to right now",
93
+ 这个会话的通道没有接上: "The channel for this session is not connected",
94
+ 这个通道不能接上: "This channel cannot be connected",
95
+ "QQ 尚未连接": "QQ is not connected yet",
96
+ "QQ 连接已断开": "The QQ connection was lost",
97
+ "无法连接 QQ 开放平台": "Could not reach the QQ Open Platform",
98
+ "QQ 开放平台没有找到鉴权接口":
99
+ "The QQ Open Platform has no authentication endpoint",
100
+ "无法获取 AccessToken": "Could not get an AccessToken",
101
+ "尚未填写 AppID 和 AppSecret":
102
+ "AppID and AppSecret have not been entered yet",
103
+ "QQ 开放平台没有返回网关地址":
104
+ "The QQ Open Platform returned no gateway address",
105
+ "QQ 官方机器人尚未连接": "The QQ official bot is not connected yet",
106
+ "这个会话不属于当前连接的 QQ 官方机器人":
107
+ "This session does not belong to the QQ official bot that is connected",
108
+ 会话身份不完整: "The session identity is incomplete",
109
+ "会话 ID 无效": "The session ID is invalid",
110
+
111
+ // core/api.js
112
+ 会话不存在: "The session does not exist",
113
+ 归档开关无效: "The archive switch is invalid",
114
+ 没有要修改的内容: "Nothing to change",
115
+ "请先移出面板,再永久删除会话":
116
+ "Remove it from the panel first, then delete the session for good",
117
+ "模型档案数量应为 0–30": "The number of model profiles must be 0–30",
118
+ "模型 ID 重复": "Duplicate model ID",
119
+ 模型档案不存在: "The model profile does not exist",
120
+ 版本无效: "The version is invalid",
121
+ 版本不存在: "The version does not exist",
122
+ "近期原文条数应在 10–500 之间":
123
+ "Recent raw messages must be between 10 and 500",
124
+ 上下文压缩开关无效: "The context compression switch is invalid",
125
+ 最大聚合时间不能小于基础窗口:
126
+ "The maximum batching time cannot be shorter than the base window",
127
+ 节能看图开关无效: "The image-saving switch is invalid",
128
+ 开关无效: "The switch is invalid",
129
+ 视觉兼容模型必须开启视觉能力:
130
+ "A vision-compatible model must have vision turned on",
131
+ 备用模型无效: "The backup model is invalid",
132
+ 请从模型库中选择具体的备用模型:
133
+ "Pick a specific backup model from the model library",
134
+ 备用模型不能和主模型相同:
135
+ "The backup model cannot be the same as the main model",
136
+ 日志不存在: "The log does not exist",
137
+ 已有回放正在运行: "A replay is already running",
138
+ 回放消息序号范围无效: "The replay message range is invalid",
139
+ "请选择 1–100 条人类消息": "Choose 1–100 human messages",
140
+ 请先开启模拟模式: "Turn on simulation mode first",
141
+ "请选择会话并输入消息和有效的用户 ID":
142
+ "Choose a session and enter a message and a valid user ID",
143
+
144
+ // core
145
+ "输入预算太小,无法容纳语境与人格":
146
+ "The input budget is too small to hold the context and persona",
147
+ "当前消息批次和引用链超过预算,请增加模型输入预算":
148
+ "The current message batch and quote chain exceed the budget. Raise the model input budget.",
149
+ 语境摘要格式无效: "The context summary format is invalid",
150
+ "API 地址无效": "The API URL is invalid",
151
+ 模型名称必填: "The model name is required",
152
+ "模型尚未配置 API Key": "The model has no API key yet",
153
+ 输入与输出预算之和不能超过上下文窗口:
154
+ "Input plus output budget cannot exceed the context window",
155
+ 采样参数无效: "The sampling parameters are invalid",
156
+ "模型输出被截断,请增加输出预算":
157
+ "The model output was cut off. Raise the output budget.",
158
+ 向量接口返回数量与输入不一致:
159
+ "The vector API returned a different count than the input",
160
+ 向量接口返回重复或无效的输入编号:
161
+ "The vector API returned duplicate or invalid input indexes",
162
+ "向量接口未返回 embedding": "The vector API returned no embedding",
163
+ 向量接口返回无效数值: "The vector API returned invalid numbers",
164
+ "请先在「系统 → 连接 QQ」填写 AppID":
165
+ "Enter the AppID under System → Connect QQ first",
166
+ "请填写有效的群 openid / 用户 openid 和名称":
167
+ "Enter a valid group openid / user openid and a name",
168
+ "请填写有效的群号/QQ号和名称":
169
+ "Enter a valid group number / QQ number and a name",
170
+ 会话名称无效: "The session name is invalid",
171
+ "回合输出不是 JSON 对象": "The turn output is not a JSON object",
172
+ "回合输出缺少 choice": "The turn output has no choice",
173
+
174
+ // model calls (shown in the call log)
175
+ "当前批次、引用与人格超过模型输入预算,请增加 Max Input Tokens":
176
+ "The current batch, quotes and persona exceed the model's input budget. Raise Max Input Tokens.",
177
+ "模型 API HTTP 402:账户余额或额度不足,请在供应商后台检查或切换模型":
178
+ "Model API HTTP 402: the account balance or quota is not enough. Check the provider's console or switch models.",
179
+ "临时网络连接中断,等待后重试":
180
+ "The network connection dropped briefly; waiting to retry",
181
+ "尚未配置模型,请先在模型库中添加":
182
+ "No model is configured yet. Add one in the model library first.",
183
+ 所选模型档案不存在: "The chosen model profile does not exist",
184
+ "服务返回空正文,重试一次":
185
+ "The service returned an empty body; retrying once",
186
+ "输出达到本阶段上限,放宽到模型输出上限重试一次":
187
+ "The output hit this stage's limit; retrying once with the model's full output limit",
188
+ 错误: "error",
189
+
190
+ // vision
191
+ 图片地址不可访问: "The image address cannot be reached",
192
+ 图片下载失败: "The image download failed",
193
+ 图片超过大小限制: "The image is over the size limit",
194
+ 图片像素超过处理限制: "The image has too many pixels to process",
195
+ 图片处理超时: "Image processing timed out",
196
+ "QQ 图片读取超时": "QQ image retrieval timed out",
197
+ 图片下载超时: "The image download timed out",
198
+ 图片跳转无效: "The image redirect is invalid",
199
+ 图片跳转过多: "Too many image redirects",
200
+ 图片读取失败: "The image could not be read",
201
+ 本地图片不存在: "The local image does not exist",
202
+ 本地图片无法读取: "The local image could not be read",
203
+ 不是支持的图片格式: "This image format is not supported",
204
+
205
+ // database-archive.js
206
+ "数据库来自更新版本,请先升级 LuckyTri;未修改数据":
207
+ "The database comes from a newer version. Upgrade LuckyTri first; nothing was changed.",
208
+ 数据库完整性检查失败: "The database integrity check failed",
209
+ 数据库引用检查失败: "The database reference check failed",
210
+ "这不是 LuckyTri 数据库": "This is not a LuckyTri database",
211
+ 备份校验清单不匹配: "The backup checksum list does not match",
212
+ "恢复目标或伴随文件已存在,请选一个新文件;未覆盖任何数据":
213
+ "The restore target or its companion file already exists. Choose a new file; nothing was overwritten.",
214
+ 恢复目标已被其他进程创建: "The restore target was created by another process",
215
+ "数据库版本较新,请升级 LuckyTri;未修改数据":
216
+ "The database version is newer. Upgrade LuckyTri; nothing was changed.",
217
+ 绑定外网地址前请先在本机设置管理密码:
218
+ "Set a management password on this computer before binding to a public address",
219
+
220
+ // knowledge
221
+ 知识向量未启用: "Knowledge vectors are not enabled",
222
+ "请选择会话、用户 ID 并填写记忆":
223
+ "Choose a session and user ID, and enter the memory",
224
+ 请选择会话: "Choose a session",
225
+ 记忆内容无效: "The memory content is invalid",
226
+ 记忆状态无效: "The memory state is invalid",
227
+ "置信度与重要性应在0–1": "Confidence and importance must be 0–1",
228
+ 过期时间无效: "The expiry time is invalid",
229
+ 锁定状态无效: "The lock state is invalid",
230
+ 选择两条记忆并输入合并内容: "Choose two memories and enter the merged text",
231
+ 只能合并同范围同用户的未锁定记忆:
232
+ "Only unlocked memories of the same scope and user can be merged",
233
+ "请输入 1–4000 字检索内容": "Enter 1–4000 characters to search",
234
+ 向量开关无效: "The vector switch is invalid",
235
+ 密钥格式无效: "The key format is invalid",
236
+ "向量 API 地址无效": "The vector API URL is invalid",
237
+ 启用向量需要独立地址和模型名:
238
+ "Enabling vectors needs a separate URL and model name",
239
+ 向量数量与输入不一致: "The vector count does not match the input",
240
+ 向量内容无效: "The vector content is invalid",
241
+ 向量维度不一致: "The vector dimensions are inconsistent",
242
+ 知识库名称无效: "The collection name is invalid",
243
+ 知识库不存在: "The collection does not exist",
244
+ "文档内容应为 1–400000 字": "The document must be 1–400000 characters",
245
+ 文档切分后为空: "The document is empty after splitting",
246
+ 文档没有可建立向量的段落: "The document has no passages to vectorize",
247
+ 请先启用知识向量模型: "Enable the knowledge vector model first",
248
+ "文档已变化,请重新建立向量": "The document changed. Rebuild its vectors.",
249
+ 文档不存在: "The document does not exist",
250
+
251
+ // plugins
252
+ 插件不存在: "The plugin does not exist",
253
+ 还有权限没有同意: "Some permissions have not been accepted",
254
+ 插件权限无效: "A plugin permission is invalid",
255
+ 插件设置项无效: "A plugin setting is invalid",
256
+ 插件入口无效: "The plugin entry is invalid",
257
+ 插件没有在运行: "The plugin is not running",
258
+ 插件消息过大: "The plugin message is too large",
259
+ 插件请求超时: "The plugin request timed out",
260
+ 未知的插件调用: "Unknown plugin call",
261
+ 插件没有这个权限: "The plugin does not have this permission",
262
+ 插件保存的内容过大: "What the plugin stored is too large",
263
+ 这个地址不能访问: "This address cannot be reached",
264
+ 这个网站不在插件的允许范围内: "This site is outside the plugin's allowlist",
265
+ 跳转过多: "Too many redirects",
266
+ 今天放到书架上的资料已经够多了: "Enough material was put on the shelf today",
267
+ 资料内容过大或是空的: "The material is empty or too large",
268
+ 插件没有声明这个活动: "The plugin did not declare this activity",
269
+ 插件没有声明这个行动: "The plugin did not declare this action",
270
+ 插件没有声明这种感知: "The plugin did not declare this perception",
271
+ 插件没有声明这个通道: "The plugin did not declare this channel",
272
+ 消息不完整: "The message is incomplete",
273
+ 插件预算已经用完: "The plugin budget is used up",
274
+ 插件接口无效: "The plugin route is invalid",
275
+ 插件接口不存在: "The plugin route does not exist",
276
+ 插件贡献的名字无效: "A name the plugin contributes is invalid",
277
+ 插件清单无法读取: "The plugin manifest could not be read",
278
+ 插件清单无效: "The plugin manifest is invalid",
279
+ 插件标识无效: "The plugin id is invalid",
280
+ 插件版本号无效: "The plugin version is invalid",
281
+ "插件 API 版本不兼容": "The plugin API version is not compatible",
282
+ "插件不支持这个 LuckyTri 版本":
283
+ "The plugin does not support this version of LuckyTri",
284
+ 插件网络主机无效: "A plugin network host is invalid",
285
+ 压缩包无法读取: "The archive could not be read",
286
+ 压缩包文件过多: "The archive has too many files",
287
+ 压缩包不能加密: "The archive must not be encrypted",
288
+ 压缩包格式不受支持: "This archive format is not supported",
289
+ 压缩包不能包含链接: "The archive must not contain links",
290
+ 压缩包路径无效: "An archive path is invalid",
291
+ 压缩包内容不完整: "The archive contents are incomplete",
292
+ 压缩包解压后过大: "The archive is too large when unpacked",
293
+ 插件包下载失败: "The plugin package could not be downloaded",
294
+ 插件包过大: "The plugin package is too large",
295
+ 插件包校验不符: "The plugin package checksum does not match",
296
+ 插件包和索引不一致: "The plugin package does not match the index",
297
+ 这次导入已经过期: "This import has expired",
298
+ 插件索引无效: "The plugin index is invalid",
299
+ 插件仓库地址无效: "The plugin repository address is invalid",
300
+ 没有可以退回的版本: "There is no earlier version to return to",
301
+
302
+ // mind
303
+ 类型无效: "The type is invalid",
304
+ 内容无效: "The content is invalid",
305
+ 缺少来源: "A source is missing",
306
+ 日期无效: "The date is invalid",
307
+ 日期不在合理范围: "The date is outside a sensible range",
308
+ 与撤销过的内容相同: "Same as something already undone",
309
+ 约定不存在: "The promise does not exist",
310
+ "TA 还不认识这个人": "TA does not know this person yet",
311
+ 在天性页修改: "Change it on the Nature page",
312
+ "TA 正在想别的事": "TA is thinking about something else",
313
+ 请选择要撤销的内容: "Choose what to undo",
314
+ "请输入 1–1000 字的试聊内容": "Enter 1–1000 characters for the trial chat",
315
+ "正在试聊,请稍等": "A trial chat is running. Please wait.",
316
+ 试聊失败: "The trial chat failed",
317
+ "每日 Token 上限无效": "The daily token limit is invalid",
318
+ "预算份额应在 0–0.9": "Budget shares must be 0–0.9",
319
+ "后台份额之和不能超过 95%":
320
+ "Background shares cannot add up to more than 95%",
321
+ 需要选定有效的开始时间: "A valid start time is needed",
322
+ "需要选定 5 至 240 分钟的投入时间": "A time of 5 to 240 minutes is needed",
323
+ "所选开始时间在睡眠安排中,需要重新选择":
324
+ "The chosen start time falls in her sleep schedule; choose again",
325
+ 安排包含无效内容: "The plan contains invalid content",
326
+ 需要把行动内容想具体: "The action needs to be thought through",
327
+ 行动无效: "The action is invalid",
328
+ 没有等待同意的行动: "There is no action waiting for approval",
329
+ 这件事已经过期: "This action has expired",
330
+ 行动超时: "The action timed out",
331
+ 感知类型无效: "The perception type is invalid",
332
+ 感知超时: "Perception timed out",
333
+ 这段经历不存在: "This experience does not exist",
334
+ 活动类型无效: "The activity type is invalid",
335
+ 不能覆盖内置的活动: "A built-in activity cannot be replaced",
336
+ 需要自己选定要玩的游戏: "She needs to choose the game to play herself",
337
+ 没有得到明确的时间安排: "No clear time plan was given",
338
+ 空内容: "Empty content",
339
+ 疑似凭据: "Looks like a credential",
340
+ 不能把私下说法写进群里的面貌:
341
+ "Private remarks cannot be written into a face used in a group",
342
+ 来源不能带到这个会话: "The source cannot be carried into this session",
343
+ 没有新的经历: "No new experience",
344
+ 没有变化: "No change",
345
+ 线索不存在: "The strand does not exist",
346
+ 面貌版本不存在: "The face version does not exist",
347
+ 关系变化不存在: "The relationship change does not exist",
348
+ 相遇不存在: "The encounter does not exist",
349
+ 不能撤销这类内容: "This kind of content cannot be undone",
350
+ 日记格式无效: "The diary format is invalid",
351
+ 回顾格式无效: "The reflection format is invalid",
352
+ 未保存: "Not saved",
353
+ 身份回看输出格式无效: "The self-review output format is invalid",
354
+ 记忆不存在: "The memory does not exist",
355
+ 允许复述时也必须允许想起:
356
+ "If repeating is allowed, recalling must be allowed too",
357
+ 授权到期时间无效: "The authorization expiry is invalid",
358
+ 分寸标签无效: "The discretion label is invalid",
359
+ "记忆已锁定,请先解锁": "The memory is locked. Unlock it first.",
360
+ 请选择要删除的记忆: "Choose the memories to delete",
361
+ "请选择 1–500 条记忆": "Choose 1–500 memories",
362
+ "全选删除不需要传入记忆 ID": "Select-all deletion does not take memory IDs",
363
+ 只能删除当前会话中存在的记忆:
364
+ "Only memories that exist in the current session can be deleted",
365
+ "只能删除当前会话的记忆,共享或继承记忆请单独管理":
366
+ "Only this session's memories can be deleted; manage shared or inherited memories separately",
367
+ "包含已锁定记忆,请先解锁后再删除":
368
+ "Contains locked memories. Unlock them before deleting.",
369
+ 记忆整理格式无效: "The memory sorting format is invalid",
370
+ 名字无效: "The name is invalid",
371
+ 性别无效: "The gender is invalid",
372
+ 天性正文无效: "The nature text is invalid",
373
+ 列表字段必须是文本列表: "List fields must be lists of text",
374
+ "性格刻度应在 0–100": "Character scales must be 0–100",
375
+ 表达字段无效: "The expression field is invalid",
376
+ 作息时间无效: "The daily rhythm time is invalid",
377
+ "天性只能改两次。用完之后,由 TA 自己从经历里生长。":
378
+ "Nature can be changed only twice. After that, TA grows from her own experience.",
379
+ 自己的安排格式无效: "Her own plan format is invalid",
380
+ 愿望未保存: "The wish was not saved",
381
+ "自己的念头含有无效来源或敏感内容,未保存":
382
+ "Her thought has an invalid source or sensitive content and was not saved",
383
+ "没有玩过的经历,不能写成她的样子":
384
+ "What she has not played cannot be written into who she is",
385
+ 来源不在本次经历中: "The source is not part of this experience",
386
+ 线索不存在或已撤销: "The strand does not exist or was undone",
387
+ 对不上她说过的话: "Does not match what she said",
388
+ 手记不存在: "The note does not exist",
389
+ 状态无效: "The status is invalid",
390
+ "这条手记有后续修正,请隐藏以保留轨迹":
391
+ "This note has later corrections. Hide it to keep the trail.",
392
+ 搜索提供方无效: "The search provider is invalid",
393
+ 作品不存在: "The work does not exist",
394
+ "开始时间格式应为 YYYY-MM-DD HH:mm":
395
+ "The start time must be in YYYY-MM-DD HH:mm format",
396
+ 约定回看格式无效: "The promise review format is invalid",
397
+ 活动成果格式无效: "The activity result format is invalid",
398
+ 时间设置超出范围: "The time settings are out of range",
399
+ "活动速度应在 1 至 2 之间": "Activity speed must be between 1 and 2",
400
+ 任务已变化: "The task has changed",
401
+ 完成需要实际成果: "Completing needs an actual result",
402
+ 完成需要已提交的实际成果: "Completing needs a submitted result",
403
+ 等待可用模型: "Waiting for an available model",
404
+ 今日独处预算不足: "Not enough budget for time alone today",
405
+ "实例已停止,资料结果未提交":
406
+ "The instance stopped; the material result was not submitted",
407
+ 搜索配置格式无效: "The search settings format is invalid",
408
+ 搜索地址无效: "The search URL is invalid",
409
+ 查询用途无效: "The query purpose is invalid",
410
+ 查询只能包含资料主题: "A query may only contain the material topic",
411
+ "搜索接口未返回有效 JSON,请核对提供方与完整搜索地址":
412
+ "The search API did not return valid JSON. Check the provider and the full search URL.",
413
+ "任务已经变化,资料结果未提交":
414
+ "The task changed; the material result was not submitted",
415
+ "正在测试搜索连接,请稍后":
416
+ "A search connection test is running. Please try again shortly.",
417
+ "正在推进活动步骤,请稍后测试":
418
+ "An activity step is in progress. Test again shortly.",
419
+ 只有真实完成稿可以交付: "Only a genuinely finished piece can be delivered",
420
+ 正文包含其他会话的私下内容:
421
+ "The text contains private content from another session",
422
+ 作品来源不允许在此会话分享:
423
+ "The work's source does not allow sharing in this session",
424
+ 需要明确分享选择: "A clear sharing choice is needed",
425
+ 成果整理格式无效: "The result-sorting format is invalid",
426
+ 汇报涉及私下内容: "The report touches private content",
427
+ 需要几句自然汇报: "A few natural sentences of report are needed",
428
+ 汇报需要简短的一句一句说:
429
+ "The report needs to be said in short, separate sentences",
430
+ 汇报包含不适合公开的信息:
431
+ "The report contains information not suitable to share",
432
+ "请回看后整理,不要复制正文": "Review and rephrase it; do not copy the text",
433
+ 没有可整理的任务: "No tasks to sort out",
434
+ "任务目标或权限范围不同,不能合并":
435
+ "Tasks with different goals or permission scopes cannot be merged",
436
+ 已有成果的任务不能改成未执行:
437
+ "A task that already has results cannot be reset to not run",
438
+ 任务内容无效: "The task content is invalid",
439
+ 缺少真实来源: "A real source is missing",
440
+ 优先级无效: "The priority is invalid",
441
+ "事项已变化,不能覆盖安排":
442
+ "The item changed and the plan cannot be overwritten",
443
+ 时间安排无效: "The time plan is invalid",
444
+ "所选时间与已有安排重叠,需要重新选定":
445
+ "The chosen time overlaps an existing plan; choose again",
446
+ 事项已变化: "The item has changed",
447
+ 任务不存在: "The task does not exist",
448
+ "这条记录已合并,请调整唯一任务":
449
+ "This record was merged; adjust the single task instead",
450
+ 任务已经结束: "The task has already ended",
451
+ 不能直接标记完成: "It cannot be marked done directly",
452
+ "投入时间应为 5 至 240 分钟": "The time to spend must be 5 to 240 minutes",
453
+ 任务租约已经改变: "The task lease has changed",
454
+ 作品正文格式无效: "The work text format is invalid",
455
+ "单篇过长,请接续新篇章": "This piece is too long; continue in a new piece",
456
+ 活动草稿已不可用: "The activity draft is no longer available",
457
+ 项目不存在: "The project does not exist",
458
+ 建议类型无效: "The suggestion type is invalid",
459
+ 不适合长期自述或含私下内容:
460
+ "Not suitable as a lasting self-description, or contains private content",
461
+ 缺少亲历来源: "A first-hand source is missing",
462
+ 自述需要模型之外的新经历:
463
+ "A self-description needs new experience beyond the model",
464
+ 没有实质变化: "No substantial change",
465
+ 没有新的亲历来源: "No new first-hand source",
466
+ 未知性格维度: "Unknown character dimension",
467
+ 没有方向: "No direction",
468
+ 缺少可用的理由: "No usable reason was given",
469
+ 性格变化需要模型之外的经历:
470
+ "A character change needs experience beyond the model",
471
+ 这段经历已经改变过它: "This experience has already changed it",
472
+ "今天这项性格已经改变过,留些时间检验":
473
+ "This trait already changed today; give it time to settle",
474
+ 已到边界: "Already at the limit",
475
+
476
+ // studio
477
+ 反馈类型无效: "The feedback type is invalid",
478
+ 只能评价已发送的回复: "Only replies that were sent can be rated",
479
+ "模型 ID 无效": "The model ID is invalid",
480
+ 找不到这个已保存的模型: "That saved model was not found",
481
+ 连接测试正在进行: "A connection test is already running",
482
+ "请先配置模型 API Key": "Set the model API key first",
483
+ "接口已响应,但 JSON 输出不符合预期":
484
+ "The API responded, but its JSON output was not as expected",
485
+ 文本配置无效: "The text setting is invalid",
486
+ 接入方式无效: "The connection method is invalid",
487
+ "接入方式已由环境变量 LUCKYTRI_CHANNEL 固定":
488
+ "The connection method is fixed by the LUCKYTRI_CHANNEL environment variable",
489
+ "AppID 格式无效": "The AppID format is invalid",
490
+ "AppSecret 格式无效": "The AppSecret format is invalid",
491
+ 开关配置无效: "The switch setting is invalid",
492
+ 数值配置超出范围: "A numeric setting is out of range",
493
+ 模型服务商预设无效: "The model provider preset is invalid",
494
+ 思考强度无效: "The thinking effort is invalid",
495
+ 模型名称不能为空: "The model name cannot be empty",
496
+ };
497
+
498
+ // Messages that carry a value. `{0}`, `{1}` are filled with what the code put
499
+ // in; the values are passed through the dictionaries again.
500
+ export const ERROR_PATTERNS = [
501
+ ["删除失败({0})", "Removal failed ({0})"],
502
+ ["清理工作异常结束:{0}", "Cleanup ended unexpectedly: {0}"],
503
+ ["{0} Prompt 无效", "{0} prompt is invalid"],
504
+ ["模型请求失败 HTTP {0}:{1}", "The model request failed with HTTP {0}: {1}"],
505
+ ["模型请求失败 HTTP {0}", "The model request failed with HTTP {0}"],
506
+ [
507
+ "模型响应超时({0} 秒内没有返回)",
508
+ "The model did not respond within {0} seconds",
509
+ ],
510
+ [
511
+ "模型服务网络连接失败({0},已自动重试)",
512
+ "The connection to the model service failed ({0}); it was retried automatically",
513
+ ],
514
+ [
515
+ "这个模型服务连续失败,已暂停请求,约 {0} 秒后自动恢复",
516
+ "This model service failed repeatedly and is paused; it resumes automatically in about {0} seconds",
517
+ ],
518
+ [
519
+ "主模型 {0} 请求失败({1}),这一步改用备用模型 {2}",
520
+ "The main model {0} failed ({1}); this step uses the backup model {2}",
521
+ ],
522
+ [
523
+ "模型服务暂时返回 HTTP {0},等待后重试",
524
+ "The model service returned HTTP {0} for now; waiting to retry",
525
+ ],
526
+ [
527
+ "模型输出不是有效 JSON,重试一次:{0}",
528
+ "The model output was not valid JSON; retrying once: {0}",
529
+ ],
530
+ ["{0} 超出范围", "{0} is out of range"],
531
+ ["{0} 必须是正整数", "{0} must be a positive integer"],
532
+ ["{0} 必须是开关", "{0} must be a switch"],
533
+ [
534
+ "QQ 开放平台关闭了连接({0}),请检查机器人状态与权限",
535
+ "The QQ Open Platform closed the connection ({0}). Check the bot's status and permissions.",
536
+ ],
537
+ ["向量接口失败 HTTP {0}", "The vector API failed with HTTP {0}"],
538
+ ["图片下载失败 HTTP {0}", "The image download failed with HTTP {0}"],
539
+ ["搜索接口 HTTP {0}:{1}", "Search API HTTP {0}: {1}"],
540
+ [
541
+ "这些设置已经不存在:{0}。名字和天性在「TA → 天性」里修改",
542
+ "These settings no longer exist: {0}. Change the name and nature under TA → Nature.",
543
+ ],
544
+ [
545
+ "搜索连接失败({0}),请检查网络和代理;代理状态改变后可重启实例",
546
+ "The search connection failed ({0}). Check the network and proxy; restart the instance after the proxy changes.",
547
+ ],
548
+ ];