dsh-onebot-genji 0.12.0 → 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/interim.js CHANGED
@@ -141,11 +141,6 @@ export class InterimTracker {
141
141
  const final = chat.loopPending;
142
142
  if (final !== null) {
143
143
  chat.loopPending = null;
144
- // 2026-11-16 双发闸:本回合已经用工具发过东西 → 正文不再重复一遍。
145
- if (this.ctx.toolWroteThisTurn?.(chatId) === true) {
146
- this.ctx.log('info', '本回合已用工具发过,终稿正文跳过: ' + chatId);
147
- return;
148
- }
149
144
  // T4 (PR port 沉默哨兵):整段只有哨兵 → 只记日志,不发送。
150
145
  if (isSilenceText(final)) {
151
146
  this.ctx.log('info', 'silenced turn for ' + chatId);
@@ -326,12 +321,8 @@ export class InterimTracker {
326
321
  if (chat.loopPending !== null) {
327
322
  const final = chat.loopPending;
328
323
  chat.loopPending = null;
329
- // 2026-11-16 双发闸:本回合已经用工具发过东西 → 正文不再重复一遍。
330
- if (this.ctx.toolWroteThisTurn?.(chatId) === true) {
331
- this.ctx.log('info', '本回合已用工具发过,终稿正文跳过: ' + chatId);
332
- }
333
324
  // T4 (PR port 沉默哨兵):整段只有哨兵 → 只记日志,不发送。
334
- else if (isSilenceText(final)) {
325
+ if (isSilenceText(final)) {
335
326
  this.ctx.log('info', 'silenced turn for ' + chatId);
336
327
  }
337
328
  else {
package/lib/outbound.js CHANGED
@@ -13,7 +13,7 @@ import { appendFile, mkdir } from 'node:fs/promises';
13
13
  import { join } from 'node:path';
14
14
  import { splitChatId } from './chat.js';
15
15
  import { OneBotActionError, OneBotNotConnectedError } from './connection.js';
16
- import { extractForwardBlocks, scanSensitive, splitIntoBubbles, stripMarkdown } from './split.js';
16
+ import { extractForwardBlocks, scanSensitive, stripMarkdown } from './split.js';
17
17
  import { renderTextImage } from './t2i/index.js';
18
18
  import { describeError } from './errors.js';
19
19
  import { TRACE_REASONS } from './trace.js';
@@ -439,20 +439,12 @@ export class OutboundPipeline {
439
439
  // T2 (PR port): 纯旁白按空正文处理(同一独立开关)。
440
440
  const plain = this.ctx.config.asideOnlySilentEnabled === true && isAsideOnly(plainRaw) ? '' : plainRaw;
441
441
  if (plain !== '') {
442
- // 2026-11-16 重打:正文切气泡(换行一行一条 / 长句按标点切 / 最多
443
- // 5 条),逐条发;引用卡片只挂在第一条上,别每条都带一遍。
444
- const bubbles = splitIntoBubbles(plain);
445
- let firstBubble = true;
446
- for (const bubble of bubbles) {
447
- // T2 (PR port): 出站防御第三闸——正文里的 [[at:QQ]] 换成真 at 段
448
- //(防御开关内;关闭时保持上游的单 text 段)。
449
- const segments = defense ? splitAtSegments(bubble) : [{ type: 'text', data: { text: bubble } }];
450
- const bubbleOptions = firstBubble ? { ...options, replyTo } : { ...options, replyTo: undefined };
451
- firstBubble = false;
452
- const id = await this.sendMsg(chatId, segments, bubbleOptions);
453
- if (id !== undefined)
454
- ids.push(id);
455
- }
442
+ // T2 (PR port): 出站防御第三闸——正文里的 [[at:QQ]] 换成真 at 段
443
+ //(防御开关内;关闭时保持上游的单 text 段)。
444
+ const segments = defense ? splitAtSegments(plain) : [{ type: 'text', data: { text: plain } }];
445
+ const id = await this.sendMsg(chatId, segments, { ...options, replyTo });
446
+ if (id !== undefined)
447
+ ids.push(id);
456
448
  }
457
449
  else {
458
450
  // pipeline-hooks.md #30: the empty-body skip used to be silent.
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';
@@ -68,11 +68,12 @@ export const SETTINGS_GROUPS = {
68
68
  // 0.10.0 重排(用户裁定方案 A):连接=通道配置 6 键;工作区/强制会话/提示词文件
69
69
  // 归 session;allowPrivateHosts 归 media;ignoreSelf/sidebarEntryEnabled 归 behavior。
70
70
  connection: ['mode', 'host', 'port', 'url', 'accessToken', 'botQQ'],
71
- permissions: ['requireMention', 'memberTools', 'adminUsers', 'dmPolicy', 'groupPolicy', 'allowAllUsers', 'allowFrom', 'groupAllowFrom', 'wakeNamesAdmin', 'wakeNamesMember', 'replyCountsAsMention', 'atAllCountsAsMention', 'reactionOnMention', 'reactionEmoji', 'faceStyle', 'pokeEnabled', 'restrictedMemberPrefix', 'sensitivePatterns'],
71
+ // 2026-11-18:allowAllUsers 从权限组摘掉——dmPolicy=open 现在就是对所有人开放,
72
+ // 这个开关不再有界面入口(schema 与 BOOLEAN_KEYS 保留,老配置里的键照样能读)。
73
+ permissions: ['requireMention', 'memberTools', 'adminUsers', 'dmPolicy', 'groupPolicy', 'allowFrom', 'groupAllowFrom', 'wakeNamesAdmin', 'wakeNamesMember', 'replyCountsAsMention', 'atAllCountsAsMention', 'reactionOnMention', 'reactionEmoji', 'faceStyle', 'pokeEnabled', 'restrictedMemberPrefix', 'sensitivePatterns', 'groupContextLines'],
72
74
  behavior: ['interimMessages', 'interimRecall', 'interimRecallMs', 'sendErrorNotice', 'unknownCommand', 'rateLimitPerMinute', 'newMessagePolicy', 'autoSteerPolicy', 'deferredTimeoutMs', 'inboxQueueEnabled', 'inboxQueueDelayMs', 'titleSyncEnabled', 'ignoreSelf', 'sidebarEntryEnabled'],
73
75
  // #58 群聊旁观:默认全关/空(enabled=false 时其余四键零行为)。
74
- bystander: ['bystanderEnabled', 'bystanderCapacity', 'bystanderCooldownMinutes', 'bystanderDailyLimit', 'bystanderTopics'],
75
- session: ['newSessionGreeting', 'firstMessageAsUser', 'memoryFilesEnabled', 'memoryFiles', 'agentPreset', 'workspacePath', 'groupWorkspacePath', 'forceSessionId', 'dmPromptFile', 'groupPromptFile', 'startupResumeEnabled'],
76
+ session: ['titleSyncEnabled', 'startupResumeEnabled', 'newSessionGreeting', 'memoryFilesEnabled', 'memoryFiles', 'agentPreset', 'workspacePath', 'groupWorkspacePath', 'forceSessionId', 'dmPromptFile', 'groupPromptFile'],
76
77
  media: ['sttEnabled', 'sttEngine', 'sttCommand', 'sttArgs', 'sttModel', 'textImageEnabled', 'textImageThreshold', 'cardFooter', 'fontFiles', 'fontFamilies', 'outboundImageMaxBytes', 'maxVoiceBytes', 'maxFileBytes', 'inboundImageMaxPx', 'inboundFileMaxBytes', 'gifFramesEnabled', 'allowPrivateHosts'],
77
78
  diagnostics: ['actionAuditEnabled', 'traceEnabled', 'recordInbound', 'inboxRedact', 'injectEnabled', 'injectDryRun', 'logLevel'],
78
79
  };
@@ -99,6 +100,8 @@ export const SCHEMA_DEFAULTS = {
99
100
  // PENDING:私聊/群聊提示词文件(贡献者默认 ~/.dsh 路径;本仓 T4 拍板默认关 = '')。
100
101
  dmPromptFile: '',
101
102
  groupPromptFile: '',
103
+ // 本地加(2026-11-18):被 @ 时带上的群聊上下文条数(schema 默认 0)。
104
+ groupContextLines: 0,
102
105
  // T5 翻转:下载 SSRF 防护逃生门(原 false)。
103
106
  allowPrivateHosts: true,
104
107
  ignoreSelf: true,
@@ -151,7 +154,7 @@ export const SCHEMA_DEFAULTS = {
151
154
  inboxQueueEnabled: false,
152
155
  inboxQueueDelayMs: 600,
153
156
  // T24 (PR port 会话标题同步):开关默认关(裁定口径;钉住态标题永不覆盖)。
154
- titleSyncEnabled: false,
157
+ titleSyncEnabled: true,
155
158
  // PENDING:新会话欢迎语/首条消息按用户身份发送。
156
159
  newSessionGreeting: true,
157
160
  firstMessageAsUser: true,
@@ -215,7 +218,7 @@ const ENUM_KEYS = {
215
218
  logLevel: ['debug', 'info', 'warn', 'error'],
216
219
  sttEngine: ['auto', 'openai', 'whisper-cpp', 'custom'],
217
220
  };
218
- 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'];
219
222
  /** 数字键取值范围(评审 B4:port 1–65535、时长/频控 ≥0;越界在 Remote 层拒绝,不再只依赖宿主回滚兜底)。 */
220
223
  const NUMBER_RANGE = {
221
224
  port: [1, 65535],
@@ -231,6 +234,8 @@ const NUMBER_RANGE = {
231
234
  inboundFileMaxBytes: [0, undefined],
232
235
  // T7:合并窗口毫秒数(≥0;0=立即投递,等同关闭合并但串行链仍生效)。
233
236
  inboxQueueDelayMs: [0, undefined],
237
+ // 本地加(2026-11-18):群聊上下文条数(0 = 不参考,上限 200 条)。
238
+ groupContextLines: [0, 200],
234
239
  // #58 旁观:容量条数 / 冷却分钟 / 每日上限。
235
240
  bystanderCapacity: [5, 500],
236
241
  bystanderCooldownMinutes: [5, 1440],
@@ -406,7 +411,7 @@ export function validatePatch(patch) {
406
411
  if (typeof value === 'number' && Number.isFinite(value) && value >= min && (max === undefined || value <= max))
407
412
  clean[key] = value;
408
413
  else
409
- issues.push(`${key} 必须是 ${max === undefined ? `≥${min}` : `${min}–${max}`} 的有限数字`);
414
+ issues.push(`${key} 必须是 ${max === undefined ? `≥${min}` : `${min}–${max}`} 的整数`);
410
415
  }
411
416
  else if (BOOLEAN_KEYS.includes(key)) {
412
417
  if (typeof value === 'boolean')
package/lib/split.js CHANGED
@@ -83,56 +83,6 @@ export function extractForwardBlocks(text, defaultName) {
83
83
  });
84
84
  return { body, nodes };
85
85
  }
86
- // ── 气泡切分(2026-11-16 重打;0.11.0 把老 splitIntoBubbles 删了)──────────
87
- // 主人 2026-11-07 定的规矩:正文里有换行就一行一条;没有换行且超过 30 字就
88
- // 按句号/问号/叹号切;最多 5 条,超了相邻合并(从末尾往前合,尾巴最长)。
89
- /** 一回合最多几个气泡。 */
90
- export const BUBBLE_MAX = 5;
91
- /** 单段没有换行时,超过这个字数才按句子切。 */
92
- export const BUBBLE_SENTENCE_MIN = 30;
93
- /**
94
- * Strip trailing CJK full stops from every line.
95
- * 2026-11-16 主人要求:聊天里句末不带「。」;问号、叹号照留。
96
- * @param text - outbound text.
97
- * @returns the same text with line-ending 「。」 removed.
98
- */
99
- export function stripTrailingPeriods(text) {
100
- return text
101
- .split('\n')
102
- .map(line => line.replace(/[。。]+[ \t]*$/u, ''))
103
- .join('\n');
104
- }
105
- /**
106
- * Split a reply body into QQ bubbles.
107
- * @param text - plain outbound text (after Markdown stripping).
108
- * @returns the bubbles, or [] when the text is blank.
109
- */
110
- export function splitIntoBubbles(text) {
111
- // 2026-11-16 主人要的:句末的「。」一律剥掉(问号叹号照留)。
112
- const raw = stripTrailingPeriods(text).trim();
113
- if (raw === '')
114
- return [];
115
- let parts;
116
- if (raw.includes('\n')) {
117
- // 换行(单行或空行都算)→ 一行一条。
118
- parts = raw.split('\n').map(line => line.trim()).filter(line => line !== '');
119
- }
120
- else if (raw.length > BUBBLE_SENTENCE_MIN) {
121
- // 单段长文 → 按句末标点切,标点留在前一句尾巴上。
122
- parts = raw.split(/(?<=[。!?!?;;])/u).map(part => part.trim()).filter(part => part !== '');
123
- }
124
- else {
125
- return [raw];
126
- }
127
- if (parts.length <= 1)
128
- return [raw];
129
- // 超过上限:从末尾往前把相邻两条合并,保证顺序不变。
130
- while (parts.length > BUBBLE_MAX) {
131
- const n = parts.length;
132
- parts.splice(n - 2, 2, parts[n - 2] + parts[n - 1]);
133
- }
134
- return parts;
135
- }
136
86
  /** Sensitive-intent audit: log a WARNING when outbound text matches. */
137
87
  const DEFAULT_SENSITIVE_PATTERNS = [
138
88
  /(?:rm\s+-rf|format\s+[a-z]:|diskpart|mkfs\.)/i,
package/lib/tools.js CHANGED
@@ -325,8 +325,6 @@ export function registerTools(ctx, bridge, connection, limits, log) {
325
325
  if (text.trim() === '')
326
326
  throw new Error('qq_send_text: text 不能为空');
327
327
  const chatId = resolveChat(bridge, exec, a.chat_id);
328
- // 2026-11-16 双发闸:用工具说过话,本回合终稿正文就不再重复一遍。
329
- bridge.noteToolWrite?.(chatId);
330
328
  const replyTo = typeof a.reply_to === 'string' && a.reply_to.trim() !== '' ? a.reply_to.trim() : undefined;
331
329
  const ids = await bridge.sendToChat(chatId, text, replyTo === undefined ? {} : { replyTo });
332
330
  return { sent: true, messageId: ids.length > 0 ? String(ids[ids.length - 1]) : null };
@@ -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.0",
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
+ }