@simonyea/holysheep-cli 2.1.34 → 2.1.35

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.
@@ -0,0 +1,123 @@
1
+ name: CI sanity
2
+
3
+ # [HolySheep fork] Minimal Gitea-side CI for holysheep-cli.
4
+ # Mirrors the sanity check pattern from holysheep-webui.
5
+ # Runs on every push to main, guards against regressions in:
6
+ # - package.json version format
7
+ # - runtime fetcher URL/SHA/VERSION consistency
8
+ # - key source files present (claude-process-proxy, pty-hermes-wrapper, droid)
9
+ # - aionui-wrapper brand strings (must not contain [aionui-wrapper] prefix)
10
+
11
+ on:
12
+ push:
13
+ branches: [main]
14
+ pull_request:
15
+ branches: [main]
16
+
17
+ jobs:
18
+ sanity:
19
+ name: Sanity check (version + key files + invariants)
20
+ runs-on: ubuntu-latest
21
+ steps:
22
+ - name: Checkout (host deploy-cache mode)
23
+ run: |
24
+ set -e
25
+ REPO_DIR="/opt/act_runner/deploy-cache/holysheep-cli"
26
+ BRANCH="${{ github.ref_name }}"
27
+ BRANCH="${BRANCH:-${GITHUB_REF_NAME:-main}}"
28
+ echo "branch: $BRANCH"
29
+ if [ -d "$REPO_DIR/.git" ]; then
30
+ cd "$REPO_DIR"
31
+ git fetch origin "$BRANCH"
32
+ git reset --hard "origin/$BRANCH"
33
+ else
34
+ mkdir -p "$REPO_DIR"
35
+ git clone --depth 1 -b "$BRANCH" \
36
+ http://simon:123123aa@localhost:3000/simon/holysheep-cli.git "$REPO_DIR"
37
+ fi
38
+ cd "$REPO_DIR"
39
+ echo "head: $(git rev-parse --short HEAD)"
40
+ echo "msg: $(git log -1 --pretty=%s)"
41
+
42
+ - name: Version format check
43
+ run: |
44
+ set -e
45
+ cd /opt/act_runner/deploy-cache/holysheep-cli
46
+ VER=$(node -e "console.log(require('./package.json').version)")
47
+ echo "version: $VER"
48
+ if ! echo "$VER" | grep -qE '^[0-9]+\.[0-9]+\.[0-9]+$'; then
49
+ echo "::error::package.json version '$VER' does not match semver"
50
+ exit 1
51
+ fi
52
+ echo " ok: version $VER"
53
+
54
+ - name: Key source files present
55
+ run: |
56
+ set -e
57
+ cd /opt/act_runner/deploy-cache/holysheep-cli
58
+ for f in \
59
+ src/webui/aionui-wrapper.js \
60
+ src/webui/aionui-runtime-fetcher.js \
61
+ src/tools/claude-process-proxy.js \
62
+ src/tools/pty-hermes-wrapper.py \
63
+ src/tools/droid.js \
64
+ src/tools/hermes.js; do
65
+ if [ ! -f "$f" ]; then
66
+ echo "::error::required file missing: $f"
67
+ exit 1
68
+ fi
69
+ echo " ok: $f"
70
+ done
71
+
72
+ - name: Runtime fetcher URL/SHA/VERSION consistency
73
+ run: |
74
+ set -e
75
+ cd /opt/act_runner/deploy-cache/holysheep-cli
76
+ URL=$(grep "DEFAULT_RUNTIME_URL" src/webui/aionui-runtime-fetcher.js | grep -o "holysheep-hs[0-9]*" | head -1)
77
+ VER=$(grep "DEFAULT_RUNTIME_VERSION" src/webui/aionui-runtime-fetcher.js | grep -o "holysheep-hs[0-9]*" | head -1)
78
+ echo "URL tag: $URL"
79
+ echo "VERSION tag: $VER"
80
+ if [ -z "$URL" ] || [ -z "$VER" ]; then
81
+ echo "::error::DEFAULT_RUNTIME_URL or DEFAULT_RUNTIME_VERSION missing hs-tag"
82
+ exit 1
83
+ fi
84
+ if [ "$URL" != "$VER" ]; then
85
+ echo "::error::URL tag ($URL) != VERSION tag ($VER) — run pack-runtime.mjs and update fetcher"
86
+ exit 1
87
+ fi
88
+ echo " ok: URL and VERSION both reference $URL"
89
+
90
+ - name: Invariant grep (brand + proxy)
91
+ run: |
92
+ set -e
93
+ cd /opt/act_runner/deploy-cache/holysheep-cli
94
+
95
+ # Brand: wrapper must NOT use old [aionui-wrapper] prefix
96
+ if grep -q "\[aionui-wrapper\]" src/webui/aionui-wrapper.js; then
97
+ echo "::error::aionui-wrapper.js still contains [aionui-wrapper] log prefix (should be [holysheep-web])"
98
+ exit 1
99
+ fi
100
+ echo " ok: no [aionui-wrapper] prefix"
101
+
102
+ # mode field must be holysheep-webui
103
+ if ! grep -q "holysheep-webui" src/webui/aionui-wrapper.js; then
104
+ echo "::error::aionui-wrapper.js missing mode=holysheep-webui"
105
+ exit 1
106
+ fi
107
+ echo " ok: holysheep-webui mode present"
108
+
109
+ # claude-process-proxy: sanitizeClaudeClientHeaders must exist
110
+ if ! grep -q "sanitizeClaudeClientHeaders" src/tools/claude-process-proxy.js; then
111
+ echo "::error::claude-process-proxy.js missing sanitizeClaudeClientHeaders (UA-rewrite regression)"
112
+ exit 1
113
+ fi
114
+ echo " ok: sanitizeClaudeClientHeaders present"
115
+
116
+ # pty-hermes-wrapper: ICANON must be disabled
117
+ if ! grep -q "ICANON" src/tools/pty-hermes-wrapper.py; then
118
+ echo "::error::pty-hermes-wrapper.py missing ICANON disable (PTY truncation regression)"
119
+ exit 1
120
+ fi
121
+ echo " ok: ICANON disabled in pty-hermes-wrapper.py"
122
+
123
+ echo "all invariants passed"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@simonyea/holysheep-cli",
3
- "version": "2.1.34",
3
+ "version": "2.1.35",
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
6
  "test": "node tests/droid.test.js && node tests/workspace-store.test.js && node tests/runtime-stale-upgrade.test.js && node tests/hermes.test.js && node tests/preflight.test.js",
@@ -60,10 +60,10 @@ const VENDOR_DIR = path.join(__dirname, 'vendor', 'aionui')
60
60
  // new CLI release, the next `hs web` invocation on user machines will detect
61
61
  // the version drift and upgrade the cache in place.
62
62
  const DEFAULT_RUNTIME_URL =
63
- 'https://mail.holysheep.ai/app/cli/aionui-runtime-v1.9.18-holysheep-hs23.tar.gz'
63
+ 'https://mail.holysheep.ai/app/cli/aionui-runtime-v1.9.18-holysheep-hs24.tar.gz'
64
64
  const DEFAULT_RUNTIME_SHA256 =
65
- '96bcf47a06c4cdda206ed6d258edd9d347a587ef300c053e7679df469ccf8856'
66
- const DEFAULT_RUNTIME_VERSION = '1.9.18-holysheep-hs23'
65
+ '8b3c4fa1bed93b938193321b1817c6e950cdbbfcef64c73a9283b3bb589a768c'
66
+ const DEFAULT_RUNTIME_VERSION = '1.9.18-holysheep-hs24'
67
67
 
68
68
  function isValidRuntimeDir(dir) {
69
69
  if (!dir) return false
Binary file