dsh-cloud-experts 0.1.2 → 0.1.3

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 CHANGED
@@ -30,7 +30,7 @@
30
30
 
31
31
  ## 版本
32
32
 
33
- - 0.1.2:ssh 内置 ServerAliveInterval=15(NAT 防断)+ 本地 360s 看门狗;0.1.1:对齐官方 inject。
33
+ - 0.1.3:本地看门狗 360s→1200s,支持 `DSH_CLOUD_EXPERTS_WATCHDOG_MS` 环境变量覆盖(配套 VPS `/etc/dsh-fed/expert.conf` 单次上限 300s→900s,2026-11-07);0.1.2:ssh 内置 ServerAliveInterval=15(NAT 防断)+ 本地 360s 看门狗;0.1.1:对齐官方 inject。
34
34
 
35
35
  ## License
36
36
 
package/lib/index.js CHANGED
@@ -16,6 +16,10 @@ const Config = z.object({
16
16
 
17
17
  const MINIMAL_ENV_KEYS = ["PATH", "SystemRoot", "USERPROFILE", "HOME"];
18
18
 
19
+ // 本地看门狗:默认 1200s(覆盖服务端 expert.conf 派生 CALL_TIMEOUT=950s + flock 排队余量)。
20
+ // 服务端上限再调整时可用 DSH_CLOUD_EXPERTS_WATCHDOG_MS 环境变量覆盖,无需发版。
21
+ const WATCHDOG_MS = Number.parseInt(process.env.DSH_CLOUD_EXPERTS_WATCHDOG_MS || "", 10) || 1200000;
22
+
19
23
  function minimalEnv() {
20
24
  const env = {};
21
25
  for (const key of MINIMAL_ENV_KEYS) if (process.env[key] !== undefined) env[key] = process.env[key];
@@ -95,8 +99,8 @@ class CloudExpertProvider {
95
99
  const watchdog = setTimeout(() => {
96
100
  try { child.stdin?.end(); } catch {}
97
101
  try { child.terminate(); } catch {}
98
- controller.abort(new Error(`cloud-experts: ${this.expert} local watchdog fired (360s)`));
99
- }, 360000);
102
+ controller.abort(new Error(`cloud-experts: ${this.expert} local watchdog fired (${Math.round(WATCHDOG_MS / 1000)}s)`));
103
+ }, WATCHDOG_MS);
100
104
  const requestCancel = () => {
101
105
  if (!controller.signal.aborted) controller.abort(new Error(`cloud-experts: ${this.expert} run cancelled locally`));
102
106
  try { child.stdin?.end(); } catch {}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "dsh-cloud-experts",
3
3
  "description": "Cloud expert subagents (claude/codex on the fed VPS) over SSH fed-expert wrapper",
4
- "version": "0.1.2",
4
+ "version": "0.1.3",
5
5
  "type": "module",
6
6
  "main": "lib/index.js",
7
7
  "exports": {