dsh-plugin-mesh 0.5.0 → 0.5.2
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/AGENTS.md +1 -1
- package/README.md +7 -7
- package/client/client.js +6410 -893
- package/cordis.patch.yml +3 -2
- package/lib/_rehearsal-peer.mjs +2 -1
- package/lib/_selftest-capabilities.mjs +28 -2
- package/lib/_selftest-client.mjs +6 -389
- package/lib/_selftest-layout.mjs +112 -0
- package/lib/_selftest-prompt.mjs +67 -1
- package/lib/_selftest-reply-route.mjs +12 -1
- package/lib/_selftest-tsnet.mjs +26 -1
- package/lib/_selftest-workbench.mjs +728 -0
- package/lib/capabilities.js +16 -4
- package/lib/discovery.js +43 -6
- package/lib/index.js +302 -49
- package/lib/layout.js +128 -0
- package/lib/persist.js +4 -0
- package/lib/prompt.js +25 -7
- package/lib/scan.js +11 -10
- package/lib/tsnet/download.js +5 -1
- package/package.json +4 -3
- package/scripts/_selftest-release-plan.mjs +33 -2
- package/scripts/release-plan.mjs +19 -1
package/AGENTS.md
CHANGED
|
@@ -146,7 +146,7 @@ If you must release from this machine (offline, or the pipeline is broken):
|
|
|
146
146
|
|
|
147
147
|
```bash
|
|
148
148
|
npm run check && npm test
|
|
149
|
-
|
|
149
|
+
./scripts/release-plugin.sh --publish # tarball -> GitHub release -> LAN mirror
|
|
150
150
|
npm publish # npm; publishConfig pins the public registry
|
|
151
151
|
```
|
|
152
152
|
|
package/README.md
CHANGED
|
@@ -37,7 +37,6 @@ DSH 的 Mesh 插件:**启动后自动发现同一网段的其他 DSH 实例**
|
|
|
37
37
|
|
|
38
38
|
|
|
39
39
|
# 进程版本 ≠ 磁盘版本 → [WARN] 新代码**没**被加载,检查 plugins 挂载
|
|
40
|
-
```
|
|
41
40
|
|
|
42
41
|
(不依赖 `node`:优先 `python3` 解 JSON,退回到正则抠 `version` 字段。)
|
|
43
42
|
|
|
@@ -402,7 +401,7 @@ VPN,换网 MAC 就变;iOS / Android / macOS 现在默认按 SSID 使用随
|
|
|
402
401
|
|
|
403
402
|
名字是人手填的,可能撞。页面会检测并告警,派发时也不会随便挑一台:
|
|
404
403
|
|
|
405
|
-
- **从 A
|
|
404
|
+
- **从 A 看**:`mesh_run` 的 `peer` 填 `winbox`,只要在 A 的上游对端里唯一就能用(自己不算)
|
|
406
405
|
- **从第三台机器看**:如果它发现有两台都叫 winbox,`mesh_run` 会**拒绝**并列出候选,
|
|
407
406
|
让你改用 `<ip>:<port>` 精确定位
|
|
408
407
|
|
|
@@ -496,7 +495,7 @@ dsh plugin add /path/to/dsh-plugin-mesh
|
|
|
496
495
|
|
|
497
496
|
### 升级已安装的插件
|
|
498
497
|
|
|
499
|
-
`release-plugin.sh --publish` 发完版会**自动同步到局域网镜像**并打印一段可直接
|
|
498
|
+
`scripts/release-plugin.sh --publish` 发完版会**自动同步到局域网镜像**并打印一段可直接
|
|
500
499
|
粘贴到对端的命令。对端(尤其是 Android,见下面的 `/tmp` 坑)执行后**必须重启 DSH**
|
|
501
500
|
才会加载新版本。
|
|
502
501
|
|
|
@@ -666,7 +665,7 @@ agent 多出四个工具:
|
|
|
666
665
|
# ── 循环限速 ──
|
|
667
666
|
maxWakesPerThread: 30 # 每窗口内最多自动唤醒几次;0 = 不限制
|
|
668
667
|
threadWindowMs: 3600000 # 窗口长度(毫秒),默认 1 小时
|
|
669
|
-
threadCooldownMs:
|
|
668
|
+
threadCooldownMs: 5000 # 两次自动唤醒的最小间隔;0 = 不限制
|
|
670
669
|
minTaskChars: 24 # 正文短于此长度只入箱不唤醒(挡 ping/ack)
|
|
671
670
|
```
|
|
672
671
|
|
|
@@ -683,7 +682,7 @@ Mesh 页面看到,不会被丢弃):
|
|
|
683
682
|
|---|---|---|
|
|
684
683
|
| `minTaskChars` | 24 | 太短的内容不开会话 |
|
|
685
684
|
| 寒暄识别 | 内置 | `ping` / `ack` / `收到` / `好的` 等整条即寒暄的,不开会话 |
|
|
686
|
-
| `threadCooldownMs` |
|
|
685
|
+
| `threadCooldownMs` | 5s | 同一 thread 不会连续秒回,管**突发** |
|
|
687
686
|
| `maxWakesPerThread` | 30 | 同一 thread 在 `threadWindowMs` 内的唤醒上限,管**持续速率** |
|
|
688
687
|
|
|
689
688
|
`maxWakesPerThread` 是**滑动窗口限速,不是终身配额**:只统计最近
|
|
@@ -846,8 +845,9 @@ node lib/_selftest-discovery.mjs alpha 45900 9000 # 两个进程同时跑可
|
|
|
846
845
|
|
|
847
846
|
## 参与开发与发版
|
|
848
847
|
|
|
849
|
-
**合并进 `main` 就是发版**:CI
|
|
850
|
-
`fix:`
|
|
848
|
+
**合并进 `main` 就是发版**:CI 会跑全量测试、按提交信息决定版本号(**0.x 阶段
|
|
849
|
+
`feat:` / `fix:` 都只升 patch,只有 breaking 才升 minor**;1.0 之后恢复标准 semver;
|
|
850
|
+
`docs:`/`chore:`/`ci:` 不发版)、发 npm 包(带 provenance 签名)、打
|
|
851
851
|
`plugin-v<版本>` tag,并建带源码包的 GitHub Release。贡献者不需要手改版本号、打 tag
|
|
852
852
|
或跑 `npm publish` —— 手改反而会和流水线打架(`npm run check` 会在两处版本号不一致时
|
|
853
853
|
直接拦下)。
|