@dnalec/dsh-auto-approve 0.1.2 → 0.2.0
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.
- package/CHANGELOG.md +21 -0
- package/README.md +34 -91
- package/README.zh.md +23 -83
- package/client.js +108 -219
- package/locales.mjs +164 -128
- package/package.json +5 -9
- package/src/index.mjs +179 -458
- package/src/preset-patch.mjs +3 -3
- package/src/rules.mjs +155 -54
- package/src/util.mjs +6 -70
- package/src/provisioning.mjs +0 -131
- package/src/qqbot.mjs +0 -313
- package/src/tickets.mjs +0 -277
package/locales.mjs
CHANGED
|
@@ -14,8 +14,34 @@ export const zh = {
|
|
|
14
14
|
'action.allow': '允许',
|
|
15
15
|
'action.human': '人工',
|
|
16
16
|
|
|
17
|
+
'criterion.deletion': '删除/覆盖不可再生数据',
|
|
18
|
+
'criterion.credential': '凭据/密钥/授权修改',
|
|
19
|
+
'criterion.remote': '远程系统/生产环境/数据库',
|
|
20
|
+
'criterion.system': '系统级路径/配置',
|
|
21
|
+
'criterion.bulk': '批量不可回补操作',
|
|
22
|
+
'criterion.approval-config': '自动审批配置',
|
|
23
|
+
'criterion.safe': '安全/常规可回补',
|
|
24
|
+
'criterion.other': '其他(拿不准)',
|
|
25
|
+
|
|
26
|
+
'sandbox.read-only': '只读',
|
|
27
|
+
'sandbox.workspace-write': '工作区可写',
|
|
28
|
+
'sandbox.danger-full-access': '全权限',
|
|
29
|
+
|
|
30
|
+
'source.web': '网页',
|
|
31
|
+
|
|
17
32
|
'verdict.keyword-allow': '关键词允许',
|
|
18
33
|
'verdict.keyword-reject': '关键词拒绝',
|
|
34
|
+
'verdict.keyword-human': '关键词转人工',
|
|
35
|
+
'verdict.criteria-reject': '审核表拒绝',
|
|
36
|
+
'verdict.criteria-allow': '审核表允许',
|
|
37
|
+
'verdict.criteria-human': '审核表转人工',
|
|
38
|
+
'verdict.judge-failed': '判定失败转人工',
|
|
39
|
+
'verdict.missing-payload': '缺少工具参数转人工',
|
|
40
|
+
'verdict.truncated-payload': '参数过长转人工',
|
|
41
|
+
'verdict.plugin-error': '插件异常转人工',
|
|
42
|
+
'verdict.human': '转人工',
|
|
43
|
+
'verdict.cancelled': '人工取消',
|
|
44
|
+
'verdict.unavailable': '审批不可用',
|
|
19
45
|
'path.keyword-reject': '关键词拒绝',
|
|
20
46
|
'path.keyword-allow': '关键词允许',
|
|
21
47
|
'path.keyword-human': '关键词转人工',
|
|
@@ -29,14 +55,14 @@ export const zh = {
|
|
|
29
55
|
|
|
30
56
|
'notice.feedError': '审批提示暂时不可用',
|
|
31
57
|
'notice.feedErrorTag': '连接失败',
|
|
32
|
-
'notice.pendingTitle': '
|
|
33
|
-
'notice.pendingTag': '人工审批中
|
|
34
|
-
'notice.
|
|
35
|
-
'notice.webApproved': '人工审批通过{ticket}:{preview}',
|
|
36
|
-
'notice.qqApprovedTag': '已在 QQ 批准{ticket}',
|
|
58
|
+
'notice.pendingTitle': '等待人工审批:{preview}',
|
|
59
|
+
'notice.pendingTag': '人工审批中',
|
|
60
|
+
'notice.webApproved': '人工审批通过:{preview}',
|
|
37
61
|
'notice.webApprovedTag': '人工审批通过',
|
|
38
|
-
'notice.rejectedTitle': '
|
|
39
|
-
'notice.rejectedTag': '已拒绝
|
|
62
|
+
'notice.rejectedTitle': '已拒绝:{preview}',
|
|
63
|
+
'notice.rejectedTag': '已拒绝',
|
|
64
|
+
'notice.cancelledTitle': '已取消人工审批:{preview}',
|
|
65
|
+
'notice.unavailableTitle': '审批不可用:{preview}',
|
|
40
66
|
'notice.autoTag': '自动放行 · {verdict}',
|
|
41
67
|
'notice.autoDefault': '自动放行',
|
|
42
68
|
'notice.rejectedDefault': '已拒绝',
|
|
@@ -52,10 +78,12 @@ export const zh = {
|
|
|
52
78
|
'history.emptyHint': '自动放行与转人工都会出现在这里',
|
|
53
79
|
'history.sub': '最新在上 · 点开看命令与详情',
|
|
54
80
|
'history.tagAuto': '自动放行',
|
|
55
|
-
'history.tagPending': '
|
|
56
|
-
'history.
|
|
57
|
-
'history.
|
|
58
|
-
'history.
|
|
81
|
+
'history.tagPending': '转人工',
|
|
82
|
+
'history.tagAllow': '人工批准',
|
|
83
|
+
'history.tagReject': '人工拒绝',
|
|
84
|
+
'history.tagCancel': '人工取消',
|
|
85
|
+
'history.tagUnavailable': '审批不可用',
|
|
86
|
+
'history.unknownTool': '工具',
|
|
59
87
|
|
|
60
88
|
'detail.request': '请求',
|
|
61
89
|
'detail.audit': '审核',
|
|
@@ -82,16 +110,14 @@ export const zh = {
|
|
|
82
110
|
'detail.judgeReason': '审核理由',
|
|
83
111
|
'detail.judgeError': '审核失败',
|
|
84
112
|
'detail.judgeRaw': '审核结果原文',
|
|
85
|
-
'detail.ticket': '短号',
|
|
86
113
|
'detail.source': '来源',
|
|
87
114
|
'detail.judgeFailed': '未完成(解析失败/超时转人工,不执行「其他」的动作)',
|
|
88
115
|
|
|
89
116
|
'set.title': '自动审批',
|
|
90
|
-
'set.intro': '
|
|
117
|
+
'set.intro': '需要审批的行为由审核模型自动判定。允许或拒绝与在网页点按钮相同;拿不准则交给原来的人工审批框。',
|
|
91
118
|
'set.allowlistCorrupt': '规则文件损坏,当前是内存默认,普通保存不会覆盖磁盘。请修好 allowlist.json,或点「恢复默认」写回出厂规则。',
|
|
92
|
-
'set.pluginCorrupt': '
|
|
119
|
+
'set.pluginCorrupt': '插件配置损坏,拒绝保存以免清空审核模型。请修好 ~/.dsh/auto-approve/config.json,或',
|
|
93
120
|
'set.pluginCorruptOverwrite': '覆盖损坏配置',
|
|
94
|
-
'set.qqCorrupt': 'QQ 凭据文件损坏,未覆盖磁盘。请修好 ~/.dsh/approval-bridge/qqbot.json,或重新保存凭据 / 扫码。',
|
|
95
121
|
'set.loading': '加载中…',
|
|
96
122
|
'set.loadFailed': '加载失败:{error}',
|
|
97
123
|
'set.resetConfirm': '再点一次确认恢复',
|
|
@@ -101,9 +127,9 @@ export const zh = {
|
|
|
101
127
|
'set.presetWriteNote': '写入后需重启 dsh web',
|
|
102
128
|
'set.presetWrote': '已写入,请重启 dsh web',
|
|
103
129
|
'set.modeTitle': '自动审批模式',
|
|
104
|
-
'set.modeWs': '
|
|
130
|
+
'set.modeWs': '工作区可写(推荐)',
|
|
105
131
|
'set.modeWsHint': '工作区内直接放行,越出工作区需审核。',
|
|
106
|
-
'set.modeRo': '
|
|
132
|
+
'set.modeRo': '只读',
|
|
107
133
|
'set.modeRoHint': '工作区内写操作也需审核。',
|
|
108
134
|
'set.save': '保存',
|
|
109
135
|
'set.hotOk': '已生效(热更新,无需重启)',
|
|
@@ -149,54 +175,46 @@ export const zh = {
|
|
|
149
175
|
'set.judgeLangZh': '中文',
|
|
150
176
|
'set.judgeLangEn': 'English',
|
|
151
177
|
'set.judgeLangHint': '只改发给审核模型的框架语言,不会改当前审核表。恢复默认审核表时使用这里选的语言。',
|
|
152
|
-
'set.qqTitle': 'QQ 审批通道',
|
|
153
|
-
'set.qqSub': '扫码或填凭据。按私人 bot 设计:未绑定 chatId 时,私聊回「是」会绑成审批聊天。不要让陌生人能私聊这个 bot。群必须 @机器人并另配 userId。',
|
|
154
|
-
'set.qqScan': '扫码接入机器人',
|
|
155
|
-
'set.qqRescan': '重新扫码接入',
|
|
156
|
-
'set.qqCancelScan': '取消扫码',
|
|
157
|
-
'set.qqCancelOk': '已取消扫码',
|
|
158
|
-
'set.qqScanStart': '已开始扫码,请用手机 QQ 扫描',
|
|
159
|
-
'set.qqScanOk': '扫码成功,凭据已保存',
|
|
160
|
-
'set.qqScanFail': '扫码失败',
|
|
161
|
-
'set.qqScanStatus': '扫码接入:{status}',
|
|
162
|
-
'set.qqQrAlt': 'QQ 机器人扫码二维码',
|
|
163
|
-
'set.qqQrTip': '请用手机 QQ 扫码并确认创建机器人(约 5 分钟有效)',
|
|
164
|
-
'set.qqAppId': 'AppID',
|
|
165
|
-
'set.qqAppSecret': 'AppSecret',
|
|
166
|
-
'set.qqSecretKeep': 'AppSecret(留空则保留)',
|
|
167
|
-
'set.qqSaveConnect': '保存并连接',
|
|
168
|
-
'set.qqCredsReconnect': '凭据已保存并重连',
|
|
169
|
-
'set.qqReconnect': '重连',
|
|
170
|
-
'set.qqReconnected': '正在重连',
|
|
171
|
-
'set.qqUnknown': '未知',
|
|
172
|
-
'set.qqChatOn': '已选定聊天',
|
|
173
|
-
'set.qqChatOff': '未选定',
|
|
174
|
-
'set.qqPush': '推送:{state}',
|
|
175
|
-
'set.qqPushOn': '开',
|
|
176
|
-
'set.qqPushOff': '关',
|
|
177
|
-
'set.qqPushToggled': '已切换推送',
|
|
178
|
-
'set.qqEnablePush': '启用推送',
|
|
179
|
-
'set.qqPausePush': '暂停推送',
|
|
180
|
-
'set.qqCurrentChat': '当前 chatId:{chatId}',
|
|
181
|
-
'set.qqUnset': '(未选定)',
|
|
182
|
-
'set.qqChatPlaceholder': 'chatId(私聊 openid / 群 g:openid)',
|
|
183
|
-
'set.qqGroupUser': '群 userId',
|
|
184
|
-
'set.qqTimeoutS': '超时s',
|
|
185
|
-
'set.prov.loggingIn': '登录中',
|
|
186
|
-
'set.prov.waitScan': '等待扫码',
|
|
187
|
-
'set.prov.saving': '保存凭据',
|
|
188
|
-
'set.prov.connected': '已连接',
|
|
189
|
-
'set.chatId': 'chatId',
|
|
190
|
-
'set.userId': 'userId(群)',
|
|
191
|
-
'set.notifyTimeout': '提醒间隔(秒)',
|
|
192
|
-
'set.saveTarget': '保存目标/超时',
|
|
193
|
-
'set.targetSaved': '推送目标已保存',
|
|
194
|
-
'set.recent': '最近来信(点选设为审批聊天;群必须 @机器人,还需匹配 userId)',
|
|
195
|
-
'set.noMail': '还没有来信。加好友后给机器人发任意一句。',
|
|
196
|
-
'set.group': '群',
|
|
197
|
-
'set.c2c': '私聊',
|
|
198
|
-
'set.chatPicked': '已选定审批聊天',
|
|
199
178
|
'set.overwriteOk': '已覆盖损坏的插件配置',
|
|
179
|
+
'err.missingPayload': '工具参数不完整,转人工',
|
|
180
|
+
'err.missingPayloadUncaptured': '未捕获工具参数,转人工',
|
|
181
|
+
'err.truncatedPayload': '工具参数过长已截断,转人工(禁止按前缀自动放行)',
|
|
182
|
+
'err.pluginError': '插件判定异常,转人工',
|
|
183
|
+
'err.allowlistCorrupt': '规则文件损坏,拒绝覆盖。请先「恢复默认」写回出厂规则,或修好磁盘上的 allowlist.json',
|
|
184
|
+
'err.allowlistWrite': '写入 allowlist 失败',
|
|
185
|
+
'err.criterionNotFound': '未找到该审核项',
|
|
186
|
+
'err.criterionNeedId': '需要 id 或 label',
|
|
187
|
+
'err.criterionIdExists': 'id 已存在',
|
|
188
|
+
'err.criterionOtherLocked': '「其他」不可删除',
|
|
189
|
+
'err.criteriaOp': '审核表请用添加 / 修改 / 删除 / 恢复默认',
|
|
190
|
+
'err.opMustSet': '{kind} 只能用修改操作',
|
|
191
|
+
'err.invalidNumber': '无效数值',
|
|
192
|
+
'err.keywordEmpty': '关键词不能为空',
|
|
193
|
+
'err.keywordNotFound': '未找到该关键词',
|
|
194
|
+
'err.keywordsOp': '关键词请用添加 / 修改 / 删除 / 恢复默认',
|
|
195
|
+
'err.valueEmpty': '值不能为空',
|
|
196
|
+
'err.unknownKind': '未知规则类型:{kind}',
|
|
197
|
+
'err.unknownOp': '未知操作:{op}',
|
|
198
|
+
'err.ruleNotFound': '未找到匹配的规则',
|
|
199
|
+
'err.badBody': '请求体不是 JSON',
|
|
200
|
+
'err.needSessionId': '需要 sessionId',
|
|
201
|
+
'err.pluginCorrupt': '插件配置损坏,拒绝覆盖。请修好磁盘文件,或点「覆盖损坏配置」',
|
|
202
|
+
'err.pluginWrite': '写入配置失败',
|
|
203
|
+
'err.unknownEndpoint': '未知接口:{endpoint}',
|
|
204
|
+
'err.internal': '内部错误:{error}',
|
|
205
|
+
'err.catalog': '无法列出模型:{error}',
|
|
206
|
+
'err.info': '无法读取模型信息:{error}',
|
|
207
|
+
'err.judgeUnconfigured': '未配置审核模型',
|
|
208
|
+
'err.judgeEffort': '思考强度 {effort} 不受支持',
|
|
209
|
+
'err.judgeTimeout': '审核超时({ms}ms)',
|
|
210
|
+
'err.judgeRetryTimeout': '审核重试超时({ms}ms)',
|
|
211
|
+
'err.judgeFailed': '审核失败',
|
|
212
|
+
'err.judgeCall': '审核模型调用失败:{error}',
|
|
213
|
+
'err.judgeEmpty': '审核模型输出为空',
|
|
214
|
+
'err.judgeParse': '审核模型输出无法解析',
|
|
215
|
+
'err.judgeUpstream': '审核模型路由失败:{error}',
|
|
216
|
+
'err.noPresetsKey': 'permission 条目缺少 presets 键,请手动添加',
|
|
217
|
+
'err.preset': '写入预设失败:{error}',
|
|
200
218
|
'rpc.unavailable': 'connection.rpc 不可用',
|
|
201
219
|
'rpc.failed': 'RPC 失败',
|
|
202
220
|
}
|
|
@@ -210,8 +228,34 @@ export const en = {
|
|
|
210
228
|
'action.allow': 'Allow',
|
|
211
229
|
'action.human': 'Human',
|
|
212
230
|
|
|
231
|
+
'criterion.deletion': 'Delete/overwrite irreplaceable data',
|
|
232
|
+
'criterion.credential': 'Credentials/keys/auth changes',
|
|
233
|
+
'criterion.remote': 'Remote/production/database',
|
|
234
|
+
'criterion.system': 'System paths/config',
|
|
235
|
+
'criterion.bulk': 'Bulk irreversible operations',
|
|
236
|
+
'criterion.approval-config': 'Auto-approve configuration',
|
|
237
|
+
'criterion.safe': 'Safe/routine reversible',
|
|
238
|
+
'criterion.other': 'Other (unsure)',
|
|
239
|
+
|
|
240
|
+
'sandbox.read-only': 'Read-only',
|
|
241
|
+
'sandbox.workspace-write': 'Workspace write',
|
|
242
|
+
'sandbox.danger-full-access': 'Full access',
|
|
243
|
+
|
|
244
|
+
'source.web': 'Web',
|
|
245
|
+
|
|
213
246
|
'verdict.keyword-allow': 'Keyword allow',
|
|
214
247
|
'verdict.keyword-reject': 'Keyword reject',
|
|
248
|
+
'verdict.keyword-human': 'Keyword → human',
|
|
249
|
+
'verdict.criteria-reject': 'Criteria reject',
|
|
250
|
+
'verdict.criteria-allow': 'Criteria allow',
|
|
251
|
+
'verdict.criteria-human': 'Criteria → human',
|
|
252
|
+
'verdict.judge-failed': 'Judge failed → human',
|
|
253
|
+
'verdict.missing-payload': 'Missing tool args → human',
|
|
254
|
+
'verdict.truncated-payload': 'Truncated args → human',
|
|
255
|
+
'verdict.plugin-error': 'Plugin error → human',
|
|
256
|
+
'verdict.human': 'To human',
|
|
257
|
+
'verdict.cancelled': 'Human cancel',
|
|
258
|
+
'verdict.unavailable': 'Unavailable',
|
|
215
259
|
'path.keyword-reject': 'Keyword reject',
|
|
216
260
|
'path.keyword-allow': 'Keyword allow',
|
|
217
261
|
'path.keyword-human': 'Keyword → human',
|
|
@@ -225,14 +269,14 @@ export const en = {
|
|
|
225
269
|
|
|
226
270
|
'notice.feedError': 'Approval notices unavailable',
|
|
227
271
|
'notice.feedErrorTag': 'Connection failed',
|
|
228
|
-
'notice.pendingTitle': 'Waiting for human
|
|
229
|
-
'notice.pendingTag': 'Human review
|
|
230
|
-
'notice.
|
|
231
|
-
'notice.webApproved': 'Approved{ticket}: {preview}',
|
|
232
|
-
'notice.qqApprovedTag': 'Approved in QQ{ticket}',
|
|
272
|
+
'notice.pendingTitle': 'Waiting for human: {preview}',
|
|
273
|
+
'notice.pendingTag': 'Human review',
|
|
274
|
+
'notice.webApproved': 'Approved: {preview}',
|
|
233
275
|
'notice.webApprovedTag': 'Approved',
|
|
234
|
-
'notice.rejectedTitle': 'Rejected
|
|
235
|
-
'notice.rejectedTag': 'Rejected
|
|
276
|
+
'notice.rejectedTitle': 'Rejected: {preview}',
|
|
277
|
+
'notice.rejectedTag': 'Rejected',
|
|
278
|
+
'notice.cancelledTitle': 'Cancelled: {preview}',
|
|
279
|
+
'notice.unavailableTitle': 'Unavailable: {preview}',
|
|
236
280
|
'notice.autoTag': 'Auto-allowed · {verdict}',
|
|
237
281
|
'notice.autoDefault': 'Auto-allowed',
|
|
238
282
|
'notice.rejectedDefault': 'Rejected',
|
|
@@ -248,10 +292,12 @@ export const en = {
|
|
|
248
292
|
'history.emptyHint': 'Auto-allows and human escalations appear here',
|
|
249
293
|
'history.sub': 'Newest first · expand for command and details',
|
|
250
294
|
'history.tagAuto': 'Auto-allowed',
|
|
251
|
-
'history.tagPending': '
|
|
252
|
-
'history.
|
|
253
|
-
'history.
|
|
254
|
-
'history.
|
|
295
|
+
'history.tagPending': 'To human',
|
|
296
|
+
'history.tagAllow': 'Human allow',
|
|
297
|
+
'history.tagReject': 'Human reject',
|
|
298
|
+
'history.tagCancel': 'Human cancel',
|
|
299
|
+
'history.tagUnavailable': 'Unavailable',
|
|
300
|
+
'history.unknownTool': 'Tool',
|
|
255
301
|
|
|
256
302
|
'detail.request': 'Request',
|
|
257
303
|
'detail.audit': 'Review',
|
|
@@ -278,16 +324,14 @@ export const en = {
|
|
|
278
324
|
'detail.judgeReason': 'Judge reason',
|
|
279
325
|
'detail.judgeError': 'Judge error',
|
|
280
326
|
'detail.judgeRaw': 'Judge raw output',
|
|
281
|
-
'detail.ticket': 'Ticket',
|
|
282
327
|
'detail.source': 'Source',
|
|
283
328
|
'detail.judgeFailed': 'Incomplete (parse failure/timeout → human; does not run Other)',
|
|
284
329
|
|
|
285
330
|
'set.title': 'Auto-approve',
|
|
286
|
-
'set.intro': 'Actions that need approval are
|
|
331
|
+
'set.intro': 'Actions that need approval are judged automatically. Allow and reject match clicking the Web buttons; uncertainty goes to the original human dialog.',
|
|
287
332
|
'set.allowlistCorrupt': 'The rules file is corrupt. This process is using in-memory defaults and will not overwrite the disk. Repair allowlist.json, or Restore defaults to write shipped rules.',
|
|
288
|
-
'set.pluginCorrupt': 'Plugin config is corrupt; saves are refused so
|
|
333
|
+
'set.pluginCorrupt': 'Plugin config is corrupt; saves are refused so the judge model is not wiped. Repair ~/.dsh/auto-approve/config.json, or ',
|
|
289
334
|
'set.pluginCorruptOverwrite': 'Overwrite corrupt config',
|
|
290
|
-
'set.qqCorrupt': 'QQ credentials file is corrupt and was not overwritten. Repair ~/.dsh/approval-bridge/qqbot.json, or save credentials / scan again.',
|
|
291
335
|
'set.loading': 'Loading…',
|
|
292
336
|
'set.loadFailed': 'Failed to load: {error}',
|
|
293
337
|
'set.resetConfirm': 'Click again to confirm restore',
|
|
@@ -297,9 +341,9 @@ export const en = {
|
|
|
297
341
|
'set.presetWriteNote': 'Restart dsh web after writing',
|
|
298
342
|
'set.presetWrote': 'Written. Restart dsh web',
|
|
299
343
|
'set.modeTitle': 'Auto-approve mode',
|
|
300
|
-
'set.modeWs': '
|
|
344
|
+
'set.modeWs': 'Workspace write (recommended)',
|
|
301
345
|
'set.modeWsHint': 'In-workspace writes skip approval; outside the workspace still goes through the judge.',
|
|
302
|
-
'set.modeRo': '
|
|
346
|
+
'set.modeRo': 'Read-only',
|
|
303
347
|
'set.modeRoHint': 'In-workspace writes also go through the judge.',
|
|
304
348
|
'set.save': 'Save',
|
|
305
349
|
'set.hotOk': 'Applied (live; no restart)',
|
|
@@ -345,54 +389,46 @@ export const en = {
|
|
|
345
389
|
'set.judgeLangZh': 'Chinese',
|
|
346
390
|
'set.judgeLangEn': 'English',
|
|
347
391
|
'set.judgeLangHint': 'Changes only the judge prompt framework, not the current criteria table. Restore default criteria uses this language.',
|
|
348
|
-
'set.qqTitle': 'QQ approval channel',
|
|
349
|
-
'set.qqSub': 'Scan or paste credentials. Designed for a private bot: if no chatId is bound, a C2C reply of “是” binds that chat. Do not let strangers DM this bot. Groups must @ the bot and set userId.',
|
|
350
|
-
'set.qqScan': 'Scan to create bot',
|
|
351
|
-
'set.qqRescan': 'Scan again',
|
|
352
|
-
'set.qqCancelScan': 'Cancel scan',
|
|
353
|
-
'set.qqCancelOk': 'Scan cancelled',
|
|
354
|
-
'set.qqScanStart': 'Scan started; use mobile QQ',
|
|
355
|
-
'set.qqScanOk': 'Scan succeeded; credentials saved',
|
|
356
|
-
'set.qqScanFail': 'Scan failed',
|
|
357
|
-
'set.qqScanStatus': 'Scan: {status}',
|
|
358
|
-
'set.qqQrAlt': 'QQ bot QR code',
|
|
359
|
-
'set.qqQrTip': 'Scan with mobile QQ and confirm creating the bot (about 5 minutes)',
|
|
360
|
-
'set.qqAppId': 'AppID',
|
|
361
|
-
'set.qqAppSecret': 'AppSecret',
|
|
362
|
-
'set.qqSecretKeep': 'AppSecret (leave blank to keep)',
|
|
363
|
-
'set.qqSaveConnect': 'Save and connect',
|
|
364
|
-
'set.qqCredsReconnect': 'Credentials saved; reconnecting',
|
|
365
|
-
'set.qqReconnect': 'Reconnect',
|
|
366
|
-
'set.qqReconnected': 'Reconnecting',
|
|
367
|
-
'set.qqUnknown': 'Unknown',
|
|
368
|
-
'set.qqChatOn': 'Chat selected',
|
|
369
|
-
'set.qqChatOff': 'No chat selected',
|
|
370
|
-
'set.qqPush': 'Push: {state}',
|
|
371
|
-
'set.qqPushOn': 'on',
|
|
372
|
-
'set.qqPushOff': 'off',
|
|
373
|
-
'set.qqPushToggled': 'Push toggled',
|
|
374
|
-
'set.qqEnablePush': 'Enable push',
|
|
375
|
-
'set.qqPausePush': 'Pause push',
|
|
376
|
-
'set.qqCurrentChat': 'Current chatId: {chatId}',
|
|
377
|
-
'set.qqUnset': '(none)',
|
|
378
|
-
'set.qqChatPlaceholder': 'chatId (C2C openid / group g:openid)',
|
|
379
|
-
'set.qqGroupUser': 'Group userId',
|
|
380
|
-
'set.qqTimeoutS': 'Timeout s',
|
|
381
|
-
'set.prov.loggingIn': 'Signing in',
|
|
382
|
-
'set.prov.waitScan': 'Waiting for scan',
|
|
383
|
-
'set.prov.saving': 'Saving credentials',
|
|
384
|
-
'set.prov.connected': 'Connected',
|
|
385
|
-
'set.chatId': 'chatId',
|
|
386
|
-
'set.userId': 'userId (group)',
|
|
387
|
-
'set.notifyTimeout': 'Reminder interval (seconds)',
|
|
388
|
-
'set.saveTarget': 'Save target / timeout',
|
|
389
|
-
'set.targetSaved': 'Push target saved',
|
|
390
|
-
'set.recent': 'Recent incoming (click to set as the approval chat; groups must @ the bot and match userId)',
|
|
391
|
-
'set.noMail': 'No messages yet. Friend the bot and send it anything.',
|
|
392
|
-
'set.group': 'Group',
|
|
393
|
-
'set.c2c': 'C2C',
|
|
394
|
-
'set.chatPicked': 'Approval chat selected',
|
|
395
392
|
'set.overwriteOk': 'Corrupt plugin config overwritten',
|
|
393
|
+
'err.missingPayload': 'Tool arguments are incomplete; sending to human',
|
|
394
|
+
'err.missingPayloadUncaptured': 'Tool arguments were not captured; sending to human',
|
|
395
|
+
'err.truncatedPayload': 'Tool arguments were truncated; sending to human (no prefix auto-allow)',
|
|
396
|
+
'err.pluginError': 'Plugin error; sending to human',
|
|
397
|
+
'err.allowlistCorrupt': 'Rules file is corrupt; refusing to overwrite. Restore defaults or fix allowlist.json on disk.',
|
|
398
|
+
'err.allowlistWrite': 'Failed to write allowlist',
|
|
399
|
+
'err.criterionNotFound': 'Criterion not found',
|
|
400
|
+
'err.criterionNeedId': 'id or label is required',
|
|
401
|
+
'err.criterionIdExists': 'id already exists',
|
|
402
|
+
'err.criterionOtherLocked': '“Other” cannot be deleted',
|
|
403
|
+
'err.criteriaOp': 'Criteria accept add / set / remove / reset',
|
|
404
|
+
'err.opMustSet': '{kind} only accepts set',
|
|
405
|
+
'err.invalidNumber': 'Invalid number',
|
|
406
|
+
'err.keywordEmpty': 'Keyword cannot be empty',
|
|
407
|
+
'err.keywordNotFound': 'Keyword not found',
|
|
408
|
+
'err.keywordsOp': 'Keywords accept add / set / remove / reset',
|
|
409
|
+
'err.valueEmpty': 'Value cannot be empty',
|
|
410
|
+
'err.unknownKind': 'Unknown rule kind: {kind}',
|
|
411
|
+
'err.unknownOp': 'Unknown operation: {op}',
|
|
412
|
+
'err.ruleNotFound': 'No matching rule',
|
|
413
|
+
'err.badBody': 'Request body is not JSON',
|
|
414
|
+
'err.needSessionId': 'sessionId is required',
|
|
415
|
+
'err.pluginCorrupt': 'Plugin config is corrupt; refusing to overwrite. Fix the file on disk, or overwrite the corrupt config.',
|
|
416
|
+
'err.pluginWrite': 'Failed to write plugin config',
|
|
417
|
+
'err.unknownEndpoint': 'Unknown endpoint: {endpoint}',
|
|
418
|
+
'err.internal': 'Internal error: {error}',
|
|
419
|
+
'err.catalog': 'Could not list models: {error}',
|
|
420
|
+
'err.info': 'Could not load model info: {error}',
|
|
421
|
+
'err.judgeUnconfigured': 'Judge model is not configured',
|
|
422
|
+
'err.judgeEffort': 'reasoningEffort {effort} is not supported',
|
|
423
|
+
'err.judgeTimeout': 'Judge timed out ({ms}ms)',
|
|
424
|
+
'err.judgeRetryTimeout': 'Judge retry timed out ({ms}ms)',
|
|
425
|
+
'err.judgeFailed': 'Judge failed',
|
|
426
|
+
'err.judgeCall': 'Judge call failed: {error}',
|
|
427
|
+
'err.judgeEmpty': 'Judge output was empty',
|
|
428
|
+
'err.judgeParse': 'Judge output could not be parsed',
|
|
429
|
+
'err.judgeUpstream': 'Judge route failed: {error}',
|
|
430
|
+
'err.noPresetsKey': 'The permission entry has no presets key; add it manually',
|
|
431
|
+
'err.preset': 'Failed to write preset: {error}',
|
|
396
432
|
'rpc.unavailable': 'connection.rpc is unavailable',
|
|
397
433
|
'rpc.failed': 'RPC failed',
|
|
398
434
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dnalec/dsh-auto-approve",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "DeepSeek Harness 自动审批门控 +
|
|
3
|
+
"version": "0.2.0",
|
|
4
|
+
"description": "DeepSeek Harness 自动审批门控 + 设置页",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./src/index.mjs",
|
|
7
7
|
"exports": {
|
|
@@ -16,11 +16,13 @@
|
|
|
16
16
|
"cordis.patch.yml",
|
|
17
17
|
"README.md",
|
|
18
18
|
"README.zh.md",
|
|
19
|
+
"CHANGELOG.md",
|
|
19
20
|
"LICENSE"
|
|
20
21
|
],
|
|
22
|
+
|
|
21
23
|
"scripts": {
|
|
22
24
|
"test": "node --test tests/*.test.mjs",
|
|
23
|
-
"check": "node --check src/index.mjs && node --check src/rules.mjs && node --check src/
|
|
25
|
+
"check": "node --check src/index.mjs && node --check src/rules.mjs && node --check src/preset-patch.mjs && node --check src/util.mjs && node --check locales.mjs && node --check client.js"
|
|
24
26
|
},
|
|
25
27
|
"keywords": [
|
|
26
28
|
"deepseek-harness",
|
|
@@ -43,12 +45,6 @@
|
|
|
43
45
|
"bugs": {
|
|
44
46
|
"url": "https://github.com/DNAlec/dsh-auto-approve/issues"
|
|
45
47
|
},
|
|
46
|
-
"dependencies": {
|
|
47
|
-
"qrcode": "^1.5.4"
|
|
48
|
-
},
|
|
49
|
-
"optionalDependencies": {
|
|
50
|
-
"@tencent-connect/qqbot-connector": "^1.2.0"
|
|
51
|
-
},
|
|
52
48
|
"dsh": {
|
|
53
49
|
"bundle": {
|
|
54
50
|
"patch": "./cordis.patch.yml"
|