dsh-fish-soul 0.19.22 → 0.19.24
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/behavior.js +7 -9
- package/lib/bili-playback.js +114 -30
- package/lib/config-platforms.js +1 -2
- package/package.json +2 -2
package/README.md
CHANGED
package/lib/behavior.js
CHANGED
|
@@ -354,8 +354,11 @@ function mergeToN(chunks, n, sep) {
|
|
|
354
354
|
* 只补不改;没有 [语音] 的文本原样返回(一个字节不动,连换行都保留原样);
|
|
355
355
|
* 含 [语音] 时先归一换行(\r\n → \n):CRLF 文本里 \r 夹在中间,
|
|
356
356
|
* 下游 split(/\n{2,}/) 本来就拆不开,不归一等于没做;
|
|
357
|
-
*
|
|
358
|
-
*
|
|
357
|
+
* 🔴 **只认行首,不切行内**(v0.19.22 加过「标记在句子中间就切一刀」,v0.19.23 撤掉了):
|
|
358
|
+
* `[语音]` 是聊天正文里的正常词(设置页与提示词都在教它),用户完全可能让她复述
|
|
359
|
+
* 「写的时候要加 [语音] 标记」—— 行内切分会把这句话的后半截当成语音念出来。
|
|
360
|
+
* 而「真语音」的全部写法(紧跟正文单换行 / 已有空行 / 缩进行首 / 多行念稿)行首这一条就盖住了,
|
|
361
|
+
* 实测七种写法逐个对比:行内切分只在「句中提及」和「词在句尾」两处产生差异,两处都是误报。
|
|
359
362
|
* 缩进认所有非换行空白(半角空格 / tab / 全角空格 U+3000):下游 VOICE_RE 用的是 \s,
|
|
360
363
|
* 提纯这一侧若只认半角,就会出现「下游认得出、却在拆段时拆不开」。
|
|
361
364
|
*/
|
|
@@ -363,14 +366,9 @@ export function normalizeVoiceParagraphs(input) {
|
|
|
363
366
|
const raw = String(input ?? '');
|
|
364
367
|
if (!raw.includes('[语音]')) return raw;
|
|
365
368
|
const t = raw.replace(/\r\n?/g, '\n');
|
|
366
|
-
// 行内标记先切段(行首标记保持原样),再给「紧跟正文的单换行标记」补空行。
|
|
367
|
-
const split = t.split('\n').map((line) => {
|
|
368
|
-
if (!line.includes('[语音]') || /^[^\S\n]*\[语音\]/.test(line)) return line;
|
|
369
|
-
const at = line.indexOf('[语音]');
|
|
370
|
-
return `${line.slice(0, at).trimEnd()}\n\n${line.slice(at)}`;
|
|
371
|
-
}).join('\n');
|
|
372
369
|
// 「行首(可带空白缩进)是 [语音]」且「前面不是空行/不在文首」⇒ 前面补一个换行。
|
|
373
|
-
|
|
370
|
+
// 行内的 [语音] 一律不动:那多半是正文在提这个词,不是要念的段。
|
|
371
|
+
return t.replace(/(?<=[^\n])\n([^\S\n]*\[语音\])/g, "\n\n$1");
|
|
374
372
|
}
|
|
375
373
|
|
|
376
374
|
/** "最近发过的话"的规整化:去掉 [语音] 标记再规整,跨条复读的判定和记录共用。 */
|
package/lib/bili-playback.js
CHANGED
|
@@ -6,8 +6,8 @@
|
|
|
6
6
|
* 就得让视频在浏览器里放起来——B 站按 heartbeat 记播放进度,历史里就能看到。
|
|
7
7
|
*
|
|
8
8
|
* 三件事:
|
|
9
|
-
* 1. **起浏览器**:用专用 profile 起一个 Edge/Chrome(`--remote-debugging-port
|
|
10
|
-
* 进程 detached
|
|
9
|
+
* 1. **起浏览器**:用专用 profile 起一个 Edge/Chrome(`--remote-debugging-port=0`,端口由它自己挑),
|
|
10
|
+
* 进程 detached,插件重启也不影响它继续活着;下次按 profile 里记的端点复用(须自证归属)。
|
|
11
11
|
* 2. **注 cookie**:Cookie 从 `BiliClient.cookieHeader()` 拿(和接口用的是同一份登录态),
|
|
12
12
|
* 逐个 `Network.setCookie` 写到 `.bilibili.com`。
|
|
13
13
|
* 3. **播**:navigate 到视频页 → 等 `<video>` 出现 → 静音、按倍速播 → 播够目标秒数关标签。
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
* 失败一律只 log,不抛:留痕是加分项,不能因为它把整轮 watch() 拖死。
|
|
20
20
|
*/
|
|
21
21
|
import { spawn } from 'node:child_process';
|
|
22
|
-
import { mkdirSync } from 'node:fs';
|
|
22
|
+
import { mkdirSync, readFileSync, rmSync } from 'node:fs';
|
|
23
23
|
import { join } from 'node:path';
|
|
24
24
|
import { detectBrowsers, pickBrowser } from './browsers.js';
|
|
25
25
|
import { dshHome } from './db.js';
|
|
@@ -27,6 +27,7 @@ import { dshHome } from './db.js';
|
|
|
27
27
|
const CDP_READY_TIMEOUT_MS = 15_000;
|
|
28
28
|
const VIDEO_READY_TIMEOUT_MS = 25_000;
|
|
29
29
|
const POLL_MS = 1000;
|
|
30
|
+
const DEVTOOLS_PORT_FILE = 'DevToolsActivePort';
|
|
30
31
|
|
|
31
32
|
/** 极简 CDP 客户端:连浏览器的 webSocketDebuggerUrl,按 sessionId 收发。 */
|
|
32
33
|
export class Cdp {
|
|
@@ -132,6 +133,40 @@ function cookiePairs(header) {
|
|
|
132
133
|
return out;
|
|
133
134
|
}
|
|
134
135
|
|
|
136
|
+
/**
|
|
137
|
+
* 读本插件 profile 里浏览器自己写的调试端点(只有 `--remote-debugging-port=0` 才会写)。
|
|
138
|
+
* 文件两行:端口、`/devtools/browser/<uuid>`。读不到 ⇒ {port:0, path:''}(没起过,不是错误)。
|
|
139
|
+
*/
|
|
140
|
+
export function readDevToolsRecord(dir) {
|
|
141
|
+
try {
|
|
142
|
+
const [portLine = '', pathLine = ''] = readFileSync(join(dir, DEVTOOLS_PORT_FILE), 'utf8').split(/\r?\n/);
|
|
143
|
+
const port = Number(portLine.trim());
|
|
144
|
+
const path = pathLine.trim();
|
|
145
|
+
if (!Number.isInteger(port) || port <= 0 || port >= 65536 || !path.startsWith('/')) return { port: 0, path: '' };
|
|
146
|
+
return { port, path };
|
|
147
|
+
} catch {
|
|
148
|
+
return { port: 0, path: '' };
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
/**
|
|
153
|
+
* 自证归属(#258):端口答上来的端点,正好是 profile 里记录的那一个(同端口 + 同 ws 路径)。
|
|
154
|
+
* 同机别的浏览器就算占着这个端口,它的 uuid 也不会等于我们记录里的。
|
|
155
|
+
*
|
|
156
|
+
* ⚠️ 本来想用 Browser.getBrowserCommandLine 直接比 --user-data-dir,真机实测它会回
|
|
157
|
+
* 「Command line not returned because --enable-automation not set」——为它加
|
|
158
|
+
* --enable-automation 会把 navigator.webdriver 打开,反而更容易被 B站判成机器播放。
|
|
159
|
+
*/
|
|
160
|
+
export function recordMatchesEndpoint(record, info) {
|
|
161
|
+
if (!record || record.port <= 0 || !record.path) return false;
|
|
162
|
+
try {
|
|
163
|
+
const url = new URL(String(info?.webSocketDebuggerUrl ?? ''));
|
|
164
|
+
return Number(url.port) === record.port && url.pathname === record.path;
|
|
165
|
+
} catch {
|
|
166
|
+
return false;
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
|
|
135
170
|
export class BiliPlayback {
|
|
136
171
|
constructor({ getConfig, client, log = () => {}, homedirOverride = '', spawnImpl = spawn }) {
|
|
137
172
|
this.getConfig = getConfig;
|
|
@@ -145,11 +180,25 @@ export class BiliPlayback {
|
|
|
145
180
|
this.launching = null;
|
|
146
181
|
// 同时在播的条数:每条占自己的标签,归零才关浏览器(一轮三条可以并行)
|
|
147
182
|
this.active = 0;
|
|
183
|
+
// 等 CDP 就绪的上限;测试把它调小,免得为一条失败路径真等 15 秒
|
|
184
|
+
this.cdpReadyTimeoutMs = CDP_READY_TIMEOUT_MS;
|
|
148
185
|
}
|
|
149
186
|
|
|
187
|
+
/**
|
|
188
|
+
* 配置形状契约:**收的是已切片的 `bili` 配置**(和宿主 `BiliBrowser` 一样)。
|
|
189
|
+
*
|
|
190
|
+
* `{ browse: { playback: {...} } }` —— 不是全量 `{ bili: { browse: ... } }`。
|
|
191
|
+
* 生产入口 `lib/index.js` 给 `BiliBrowser` 和本类的是同一个 `biliCfg`,
|
|
192
|
+
* 所以两者必须同形;`BiliBrowser.cfg()` 读 `.browse`,这里也必须读 `.browse`。
|
|
193
|
+
*
|
|
194
|
+
* ⚠️ 别再写成「两种形状都吃」(`(root.bili ?? root).browse`):
|
|
195
|
+
* 那样会把「传错层级」这件事藏起来 —— 而传错的后果是**静默回退默认值**
|
|
196
|
+
* (#258 的 P0:`rate` / `maxMinutes` / `port` 全变默认且不报错)。
|
|
197
|
+
* 现在形状错了就由 `test/config-shape-contract.mjs` 当场红。
|
|
198
|
+
*/
|
|
150
199
|
cfg() {
|
|
151
|
-
const
|
|
152
|
-
const browse =
|
|
200
|
+
const sliced = this.getConfig?.() ?? {};
|
|
201
|
+
const browse = sliced.browse ?? {};
|
|
153
202
|
return browse.playback ?? {};
|
|
154
203
|
}
|
|
155
204
|
|
|
@@ -177,30 +226,74 @@ export class BiliPlayback {
|
|
|
177
226
|
return res.json();
|
|
178
227
|
}
|
|
179
228
|
|
|
180
|
-
/**
|
|
181
|
-
async
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
229
|
+
/** 连上 CDP 端点,返回带断连清理与超时的客户端。 */
|
|
230
|
+
async openCdp(wsUrl) {
|
|
231
|
+
const ws = new WebSocket(wsUrl);
|
|
232
|
+
await new Promise((resolve, reject) => {
|
|
233
|
+
ws.addEventListener('open', resolve, { once: true });
|
|
234
|
+
ws.addEventListener('error', () => {
|
|
235
|
+
try { ws.close(); } catch { /* 已经关了 */ }
|
|
236
|
+
reject(new Error('CDP 连接失败'));
|
|
237
|
+
}, { once: true });
|
|
238
|
+
});
|
|
239
|
+
return new Cdp(ws);
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
/**
|
|
243
|
+
* 找到(必要时起一个)浏览器;返回 webSocketDebuggerUrl。
|
|
244
|
+
*
|
|
245
|
+
* 🔴 端口上有 CDP 应答 ≠ 那是我们的浏览器(#258)。同机任何程序都可能占着某个调试端口,
|
|
246
|
+
* 直接复用就是把 B站 cookie 注进一个不相干的 profile,还在人家窗口里放片子。
|
|
247
|
+
* ⇒ 一律 `--remote-debugging-port=0` 让浏览器自己挑,端点由它写进 profile 里的
|
|
248
|
+
* DevToolsActivePort;只有「端口 + ws 路径(uuid)都对得上这份记录」才复用。
|
|
249
|
+
* ⇒ 配置里也因此不再接受固定端口:固定端口既没法自证归属,还得跟别人抢。
|
|
250
|
+
*
|
|
251
|
+
* ⚠️ 单实例假设:同一个 userDataDir 只能有一个浏览器(Chrome 自己会锁 profile)。
|
|
252
|
+
* 多个进程共用同一 profile 时,后收尾的那个会关掉前一个正在用的浏览器。
|
|
253
|
+
*/
|
|
254
|
+
async ensureBrowser() {
|
|
255
|
+
// 有人正在起浏览器就直接等它:探端口前先看这一眼,免得第二个调用方在
|
|
256
|
+
// 「记录还没写出来」的窗口里另起一个(同 profile 会被 Chrome 锁住、白失败一次)。
|
|
257
|
+
if (this.launching !== null) return this.launching;
|
|
258
|
+
const dir = this.userDataDir();
|
|
259
|
+
const record = readDevToolsRecord(dir);
|
|
260
|
+
if (record.port > 0) {
|
|
261
|
+
try {
|
|
262
|
+
const info = await this.cdpVersion(record.port);
|
|
263
|
+
if (recordMatchesEndpoint(record, info)) return info.webSocketDebuggerUrl;
|
|
264
|
+
this.log('warn', `[fish-soul] ${record.port} 端口上的实例对不上本插件 profile 的记录(不是本插件起的),不复用`);
|
|
265
|
+
} catch { /* 那个端口上没东西,往下起自己的 */ }
|
|
266
|
+
}
|
|
186
267
|
if (this.launching !== null) return this.launching;
|
|
187
268
|
this.launching = (async () => {
|
|
188
269
|
const exe = await this.resolveBrowser();
|
|
189
|
-
const dir = this.userDataDir();
|
|
190
270
|
mkdirSync(dir, { recursive: true });
|
|
191
|
-
|
|
192
|
-
|
|
271
|
+
// 旧的端点记录会骗到下面的轮询 ⇒ 起之前先清掉
|
|
272
|
+
rmSync(join(dir, DEVTOOLS_PORT_FILE), { force: true });
|
|
273
|
+
const child = this.spawn(exe, playbackBrowserArgs(0, dir), { detached: true, stdio: 'ignore', windowsHide: true });
|
|
193
274
|
child.unref();
|
|
194
|
-
|
|
195
|
-
|
|
275
|
+
// 子进程的 exit 只是**线索**,不能当判决:Edge 158 把「拉起真正的浏览器」交给常驻
|
|
276
|
+
// watchdog,我们 spawn 的那个启动器 ~110ms 就以 code=0 退出,而真端口要 ~800ms 才应答
|
|
277
|
+
// (抖音那条路 2026-11-22 已为同一件事踩过一次,见 test/browser-launch-early-exit.mjs)。
|
|
278
|
+
// ⇒ 先探端口,能自证就用;只有**等到超时**才把 exit 当根因报出来。
|
|
279
|
+
let exited = null;
|
|
280
|
+
child.once?.('exit', (code, signal) => { exited = { code, signal }; });
|
|
281
|
+
this.log('info', `[fish-soul] 起了播放用浏览器:${exe}(端口 自动)`);
|
|
282
|
+
const deadline = Date.now() + this.cdpReadyTimeoutMs;
|
|
196
283
|
while (Date.now() < deadline) {
|
|
197
284
|
await sleep(500);
|
|
285
|
+
const now = readDevToolsRecord(dir);
|
|
286
|
+
if (now.port <= 0) continue;
|
|
198
287
|
try {
|
|
199
|
-
const info = await this.cdpVersion(port);
|
|
200
|
-
|
|
288
|
+
const info = await this.cdpVersion(now.port);
|
|
289
|
+
// 我们那个可能已经死了、端口被抢走 ⇒ 这里同样按记录比一次
|
|
290
|
+
if (recordMatchesEndpoint(now, info)) return info.webSocketDebuggerUrl;
|
|
201
291
|
} catch { /* 还没起来 */ }
|
|
202
292
|
}
|
|
203
|
-
|
|
293
|
+
if (exited !== null) {
|
|
294
|
+
throw new Error(`播放用浏览器启动后立刻退出(code ${exited.code ?? exited.signal}),${this.cdpReadyTimeoutMs / 1000}s 内也没等到 CDP 端口 —— 多半是 profile 正被另一个浏览器占用:${dir}。旧版本(≤0.19.23)固定用 CDP 端口 9222,那时候留下的浏览器如果还在跑,先把它关掉。`);
|
|
295
|
+
}
|
|
296
|
+
throw new Error(`浏览器 ${this.cdpReadyTimeoutMs / 1000}s 内没开 CDP 端口`);
|
|
204
297
|
})();
|
|
205
298
|
try {
|
|
206
299
|
return await this.launching;
|
|
@@ -236,7 +329,6 @@ export class BiliPlayback {
|
|
|
236
329
|
const maxSeconds = Math.max(10, Number(cfg.maxMinutes ?? 60) * 60);
|
|
237
330
|
const fromDuration = Number(duration) > 0 ? Number(duration) / speed : Number(cfg.seconds ?? 30);
|
|
238
331
|
const seconds = Math.round(Math.min(maxSeconds, Math.max(10, fromDuration || 30)));
|
|
239
|
-
const port = Number(cfg.port ?? 9222);
|
|
240
332
|
const state = { aborted: false, targetId: '', sessionId: '', cdp: null, played: 0, closed: false };
|
|
241
333
|
|
|
242
334
|
const closeTarget = async () => {
|
|
@@ -256,16 +348,8 @@ export class BiliPlayback {
|
|
|
256
348
|
const done = (async () => {
|
|
257
349
|
this.active += 1;
|
|
258
350
|
try {
|
|
259
|
-
const wsUrl = await this.ensureBrowser(
|
|
260
|
-
const
|
|
261
|
-
await new Promise((resolve, reject) => {
|
|
262
|
-
ws.addEventListener('open', resolve, { once: true });
|
|
263
|
-
ws.addEventListener('error', () => {
|
|
264
|
-
try { ws.close(); } catch { /* 已经关了 */ }
|
|
265
|
-
reject(new Error('CDP 连接失败'));
|
|
266
|
-
}, { once: true });
|
|
267
|
-
});
|
|
268
|
-
const cdp = new Cdp(ws);
|
|
351
|
+
const wsUrl = await this.ensureBrowser();
|
|
352
|
+
const cdp = await this.openCdp(wsUrl);
|
|
269
353
|
state.cdp = cdp;
|
|
270
354
|
// 每条播放开自己的标签:以前是抢同一张 about:blank,两条并行时
|
|
271
355
|
// 谁先收尾谁把它关掉,另一条的 session 就报 -32001。
|
package/lib/config-platforms.js
CHANGED
|
@@ -44,10 +44,9 @@ export function biliConfigSchema(z) {
|
|
|
44
44
|
enabled: z.boolean().default(false),
|
|
45
45
|
rate: z.number().min(0.5).max(16).default(2), // 倍速;目标时长 = 视频时长 ÷ 倍速(要「看完」)
|
|
46
46
|
// 高级键(设置页不暴露,只能改 fish-soul-config.json):
|
|
47
|
-
//
|
|
47
|
+
// 浏览器怎么起、放哪 —— 都是本机环境细节,暴露给普通用户只会配错。
|
|
48
48
|
// 这些键在 scripts/pr-diff-hygiene.mjs 的 SCHEMA_UI_ALLOWLIST 里登记过。
|
|
49
49
|
seconds: z.number().default(30), // 拿不到时长时的兜底秒数
|
|
50
|
-
port: z.number().default(9222), // CDP 端口,和抖音那个(47890)分开
|
|
51
50
|
browserKind: z.string().default(''), // 空 = 自动挑(Edge 优先)
|
|
52
51
|
customPath: z.string().default(''),
|
|
53
52
|
userDataDir: z.string().default(''), // 空 = $DSH_HOME/fish-soul/bili-playback
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-fish-soul",
|
|
3
|
-
"version": "0.19.
|
|
3
|
+
"version": "0.19.24",
|
|
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/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/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-inline-paragraph.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",
|
|
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/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",
|
|
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"
|