dsh-fish-soul 0.18.23 → 0.18.25
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 +1 -1
- package/lib/channels/douyin.js +42 -5
- package/lib/channels/vendor/qq-bridge.js +2 -2
- package/lib/client.js +16 -4
- package/lib/client.models.js +1 -1
- package/lib/douyin-social.js +22 -4
- package/lib/gateway-media.js +30 -0
- package/lib/gateway.js +10 -5
- package/lib/index.js +4 -1
- package/lib/llm.js +1 -0
- package/lib/routes-v07.js +2 -1
- package/lib/social.js +1 -1
- package/lib/time-awareness.js +7 -4
- package/package.json +2 -2
package/README.md
CHANGED
package/lib/channels/douyin.js
CHANGED
|
@@ -334,6 +334,21 @@ export function groupSender(m, members = {}) {
|
|
|
334
334
|
return { userId: '', nickname: '' };
|
|
335
335
|
}
|
|
336
336
|
|
|
337
|
+
/**
|
|
338
|
+
* 历史上的 `douyin.selfUid` 曾被存成 JSON 字符串本身(kv 里是带引号的 "\"123\""),
|
|
339
|
+
* 而消息的 senderId 是裸数字 —— 不剥引号就永远比对不上,自己的消息被当成对方发的。
|
|
340
|
+
* 剥完引号还必须是纯数字:不是的(手填的昵称 / 截断值)视为没学到,走未验证路径,不拿脏值去比对。
|
|
341
|
+
*/
|
|
342
|
+
function selfUidFromKv(raw) {
|
|
343
|
+
const s = stripQuotes(String(raw ?? ''));
|
|
344
|
+
return /^\d+$/.test(s) ? s : '';
|
|
345
|
+
}
|
|
346
|
+
|
|
347
|
+
/** 去掉首尾空白与一层成对的引号。 */
|
|
348
|
+
function stripQuotes(raw) {
|
|
349
|
+
return String(raw ?? '').trim().replace(/^["'](.*)["']$/, '$1').trim();
|
|
350
|
+
}
|
|
351
|
+
|
|
337
352
|
/** 一条抖音私信 → 入站消息(与 QQ 的 normalizeMessageEvent 同形)。不该当消息的返回 null。群聊按发送者分人。 */
|
|
338
353
|
export function normalizeDouyinMessage(m, { name, timeMs, messageId, group = false, members = {}, identity = '', convId = '' }) {
|
|
339
354
|
// 🔴 fromMe 是三态:true(我发的)/ false(对方发的)/ null(算不出,拿不到 selfSecUid)。
|
|
@@ -1567,12 +1582,12 @@ export class DouyinChannel {
|
|
|
1567
1582
|
*/
|
|
1568
1583
|
selfUids() {
|
|
1569
1584
|
const out = [];
|
|
1570
|
-
const learned =
|
|
1585
|
+
const learned = selfUidFromKv(getKv(this.db, 'douyin.selfUid', ''));
|
|
1571
1586
|
if (learned !== '') out.push(learned);
|
|
1572
1587
|
// sec_uid 也走 kv:以前读的是 `this.selfSecUid`,而那个字段**从来没有被赋过值**
|
|
1573
1588
|
// (vendor 里的 selfSecUid 是另一个对象的入参)—— 等于这段永远是空的死分支。
|
|
1574
1589
|
// 现在用 `douyin.selfSecUid` 这个 kv 键,谁能读到就 `setKv` 进来。
|
|
1575
|
-
const sec = String(this.selfSecUid ?? getKv(this.db, 'douyin.selfSecUid', '') ?? '')
|
|
1590
|
+
const sec = stripQuotes(String(this.selfSecUid ?? getKv(this.db, 'douyin.selfSecUid', '') ?? ''));
|
|
1576
1591
|
if (sec !== '' && sec !== learned) out.push(sec);
|
|
1577
1592
|
return out;
|
|
1578
1593
|
}
|
|
@@ -1634,7 +1649,7 @@ export class DouyinChannel {
|
|
|
1634
1649
|
learnSelfUid(convId, msgs) {
|
|
1635
1650
|
const pair = parseSingleConversation(convId);
|
|
1636
1651
|
if (pair === null) return;
|
|
1637
|
-
const known =
|
|
1652
|
+
const known = selfUidFromKv(getKv(this.db, 'douyin.selfUid', ''));
|
|
1638
1653
|
if (known !== '') return;
|
|
1639
1654
|
|
|
1640
1655
|
// ① 最稳的一条:对方发的消息里,senderId 明确是会话两侧之一 → 另一侧就是我。
|
|
@@ -1719,7 +1734,16 @@ export class DouyinChannel {
|
|
|
1719
1734
|
}
|
|
1720
1735
|
|
|
1721
1736
|
async readConversation({ c, name, key, st, sig, unread }) {
|
|
1722
|
-
|
|
1737
|
+
// 群游标挂着单聊形状的 convId(真机见过:某个群被钉上另一个私聊的 0:1:…),
|
|
1738
|
+
// 按它继续读会把私聊内容记进群频道,回复还会按这个 ID 发进人群。
|
|
1739
|
+
// 这里只把污染的固定目标清掉,不改游标:读失败时游标与消息一起留在原地(fail-closed),
|
|
1740
|
+
// 读到真正的群 ID 才由下面的流程重新捕获并覆盖。
|
|
1741
|
+
const stGroup = st?.group === true;
|
|
1742
|
+
const pollutedGroupCursor = stGroup && isSingleConversation(st?.convId);
|
|
1743
|
+
if (pollutedGroupCursor) {
|
|
1744
|
+
this.log('warn', `[fish-soul] 群聊游标「${name}」挂着单聊会话 ID(${st.convId}),已停止沿用,重新捕获会话`);
|
|
1745
|
+
}
|
|
1746
|
+
this.inbox.beginRead(key, `${stGroup ? 'douyin-group' : 'douyin'}:${name}`);
|
|
1723
1747
|
let res;
|
|
1724
1748
|
// 🔴 已固定的会话要钉住,不能被别的会话顶掉(串会话的防线)。
|
|
1725
1749
|
// 单聊:用「现在还能不能推出同一个身份」来验证游标还有效 ——
|
|
@@ -1729,7 +1753,7 @@ export class DouyinChannel {
|
|
|
1729
1753
|
// (identity 字段 = `group:<convId>`)⇒ 记着同一个群就沿用。
|
|
1730
1754
|
const priorIdentity = conversationIdentity(st?.convId, this.selfUids());
|
|
1731
1755
|
const priorIsSingle = priorIdentity !== '' && priorIdentity === st?.identity;
|
|
1732
|
-
const priorIsGroup =
|
|
1756
|
+
const priorIsGroup = stGroup && !pollutedGroupCursor && st?.identity === `group:${String(st?.convId ?? '').trim()}`;
|
|
1733
1757
|
const expectConvId = (priorIsSingle || priorIsGroup) ? String(st?.convId ?? '').trim() : '';
|
|
1734
1758
|
// 🔴 driver.read 内部是一串 browser.eval / captureImBodies / enterChat,**都没有超时**。
|
|
1735
1759
|
// CDP 会话 hang 住 / 页面卡住时它会永远等下去 —— 而 exclusive() 的 maxMs 只让
|
|
@@ -1777,6 +1801,14 @@ export class DouyinChannel {
|
|
|
1777
1801
|
// 群会话的身份靠**会话 ID 本身**(群号),不靠「谁是对端」。
|
|
1778
1802
|
// ⚠️ 但「已固定的会话不能被换掉」这条对群同样成立 ——
|
|
1779
1803
|
// 上面 expectConvId 现在从游标取(不再靠 identity),所以这里统一判。
|
|
1804
|
+
// 被污染的群游标只可能重新捕获到群:读回来还是单聊形状,说明拿到的仍不是这个群,
|
|
1805
|
+
// 按读失败处理 —— 不能让它顺着单聊频道入库(换个频道串会话)。
|
|
1806
|
+
if (pollutedGroupCursor && isSingleConversation(convId)) {
|
|
1807
|
+
this.inbox.failRead(key, '读取失败:群聊游标仍指向单聊会话');
|
|
1808
|
+
this.markReadFailed(key);
|
|
1809
|
+
this.log('warn', `[fish-soul] 读「${name}」仍拿到单聊会话 ID(${convId}),群聊游标未恢复,5 分钟内不再重试`);
|
|
1810
|
+
return;
|
|
1811
|
+
}
|
|
1780
1812
|
const groupConv = !isSingleConversation(convId);
|
|
1781
1813
|
if (convId === '' || (expectConvId && convId !== expectConvId)) {
|
|
1782
1814
|
this.inbox.failRead(key, '读取失败:会话身份缺失或与已验证目标不符');
|
|
@@ -1813,6 +1845,11 @@ export class DouyinChannel {
|
|
|
1813
1845
|
// senderBelongsToConversation 会因「没有 sender」拒掉它们 —— 但它们的身份
|
|
1814
1846
|
// 靠「在当前会话里看到的 + convId 已确认」成立,直接放行
|
|
1815
1847
|
if (String(m?.senderId ?? '').trim() === '' && m?.type && m.type !== 'text') return true;
|
|
1848
|
+
// 单聊的 DOM 纯文本(接口快照陈旧时对方的新话只在这条路上)没有 senderId:
|
|
1849
|
+
// 会话 ID 已在上面确认,单聊只有两方,明确是对方发的(fromMe === false)就是对方。
|
|
1850
|
+
// 只对单聊放行 —— 群里的发言人必须能对上,不能借这条混进来。
|
|
1851
|
+
if (isSingleConversation(convId) && Number(m?.convType) !== 2 && m?.fromMe === false
|
|
1852
|
+
&& String(m?.senderId ?? '').trim() === '' && (!m?.type || m.type === 'text')) return true;
|
|
1816
1853
|
// 🔴 群会话(convType=2 或会话 ID 不是 0:1: 形状)里的发言人是**群成员**,
|
|
1817
1854
|
// 不在「会话两侧」里 —— 单聊那套判据会把群消息整批丢掉。
|
|
1818
1855
|
// 群的身份靠「这条消息的 convId 就是当前会话」(上面已经校验过)。
|
|
@@ -169,7 +169,7 @@ export function 提取图块(message) {
|
|
|
169
169
|
* ⭐ 2026-11-21:模型有时会自己造格式——`[表情:比耶开心]` 这种纯文字标记,
|
|
170
170
|
* 代码里没有出站处理路径,会被当成普通文字发到 QQ 上,对方看到一串方括号。
|
|
171
171
|
* 这里兜底:把 `[表情:xx]` 换成 `` 发真图;
|
|
172
|
-
*
|
|
172
|
+
* 库里没有这个名字就原样保留,不静默剥掉(#189)。
|
|
173
173
|
*
|
|
174
174
|
* 只认精确匹配(文件名主体 = xx),不做模糊匹配——模糊匹配容易误伤,
|
|
175
175
|
* 比如 `[表情:OK]` 匹配到 `兔子OK.gif` 不是模型想要的。
|
|
@@ -195,7 +195,7 @@ export function 兜底表情包(文字, stickerFiles) {
|
|
|
195
195
|
return 文本.replace(/\[表情:([^\]]*)\]/g, (全, 名) => {
|
|
196
196
|
const 文件名 = 映射.get(String(名 || '').trim());
|
|
197
197
|
if (文件名) return ``;
|
|
198
|
-
return
|
|
198
|
+
return 全; // #189:库里没有就原样留着,别静默剥掉
|
|
199
199
|
});
|
|
200
200
|
}
|
|
201
201
|
|
package/lib/client.js
CHANGED
|
@@ -672,6 +672,15 @@ window.__ModuleLoader__.load({
|
|
|
672
672
|
};
|
|
673
673
|
}
|
|
674
674
|
|
|
675
|
+
// 她在 B站 评论区留的话 → 能点开的链接(#191)。
|
|
676
|
+
// post_id 是 browse.js 写的两条形状:comment-<aid>-<时间戳>(留一句)/ reply-<aid>-<rpid>(回一条)。
|
|
677
|
+
// 自己发的动态 post_id 是 B站给的动态 id,不是 aid,这里认不出就返回空串 —— 别拼出打不开的链接。
|
|
678
|
+
function biliPostUrl(pid) {
|
|
679
|
+
const m = /^(comment|reply)-(\d+)(?:-(\d+))?$/.exec(String(pid ?? ''));
|
|
680
|
+
if (m === null || (m[1] === 'reply' && m[3] === undefined)) return '';
|
|
681
|
+
return `https://www.bilibili.com/video/av${m[2]}/?comment_on=1&comment_root_id=${m[1] === 'reply' ? m[3] : 0}`;
|
|
682
|
+
}
|
|
683
|
+
|
|
675
684
|
// ── B站(登录 / 私信 / 自己刷视频) ──
|
|
676
685
|
function BiliPane({ data, refresh, notify }) {
|
|
677
686
|
const b = data?.bili ?? {};
|
|
@@ -740,7 +749,7 @@ window.__ModuleLoader__.load({
|
|
|
740
749
|
const post = b.post ?? {};
|
|
741
750
|
const cm = b.comments ?? {};
|
|
742
751
|
const socialLog = [
|
|
743
|
-
...(so.post?.recent ?? []).map((x) => ({ key: `p${x.id}`, tag: Tag(/^(comment|reply)-/.test(x.id) ? "评论" : "动态", "outline"), text: x.content, at: x.at })),
|
|
752
|
+
...(so.post?.recent ?? []).map((x) => ({ key: `p${x.id}`, tag: Tag(/^(comment|reply)-/.test(x.id) ? "评论" : "动态", "outline"), text: x.content, at: x.at, href: biliPostUrl(x.id) })),
|
|
744
753
|
...(so.comments?.recent ?? []).map((x, i) => ({ key: `c${i}${x.at}`, tag: Tag(x.status === "replied" ? "回了" : x.status === "failed" ? "没发出" : "没回", x.status === "failed" ? "danger" : undefined),
|
|
745
754
|
text: `${x.name}:${x.content}${x.reply ? ` → ${x.reply}` : ""}`, at: x.at }))
|
|
746
755
|
].sort((x, y) => y.at - x.at).slice(0, 10);
|
|
@@ -749,7 +758,7 @@ window.__ModuleLoader__.load({
|
|
|
749
758
|
key: x.key,
|
|
750
759
|
tag: x.kind === "post" ? Tag(/^(comment|reply)-/.test(x.pid ?? "") ? "评论" : "动态", "outline")
|
|
751
760
|
: Tag(x.status === "replied" ? "回了" : x.status === "failed" ? "没发出" : "没回", x.status === "failed" ? "danger" : undefined),
|
|
752
|
-
text: x.text, at: x.at
|
|
761
|
+
text: x.text, at: x.at, href: x.kind === "post" ? biliPostUrl(x.pid) : ""
|
|
753
762
|
}))].sort((x, y) => y.at - x.at);
|
|
754
763
|
const recentAll = [...recent, ...olderSeen.items];
|
|
755
764
|
const seenNext = olderSeen.started ? olderSeen.next : (recent.length > 0 ? recent[recent.length - 1].seenAt : null);
|
|
@@ -865,7 +874,10 @@ window.__ModuleLoader__.load({
|
|
|
865
874
|
Num({ min: 10, max: 300, step: 10, value: form.commentsReplyChars, "aria-label": "回评论字数", onChange: (e) => patch({ commentsReplyChars: e.target.value }), onBlur: () => save() }), Muted("字")) : null,
|
|
866
875
|
so.lastError ? Row({ title: "上次出错" }, State("error", so.lastError)) : null,
|
|
867
876
|
socialLogAll.length === 0 ? null : h(react.Fragment, null,
|
|
868
|
-
h("div", { className: "fs-list" }, socialLogAll.map((x) => Item({ key: x.key, lead: x.tag, text: x.text, title: x.text, meta: [
|
|
877
|
+
h("div", { className: "fs-list" }, socialLogAll.map((x) => Item({ key: x.key, lead: x.tag, text: x.text, title: x.text, meta: [
|
|
878
|
+
x.href ? h("a", { key: "a", href: x.href, target: "_blank", rel: "noreferrer" }, "打开") : null,
|
|
879
|
+
h("span", { key: "t" }, relTime(x.at, Date.now()))
|
|
880
|
+
].filter(Boolean) }))),
|
|
869
881
|
logNext !== null ? h("div", { style: { padding: "4px 12px 8px" } }, Button({ variant: "ghost", disabled: olderLog.busy, onClick: loadMoreLog }, olderLog.busy ? "加载中…" : "加载更多")) : null)),
|
|
870
882
|
recentAll.length === 0 ? null : Group({ title: "最近看过" },
|
|
871
883
|
h("div", { className: "fs-list" }, recentAll.map((v) => Item({
|
|
@@ -1172,7 +1184,7 @@ window.__ModuleLoader__.load({
|
|
|
1172
1184
|
exports.apply = apply;
|
|
1173
1185
|
exports.inject = inject;
|
|
1174
1186
|
// 纯函数抽出来才测得动(test/bili-switch-persist.mjs):不碰 DOM,只拼请求体。
|
|
1175
|
-
exports.__test = { biliSaveBody };
|
|
1187
|
+
exports.__test = { biliSaveBody, biliPostUrl };
|
|
1176
1188
|
return module.exports;
|
|
1177
1189
|
}
|
|
1178
1190
|
});
|
package/lib/client.models.js
CHANGED
|
@@ -50,7 +50,7 @@ window.__ModuleLoader__.load({
|
|
|
50
50
|
return Group({ title: "按功能选模型", className: "fs-model-routes", aside: host ? Muted(`DSH 默认:${providerName(host.provider)} · ${host.model}`) : null },
|
|
51
51
|
providers.length === 0 && !host ? Row({ title: "可用模型" }, State("warning", "DSH 里还没配模型")) : null,
|
|
52
52
|
data.lastError ? Row({ title: "上次调用" }, State("error", data.lastError)) : null,
|
|
53
|
-
...(data.features ?? []).map((f) => Row({ title: f.label, key: f.id, meta: f.resolved ? (f.selection ? undefined : `现在用 ${f.resolved.model}`) : "没有可用的模型" },
|
|
53
|
+
...(data.features ?? []).map((f) => Row({ title: f.label, key: f.id, meta: f.resolved ? (f.selection ? undefined : `现在用 ${f.resolved.model}`) : (f.id === "vision" ? "不启用(图直接给会话模型)" : "没有可用的模型") },
|
|
54
54
|
Select({ value: f.selection ? `${f.selection.provider}${SEP}${f.selection.model}` : "", "aria-label": f.label, onChange: (e) => pick(f.id, e.target.value) }, ...options(f.selection)))));
|
|
55
55
|
}
|
|
56
56
|
|
package/lib/douyin-social.js
CHANGED
|
@@ -16,6 +16,7 @@ import { callBridge, commentBridgeReady, installCommentBridge, uploadImage as up
|
|
|
16
16
|
import { extname, join, resolve } from 'node:path';
|
|
17
17
|
import { createHash } from 'node:crypto';
|
|
18
18
|
import { SocialBase, socialCfg, cleanSocialText } from './social.js';
|
|
19
|
+
import { insertMemory } from './soul-memory.js';
|
|
19
20
|
import { DouyinPostJobs } from './douyin-post-jobs.js';
|
|
20
21
|
import { 抠正文图, 兜底表情包 } from './channels/vendor/qq-bridge.js';
|
|
21
22
|
import { fishSoulDir, getKv, setKv } from './db.js';
|
|
@@ -762,9 +763,19 @@ export function douyinSocialDriver(host, timing = {}) {
|
|
|
762
763
|
if (el) el.click();
|
|
763
764
|
return Boolean(el);
|
|
764
765
|
})()`, { timeoutMs: tm.evalTimeoutMs }).catch(() => false);
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
766
|
+
// 上传入口是一次性注入的:页面没就绪/加载慢时 sleep(1500) 后还没挂上 DOM,
|
|
767
|
+
// 一次性查不到就报「改版了」是冤案(2026-11-22 真机偶发 NO_UPLOAD,同 URL 隔天成功)。
|
|
768
|
+
// ⇒ waitFor 轮询等它挂上,再退到按「点击上传/上传图文」文案找触发点,仍没有才报 NO_UPLOAD。
|
|
769
|
+
const UPLOAD_INPUT_JS = `(() => {
|
|
770
|
+
const direct = document.querySelector('input[type="file"][accept*="image"]') || document.querySelector('input[type="file"]');
|
|
771
|
+
if (direct) return direct;
|
|
772
|
+
const trigger = [...document.querySelectorAll('div, span, button')].find((x) => x.children.length === 0 && /点击上传|上传图文|上传图片/.test((x.innerText || '').trim()));
|
|
773
|
+
return trigger ? trigger.closest('div')?.querySelector('input[type="file"]') ?? null : null;
|
|
774
|
+
})()`;
|
|
775
|
+
const objectId = await waitFor(async () => {
|
|
776
|
+
const r = await br.send('Runtime.evaluate', { expression: UPLOAD_INPUT_JS }, br.sessionId, tm.evalTimeoutMs).catch(() => null);
|
|
777
|
+
return r?.result?.objectId ?? null;
|
|
778
|
+
}, { tries: 8, gapMs: 1500, budgetMs: tm.waitBudgetMs });
|
|
768
779
|
if (!objectId) return { ok: false, code: 'NO_UPLOAD', error: '创作者中心页面上没找到上传图片的地方(可能改版了)' };
|
|
769
780
|
await br.send('DOM.setFileInputFiles', { files: [file], objectId }, br.sessionId);
|
|
770
781
|
const ready = await waitFor(() => br.eval(`(() => Boolean(document.querySelector('input[placeholder*="标题"]') || document.querySelector('[contenteditable="true"]')))()`, { timeoutMs: tm.evalTimeoutMs }), { tries: 40, budgetMs: tm.waitBudgetMs });
|
|
@@ -1250,6 +1261,13 @@ export class DouyinSocial extends SocialBase {
|
|
|
1250
1261
|
}
|
|
1251
1262
|
this.db.exec('COMMIT');
|
|
1252
1263
|
} catch (error) { this.db.exec('ROLLBACK'); throw error; }
|
|
1264
|
+
// 结果未知的发布,人工核实「已发布」后她也该记得自己发过这条 ——
|
|
1265
|
+
// 否则她被问「你发过什么」时对这条一无所知(2026-11-23 用户反馈)。
|
|
1266
|
+
// 与 social.js post() 成功路径(314 行)同一条 insertMemory。
|
|
1267
|
+
try {
|
|
1268
|
+
const kind = this.postJobs.kindOf(pending.id);
|
|
1269
|
+
insertMemory(this.db, this.worker, { ownerId: 'self', channel: this.platform, channelId: `${this.platform}:post:manual-${pending.id}`, kind: 'event', content: `我在${this.label}发了条${this.postNounOf(kind)}:${pending.text}`, importance: 1, evidence: '自己发的(人工核实)' }, now);
|
|
1270
|
+
} catch { /* 记忆可缺 */ }
|
|
1253
1271
|
return { ok: true };
|
|
1254
1272
|
}
|
|
1255
1273
|
|
|
@@ -1567,7 +1585,7 @@ export class DouyinSocial extends SocialBase {
|
|
|
1567
1585
|
out.text = r.text;
|
|
1568
1586
|
} catch { /* 没配嵌入模型 / 算失败:原样走,@ 那段发不出去就当没写 */ }
|
|
1569
1587
|
}
|
|
1570
|
-
// 兜底:模型自己造的 [表情:名字] 格式 ——
|
|
1588
|
+
// 兜底:模型自己造的 [表情:名字] 格式 —— 库里有的换成真图发,没有的原样保留(#189)
|
|
1571
1589
|
out.text = 兜底表情包(out.text, (this.stickers?.list(this.workspacePath()) ?? []).map((x) => x.file));
|
|
1572
1590
|
const picked = 抠正文图(out.text);
|
|
1573
1591
|
out.text = picked.净文字;
|
package/lib/gateway-media.js
CHANGED
|
@@ -321,6 +321,24 @@ export const mediaMethods = {
|
|
|
321
321
|
}
|
|
322
322
|
},
|
|
323
323
|
|
|
324
|
+
/**
|
|
325
|
+
* 用识图模型把一张入站图说成一段文字(给会话模型看的「她看到的图」)。
|
|
326
|
+
* 失败回 null(调用方退回原图)。maxTokens 小:只要一段描述,不要它发挥。
|
|
327
|
+
*/
|
|
328
|
+
async describeInboundImage(part, quoted) {
|
|
329
|
+
try {
|
|
330
|
+
const out = await this.withTimeout(this.vision(
|
|
331
|
+
(quoted ? '这是别人发的一条消息里被引用的图片。' : '这是聊天里别人发来的一张图。') + '用一两句话客观描述画面里有什么(人物 / 动作 / 物品 / 文字 / 风格,是表情包就说表情包 + 上面写的字)。只输出描述,不要加任何前缀。',
|
|
332
|
+
[{ data: part.data, mediaType: part.mediaType }],
|
|
333
|
+
), 20_000);
|
|
334
|
+
const text = String(out ?? '').trim();
|
|
335
|
+
if (text === '') return null;
|
|
336
|
+
return `${quoted ? '【被引用的图】' : '【图】'}${text.slice(0, 300)}`;
|
|
337
|
+
} catch {
|
|
338
|
+
return null;
|
|
339
|
+
}
|
|
340
|
+
},
|
|
341
|
+
|
|
324
342
|
async admitImages(text, items, sessionId = '', { backlog, quotedImages } = {}) {
|
|
325
343
|
const imgs = [];
|
|
326
344
|
for (const { m } of items) for (const img of m.images) if (imgs.length < MAX_INBOUND_IMAGES) imgs.push({ img, m });
|
|
@@ -331,6 +349,10 @@ export const mediaMethods = {
|
|
|
331
349
|
// 被引用的那条消息里的图:也进模型(单独一档,前面加一句说明,模型才知道哪张是被引用的那张)。
|
|
332
350
|
const quoted = (quotedImages ?? []).slice(0, Math.max(0, MAX_INBOUND_IMAGES - imgs.length));
|
|
333
351
|
if (imgs.length === 0 && quoted.length === 0) return base;
|
|
352
|
+
// 识图模型只在配置了 models.vision 时启用(没配 = 老行为,图直接给会话模型)。
|
|
353
|
+
const describeImage = this.vision !== null && this.vision !== undefined && String(this.getConfig().models?.vision?.model ?? '') !== ''
|
|
354
|
+
? (part, quoted) => this.describeInboundImage(part, quoted)
|
|
355
|
+
: null;
|
|
334
356
|
const attachments = service(this.ctx, 'attachments');
|
|
335
357
|
if (!attachments || typeof attachments.admitPromptContent !== 'function') {
|
|
336
358
|
// 宿主没提供 attachments:图片只能丢,但得留痕 —— 否则表现是「她说看不见图」而日志空白
|
|
@@ -362,6 +384,14 @@ export const mediaMethods = {
|
|
|
362
384
|
const mediaType = mediaTypeOf(bytes);
|
|
363
385
|
this.stickers?.remember(sessionId, { bytes, mediaType, sticker: img.sticker === true, summary: img.summary, from: m.nickname || m.userId });
|
|
364
386
|
const part = { type: 'image', data: bytes.toString('base64'), mediaType, name: `qq-${entry.quoteId || m.messageId || 'x'}-${i + 1}.${mediaType.split('/')[1]}` };
|
|
387
|
+
// 配了识图模型:会话模型没视觉也能"看见" —— 先让视觉模型把这张图说成一段文字,喂文字不喂图。
|
|
388
|
+
// 只在主人明确配了 models.vision 时才走;没配 = 原样把图塞给会话模型(行为一字不变)。
|
|
389
|
+
if (describeImage !== null) {
|
|
390
|
+
const described = await describeImage(part, entry.quoted === true);
|
|
391
|
+
if (described !== null) { (entry.quoted === true ? quotedParts : parts).push({ type: 'text', text: described }); continue; }
|
|
392
|
+
// 描述失败(模型没视觉 / 超时 / 图没送进去):退回原图,让会话模型自己试 —— 比把图丢了强。
|
|
393
|
+
this.diag?.add('image-describe-failed', { reason: 'vision_null' }, 'warn');
|
|
394
|
+
}
|
|
365
395
|
if (entry.quoted === true) quotedParts.push(part); else parts.push(part);
|
|
366
396
|
}
|
|
367
397
|
if (quotedParts.length > 0) {
|
package/lib/gateway.js
CHANGED
|
@@ -222,7 +222,7 @@ export class ChatGateway {
|
|
|
222
222
|
* @param {object} deps.soul index.js 提供的人格/记忆回调
|
|
223
223
|
* @param {(agentCtx: object) => void} [deps.agentSections] 给单个 agent 挂人格卡 / 瞬态块(index.js 传入 registerAgentSections)
|
|
224
224
|
*/
|
|
225
|
-
constructor({ ctx, db, clock, getConfig, log, channel, bili = null, browser = null, douyin = null, douyinBrowser = null, canvasConvert = null, soul, voice = null, stickers = null, slang = null, agentSections = null, groupAdmin = null, embedder = null, embeddingCfg = null, diag = null }) {
|
|
225
|
+
constructor({ ctx, db, clock, getConfig, log, channel, bili = null, browser = null, douyin = null, douyinBrowser = null, canvasConvert = null, soul, voice = null, stickers = null, slang = null, agentSections = null, groupAdmin = null, embedder = null, embeddingCfg = null, diag = null, vision = null }) {
|
|
226
226
|
this.ctx = ctx;
|
|
227
227
|
this.db = db;
|
|
228
228
|
this.clock = clock;
|
|
@@ -258,6 +258,8 @@ export class ChatGateway {
|
|
|
258
258
|
this.embedder = embedder;
|
|
259
259
|
this.embeddingCfg = embeddingCfg;
|
|
260
260
|
this.slang = slang;
|
|
261
|
+
// 识图模型(设置页「模型 · 识图」):配了就把用户发的图先描述成文字再喂会话模型 —— 会话模型没视觉也能"看见"。
|
|
262
|
+
this.vision = vision;
|
|
261
263
|
/** 群管理(入群申请):主人回"/鱼 同意/拒绝"时用它(可能没有) */
|
|
262
264
|
this.groupAdmin = groupAdmin;
|
|
263
265
|
/** 给单个 agent 挂人格卡 / 瞬态块:`(agentCtx) => void`(在 setup 里调,只对那个 agent 生效) */
|
|
@@ -1074,7 +1076,7 @@ export class ChatGateway {
|
|
|
1074
1076
|
if (this.agentsService() === null) throw new Error('宿主没有 agents 服务');
|
|
1075
1077
|
const row = findChatSession(this.db, platformOf(key), key);
|
|
1076
1078
|
// 先建新会话成功(insertChatSession 会原子退役旧行),再清旧状态 —— 避免失败时丢原会话和 workspace_path。
|
|
1077
|
-
const agent = await this.createSession(owner, row?.workspace_path || undefined, mergeFrom);
|
|
1079
|
+
const agent = await this.createSession(owner, row?.workspace_path || undefined, mergeFrom, { keepTitle: row?.title ?? '' });
|
|
1078
1080
|
this.resetRecycleBreaker(key);
|
|
1079
1081
|
if (row !== null) {
|
|
1080
1082
|
this.bound.delete(row.session_id);
|
|
@@ -1104,7 +1106,7 @@ export class ChatGateway {
|
|
|
1104
1106
|
return `QQ·${sanitizeName(name, chat.targetId)}${chat.targetId === this.masterQq() ? '(主人)' : ''}`;
|
|
1105
1107
|
}
|
|
1106
1108
|
|
|
1107
|
-
async createSession(chat, workspacePath = this.workspacePath(), mergeFrom = '') {
|
|
1109
|
+
async createSession(chat, workspacePath = this.workspacePath(), mergeFrom = '', { keepTitle = '' } = {}) {
|
|
1108
1110
|
const agents = this.agentsService();
|
|
1109
1111
|
const ws = await this.ensureWorkspace(workspacePath);
|
|
1110
1112
|
const sessionId = `fish-soul-${randomUUID()}`;
|
|
@@ -1117,7 +1119,10 @@ export class ChatGateway {
|
|
|
1117
1119
|
...(agentOptions !== undefined ? { agentOptions } : {}),
|
|
1118
1120
|
setup: (agentCtx) => this.setupAgent(agentCtx, chat.channelId)
|
|
1119
1121
|
});
|
|
1120
|
-
|
|
1122
|
+
// 换新会话(resetSession)沿用旧标题:chatTitle 依赖人物库的当前状态,
|
|
1123
|
+
// 对方改了昵称 / person 行被合并过,重算出来的题头就变了 —— 用户眼里是
|
|
1124
|
+
// 「我只是换了个新会话,题头怎么变了」(2026-11-23 用户反馈)。
|
|
1125
|
+
const title = keepTitle !== '' ? keepTitle : await this.chatTitle(chat);
|
|
1121
1126
|
this.diag?.add('session-create', { sessionId, channelId: chat.channelId, reason: title });
|
|
1122
1127
|
try { await ws.attachSession?.(sessionId); } catch (error) {
|
|
1123
1128
|
this.log('warn', `[fish-soul] 会话挂到工作区失败:${String(error instanceof Error ? error.message : error)}`);
|
|
@@ -2400,7 +2405,7 @@ export class ChatGateway {
|
|
|
2400
2405
|
this.log('warn', `[fish-soul] 按感觉挑表情失败:${String(error instanceof Error ? error.message : error)}`);
|
|
2401
2406
|
}
|
|
2402
2407
|
}
|
|
2403
|
-
// 兜底:模型自己造的 [表情:名字] 格式 ——
|
|
2408
|
+
// 兜底:模型自己造的 [表情:名字] 格式 —— 库里有的换成真图发,没有的原样保留(#189)
|
|
2404
2409
|
feelText = 兜底表情包(feelText, this.listStickers(row.workspace_path));
|
|
2405
2410
|
const picked = 抠正文图(feelText);
|
|
2406
2411
|
const 图 = this.moodPick(profile, picked.图, row);
|
package/lib/index.js
CHANGED
|
@@ -646,7 +646,8 @@ async function startup(ctx, config, { log, gate }) {
|
|
|
646
646
|
weekday: weekdayOf(snap.clock.virtualDate),
|
|
647
647
|
idleMs: session?.idleMs ?? null,
|
|
648
648
|
tone: snap.today.dailyMoodTone,
|
|
649
|
-
slot: snap.today.currentSlot
|
|
649
|
+
slot: snap.today.currentSlot,
|
|
650
|
+
scheduleEnabled: life.scheduleEnabled()
|
|
650
651
|
});
|
|
651
652
|
}
|
|
652
653
|
|
|
@@ -1075,6 +1076,8 @@ async function startup(ctx, config, { log, gate }) {
|
|
|
1075
1076
|
testHooks.gateway = null;
|
|
1076
1077
|
gateway = new ChatGateway({
|
|
1077
1078
|
ctx, db, clock, getConfig, log, channel, bili, browser, douyin, douyinBrowser, canvasConvert, voice, stickers, slang,
|
|
1079
|
+
// 识图模型:复用表情包那套看图调用(超时 / 失败隔离都是现成的),只是功能名换成 vision(设置页「模型 · 识图」)
|
|
1080
|
+
vision: createStickerVision({ call: (prompt, opts = {}) => llmRouter.call(prompt, { ...opts, feature: 'vision' }) }),
|
|
1078
1081
|
// 按感觉挑表情:复用记忆那套嵌入模型(主人拍板)。没配就跟以前一样按文件名发
|
|
1079
1082
|
embedder, embeddingCfg,
|
|
1080
1083
|
groupAdmin, // 群管理(入群申请):主人回"/鱼 同意/拒绝"时用它
|
package/lib/llm.js
CHANGED
package/lib/routes-v07.js
CHANGED
|
@@ -126,7 +126,8 @@ export async function handleV07Route({ method, path, url, req, res, send, readBo
|
|
|
126
126
|
for (const [id, label] of FEATURES) {
|
|
127
127
|
const r = await llmRouter.resolve(id);
|
|
128
128
|
const pick = cfg.models?.[id];
|
|
129
|
-
|
|
129
|
+
// vision(识图)的语义是「不配 = 不启用」,不是「跟 DSH 默认」:没配时 resolved 给 null,别让面板显示「现在用 xxx」误导人。
|
|
130
|
+
features.push({ id, label, selection: pick && pick.provider && pick.model ? { provider: pick.provider, model: pick.model } : null, resolved: (id === 'vision' && !(pick && pick.model)) ? null : r, });
|
|
130
131
|
}
|
|
131
132
|
send(200, {
|
|
132
133
|
ok: true, providers, features, hostDefault: llmRouter.hostDefault(), prices: cfg.modelPrices ?? {},
|
package/lib/social.js
CHANGED
|
@@ -469,7 +469,7 @@ export class BiliSocial extends SocialBase {
|
|
|
469
469
|
if (this.repliedLastHour() >= c.comments.perHour) break; // 剩下的下次再看
|
|
470
470
|
await this.readVideoIfNeeded(it, c, readBudget);
|
|
471
471
|
const raw = String((await this.callLlm(this.replyPrompt(it, c.master))) ?? '').trim();
|
|
472
|
-
const text = /\[不回\]/.test(raw) ? '' : cleanSocialText(raw,
|
|
472
|
+
const text = /\[不回\]/.test(raw) ? '' : cleanSocialText(raw, c.comments.replyChars);
|
|
473
473
|
if (text === '') {
|
|
474
474
|
if (raw === '') break; // 模型没回上来:下次再试
|
|
475
475
|
this.record(it, 'skipped');
|
package/lib/time-awareness.js
CHANGED
|
@@ -55,13 +55,16 @@ export function idleLabel(ms) {
|
|
|
55
55
|
* @param {number|null} [p.idleMs] 距对方上次说话的真实毫秒,null/过短就不写
|
|
56
56
|
* @param {string|null} [p.tone] 当日基调
|
|
57
57
|
* @param {object|null} [p.slot] 当前时段 {range, availability, activity}
|
|
58
|
+
* @param {boolean} [p.scheduleEnabled] 日程开关(#196);false 时基调和日程整段不注入
|
|
58
59
|
*/
|
|
59
|
-
export function stateLineText({ virtualIsoLocal, weekday = '', idleMs = null, tone = null, slot = null }) {
|
|
60
|
+
export function stateLineText({ virtualIsoLocal, weekday = '', idleMs = null, tone = null, slot = null, scheduleEnabled = true }) {
|
|
60
61
|
const parts = [`虚拟时间 ${virtualIsoLocal}${weekday ? `(${weekday})` : ''}`];
|
|
61
62
|
const idle = idleLabel(idleMs);
|
|
62
63
|
if (idle !== null) parts.push(`距上次说话 ${idle}`);
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
64
|
+
if (scheduleEnabled) {
|
|
65
|
+
parts.push(`基调 ${tone ?? '未生成'}`);
|
|
66
|
+
if (slot) parts.push(`时段 ${slot.range ?? ''}(${slot.availability ?? '?'})她今天大概这么打算:${slot.activity ?? '未知'}`);
|
|
67
|
+
else parts.push('今天没排日程');
|
|
68
|
+
}
|
|
66
69
|
return `[此刻状态] ${parts.join(';')}`;
|
|
67
70
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-fish-soul",
|
|
3
|
-
"version": "0.18.
|
|
3
|
+
"version": "0.18.25",
|
|
4
4
|
"description": "鱼 · 人格、按人记忆(可纠正、有印象、能导入旧聊天记录)、日程自走与主动开口,直连 SnowLuma 收发 QQ(群里会自己插话),B站 / 抖音小号私信与自己刷视频;按功能选模型并统计用量花费,能听会说 QQ 语音、收藏表情包、学群里的梗,可选上网查;心情影响说话、去 AI 味、每个群的设定、按聊天选模型、每晚写日记、每周记忆存档与可选周记(DSH 插件,单角色 feiyu ,v0.18.23)",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./lib/index.js",
|
|
@@ -64,7 +64,7 @@
|
|
|
64
64
|
}
|
|
65
65
|
},
|
|
66
66
|
"scripts": {
|
|
67
|
-
"test": "node test/check-test-chain.mjs && node test/check-release-version.mjs && node test/wire-helper.mjs && node test/marker-audit.mjs && 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-push-poll-dedupe.mjs && node test/douyin-share-card-dedupe.mjs && node test/douyin-share-card-dom.mjs && node test/douyin-inline-share.mjs && node test/douyin-short-link.mjs && node test/douyin-inline-ledger.mjs && node test/douyin-group-chat.mjs && node test/douyin-group-read.mjs && node test/douyin-group-reply.mjs && node test/session-overflow-recycle.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/douyin-video-post.mjs && node test/douyin-video-trigger.mjs && node test/douyin-video-driver.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/life-context-interaction.mjs && node test/life-clock-refresh.mjs && node test/browser-launch-early-exit.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/douyin-ax-button.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/slang-global.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/llm-roomy-budget.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-sender-id.mjs && node test/dsh-home-guard.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/outbound-quote-and-images.mjs && node test/sticker-bracket-fallback.mjs && node test/dream-transcript-scope.mjs && node test/memory-date-context.mjs && node test/context-source-platform.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-comment-visibility.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/group-master-tag.mjs && node test/check-route-guard.mjs && node test/check-client-imports.mjs && node test/chat-archive-fts.mjs && node test/chat-search-tool.mjs && node test/memory-invalidate-kind.mjs && node test/mood-guard.mjs && node test/time-awareness.mjs && node test/tts-strip-emoji.mjs && node test/session-reset-route.mjs && node test/check-secrets.mjs && node test/douyin-video-wire.mjs && node test/video-gen.mjs",
|
|
67
|
+
"test": "node test/check-test-chain.mjs && node test/check-release-version.mjs && node test/wire-helper.mjs && node test/marker-audit.mjs && 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-push-poll-dedupe.mjs && node test/douyin-share-card-dedupe.mjs && node test/douyin-share-card-dom.mjs && node test/douyin-inline-share.mjs && node test/douyin-short-link.mjs && node test/douyin-inline-ledger.mjs && node test/douyin-group-chat.mjs && node test/douyin-group-read.mjs && node test/douyin-group-reply.mjs && node test/session-overflow-recycle.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-note-upload-poll.mjs && node test/douyin-post-jobs.mjs && node test/douyin-video-post.mjs && node test/douyin-video-trigger.mjs && node test/douyin-video-driver.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/life-context-interaction.mjs && node test/life-clock-refresh.mjs && node test/browser-launch-early-exit.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/douyin-ax-button.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/slang-global.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/llm-roomy-budget.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-sender-id.mjs && node test/dsh-home-guard.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/outbound-quote-and-images.mjs && node test/sticker-bracket-fallback.mjs && node test/dream-transcript-scope.mjs && node test/memory-date-context.mjs && node test/context-source-platform.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-comment-link.mjs && node test/bili-comment-visibility.mjs && node test/bili-allowlist.mjs && node test/douyin-master-uid-mismatch.mjs && node test/vision-model.mjs && node test/image-inbound-fail.mjs && node test/group-backlog-images.mjs && node test/group-master-tag.mjs && node test/check-route-guard.mjs && node test/check-client-imports.mjs && node test/chat-archive-fts.mjs && node test/chat-search-tool.mjs && node test/memory-invalidate-kind.mjs && node test/mood-guard.mjs && node test/time-awareness.mjs && node test/tts-strip-emoji.mjs && node test/session-reset-route.mjs && node test/check-secrets.mjs && node test/douyin-video-wire.mjs && node test/douyin-self-uid.mjs && node test/douyin-group-cursor.mjs && node test/douyin-dom-text.mjs && node test/video-gen.mjs",
|
|
68
68
|
"test:douyin": "node test/parallel.mjs 4 --only douyin",
|
|
69
69
|
"test:fast": "node test/parallel.mjs 4 --skip \"douyin|browser\""
|
|
70
70
|
}
|