Files
cc-web/.codex/skills/cc-web-centos7-release/SKILL.md
2026-06-25 21:52:09 +08:00

2.8 KiB

name, description
name description
cc-web-centos7-release 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:
command -v bun
  1. If bun is not in PATH, reuse an existing local Bun binary before downloading anything:
find /home /tmp -type f -name bun -perm -111 2>/dev/null | head -50

Prefer a baseline binary path like:

/tmp/ccweb-bun.*/node_modules/@oven/bun-linux-x64-baseline/bin/bun
  1. Build with BUN_BIN when using a local/temporary Bun:
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:

npm run build:single-exe
  1. 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:

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:

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:

nohup env PORT=8002 CC_WEB_PASSWORD='请改成强密码' ./cc-web > logs/cc-web.out 2>&1 &

For host CLI paths:

export CLAUDE_PATH=/usr/local/bin/claude
export CODEX_PATH=/usr/local/bin/codex