chore: rebuild CentOS7 release package
This commit is contained in:
90
.codex/skills/cc-web-centos7-release/SKILL.md
Normal file
90
.codex/skills/cc-web-centos7-release/SKILL.md
Normal file
@@ -0,0 +1,90 @@
|
||||
---
|
||||
name: cc-web-centos7-release
|
||||
description: Rebuild and verify the cc-web CentOS 7 compatible Bun baseline single executable release package. Use when the user asks to 打包, 重新打包, build single-exe, CentOS 7 发布包, dist-exe/cc-web-bun-linux-x64-baseline.tar.gz, or asks why Bun/BUN_BIN was needed for this project.
|
||||
---
|
||||
|
||||
# cc-web CentOS 7 Release
|
||||
|
||||
## Core Rules
|
||||
|
||||
- Build the CentOS 7 release with `scripts/build-single-exe.js`.
|
||||
- The default target must stay `bun-linux-x64-baseline`.
|
||||
- The release archive is `dist-exe/cc-web-bun-linux-x64-baseline.tar.gz`.
|
||||
- Do not switch this project back to Docker for CentOS 7 compatibility.
|
||||
- Do not install NodeSource Node.js 22 on CentOS 7. CentOS 7 has glibc 2.17, while current NodeSource Node.js 22 packages require newer glibc/libstdc++ symbols.
|
||||
- Do not bundle Claude/Codex CLI into the release package. cc-web must call host CLIs at runtime through `CLAUDE_PATH`, `CODEX_PATH`, or `PATH`.
|
||||
|
||||
## Build Workflow
|
||||
|
||||
1. Check whether `bun` is available:
|
||||
|
||||
```bash
|
||||
command -v bun
|
||||
```
|
||||
|
||||
2. If `bun` is not in `PATH`, reuse an existing local Bun binary before downloading anything:
|
||||
|
||||
```bash
|
||||
find /home /tmp -type f -name bun -perm -111 2>/dev/null | head -50
|
||||
```
|
||||
|
||||
Prefer a baseline binary path like:
|
||||
|
||||
```text
|
||||
/tmp/ccweb-bun.*/node_modules/@oven/bun-linux-x64-baseline/bin/bun
|
||||
```
|
||||
|
||||
3. Build with `BUN_BIN` when using a local/temporary Bun:
|
||||
|
||||
```bash
|
||||
BUN_BIN=/tmp/ccweb-bun.rhfNgd/node_modules/@oven/bun-linux-x64-baseline/bin/bun npm run build:single-exe
|
||||
```
|
||||
|
||||
If `bun` is already in `PATH`, this is enough:
|
||||
|
||||
```bash
|
||||
npm run build:single-exe
|
||||
```
|
||||
|
||||
4. After adding or changing `.codex/skills`, `.agents/skills`, public assets, runtime assets, or server code, rebuild again. The build copies runtime assets into `dist-exe/bun-linux-x64-baseline/` before creating the tarball.
|
||||
|
||||
## Verification
|
||||
|
||||
Run lightweight checks before committing:
|
||||
|
||||
```bash
|
||||
node --check server.js
|
||||
node --check lib/codex-app-runtime.js
|
||||
node --check scripts/mock-codex-app-server.js
|
||||
node --check scripts/mock-codex.js
|
||||
node --check scripts/regression.js
|
||||
node --check public/app.js
|
||||
./dist-exe/bun-linux-x64-baseline/cc-web --ccweb-mcp-server
|
||||
tar -tzf dist-exe/cc-web-bun-linux-x64-baseline.tar.gz | head
|
||||
```
|
||||
|
||||
For the MCP smoke test, send one JSON-RPC `initialize` request on stdin and expect a valid JSON response. Do not leave the process running.
|
||||
|
||||
## CentOS 7 Run Command
|
||||
|
||||
On the target machine, unpack the archive and run the binary from the release directory:
|
||||
|
||||
```bash
|
||||
tar -xzf cc-web-bun-linux-x64-baseline.tar.gz
|
||||
cd bun-linux-x64-baseline
|
||||
chmod +x cc-web
|
||||
PORT=8002 CC_WEB_PASSWORD='请改成强密码' ./cc-web
|
||||
```
|
||||
|
||||
For background execution without PM2:
|
||||
|
||||
```bash
|
||||
nohup env PORT=8002 CC_WEB_PASSWORD='请改成强密码' ./cc-web > logs/cc-web.out 2>&1 &
|
||||
```
|
||||
|
||||
For host CLI paths:
|
||||
|
||||
```bash
|
||||
export CLAUDE_PATH=/usr/local/bin/claude
|
||||
export CODEX_PATH=/usr/local/bin/codex
|
||||
```
|
||||
4
.codex/skills/cc-web-centos7-release/agents/openai.yaml
Normal file
4
.codex/skills/cc-web-centos7-release/agents/openai.yaml
Normal file
@@ -0,0 +1,4 @@
|
||||
interface:
|
||||
display_name: "CC Web CentOS7 Release"
|
||||
short_description: "固化 cc-web CentOS 7 单文件打包流程"
|
||||
default_prompt: "Use $cc-web-centos7-release to rebuild the CentOS 7 Bun baseline single-exe release package."
|
||||
Reference in New Issue
Block a user