@simonyea/holysheep-cli 2.1.40 → 2.1.42

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.
Files changed (45) hide show
  1. package/dist/configure-worker.js +4510 -0
  2. package/dist/index.js +9610 -0
  3. package/dist/process-proxy-inject.js +117 -0
  4. package/package.json +19 -6
  5. package/.gitea/workflows/sanity.yml +0 -125
  6. package/scripts/check-tarball-size.js +0 -44
  7. package/src/commands/balance.js +0 -57
  8. package/src/commands/claude-proxy.js +0 -248
  9. package/src/commands/claude.js +0 -135
  10. package/src/commands/doctor.js +0 -282
  11. package/src/commands/login.js +0 -211
  12. package/src/commands/openclaw.js +0 -258
  13. package/src/commands/reset.js +0 -53
  14. package/src/commands/setup.js +0 -493
  15. package/src/commands/upgrade.js +0 -168
  16. package/src/commands/webui.js +0 -622
  17. package/src/index.js +0 -226
  18. package/src/tools/aider.js +0 -78
  19. package/src/tools/antigravity.js +0 -42
  20. package/src/tools/claude-code.js +0 -228
  21. package/src/tools/claude-process-proxy.js +0 -1030
  22. package/src/tools/codex.js +0 -254
  23. package/src/tools/continue.js +0 -146
  24. package/src/tools/cursor.js +0 -71
  25. package/src/tools/droid.js +0 -281
  26. package/src/tools/env-config.js +0 -185
  27. package/src/tools/gemini-cli.js +0 -82
  28. package/src/tools/hermes.js +0 -354
  29. package/src/tools/index.js +0 -13
  30. package/src/tools/openclaw-bridge.js +0 -987
  31. package/src/tools/openclaw.js +0 -925
  32. package/src/tools/opencode.js +0 -227
  33. package/src/tools/process-proxy-inject.js +0 -142
  34. package/src/utils/config.js +0 -54
  35. package/src/utils/shell.js +0 -342
  36. package/src/utils/which.js +0 -176
  37. package/src/webui/aionui-runtime-fetcher.js +0 -429
  38. package/src/webui/aionui-runtime.js +0 -139
  39. package/src/webui/aionui-wrapper.js +0 -734
  40. package/src/webui/configure-worker.js +0 -67
  41. package/src/webui/server.js +0 -1572
  42. package/src/webui/workspace-runtime.js +0 -288
  43. package/src/webui/workspace-store.js +0 -325
  44. /package/{src/webui → dist}/index.html +0 -0
  45. /package/{src/tools → dist}/pty-hermes-wrapper.py +0 -0
@@ -1,67 +0,0 @@
1
- /**
2
- * 子进程 worker — 在独立进程中运行 tool.configure()
3
- * 避免 spawnSync/busy-wait 阻塞主进程事件循环
4
- *
5
- * IPC 协议:
6
- * 父→子: { toolId, apiKey, baseUrlAnthropic, baseUrlOpenAI, primaryModel, allModelIds }
7
- * 子→父: { type: 'progress'|'result'|'error', ... }
8
- */
9
- 'use strict'
10
-
11
- process.on('message', (msg) => {
12
- const TOOLS = require('../tools')
13
- const { writeEnvToShell, removeEnvFromShell } = require('../utils/shell')
14
-
15
- const tool = TOOLS.find(t => t.id === msg.toolId)
16
- if (!tool) {
17
- process.send({ type: 'error', message: '未知工具: ' + msg.toolId })
18
- process.exit(1)
19
- }
20
-
21
- // 劫持 console.log/warn → IPC 回传进度
22
- const stripAnsi = (s) => String(s).replace(/\x1b\[[0-9;]*m/g, '')
23
- console.log = (...args) => {
24
- const text = stripAnsi(args.join(' ')).trim()
25
- if (text) process.send({ type: 'progress', message: text })
26
- }
27
- console.warn = console.log
28
-
29
- try {
30
- const result = tool.configure(
31
- msg.apiKey,
32
- msg.baseUrlAnthropic,
33
- msg.baseUrlOpenAI,
34
- msg.primaryModel,
35
- msg.allModelIds,
36
- )
37
-
38
- // 写入 shell 环境变量(如果工具需要)
39
- if (result.envVars && Object.keys(result.envVars).length > 0) {
40
- writeEnvToShell(result.envVars)
41
- process.send({ type: 'progress', message: '已写入环境变量到 shell 配置' })
42
- }
43
-
44
- // 清理冲突环境变量(env-config 工具本身就是写环境变量的,不清理)
45
- if (msg.toolId !== 'env-config') {
46
- try {
47
- removeEnvFromShell(['ANTHROPIC_API_KEY', 'ANTHROPIC_BASE_URL', 'OPENAI_API_KEY', 'OPENAI_BASE_URL'])
48
- } catch {}
49
- }
50
-
51
- process.send({
52
- type: 'result',
53
- status: result.manual ? 'manual' : result.warning ? 'warning' : 'ok',
54
- message: result.manual ? `${tool.name} 需要手动完成配置`
55
- : result.warning ? result.warning
56
- : `${tool.name} 配置成功`,
57
- file: result.file || null,
58
- hot: result.hot || false,
59
- steps: result.steps || null,
60
- dashboardUrl: result.dashboardUrl || null,
61
- })
62
- } catch (e) {
63
- process.send({ type: 'error', message: e.message })
64
- }
65
-
66
- process.exit(0)
67
- })