dsh-plugin-mesh 0.4.0 → 0.5.1
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 +3 -2
- package/client/client.js +6415 -863
- package/cordis.patch.yml +3 -2
- package/lib/_rehearsal-peer.mjs +2 -1
- package/lib/_selftest-capabilities.mjs +3 -1
- package/lib/_selftest-client.mjs +6 -337
- package/lib/_selftest-layout.mjs +112 -0
- package/lib/_selftest-persist.mjs +195 -0
- package/lib/_selftest-prompt.mjs +67 -1
- package/lib/_selftest-reply-route.mjs +12 -1
- package/lib/_selftest-workbench.mjs +728 -0
- package/lib/discovery.js +181 -6
- package/lib/index.js +316 -27
- package/lib/layout.js +128 -0
- package/lib/persist.js +153 -0
- package/lib/prompt.js +25 -7
- package/package.json +5 -3
- package/scripts/_selftest-release-plan.mjs +33 -2
- package/scripts/release-plan.mjs +19 -1
|
@@ -0,0 +1,195 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 持久化自测:任务记录与机器列表在重启后能不能恢复,以及恢复出来的语义对不对。
|
|
3
|
+
*
|
|
4
|
+
* 重点不是"文件能读回来",而是**恢复出来的机器必须是离线状态**:
|
|
5
|
+
* 如果恢复时把 lastSeen 刷成 now,页面会先把一堆关机机器显示成在线,
|
|
6
|
+
* 然后逐个变灰 —— 那是比"看不到机器"更糟的错觉。
|
|
7
|
+
*/
|
|
8
|
+
import assert from "node:assert/strict";
|
|
9
|
+
import { mkdtempSync, rmSync, existsSync, readFileSync, writeFileSync } from "node:fs";
|
|
10
|
+
import { tmpdir } from "node:os";
|
|
11
|
+
import { join } from "node:path";
|
|
12
|
+
import {
|
|
13
|
+
loadTaskHistory,
|
|
14
|
+
saveTaskHistory,
|
|
15
|
+
trimTaskRecord,
|
|
16
|
+
loadPeerSnapshot,
|
|
17
|
+
savePeerSnapshot,
|
|
18
|
+
toPeerSnapshot,
|
|
19
|
+
MAX_RECORDS,
|
|
20
|
+
TASK_TEXT_LIMIT,
|
|
21
|
+
} from "./persist.js";
|
|
22
|
+
import { MeshDiscovery, APP_TAG } from "./discovery.js";
|
|
23
|
+
|
|
24
|
+
const root = mkdtempSync(join(tmpdir(), "mesh-persist-test-"));
|
|
25
|
+
const cleanups = [];
|
|
26
|
+
|
|
27
|
+
function freshDir() {
|
|
28
|
+
const d = mkdtempSync(join(root, "d-"));
|
|
29
|
+
cleanups.push(d);
|
|
30
|
+
return d;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
try {
|
|
34
|
+
// ── 任务记录:往返 ──
|
|
35
|
+
{
|
|
36
|
+
const dir = freshDir();
|
|
37
|
+
const inbound = [{ id: "t-1", from: "B/u", task: "hello", status: "dispatched" }];
|
|
38
|
+
const outbound = [{ id: "t-2", toMachine: "B", task: "hi", ok: true, status: 200 }];
|
|
39
|
+
assert.equal(saveTaskHistory(dir, inbound, outbound), true, "应当写成功");
|
|
40
|
+
const back = loadTaskHistory(dir);
|
|
41
|
+
assert.equal(back.inbound.length, 1);
|
|
42
|
+
assert.equal(back.outbound.length, 1);
|
|
43
|
+
assert.equal(back.inbound[0].id, "t-1");
|
|
44
|
+
assert.equal(back.outbound[0].status, 200);
|
|
45
|
+
assert.ok(back.savedAt > 0);
|
|
46
|
+
console.log("✓ 任务记录写入后能原样读回");
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
// ── 任务记录:上限与截断 ──
|
|
50
|
+
{
|
|
51
|
+
const dir = freshDir();
|
|
52
|
+
const many = Array.from({ length: MAX_RECORDS + 37 }, (_, i) => ({ id: `t-${i}`, task: "x" }));
|
|
53
|
+
saveTaskHistory(dir, many, []);
|
|
54
|
+
const back = loadTaskHistory(dir);
|
|
55
|
+
assert.equal(back.inbound.length, MAX_RECORDS, `只保留最后 ${MAX_RECORDS} 条`);
|
|
56
|
+
assert.equal(back.inbound.at(-1).id, `t-${MAX_RECORDS + 36}`, "保留的是最新的那批");
|
|
57
|
+
|
|
58
|
+
const long = { id: "t-long", task: "啊".repeat(TASK_TEXT_LIMIT + 500) };
|
|
59
|
+
const trimmed = trimTaskRecord(long);
|
|
60
|
+
assert.ok(trimmed.task.length < long.task.length, "超长正文必须被截断");
|
|
61
|
+
assert.equal(trimmed.taskTruncated, true, "截断要留标记,不能假装完整");
|
|
62
|
+
assert.ok(trimmed.task.includes("已截断"), "要说明被截断了");
|
|
63
|
+
console.log("✓ 超量滚动、超长正文截断且留标记");
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
// ── 坏文件不能把启动搞挂 ──
|
|
67
|
+
{
|
|
68
|
+
const dir = freshDir();
|
|
69
|
+
saveTaskHistory(dir, [{ id: "a" }], []);
|
|
70
|
+
// 模拟写到一半被杀
|
|
71
|
+
const p = join(dir, "tasks.json");
|
|
72
|
+
const raw = readFileSync(p, "utf8");
|
|
73
|
+
writeFileSync(p, raw.slice(0, Math.floor(raw.length / 2)));
|
|
74
|
+
const back = loadTaskHistory(dir);
|
|
75
|
+
assert.deepEqual(back.inbound, [], "半截 JSON 应当当成没有历史");
|
|
76
|
+
console.log("✓ 半截文件按「没有历史」处理,不抛错");
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
// ── 机器列表:快照往返 ──
|
|
80
|
+
{
|
|
81
|
+
const dir = freshDir();
|
|
82
|
+
const now = Date.now();
|
|
83
|
+
const peers = [{
|
|
84
|
+
id: "peer-1", machine: "hos", hostname: "localhost", mac: "", os: "android",
|
|
85
|
+
user: "u0", profile: "web", version: "0.3.36", host: "192.168.1.9", port: 45917,
|
|
86
|
+
ts: now - 5000, capabilities: null,
|
|
87
|
+
endpoints: [{ transport: "lan", host: "192.168.1.9", port: 45917, lastSeen: now - 5000, lastOkAt: now - 5000, verified: true }],
|
|
88
|
+
}];
|
|
89
|
+
assert.equal(savePeerSnapshot(dir, peers), true);
|
|
90
|
+
const snap = loadPeerSnapshot(dir);
|
|
91
|
+
assert.equal(snap.peers.length, 1);
|
|
92
|
+
assert.equal(snap.peers[0].record.id, "peer-1");
|
|
93
|
+
assert.equal(snap.peers[0].record.app, APP_TAG);
|
|
94
|
+
assert.equal(snap.peers[0].endpoints[0].lastSeen, now - 5000, "必须保留原始 lastSeen");
|
|
95
|
+
console.log("✓ 机器列表快照往返,lastSeen 原样保留");
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
// ── 恢复语义:离线、带标记、不覆盖现网 ──
|
|
99
|
+
{
|
|
100
|
+
const dir = freshDir();
|
|
101
|
+
const d = new MeshDiscovery({ id: "me", port: 0, meta: { machine: "me" } });
|
|
102
|
+
const stale = Date.now() - 3600_000; // 一小时前见过
|
|
103
|
+
const peer = {
|
|
104
|
+
id: "old-peer", machine: "old", host: "10.0.0.9", port: 45917, ts: stale,
|
|
105
|
+
endpoints: [{ transport: "lan", host: "10.0.0.9", port: 45917, lastSeen: stale, lastOkAt: stale, verified: true }],
|
|
106
|
+
};
|
|
107
|
+
savePeerSnapshot(dir, [peer]);
|
|
108
|
+
|
|
109
|
+
const n = d.restore(loadPeerSnapshot(dir).peers);
|
|
110
|
+
assert.equal(n, 1, "应当恢复 1 台");
|
|
111
|
+
const after = d.peers().find((p) => p.id === "old-peer");
|
|
112
|
+
assert.ok(after, "恢复的机器要出现在列表里");
|
|
113
|
+
assert.equal(after.restored, true, "要能区分「上次见到」与「这次见到」");
|
|
114
|
+
assert.equal(after.online, false, "一小时前的记录不能算在线");
|
|
115
|
+
assert.equal(after.host, "10.0.0.9", "地址要能显示出来");
|
|
116
|
+
// 恢复的机器没有任何通道在用:以前这里填了"最近一条端点",界面就标成「在用」,
|
|
117
|
+
// 而对方其实已经离线 —— 真机一眼看出来的那个错。
|
|
118
|
+
assert.equal(after.transport, null, "不能让界面以为某条通道在用");
|
|
119
|
+
assert.equal(d.isRestoredOnly("old-peer"), true, "应当被标成「只在缓存里」");
|
|
120
|
+
|
|
121
|
+
// 再次恢复同一份快照:不能重复插入
|
|
122
|
+
assert.equal(d.peers().filter((p) => p.id === "old-peer").length, 1, "不能出现两条");
|
|
123
|
+
|
|
124
|
+
// 现网重新发现 → 只剩活记录,且不再是"恢复的"
|
|
125
|
+
d.note({
|
|
126
|
+
app: APP_TAG, id: "old-peer", machine: "old", host: "10.0.0.9", port: 45917,
|
|
127
|
+
hostname: "old.local", ts: Date.now(),
|
|
128
|
+
}, "10.0.0.9");
|
|
129
|
+
const hits = d.peers().filter((p) => p.id === "old-peer");
|
|
130
|
+
assert.equal(hits.length, 1, "缓存与活记录不能同时存在");
|
|
131
|
+
assert.equal(hits[0].restored, false, "重新发现后要去掉「上次见到」标记");
|
|
132
|
+
assert.equal(hits[0].online, true, "刚收到心跳就是在线");
|
|
133
|
+
assert.equal(d.isRestoredOnly("old-peer"), false);
|
|
134
|
+
|
|
135
|
+
// 自己的 id 不能被"恢复"成一台对端
|
|
136
|
+
assert.equal(d.restore([{ record: { app: APP_TAG, id: "me", machine: "me" }, endpoints: [{ transport: "lan", host: "1.1.1.1", port: 1 }] }]), 0);
|
|
137
|
+
console.log("✓ 恢复语义正确:离线、带标记、不重复、不冒充自己、重新发现后转在线");
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
// ── 回归:恢复出来的机器不能被清扫删掉 ──
|
|
141
|
+
//
|
|
142
|
+
// 第一版实现把缓存塞进活跃注册表,而 #sweep() 会摘掉 keepMs 之外的端点、
|
|
143
|
+
// 端点全没了就删设备。缓存条目的 lastSeen 天然是旧的,于是恢复出来的离线机器
|
|
144
|
+
// 活不过一个清扫周期(实测 5 秒内消失)—— 而离线机器正是恢复功能唯一的价值。
|
|
145
|
+
// 这里用很小的 ttlMs 逼出清扫,直接验证它活着。
|
|
146
|
+
{
|
|
147
|
+
const d = new MeshDiscovery({ id: "me2", port: 0, meta: { machine: "me2" }, ttlMs: 1200 });
|
|
148
|
+
const veryOld = Date.now() - 10 * 3600_000; // 十小时前
|
|
149
|
+
d.restore([{
|
|
150
|
+
record: { app: APP_TAG, id: "offline-peer", machine: "offline", host: "10.0.0.7", port: 45917, ts: veryOld },
|
|
151
|
+
endpoints: [{ transport: "lan", host: "10.0.0.7", port: 45917, lastSeen: veryOld, lastOkAt: veryOld, verified: true }],
|
|
152
|
+
}]);
|
|
153
|
+
d.start({ multicast: false }); // 只为了让清扫定时器跑起来
|
|
154
|
+
await new Promise((r) => setTimeout(r, 2200)); // 至少跨过一个清扫周期
|
|
155
|
+
const kept = d.peers().find((p) => p.id === "offline-peer");
|
|
156
|
+
assert.ok(kept, "恢复出来的离线机器必须扛得住清扫(第一版就是在这里丢的)");
|
|
157
|
+
assert.equal(kept.online, false);
|
|
158
|
+
d.stop?.();
|
|
159
|
+
console.log("✓ 恢复的机器跨过清扫周期仍在(回归已钉住)");
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
// ── 列表排序:在线的排前面 ──
|
|
163
|
+
//
|
|
164
|
+
// 真机反馈:离线的 hos 排在了在线的 myserver 前面(原来只按机器名排)。
|
|
165
|
+
{
|
|
166
|
+
const d = new MeshDiscovery({ id: "me3", port: 0, meta: { machine: "me3" }, ttlMs: 60000 });
|
|
167
|
+
const old = Date.now() - 3600_000;
|
|
168
|
+
// 缓存里放一台机器名靠前的离线机器(hos),活的放一台机器名靠后的(myserver)
|
|
169
|
+
d.restore([{
|
|
170
|
+
record: { app: APP_TAG, id: "p-hos", machine: "hos", host: "10.0.0.5", port: 45917, ts: old },
|
|
171
|
+
endpoints: [{ transport: "lan", host: "10.0.0.5", port: 45917, lastSeen: old, verified: true }],
|
|
172
|
+
}]);
|
|
173
|
+
d.note({
|
|
174
|
+
app: APP_TAG, id: "p-myserver", machine: "myserver", host: "10.0.0.6", port: 45917, ts: Date.now(),
|
|
175
|
+
}, "10.0.0.6");
|
|
176
|
+
const order = d.peers().map((p) => p.machine);
|
|
177
|
+
assert.deepEqual(order, ["myserver", "hos"], `在线应排在离线前,实际:${order.join(",")}`);
|
|
178
|
+
assert.equal(d.peers()[0].online, true);
|
|
179
|
+
console.log("✓ 列表排序:在线优先,离线的「上次见到」排最后");
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
// ── 缺文件 / 空目录 ──
|
|
183
|
+
{
|
|
184
|
+
const dir = freshDir();
|
|
185
|
+
assert.deepEqual(loadTaskHistory(dir), { inbound: [], outbound: [], savedAt: 0 });
|
|
186
|
+
assert.deepEqual(loadPeerSnapshot(dir), { peers: [], savedAt: 0 });
|
|
187
|
+
assert.equal(existsSync(join(dir, "tasks.json")), false);
|
|
188
|
+
console.log("✓ 没有历史文件时安静返回空,不抛错");
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
console.log("\n全部通过");
|
|
192
|
+
} finally {
|
|
193
|
+
for (const d of cleanups) rmSync(d, { recursive: true, force: true });
|
|
194
|
+
rmSync(root, { recursive: true, force: true });
|
|
195
|
+
}
|
package/lib/_selftest-prompt.mjs
CHANGED
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
* 机器名才成功。**agent 能自救,不代表指令是对的。**
|
|
10
10
|
*/
|
|
11
11
|
import { strict as assert } from "node:assert";
|
|
12
|
+
import { readFileSync } from "node:fs";
|
|
12
13
|
import { buildPrompt } from "./prompt.js";
|
|
13
14
|
|
|
14
15
|
let passed = 0;
|
|
@@ -77,7 +78,7 @@ test("webhook 形状(deliveryId/source)也能归一化", () => {
|
|
|
77
78
|
|
|
78
79
|
test("没有 thread 时用 id 兜底", () => {
|
|
79
80
|
const t = buildPrompt({ id: "t-9", from: "a/u", fromMachine: "a", task: "x" });
|
|
80
|
-
assert.
|
|
81
|
+
assert.match(t, /thread (填 )?t-9/, t); // 文案精简后可能是「thread t-9」
|
|
81
82
|
});
|
|
82
83
|
|
|
83
84
|
test("全空入参不崩,也不产出 undefined", () => {
|
|
@@ -93,5 +94,70 @@ test("task 正文原样保留(不被指令淹没)", () => {
|
|
|
93
94
|
assert.ok(t.includes(body), "正文必须逐字保留");
|
|
94
95
|
});
|
|
95
96
|
|
|
97
|
+
// ── 回执:必须明确禁止再回派 ──
|
|
98
|
+
//
|
|
99
|
+
// 2026-10-21 真机事故:手动派发后,对端回执被注入会话,提示词仍写着
|
|
100
|
+
// 「做完后用 mesh_run 回派」→ agent 照做 → 两边互相回执,一轮几十条。
|
|
101
|
+
console.log("\n── 回执 vs 新任务:指令必须相反 ──");
|
|
102
|
+
|
|
103
|
+
test("回执:明确禁止再回派,并说明会形成循环", () => {
|
|
104
|
+
const p = buildPrompt({
|
|
105
|
+
id: "t-1", from: "hos/u0", fromMachine: "hos", thread: "T", task: "结果如下", isReply: true,
|
|
106
|
+
});
|
|
107
|
+
assert.ok(p.includes("回执"), p.slice(0, 200));
|
|
108
|
+
assert.ok(!/做完后用 mesh_run 工具把结果回派/.test(p), "回执不该再给「做完后回派」的指令");
|
|
109
|
+
assert.ok(p.includes("不要再用 mesh_run 回派"), p.slice(0, 300));
|
|
110
|
+
assert.ok(p.includes("循环"), "要说清后果,agent 才会真的停下");
|
|
111
|
+
});
|
|
112
|
+
|
|
113
|
+
test("新任务:仍然要求回派(否则对端永远收不到结果)", () => {
|
|
114
|
+
const p = buildPrompt({
|
|
115
|
+
id: "t-2", from: "hos/u0", fromMachine: "hos", thread: "T", task: "做点事",
|
|
116
|
+
});
|
|
117
|
+
assert.ok(/做完后用 mesh_run 把结果回派给 hos/.test(p), p.slice(0, 300));
|
|
118
|
+
assert.ok(!p.includes("不要再用 mesh_run 回派"));
|
|
119
|
+
});
|
|
120
|
+
|
|
121
|
+
// ── 手动派发:用户气泡里只能是用户自己那句话 ──
|
|
122
|
+
//
|
|
123
|
+
// 真机事故(2026-10-21 splitmsg → lipeng-mac,t-d5176adbec0a):预建会话里先注入
|
|
124
|
+
// 一条给 agent 的说明、再注入用户原文,结果第二条被当成「下一轮排队消息」插进
|
|
125
|
+
// inbox,随本轮结束被清掉 —— 用户点进去看到的是那条说明,自己发的那句话一个字
|
|
126
|
+
// 都没有。所以这里断言的不是措辞,是**只注入一条、内容就是原文、且必须
|
|
127
|
+
// kind:"user"**(kind 不是 user 会被渲染成折叠的「上下文注入」,气泡就没了)。
|
|
128
|
+
console.log("\n── 手动派发:气泡只放原文 ──");
|
|
129
|
+
|
|
130
|
+
function announceBlock() {
|
|
131
|
+
const src = readFileSync(new URL("./index.js", import.meta.url), "utf8");
|
|
132
|
+
const start = src.indexOf("if (announce?.text)");
|
|
133
|
+
assert.ok(start > 0, "找不到预建会话注入 announce 的分支");
|
|
134
|
+
return { src, block: src.slice(start, src.indexOf("} catch (err)", start)) };
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
test("预建会话只注入一条消息(多条时后面的会被吞掉)", () => {
|
|
138
|
+
const { block } = announceBlock();
|
|
139
|
+
const followups = block.match(/handle\.agent\.followup\(/g) ?? [];
|
|
140
|
+
assert.equal(
|
|
141
|
+
followups.length,
|
|
142
|
+
1,
|
|
143
|
+
"连续两次 followup 时第二条会被当排队消息吞掉(实测:说明留下、原文被吞,正好反了)",
|
|
144
|
+
);
|
|
145
|
+
});
|
|
146
|
+
|
|
147
|
+
test("注入的内容就是原文,不加任何说明文字", () => {
|
|
148
|
+
const { block } = announceBlock();
|
|
149
|
+
assert.ok(
|
|
150
|
+
/text:\s*announce\.text\s*\}/.test(block),
|
|
151
|
+
"必须是 announce.text 原样注入,不能拼前缀/后缀",
|
|
152
|
+
);
|
|
153
|
+
assert.ok(!/announce\.note/.test(announceBlock().src), "说明不能再作为第二条消息注入");
|
|
154
|
+
});
|
|
155
|
+
|
|
156
|
+
test("必须是 kind:\"user\",否则被折叠成上下文注入、不成为气泡", () => {
|
|
157
|
+
const { block } = announceBlock();
|
|
158
|
+
assert.ok(/source:\s*\{\s*kind:\s*"user"/.test(block), "原文必须 kind:\"user\" 才渲染成正常气泡");
|
|
159
|
+
assert.ok(!/kind:\s*"webhook"/.test(block), "气泡里不能掺进 webhook/notice");
|
|
160
|
+
});
|
|
161
|
+
|
|
96
162
|
console.log(`\n${failed === 0 ? "全部通过" : "有失败"}:${passed} 通过 / ${failed} 失败\n`);
|
|
97
163
|
process.exit(failed === 0 ? 0 : 1);
|
|
@@ -27,7 +27,7 @@ async function makeNode(machine) {
|
|
|
27
27
|
const home = join(root, machine);
|
|
28
28
|
mkdirSync(join(home, "mesh"), { recursive: true });
|
|
29
29
|
writeFileSync(join(home, "mesh", "state.json"), JSON.stringify({ secret: "test-only-shared-secret" }));
|
|
30
|
-
const node = { machine, home, peers: [], tools: new Map(), agents: new Map(), inbound: [], outbound: [], threadState: new Map(), created: 0, sent: 0 };
|
|
30
|
+
const node = { machine, home, peers: [], tools: new Map(), agents: new Map(), inbound: [], outbound: [], threadState: new Map(), hostDispatched: new Map(), created: 0, sent: 0 };
|
|
31
31
|
const context = vm.createContext({
|
|
32
32
|
console, Buffer, URL, AbortSignal, setTimeout, clearTimeout, setInterval, clearInterval,
|
|
33
33
|
process: { ...process, env: { ...process.env, DSH_HOME: home } },
|
|
@@ -109,6 +109,17 @@ try {
|
|
|
109
109
|
assert.equal(a.created, 0, "reply must not create a new A session");
|
|
110
110
|
console.log("✓ real mesh_run/HTTP roundtrip: original session receives reply, zero new A sessions");
|
|
111
111
|
|
|
112
|
+
// 宿主(页面派发)已经替用户发过同一 thread:绑定会话里的 agent 再调 mesh_run
|
|
113
|
+
// 就是对端收两份,必须在 HTTP 之前挡住。这条也顺带守住 hostDispatched 的作用域
|
|
114
|
+
// —— 它曾经只在 applyUnsafe 里声明,而用点在 registerTools/registerUiRoutes,
|
|
115
|
+
// 结果每次带 thread 的 mesh_run 都抛 ReferenceError(真机 + 本测试都撞上)。
|
|
116
|
+
a.hostDispatched.set("host-thread", Date.now());
|
|
117
|
+
a.threadState.set(key("host-thread"), { sessionId: "original-session", wakesAt: [] });
|
|
118
|
+
const sentBeforeGuard = a.sent;
|
|
119
|
+
assert.match(await a.send("B", "host-thread", "original-session"), /已经由宿主发出去/);
|
|
120
|
+
assert.equal(a.sent, sentBeforeGuard, "被挡下的重复派发不能真的发出 HTTP");
|
|
121
|
+
console.log("✓ host-dispatched thread is refused in the bound session, no duplicate HTTP");
|
|
122
|
+
|
|
112
123
|
// Very fast return before the sending tool receives its acknowledgement.
|
|
113
124
|
a.beforeAck = async () => {
|
|
114
125
|
assert.equal(disk().threads[key("fast")].sessionId, "original-session");
|