dsh-lan-peers 0.7.1 → 0.7.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/client/cli.mjs CHANGED
@@ -701,6 +701,12 @@ async function cmdGroupClaim(dir, args) {
701
701
  + ' 票数=' + (reply?.votes ?? '?') + '/' + (reply?.needed ?? '?')
702
702
  + '(成员表 ' + (reply?.memberCount ?? '?') + ' 人;多数派分母是成员表全集,不是可达成员数)\n',
703
703
  );
704
+ // 契约 §3:落败者回到 follower 并更新 epoch —— 运维要立刻知道本机已经降级
705
+ process.stderr.write(
706
+ '本机当前角色=' + (reply?.role || 'follower')
707
+ + ' epoch=' + (reply?.epoch ?? '?')
708
+ + '(落败即降级;等对端回来后会由租约过期重新选举)\n',
709
+ );
704
710
  process.exitCode = 2;
705
711
  }
706
712
 
package/host/server.mjs CHANGED
@@ -96,7 +96,7 @@ import { parseArgs } from 'node:util';
96
96
  // ---------------------------------------------------------------------------
97
97
 
98
98
  /** 插件版本,用于 /v1/health.version */
99
- export const PLUGIN_VERSION = '0.7.1';
99
+ export const PLUGIN_VERSION = '0.7.2';
100
100
 
101
101
  /** §4.1 允许的时钟偏移 */
102
102
  export const CLOCK_SKEW_MS = 60_000;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-lan-peers",
3
- "version": "0.7.1",
3
+ "version": "0.7.2",
4
4
  "description": "局域网 DSH 协同:一次性配对互认、HMAC 签名 + AES-256-GCM 加密、agent 互派任务",
5
5
  "type": "module",
6
6
  "main": "lib/index.js",