Commit Graph

7 Commits

Author SHA1 Message Date
stswangzhiping
4852ded7e5 fix: clawd 不再写 agents/main/agent/auth-profiles.json
clawd 以 root 身份运行,写该目录会导致 gateway(sts 用户)的 agents 目录被 root 创建。
clawd 只需修改 openclaw.json,gateway 重启后会自行读取,无需操作 gateway 内部目录。

Made-with: Cursor
2026-04-04 21:33:35 +08:00
stswangzhiping
66b94d828f fix: 还原 inactive 路径 restartGateway + showTime keepalive
1. 还原 7737e08:removeProviderByName 重新调用 restartGateway(),
   inactive/active 状态变化均重启 gateway 使 openclaw.json 生效

2. led.js showTime() 加 30s keepalive 定时器:持续向 vfdservice
   管道写入,防止长时间无写入后管道"冷却",导致随后 showPin()
   调用 openSync(FIFO, 'w') 因无读端而阻塞、blink timer 无法触发

Made-with: Cursor
2026-04-03 18:40:08 +08:00
stswangzhiping
7737e08464 fix: inactive 路径不重启 gateway,修复 PIN 不闪问题
removeProviderByName 中移除 restartGateway() 调用。

原因:inactive 时 kill openclaw-gateway 会破坏 vfdservice
(gateway 的子进程或共享 VFD 管道的进程),导致后续 showPin
写管道失败或被 gateway 重启后的时钟命令覆盖,数码管无法显示
PIN 闪烁。

inactive 期间设备 frp 隧道已断开,无人访问 gateway,无需立即
重启。下次 active 时 applyFullProviderFromVps 会写完整 provider
config 并重启 gateway。

Made-with: Cursor
2026-04-03 18:20:09 +08:00
stswangzhiping
f4efb13612 fix: restartGateway 改异步,修复 inactive 时 PIN 不闪问题
原来 removeProviderByName 内用 execSync 调 pkill,在 showPin 前
阻塞事件循环约 100ms+;若 vfdservice 是 gateway 子进程则管道无
读端,导致 showPin 写入失败或 blink setTimeout 无法触发。

改为 exec(异步):pkill 在后台执行,不阻塞事件循环,LED/VFD
操作(showPin blink)可正常调度。

Made-with: Cursor
2026-04-03 11:41:59 +08:00
stswangzhiping
7c9a6e913e fix: 确保 origin 更新后再重启 gateway
active+full provider 路径:
  addProviderSync → onDone(写 origin) → restartGateway 一次
之前顺序错误导致 gateway 用旧 origin 重启后再重启一次。

_updateOpenClawOrigin 只负责写盘,不再调 pkill。
移除 client.js 中已无用的 execSync 引入。

Made-with: Cursor
2026-04-03 10:53:05 +08:00
stswangzhiping
701251f19b fix: 写盘 openclaw.json 后自动重启 gateway
- openclaw-provider.js: 新增 restartGateway(),在 removeProviderByName
  和 applyFullProviderFromVps 写盘成功后均调用,确保 inactive/active
  两路都能触发重启
- client.js: _updateOpenClawOrigin 去掉 CLAWD_OPENCLAW_GATEWAY_PKILL
  env var 门控,origin 变更后默认重启

Made-with: Cursor
2026-04-03 10:50:29 +08:00
stswangzhiping
4cfdaa46e5 feat: apply VPS provider to OpenClaw on status_update (fetch models, merge config)
- Add openclaw-provider: fetch /v1/models, merge provider/auth, remove by name
- Wire client _applyStatus: inactive removes provider; active applies full provider then origin
- Single-flight _busy to ignore concurrent apply/remove; isFullProvider uses base-url key

Made-with: Cursor
2026-03-31 14:32:50 +08:00