dsh-fish-soul 0.18.9 → 0.18.10

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/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  让一个 QQ 小号背后有"同一个人":固定人格、按人记记忆、有自己的生活节奏、会主动开口;同一个"她"同时出现在 QQ、B站、抖音。
4
4
 
5
- DSH 插件(单角色 `feiyu`)。版本 **0.18.9**。
5
+ DSH 插件(单角色 `feiyu`)。版本 **0.18.10**。
6
6
 
7
7
  QQ 交流群:**1125962189**
8
8
 
@@ -11,7 +11,7 @@ import { adapterOf } from './douyin-adapter.js';
11
11
  import { findVideoRefs } from './browse.js';
12
12
  import { prepareImage } from './imageconv.js';
13
13
  import { sanitizeName, sanitizeUserText } from './channels/onebot.js';
14
- import { mediaTypeOf, isInside, fetchImageBytes, splitChannelId, service, normalizeRelayId } from './gateway-util.js';
14
+ import { mediaTypeOf, isInside, fetchInboundImage, splitChannelId, service, normalizeRelayId } from './gateway-util.js';
15
15
 
16
16
  const IMAGE_EXT = new Set(['.png', '.jpg', '.jpeg', '.gif', '.webp']);
17
17
  const MAX_IMAGE_BYTES = 10 * 1024 * 1024;
@@ -320,27 +320,40 @@ export const mediaMethods = {
320
320
  }
321
321
  },
322
322
 
323
- async admitImages(text, items, sessionId = '') {
323
+ async admitImages(text, items, sessionId = '', { backlog } = {}) {
324
324
  const imgs = [];
325
325
  for (const { m } of items) for (const img of m.images) if (imgs.length < MAX_INBOUND_IMAGES) imgs.push({ img, m });
326
+ // #151:backlog 里的图接在本轮图后面,合计不超过 4 张。文字行由 index.js 渲染(这里只补图,避免重复)。
327
+ const backlogImgs = (backlog?.images ?? []).slice(0, Math.max(0, MAX_INBOUND_IMAGES - imgs.length));
326
328
  const base = [{ type: 'text', text }];
329
+ for (const x of backlogImgs) imgs.push(x);
327
330
  if (imgs.length === 0) return base;
328
331
  const attachments = service(this.ctx, 'attachments');
329
332
  if (!attachments || typeof attachments.admitPromptContent !== 'function') {
330
333
  // 宿主没提供 attachments:图片只能丢,但得留痕 —— 否则表现是「她说看不见图」而日志空白
331
334
  this.log('warn', `[fish-soul] 宿主没有 attachments 服务,这 ${imgs.length} 张图送不进去(只转文字)`);
335
+ this.diag?.add('image-skip', { reason: 'no-service', count: imgs.length }, 'warn');
332
336
  return base;
333
337
  }
334
338
  const parts = [...base];
335
339
  for (const [i, { img, m }] of imgs.entries()) {
336
- const bytes = await fetchImageBytes(img);
337
- if (bytes === null) {
340
+ // #151/#147:注入只换「下载」这半截,分类/限额仍由 fetchInboundImage 的契约管。
341
+ // imageDownload(img) 收图对象、返回 {ok, bytes?, reason?}(fetchInboundImage 形状)。
342
+ const dl = this.imageDownload ?? ((i) => fetchInboundImage(i));
343
+ let r = await dl(img).catch(() => null);
344
+ if (r === null) r = { ok: false, reason: 'download' };
345
+ if (r.ok !== true) {
338
346
  // 下载失败(URL 过期 / 端口不在白名单 / 超时)以前是静默 continue,
339
- // 表现就是「她没看见图」而查不出为什么。留一行 warn。
340
- const src = String(img.url || img.file || '').slice(0, 80);
341
- this.log('warn', `[fish-soul] 图片下载失败,这轮她看不到:${src || '(没有 url/file)'}`);
347
+ // 表现就是「她没看见图」而查不出为什么。留一行 warn,同时落 diag-log ——
348
+ // 桌面版宿主日志不落盘(#147),diag-log 是用户唯一能自查的通道。
349
+ const raw = String(img.url || img.file || '');
350
+ let host = '';
351
+ try { host = new URL(raw).hostname; } catch { /* 不是 URL(inline / 相对路径) */ }
352
+ this.log('warn', `[fish-soul] 图片下载失败,这轮她看不到:${raw.slice(0, 80) || '(没有 url/file)'}`);
353
+ this.diag?.add('image-skip', { reason: r.reason, host }, 'warn');
342
354
  continue;
343
355
  }
356
+ const bytes = r.bytes;
344
357
  const mediaType = mediaTypeOf(bytes);
345
358
  this.stickers?.remember(sessionId, { bytes, mediaType, sticker: img.sticker === true, summary: img.summary, from: m.nickname || m.userId });
346
359
  parts.push({ type: 'image', data: bytes.toString('base64'), mediaType, name: `qq-${m.messageId || 'x'}-${i + 1}.${mediaType.split('/')[1]}` });
@@ -42,22 +42,38 @@ export function isInside(root, target) {
42
42
  return rel === '' || (!rel.startsWith('..') && !isAbsolute(rel));
43
43
  }
44
44
 
45
- /** 消息里的图片不可信:只接受限额的内联数据或公网 URL。 */
45
+ // #147:8 秒对弱网上的大图太苛(真机 3.7KB 的小图就吃了 5.2s);重试一次。
46
+ const INBOUND_IMAGE_TIMEOUT_MS = 20000;
47
+
48
+ /**
49
+ * 消息里的图片不可信:只接受限额的内联数据或公网 URL。
50
+ * 每个远程源各试两次;inline 过限不重试(当场判死)。失败原因见返回的 ok:false。
51
+ */
52
+ export async function fetchInboundImage(img, download = safeDownload) {
53
+ const url = typeof img?.url === 'string' ? img.url.trim() : '';
54
+ const file = typeof img?.file === 'string' ? img.file.trim() : '';
55
+ for (const value of [url, file]) {
56
+ if (/^https?:\/\//i.test(value)) {
57
+ for (let n = 0; n < 2; n++) {
58
+ const bytes = await download(value, { maxBytes: MAX_IMAGE_BYTES, timeoutMs: INBOUND_IMAGE_TIMEOUT_MS });
59
+ if (bytes) return { ok: true, bytes };
60
+ }
61
+ } else {
62
+ const m = /^(?:data:[^;,]*;base64,|base64:\/\/)/.exec(value);
63
+ if (!m) continue;
64
+ if (value.length - m[0].length > Math.ceil(MAX_IMAGE_BYTES / 3) * 4) return { ok: false, reason: 'too-large' };
65
+ const bytes = Buffer.from(value.slice(m[0].length), 'base64');
66
+ if (bytes.length > 0 && bytes.length <= MAX_IMAGE_BYTES) return { ok: true, bytes };
67
+ if (bytes.length > 0) return { ok: false, reason: 'too-large' };
68
+ }
69
+ }
70
+ return { ok: false, reason: 'download' };
71
+ }
72
+
73
+ /** 兼容旧调用方:只关心字节。 */
46
74
  export async function fetchImageBytes(img, download = safeDownload) {
47
- const url = typeof img?.url === 'string' ? img.url.trim() : '';
48
- const file = typeof img?.file === 'string' ? img.file.trim() : '';
49
- for (const value of [url, file]) {
50
- if (/^https?:\/\//i.test(value)) {
51
- const bytes = await download(value, { maxBytes: MAX_IMAGE_BYTES, timeoutMs: 8000 });
52
- if (bytes) return bytes;
53
- } else {
54
- const m = /^(?:data:[^;,]*;base64,|base64:\/\/)/.exec(value);
55
- if (!m || value.length - m[0].length > Math.ceil(MAX_IMAGE_BYTES / 3) * 4) continue;
56
- const bytes = Buffer.from(value.slice(m[0].length), 'base64');
57
- if (bytes.length > 0 && bytes.length <= MAX_IMAGE_BYTES) return bytes;
58
- }
59
- }
60
- return null;
75
+ const r = await fetchInboundImage(img, download);
76
+ return r.ok === true ? r.bytes : null;
61
77
  }
62
78
 
63
79
  /** 对话收尾标记:她觉得这一轮聊完了,就在回复最后单独一行写这个(发出去之前要剥掉)。 */
package/lib/gateway.js CHANGED
@@ -1120,14 +1120,39 @@ export class ChatGateway {
1120
1120
  /** 群里没点名的话攒起来(被叫到时一起给她看);同时数一分钟内的条数(判断是不是在刷屏)。 */
1121
1121
  pushBacklog(m) {
1122
1122
  const list = (this.backlog.get(m.channelId) ?? []).filter((x) => Date.now() - x.timeMs < BACKLOG_MAX_AGE_MS);
1123
- list.push({ name: sanitizeName(m.nickname || m.userId, m.userId), text: String(m.text ?? '').slice(0, 120), timeMs: m.timeMs, messageId: m.messageId });
1123
+ // #151:留住图。以前只存 text,「先发图再@我」时图在进 backlog 这一刻就丢了,
1124
+ // 她只能看到「【图片】」三个字。
1125
+ list.push({ name: sanitizeName(m.nickname || m.userId, m.userId), text: String(m.text ?? '').slice(0, 120), timeMs: m.timeMs, messageId: m.messageId, images: (m.images ?? []).slice(0, 4) });
1124
1126
  this.backlog.set(m.channelId, list.slice(-BACKLOG_LIMIT));
1125
1127
  }
1126
1128
 
1129
+ /**
1130
+ * #151:交出 { lines, images }。
1131
+ * lines 里带图的消息把「【图片】」改成「【图N在下面】」(N 从 1 编,标清是谁的),
1132
+ * images 取窗口内最近 2 张(别无限累积),label 带发送者+序号,让模型能把图和后一句对上。
1133
+ */
1127
1134
  takeBacklog(channelId, exclude) {
1128
1135
  const list = (this.backlog.get(channelId) ?? []).filter((x) => Date.now() - x.timeMs < BACKLOG_MAX_AGE_MS && !exclude.has(x.messageId));
1129
1136
  this.backlog.delete(channelId);
1130
- return list.slice(-10).map((x) => `${x.name}:${x.text}`);
1137
+ const recent = list.slice(-10);
1138
+ // 图按时间倒序取最近 2 张,编号按正序重排(图1 = 取到的里面较早的那张)。
1139
+ const picked = [];
1140
+ for (let i = recent.length - 1; i >= 0 && picked.length < 2; i--) {
1141
+ const b = recent[i];
1142
+ for (let j = (b.images?.length ?? 0) - 1; j >= 0 && picked.length < 2; j--) {
1143
+ picked.unshift({ img: b.images[j], m: { messageId: b.messageId, nickname: b.name, userId: b.name }, backlog: true });
1144
+ }
1145
+ }
1146
+ const images = picked.map((x, i) => ({ ...x, label: `${x.m.nickname}的图${i + 1}` }));
1147
+ // 给「有图且取到了」的消息改标注。一张消息可能有多张图,只标第一张取到的。
1148
+ const labeled = new Map();
1149
+ for (const [i, x] of images.entries()) if (!labeled.has(x.m.messageId)) labeled.set(x.m.messageId, i + 1);
1150
+ const lines = recent.map((x) => {
1151
+ const n = labeled.get(x.messageId);
1152
+ if (n !== undefined && x.text === '【图片】') return `${x.name}:【图${n}在下面】`;
1153
+ return `${x.name}:${x.text}`;
1154
+ });
1155
+ return { lines, images };
1131
1156
  }
1132
1157
 
1133
1158
  /** 这条没点名的群消息,她插一句的概率(插话关着 / 睡觉 / 冷却中 / 到了每小时上限 → 0)。 */
@@ -1321,7 +1346,7 @@ export class ChatGateway {
1321
1346
  this.turnMood.set(agent.id, this.moodOf(speakers[speakers.length - 1]?.person));
1322
1347
  // 只有插话(没有一条是点名 / 接着听的)才算"她自己想说"
1323
1348
  const interject = chat.chatType === 'group' && items.every((x) => x.interject === true);
1324
- const backlog = chat.chatType === 'group' ? this.takeBacklog(channelId, new Set(items.map(({ m }) => m.messageId))) : [];
1349
+ const backlog = chat.chatType === 'group' ? this.takeBacklog(channelId, new Set(items.map(({ m }) => m.messageId))) : { lines: [], images: [] };
1325
1350
  if (interject) this.interjectTurns.add(agent.id); else this.interjectTurns.delete(agent.id);
1326
1351
  this.soul.beginTurn(agent.id, {
1327
1352
  channel: sessionChannelOf(channelId),
@@ -1356,7 +1381,7 @@ export class ChatGateway {
1356
1381
  ? items.flatMap(({ m }) => m.voicePaths ?? []) : [];
1357
1382
  if (voicePaths.length) lines.push(`【本轮语音文件】可以用 sound_read 分析,路径为内部信息,不要在对外回复中输出:\n${voicePaths.join('\n')}`);
1358
1383
  lines.push(...await this.videoNotes(items));
1359
- const content = await this.admitImages(lines.join('\n'), items, agent.id);
1384
+ const content = await this.admitImages(lines.join('\n'), items, agent.id, { backlog });
1360
1385
  const last = items[items.length - 1].m;
1361
1386
  const mentionItem = [...items].reverse().find(({ m }) => m.mentioned)?.m ?? last;
1362
1387
  // 插话不引用(像自然接话);戳一戳没有真的消息可引用。replyTo 跟着这条 followup 消息的 source 走,不存共享 Map——并发 dispatch 各带各的,不会张冠李戴
package/lib/index.js CHANGED
@@ -810,11 +810,13 @@ async function startup(ctx, config, { log, gate }) {
810
810
  ORDER BY created_at DESC LIMIT 5
811
811
  `).all(session.channelId);
812
812
  if (recent.length > 0) lines.push(`[本群近期]`, ...recent.map((r) => `- ${r.content}`));
813
- if ((session.backlog ?? []).length > 0) lines.push('[刚才群里在聊(没叫你,只作参考)]', ...session.backlog.map((x) => `- ${x}`));
813
+ const backlogLines = Array.isArray(session.backlog) ? session.backlog : (session.backlog?.lines ?? []);
814
+ if (backlogLines.length > 0) lines.push('[刚才群里在聊(没叫你,只作参考)]', ...backlogLines.map((x) => `- ${x}`));
814
815
  if (session.interject === true) lines.push('[这轮没人叫你] 是你自己看到群里的话想插一句;插得自然点、短一点,接不上或者不合适就只输出 [不回]。');
815
- lines.push(...slang.contextLines(session.channelId, [...speakers.map((s) => s.query), ...(session.backlog ?? [])].join('\n')));
816
- } else if (inDouyinGroup && (session.backlog ?? []).length > 0) {
817
- lines.push('[刚才群里在聊(没叫你,只作参考)]', ...session.backlog.map((x) => `- ${x}`));
816
+ lines.push(...slang.contextLines(session.channelId, [...speakers.map((s) => s.query), ...(Array.isArray(session.backlog) ? session.backlog : (session.backlog?.lines ?? []))].join('\n')));
817
+ } else if (inDouyinGroup) {
818
+ const backlogLines = Array.isArray(session.backlog) ? session.backlog : (session.backlog?.lines ?? []);
819
+ if (backlogLines.length > 0) lines.push('[刚才群里在聊(没叫你,只作参考)]', ...backlogLines.map((x) => `- ${x}`));
818
820
  } else if (session.channel === 'qq-private' && session.channelId !== '') {
819
821
  lines.push(...slang.contextLines(session.channelId, [...(session.recentLines ?? []), ...speakers.map((s) => s.query)].join('\n')));
820
822
  }
package/package.json CHANGED
@@ -1,71 +1,71 @@
1
1
  {
2
- "name": "dsh-fish-soul",
3
- "version": "0.18.9",
4
- "description": "鱼 · 人格、按人记忆(可纠正、有印象、能导入旧聊天记录)、日程自走与主动开口,直连 SnowLuma 收发 QQ(群里会自己插话),B站 / 抖音小号私信与自己刷视频;按功能选模型并统计用量花费,能听会说 QQ 语音、收藏表情包、学群里的梗,可选上网查;心情影响说话、去 AI 味、每个群的设定、按聊天选模型、每晚写日记、每周记忆存档与可选周记(DSH 插件,单角色 feiyu ,v0.18.9)",
5
- "type": "module",
6
- "main": "./lib/index.js",
7
- "files": [
8
- "lib",
9
- "cordis.patch.yml"
10
- ],
11
- "license": "MIT",
12
- "repository": {
13
- "type": "git",
14
- "url": "git+https://github.com/Britneycode/dsh-fish-soul.git"
15
- },
16
- "homepage": "https://github.com/Britneycode/dsh-fish-soul#readme",
17
- "bugs": {
18
- "url": "https://github.com/Britneycode/dsh-fish-soul/issues"
19
- },
20
- "keywords": [
21
- "dsh-plugin",
22
- "dsh",
23
- "deepseek-harness",
24
- "persona",
25
- "memory",
26
- "qq",
27
- "bilibili",
28
- "douyin",
29
- "snowluma"
30
- ],
31
- "peerDependencies": {
32
- "@deepseek-ai/dsh-tools": "*",
33
- "@deepseek-ai/schemastery": "*"
34
- },
35
- "peerDependenciesMeta": {
36
- "@deepseek-ai/dsh-tools": {
37
- "optional": true
38
- },
39
- "@deepseek-ai/schemastery": {
40
- "optional": true
41
- }
42
- },
43
- "exports": {
44
- ".": "./lib/index.js",
45
- "./client": "./lib/client.js",
46
- "./package.json": "./package.json"
47
- },
48
- "engines": {
49
- "node": ">=22.5.0"
50
- },
51
- "dsh": {
52
- "bundle": {
53
- "patch": "./cordis.patch.yml"
54
- },
55
- "client": {
56
- "platform": "web",
57
- "inject": [
58
- "slots"
59
- ],
60
- "external": [
61
- "react",
62
- "@deepseek-ai/dsh-client-ui-primitives"
63
- ]
64
- }
65
- },
66
- "scripts": {
67
- "test": "node test/douyin-send.mjs && node test/douyin-mechanism.mjs && node test/douyin-route.mjs && node test/douyin-adapter.mjs && node test/douyin-contract.mjs && node test/memory-bulk-move.mjs && node test/safe-download.mjs && node test/douyin-exact-id.mjs && node test/douyin-pb-init.mjs && node test/douyin-conversation.mjs && node test/douyin-inbox.mjs && node test/douyin-quarantine.mjs && node test/douyin-send-target.mjs && node test/douyin-send-exclusive.mjs && node test/douyin-gap-dedupe.mjs && node test/douyin-message-id-dedupe.mjs && node test/douyin-read-fail-retry.mjs && node test/douyin-read-cache.mjs && node test/douyin-dm-media-conv.mjs && node test/douyin-read-fail-retry-poll.mjs && node test/douyin-inbox-contract.mjs && node test/person-attribution.mjs && node test/memory-owner-reassign.mjs && node test/douyin-poll-and-timer-safety.mjs && node test/p2-limits.mjs && node test/resource-safety.mjs && node test/leftover-edge-cases.mjs && node test/douyin-master-person-merge.mjs && node test/douyin-master-uid.mjs && node test/douyin-identity-e2e.mjs && node test/douyin-post-jobs.mjs && node test/retrieval-filtered-vectors.mjs && node test/security-boundaries.mjs && node test/douyin-cdp-cursor.mjs && node test/douyin-nav-timeout.mjs && node test/persona-isolation.mjs && node test/smoke.mjs && node test/douyin-browser.mjs && node test/douyin-page-alive.mjs && node test/douyin-eval-timeout.mjs && node test/douyin-bridge-timeout.mjs && node test/douyin-goto-budget.mjs && node test/douyin-music.mjs && node test/startup-gate.mjs && node test/outbox.mjs && node test/import-coverage.mjs && node test/update-check.mjs && node test/issue-fixes.mjs && node test/import-resume.mjs && node test/maibot-extras.mjs && node test/worldinfo.mjs && node test/memory-bulk.mjs && node test/memory-tiers.mjs && node test/memory-weekly.mjs && node test/issue-98-self-archive.mjs && node test/issue-99-memory-order.mjs && node test/issue-115-memory-date.mjs && node test/issue-119-memory-page.mjs && node test/issue-125-memory-filter.mjs && node test/issue-78-diagnostic.mjs && node test/memory-storage.mjs && node test/memory-storage-restore.mjs && node test/backup-restore.mjs && node test/douyin-group.mjs && node test/review-fixes.mjs && node test/at-reads-video.mjs && node test/search-source.mjs && node test/followups.mjs && node test/detail-config.mjs && node test/qq-send-any-image.mjs && node test/qq-read-attachment.mjs && node test/qq-batch-window.mjs && node test/comment-video.mjs && node test/frames.mjs && node test/face-name.mjs && node test/comment-reply.mjs && node test/chat-comment.mjs && node test/at-target.mjs && node test/quota-caps.mjs && node test/client-lint.mjs && node test/client-panels.mjs && node test/dsh-desktop.mjs && node test/group-mention-only.mjs && node test/qq-private-allowlist.mjs && node test/issue-59-interject.mjs && node test/issue-59-diagnose.mjs && node test/diag-douyin-running.mjs && node test/sticker-backfill.mjs && node test/issue-118-sticker-diagnostics.mjs && node test/sticker-manage.mjs && node test/bili-emotes.mjs && node test/qq-outbound-sanitize.mjs && node test/person-delete.mjs && node test/qq-group-admin.mjs && node test/douyin-recovery.mjs && node test/session-preset.mjs && node test/qq-connect-error.mjs && node test/douyin-comment-bridge.mjs && node test/douyin-comment-write-unknown.mjs && node test/douyin-reply-verify-status.mjs && node test/bili-comment-emoji.mjs && node test/douyin-state-echo.mjs && node test/issue-75-proactive.mjs && node test/issue-76-capability.mjs && node test/douyin-http-browse.mjs && node test/douyin-verify-backoff.mjs && node test/douyin-digg-bridge.mjs && node test/memory-evidence-transcript.mjs && node test/chat-archive-default.mjs && node test/issue-113-desktop-archive.mjs && node test/dream-transcript-wire.mjs && node test/douyin-frames-collect.mjs && node test/master-qq-uin-rebind.mjs && node test/douyin-session-health.mjs && node test/douyin-delivered.mjs && node test/douyin-card-share.mjs && node test/douyin-push-drop.mjs && node test/douyin-stranger-dm.mjs && node test/douyin-uid-binding.mjs && node test/image-webp-fallback.mjs && node test/douyin-emoji-fallback.mjs && node test/relay-other-platform.mjs && node test/relay-to-friend.mjs && node test/relay-config-route.mjs && node test/share-fallback.mjs && node test/share-quota-refund.mjs && node test/issue-101-voice-files.mjs && node test/voice-volcengine.mjs && node test/voice-minimax-dashscope.mjs && node test/bili-switch-persist.mjs && node test/cross-channel-context.mjs && node test/reply-target.mjs && node test/shared-session.mjs && node test/memory-source-label.mjs && node test/pending-delivery.mjs && node test/recall-window-78.mjs && node test/memory-recall-recent-78.mjs && node test/client-syntax.mjs && node test/diag-log.mjs && node test/check-rings.mjs && node test/release-workflow.mjs && node test/sticker-import-gif.mjs && node test/sticker-real-gif.mjs && node test/sticker-upload-binary.mjs && node test/sticker-vision-tags.mjs && node test/sticker-manual-tags.mjs && node test/sticker-auto-name.mjs && node test/self-update.mjs && node test/group-list.mjs && node test/douyin-inbox-noise.mjs && node test/douyin-inbox-diag.mjs && node test/douyin-inbox-stuck.mjs && node test/reply-window.mjs && node test/douyin-sticker-heuristic.mjs && node test/douyin-image-boundary.mjs && node test/media-image-boundary.mjs && node test/douyin-comment-identity-cid.mjs && node test/qq-mention-only-echo.mjs && node test/bili-panel-pagination.mjs && node test/bili-allowlist.mjs && node test/douyin-master-uid-mismatch.mjs && node test/check-test-chain.mjs && node test/check-route-guard.mjs && node test/check-client-imports.mjs && node test/check-secrets.mjs",
68
- "test:douyin": "node test/parallel.mjs 4 --only douyin",
69
- "test:fast": "node test/parallel.mjs 4 --skip \"douyin|browser\""
70
- }
2
+ "name": "dsh-fish-soul",
3
+ "version": "0.18.10",
4
+ "description": "鱼 · 人格、按人记忆(可纠正、有印象、能导入旧聊天记录)、日程自走与主动开口,直连 SnowLuma 收发 QQ(群里会自己插话),B站 / 抖音小号私信与自己刷视频;按功能选模型并统计用量花费,能听会说 QQ 语音、收藏表情包、学群里的梗,可选上网查;心情影响说话、去 AI 味、每个群的设定、按聊天选模型、每晚写日记、每周记忆存档与可选周记(DSH 插件,单角色 feiyu ,v0.18.10)",
5
+ "type": "module",
6
+ "main": "./lib/index.js",
7
+ "files": [
8
+ "lib",
9
+ "cordis.patch.yml"
10
+ ],
11
+ "license": "MIT",
12
+ "repository": {
13
+ "type": "git",
14
+ "url": "git+https://github.com/Britneycode/dsh-fish-soul.git"
15
+ },
16
+ "homepage": "https://github.com/Britneycode/dsh-fish-soul#readme",
17
+ "bugs": {
18
+ "url": "https://github.com/Britneycode/dsh-fish-soul/issues"
19
+ },
20
+ "keywords": [
21
+ "dsh-plugin",
22
+ "dsh",
23
+ "deepseek-harness",
24
+ "persona",
25
+ "memory",
26
+ "qq",
27
+ "bilibili",
28
+ "douyin",
29
+ "snowluma"
30
+ ],
31
+ "peerDependencies": {
32
+ "@deepseek-ai/dsh-tools": "*",
33
+ "@deepseek-ai/schemastery": "*"
34
+ },
35
+ "peerDependenciesMeta": {
36
+ "@deepseek-ai/dsh-tools": {
37
+ "optional": true
38
+ },
39
+ "@deepseek-ai/schemastery": {
40
+ "optional": true
41
+ }
42
+ },
43
+ "exports": {
44
+ ".": "./lib/index.js",
45
+ "./client": "./lib/client.js",
46
+ "./package.json": "./package.json"
47
+ },
48
+ "engines": {
49
+ "node": ">=22.5.0"
50
+ },
51
+ "dsh": {
52
+ "bundle": {
53
+ "patch": "./cordis.patch.yml"
54
+ },
55
+ "client": {
56
+ "platform": "web",
57
+ "inject": [
58
+ "slots"
59
+ ],
60
+ "external": [
61
+ "react",
62
+ "@deepseek-ai/dsh-client-ui-primitives"
63
+ ]
64
+ }
65
+ },
66
+ "scripts": {
67
+ "test": "node test/douyin-send.mjs && node test/douyin-mechanism.mjs && node test/douyin-route.mjs && node test/douyin-adapter.mjs && node test/douyin-contract.mjs && node test/memory-bulk-move.mjs && node test/safe-download.mjs && node test/douyin-exact-id.mjs && node test/douyin-pb-init.mjs && node test/douyin-conversation.mjs && node test/douyin-inbox.mjs && node test/douyin-quarantine.mjs && node test/douyin-send-target.mjs && node test/douyin-send-exclusive.mjs && node test/douyin-gap-dedupe.mjs && node test/douyin-message-id-dedupe.mjs && node test/douyin-read-fail-retry.mjs && node test/douyin-read-cache.mjs && node test/douyin-dm-media-conv.mjs && node test/douyin-read-fail-retry-poll.mjs && node test/douyin-inbox-contract.mjs && node test/person-attribution.mjs && node test/memory-owner-reassign.mjs && node test/douyin-poll-and-timer-safety.mjs && node test/p2-limits.mjs && node test/resource-safety.mjs && node test/leftover-edge-cases.mjs && node test/douyin-master-person-merge.mjs && node test/douyin-master-uid.mjs && node test/douyin-identity-e2e.mjs && node test/douyin-post-jobs.mjs && node test/retrieval-filtered-vectors.mjs && node test/security-boundaries.mjs && node test/douyin-cdp-cursor.mjs && node test/douyin-nav-timeout.mjs && node test/persona-isolation.mjs && node test/smoke.mjs && node test/douyin-browser.mjs && node test/douyin-page-alive.mjs && node test/douyin-eval-timeout.mjs && node test/douyin-bridge-timeout.mjs && node test/douyin-goto-budget.mjs && node test/douyin-music.mjs && node test/startup-gate.mjs && node test/outbox.mjs && node test/import-coverage.mjs && node test/update-check.mjs && node test/issue-fixes.mjs && node test/import-resume.mjs && node test/maibot-extras.mjs && node test/worldinfo.mjs && node test/memory-bulk.mjs && node test/memory-tiers.mjs && node test/memory-weekly.mjs && node test/issue-98-self-archive.mjs && node test/issue-99-memory-order.mjs && node test/issue-115-memory-date.mjs && node test/issue-119-memory-page.mjs && node test/issue-125-memory-filter.mjs && node test/issue-78-diagnostic.mjs && node test/memory-storage.mjs && node test/memory-storage-restore.mjs && node test/backup-restore.mjs && node test/douyin-group.mjs && node test/review-fixes.mjs && node test/at-reads-video.mjs && node test/search-source.mjs && node test/followups.mjs && node test/detail-config.mjs && node test/qq-send-any-image.mjs && node test/qq-read-attachment.mjs && node test/qq-batch-window.mjs && node test/comment-video.mjs && node test/frames.mjs && node test/face-name.mjs && node test/comment-reply.mjs && node test/chat-comment.mjs && node test/at-target.mjs && node test/quota-caps.mjs && node test/client-lint.mjs && node test/client-panels.mjs && node test/dsh-desktop.mjs && node test/group-mention-only.mjs && node test/qq-private-allowlist.mjs && node test/issue-59-interject.mjs && node test/issue-59-diagnose.mjs && node test/diag-douyin-running.mjs && node test/sticker-backfill.mjs && node test/issue-118-sticker-diagnostics.mjs && node test/sticker-manage.mjs && node test/bili-emotes.mjs && node test/qq-outbound-sanitize.mjs && node test/person-delete.mjs && node test/qq-group-admin.mjs && node test/douyin-recovery.mjs && node test/session-preset.mjs && node test/qq-connect-error.mjs && node test/douyin-comment-bridge.mjs && node test/douyin-comment-write-unknown.mjs && node test/douyin-reply-verify-status.mjs && node test/bili-comment-emoji.mjs && node test/douyin-state-echo.mjs && node test/issue-75-proactive.mjs && node test/issue-76-capability.mjs && node test/douyin-http-browse.mjs && node test/douyin-verify-backoff.mjs && node test/douyin-digg-bridge.mjs && node test/memory-evidence-transcript.mjs && node test/chat-archive-default.mjs && node test/issue-113-desktop-archive.mjs && node test/dream-transcript-wire.mjs && node test/douyin-frames-collect.mjs && node test/master-qq-uin-rebind.mjs && node test/douyin-session-health.mjs && node test/douyin-delivered.mjs && node test/douyin-card-share.mjs && node test/douyin-push-drop.mjs && node test/douyin-stranger-dm.mjs && node test/douyin-uid-binding.mjs && node test/image-webp-fallback.mjs && node test/douyin-emoji-fallback.mjs && node test/relay-other-platform.mjs && node test/relay-to-friend.mjs && node test/relay-config-route.mjs && node test/share-fallback.mjs && node test/share-quota-refund.mjs && node test/issue-101-voice-files.mjs && node test/voice-volcengine.mjs && node test/voice-minimax-dashscope.mjs && node test/bili-switch-persist.mjs && node test/cross-channel-context.mjs && node test/reply-target.mjs && node test/shared-session.mjs && node test/memory-source-label.mjs && node test/pending-delivery.mjs && node test/recall-window-78.mjs && node test/memory-recall-recent-78.mjs && node test/client-syntax.mjs && node test/diag-log.mjs && node test/check-rings.mjs && node test/release-workflow.mjs && node test/sticker-import-gif.mjs && node test/sticker-real-gif.mjs && node test/sticker-upload-binary.mjs && node test/sticker-vision-tags.mjs && node test/sticker-manual-tags.mjs && node test/sticker-auto-name.mjs && node test/self-update.mjs && node test/group-list.mjs && node test/douyin-inbox-noise.mjs && node test/douyin-inbox-diag.mjs && node test/douyin-inbox-stuck.mjs && node test/reply-window.mjs && node test/douyin-sticker-heuristic.mjs && node test/douyin-image-boundary.mjs && node test/media-image-boundary.mjs && node test/douyin-comment-identity-cid.mjs && node test/qq-mention-only-echo.mjs && node test/bili-panel-pagination.mjs && node test/bili-allowlist.mjs && node test/douyin-master-uid-mismatch.mjs && node test/image-inbound-fail.mjs && node test/group-backlog-images.mjs && node test/check-test-chain.mjs && node test/check-route-guard.mjs && node test/check-client-imports.mjs && node test/check-secrets.mjs",
68
+ "test:douyin": "node test/parallel.mjs 4 --only douyin",
69
+ "test:fast": "node test/parallel.mjs 4 --skip \"douyin|browser\""
70
+ }
71
71
  }