dsh-plugin-mesh 0.3.36 → 0.4.0
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 +2 -0
- package/lib/_selftest-reasoning.mjs +5 -1
- package/lib/_selftest-resume.mjs +199 -0
- package/lib/index.js +97 -5
- package/package.json +3 -2
package/README.md
CHANGED
|
@@ -857,6 +857,8 @@ node lib/_selftest-discovery.mjs alpha 45900 9000 # 两个进程同时跑可
|
|
|
857
857
|
| 提交信息怎么写、PR 会被哪些门禁检查 | [`CONTRIBUTING.md`](CONTRIBUTING.md) |
|
|
858
858
|
| 流水线怎么运作、失败了怎么重跑、怎么撤回 | [`docs/RELEASE.md`](docs/RELEASE.md) |
|
|
859
859
|
| 改代码前必须知道的硬约束与坑 | [`AGENTS.md`](AGENTS.md) |
|
|
860
|
+
| 版本升级 / 新功能后的回归测试怎么跑 | [`docs/TEST-CASES.md`](docs/TEST-CASES.md) |
|
|
861
|
+
| 功能需求、架构逻辑、多版本通信协议、跨 IDE 实现契约 | [`docs/PLUGIN-SPEC.md`](docs/PLUGIN-SPEC.md) |
|
|
860
862
|
|
|
861
863
|
本地预演"如果现在合并会发生什么"(不联网、不改文件):
|
|
862
864
|
|
|
@@ -5,7 +5,11 @@ import vm from "node:vm";
|
|
|
5
5
|
|
|
6
6
|
const source = readFileSync(new URL("./index.js", import.meta.url), "utf8");
|
|
7
7
|
const start = source.indexOf("async function wakeAgent(");
|
|
8
|
-
|
|
8
|
+
// 切到**下一个顶层函数**为止,而不是写死 resolveWorkspace:
|
|
9
|
+
// 之前写死它,一旦在两者之间插入新函数,切片就变成「多个函数声明套在括号里」,
|
|
10
|
+
// 直接 SyntaxError(加会话恢复时就这么炸过一次)。
|
|
11
|
+
const nextFn = /\n(?:async )?function [A-Za-z_$]/.exec(source.slice(start + 1));
|
|
12
|
+
const end = nextFn ? start + 1 + nextFn.index : -1;
|
|
9
13
|
assert.ok(start >= 0 && end > start, "wakeAgent source boundaries must exist");
|
|
10
14
|
const wake = vm.runInNewContext(`(${source.slice(start, end)})`, {
|
|
11
15
|
randomUUID: () => "test-id",
|
|
@@ -0,0 +1,199 @@
|
|
|
1
|
+
/** 会话恢复路径的单元检查:注入前能否把「已结束但记录还在」的会话接回来。
|
|
2
|
+
*
|
|
3
|
+
* 背景:`liveSession()` 查的是 DSH 内存里的 agent 注册表。重启 DSH 之后注册表是空的,
|
|
4
|
+
* 但磁盘上的对话记录完好无损。原实现直接新建会话,于是每重启一次所有跨机对话线
|
|
5
|
+
* 都静默断开。这里验证新增的 `wakeAgentOrResume` 会先尝试 `agents.resume`。
|
|
6
|
+
*
|
|
7
|
+
* 不联网、不装 DSH:index.js 用 vm 加载,import 被替换成最小 mock。
|
|
8
|
+
*/
|
|
9
|
+
import assert from "node:assert/strict";
|
|
10
|
+
import vm from "node:vm";
|
|
11
|
+
import { readFileSync, mkdtempSync, mkdirSync, writeFileSync, rmSync } from "node:fs";
|
|
12
|
+
import { tmpdir } from "node:os";
|
|
13
|
+
import { join } from "node:path";
|
|
14
|
+
import { conversationKey } from "./conversation.js";
|
|
15
|
+
|
|
16
|
+
const root = mkdtempSync(join(tmpdir(), "mesh-resume-test-"));
|
|
17
|
+
const entryUrl = new URL("./index.js", import.meta.url);
|
|
18
|
+
const cleanupPaths = [];
|
|
19
|
+
const noop = () => {};
|
|
20
|
+
|
|
21
|
+
const TASK_TEXT = "这张会话在重启前处理过的工作,现在要对端回传结果,测试请勿联网执行任何命令。";
|
|
22
|
+
|
|
23
|
+
async function loadModule() {
|
|
24
|
+
let source = readFileSync(entryUrl, "utf8");
|
|
25
|
+
// 暴露内部函数(这些不是公开 API,只给测试用)
|
|
26
|
+
source += "\nexport { handleInboundTask };";
|
|
27
|
+
const schema = new Proxy(() => schema, { get: () => schema });
|
|
28
|
+
const mocks = {
|
|
29
|
+
"@deepseek-ai/schemastery": { default: schema },
|
|
30
|
+
"@deepseek-ai/dsh-brand": { brandString: (value) => value },
|
|
31
|
+
"@deepseek-ai/dsh-tools": { defineTool: (tool) => tool },
|
|
32
|
+
"@deepseek-ai/dsh-llm": { createUserMessage: (message) => message },
|
|
33
|
+
};
|
|
34
|
+
const context = vm.createContext({ console, Buffer, URL, AbortSignal, setTimeout, clearTimeout, setInterval, clearInterval, process });
|
|
35
|
+
const module = new vm.SourceTextModule(source, {
|
|
36
|
+
context,
|
|
37
|
+
identifier: entryUrl.href,
|
|
38
|
+
initializeImportMeta: (meta) => { meta.url = entryUrl.href; },
|
|
39
|
+
});
|
|
40
|
+
await module.link(async (specifier) => {
|
|
41
|
+
const exports = mocks[specifier] ?? (await import(specifier.startsWith(".") ? new URL(specifier, entryUrl).href : specifier));
|
|
42
|
+
return new vm.SyntheticModule(Object.keys(exports), function () {
|
|
43
|
+
for (const key of Object.keys(exports)) this.setExport(key, exports[key]);
|
|
44
|
+
}, { context });
|
|
45
|
+
});
|
|
46
|
+
await module.evaluate();
|
|
47
|
+
return module.namespace;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
/** 跑一次入站任务,返回本次尝试的结果。 */
|
|
51
|
+
async function runInbound(ns, opts = {}) {
|
|
52
|
+
const home = mkdtempSync(join(root, "home-"));
|
|
53
|
+
mkdirSync(join(home, "mesh"), { recursive: true });
|
|
54
|
+
writeFileSync(join(home, "mesh", "state.json"), JSON.stringify({ secret: "s" }));
|
|
55
|
+
|
|
56
|
+
const messages = [];
|
|
57
|
+
const resumedIds = [];
|
|
58
|
+
const createdIds = [];
|
|
59
|
+
const warnings = [];
|
|
60
|
+
|
|
61
|
+
const makeHandle = (sessionId) => ({
|
|
62
|
+
agent: { session: { id: sessionId }, followup: (m) => messages.push(m) },
|
|
63
|
+
dispose: async () => {},
|
|
64
|
+
});
|
|
65
|
+
|
|
66
|
+
const agentApi = {
|
|
67
|
+
resume: opts.withResume === false ? undefined : async ({ resumeSessionId }) => {
|
|
68
|
+
resumedIds.push(resumeSessionId);
|
|
69
|
+
if (opts.resumeFails) throw new Error("session log missing");
|
|
70
|
+
return makeHandle(resumeSessionId);
|
|
71
|
+
},
|
|
72
|
+
create: async ({ sessionId }) => {
|
|
73
|
+
createdIds.push(sessionId);
|
|
74
|
+
return makeHandle(sessionId);
|
|
75
|
+
},
|
|
76
|
+
};
|
|
77
|
+
|
|
78
|
+
const liveAgents = new Map();
|
|
79
|
+
const ctx = {
|
|
80
|
+
get: (name) => (name === "agents" ? { get: (id) => liveAgents.get(id), ...agentApi } : undefined),
|
|
81
|
+
effect: () => () => {},
|
|
82
|
+
};
|
|
83
|
+
const services = {
|
|
84
|
+
agentPresets: { resolve: async (id) => ({ id }), standingKeyFor: async () => {}, mount: async () => {} },
|
|
85
|
+
workspaceRegistry: {
|
|
86
|
+
create: async () => ({
|
|
87
|
+
path: home,
|
|
88
|
+
attachSession: async () => {},
|
|
89
|
+
detachSession: async () => {},
|
|
90
|
+
}),
|
|
91
|
+
},
|
|
92
|
+
agentDefaultModel: { currentSelection: () => ({ provider: "p", model: "m", reasoningEffort: "low" }) },
|
|
93
|
+
permissionPresets: { set: () => {} },
|
|
94
|
+
sessionTitle: { rename: () => {} },
|
|
95
|
+
};
|
|
96
|
+
// wakeAgent 通过 waker.ctx 取服务(c.agents.create / c.agents.resume 都在这里)
|
|
97
|
+
const wakerCtx = Object.assign(Object.create(ctx), services, {
|
|
98
|
+
get: ctx.get,
|
|
99
|
+
effect: () => () => {},
|
|
100
|
+
agents: agentApi,
|
|
101
|
+
});
|
|
102
|
+
const waker = { ready: true, ctx: wakerCtx, missing: [] };
|
|
103
|
+
|
|
104
|
+
const threadState = new Map();
|
|
105
|
+
const thread = "重启前的对话";
|
|
106
|
+
const key = conversationKey({ fromMachine: "B", thread });
|
|
107
|
+
if (opts.boundSessionId) threadState.set(key, { sessionId: opts.boundSessionId, wakesAt: [] });
|
|
108
|
+
if (opts.liveSessionId) liveAgents.set(opts.liveSessionId, { followup: noop });
|
|
109
|
+
|
|
110
|
+
const task = {
|
|
111
|
+
id: "t-resume-1",
|
|
112
|
+
from: "B/u",
|
|
113
|
+
fromMachine: "B",
|
|
114
|
+
thread,
|
|
115
|
+
task: TASK_TEXT,
|
|
116
|
+
newSession: opts.newSession === true,
|
|
117
|
+
};
|
|
118
|
+
const inbound = [];
|
|
119
|
+
const config = {
|
|
120
|
+
port: 0,
|
|
121
|
+
requestTimeoutMs: 500,
|
|
122
|
+
minTaskChars: 10,
|
|
123
|
+
maxWakesPerThread: 30,
|
|
124
|
+
threadCooldownMs: 5000,
|
|
125
|
+
threadWindowMs: 3600000,
|
|
126
|
+
agentPreset: "standard",
|
|
127
|
+
permissionPreset: "danger-full-access",
|
|
128
|
+
workspaceRoot: home,
|
|
129
|
+
};
|
|
130
|
+
|
|
131
|
+
await ns.handleInboundTask(
|
|
132
|
+
ctx, task, inbound, config, noop, (m) => warnings.push(String(m)),
|
|
133
|
+
waker, threadState, () => config.maxWakesPerThread, new Map(),
|
|
134
|
+
);
|
|
135
|
+
// 等 wakeAgentOrResume 的 then/catch 落定:出现任一可见副作用即可
|
|
136
|
+
const settled = () => r().messages.length > 0 || r().createdIds.length > 0 || r().resumedIds.length > 0 || r().warnings.length > 0;
|
|
137
|
+
function r() { return { messages, createdIds, resumedIds, warnings }; }
|
|
138
|
+
for (let i = 0; i < 200 && !settled(); i += 1) {
|
|
139
|
+
await new Promise((res) => setTimeout(res, 10));
|
|
140
|
+
}
|
|
141
|
+
await new Promise((res) => setTimeout(res, 60));
|
|
142
|
+
cleanupPaths.push(home);
|
|
143
|
+
return { messages, resumedIds, createdIds, warnings, threadState, key, inbound, home };
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
const ns = await loadModule();
|
|
147
|
+
|
|
148
|
+
try {
|
|
149
|
+
// 1) 绑定的会话不在注册表里,但能恢复 → 必须恢复,且不新建
|
|
150
|
+
{
|
|
151
|
+
const r = await runInbound(ns, { boundSessionId: "dead-session" });
|
|
152
|
+
assert.deepEqual(r.resumedIds, ["dead-session"], "应当按绑定 id 恢复旧会话");
|
|
153
|
+
assert.equal(r.createdIds.length, 0, "能恢复时不该新建会话");
|
|
154
|
+
assert.equal(r.messages.length, 1, "恢复后要把任务提示注入进去");
|
|
155
|
+
assert.equal(r.threadState.get(r.key).sessionId, "dead-session", "绑定仍是那个会话");
|
|
156
|
+
console.log("✓ 已结束的会话被恢复:注入原会话,未新建");
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
// 2) 恢复失败 → 退回新建,且不能丢消息
|
|
160
|
+
{
|
|
161
|
+
const r = await runInbound(ns, { boundSessionId: "gone-session", resumeFails: true });
|
|
162
|
+
assert.deepEqual(r.resumedIds, ["gone-session"], "先尝试恢复");
|
|
163
|
+
assert.equal(r.createdIds.length, 1, "恢复失败后应新建会话");
|
|
164
|
+
assert.equal(r.messages.length, 1, "任务提示仍要注入(不能丢回传)");
|
|
165
|
+
assert.ok(r.warnings.some((w) => w.includes("恢复会话")), "恢复失败要留下 warn 原因");
|
|
166
|
+
assert.equal(r.threadState.get(r.key).sessionId, r.createdIds[0], "绑定改到新会话");
|
|
167
|
+
console.log("✓ 恢复失败时退回新建:消息不丢,原因有记录");
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
// 3) 旧版 DSH 没有 agents.resume → 直接新建,不抛错
|
|
171
|
+
{
|
|
172
|
+
const r = await runInbound(ns, { boundSessionId: "old-dsh", withResume: false });
|
|
173
|
+
assert.equal(r.createdIds.length, 1, "没有 resume 时应新建");
|
|
174
|
+
assert.equal(r.messages.length, 1);
|
|
175
|
+
assert.ok(r.warnings.some((w) => w.includes("没有 resume")), "要说清是版本能力缺失");
|
|
176
|
+
console.log("✓ 没有 resume API 时优雅降级为新建");
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
// 4) 发送方显式要求新会话 → 不许恢复
|
|
180
|
+
{
|
|
181
|
+
const r = await runInbound(ns, { boundSessionId: "dead-session", newSession: true });
|
|
182
|
+
assert.equal(r.resumedIds.length, 0, "newSession=true 时不该恢复");
|
|
183
|
+
assert.equal(r.createdIds.length, 1, "应新建会话");
|
|
184
|
+
console.log("✓ newSession=true 时不恢复");
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
// 5) 会话仍活跃 → 走注入路径,既不恢复也不新建
|
|
188
|
+
{
|
|
189
|
+
const r = await runInbound(ns, { boundSessionId: "live-1", liveSessionId: "live-1" });
|
|
190
|
+
assert.equal(r.resumedIds.length, 0, "活着就直接注入");
|
|
191
|
+
assert.equal(r.createdIds.length, 0);
|
|
192
|
+
console.log("✓ 会话仍活跃时直接注入,不触发恢复");
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
console.log("\n全部通过");
|
|
196
|
+
} finally {
|
|
197
|
+
for (const p of cleanupPaths) rmSync(p, { recursive: true, force: true });
|
|
198
|
+
rmSync(root, { recursive: true, force: true });
|
|
199
|
+
}
|
package/lib/index.js
CHANGED
|
@@ -45,7 +45,7 @@ import { tailnetFetch, tailnetOrigin } from "./tsnet/bridge.js";
|
|
|
45
45
|
export const name = "dsh-plugin-mesh";
|
|
46
46
|
export const inject = ["tools", "webServer"];
|
|
47
47
|
|
|
48
|
-
const VERSION = "0.
|
|
48
|
+
const VERSION = "0.4.0";
|
|
49
49
|
const RULE_ID = "mesh-inbound";
|
|
50
50
|
const RULE_KIND = "mesh";
|
|
51
51
|
const MAX_BODY = 256 * 1024;
|
|
@@ -826,6 +826,89 @@ async function wakeAgent(waker, config, task, warn = () => {}) {
|
|
|
826
826
|
return sessionId;
|
|
827
827
|
}
|
|
828
828
|
|
|
829
|
+
/**
|
|
830
|
+
* 把一条入站任务喂进一个**已存在但已结束**的会话,而不是新建一个。
|
|
831
|
+
*
|
|
832
|
+
* 为什么需要:`liveSession()` 看的是 DSH 内存里的 agent 注册表,重启 DSH 或
|
|
833
|
+
* 会话空闲被回收之后,注册表里就没有它了 —— 哪怕磁盘上的对话记录完好无损。
|
|
834
|
+
* 原来的做法是直接 `agents.create` 一个全新的 `mesh-<uuid>`,于是每重启一次,
|
|
835
|
+
* 所有跨机对话线都在下一次回传时静默断开(上下文还在旧会话里,新会话从零开始)。
|
|
836
|
+
*
|
|
837
|
+
* DSH 本身支持按 id 从持久化日志恢复会话:`agents.resume({ resumeSessionId })`。
|
|
838
|
+
* 这里就用它把旧会话接回来再注入。
|
|
839
|
+
*
|
|
840
|
+
* 失败(版本太旧没有 resume、会话记录被删、没配 sessionPersistence)时返回 null,
|
|
841
|
+
* 由调用方回退到新建会话 —— 恢复是**尽力而为**,不能因为它挂了就让回传丢失。
|
|
842
|
+
*/
|
|
843
|
+
async function resumeAgent(waker, config, task, sessionId, warn = () => {}) {
|
|
844
|
+
const c = waker.ctx;
|
|
845
|
+
if (typeof c.agents?.resume !== "function") {
|
|
846
|
+
warn("本机 DSH 的 agents 没有 resume,无法恢复已结束的会话;将新建会话");
|
|
847
|
+
return null;
|
|
848
|
+
}
|
|
849
|
+
const preset = await c.agentPresets.resolve(config.agentPreset);
|
|
850
|
+
if (typeof c.agentPresets.standingKeyFor === "function") {
|
|
851
|
+
await c.agentPresets.standingKeyFor(preset.id);
|
|
852
|
+
}
|
|
853
|
+
const selection = c.agentDefaultModel.currentSelection();
|
|
854
|
+
const handle = await c.agents.resume({
|
|
855
|
+
resumeSessionId: sessionId,
|
|
856
|
+
agentOptions: {
|
|
857
|
+
provider: selection.provider,
|
|
858
|
+
model: selection.model,
|
|
859
|
+
...(selection.reasoningEffort === undefined ? {} : { reasoningEffort: selection.reasoningEffort }),
|
|
860
|
+
},
|
|
861
|
+
setup: async (agentCtx) => {
|
|
862
|
+
await c.agentPresets.mount(agentCtx, preset.id);
|
|
863
|
+
},
|
|
864
|
+
});
|
|
865
|
+
try {
|
|
866
|
+
c.permissionPresets.set(handle.agent.session, permissionPresetFor(config, task));
|
|
867
|
+
// 恢复的会话**不重命名**:原标题承载着"这场对话原来是什么",改掉就丢了这段历史。
|
|
868
|
+
handle.agent.followup(
|
|
869
|
+
createUserMessage({
|
|
870
|
+
content: [{ type: "text", text: buildPrompt(task) }],
|
|
871
|
+
source: {
|
|
872
|
+
kind: "webhook",
|
|
873
|
+
provider: RULE_KIND,
|
|
874
|
+
source: task.from,
|
|
875
|
+
deliveryId: task.id,
|
|
876
|
+
ruleId: RULE_ID,
|
|
877
|
+
form: "notice",
|
|
878
|
+
summary: `mesh task from ${task.from} (resumed)`,
|
|
879
|
+
},
|
|
880
|
+
}),
|
|
881
|
+
);
|
|
882
|
+
} catch (err) {
|
|
883
|
+
try {
|
|
884
|
+
await handle.dispose();
|
|
885
|
+
} catch {
|
|
886
|
+
/* 回滚失败不覆盖原始错误 */
|
|
887
|
+
}
|
|
888
|
+
throw err;
|
|
889
|
+
}
|
|
890
|
+
return sessionId;
|
|
891
|
+
}
|
|
892
|
+
|
|
893
|
+
/**
|
|
894
|
+
* 唤醒会话:能恢复就恢复,恢复不了才新建。
|
|
895
|
+
*
|
|
896
|
+
* 优先级是「接续旧上下文」高于「开一个干净的新会话」—— 后者会让用户丢掉
|
|
897
|
+
* 整场对话的记忆,而这个 plugin 的全部价值就在于把上下文带过去。
|
|
898
|
+
*/
|
|
899
|
+
async function wakeAgentOrResume(waker, config, task, resumeSessionId, warn = () => {}) {
|
|
900
|
+
if (resumeSessionId && task?.newSession !== true) {
|
|
901
|
+
try {
|
|
902
|
+
const resumed = await resumeAgent(waker, config, task, resumeSessionId, warn);
|
|
903
|
+
if (resumed) return resumed;
|
|
904
|
+
} catch (err) {
|
|
905
|
+
// 恢复失败不该让这条回传丢掉:退回新建,并把原因记下来。
|
|
906
|
+
warn(`恢复会话 ${String(resumeSessionId).slice(0, 20)}… 失败,改为新建:${err?.message ?? err}`);
|
|
907
|
+
}
|
|
908
|
+
}
|
|
909
|
+
return wakeAgent(waker, config, task, warn);
|
|
910
|
+
}
|
|
911
|
+
|
|
829
912
|
function resolveWorkspace(config) {
|
|
830
913
|
if (config.workspaceRoot && isAbsolute(config.workspaceRoot)) return config.workspaceRoot;
|
|
831
914
|
return resolve(homedir());
|
|
@@ -1082,14 +1165,23 @@ function handleInboundTask(ctx, task, inbound, config, log, warn, waker, threadS
|
|
|
1082
1165
|
}
|
|
1083
1166
|
|
|
1084
1167
|
noteWake();
|
|
1085
|
-
|
|
1168
|
+
// 走到这里说明「能注入」不成立。若这个键绑过会话,先试着把它**恢复**回来
|
|
1169
|
+
// (重启 DSH / 会话被回收后,记录还在磁盘,注册表里却没有了),
|
|
1170
|
+
// 恢复不了再新建 —— 见 wakeAgentOrResume。
|
|
1171
|
+
wakeAgentOrResume(waker, config, task, knownSessionId, warn)
|
|
1086
1172
|
.then((sessionId) => {
|
|
1087
1173
|
if (rec) {
|
|
1088
1174
|
rec.status = "dispatched";
|
|
1175
|
+
// 三分支文案要互斥:恢复成功时不能再挂「首次出现,或原会话已结束」——
|
|
1176
|
+
// 那句话正好与事实相反(实测时读出来自相矛盾)。
|
|
1177
|
+
const resumed = sessionId === knownSessionId;
|
|
1178
|
+
const why = resumed
|
|
1179
|
+
? "重启或会话被回收后接回原上下文"
|
|
1180
|
+
: task.newSession === true
|
|
1181
|
+
? "发送方显式要求新会话"
|
|
1182
|
+
: "首次出现,或原会话已结束";
|
|
1089
1183
|
rec.routeDecision = key
|
|
1090
|
-
?
|
|
1091
|
-
task.newSession === true ? "发送方显式要求新会话" : "首次出现,或原会话已结束"
|
|
1092
|
-
})`
|
|
1184
|
+
? `${resumed ? "恢复了已结束的会话" : "新建会话"}并绑定会话键 ${key}(${why})`
|
|
1093
1185
|
: "新建会话(无会话键,一次性任务,用完不绑定)";
|
|
1094
1186
|
}
|
|
1095
1187
|
if (key) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-plugin-mesh",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "DSH Mesh:局域网自动发现同网段的 DSH 实例、显示每台机器上报的能力,并双向派发任务;可用内置的用户态 Tailscale 节点跨互联网组网。Discovers other DSH instances on the LAN, shows the capabilities each one reports, and dispatches tasks between machines in both directions, with an optional userspace Tailscale node for links across networks.",
|
|
6
6
|
"license": "MIT",
|
|
@@ -60,8 +60,9 @@
|
|
|
60
60
|
"selftest:newsession": "node lib/_selftest-newsession.mjs",
|
|
61
61
|
"selftest:release": "node scripts/_selftest-release-plan.mjs",
|
|
62
62
|
"selftest:reply": "node --experimental-vm-modules lib/_selftest-reply-route.mjs",
|
|
63
|
+
"selftest:resume": "node --experimental-vm-modules lib/_selftest-resume.mjs",
|
|
63
64
|
"selftest:reasoning": "node lib/_selftest-reasoning.mjs",
|
|
64
|
-
"test": "npm run check && npm run selftest && npm run selftest:prompt && npm run selftest:pairing && npm run selftest:client && npm run selftest:caps && npm run selftest:release && npm run selftest:reply && npm run selftest:reasoning",
|
|
65
|
+
"test": "npm run check && npm run selftest && npm run selftest:prompt && npm run selftest:pairing && npm run selftest:client && npm run selftest:caps && npm run selftest:release && npm run selftest:reply && npm run selftest:reasoning && npm run selftest:resume",
|
|
65
66
|
"check": "node scripts/check-version.mjs && node scripts/check-tdz.mjs && node --check lib/index.js && node --check lib/discovery.js && node --check lib/conversation.js && node --check lib/identity.js && node --check lib/capabilities.js && node --check lib/prompt.js && node --check lib/pairing.js && node --check lib/scan.js && node --check lib/tsnet/download.js && node --check lib/tsnet/manager.js && node --check lib/tsnet/bridge.js && node --check client/client.js && node --check scripts/release-plan.mjs && npm run check:loadable && npm run check:docs",
|
|
66
67
|
"build:sidecar": "bash scripts/build-sidecar.sh",
|
|
67
68
|
"verify:mirror": "node scripts/verify-lan-mirror.mjs",
|