dsh-fish-soul 0.18.6 → 0.18.7
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/client.js +36 -1
- package/lib/config-schema.js +8 -0
- package/lib/gateway-media.js +135 -2
- package/lib/gateway-util.js +32 -0
- package/lib/gateway.js +16 -2
- package/lib/index.js +70 -5
- package/lib/life.js +3 -1
- package/lib/routes.js +22 -0
- package/package.json +2 -2
package/README.md
CHANGED
package/lib/client.js
CHANGED
|
@@ -497,6 +497,40 @@ window.__ModuleLoader__.load({
|
|
|
497
497
|
Button({ variant: "ghost", disabled: newGroup.trim() === "", onClick: addGroup }, "添加")) : null));
|
|
498
498
|
}
|
|
499
499
|
|
|
500
|
+
// ── 熟人传话:白名单里的人可以托她给白名单里的另一个人带句话(默认关)──
|
|
501
|
+
function RelayPane({ data, refresh, notify }) {
|
|
502
|
+
const rc = data?.relayConfig ?? {};
|
|
503
|
+
const [form, setForm, patch] = useForm(data, () => ({
|
|
504
|
+
enabled: rc.enabled === true,
|
|
505
|
+
allowList: (rc.allowList ?? []).join(", "),
|
|
506
|
+
perDay: rc.perDay ?? 5
|
|
507
|
+
}));
|
|
508
|
+
if (!data || !form) return null;
|
|
509
|
+
|
|
510
|
+
async function save(p = {}) {
|
|
511
|
+
const next = { ...form, ...p };
|
|
512
|
+
setForm(next);
|
|
513
|
+
const res = await api("POST", "/relay/config", {
|
|
514
|
+
enabled: next.enabled === true,
|
|
515
|
+
allowList: split(next.allowList),
|
|
516
|
+
perDay: Number(next.perDay)
|
|
517
|
+
});
|
|
518
|
+
if (res?.ok) refresh(); else notify(res?.error ?? "保存失败");
|
|
519
|
+
}
|
|
520
|
+
|
|
521
|
+
return h(react.Fragment, null,
|
|
522
|
+
Group({ className: "fs-life-settings" },
|
|
523
|
+
Row({ title: "熟人传话", stack: true },
|
|
524
|
+
h(Switch, { label: "熟人传话", checked: form.enabled, onChange: (v) => save({ enabled: v }) }),
|
|
525
|
+
Muted("打开后,白名单里的人可以让她给对方带一句话。发出的消息会自动带「xx托我带句话」前缀 —— 收件人知道是谁说的,她不能匿名传话。")),
|
|
526
|
+
form.enabled ? Row({ title: "白名单", stack: true },
|
|
527
|
+
Area({ value: form.allowList, placeholder: "平台 uid,逗号或换行分隔:\nqq:12345678\nbili:1234567890\ndouyin:1234567890123456789", onChange: (e) => patch({ allowList: e.target.value }), onBlur: () => save() }),
|
|
528
|
+
Muted("填平台 uid,不是昵称 —— 昵称可以改、可以撞名。发起人和收件人都要在这里面。")) : null,
|
|
529
|
+
form.enabled ? Row({ title: "每人每天最多", stack: true },
|
|
530
|
+
Num({ min: 1, max: 50, value: form.perDay, "aria-label": "每人每天最多", onChange: (e) => patch({ perDay: e.target.value === "" ? "" : Number(e.target.value) }), onBlur: () => save({ perDay: form.perDay === "" ? 5 : form.perDay }) }),
|
|
531
|
+
Muted("条。到上限就拒,防止拿她当群发工具。")) : null));
|
|
532
|
+
}
|
|
533
|
+
|
|
500
534
|
// ── QQ 接入(SnowLuma 直连)与会话工作区 ──
|
|
501
535
|
function ChannelPane({ data, refresh, notify }) {
|
|
502
536
|
const qq = data?.qq ?? {};
|
|
@@ -855,7 +889,7 @@ window.__ModuleLoader__.load({
|
|
|
855
889
|
const TABS = [
|
|
856
890
|
["memory", "记忆", [["retrieval", "检索设置"], ["people", "人物与关系"], ["memories", "记忆内容"], ["recall-test", "检索测试"], ["weekly", "周记"], ["archives", "记忆存档"], ["backups", "导入与备份"]]],
|
|
857
891
|
["character", "角色", [["persona", "人格卡"], ["templates", "人格模板"], ["growth", "成长"], ["worldinfo", "世界书"], ["habits", "说话习惯"], ["groups", "群设定"], ["chat-models", "聊天模型"]]],
|
|
858
|
-
["daily", "日常", [["life", "主动开口"], ["activity", "最近动态"], ["diary", "日记"], ["stickers", "表情包"], ["slang", "学到的说法"]]],
|
|
892
|
+
["daily", "日常", [["life", "主动开口"], ["relay", "熟人传话"], ["activity", "最近动态"], ["diary", "日记"], ["stickers", "表情包"], ["slang", "学到的说法"]]],
|
|
859
893
|
["channels", "平台", [["qq", "QQ"], ["bili", "B站"], ["douyin", "抖音"]]],
|
|
860
894
|
["models", "模型", [["models", "功能模型"], ["usage", "用量与价格"], ["web", "联网搜索"], ["voice", "语音"]]],
|
|
861
895
|
["system", "系统", [["interface", "界面"], ["version", "版本更新"], ["diag", "运行日志"]]]
|
|
@@ -1050,6 +1084,7 @@ window.__ModuleLoader__.load({
|
|
|
1050
1084
|
: subtab === "version" ? h(Boundary, { name: "版本" }, h(UpdateBar, { notify, onUpdateState: setUpdateAvailable }))
|
|
1051
1085
|
: subtab === "retrieval" ? h(RetrievalPane, { data: retrieval, refresh: loadRetrieval, notify })
|
|
1052
1086
|
: subtab === "life" ? h(LifePane, { data: life, refresh: loadLife, notify })
|
|
1087
|
+
: subtab === "relay" ? h(RelayPane, { data: life, refresh: loadLife, notify })
|
|
1053
1088
|
: ["people", "memories", "recall-test", "weekly", "archives", "backups"].includes(subtab) ? h(ChunkTab, { file: "client.soul.js", pick: (m) => m.InspectorPane, failText: "记忆管理加载失败", section: subtab, notify })
|
|
1054
1089
|
: ["activity", "stickers", "slang"].includes(subtab) ? h(ChunkTab, { file: "client.soul.js", pick: (m) => m.ActivityPane, failText: "动态加载失败", section: subtab, notify })
|
|
1055
1090
|
: ["habits", "groups", "chat-models", "diary"].includes(subtab) ? h(ChunkTab, { file: "client.behavior.js", pick: (m) => m.BehaviorPane, failText: "习惯页加载失败", section: subtab === "chat-models" ? "models" : subtab, notify })
|
package/lib/config-schema.js
CHANGED
|
@@ -101,6 +101,14 @@ export function fishSoulConfigSchema(z) {
|
|
|
101
101
|
expressions: z.boolean().default(true), // 学「什么场合怎么说」(只学别人的话、不带人名)
|
|
102
102
|
privateChats: z.boolean().default(true) // 好友私聊也学(只在那个私聊里用)
|
|
103
103
|
}).default({}),
|
|
104
|
+
// 熟人传话:白名单里的人 A 托她给白名单里的 B 带一句话(默认关)。
|
|
105
|
+
// 白名单按平台身份(QQ 号 / B站 UID / 抖音 uid)精确匹配,昵称不参与 —— 同名可冒充。
|
|
106
|
+
// 发出的消息自动带来源前缀,B 知道是谁托带的,她不能匿名传话。
|
|
107
|
+
relay: z.object({
|
|
108
|
+
enabled: z.boolean().default(false),
|
|
109
|
+
allowList: z.array(z.string()).default([]), // 白名单(平台 uid,一行一个);空 = 谁都不能用
|
|
110
|
+
perDay: z.number().default(5) // 每个发起人每天最多带几条
|
|
111
|
+
}).default({}),
|
|
104
112
|
tools: z.object({
|
|
105
113
|
web: z.object({ // 让她能上网查东西(默认关):DSH 自带的 web_search,或自己填的搜索 API key
|
|
106
114
|
enabled: z.boolean().default(false),
|
package/lib/gateway-media.js
CHANGED
|
@@ -11,8 +11,8 @@ import { isIdentityKey } from './douyin-conversation.js';
|
|
|
11
11
|
import { findVideoRefs } from './browse.js';
|
|
12
12
|
import { findDouyinRefs } from './douyin-browse.js';
|
|
13
13
|
import { prepareImage } from './imageconv.js';
|
|
14
|
-
import { sanitizeName } from './channels/onebot.js';
|
|
15
|
-
import { mediaTypeOf, isInside, fetchImageBytes, splitChannelId, service } from './gateway-util.js';
|
|
14
|
+
import { sanitizeName, sanitizeUserText } from './channels/onebot.js';
|
|
15
|
+
import { mediaTypeOf, isInside, fetchImageBytes, splitChannelId, service, normalizeRelayId } from './gateway-util.js';
|
|
16
16
|
|
|
17
17
|
const IMAGE_EXT = new Set(['.png', '.jpg', '.jpeg', '.gif', '.webp']);
|
|
18
18
|
const MAX_IMAGE_BYTES = 10 * 1024 * 1024;
|
|
@@ -23,6 +23,50 @@ const DOUYIN_EMOJI_RE = /^\[([\u4e00-\u9fa5A-Za-z0-9]{1,8})\]$/;
|
|
|
23
23
|
const VOICE_TAG_RE = /^\s*\[语音\]\s*/;
|
|
24
24
|
const platformName = (channelId) => (String(channelId).startsWith('bili:') ? 'B站' : '抖音');
|
|
25
25
|
|
|
26
|
+
/** 传话计数写回:失败不影响已经发出去的消息。 */
|
|
27
|
+
function setKvRelay(db, key, n) {
|
|
28
|
+
try {
|
|
29
|
+
db.prepare('INSERT INTO kv (key, value) VALUES (?, ?) ON CONFLICT(key) DO UPDATE SET value = excluded.value').run(key, JSON.stringify(n));
|
|
30
|
+
} catch { /* 记不下来不影响已经发出去的消息 */ }
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
/** 按平台 uid 查显示名;查不到返回 null(只用于来源前缀,不参与授权)。 */
|
|
34
|
+
function relayPersonName(db, relayId) {
|
|
35
|
+
const [plat, id] = relayId.split(':');
|
|
36
|
+
let row = null;
|
|
37
|
+
try {
|
|
38
|
+
if (plat === 'qq') row = db.prepare('SELECT display_name FROM person WHERE qq_uin = ?').get(id);
|
|
39
|
+
else if (plat === 'bili') row = db.prepare('SELECT display_name FROM person WHERE bili_uid = ?').get(id);
|
|
40
|
+
else if (plat === 'douyin') row = db.prepare('SELECT display_name FROM person WHERE douyin_uid = ?').get(`douyin:${id}`);
|
|
41
|
+
} catch { /* 读不到就当没名字 */ }
|
|
42
|
+
const name = String(row?.display_name ?? '').trim();
|
|
43
|
+
return name === '' ? null : name;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
/** 抖音会话名(`douyin:<uid>` → 游标里记的真实昵称);查不到返回 null(不猜)。 */
|
|
47
|
+
function relayDouyinName(db, relayId) {
|
|
48
|
+
try {
|
|
49
|
+
const identity = relayId.startsWith('douyin:') ? relayId : `douyin:${relayId}`;
|
|
50
|
+
const rows = db.prepare("SELECT value FROM kv WHERE key LIKE 'douyin.conv.%' AND key NOT LIKE 'douyin.convId.%'").all();
|
|
51
|
+
for (const r of rows) {
|
|
52
|
+
let v = null;
|
|
53
|
+
try { v = JSON.parse(r.value); } catch { continue; }
|
|
54
|
+
if (String(v?.identity ?? '') !== identity) continue;
|
|
55
|
+
const name = String(v?.name ?? '').trim();
|
|
56
|
+
if (name !== '') return name;
|
|
57
|
+
}
|
|
58
|
+
} catch { /* 读不到就当没有 */ }
|
|
59
|
+
return null;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
/** relayId → 给别人看的 channelId(journalOut / note 用)。 */
|
|
63
|
+
function relayChannelOf(relayId) {
|
|
64
|
+
const [plat, id] = relayId.split(':');
|
|
65
|
+
if (plat === 'qq') return `private:${id}`;
|
|
66
|
+
if (plat === 'bili') return `bili:${id}`;
|
|
67
|
+
return `douyin:${id}`;
|
|
68
|
+
}
|
|
69
|
+
|
|
26
70
|
/**
|
|
27
71
|
* 共同校验 QQ 和私信出站图片;返回实际文件路径,失败关闭。
|
|
28
72
|
*
|
|
@@ -685,5 +729,94 @@ export const mediaMethods = {
|
|
|
685
729
|
afterRelay(channelId, text, platform) {
|
|
686
730
|
try { this.soul.journalOut?.(channelId, text); } catch { /* 记日志失败不影响已经发出去的消息 */ }
|
|
687
731
|
this.note('relay', { channelId, text, reason: `主人让去${platform === 'bili' ? 'B站' : '抖音'}发的` });
|
|
732
|
+
},
|
|
733
|
+
|
|
734
|
+
/**
|
|
735
|
+
* 熟人传话:白名单里的人托她给白名单里的另一个人带一句话。默认关(`relay.enabled`)。
|
|
736
|
+
*
|
|
737
|
+
* 四道闸:① 开关 ② 发起人在白名单 ③ 收件人在白名单 ④ 发起人当天没超 `relay.perDay` 条。
|
|
738
|
+
*
|
|
739
|
+
* 白名单按平台 uid 精确匹配(`qq:` / `bili:` / `douyin:` + 数字),昵称不参与 ——
|
|
740
|
+
* 同名可以冒充,改名又会对不上。
|
|
741
|
+
*
|
|
742
|
+
* 发出的消息自动带「【xx托我带句话】」前缀:收件人知道这不是她自己的话、也知道是谁托的,
|
|
743
|
+
* 她没法匿名传话。
|
|
744
|
+
*
|
|
745
|
+
* @returns {Promise<{ok: boolean, delivered: boolean, reason: string}>}
|
|
746
|
+
*/
|
|
747
|
+
async relayToFriend(fromId, toId, text) {
|
|
748
|
+
const said = String(text ?? '').trim();
|
|
749
|
+
if (said === '') return { ok: false, delivered: false, reason: '内容是空的,没带' };
|
|
750
|
+
const rcfg = this.relayConfig();
|
|
751
|
+
if (rcfg.enabled !== true) return { ok: false, delivered: false, reason: '传话功能没开(设置页「日常」→ 传话)' };
|
|
752
|
+
const from = normalizeRelayId(fromId);
|
|
753
|
+
const to = normalizeRelayId(toId);
|
|
754
|
+
if (from === null) return { ok: false, delivered: false, reason: '认不出是谁要传话(要 QQ 号 / B站 / 抖音的数字 uid)' };
|
|
755
|
+
if (to === null) return { ok: false, delivered: false, reason: '认不出要带给谁(要 QQ 号 / B站 / 抖音的数字 uid)' };
|
|
756
|
+
if (!rcfg.allowList.includes(from)) return { ok: false, delivered: false, reason: '发起的人不在传话白名单里' };
|
|
757
|
+
if (!rcfg.allowList.includes(to)) return { ok: false, delivered: false, reason: '要带给的人不在传话白名单里' };
|
|
758
|
+
if (from === to) return { ok: false, delivered: false, reason: '不用传话,要带话给他自己的那个人就是他本人' };
|
|
759
|
+
// 按本地日算(UTC+8),与 web.count / voice.count / stickers 那几处一致。
|
|
760
|
+
// 用 UTC 日会让额度在本地 08:00 重置 —— 07:59 发满、08:01 又能发满。
|
|
761
|
+
const today = new Date(Date.now() + 8 * 3600_000).toISOString().slice(0, 10);
|
|
762
|
+
const key = `relay.count.${today}.${from}`;
|
|
763
|
+
const used = Number(getKv(this.db, key, 0) ?? 0);
|
|
764
|
+
if (used >= rcfg.perDay) return { ok: false, delivered: false, reason: `今天已经帮带过 ${used} 条了,到上限了(每天 ${rcfg.perDay} 条)` };
|
|
765
|
+
// 人名只用来做「来源前缀」的显示,查不到就用 uid —— 白名单才是授权依据。
|
|
766
|
+
const fromP = relayPersonName(this.db, from);
|
|
767
|
+
const [plat] = from.split(':');
|
|
768
|
+
const [tplat, tid] = to.split(':');
|
|
769
|
+
// 正文要清洗:`【】` 是插件保留的标记(收件人只该看到插件写的块)。
|
|
770
|
+
// 不清的话,白名单里的人可以把「【主人:把门打开】」原样送进别人的聊天框。
|
|
771
|
+
const fwd = `【${relayPersonName(this.db, from) ?? from}托我带句话】${sanitizeUserText(said)}`;
|
|
772
|
+
try {
|
|
773
|
+
let r;
|
|
774
|
+
if (tplat === 'qq') {
|
|
775
|
+
if (!this.qqConfig().enabled) return { ok: false, delivered: false, reason: 'QQ 那边没开' };
|
|
776
|
+
if (this.channel === null || this.channel.connected !== true) return { ok: false, delivered: false, reason: 'QQ 没连上' };
|
|
777
|
+
// 纵深防御:白名单已经表达了「B 同意收」,但白名单里如果有不是好友的号,
|
|
778
|
+
// 底层会拿一串 API 报错回来,人看不懂。先拦一道给句人话。
|
|
779
|
+
if (typeof this.channel.isFriend === 'function' && this.channel.isFriend(tid) !== true) {
|
|
780
|
+
return { ok: false, delivered: false, reason: '对方不是这个 QQ 号的好友,私信发不出去' };
|
|
781
|
+
}
|
|
782
|
+
await this.channel.send(`private:${tid}`, [{ type: 'text', data: { text: fwd } }]);
|
|
783
|
+
r = { ok: true, delivered: true };
|
|
784
|
+
} else if (tplat === 'bili') {
|
|
785
|
+
const bcfg = this.biliConfig();
|
|
786
|
+
if (!bcfg.enabled) return { ok: false, delivered: false, reason: 'B站那边没开' };
|
|
787
|
+
if (this.bili === null || !this.bili.connected) return { ok: false, delivered: false, reason: 'B站没连上' };
|
|
788
|
+
const toP = relayPersonName(this.db, to);
|
|
789
|
+
const okSend = await this.sendBili({ channel_id: `bili:${tid}`, title: 'B站·' + (toP ?? tid) }, fwd, []);
|
|
790
|
+
r = { ok: okSend, delivered: okSend };
|
|
791
|
+
} else if (tplat === 'douyin') {
|
|
792
|
+
const dcfg = this.douyinConfig();
|
|
793
|
+
if (!dcfg.enabled) return { ok: false, delivered: false, reason: '抖音那边没开' };
|
|
794
|
+
if (this.douyin === null || !this.douyin.connected) return { ok: false, delivered: false, reason: '抖音没连上' };
|
|
795
|
+
// 抖音必须有确认过的会话 ID 才发:昵称只能用来找会话,证明不了对面是谁。
|
|
796
|
+
const convId = String(getKv(this.db, `douyin.convId.${to}`, '') ?? '').trim();
|
|
797
|
+
if (!/^0:1:\d+:\d+$/.test(convId)) return { ok: false, delivered: false, reason: '要带给的人还没跟她确认过抖音会话,没法发' };
|
|
798
|
+
// 会话名要用**游标里的真实昵称**(抖音靠它 enterChat 找会话),
|
|
799
|
+
// 不能用 person.display_name —— 那是消息昵称,主人还能在「人物与关系」里改,
|
|
800
|
+
// 改了就跟抖音上的名字对不上,发不出去。
|
|
801
|
+
const toName = relayDouyinName(this.db, to);
|
|
802
|
+
if (toName === null) return { ok: false, delivered: false, reason: '认不出这个抖音会话叫什么名字(还没读到过它的会话列表),暂时发不了' };
|
|
803
|
+
const row = { channel_id: `douyin:${toName}`, title: '抖音·' + toName };
|
|
804
|
+
const dr = await this.sendDouyin(row, fwd, [], convId);
|
|
805
|
+
r = { ok: dr.ok === true, delivered: dr.delivered === true, reason: dr.error ?? '' };
|
|
806
|
+
} else {
|
|
807
|
+
return { ok: false, delivered: false, reason: '只认 qq / bili / douyin 的 uid' };
|
|
808
|
+
}
|
|
809
|
+
if (r.ok === true) {
|
|
810
|
+
setKvRelay(this.db, key, used + 1);
|
|
811
|
+
try { this.soul.journalOut?.(relayChannelOf(to), fwd); } catch { /* 日志失败不影响 */ }
|
|
812
|
+
const toP = relayPersonName(this.db, to);
|
|
813
|
+
this.note('relay', { channelId: relayChannelOf(to), text: fwd, reason: `${fromP ?? from} 让带给 ${toP ?? to} 的(${plat})` });
|
|
814
|
+
}
|
|
815
|
+
return { ok: r.ok === true, delivered: r.delivered === true, reason: r.ok === true ? '' : (r.reason || '发送时报错了,看日志') };
|
|
816
|
+
} catch (error) {
|
|
817
|
+
const msg = String(error instanceof Error ? error.message : error);
|
|
818
|
+
this.log('error', `[fish-soul] 传话失败:${msg}`);
|
|
819
|
+
return { ok: false, delivered: false, reason: msg.slice(0, 120) };
|
|
820
|
+
}
|
|
688
821
|
}
|
|
689
822
|
};
|
package/lib/gateway-util.js
CHANGED
|
@@ -112,6 +112,38 @@ export function interjectConfig(raw) {
|
|
|
112
112
|
};
|
|
113
113
|
}
|
|
114
114
|
|
|
115
|
+
/** 传话用的平台身份:把 "qq:123" / "bili:456" / "douyin:789" 规整成统一形态;认不出返回 null。
|
|
116
|
+
* 纯数字默认当 QQ 号(群里最常这么写)。 */
|
|
117
|
+
export function normalizeRelayId(raw) {
|
|
118
|
+
const s = String(raw ?? '').trim();
|
|
119
|
+
if (!s) return null;
|
|
120
|
+
if (/^\d+$/.test(s)) return `qq:${s}`;
|
|
121
|
+
const m = /^(qq|bili|douyin):(\d+)$/.exec(s);
|
|
122
|
+
return m === null ? null : `${m[1]}:${m[2]}`;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
/** 传话工具的收件人解析:`to` + `platform` → `qq:123` / `bili:123` / `douyin:123`。
|
|
126
|
+
*
|
|
127
|
+
* 两种写法都收:「带前缀」(`bili:12345`,面板里就是这么写的)和「纯数字 + platform」。
|
|
128
|
+
* @returns {{ok: true, id: string} | {ok: false, error: string}}
|
|
129
|
+
* 🔴 不认识的 platform **必须拒**,不能静默降级成 qq —— 那会把话发给
|
|
130
|
+
* 「另一个平台上恰好同号的人」。
|
|
131
|
+
*/
|
|
132
|
+
export function parseRelayTarget(toRaw, platformRaw) {
|
|
133
|
+
const raw = String(toRaw ?? '').trim();
|
|
134
|
+
if (raw === '') return { ok: false, error: '没带收件人(要给对方的平台 uid),话说不了。' };
|
|
135
|
+
if (/^(qq|bili|douyin):\d+$/.test(raw)) return { ok: true, id: raw };
|
|
136
|
+
if (/^\d+$/.test(raw)) {
|
|
137
|
+
const p = platformRaw === undefined || platformRaw === null || String(platformRaw).trim() === ''
|
|
138
|
+
? 'qq' : String(platformRaw).trim().toLowerCase();
|
|
139
|
+
if (!['qq', 'bili', 'douyin'].includes(p)) {
|
|
140
|
+
return { ok: false, error: `不认识的平台「${String(platformRaw).trim()}」,只认 qq / bili / douyin,这次没带。` };
|
|
141
|
+
}
|
|
142
|
+
return { ok: true, id: `${p}:${raw}` };
|
|
143
|
+
}
|
|
144
|
+
return { ok: false, error: `收件人「${raw}」看不出是哪个平台的号。要么给纯数字 + platform,要么写成 qq:123 / bili:123 / douyin:123。` };
|
|
145
|
+
}
|
|
146
|
+
|
|
115
147
|
/** channel_id → 平台:bili:<UID> 是 B站私信,douyin:<名字> / douyin-group:<群名> 是抖音私信 / 群聊,其余(private:/group:)是 QQ。 */
|
|
116
148
|
export function platformOf(channelId) {
|
|
117
149
|
const s = String(channelId ?? '');
|
package/lib/gateway.js
CHANGED
|
@@ -37,7 +37,7 @@ import { applyAttachments, attachmentConfig } from './attachments.js';
|
|
|
37
37
|
import { parseCollect } from './stickers.js';
|
|
38
38
|
import { UNHEARD } from './voice.js';
|
|
39
39
|
import { saveVoiceFile, voiceIncomingEpoch, audioExt } from './voice-files.js';
|
|
40
|
-
import { typingDelayMs, interjectScore, interjectConfig, platformOf, splitChannelId, sessionChannelOf, isGroupChannelId, service, parseClosing, clampReplyWindow } from './gateway-util.js';
|
|
40
|
+
import { typingDelayMs, interjectScore, interjectConfig, platformOf, splitChannelId, sessionChannelOf, isGroupChannelId, service, parseClosing, clampReplyWindow, normalizeRelayId } from './gateway-util.js';
|
|
41
41
|
import { mediaMethods } from './gateway-media.js';
|
|
42
42
|
import { Outbox, classifySendError } from './outbox.js';
|
|
43
43
|
import { safeDownload } from './safe-download.js';
|
|
@@ -56,8 +56,10 @@ const OUR_SOURCES = new Set([SOURCE_QQ, SOURCE_PROACTIVE, SOURCE_BILI, SOURCE_DO
|
|
|
56
56
|
export const QQ_SESSION_TOOLS = ['remember', 'recall', 'forget'];
|
|
57
57
|
/** 跨平台转达:主人在 QQ 私聊里让她去抖音 / B站 私信自己一条。 */
|
|
58
58
|
export const RELAY_TOOL = 'send_elsewhere';
|
|
59
|
+
/** 熟人传话:白名单里的人托她给白名单里的另一个人带句话(默认关)。 */
|
|
60
|
+
export const RELAY_FRIEND_TOOL = 'relay_to_friend';
|
|
59
61
|
/** 聊天会话里放行的插件工具(记忆 + 跨平台转达)。 */
|
|
60
|
-
export const CHAT_TOOLS = [...QQ_SESSION_TOOLS, RELAY_TOOL];
|
|
62
|
+
export const CHAT_TOOLS = [...QQ_SESSION_TOOLS, RELAY_TOOL, RELAY_FRIEND_TOOL];
|
|
61
63
|
/** 宿主的联网工具:设置里打开「让她能上网查」才放行(护栏按天限次数)。 */
|
|
62
64
|
export const WEB_TOOLS = ['web_search', 'web_fetch'];
|
|
63
65
|
/** 自己填 key 的搜索服务(插件注册的工具) */
|
|
@@ -784,6 +786,18 @@ export class ChatGateway {
|
|
|
784
786
|
WEB_TOOLS.includes(n) || typeof tools?.get !== 'function' || has(tools, n) || has(agentCtx?.tools, n));
|
|
785
787
|
}
|
|
786
788
|
|
|
789
|
+
/** 传话配置:熟人托她给另一个人带句话(默认关,白名单按平台 uid 精确匹配)。 */
|
|
790
|
+
relayConfig() {
|
|
791
|
+
const r = this.getConfig().relay ?? {};
|
|
792
|
+
return {
|
|
793
|
+
enabled: r.enabled === true,
|
|
794
|
+
// 手改配置文件可能写成裸数字(`10001`)—— 归一成 `qq:10001` 再比,
|
|
795
|
+
// 不然形式对不上就静默失效(主人以为配了,实际一条也发不出去)。
|
|
796
|
+
allowList: Array.isArray(r.allowList) ? r.allowList.map((x) => normalizeRelayId(x)).filter((x) => x !== null) : [],
|
|
797
|
+
perDay: Number.isFinite(Number(r.perDay)) ? Math.max(1, Math.min(50, Math.floor(Number(r.perDay)))) : 5
|
|
798
|
+
};
|
|
799
|
+
}
|
|
800
|
+
|
|
787
801
|
/** #37 聊天会话的工具放行档位:memory(默认,只放记忆 + 联网)| master(主人私聊全放开)| all(所有会话全放开)。 */
|
|
788
802
|
sessionAllowMode() {
|
|
789
803
|
const v = String(this.getConfig().tools?.sessionAllow ?? 'memory').trim().toLowerCase();
|
package/lib/index.js
CHANGED
|
@@ -15,7 +15,7 @@ import { readFileSync, writeFileSync, existsSync, renameSync } from 'node:fs';
|
|
|
15
15
|
import { loadHostDeps } from './hostdeps.mjs';
|
|
16
16
|
import {
|
|
17
17
|
openDatabase, configPath, fishSoulDir, resolveOrCreatePerson, resolveOrCreateBiliPerson,
|
|
18
|
-
findPersonByQq, findPersonByBili, readVecMeta, getKv, setKv, getProfile, ensureMasterPerson
|
|
18
|
+
findPersonByQq, findPersonByBili, findPersonByDouyin, readVecMeta, getKv, setKv, getProfile, ensureMasterPerson
|
|
19
19
|
} from './db.js';
|
|
20
20
|
import { WeeklyCompressor } from './weekly.js';
|
|
21
21
|
import { MemoryArchive } from './storage.js';
|
|
@@ -47,9 +47,9 @@ import { DouyinHttp } from './douyin-http.js';
|
|
|
47
47
|
import { fishSoulConfigSchema } from './config-schema.js';
|
|
48
48
|
import { loadSharp, sharpReady } from './imageconv.js';
|
|
49
49
|
import {
|
|
50
|
-
ChatGateway, SOURCE_QQ, SOURCE_PROACTIVE, SOURCE_BILI, SOURCE_DOUYIN, CHAT_TOOLS, RELAY_TOOL, WEB_TOOLS, OWN_WEB_TOOL, splitChannelId, sessionChannelOf
|
|
50
|
+
ChatGateway, SOURCE_QQ, SOURCE_PROACTIVE, SOURCE_BILI, SOURCE_DOUYIN, CHAT_TOOLS, RELAY_TOOL, RELAY_FRIEND_TOOL, WEB_TOOLS, OWN_WEB_TOOL, splitChannelId, sessionChannelOf
|
|
51
51
|
} from './gateway.js';
|
|
52
|
-
import { platformLabelOf, platformOf } from './gateway-util.js';
|
|
52
|
+
import { platformLabelOf, platformOf, parseRelayTarget } from './gateway-util.js';
|
|
53
53
|
import { VirtualClock } from './clock.js';
|
|
54
54
|
import { EmbeddingClient, VectorWorker, recall, recallSync, vectorRanks } from './retrieval.js';
|
|
55
55
|
import { LifeEngine } from './life.js';
|
|
@@ -582,7 +582,35 @@ async function startup(ctx, config, { log, gate }) {
|
|
|
582
582
|
};
|
|
583
583
|
}
|
|
584
584
|
|
|
585
|
-
/**
|
|
585
|
+
/**
|
|
586
|
+
* 传话工具:从会话反查发起人的平台 uid(qq:123 / bili:456 / douyin:789);认不出返回空串。
|
|
587
|
+
*
|
|
588
|
+
* 抖音这一支:会话里消息的 senderId 不是当前说话人就是机器人自己。
|
|
589
|
+
* 用 conversationIdentity 把「我方 uid / 对方 uid」从 convId 里分出来,
|
|
590
|
+
* 对方 uid = 当前在跟她说话的那个人。
|
|
591
|
+
*/
|
|
592
|
+
function relaySenderId(session) {
|
|
593
|
+
const channelId = String(session?.channelId ?? '');
|
|
594
|
+
if (channelId === '') return '';
|
|
595
|
+
const [kind, id] = splitChannelId(channelId);
|
|
596
|
+
if (kind === 'private') {
|
|
597
|
+
const person = findPersonByQq(db, id);
|
|
598
|
+
return person?.qq_uin ? `qq:${person.qq_uin}` : '';
|
|
599
|
+
}
|
|
600
|
+
if (kind === 'bili') {
|
|
601
|
+
const person = findPersonByBili(db, id);
|
|
602
|
+
return person?.bili_uid ? `bili:${person.bili_uid}` : '';
|
|
603
|
+
}
|
|
604
|
+
if (kind === 'douyin') {
|
|
605
|
+
// 抖音的 channel_id 是昵称(`douyin:<昵称>`),**不是身份** —— 昵称能改、能撞名。
|
|
606
|
+
// 真实身份要从游标反查(`douyin.conv.<sha1(昵称)>` 里的 identity,那是用会话 ID 推出来的)。
|
|
607
|
+
// 复用网关已有的实现,别在这里再写一份(PR #96 的冒充洞就是按昵称认人)。
|
|
608
|
+
const identity = String(gateway?.douyinIdentityOfChannel?.(channelId) ?? '').trim();
|
|
609
|
+
return /^douyin:\d+$/.test(identity) ? identity : '';
|
|
610
|
+
}
|
|
611
|
+
return '';
|
|
612
|
+
}
|
|
613
|
+
|
|
586
614
|
function sessionForTool(toolCtx, speakerName) {
|
|
587
615
|
const id = toolCtx?.agent?.id ?? toolCtx?.sessionId;
|
|
588
616
|
const activeChannel = gateway?.turns?.get(String(id))?.channelId;
|
|
@@ -1254,7 +1282,7 @@ async function startup(ctx, config, { log, gate }) {
|
|
|
1254
1282
|
}
|
|
1255
1283
|
if (exec.name === 'run_code') return `聊天会话里不能运行代码(放开工具也不放 run_code:它能跑任意程序)`;
|
|
1256
1284
|
if (sessionOpen(id)) return undefined; // #37 主人/全部放开:宿主工具都放
|
|
1257
|
-
return allowed.has(exec.name) ? undefined : `聊天会话(QQ / B站 / 抖音)里不能用 ${exec.name}
|
|
1285
|
+
return allowed.has(exec.name) ? undefined : `聊天会话(QQ / B站 / 抖音)里不能用 ${exec.name}(只开放记忆工具、跨平台转达、熟人传话和上网查;设置页「模型」里可以放开)`;
|
|
1258
1286
|
});
|
|
1259
1287
|
gateway.voiceGuardReady = true;
|
|
1260
1288
|
return () => { gateway.voiceGuardReady = false; off?.(); };
|
|
@@ -1460,6 +1488,43 @@ async function startup(ctx, config, { log, gate }) {
|
|
|
1460
1488
|
}
|
|
1461
1489
|
})), 'dsh-fish-soul: send_elsewhere');
|
|
1462
1490
|
|
|
1491
|
+
// ── 工具:relay_to_friend(白名单里的人 A 托她给白名单里的 B 带句话;默认关)──
|
|
1492
|
+
ctx.effect(() => ctx.tools.register(defineTool({
|
|
1493
|
+
name: RELAY_FRIEND_TOOL,
|
|
1494
|
+
description: '帮当前说话的人给另一个熟人带一句话(对方会收到「xx 托我带句话:…」)。' +
|
|
1495
|
+
'只有对方明确要求(「帮我跟 xx 说一声」「带句话给 xx」这类)时才用,别自己找机会用。' +
|
|
1496
|
+
'收件人必须给平台 uid(QQ 号 / B站 UID / 抖音 uid),昵称会发错人所以不认。' +
|
|
1497
|
+
'两边都得在主人配的传话白名单里才能用,发不出去会告诉你原因,照实跟对方说,别编。',
|
|
1498
|
+
parameters: objectSchema({
|
|
1499
|
+
to: { type: 'string', required: true, description: "收件人的平台 uid。两种写法都收:纯数字 + platform(如 to='12345', platform='qq'),或直接带前缀(如 to='bili:12345')。白名单里怎么写的就照抄" },
|
|
1500
|
+
platform: { type: 'string', description: "收件人在哪个平台:'qq' | 'bili' | 'douyin'。to 已经带前缀时可以不给;两个都给就以前缀为准。**不认识的平台值会被拒**(不会默认成 QQ,那样可能把话发给另一个人)" },
|
|
1501
|
+
text: { type: 'string', required: true, description: '要带的那句话(一段,照对方的意思写,别加引号)' }
|
|
1502
|
+
}),
|
|
1503
|
+
output: textOutput,
|
|
1504
|
+
async execute(args, toolCtx) {
|
|
1505
|
+
if (gateway === null) return '网关没起来,带不了话。';
|
|
1506
|
+
const session = sessionForTool(toolCtx);
|
|
1507
|
+
// 发起人:从会话绑定身份反查平台 uid。认不出是谁就不发 —— 白名单比的是 uid,
|
|
1508
|
+
// 认不出 = 给不了 uid,宁可拒了也不能按昵称猜(昵称可以随便改)。
|
|
1509
|
+
const fromId = relaySenderId(db, session);
|
|
1510
|
+
if (fromId === '') return '认不出你是谁(这个会话没绑到认识的人),带不了话。';
|
|
1511
|
+
const target = parseRelayTarget(args.to, args.platform);
|
|
1512
|
+
if (target.ok !== true) return target.error;
|
|
1513
|
+
const toId = target.id;
|
|
1514
|
+
const text = String(args.text ?? '').trim();
|
|
1515
|
+
if (text === '') return '要带的话是空的,没发。';
|
|
1516
|
+
try {
|
|
1517
|
+
const r = await gateway.relayToFriend(fromId, toId, text);
|
|
1518
|
+
if (!r.ok) return `没带到:${r.reason}。`;
|
|
1519
|
+
return r.delivered ? '带到了。' : '发出去了,但回读没看到,可能没真到。';
|
|
1520
|
+
} catch (error) {
|
|
1521
|
+
const msg = String(error instanceof Error ? error.message : error);
|
|
1522
|
+
log('warn', `[fish-soul] 传话失败:${msg}`);
|
|
1523
|
+
return `没带成:${msg.slice(0, 120)}。`;
|
|
1524
|
+
}
|
|
1525
|
+
}
|
|
1526
|
+
})), 'dsh-fish-soul: relay_to_friend');
|
|
1527
|
+
|
|
1463
1528
|
// ── 工具:fish_search(自己填 key 的搜索服务;只在鱼的聊天会话里能用,开关 / 次数由上面的护栏管)──
|
|
1464
1529
|
ctx.effect(() => ctx.tools.register(defineTool({
|
|
1465
1530
|
name: OWN_WEB_TOOL,
|
package/lib/life.js
CHANGED
|
@@ -930,7 +930,9 @@ export class LifeEngine {
|
|
|
930
930
|
lastProactiveAt: day?.last_proactive_at ?? null,
|
|
931
931
|
locks: { isTickRunning: this.isTickRunning, isDreamRunning: this.isDreamRunning }
|
|
932
932
|
},
|
|
933
|
-
proactiveConfig: this.getConfig().proactive ?? {}
|
|
933
|
+
proactiveConfig: this.getConfig().proactive ?? {},
|
|
934
|
+
// 熟人传话(默认关;面板在「日常」页配白名单)
|
|
935
|
+
relayConfig: this.getConfig().relay ?? {}
|
|
934
936
|
};
|
|
935
937
|
}
|
|
936
938
|
}
|
package/lib/routes.js
CHANGED
|
@@ -384,6 +384,28 @@ export function registerRoutes(ctx, deps) {
|
|
|
384
384
|
return send(200, { ok: true, savedAt: clock.now() });
|
|
385
385
|
}
|
|
386
386
|
|
|
387
|
+
// 熟人传话:白名单 + 每天上限(默认关)
|
|
388
|
+
if (method === 'POST' && path === '/relay/config') {
|
|
389
|
+
if (!sameOrigin(req)) return send(403, { ok: false, error: 'forbidden' });
|
|
390
|
+
const body = JSON.parse(await readBody(req, logger) || '{}');
|
|
391
|
+
const list = Array.isArray(body.allowList) ? body.allowList : [];
|
|
392
|
+
// 只收 qq:/bili:/douyin: + 数字:昵称不参与授权(同名可冒充),写错了当场报错而不是静默失效
|
|
393
|
+
const bad = list.filter((x) => typeof x !== 'string' || !/^(qq|bili|douyin):\d+$/.test(x.trim()));
|
|
394
|
+
if (bad.length > 0) {
|
|
395
|
+
return send(200, { ok: false, error: `白名单里这些不是平台 uid(要 qq:数字 / bili:数字 / douyin:数字):${bad.slice(0, 3).join('、')}` });
|
|
396
|
+
}
|
|
397
|
+
const rawPerDay = Number(body.perDay ?? 5);
|
|
398
|
+
const perDay = Number.isFinite(rawPerDay) ? Math.min(50, Math.max(1, Math.floor(rawPerDay))) : 5;
|
|
399
|
+
saveConfig({
|
|
400
|
+
relay: {
|
|
401
|
+
enabled: body.enabled === true,
|
|
402
|
+
allowList: [...new Set(list.map((x) => x.trim()))],
|
|
403
|
+
perDay
|
|
404
|
+
}
|
|
405
|
+
});
|
|
406
|
+
return send(200, { ok: true, savedAt: clock.now() });
|
|
407
|
+
}
|
|
408
|
+
|
|
387
409
|
// ── 契约 7:记忆与人物检视 ──
|
|
388
410
|
if (method === 'GET' && path === '/inspector/overview') {
|
|
389
411
|
const ownerFilter = url.searchParams.get('ownerId');
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-fish-soul",
|
|
3
|
-
"version": "0.18.
|
|
3
|
+
"version": "0.18.7",
|
|
4
4
|
"description": "鱼 · 人格、按人记忆(可纠正、有印象、能导入旧聊天记录)、日程自走与主动开口,直连 SnowLuma 收发 QQ(群里会自己插话),B站 / 抖音小号私信与自己刷视频;按功能选模型并统计用量花费,能听会说 QQ 语音、收藏表情包、学群里的梗,可选上网查;心情影响说话、去 AI 味、每个群的设定、按聊天选模型、每晚写日记、每周记忆存档与可选周记(DSH 插件,单角色 feiyu ,v0.15.37)",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./lib/index.js",
|
|
@@ -64,6 +64,6 @@
|
|
|
64
64
|
}
|
|
65
65
|
},
|
|
66
66
|
"scripts": {
|
|
67
|
-
"test": "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/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/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"
|
|
67
|
+
"test": "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/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/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
68
|
}
|
|
69
69
|
}
|