@dnalec/dsh-auto-approve 0.1.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.
@@ -0,0 +1,5 @@
1
+ # dsh-auto-approve bundle patch: 插入本插件行。
2
+ # 不整表替换 permission。auto-approve 预设由插件启动时写入 profile 的 cordis.patch.yml。
3
+ - insert:
4
+ - id: dsh-auto-approve
5
+ name: '@dnalec/dsh-auto-approve'
package/locales.mjs ADDED
@@ -0,0 +1,398 @@
1
+ /**
2
+ * Client UI dictionaries for dsh-auto-approve.
3
+ * zh is the key-set source of truth; en must have the same keys.
4
+ * Placeholders: {name}. User/model/path/command text is not translated.
5
+ */
6
+ export const NS = 'dsh-auto-approve'
7
+
8
+ export const zh = {
9
+ 'slot.notice': '自动放行提示',
10
+ 'slot.history': '审批',
11
+ 'slot.settings': '自动审批',
12
+
13
+ 'action.reject': '拒绝',
14
+ 'action.allow': '允许',
15
+ 'action.human': '人工',
16
+
17
+ 'verdict.keyword-allow': '关键词允许',
18
+ 'verdict.keyword-reject': '关键词拒绝',
19
+ 'path.keyword-reject': '关键词拒绝',
20
+ 'path.keyword-allow': '关键词允许',
21
+ 'path.keyword-human': '关键词转人工',
22
+ 'path.criteria-reject': '审核表拒绝',
23
+ 'path.criteria-allow': '审核表允许',
24
+ 'path.criteria-human': '审核表转人工',
25
+ 'path.judge-failed': '判定失败转人工',
26
+ 'path.missing-payload': '缺少工具参数转人工',
27
+ 'path.truncated-payload': '参数过长转人工',
28
+ 'path.plugin-error': '插件异常转人工',
29
+
30
+ 'notice.feedError': '审批提示暂时不可用',
31
+ 'notice.feedErrorTag': '连接失败',
32
+ 'notice.pendingTitle': '等待人工审批{ticket}:{preview}',
33
+ 'notice.pendingTag': '人工审批中{ticket}',
34
+ 'notice.qqApproved': '已在 QQ 批准{ticket}:{preview}',
35
+ 'notice.webApproved': '人工审批通过{ticket}:{preview}',
36
+ 'notice.qqApprovedTag': '已在 QQ 批准{ticket}',
37
+ 'notice.webApprovedTag': '人工审批通过',
38
+ 'notice.rejectedTitle': '已拒绝{ticket}:{preview}',
39
+ 'notice.rejectedTag': '已拒绝{ticket}',
40
+ 'notice.autoTag': '自动放行 · {verdict}',
41
+ 'notice.autoDefault': '自动放行',
42
+ 'notice.rejectedDefault': '已拒绝',
43
+ 'notice.hint': '提示',
44
+ 'notice.close': '关闭',
45
+ 'notice.feedLoadFailed': '审批提示加载失败,将自动重试',
46
+
47
+ 'history.noSession': '未选择会话',
48
+ 'history.loadFailed': '加载失败:{error}',
49
+ 'history.loading': '加载中…',
50
+ 'history.title': '审批',
51
+ 'history.emptySub': '当前会话还没有审批记录',
52
+ 'history.emptyHint': '自动放行与转人工都会出现在这里',
53
+ 'history.sub': '最新在上 · 点开看命令与详情',
54
+ 'history.tagAuto': '自动放行',
55
+ 'history.tagPending': '待处理 {ticket}',
56
+ 'history.tagQqAllow': 'QQ 批准 {ticket}',
57
+ 'history.tagAllow': '批准 {ticket}',
58
+ 'history.tagReject': '拒绝 {ticket}',
59
+
60
+ 'detail.request': '请求',
61
+ 'detail.audit': '审核',
62
+ 'detail.command': '命令',
63
+ 'detail.path': '路径',
64
+ 'detail.description': '描述',
65
+ 'detail.old': '原文',
66
+ 'detail.new': '改成',
67
+ 'detail.content': '写入内容',
68
+ 'detail.code': '代码',
69
+ 'detail.url': 'URL',
70
+ 'detail.query': '查询',
71
+ 'detail.script': '脚本',
72
+ 'detail.sql': 'SQL',
73
+ 'detail.prompt': '提示词',
74
+ 'detail.cwd': '工作目录',
75
+ 'detail.sandbox': '沙箱',
76
+ 'detail.justification': '模型理由',
77
+ 'detail.pipe': '管道',
78
+ 'detail.keyword': '关键词',
79
+ 'detail.judgeModel': '审核模型',
80
+ 'detail.judgeCategory': '审核类别',
81
+ 'detail.judgeAction': '执行动作',
82
+ 'detail.judgeReason': '审核理由',
83
+ 'detail.judgeError': '审核失败',
84
+ 'detail.judgeRaw': '审核结果原文',
85
+ 'detail.ticket': '短号',
86
+ 'detail.source': '来源',
87
+ 'detail.judgeFailed': '未完成(解析失败/超时转人工,不执行「其他」的动作)',
88
+
89
+ 'set.title': '自动审批',
90
+ 'set.intro': '需要审批的行为会自动审批,并可推送到已配置的消息平台。按私人 bot 设计:未绑定聊天时,私聊回「是」会绑成审批目标,不要让陌生人能私聊这个 bot。',
91
+ 'set.allowlistCorrupt': '规则文件损坏,当前是内存默认,普通保存不会覆盖磁盘。请修好 allowlist.json,或点「恢复默认」写回出厂规则。',
92
+ 'set.pluginCorrupt': '插件配置损坏,拒绝保存以免清空 chatId。请修好 ~/.dsh/approval-bridge/config.json,或',
93
+ 'set.pluginCorruptOverwrite': '覆盖损坏配置',
94
+ 'set.qqCorrupt': 'QQ 凭据文件损坏,未覆盖磁盘。请修好 ~/.dsh/approval-bridge/qqbot.json,或重新保存凭据 / 扫码。',
95
+ 'set.loading': '加载中…',
96
+ 'set.loadFailed': '加载失败:{error}',
97
+ 'set.resetConfirm': '再点一次确认恢复',
98
+ 'set.presetMissingTitle': '权限预设',
99
+ 'set.presetMissingSub': '插件启动时会写入 auto-approve。当前未检测到,可手动补写。',
100
+ 'set.presetWrite': '写入权限预设',
101
+ 'set.presetWriteNote': '写入后需重启 dsh web',
102
+ 'set.presetWrote': '已写入,请重启 dsh web',
103
+ 'set.modeTitle': '自动审批模式',
104
+ 'set.modeWs': 'workspace-write(推荐)',
105
+ 'set.modeWsHint': '工作区内直接放行,越出工作区需审核。',
106
+ 'set.modeRo': 'read-only',
107
+ 'set.modeRoHint': '工作区内写操作也需审核。',
108
+ 'set.save': '保存',
109
+ 'set.hotOk': '已生效(热更新,无需重启)',
110
+ 'set.modeSaved': '已写入。请重启 dsh web,并重新选择「自动审批」或开新会话',
111
+ 'set.overview': '审批总览',
112
+ 'set.overviewSub': '关键词(拒绝优先于人工优先于允许)→ 审核表由模型归类,程序按表执行。解析失败转人工。',
113
+ 'set.stepKeywords': '关键词',
114
+ 'set.stepCriteria': '审核表',
115
+ 'set.stepJudge': '审核模型',
116
+ 'set.counts': '拒 {reject} · 人 {human} · 允 {allow}',
117
+ 'set.criteriaCount': '{n} 项',
118
+ 'set.followDefault': '跟随默认',
119
+ 'set.unconfigured': '未配置',
120
+ 'set.kwSub': '匹配命令、路径和工作目录。拒绝/人工词也匹配工具名;允许词不匹配工具名,避免把 bash/write 整类放行。',
121
+ 'set.empty': '暂无',
122
+ 'set.presetTag': '预置',
123
+ 'set.kwEditTitle': '点击修改',
124
+ 'set.kwPlaceholder': '新关键词',
125
+ 'set.add': '添加',
126
+ 'set.resetKeywords': '恢复默认关键词',
127
+ 'set.resetKeywordsOk': '已恢复默认关键词',
128
+ 'set.confirm': '确认',
129
+ 'set.delete': '删除',
130
+ 'set.criteriaSub': '审核模型以此表作为审核标准。「其他」作为兜底选项不能删除。',
131
+ 'set.labelPlaceholder': '标签',
132
+ 'set.descPlaceholder': '说明(写入审核提示词)',
133
+ 'set.resetCriteria': '恢复默认审核表({lang})',
134
+ 'set.resetCriteriaOk': '已恢复为{lang}默认审核表',
135
+ 'set.addCriterion': '添加审核项',
136
+ 'set.criterionId': 'id',
137
+ 'set.judgeTitle': '审核模型',
138
+ 'set.judgeSubLead': '独立于当前会话模型。空则跟随部署默认',
139
+ 'set.judgeSubFallback': '({provider} / {model})',
140
+ 'set.judgeSubNoFallback': '(当前没有默认可跟随)',
141
+ 'set.judgeSubTail': '。没有可用路由时当次转人工,不会再猜一个模型。建议思考强度 off。',
142
+ 'set.followProvider': '跟随默认提供方',
143
+ 'set.followModel': '跟随默认模型',
144
+ 'set.modelDefaultEffort': '模型默认',
145
+ 'set.effortOff': 'off(建议)',
146
+ 'set.judgeTimeoutMs': '审核超时(ms):',
147
+ 'set.judgeSaved': '审核模型已保存',
148
+ 'set.judgeLang': '提示词语言',
149
+ 'set.judgeLangZh': '中文',
150
+ 'set.judgeLangEn': 'English',
151
+ '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
+ 'set.overwriteOk': '已覆盖损坏的插件配置',
200
+ 'rpc.unavailable': 'connection.rpc 不可用',
201
+ 'rpc.failed': 'RPC 失败',
202
+ }
203
+
204
+ export const en = {
205
+ 'slot.notice': 'Auto-approve notice',
206
+ 'slot.history': 'Approvals',
207
+ 'slot.settings': 'Auto-approve',
208
+
209
+ 'action.reject': 'Reject',
210
+ 'action.allow': 'Allow',
211
+ 'action.human': 'Human',
212
+
213
+ 'verdict.keyword-allow': 'Keyword allow',
214
+ 'verdict.keyword-reject': 'Keyword reject',
215
+ 'path.keyword-reject': 'Keyword reject',
216
+ 'path.keyword-allow': 'Keyword allow',
217
+ 'path.keyword-human': 'Keyword → human',
218
+ 'path.criteria-reject': 'Criteria reject',
219
+ 'path.criteria-allow': 'Criteria allow',
220
+ 'path.criteria-human': 'Criteria → human',
221
+ 'path.judge-failed': 'Judge failed → human',
222
+ 'path.missing-payload': 'Missing tool args → human',
223
+ 'path.truncated-payload': 'Truncated args → human',
224
+ 'path.plugin-error': 'Plugin error → human',
225
+
226
+ 'notice.feedError': 'Approval notices unavailable',
227
+ 'notice.feedErrorTag': 'Connection failed',
228
+ 'notice.pendingTitle': 'Waiting for human{ticket}: {preview}',
229
+ 'notice.pendingTag': 'Human review{ticket}',
230
+ 'notice.qqApproved': 'Approved in QQ{ticket}: {preview}',
231
+ 'notice.webApproved': 'Approved{ticket}: {preview}',
232
+ 'notice.qqApprovedTag': 'Approved in QQ{ticket}',
233
+ 'notice.webApprovedTag': 'Approved',
234
+ 'notice.rejectedTitle': 'Rejected{ticket}: {preview}',
235
+ 'notice.rejectedTag': 'Rejected{ticket}',
236
+ 'notice.autoTag': 'Auto-allowed · {verdict}',
237
+ 'notice.autoDefault': 'Auto-allowed',
238
+ 'notice.rejectedDefault': 'Rejected',
239
+ 'notice.hint': 'Notice',
240
+ 'notice.close': 'Dismiss',
241
+ 'notice.feedLoadFailed': 'Approval notices failed to load; retrying',
242
+
243
+ 'history.noSession': 'No session selected',
244
+ 'history.loadFailed': 'Failed to load: {error}',
245
+ 'history.loading': 'Loading…',
246
+ 'history.title': 'Approvals',
247
+ 'history.emptySub': 'This session has no approval records yet',
248
+ 'history.emptyHint': 'Auto-allows and human escalations appear here',
249
+ 'history.sub': 'Newest first · expand for command and details',
250
+ 'history.tagAuto': 'Auto-allowed',
251
+ 'history.tagPending': 'Pending {ticket}',
252
+ 'history.tagQqAllow': 'QQ allow {ticket}',
253
+ 'history.tagAllow': 'Allow {ticket}',
254
+ 'history.tagReject': 'Reject {ticket}',
255
+
256
+ 'detail.request': 'Request',
257
+ 'detail.audit': 'Review',
258
+ 'detail.command': 'Command',
259
+ 'detail.path': 'Path',
260
+ 'detail.description': 'Description',
261
+ 'detail.old': 'Original',
262
+ 'detail.new': 'Replacement',
263
+ 'detail.content': 'Write contents',
264
+ 'detail.code': 'Code',
265
+ 'detail.url': 'URL',
266
+ 'detail.query': 'Query',
267
+ 'detail.script': 'Script',
268
+ 'detail.sql': 'SQL',
269
+ 'detail.prompt': 'Prompt',
270
+ 'detail.cwd': 'Working directory',
271
+ 'detail.sandbox': 'Sandbox',
272
+ 'detail.justification': 'Model justification',
273
+ 'detail.pipe': 'Pipeline',
274
+ 'detail.keyword': 'Keyword',
275
+ 'detail.judgeModel': 'Judge model',
276
+ 'detail.judgeCategory': 'Category',
277
+ 'detail.judgeAction': 'Action',
278
+ 'detail.judgeReason': 'Judge reason',
279
+ 'detail.judgeError': 'Judge error',
280
+ 'detail.judgeRaw': 'Judge raw output',
281
+ 'detail.ticket': 'Ticket',
282
+ 'detail.source': 'Source',
283
+ 'detail.judgeFailed': 'Incomplete (parse failure/timeout → human; does not run Other)',
284
+
285
+ 'set.title': 'Auto-approve',
286
+ 'set.intro': 'Actions that need approval are auto-approved and can be pushed to a configured chat. Designed for a private bot: if no chat is bound, a C2C reply of “是” binds that chat. Do not let strangers DM this bot.',
287
+ '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 chatId is not wiped. Repair ~/.dsh/approval-bridge/config.json, or ',
289
+ '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
+ 'set.loading': 'Loading…',
292
+ 'set.loadFailed': 'Failed to load: {error}',
293
+ 'set.resetConfirm': 'Click again to confirm restore',
294
+ 'set.presetMissingTitle': 'Permission preset',
295
+ 'set.presetMissingSub': 'Startup writes auto-approve. It was not detected; you can write it now.',
296
+ 'set.presetWrite': 'Write permission preset',
297
+ 'set.presetWriteNote': 'Restart dsh web after writing',
298
+ 'set.presetWrote': 'Written. Restart dsh web',
299
+ 'set.modeTitle': 'Auto-approve mode',
300
+ 'set.modeWs': 'workspace-write (recommended)',
301
+ 'set.modeWsHint': 'In-workspace writes skip approval; outside the workspace still goes through the judge.',
302
+ 'set.modeRo': 'read-only',
303
+ 'set.modeRoHint': 'In-workspace writes also go through the judge.',
304
+ 'set.save': 'Save',
305
+ 'set.hotOk': 'Applied (live; no restart)',
306
+ 'set.modeSaved': 'Written. Restart dsh web and re-select Auto-approve or start a new session',
307
+ 'set.overview': 'Approval overview',
308
+ 'set.overviewSub': 'Keywords (reject > human > allow) → the judge classifies; the table decides. Parse failure → human.',
309
+ 'set.stepKeywords': 'Keywords',
310
+ 'set.stepCriteria': 'Criteria',
311
+ 'set.stepJudge': 'Judge model',
312
+ 'set.counts': 'rej {reject} · hum {human} · all {allow}',
313
+ 'set.criteriaCount': '{n} rows',
314
+ 'set.followDefault': 'Follow default',
315
+ 'set.unconfigured': 'Not configured',
316
+ 'set.kwSub': 'Match command, path, and workdir. Reject/human also match the tool name; allow keywords do not, so bash/write is not allowed as a class.',
317
+ 'set.empty': 'None',
318
+ 'set.presetTag': 'Shipped',
319
+ 'set.kwEditTitle': 'Click to edit',
320
+ 'set.kwPlaceholder': 'New keyword',
321
+ 'set.add': 'Add',
322
+ 'set.resetKeywords': 'Restore default keywords',
323
+ 'set.resetKeywordsOk': 'Default keywords restored',
324
+ 'set.confirm': 'Confirm',
325
+ 'set.delete': 'Delete',
326
+ 'set.criteriaSub': 'The judge uses this table. Other cannot be deleted.',
327
+ 'set.labelPlaceholder': 'Label',
328
+ 'set.descPlaceholder': 'Description (goes into the judge prompt)',
329
+ 'set.resetCriteria': 'Restore default criteria ({lang})',
330
+ 'set.resetCriteriaOk': 'Restored {lang} default criteria',
331
+ 'set.addCriterion': 'Add criterion',
332
+ 'set.criterionId': 'id',
333
+ 'set.judgeTitle': 'Judge model',
334
+ 'set.judgeSubLead': 'Independent of the session model. Empty follows the deployment default',
335
+ 'set.judgeSubFallback': ' ({provider} / {model})',
336
+ 'set.judgeSubNoFallback': ' (no default to follow)',
337
+ 'set.judgeSubTail': '. With no usable route, that request goes to a human; the plugin will not guess a model. Prefer effort off.',
338
+ 'set.followProvider': 'Follow default provider',
339
+ 'set.followModel': 'Follow default model',
340
+ 'set.modelDefaultEffort': 'Model default',
341
+ 'set.effortOff': 'off (recommended)',
342
+ 'set.judgeTimeoutMs': 'Judge timeout (ms):',
343
+ 'set.judgeSaved': 'Judge model saved',
344
+ 'set.judgeLang': 'Prompt language',
345
+ 'set.judgeLangZh': 'Chinese',
346
+ 'set.judgeLangEn': 'English',
347
+ '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
+ 'set.overwriteOk': 'Corrupt plugin config overwritten',
396
+ 'rpc.unavailable': 'connection.rpc is unavailable',
397
+ 'rpc.failed': 'RPC failed',
398
+ }
package/package.json ADDED
@@ -0,0 +1,65 @@
1
+ {
2
+ "name": "@dnalec/dsh-auto-approve",
3
+ "version": "0.1.0",
4
+ "description": "DeepSeek Harness 自动审批门控 + QQ 官方 Bot 审批推送(支持扫码接入)+ 设置页",
5
+ "type": "module",
6
+ "main": "./src/index.mjs",
7
+ "exports": {
8
+ ".": "./src/index.mjs",
9
+ "./client": "./client.js",
10
+ "./package.json": "./package.json"
11
+ },
12
+ "files": [
13
+ "src",
14
+ "client.js",
15
+ "locales.mjs",
16
+ "cordis.patch.yml",
17
+ "README.md",
18
+ "README.zh.md",
19
+ "LICENSE"
20
+ ],
21
+ "scripts": {
22
+ "test": "node --test tests/*.test.mjs",
23
+ "check": "node --check src/index.mjs && node --check src/rules.mjs && node --check src/tickets.mjs && node --check src/qqbot.mjs && node --check src/provisioning.mjs && node --check src/preset-patch.mjs && node --check src/util.mjs && node --check locales.mjs && node --check client.js"
24
+ },
25
+ "keywords": [
26
+ "deepseek-harness",
27
+ "dsh",
28
+ "dsh-plugin",
29
+ "approval",
30
+ "auto-approve",
31
+ "自动审批"
32
+ ],
33
+ "license": "MIT",
34
+ "publishConfig": {
35
+ "access": "public"
36
+ },
37
+ "author": "DNAlec",
38
+ "repository": {
39
+ "type": "git",
40
+ "url": "git+https://github.com/DNAlec/dsh-auto-approve.git"
41
+ },
42
+ "homepage": "https://github.com/DNAlec/dsh-auto-approve",
43
+ "bugs": {
44
+ "url": "https://github.com/DNAlec/dsh-auto-approve/issues"
45
+ },
46
+ "dependencies": {
47
+ "qrcode": "^1.5.4"
48
+ },
49
+ "optionalDependencies": {
50
+ "@tencent-connect/qqbot-connector": "^1.2.0"
51
+ },
52
+ "dsh": {
53
+ "bundle": {
54
+ "patch": "./cordis.patch.yml"
55
+ },
56
+ "client": {
57
+ "platform": "web",
58
+ "inject": [
59
+ "@deepseek-ai/dsh-client-connection",
60
+ "@deepseek-ai/dsh-client-locale",
61
+ "@deepseek-ai/dsh-client-ui-settings-general"
62
+ ]
63
+ }
64
+ }
65
+ }