dsh-fish-soul 0.19.27 → 0.19.29

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.19.27**。
5
+ DSH 插件(单角色 `feiyu`)。版本 **0.19.29**。
6
6
 
7
7
  QQ 交流群:**1125962189**
8
8
 
@@ -43,7 +43,11 @@ export function messageFingerprint(m) {
43
43
  const i = src.indexOf('/obj/');
44
44
  src = (i >= 0 ? src.slice(i) : src).split('?')[0].slice(-60);
45
45
  }
46
- return sha1([m?.fromMe ? 'me' : 'peer', String(m?.text ?? '').trim().slice(0, 120), m?.type ?? '', src, media.name ?? '', m?.shareAweme ?? ''].join('|')).slice(0, 16);
46
+ // 🔴 表情名是**派生信息**,不是身份:`resolveEmojiNames` 在表情面板打不开时第一轮拿不到名字,
47
+ // 下一轮补上 —— 名字一进指纹,同一条表情就换一个 ID,照样重复入库(#286 真机报的就是表情)。
48
+ // 所以只在 src 为空(没有本体)时才拿名字当兜底身份。
49
+ const nameKey = src === '' ? String(media.name ?? '') : '';
50
+ return sha1([m?.fromMe ? 'me' : 'peer', String(m?.text ?? '').trim().slice(0, 120), m?.type ?? '', src, nameKey, m?.shareAweme ?? ''].join('|')).slice(0, 16);
47
51
  }
48
52
 
49
53
  /**
@@ -106,6 +110,16 @@ export function occurrenceIndexes(prints) {
106
110
  });
107
111
  }
108
112
 
113
+ /**
114
+ * 媒体消息(图片 / 表情 / 视频)有没有能当稳定键的源(data: 本体或图片地址)。
115
+ * 文本 / 分享卡片 / 没抓到源的媒体返回 false —— 那些走时间或卡片自己的路。
116
+ */
117
+ export function hasStableMediaSource(m) {
118
+ const t = String(m?.type ?? '').trim();
119
+ if (t !== 'image' && t !== 'emoji' && t !== 'video') return false;
120
+ return String(m?.media?.data || m?.media?.src || '') !== '';
121
+ }
122
+
109
123
  /**
110
124
  * 一条入站消息的「时间 + 去重 ID」。
111
125
  *
@@ -115,13 +129,25 @@ export function occurrenceIndexes(prints) {
115
129
  * · **同一条消息重复读** ⇒ 同一个 ID(否则每次轮询都新入库一遍,重复回复 + 烧 token)
116
130
  * · **同一个人后来又说了同样的话 / 又发了同一张图** ⇒ 不同的 ID(否则第二句被吞,等于失联)
117
131
  *
118
- * 所以分三级,越靠前越准:
132
+ * 所以分级,越靠前越准:
119
133
  * ① 有 `seq`(接口路,平台序号) → `s<seq>`
120
- * ② 有平台时间(接口路本来有;DOM 路现在从气泡文字反解) → `<指纹>-<timeMs>-<occ>`
121
- * ③ 两者都没有(极少) → `<指纹>-<自然日>-<occ>`
134
+ * ② 分享卡片有作品 ID(跨轮询稳定、跨卡片唯一) → `c<作品ID>-<occ>`
135
+ * ③ 媒体消息有源(图片/表情/视频,指纹里已含归一化后的源) → `<指纹>-<occ>`
136
+ * ④ 有平台时间(接口路本来有;DOM 路现在从气泡文字反解) → `<指纹>-<timeMs>-<occ>`
137
+ * ⑤ 两者都没有(极少) → `<指纹>-<自然日>-<occ>`
138
+ *
139
+ * ⚠️ ③ 为什么媒体 ID 不能掺时间:DOM 路的「时间」是从气泡上「刚刚 / N 分钟前」反解的,
140
+ * 而「刚刚」那一档返回的是**当前时刻**,每轮询一次就变一个值(#286 真机:同一张表情
141
+ * 入库 8 次、每行 ID 里的时间戳都差几秒)。指纹里的媒体源(data: 本体 hash / URL 截
142
+ * `/obj/` 后去掉签名参数)跨轮询逐字节稳定,所以用「指纹-occ」当身份。
143
+ *
144
+ * `occ`(同指纹在**本次读到的列表**里第几次出现)在这里是安全的:正常轮询下
145
+ * `newFrom` 只把真正的新消息放进 fresh,同一条消息的 `occ` 就是确定的。
146
+ * 窗口整个对不齐时(中间来了 20+ 条)`occ` 可能变,代价是**重复入库一次**,
147
+ * 而不是漏收 —— 而且那条路本来就会记 gap 提示给用户。
148
+ * 「重复只是烦,漏回是失联」是这里的取舍依据。
122
149
  *
123
- * ⚠️ ③ 是**已知取舍**:同一天内、既没 seq 又认不出时间的同内容消息仍会撞。
124
- * 别为了省事把 ② 也降级到 ③ —— 那会让「同一天说两次『在』」第二句收不到。
150
+ * ⚠️ ④→⑤ 别降级:那会让「同一天说两次『在』」第二句收不到。
125
151
  *
126
152
  * @param {object} m 入站消息(可能带 `time` / `seq`)
127
153
  * @param {{occ?: number, fallbackTime?: number, dayKey?: string}} ctx
@@ -138,13 +164,18 @@ export function messageIdFor(m, { occ = 0, fallbackTime = Date.now(), dayKey = '
138
164
  // 拿它当 ID 等于 UNIQUE(channel_id, message_id) 完全失效(真机:一张卡入库 13 次、回了 13 遍)。
139
165
  // 作品 ID 跨轮询稳定、跨卡片唯一,比 seq 还准(DOM 路本来就没有 seq)。
140
166
  const card = String(m?.shareAweme ?? '').trim();
167
+ // 媒体同病同修(#286):没 seq 的图片 / 表情走的也是反解时间,同一张表情入库 8 次。
168
+ // 指纹里的媒体源(data: 本体 hash / URL 去签名参数)跨轮询稳定 ⇒ 用「指纹-occ」,时间不进 ID。
169
+ const media = card === '' && seq === '' && hasStableMediaSource(m);
141
170
  const messageId = card !== ''
142
171
  ? `c${card}-${occ}`
143
172
  : seq !== ''
144
173
  ? `s${seq}`
145
- : hasTime
146
- ? `${print}-${timeMs}-${occ}`
147
- : `${print}-${day}-${occ}`;
174
+ : media
175
+ ? `${print}-${occ}`
176
+ : hasTime
177
+ ? `${print}-${timeMs}-${occ}`
178
+ : `${print}-${day}-${occ}`;
148
179
  return { timeMs, messageId };
149
180
  }
150
181
 
package/lib/data-dir.js CHANGED
@@ -11,12 +11,40 @@
11
11
  * 通过才改名成目标,旧目录改名 `fish-moved-<时间>` 留档;
12
12
  * - 任何一步失败 → **回退旧目录继续跑,绝不空库启动**(半份数据比没有更糟)。
13
13
  */
14
- import { cp, mkdir, readdir, rename, rm, stat } from 'node:fs/promises';
15
- import { existsSync } from 'node:fs';
14
+ import { cp, mkdir, readdir, rename, rm, stat, writeFile } from 'node:fs/promises';
15
+ import { existsSync, readFileSync } from 'node:fs';
16
16
  import { dirname, isAbsolute, join, resolve, sep } from 'node:path';
17
- import { dshHome, configuredDataDir, setActiveDataDir, getKv, setKv } from './db.js';
17
+ import { dshHome, configPath, configuredDataDir, setActiveDataDir, getKv, setKv } from './db.js';
18
18
  import { stampLocal } from './time-util.js';
19
19
 
20
+ /** 配置文件里「上次生效的数据目录」的键名(搬完家写回,下次启动据此判断从哪搬)。 */
21
+ const ACTIVE_KEY = 'dataDirActive';
22
+
23
+ /**
24
+ * 读配置文件原文(JSON 对象;读不到 / 不是对象 → `{}`)。
25
+ * 写回时必须保留用户其它键,不能整份覆盖。
26
+ */
27
+ function readConfig() {
28
+ try {
29
+ const v = JSON.parse(readFileSync(configPath(), 'utf8').replace(/^\uFEFF/, ''));
30
+ return v && typeof v === 'object' && !Array.isArray(v) ? v : {};
31
+ } catch { return {}; }
32
+ }
33
+
34
+ /** 把配置写回去(保留其它键;写不进去只影响下次启动从哪搬,不影响本次)。 */
35
+ async function writeConfig(patch) {
36
+ const next = { ...readConfig(), ...patch };
37
+ try { await writeFile(configPath(), JSON.stringify(next, null, '\t'), 'utf8'); } catch { /* 同上 */ }
38
+ }
39
+
40
+ /** 上次生效的数据目录(配置文件里记的;没记 / 记的目录已不在 → `''`)。 */
41
+ function lastActiveDir() {
42
+ const v = String(readConfig()[ACTIVE_KEY] ?? '').trim();
43
+ if (v === '') return '';
44
+ // 目录已不在:当作没记(用户手删了留档、或换了机器),否则会试图从空处搬家
45
+ return existsSync(v) ? resolve(v) : '';
46
+ }
47
+
20
48
  /** 目录里有东西吗(跳过点开头的残留文件)。 */
21
49
  async function hasContent(dir) {
22
50
  try {
@@ -57,29 +85,51 @@ export async function verifyCopy(from, to) {
57
85
  }
58
86
 
59
87
  /**
60
- * 启动时决定数据放哪,必要时把默认目录搬过去。
88
+ * 启动时决定数据放哪,必要时把数据搬到新目录。
61
89
  *
62
90
  * 必须在 `openDatabase()` 之前调用 —— 库路径就是这里钉下去的。
91
+ *
92
+ * 「从哪搬」不再只看默认目录:配置文件里记着上次生效的目录(`dataDirActive`),
93
+ * 所以 自定义→默认、自定义A→自定义B 都能搬。没记(老安装)就按默认目录算。
63
94
  * @returns {Promise<{dir: string, moved: boolean, archived: string}>} archived = 旧目录改成的留档路径(没搬为空)
64
95
  */
65
96
  export async function ensureDataDir({ log = () => {}, copy = cp } = {}) {
66
- const from = join(dshHome(), 'fish-soul');
97
+ const last = lastActiveDir();
98
+ const from = last || join(dshHome(), 'fish-soul');
67
99
  const want = configuredDataDir();
100
+ if (want === null && last !== '' && resolve(last) !== resolve(join(dshHome(), 'fish-soul'))) {
101
+ // 用户清空了配置 = 「搬回默认目录」。默认目录就是目标,走下面同一条搬家流程。
102
+ return moveTo(join(dshHome(), 'fish-soul'), { from, log, copy, back: true });
103
+ }
68
104
  if (want === null || resolve(want) === resolve(from)) {
69
- // 没配(或配成默认)时**不缓存**:让 fishSoulDir() 每次现拼 dshHome(),
105
+ // 没配(或配成上次在用的目录)时**不缓存**:让 fishSoulDir() 每次现拼 dshHome(),
70
106
  // 否则测试里换 DSH_HOME 会全部串到第一个 home 上(smoke 第 20 组就是这么挂的)。
71
- setActiveDataDir(null);
72
- return { dir: from, moved: false };
107
+ // ⚠️ 只有「回到默认」才清缓存;配的正好是上次在用的自定义目录时要钉住它。
108
+ if (want === null) setActiveDataDir(null);
109
+ else setActiveDataDir(want);
110
+ return { dir: want ?? from, moved: false, archived: '' };
73
111
  }
112
+ return moveTo(want, { from, log, copy });
113
+ }
114
+
115
+ /**
116
+ * 把数据从 `from` 搬到 `want`(目标已确认是空的或不存在)。
117
+ * `back: true` 表示搬回默认目录 —— 成功后不写 dataDirActive(默认目录不需要记)。
118
+ */
119
+ async function moveTo(want, { from, log, copy, back = false }) {
74
120
  if (await hasContent(want)) {
75
- setActiveDataDir(want);
76
- return { dir: want, moved: false };
121
+ // 目标已经有东西(上次搬过 / 用户自己搬过)→ 直接用。顺手把「上次生效」钉过去,
122
+ // 这样下次再改目录才知道从这搬。
123
+ if (!back) await writeConfig({ [ACTIVE_KEY]: resolve(want) });
124
+ setActiveDataDir(back ? null : want);
125
+ return { dir: want, moved: false, archived: '' };
77
126
  }
78
127
  if (!(await hasContent(from))) {
79
128
  // 全新安装:直接在新位置起,没有可搬的东西
80
129
  await mkdir(want, { recursive: true });
81
- setActiveDataDir(want);
82
- return { dir: want, moved: false };
130
+ if (!back) await writeConfig({ [ACTIVE_KEY]: resolve(want) });
131
+ setActiveDataDir(back ? null : want);
132
+ return { dir: want, moved: false, archived: '' };
83
133
  }
84
134
 
85
135
  log('info', `[fish-soul] 数据目录搬家:${from} → ${want}`);
@@ -96,7 +146,8 @@ export async function ensureDataDir({ log = () => {}, copy = cp } = {}) {
96
146
  } catch (error) {
97
147
  // 半份数据不能留下 —— 下次启动会被当成「已经有内容」直接用
98
148
  try { await rm(incoming, { recursive: true, force: true }); } catch { /* 删不掉也不影响回退 */ }
99
- setActiveDataDir(null); // 回退到「跟着 DSH_HOME 走」
149
+ // 回退到「上次在用的目录」:可能是默认目录(老安装),也可能是上一个自定义目录(A→B 失败)
150
+ setActiveDataDir(lastActiveDir() === '' ? null : from);
100
151
  const msg = error instanceof Error ? error.message : String(error);
101
152
  log('error', `[fish-soul] 数据目录搬家失败,继续用 ${from}:${msg}`);
102
153
  throw error;
@@ -112,7 +163,9 @@ export async function ensureDataDir({ log = () => {}, copy = cp } = {}) {
112
163
  // 改名失败不影响使用:数据已经在新位置了,旧目录当成多余的副本
113
164
  log('warn', `[fish-soul] 旧数据目录改名失败(不影响使用):${error instanceof Error ? error.message : String(error)}`);
114
165
  }
115
- setActiveDataDir(want);
166
+ if (!back) await writeConfig({ [ACTIVE_KEY]: resolve(want) });
167
+ else await writeConfig({ [ACTIVE_KEY]: '' });
168
+ setActiveDataDir(back ? null : want);
116
169
  // 留档路径同时记进新库(openDatabase 之后才调 importArchives),这样面板能列出来删
117
170
  return { dir: want, moved: true, archived };
118
171
  }
@@ -175,7 +228,7 @@ export async function removeArchived(db, dir) {
175
228
  export function checkDataDir(value, current) {
176
229
  const raw = String(value ?? '').trim();
177
230
  if (raw === '') return ''; // 空 = 用默认,永远合法
178
- if (!isAbsolute(raw)) return '请填完整路径,比如 D:\fish-soul-data';
231
+ if (!isAbsolute(raw)) return '请填完整路径,比如 D:\\fish-soul-data';
179
232
  const next = resolve(raw);
180
233
  const cur = resolve(String(current ?? ''));
181
234
  if (next === cur) return ''; // 没变,允许(保存等于什么都没做)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-fish-soul",
3
- "version": "0.19.27",
3
+ "version": "0.19.29",
4
4
  "description": "鱼 · 人格、按人记忆(可纠正、有印象、能导入旧聊天记录)、日程自走与主动开口,直连 SnowLuma 收发 QQ(群里会自己插话),B站 / 抖音小号私信与自己刷视频;按功能选模型并统计用量花费,能听会说 QQ 语音、收藏表情包、学群里的梗,可选上网查;心情影响说话、去 AI 味、每个群的设定、按聊天选模型、每晚写日记、每周记忆存档与可选周记(DSH 插件,单角色 feiyu)",
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/config-shape-contract.mjs && node test/affected-suites-clean.mjs && node test/new-export-gate-rule.mjs && node test/check-commit-author.mjs && node test/check-docs-version-refs.mjs && node test/affected-suites-test.mjs && node test/check-commit-author-rule.mjs && node test/check-commit-author-wire.mjs && node test/check-docs-version-refs-rule.mjs && node test/check-docs-version-refs-wire.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-meta-lines.mjs && node test/douyin-read-fail-retry-poll.mjs && node test/douyin-live-fails.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/prompts.mjs && node test/prompts-route.mjs && node test/diary-topics-217.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-crash-restore.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/retrieval-tier-weights.mjs && node test/retrieval-tier-weights-route.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/llm-failure-backoff.mjs && node test/llm-budget-and-social-backoff.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/dsh-desktop-as-master.mjs && node test/desktop-as-master-switch.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/repeat-guard-cross-turn.mjs && node test/voice-paragraph-split.mjs && node test/voice-paragraph-split-wire.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/douyin-panel-width-threshold.mjs && node test/douyin-emoji-panel-close.mjs && node test/relay-other-platform.mjs && node test/relay-to-friend.mjs && node test/relay-sender-id.mjs && node test/data-dir.mjs && node test/data-dir-panel.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/memory-time-dedupe.mjs && node test/context-source-platform.mjs && node test/memory-source-label.mjs && node test/issue-239-maxtokens-wire.mjs && node test/issue-239-maxtokens.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/dream-merge-duplicates.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/check-secrets-nickname.mjs && node test/check-docs-freshness.mjs && node test/check-package-json-format.mjs && node test/wire-limits.mjs && node test/check-chromium-suites.mjs && node test/check-no-stash-scripts.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 && node test/scheduled-tasks.mjs && node test/scheduled-tasks-ui.mjs && node test/douyin-wave12-fixes.mjs && node test/prefetch-vec-await.mjs && node test/wave2-token-optimizations.mjs && node test/wave3-memory-retrieval.mjs && node test/rc5-token-inflation.mjs && node test/pending-surfaced-closure.mjs && node test/memory-digest-retry-239.mjs && node test/issue-244-paragraph-split.mjs && node test/issue-244-cleanout-e2e.mjs && node test/issue-269-qq-split-budget.mjs && node test/voice-mention-guard.mjs && node test/issue-247-media-url.mjs && node test/check-fork-pr-gate.mjs && node test/check-pr-hygiene.mjs && node test/check-import-cycles.mjs && node test/check-file-size-budget.mjs && node test/check-file-size-budget-rule.mjs && node test/check-silent-catch.mjs && node test/check-silent-catch-rule.mjs && node test/douyin-cookie-refresh.mjs && node test/douyin-back-to-list.mjs && node test/douyin-fastpath.mjs && node test/douyin-post-id-backfill.mjs && node test/douyin-canary-panel.mjs && node test/douyin-note-text.mjs && node test/bili-playback.mjs && node test/prompts-diary.mjs && node test/interject-interest.mjs && node test/transcript-master-only.mjs && node test/usage-visualization.mjs",
67
+ "test": "node test/check-test-chain.mjs && node test/config-shape-contract.mjs && node test/affected-suites-clean.mjs && node test/new-export-gate-rule.mjs && node test/check-commit-author.mjs && node test/check-docs-version-refs.mjs && node test/affected-suites-test.mjs && node test/check-commit-author-rule.mjs && node test/check-commit-author-wire.mjs && node test/check-docs-version-refs-rule.mjs && node test/check-docs-version-refs-wire.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-meta-lines.mjs && node test/douyin-read-fail-retry-poll.mjs && node test/douyin-live-fails.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/prompts.mjs && node test/prompts-route.mjs && node test/diary-topics-217.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-crash-restore.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/retrieval-tier-weights.mjs && node test/retrieval-tier-weights-route.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/llm-failure-backoff.mjs && node test/llm-budget-and-social-backoff.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/dsh-desktop-as-master.mjs && node test/desktop-as-master-switch.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/repeat-guard-cross-turn.mjs && node test/voice-paragraph-split.mjs && node test/voice-paragraph-split-wire.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/douyin-panel-width-threshold.mjs && node test/douyin-emoji-panel-close.mjs && node test/relay-other-platform.mjs && node test/relay-to-friend.mjs && node test/relay-sender-id.mjs && node test/data-dir.mjs && node test/data-dir-panel.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/memory-time-dedupe.mjs && node test/context-source-platform.mjs && node test/memory-source-label.mjs && node test/issue-239-maxtokens-wire.mjs && node test/issue-239-maxtokens.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/dream-merge-duplicates.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/check-secrets-nickname.mjs && node test/check-docs-freshness.mjs && node test/check-package-json-format.mjs && node test/wire-limits.mjs && node test/check-chromium-suites.mjs && node test/check-no-stash-scripts.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 && node test/scheduled-tasks.mjs && node test/scheduled-tasks-ui.mjs && node test/douyin-wave12-fixes.mjs && node test/prefetch-vec-await.mjs && node test/wave2-token-optimizations.mjs && node test/wave3-memory-retrieval.mjs && node test/rc5-token-inflation.mjs && node test/pending-surfaced-closure.mjs && node test/memory-digest-retry-239.mjs && node test/issue-244-paragraph-split.mjs && node test/issue-244-cleanout-e2e.mjs && node test/issue-269-qq-split-budget.mjs && node test/voice-mention-guard.mjs && node test/issue-247-media-url.mjs && node test/check-fork-pr-gate.mjs && node test/check-pr-hygiene.mjs && node test/check-import-cycles.mjs && node test/check-file-size-budget.mjs && node test/check-file-size-budget-rule.mjs && node test/check-silent-catch.mjs && node test/check-silent-catch-rule.mjs && node test/douyin-cookie-refresh.mjs && node test/douyin-back-to-list.mjs && node test/douyin-fastpath.mjs && node test/douyin-post-id-backfill.mjs && node test/douyin-canary-panel.mjs && node test/douyin-note-text.mjs && node test/bili-playback.mjs && node test/prompts-diary.mjs && node test/interject-interest.mjs && node test/transcript-master-only.mjs && node test/usage-visualization.mjs && node test/douyin-media-id-dedupe.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
  "typecheck": "npx --yes -p typescript tsc -p tsconfig.check.json"