@simonyea/holysheep-cli 1.6.11 → 1.6.13
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 +2 -0
- package/package.json +1 -1
- package/src/tools/codex.js +5 -4
- package/src/tools/index.js +0 -5
- package/src/tools/openclaw-bridge.js +4 -3
- package/src/tools/openclaw.js +2 -1
package/README.md
CHANGED
|
@@ -218,6 +218,8 @@ A: OpenClaw 需要 Node.js 20+,运行 `node --version` 确认版本后重试
|
|
|
218
218
|
|
|
219
219
|
## Changelog
|
|
220
220
|
|
|
221
|
+
- **v1.6.13** — Codex 配置改为直接写 `api_key` 到 config.toml,不再依赖环境变量,修复 Windows 上 setup 后无需重启终端即可使用;同时精简工具列表,只保留 Claude Code / Codex / Droid / OpenClaw
|
|
222
|
+
- **v1.6.12** — 修复 OpenClaw Bridge 对 GPT-5.4 的流式响应转换,避免 `holysheep/gpt-5.4` 在 OpenClaw 中报错;同时增强 Dashboard URL 解析,减少安装后浏览器打开黑屏/空白页
|
|
221
223
|
- **v1.6.11** — OpenClaw 新增本地 HolySheep Bridge,统一暴露单一 `holysheep` provider 以支持自由切换 GPT / Claude / MiniMax;同时保留用户所选默认模型,不再强制 GPT-5.4 作为 primary
|
|
222
224
|
- **v1.6.10** — 将可运行的 OpenClaw runtime(含 npx 回退)视为已安装,避免 Windows/Node 环境下重复提示安装;同时修复 Droid CLI 的 GPT `/v1` 接入地址并同步写入 `~/.factory/config.json`
|
|
223
225
|
- **v1.6.9** — 保留 OpenClaw 的 MiniMax 配置,并为 MiniMax 使用独立 provider id,避免与 Claude provider 冲突;在 OpenClaw 2026.3.13 下改为提示精确 `/model` 切换命令,而不是停止配置 MiniMax
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@simonyea/holysheep-cli",
|
|
3
|
-
"version": "1.6.
|
|
3
|
+
"version": "1.6.13",
|
|
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",
|
package/src/tools/codex.js
CHANGED
|
@@ -12,9 +12,10 @@
|
|
|
12
12
|
* [model_providers.holysheep]
|
|
13
13
|
* name = "HolySheep"
|
|
14
14
|
* base_url = "https://api.holysheep.ai/v1"
|
|
15
|
-
*
|
|
15
|
+
* api_key = "cr_xxx"
|
|
16
16
|
*
|
|
17
17
|
* 注意:旧的 config.json 会被 Rust Codex 忽略!
|
|
18
|
+
* 注意:使用 api_key 而非 env_key,避免 Windows 上需要重启终端才能生效的问题
|
|
18
19
|
*/
|
|
19
20
|
const fs = require('fs')
|
|
20
21
|
const path = require('path')
|
|
@@ -110,7 +111,7 @@ function writeTomlConfig(apiKey, baseUrlOpenAI, model) {
|
|
|
110
111
|
`[model_providers.holysheep]`,
|
|
111
112
|
`name = "HolySheep"`,
|
|
112
113
|
`base_url = "${baseUrlOpenAI}"`,
|
|
113
|
-
`
|
|
114
|
+
`api_key = "${apiKey}"`,
|
|
114
115
|
'',
|
|
115
116
|
].join('\n')
|
|
116
117
|
|
|
@@ -134,12 +135,12 @@ function writeJsonConfigIfNeeded(apiKey, baseUrlOpenAI, model) {
|
|
|
134
135
|
jsonConfig.model_providers.holysheep = {
|
|
135
136
|
name: 'HolySheep',
|
|
136
137
|
base_url: baseUrlOpenAI,
|
|
137
|
-
|
|
138
|
+
api_key: apiKey,
|
|
138
139
|
}
|
|
139
140
|
jsonConfig.providers.holysheep = {
|
|
140
141
|
name: 'HolySheep',
|
|
141
142
|
baseURL: baseUrlOpenAI,
|
|
142
|
-
|
|
143
|
+
apiKey,
|
|
143
144
|
}
|
|
144
145
|
fs.writeFileSync(CONFIG_FILE_JSON, JSON.stringify(jsonConfig, null, 2), 'utf8')
|
|
145
146
|
} catch {}
|
package/src/tools/index.js
CHANGED
|
@@ -420,9 +420,10 @@ async function relayOpenAIRequest(requestBody, config, res) {
|
|
|
420
420
|
})
|
|
421
421
|
|
|
422
422
|
const text = await upstream.text()
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
if (
|
|
423
|
+
const parsed = parseOpenAIStreamText(text)
|
|
424
|
+
if (upstream.ok && parsed) {
|
|
425
|
+
if (requestBody.stream) return sendOpenAIStream(res, parsed)
|
|
426
|
+
return sendJson(res, upstream.status, parsed)
|
|
426
427
|
}
|
|
427
428
|
|
|
428
429
|
res.writeHead(upstream.status, {
|
package/src/tools/openclaw.js
CHANGED
|
@@ -461,7 +461,8 @@ function getDashboardUrl(port, preferNpx = false) {
|
|
|
461
461
|
timeout: preferNpx ? 60000 : 20000,
|
|
462
462
|
})
|
|
463
463
|
if (result.status === 0) {
|
|
464
|
-
const
|
|
464
|
+
const output = String(result.stdout || '')
|
|
465
|
+
const match = output.match(/Dashboard URL:\s*(\S+)/) || output.match(/(https?:\/\/\S+)/)
|
|
465
466
|
if (match) return match[1]
|
|
466
467
|
}
|
|
467
468
|
return `http://127.0.0.1:${port}/`
|