@simonyea/holysheep-cli 2.0.3 → 2.0.4

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
@@ -198,6 +198,24 @@ npx openclaw gateway --port <显示的端口>
198
198
  | Anthropic SDK / Claude Code | `https://api.holysheep.ai`(不带 /v1) |
199
199
  | OpenAI 兼容 / Codex / Aider | `https://api.holysheep.ai/v1`(带 /v1) |
200
200
 
201
+ ### AionUi runtime(实验性,opt-in)
202
+
203
+ `hs web` 默认启动轻量版 WebUI,所有平台(Windows / macOS / Linux)开箱即用,无额外依赖。
204
+
205
+ 还有一个实验性的 AionUi runtime 提供更丰富的界面,但它只随本地 `src/webui/vendor/` 目录存在(npm 包里不包含,保持 ~90 kB 体积),目前仅支持 **macOS arm64 + [Bun](https://bun.sh)**。
206
+
207
+ 在有 vendor/ 的机器上启用:
208
+
209
+ ```bash
210
+ # 单次
211
+ HOLYSHEEP_WEBUI_AIONUI=1 hs web
212
+
213
+ # 或写到 ~/.zshrc / ~/.bashrc
214
+ export HOLYSHEEP_WEBUI_AIONUI=1
215
+ ```
216
+
217
+ 不设置该环境变量时 `hs web` 走 legacy WebUI,**不会再打印任何黄色警告**。
218
+
201
219
  ### 常见问题
202
220
 
203
221
  **Q: API Key 在哪里获取?**
@@ -257,3 +275,10 @@ A: OpenClaw 需要 Node.js 20+,运行 `node --version` 确认版本后重试
257
275
  ## License
258
276
 
259
277
  MIT
278
+ ��持,自动写入配置并启动 Gateway
279
+
280
+ ---
281
+
282
+ ## License
283
+
284
+ MIT
package/package.json CHANGED
@@ -1,9 +1,10 @@
1
1
  {
2
2
  "name": "@simonyea/holysheep-cli",
3
- "version": "2.0.3",
3
+ "version": "2.0.4",
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
  "scripts": {
6
- "test": "node tests/droid.test.js && node tests/workspace-store.test.js"
6
+ "test": "node tests/droid.test.js && node tests/workspace-store.test.js",
7
+ "prepublishOnly": "node scripts/check-tarball-size.js"
7
8
  },
8
9
  "keywords": [
9
10
  "openai-china",
@@ -0,0 +1,44 @@
1
+ #!/usr/bin/env node
2
+ /**
3
+ * prepublish guard: refuse to publish if the tarball grows beyond the
4
+ * expected ~100KB slim size. This protects against accidentally packing
5
+ * `src/webui/vendor/` (the 154MB AionUi runtime) again, which broke
6
+ * 2.0.2 (Taobao mirror skipped it, Windows got ETARGET).
7
+ *
8
+ * If this script fails, inspect `.npmignore` — vendor/ must stay excluded.
9
+ */
10
+ 'use strict'
11
+
12
+ const { execSync } = require('child_process')
13
+
14
+ const MAX_BYTES = 5 * 1024 * 1024 // 5MB hard ceiling
15
+ const SOFT_FILES = 100 // flag if > 100 files
16
+
17
+ try {
18
+ const raw = execSync('npm pack --dry-run --json', { stdio: ['ignore', 'pipe', 'pipe'] }).toString()
19
+ const info = JSON.parse(raw)[0]
20
+ const { size, unpackedSize, entryCount, filename } = info
21
+
22
+ const sizeKB = (size / 1024).toFixed(1)
23
+ const unpackedMB = (unpackedSize / 1024 / 1024).toFixed(2)
24
+
25
+ if (size > MAX_BYTES) {
26
+ console.error(`\n❌ prepublish guard FAILED`)
27
+ console.error(` ${filename}`)
28
+ console.error(` packed: ${sizeKB} kB (limit 5 MB)`)
29
+ console.error(` unpacked: ${unpackedMB} MB`)
30
+ console.error(` files: ${entryCount}`)
31
+ console.error(`\n vendor/ 可能又被打进包了。检查 .npmignore 是否排除 src/webui/vendor/`)
32
+ process.exit(1)
33
+ }
34
+
35
+ if (entryCount > SOFT_FILES) {
36
+ console.warn(`\n⚠️ prepublish guard: ${entryCount} files is unusually high (soft limit ${SOFT_FILES})`)
37
+ console.warn(` 仍允许发布,但请确认没有误打包大目录`)
38
+ }
39
+
40
+ console.log(`✅ prepublish guard OK: ${sizeKB} kB, ${entryCount} files, ${unpackedMB} MB unpacked`)
41
+ } catch (err) {
42
+ console.error(`prepublish guard could not run: ${err.message}`)
43
+ process.exit(1)
44
+ }