dsh-onebot-genji 0.12.1 → 0.12.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.
package/lib/client.js CHANGED
@@ -131,7 +131,7 @@ window.__ModuleLoader__.load({
131
131
  sections: [
132
132
  { id: "common", title: "通用", keys: ["adminUsers", "sensitivePatterns"] },
133
133
  { id: "dm", title: "私聊", keys: ["dmPolicy", "allowFrom"] },
134
- { id: "group", title: "群聊", keys: ["requireMention", "memberTools", "groupPolicy", "groupAllowFrom", "wakeNamesAdmin", "wakeNamesMember", "atAllCountsAsMention", "pokeEnabled"] },
134
+ { id: "group", title: "群聊", keys: ["groupPolicy", "groupAllowFrom", "memberTools", "groupContextLines", "wakeNamesAdmin", "requireMention", "pokeEnabled", "atAllCountsAsMention"] },
135
135
  ],
136
136
  fields: [
137
137
  { key: "requireMention", label: "群聊必须 @ 机器人", type: "boolean" },
@@ -141,10 +141,10 @@ window.__ModuleLoader__.load({
141
141
  { key: "groupPolicy", label: "群聊策略", type: "enum", options: ["open", "allowlist", "disabled"], optionLabels: { open: "开放", allowlist: "白名单", disabled: "禁用" } },
142
142
  { key: "allowFrom", label: "私聊白名单", showIf: { key: "dmPolicy", value: "allowlist" }, type: "stringArray" },
143
143
  { key: "groupAllowFrom", label: "群聊白名单", showIf: { key: "groupPolicy", value: "allowlist" }, type: "stringArray" },
144
- { key: "wakeNamesAdmin", label: "用户唤醒词", type: "stringArray" },
145
- { key: "wakeNamesMember", label: "他人唤醒词", type: "stringArray" },
144
+ { key: "wakeNamesAdmin", label: "唤醒词", type: "stringArray", hint: "群里任何人说了这些词就当我被叫到" },
146
145
  { key: "atAllCountsAsMention", label: "@全体唤醒", type: "boolean", hint: "@全体成员也算叫我" },
147
146
  { key: "pokeEnabled", label: "戳一戳叫醒", type: "boolean" },
147
+ { key: "groupContextLines", label: "参考上下文条数", type: "number", pattern: "^[0-9]+$", patternHint: "≥0 的整数", hint: "被 @ 或叫到唤醒词时先带上群里最近这么多条消息;0 = 不参考" },
148
148
  { key: "sensitivePatterns", label: "出站敏感词正则", type: "stringArray", placeholder: "正则,一行一个;留空用内置" },
149
149
  ],
150
150
  },
@@ -250,6 +250,7 @@ window.__ModuleLoader__.load({
250
250
  forceSessionId: "",
251
251
  dmPromptFile: "", // T4 拍板默认关(贡献者默认 ~/.dsh 路径不收)
252
252
  groupPromptFile: "", // 同上
253
+ groupContextLines: 0, // 本地加(2026-11-18):被 @ 时带上的群聊上下文条数
253
254
  requireMention: true,
254
255
  memberTools: "none",
255
256
  bystanderEnabled: false,
@@ -470,6 +471,7 @@ window.__ModuleLoader__.load({
470
471
  forceSessionId: vString(0, 256),
471
472
  dmPromptFile: vString(0, 1024),
472
473
  groupPromptFile: vString(0, 1024),
474
+ groupContextLines: vNumber(),
473
475
  requireMention: vBoolean(),
474
476
  memberTools: vEnum(["none", "send", "all"]),
475
477
  bystanderEnabled: vBoolean(),
@@ -866,10 +868,10 @@ window.__ModuleLoader__.load({
866
868
  allowAllUsers: { label: "Allow all users" },
867
869
  allowFrom: { label: "DM allowlist" },
868
870
  groupAllowFrom: { label: "Group allowlist" },
869
- wakeNamesAdmin: { label: "User wake names" },
870
- wakeNamesMember: { label: "Member wake names" },
871
+ wakeNamesAdmin: { label: "Wake names", hint: "Anyone in the group saying one of these counts as calling the bot" },
871
872
  atAllCountsAsMention: { label: "@-all wakes", hint: "@-ing everyone also counts as a wake" },
872
873
  pokeEnabled: { label: "Poke wakes" },
874
+ groupContextLines: { label: "Group context lines", hint: "Include the last N group messages when @-mentioned; 0 = off" },
873
875
  sensitivePatterns: { label: "Outbound sensitive-word regexes", placeholder: "One regex per line; empty = built-in list" },
874
876
  },
875
877
  },
@@ -1212,6 +1214,7 @@ window.__ModuleLoader__.load({
1212
1214
  */
1213
1215
  var NUMBER_RANGE = {
1214
1216
  port: [1, 65535],
1217
+ groupContextLines: [0, 200],
1215
1218
  rateLimitPerMinute: [0, undefined],
1216
1219
  interimRecallMs: [0, undefined],
1217
1220
  inboxQueueDelayMs: [0, undefined],
@@ -1721,13 +1724,17 @@ window.__ModuleLoader__.load({
1721
1724
  return null;
1722
1725
  return node;
1723
1726
  });
1724
- fieldNodes = fieldNodes.concat(noticeRows).concat(tailFieldNodes);
1727
+ var extraNodes = noticeRows.concat(tailFieldNodes);
1728
+ fieldNodes = fieldNodes.concat(extraNodes);
1725
1729
  // 本地加:组内分区(如权限的私聊/群聊)——按 keys 顺序取已渲染的字段节点,
1726
1730
  // 每块前面插一个小标题(标题走词条,zh 源 = GROUPS.sections.title 自动灌入)。
1727
1731
  if (Array.isArray(group.sections) && group.sections.length > 0) {
1728
1732
  var byKey = {};
1733
+ // 本地改(2026-11-18):sections 重排后 fieldNodes 长度已变(通知行/尾部字段
1734
+ // 追加在后面),所以索引只按前 group.fields.length 项取。
1729
1735
  group.fields.forEach(function (field, index) { byKey[field.key] = fieldNodes[index]; });
1730
- var sectioned = [];
1736
+ var looseNodes = [];
1737
+ var sectionNodes = [];
1731
1738
  // 本地加:没归进任何分区的字段先渲染 —— 落在组标题下、第一个分区标题之上
1732
1739
  //(如权限组的「管理员用户列表」)。
1733
1740
  var claimedBySection = {};
@@ -1737,16 +1744,17 @@ window.__ModuleLoader__.load({
1737
1744
  }
1738
1745
  for (var looseField of group.fields) {
1739
1746
  if (claimedBySection[looseField.key] !== true && byKey[looseField.key] != null)
1740
- sectioned.push(byKey[looseField.key]);
1747
+ looseNodes.push(byKey[looseField.key]);
1741
1748
  }
1742
1749
  for (var section of group.sections) {
1743
- sectioned.push(h(ReactImpl, "h4", { className: "obx-subgroup-title", key: "sec-" + section.id }, tr("group." + group.id + ".section." + section.id, section.title)));
1750
+ sectionNodes.push(h(ReactImpl, "h4", { className: "obx-subgroup-title", key: "sec-" + section.id }, tr("group." + group.id + ".section." + section.id, section.title)));
1744
1751
  for (var sectionKey of section.keys) {
1745
1752
  if (byKey[sectionKey] != null)
1746
- sectioned.push(byKey[sectionKey]);
1753
+ sectionNodes.push(byKey[sectionKey]);
1747
1754
  }
1748
1755
  }
1749
- fieldNodes = sectioned;
1756
+ // 本地改(2026-11-18):分区块排在通知段之后、尾部字段(发送错误通知)之前。
1757
+ fieldNodes = looseNodes.concat(noticeRows).concat(sectionNodes).concat(tailFieldNodes);
1750
1758
  }
1751
1759
  // 组标题 + 一句人话描述(经 opts.groupDesc 传入;缺省不渲染)。标题走词条
1752
1760
  //(zh 源 = GROUPS.title 自动灌入)。
package/lib/inbound.js CHANGED
@@ -142,10 +142,9 @@ export class InboundPipeline {
142
142
  // 置回 false。角色档取管理员/成员各自的唤醒词表。
143
143
  let wakeNameHit = false;
144
144
  if (kind === 'group' && !mentioned) {
145
- const role = classifyUserRole(userId, policy.adminUsers);
146
- const wakeNames = role === 'admin'
147
- ? this.ctx.config.wakeNamesAdmin ?? []
148
- : this.ctx.config.wakeNamesMember ?? [];
145
+ // 2026-11-18 本地改:用户唤醒词 / 他人唤醒词合并成一张「唤醒词」表,
146
+ // 群里任何人(不管是不是管理员)说了都算叫到我。
147
+ const wakeNames = [...(this.ctx.config.wakeNamesAdmin ?? []), ...(this.ctx.config.wakeNamesMember ?? [])];
149
148
  if (wakeNames.length > 0) {
150
149
  const text = segmentText(inbound.segments, inbound.raw);
151
150
  if (detectWakeName(text, wakeNames)) {
@@ -154,7 +153,7 @@ export class InboundPipeline {
154
153
  currentTrace()?.emit('mention', {
155
154
  ok: true,
156
155
  reason: TRACE_REASONS.inboundWakeName,
157
- data: { names: [...wakeNames], textLen: text.length, preview: text.slice(0, 40), role },
156
+ data: { names: [...wakeNames], textLen: text.length, preview: text.slice(0, 40) },
158
157
  });
159
158
  }
160
159
  }
package/lib/index.js CHANGED
@@ -252,6 +252,8 @@ export const Config = z.object({
252
252
  .description('私聊附加设定文件路径(T4 PR 移植):支持 ~/ 展开;文件内容(剥行首尾空白)注入私聊会话 system prompt 的「本会话附加设定」段,文件编辑后即时生效(mtime 缓存失效);留空 = 不注入(默认)'),
253
253
  groupPromptFile: z.string().default('')
254
254
  .description('群聊附加设定文件路径(T4 PR 移植):同 dmPromptFile,只对群聊(group:)会话生效;留空 = 不注入(默认)'),
255
+ groupContextLines: z.number().min(0).max(200).default(0)
256
+ .description('群聊参考上下文条数(本地加 2026-11-18):被 @ 时把群里最近 N 条消息拼进上下文;0 = 不参考'),
255
257
  memoryFilesEnabled: z.boolean().default(false)
256
258
  .description('记忆文件开关(T4 PR 移植):开启后把 memoryFiles 列表里的文件内容注入私聊会话 system prompt 的「我的记忆」段(单文件 8000 字符、总量 12000 字符截断;群聊不喂记忆);默认关'),
257
259
  memoryFiles: z.array(z.string()).default([])
@@ -559,6 +561,7 @@ export function apply(ctx, config) {
559
561
  startupResumeEnabled: config.startupResumeEnabled,
560
562
  dmPromptFile: config.dmPromptFile,
561
563
  groupPromptFile: config.groupPromptFile,
564
+ groupContextLines: config.groupContextLines,
562
565
  memoryFilesEnabled: config.memoryFilesEnabled,
563
566
  memoryFiles: config.memoryFiles,
564
567
  chatTailsEnabled: config.chatTailsEnabled,
package/lib/prompt.js CHANGED
@@ -67,6 +67,8 @@ export function buildPlatformPrompt(restrictedMembers, extra = '', memoryText =
67
67
  text += '- QQ 不渲染 Markdown:请输出纯文本。用「1. 2. 3.」编号或「- 」列表;行内代码用反引号包住即可(会原样显示)。\n';
68
68
  text += '- 需要发送图片时用 qq_send_image(本地路径或 URL);文件用 qq_send_file;语音 qq_send_voice;视频 qq_send_video。\n';
69
69
  text += '- 想以「合并转发」卡片展示多条消息(代码+说明、分步报告)时,用 qq_send_forward。\n';
70
+ // 本地加(2026-11-18):要「先吱一声」的场合统一走 qq_send_segments。
71
+ text += '- 要「先吱一声」的时候(发图、出视频、点歌、发语音之前先说一句),那句招呼用 qq_send_segments 发。\n';
70
72
  text += '- 用户发来的图片/语音/视频在消息文本里以 [图片]/[语音]/[视频] 占位,图片/视频解析成功后替换为带本地路径的标注(如 [图片:路径]),语音保持 [语音](转写另行附上);如需查看图片内容,请使用当前可用的图像查看/描述工具;若没有可用工具,则如实告诉用户当前无法直接查看图片。\n';
71
73
  text += '- 群聊消息带 [HH:MM 昵称(QQ)·档位] 前缀(档位:管理员/成员,由插件标注发言者权限),被 @ 时带 [@我];私聊只带 [HH:MM] 时间戳前缀,没有昵称与档位。\n';
72
74
  text += '- 私聊消息的信封带 mid="…":那是这条消息的 id(纯数字,可能是负数),需要用某条消息做指代时原样抄,不要改写、补零或加引号。\n';
@@ -70,7 +70,7 @@ export const SETTINGS_GROUPS = {
70
70
  connection: ['mode', 'host', 'port', 'url', 'accessToken', 'botQQ'],
71
71
  // 2026-11-18:allowAllUsers 从权限组摘掉——dmPolicy=open 现在就是对所有人开放,
72
72
  // 这个开关不再有界面入口(schema 与 BOOLEAN_KEYS 保留,老配置里的键照样能读)。
73
- permissions: ['requireMention', 'memberTools', 'adminUsers', 'dmPolicy', 'groupPolicy', 'allowFrom', 'groupAllowFrom', 'wakeNamesAdmin', 'wakeNamesMember', 'replyCountsAsMention', 'atAllCountsAsMention', 'reactionOnMention', 'reactionEmoji', 'faceStyle', 'pokeEnabled', 'restrictedMemberPrefix', 'sensitivePatterns'],
73
+ permissions: ['requireMention', 'memberTools', 'adminUsers', 'dmPolicy', 'groupPolicy', 'allowFrom', 'groupAllowFrom', 'wakeNamesAdmin', 'wakeNamesMember', 'replyCountsAsMention', 'atAllCountsAsMention', 'reactionOnMention', 'reactionEmoji', 'faceStyle', 'pokeEnabled', 'restrictedMemberPrefix', 'sensitivePatterns', 'groupContextLines'],
74
74
  behavior: ['interimMessages', 'interimRecall', 'interimRecallMs', 'sendErrorNotice', 'unknownCommand', 'rateLimitPerMinute', 'newMessagePolicy', 'autoSteerPolicy', 'deferredTimeoutMs', 'inboxQueueEnabled', 'inboxQueueDelayMs', 'titleSyncEnabled', 'ignoreSelf', 'sidebarEntryEnabled'],
75
75
  // #58 群聊旁观:默认全关/空(enabled=false 时其余四键零行为)。
76
76
  session: ['titleSyncEnabled', 'startupResumeEnabled', 'newSessionGreeting', 'memoryFilesEnabled', 'memoryFiles', 'agentPreset', 'workspacePath', 'groupWorkspacePath', 'forceSessionId', 'dmPromptFile', 'groupPromptFile'],
@@ -100,6 +100,8 @@ export const SCHEMA_DEFAULTS = {
100
100
  // PENDING:私聊/群聊提示词文件(贡献者默认 ~/.dsh 路径;本仓 T4 拍板默认关 = '')。
101
101
  dmPromptFile: '',
102
102
  groupPromptFile: '',
103
+ // 本地加(2026-11-18):被 @ 时带上的群聊上下文条数(schema 默认 0)。
104
+ groupContextLines: 0,
103
105
  // T5 翻转:下载 SSRF 防护逃生门(原 false)。
104
106
  allowPrivateHosts: true,
105
107
  ignoreSelf: true,
@@ -216,7 +218,7 @@ const ENUM_KEYS = {
216
218
  logLevel: ['debug', 'info', 'warn', 'error'],
217
219
  sttEngine: ['auto', 'openai', 'whisper-cpp', 'custom'],
218
220
  };
219
- const NUMBER_KEYS = ['port', 'interimRecallMs', 'rateLimitPerMinute', 'deferredTimeoutMs', 'textImageThreshold', 'chatIdleEvictDays', 'outboundImageMaxBytes', 'maxVoiceBytes', 'maxFileBytes', 'inboundImageMaxPx', 'inboundFileMaxBytes', 'inboxQueueDelayMs', 'bystanderCapacity', 'bystanderCooldownMinutes', 'bystanderDailyLimit', 'reactionEmoji'];
221
+ const NUMBER_KEYS = ['port', 'interimRecallMs', 'rateLimitPerMinute', 'deferredTimeoutMs', 'textImageThreshold', 'chatIdleEvictDays', 'outboundImageMaxBytes', 'maxVoiceBytes', 'maxFileBytes', 'inboundImageMaxPx', 'inboundFileMaxBytes', 'inboxQueueDelayMs', 'groupContextLines', 'bystanderCapacity', 'bystanderCooldownMinutes', 'bystanderDailyLimit', 'reactionEmoji'];
220
222
  /** 数字键取值范围(评审 B4:port 1–65535、时长/频控 ≥0;越界在 Remote 层拒绝,不再只依赖宿主回滚兜底)。 */
221
223
  const NUMBER_RANGE = {
222
224
  port: [1, 65535],
@@ -232,6 +234,8 @@ const NUMBER_RANGE = {
232
234
  inboundFileMaxBytes: [0, undefined],
233
235
  // T7:合并窗口毫秒数(≥0;0=立即投递,等同关闭合并但串行链仍生效)。
234
236
  inboxQueueDelayMs: [0, undefined],
237
+ // 本地加(2026-11-18):群聊上下文条数(0 = 不参考,上限 200 条)。
238
+ groupContextLines: [0, 200],
235
239
  // #58 旁观:容量条数 / 冷却分钟 / 每日上限。
236
240
  bystanderCapacity: [5, 500],
237
241
  bystanderCooldownMinutes: [5, 1440],
@@ -148,6 +148,8 @@ export interface BridgeConfig {
148
148
  dmPromptFile?: string;
149
149
  /** T4 (PR port 提示词文件):群聊(group:)会话的附加设定文件路径;absent/空 = 不注入。 */
150
150
  groupPromptFile?: string;
151
+ /** 本地加(2026-11-18):被 @ 时带上的群聊上下文条数(0/absent = 不参考,上限 200)。 */
152
+ groupContextLines?: number;
151
153
  /** T4 (PR port 记忆文件):记忆文件开关(默认关,裁定口径);只对私聊生效。 */
152
154
  memoryFilesEnabled?: boolean;
153
155
  /** T4 (PR port 记忆文件):记忆文件路径列表(~/ 展开;单文件 8000 字符、
@@ -264,6 +264,7 @@ export interface Config {
264
264
  dmPromptFile: string;
265
265
  /** T4 (PR port 提示词文件):群聊(group:)会话的附加设定文件路径;空 = 不注入(默认)。 */
266
266
  groupPromptFile: string;
267
+ groupContextLines: number;
267
268
  /** T4 (PR port 记忆文件):记忆文件开关(默认关;只喂私聊)。 */
268
269
  memoryFilesEnabled: boolean;
269
270
  /** T4 (PR port 记忆文件):记忆文件路径列表。 */
package/package.json CHANGED
@@ -1,110 +1,110 @@
1
- {
2
- "name": "dsh-onebot-genji",
3
- "version": "0.12.1",
4
- "description": "由 InsaneGenji 维护的 QQ 通道分叉(fork 自 dsh-onebot-qq@0.11.0):在 OneBot 11 / NapCat 通道基础上加了回合形式掷骰(语音条、表情包概率)、双发闸、引用的合并转发展开、正文气泡切分。仓库 github.com/InsaneGenji/dsh-onebot-genji,上游 github.com/mario841859784/dsh-onebot .",
5
- "keywords": [
6
- "dsh",
7
- "onebot",
8
- "onebot11",
9
- "qq",
10
- "qq-bot",
11
- "qqbot",
12
- "napcat",
13
- "lagrange",
14
- "llonebot",
15
- "go-cqhttp",
16
- "deepseek",
17
- "deepseek-harness",
18
- "harness",
19
- "bridge",
20
- "chatbot"
21
- ],
22
- "private": false,
23
- "type": "module",
24
- "main": "lib/index.js",
25
- "types": "lib/types/index.d.ts",
26
- "exports": {
27
- ".": {
28
- "types": "./lib/types/index.d.ts",
29
- "default": "./lib/index.js"
30
- },
31
- "./client": "./lib/client.js",
32
- "./settings-remote": "./lib/settings-remote.js",
33
- "./package.json": "./package.json"
34
- },
35
- "files": [
36
- "lib",
37
- "!lib/*.bak-*",
38
- "cordis.patch.yml"
39
- ],
40
- "license": "BSD-3-Clause",
41
- "repository": {
42
- "type": "git",
43
- "url": "git+https://github.com/InsaneGenji/dsh-onebot-genji.git"
44
- },
45
- "homepage": "https://github.com/InsaneGenji/dsh-onebot-genji#readme",
46
- "bugs": {
47
- "url": "https://github.com/InsaneGenji/dsh-onebot-genji/issues"
48
- },
49
- "engines": {
50
- "dsh": ">=0.1.5-rc.1 <0.1.6-0 || >=0.1.6-alpha.1 <0.1.7-0 || >=0.1.7-alpha.1 <0.2.0-0 || >=0.2.0-rc.1 <0.3.0-0 || >=0.2.1-0 <0.3.0-0 || >=0.2.2-0 <0.2.3-0",
51
- "node": ">=22"
52
- },
53
- "dsh": {
54
- "bundle": {
55
- "patch": "./cordis.patch.yml"
56
- },
57
- "client": {
58
- "platform": "web"
59
- }
60
- },
61
- "dshx": {
62
- "contributes": {
63
- "tools": [
64
- "qq_send_image",
65
- "qq_send_voice",
66
- "qq_send_video",
67
- "qq_send_file",
68
- "qq_send_forward",
69
- "qq_napcat_api",
70
- "qq_group_history"
71
- ],
72
- "skills": []
73
- }
74
- },
75
- "peerDependencies": {
76
- "@deepseek-ai/cordis": "^4.0.2",
77
- "@deepseek-ai/dsh-agent": ">=0.1.5-rc.1 <0.1.6-0 || >=0.1.6-alpha.1 <0.1.7-0 || >=0.1.7-alpha.1 <0.2.0-0 || >=0.2.0-rc.1 <0.3.0-0 || >=0.2.2-0 <0.2.3-0",
78
- "@deepseek-ai/dsh-llm": ">=0.1.5-rc.1 <0.1.6-0 || >=0.1.6-alpha.1 <0.1.7-0 || >=0.1.7-alpha.1 <0.2.0-0 || >=0.2.0-rc.1 <0.3.0-0",
79
- "@deepseek-ai/dsh-session": ">=0.1.5-rc.1 <0.1.6-0 || >=0.1.6-alpha.1 <0.1.7-0 || >=0.1.7-alpha.1 <0.2.0-0 || >=0.2.0-rc.1 <0.3.0-0",
80
- "@deepseek-ai/dsh-system-prompt": ">=0.1.5-rc.1 <0.1.6-0 || >=0.1.6-alpha.1 <0.1.7-0 || >=0.1.7-alpha.1 <0.2.0-0 || >=0.2.0-rc.1 <0.3.0-0",
81
- "@deepseek-ai/dsh-tools": ">=0.1.5-rc.1 <0.1.6-0 || >=0.1.6-alpha.1 <0.1.7-0 || >=0.1.7-alpha.1 <0.2.0-0 || >=0.2.0-rc.1 <0.3.0-0",
82
- "@deepseek-ai/dsh-typert-protocol": ">=0.1.5-rc.1 <0.1.6-0 || >=0.1.6-alpha.1 <0.1.7-0 || >=0.1.7-alpha.1 <0.2.0-0 || >=0.2.0-rc.1 <0.3.0-0",
83
- "@deepseek-ai/dsh-util-values": ">=0.1.5-rc.1 <0.1.6-0 || >=0.1.6-alpha.1 <0.1.7-0 || >=0.1.7-alpha.1 <0.2.0-0 || >=0.2.0-rc.1 <0.3.0-0",
84
- "@deepseek-ai/schemastery": "^3.18.0 || >=3.18.6-alpha.1 <3.19.0-0",
85
- "schemastery": "^3.18.0"
86
- },
87
- "dependencies": {
88
- "@napi-rs/canvas": "^1.0.6",
89
- "fontkit": "^2.0.4",
90
- "schemastery": "^3.18.0",
91
- "silk-wasm": "^3.7.1",
92
- "ws": "^8.18.0"
93
- },
94
- "optionalDependencies": {
95
- "gifuct-js": "^2.1.2"
96
- },
97
- "devDependencies": {
98
- "@types/node": "^24.0.0",
99
- "@types/ws": "^8.5.12",
100
- "typescript": "^5.9.0",
101
- "vitest": "^3.2.0"
102
- },
103
- "scripts": {
104
- "build": "./scripts/build.sh",
105
- "test": "vitest run",
106
- "replay": "node scripts/replay.mjs",
107
- "verify:injected-context": "node scripts/verify-injected-context.mjs",
108
- "verify:lan-management": "node scripts/verify-lan-management.mjs"
109
- }
110
- }
1
+ {
2
+ "name": "dsh-onebot-genji",
3
+ "version": "0.12.2",
4
+ "description": "由 InsaneGenji 维护的 QQ 通道分叉(fork 自 dsh-onebot-qq@0.11.0):在 OneBot 11 / NapCat 通道基础上加了回合形式掷骰(语音条、表情包概率)、双发闸、引用的合并转发展开、正文气泡切分。仓库 github.com/InsaneGenji/dsh-onebot-genji,上游 github.com/mario841859784/dsh-onebot .",
5
+ "keywords": [
6
+ "dsh",
7
+ "onebot",
8
+ "onebot11",
9
+ "qq",
10
+ "qq-bot",
11
+ "qqbot",
12
+ "napcat",
13
+ "lagrange",
14
+ "llonebot",
15
+ "go-cqhttp",
16
+ "deepseek",
17
+ "deepseek-harness",
18
+ "harness",
19
+ "bridge",
20
+ "chatbot"
21
+ ],
22
+ "private": false,
23
+ "type": "module",
24
+ "main": "lib/index.js",
25
+ "types": "lib/types/index.d.ts",
26
+ "exports": {
27
+ ".": {
28
+ "types": "./lib/types/index.d.ts",
29
+ "default": "./lib/index.js"
30
+ },
31
+ "./client": "./lib/client.js",
32
+ "./settings-remote": "./lib/settings-remote.js",
33
+ "./package.json": "./package.json"
34
+ },
35
+ "files": [
36
+ "lib",
37
+ "!lib/*.bak-*",
38
+ "cordis.patch.yml"
39
+ ],
40
+ "license": "BSD-3-Clause",
41
+ "repository": {
42
+ "type": "git",
43
+ "url": "git+https://github.com/InsaneGenji/dsh-onebot-genji.git"
44
+ },
45
+ "homepage": "https://github.com/InsaneGenji/dsh-onebot-genji#readme",
46
+ "bugs": {
47
+ "url": "https://github.com/InsaneGenji/dsh-onebot-genji/issues"
48
+ },
49
+ "engines": {
50
+ "dsh": ">=0.1.5-rc.1 <0.1.6-0 || >=0.1.6-alpha.1 <0.1.7-0 || >=0.1.7-alpha.1 <0.2.0-0 || >=0.2.0-rc.1 <0.3.0-0 || >=0.2.1-0 <0.3.0-0 || >=0.2.2-0 <0.2.3-0",
51
+ "node": ">=22"
52
+ },
53
+ "dsh": {
54
+ "bundle": {
55
+ "patch": "./cordis.patch.yml"
56
+ },
57
+ "client": {
58
+ "platform": "web"
59
+ }
60
+ },
61
+ "dshx": {
62
+ "contributes": {
63
+ "tools": [
64
+ "qq_send_image",
65
+ "qq_send_voice",
66
+ "qq_send_video",
67
+ "qq_send_file",
68
+ "qq_send_forward",
69
+ "qq_napcat_api",
70
+ "qq_group_history"
71
+ ],
72
+ "skills": []
73
+ }
74
+ },
75
+ "peerDependencies": {
76
+ "@deepseek-ai/cordis": "^4.0.2",
77
+ "@deepseek-ai/dsh-agent": ">=0.1.5-rc.1 <0.1.6-0 || >=0.1.6-alpha.1 <0.1.7-0 || >=0.1.7-alpha.1 <0.2.0-0 || >=0.2.0-rc.1 <0.3.0-0 || >=0.2.2-0 <0.2.3-0",
78
+ "@deepseek-ai/dsh-llm": ">=0.1.5-rc.1 <0.1.6-0 || >=0.1.6-alpha.1 <0.1.7-0 || >=0.1.7-alpha.1 <0.2.0-0 || >=0.2.0-rc.1 <0.3.0-0",
79
+ "@deepseek-ai/dsh-session": ">=0.1.5-rc.1 <0.1.6-0 || >=0.1.6-alpha.1 <0.1.7-0 || >=0.1.7-alpha.1 <0.2.0-0 || >=0.2.0-rc.1 <0.3.0-0",
80
+ "@deepseek-ai/dsh-system-prompt": ">=0.1.5-rc.1 <0.1.6-0 || >=0.1.6-alpha.1 <0.1.7-0 || >=0.1.7-alpha.1 <0.2.0-0 || >=0.2.0-rc.1 <0.3.0-0",
81
+ "@deepseek-ai/dsh-tools": ">=0.1.5-rc.1 <0.1.6-0 || >=0.1.6-alpha.1 <0.1.7-0 || >=0.1.7-alpha.1 <0.2.0-0 || >=0.2.0-rc.1 <0.3.0-0",
82
+ "@deepseek-ai/dsh-typert-protocol": ">=0.1.5-rc.1 <0.1.6-0 || >=0.1.6-alpha.1 <0.1.7-0 || >=0.1.7-alpha.1 <0.2.0-0 || >=0.2.0-rc.1 <0.3.0-0",
83
+ "@deepseek-ai/dsh-util-values": ">=0.1.5-rc.1 <0.1.6-0 || >=0.1.6-alpha.1 <0.1.7-0 || >=0.1.7-alpha.1 <0.2.0-0 || >=0.2.0-rc.1 <0.3.0-0",
84
+ "@deepseek-ai/schemastery": "^3.18.0 || >=3.18.6-alpha.1 <3.19.0-0",
85
+ "schemastery": "^3.18.0"
86
+ },
87
+ "dependencies": {
88
+ "@napi-rs/canvas": "^1.0.6",
89
+ "fontkit": "^2.0.4",
90
+ "schemastery": "^3.18.0",
91
+ "silk-wasm": "^3.7.1",
92
+ "ws": "^8.18.0"
93
+ },
94
+ "optionalDependencies": {
95
+ "gifuct-js": "^2.1.2"
96
+ },
97
+ "devDependencies": {
98
+ "@types/node": "^24.0.0",
99
+ "@types/ws": "^8.5.12",
100
+ "typescript": "^5.9.0",
101
+ "vitest": "^3.2.0"
102
+ },
103
+ "scripts": {
104
+ "build": "./scripts/build.sh",
105
+ "test": "vitest run",
106
+ "replay": "node scripts/replay.mjs",
107
+ "verify:injected-context": "node scripts/verify-injected-context.mjs",
108
+ "verify:lan-management": "node scripts/verify-lan-management.mjs"
109
+ }
110
+ }