@simonyea/holysheep-cli 1.7.94 → 1.7.95

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@simonyea/holysheep-cli",
3
- "version": "1.7.94",
3
+ "version": "1.7.95",
4
4
  "description": "Claude Code/Cursor/Cline API relay for China — ¥1=$1, WeChat/Alipay payment, no credit card, no VPN. One command setup for all AI coding tools.",
5
5
  "keywords": [
6
6
  "openai-china",
@@ -654,19 +654,18 @@ async function handleToolLaunch(req, res) {
654
654
  const tool = TOOLS.find(t => t.id === toolId)
655
655
  if (!tool) return json(res, { error: '未知工具' }, 400)
656
656
 
657
- // OpenClaw: 先启动 Bridge + Gateway,再打开浏览器
657
+ // OpenClaw: 后台启动服务,立即打开浏览器
658
658
  if (toolId === 'openclaw') {
659
659
  const gatewayPort = tool.getGatewayPort?.() || 18789
660
660
  const bridgePort = tool.getBridgePort?.() || 18788
661
661
 
662
- // 确保 Bridge 在运行
663
- const bridgeUp = tool.ensureBridgeRunning?.(bridgePort)
664
- // 确保 Gateway 在运行
665
- const gatewayUp = tool.ensureGatewayRunning?.(gatewayPort)
666
-
667
- if (!gatewayUp) {
668
- return json(res, { ok: false, error: 'Gateway 启动失败,请先运行 hs setup 配置 OpenClaw' }, 500)
669
- }
662
+ // 后台启动 Bridge + Gateway,不阻塞响应
663
+ setImmediate(() => {
664
+ try {
665
+ tool.ensureBridgeRunning?.(bridgePort)
666
+ tool.ensureGatewayRunning?.(gatewayPort)
667
+ } catch {}
668
+ })
670
669
 
671
670
  const url = `http://127.0.0.1:${gatewayPort}/`
672
671
  if (process.platform === 'darwin') spawn('open', [url], { detached: true, stdio: 'ignore' }).unref()