@baize-ai/core 0.2.0 → 0.3.1
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/.dockerignore +8 -18
- package/CHANGELOG.md +24 -1
- package/Dockerfile +66 -12
- package/README.md +85 -6
- package/README.zh-CN.md +63 -3
- package/assets/logo.png +0 -0
- package/cli/baize.js +6 -0
- package/cli/commands/a2a.js +124 -0
- package/cli/commands/add.js +126 -86
- package/cli/commands/component.js +27 -4
- package/cli/commands/doctor.js +2 -2
- package/cli/commands/init.js +28 -0
- package/cli/commands/self-uninstall.js +1 -1
- package/cli/lib/__tests__/instruction-split.test.js +1 -1
- package/cli/lib/a2a.js +235 -0
- package/cli/lib/lock.js +3 -3
- package/cli/lib/self-upgrade.js +1 -1
- package/docker-compose.yml +1 -1
- package/docs/docker.md +18 -4
- package/docs/release.md +150 -0
- package/package.json +1 -1
- package/scripts/docker-publish.sh +70 -0
- package/scripts/install.sh +4 -4
- package/scripts/pack-release.sh +361 -0
- package/skills/comm-bridge/package.json +7 -3
- package/skills/comm-bridge/scripts/c4-receive.js +23 -2
- package/skills/scheduler/package.json +2 -2
- package/skills/web-console/SKILL.md +34 -0
- package/skills/web-console/package.json +2 -2
- package/skills/web-console/public/app.js +967 -4
- package/skills/web-console/public/index.html +141 -0
- package/skills/web-console/public/styles.css +136 -0
- package/skills/web-console/scripts/a2a-admin.js +533 -0
- package/skills/web-console/scripts/channel-admin.js +99 -16
- package/skills/web-console/scripts/server.js +395 -1
- package/skills/web-console/scripts/skill-catalog.js +179 -0
- package/templates/claude-system.md +22 -0
- package/templates/pm2/ecosystem.config.cjs +4 -1
- package/test/a2a-cli.test.js +180 -0
- package/test/agent-card-api.test.js +261 -0
- package/test/channel-admin.test.js +87 -0
- package/test/component-lock.test.js +216 -0
- package/test/skill-catalog.test.js +118 -0
- package/test/web-console-routes.test.js +512 -1
package/docs/docker.md
CHANGED
|
@@ -2,6 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
Baize can be run inside a Docker container — useful for platforms like Synology NAS, VPS, or any environment where running the native install script is impractical.
|
|
4
4
|
|
|
5
|
+
Images are **built from the published `@baize-ai/core` npm package** (no source
|
|
6
|
+
code in the build context — the source repository stays private) and published
|
|
7
|
+
as **public images** to GitHub Container Registry (global) and Aliyun ACR
|
|
8
|
+
(China). Build/publish: `./scripts/docker-publish.sh <version>`.
|
|
9
|
+
|
|
5
10
|
## Prerequisites
|
|
6
11
|
|
|
7
12
|
- Docker 24+
|
|
@@ -17,11 +22,19 @@ Variables below) if you prefer provisioning at boot.
|
|
|
17
22
|
### Option A: Docker Run (simplest)
|
|
18
23
|
|
|
19
24
|
```bash
|
|
25
|
+
# Global (GitHub Container Registry)
|
|
26
|
+
docker run -d --name baize \
|
|
27
|
+
-p 3456:3456 \
|
|
28
|
+
-v baize-data:/home/baize/baize \
|
|
29
|
+
-v claude-config:/home/baize/.claude \
|
|
30
|
+
ghcr.io/baize01-ai/baize-core:latest
|
|
31
|
+
|
|
32
|
+
# China (Aliyun ACR — fast, no mirror needed)
|
|
20
33
|
docker run -d --name baize \
|
|
21
34
|
-p 3456:3456 \
|
|
22
35
|
-v baize-data:/home/baize/baize \
|
|
23
36
|
-v claude-config:/home/baize/.claude \
|
|
24
|
-
|
|
37
|
+
crpi-8bg62qbrjs3cr3as.cn-hangzhou.personal.cr.aliyuncs.com/baize01/baize-core:latest
|
|
25
38
|
```
|
|
26
39
|
|
|
27
40
|
Open `http://localhost:3456` to access the web console, then configure
|
|
@@ -31,7 +44,7 @@ authentication in 模型设置.
|
|
|
31
44
|
|
|
32
45
|
```bash
|
|
33
46
|
mkdir baize && cd baize
|
|
34
|
-
curl -fsSLO https://raw.githubusercontent.com/
|
|
47
|
+
curl -fsSLO https://raw.githubusercontent.com/baize01-ai/baize-core/main/docker-compose.yml
|
|
35
48
|
```
|
|
36
49
|
|
|
37
50
|
Start (auth optional — configure in the web console after boot):
|
|
@@ -166,13 +179,14 @@ docker compose up -d
|
|
|
166
179
|
|
|
167
180
|
**Docker Run:**
|
|
168
181
|
```bash
|
|
169
|
-
|
|
182
|
+
# pull from your regional registry (ghcr global / ACR China)
|
|
183
|
+
docker pull ghcr.io/baize01-ai/baize-core:latest
|
|
170
184
|
docker stop baize && docker rm baize
|
|
171
185
|
docker run -d --name baize \
|
|
172
186
|
-p 3456:3456 \
|
|
173
187
|
-v baize-data:/home/baize/baize \
|
|
174
188
|
-v claude-config:/home/baize/.claude \
|
|
175
|
-
ghcr.io/
|
|
189
|
+
ghcr.io/baize01-ai/baize-core:latest
|
|
176
190
|
```
|
|
177
191
|
|
|
178
192
|
**Docker Compose:**
|
package/docs/release.md
ADDED
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
# Baize 发布手册(Release Guide)
|
|
2
|
+
|
|
3
|
+
> npm 包发布 + Docker 镜像发布(ghcr + 阿里云 ACR)完整流程。
|
|
4
|
+
> 组件**包规范**(命名/keywords/打包)见 `docs/component-publishing.md`;本文件聚焦**发布执行**。
|
|
5
|
+
|
|
6
|
+
## 发布物总览
|
|
7
|
+
|
|
8
|
+
| 发布物 | 目标 | 内容 |
|
|
9
|
+
|--------|------|------|
|
|
10
|
+
| `@baize-ai/core` | npmjs | CLI + skills(web-console/comm-bridge)+ templates(4738 条目) |
|
|
11
|
+
| `@baize-ai/baize-wecom` | npmjs | 企业微信渠道组件 v0.2.0 |
|
|
12
|
+
| `@baize-ai/baize-feishu` | npmjs | 飞书渠道组件 v0.3.6 |
|
|
13
|
+
| `@baize-ai/baize-lark` | npmjs | 飞书国际版渠道组件 v0.3.11 |
|
|
14
|
+
| `ghcr.io/baize01-ai/baize-core:<v>` | GitHub Container Registry | 海外镜像(`<v>` + `latest`) |
|
|
15
|
+
| `crpi-8bg62qbrjs3cr3as.cn-hangzhou.personal.cr.aliyuncs.com/baize01/baize-core:<v>` | 阿里云 ACR | 国内镜像(`<v>` + `latest`) |
|
|
16
|
+
| `ghcr.io/baize01-ai/baize-admin-workspace:<v>` | GitHub Container Registry | admin 管理台镜像(`<v>` + `latest`) |
|
|
17
|
+
| `crpi-8bg62qbrjs3cr3as.cn-hangzhou.personal.cr.aliyuncs.com/baize01/baize-admin-workspace:<v>` | 阿里云 ACR | admin 管理台国内镜像(`<v>` + `latest`) |
|
|
18
|
+
|
|
19
|
+
**web-console 不单独发布**:它是 `@baize-ai/core` 包内的 skill,随 core 一起发布;`baize init` 同步到 `~/baize/.claude/skills/web-console/`。
|
|
20
|
+
|
|
21
|
+
## 前置条件(一次性)
|
|
22
|
+
|
|
23
|
+
### 1. npm org 与认证
|
|
24
|
+
- npmjs.com 创建组织 **`baize-ai`**(发布 `@baize-ai/*` scope 包的硬前提)
|
|
25
|
+
- 账号开启 2FA 时,CLI 发布要求 **bypass 2FA 的 token**:
|
|
26
|
+
- npmjs.com → Access Tokens → **Granular Access Token**(勾选 *Bypass 2FA for packages publication*,包权限选 baize-ai org 的 core/wecom/feishu/lark 为 Read and write),或 **Automation token**
|
|
27
|
+
- 写入 npm 配置:`npm config set //registry.npmjs.org/:_authToken="<token>"`
|
|
28
|
+
- 验证:`npm whoami` 显示你的账号;`curl -H "Authorization: Bearer <token>" https://registry.npmjs.org/-/whoami` 返回 `{"username":"..."}`
|
|
29
|
+
- ⚠️ token 若在对话/日志中暴露,发布完成后撤销重新生成
|
|
30
|
+
|
|
31
|
+
### 2. 阿里云 ACR(国内镜像)
|
|
32
|
+
- 容器镜像服务 → 个人版(免费)→ 命名空间 **`baize01`**(已建)→ **创建镜像仓库 `baize-core`**(本地仓库,先建才能 push)
|
|
33
|
+
- 设置仓库密码:控制台 → 访问凭证 → 设置固定密码
|
|
34
|
+
- 登录:`docker login crpi-8bg62qbrjs3cr3as.cn-hangzhou.personal.cr.aliyuncs.com`(用户名 = 阿里云账号,密码 = 仓库密码)
|
|
35
|
+
|
|
36
|
+
### 3. GitHub Container Registry(海外镜像)
|
|
37
|
+
- GitHub 账号需有 ghcr 推送权限(org `baize-ai` 就绪后,或先用个人账号 + 私有包空间)
|
|
38
|
+
- 登录:`docker login ghcr.io`(GitHub token,`packages:write` 权限)
|
|
39
|
+
|
|
40
|
+
### 4. Claude Code 二进制(镜像构建必需)
|
|
41
|
+
- `.claude-local/claude`(~324M,Linux arm64 ELF,gitignored)必须在构建上下文
|
|
42
|
+
- 用途:镜像预装 Claude CLI(容器运行时下载 ~340M 不可靠——D4 实测失败)
|
|
43
|
+
- ⚠️ **发布公开镜像前确认 Anthropic 分发条款**:镜像内含 Claude 二进制,需确认允许在镜像中分发;不允许则改 Dockerfile(运行时按需安装)
|
|
44
|
+
|
|
45
|
+
## npm 发布
|
|
46
|
+
|
|
47
|
+
```bash
|
|
48
|
+
cd ~/huyh/work/aiagentpro/baize-ai
|
|
49
|
+
|
|
50
|
+
# 发布前自检(每个包)
|
|
51
|
+
npm pack --dry-run # 确认包内容(SKILL.md/src/scripts/ecosystem 在、node_modules/测试排除)
|
|
52
|
+
|
|
53
|
+
# 逐包发布
|
|
54
|
+
cd baize-core && npm publish --access public # @baize-ai/core@0.2.0
|
|
55
|
+
cd ../baize-wecom && npm publish --access public # @baize-ai/baize-wecom@0.2.0
|
|
56
|
+
cd ../baize-feishu && npm publish --access public # @baize-ai/baize-feishu@0.3.6
|
|
57
|
+
cd ../baize-lark && npm publish --access public # @baize-ai/baize-lark@0.3.11
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
### 发布后验证
|
|
61
|
+
|
|
62
|
+
```bash
|
|
63
|
+
npm view @baize-ai/core version
|
|
64
|
+
npm view @baize-ai/baize-wecom version
|
|
65
|
+
npm view @baize-ai/baize-feishu version
|
|
66
|
+
npm view @baize-ai/baize-lark version
|
|
67
|
+
|
|
68
|
+
# 国内镜像同步(公开包分钟级)
|
|
69
|
+
npm view @baize-ai/baize-wecom version --registry https://registry.npmmirror.com
|
|
70
|
+
|
|
71
|
+
# 真实安装链路(全新环境)
|
|
72
|
+
npm i -g @baize-ai/core && baize --version && baize add feishu
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
### 常见错误
|
|
76
|
+
|
|
77
|
+
| 错误 | 原因 | 解决 |
|
|
78
|
+
|------|------|------|
|
|
79
|
+
| `403 ... Two-factor authentication or granular access token with bypass 2fa` | 账号 2FA,token 无 bypass 权限或未写入 .npmrc | 生成 bypass-2FA token → `npm config set //registry.npmjs.org/:_authToken=...` |
|
|
80
|
+
| `403 ... do not have permission to publish` | 账号非 org `baize-ai` 成员 | 用创建 org 的账号 / 添加为 member |
|
|
81
|
+
| `NPM_TOKEN` env 不生效 | npm CLI 不读该 env,只认 .npmrc `_authToken` | 写 .npmrc 或 `npm publish --//registry.npmjs.org/:_authToken=<token>` |
|
|
82
|
+
|
|
83
|
+
## Docker 镜像发布
|
|
84
|
+
|
|
85
|
+
镜像由**已发布的 npm 包**构建(`Dockerfile` 内 `npm install -g @baize-ai/core@<version>`),构建上下文不含源码(`.dockerignore` 白名单:entrypoint/ecosystem/Claude 二进制)——源码仓库保持私有。
|
|
86
|
+
|
|
87
|
+
```bash
|
|
88
|
+
cd ~/huyh/work/aiagentpro/baize-ai/baize-core
|
|
89
|
+
|
|
90
|
+
# 前提:@baize-ai/core 已发布;.claude-local/claude 存在;两 registry 已登录
|
|
91
|
+
|
|
92
|
+
# 构建 + 双推(ACR 地址/namespace 已写入脚本默认值)
|
|
93
|
+
./scripts/docker-publish.sh 0.2.0
|
|
94
|
+
|
|
95
|
+
# 或只构建不推送
|
|
96
|
+
./scripts/docker-publish.sh 0.2.0 --build-only
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
脚本行为:`docker build --build-arg BAZE_CORE_VERSION=0.2.0` → tag `ghcr.io/baize01-ai/baize-core:{v,latest}` + `crpi-.../baize01/baize-core:{v,latest}` → 双推。
|
|
100
|
+
|
|
101
|
+
### 发布后验证
|
|
102
|
+
|
|
103
|
+
```bash
|
|
104
|
+
# 国内拉取(免镜像加速)
|
|
105
|
+
docker pull crpi-8bg62qbrjs3cr3as.cn-hangzhou.personal.cr.aliyuncs.com/baize01/baize-core:latest
|
|
106
|
+
docker run -d --name baize -p 3456:3456 \
|
|
107
|
+
-v baize-data:/home/baize/baize -v claude-config:/home/baize/.claude \
|
|
108
|
+
crpi-8bg62qbrjs3cr3as.cn-hangzhou.personal.cr.aliyuncs.com/baize01/baize-core:latest
|
|
109
|
+
# 打开 http://localhost:3456 → 「模型设置」配置认证
|
|
110
|
+
|
|
111
|
+
# 海外
|
|
112
|
+
docker pull ghcr.io/baize01-ai/baize-core:latest
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
### baize-admin-workspace 镜像(源码构建)
|
|
116
|
+
|
|
117
|
+
与 core 不同,admin-workspace 镜像**从本仓库源码构建**(多阶段 Dockerfile:node:22 构建 admin-ui → node:22-slim 运行 API),tag 与版本号一致,不依赖 npm 发布。
|
|
118
|
+
|
|
119
|
+
```bash
|
|
120
|
+
cd ~/huyh/work/aiagentpro/baize-ai/baize-admin-workspace
|
|
121
|
+
|
|
122
|
+
# 构建 + 双推(同一套 ACR/ghcr 默认值,脚本参照 docker-publish.sh 模式)
|
|
123
|
+
./scripts/docker-publish.sh 0.1.0
|
|
124
|
+
|
|
125
|
+
# 验证(首次登录:admin + BAIZE_ADMIN_TOKEN 或启动日志打印的随机口令)
|
|
126
|
+
docker pull crpi-8bg62qbrjs3cr3as.cn-hangzhou.personal.cr.aliyuncs.com/baize01/baize-admin-workspace:latest
|
|
127
|
+
docker run -d --name baize-admin -p 8080:8080 -v baize-admin-data:/data \
|
|
128
|
+
crpi-8bg62qbrjs3cr3as.cn-hangzhou.personal.cr.aliyuncs.com/baize01/baize-admin-workspace:latest
|
|
129
|
+
# API: http://localhost:8080/healthz ;控制台静态产物在容器内 /app/dist(反代挂同源)
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
## 版本与发布节奏
|
|
133
|
+
|
|
134
|
+
- **版本号**:core 与组件均为 SemVer;镜像 tag 与 npm 版本一致(`docker-publish.sh <version>` 的参数 = npm 包版本)
|
|
135
|
+
- **发布顺序**:npm 四包 → 镜像(依赖 npm core 包)→ 验证
|
|
136
|
+
- **npmmirror**:公开 npm 包自动镜像(分钟级),国内 npm 用户无需操作
|
|
137
|
+
- **公开镜像**:发布即公开(匿名可拉);Node 镜像含运行时 JS 可被查看,源码仓库私有不受影响
|
|
138
|
+
|
|
139
|
+
## 完整 checklist
|
|
140
|
+
|
|
141
|
+
- [ ] npm org `baize-ai` 已创建、账号有发布权限
|
|
142
|
+
- [ ] bypass-2FA token 写入 .npmrc,`npm whoami` 通过
|
|
143
|
+
- [ ] ACR 命名空间 baize01 + 镜像仓库 baize-core 已建、`docker login` 通过
|
|
144
|
+
- [ ] ghcr `docker login` 通过
|
|
145
|
+
- [ ] `.claude-local/claude` 存在(324M)
|
|
146
|
+
- [ ] Anthropic 镜像分发条款已确认
|
|
147
|
+
- [ ] 四包 `npm publish` 成功 + `npm view` 验证
|
|
148
|
+
- [ ] `./scripts/docker-publish.sh 0.2.0` 双推成功
|
|
149
|
+
- [ ] 国内/海外 `docker pull` + 运行验证
|
|
150
|
+
- [ ] 泄露过的 token 已撤销重生成
|
package/package.json
CHANGED
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# ────────────────────────────────────────────────────────────────────────────
|
|
3
|
+
# Baize Docker image build + dual-registry publish (ghcr + Aliyun ACR)
|
|
4
|
+
#
|
|
5
|
+
# Publishes a PUBLIC image from the published npm package — no source code in
|
|
6
|
+
# the build context (see .dockerignore). Source repo stays private.
|
|
7
|
+
#
|
|
8
|
+
# Usage:
|
|
9
|
+
# ./scripts/docker-publish.sh <version> # build + push both
|
|
10
|
+
# ./scripts/docker-publish.sh <version> --build-only
|
|
11
|
+
#
|
|
12
|
+
# Env:
|
|
13
|
+
# ACR_REGISTRY e.g. registry.cn-hangzhou.aliyuncs.com (required for ACR push)
|
|
14
|
+
# ACR_NAMESPACE your Aliyun ACR namespace (required for ACR push)
|
|
15
|
+
# GHCR_ORG default baize01-ai
|
|
16
|
+
#
|
|
17
|
+
# Auth (once per registry, or via CI secrets):
|
|
18
|
+
# docker login ghcr.io --username <user> --password <token>
|
|
19
|
+
# docker login ${ACR_REGISTRY} --username <user> --password <password>
|
|
20
|
+
# ────────────────────────────────────────────────────────────────────────────
|
|
21
|
+
set -euo pipefail
|
|
22
|
+
|
|
23
|
+
VERSION="${1:?Usage: docker-publish.sh <version> [--build-only]}"
|
|
24
|
+
BUILD_ONLY="${2:-}"
|
|
25
|
+
|
|
26
|
+
GHCR_ORG="${GHCR_ORG:-baize01-ai}"
|
|
27
|
+
GHCR_IMAGE="ghcr.io/${GHCR_ORG}/baize-core"
|
|
28
|
+
ACR_REGISTRY="${ACR_REGISTRY:-crpi-8bg62qbrjs3cr3as.cn-hangzhou.personal.cr.aliyuncs.com}"
|
|
29
|
+
ACR_NAMESPACE="${ACR_NAMESPACE:-baize01}"
|
|
30
|
+
|
|
31
|
+
# ── Build ────────────────────────────────────────────────────────────────────
|
|
32
|
+
echo "==> Building baize-core:${VERSION} (from npm @baize-ai/core@${VERSION})"
|
|
33
|
+
docker build \
|
|
34
|
+
--build-arg BAZE_CORE_VERSION="${VERSION}" \
|
|
35
|
+
-t "${GHCR_IMAGE}:${VERSION}" \
|
|
36
|
+
-t "${GHCR_IMAGE}:latest" \
|
|
37
|
+
.
|
|
38
|
+
|
|
39
|
+
if [ -n "${ACR_REGISTRY}" ] && [ -n "${ACR_NAMESPACE}" ]; then
|
|
40
|
+
ACR_IMAGE="${ACR_REGISTRY}/${ACR_NAMESPACE}/baize-core"
|
|
41
|
+
docker tag "${GHCR_IMAGE}:${VERSION}" "${ACR_IMAGE}:${VERSION}"
|
|
42
|
+
docker tag "${GHCR_IMAGE}:${VERSION}" "${ACR_IMAGE}:latest"
|
|
43
|
+
fi
|
|
44
|
+
|
|
45
|
+
echo "==> Built: ${GHCR_IMAGE}:${VERSION} (+latest)"
|
|
46
|
+
[ "${BUILD_ONLY}" = "--build-only" ] && { echo "Build only — not pushing."; exit 0; }
|
|
47
|
+
|
|
48
|
+
# ── Push ─────────────────────────────────────────────────────────────────────
|
|
49
|
+
# ACR first (mainland China primary). ghcr requires the GitHub org (KI-001);
|
|
50
|
+
# a ghcr failure degrades to a warning so the ACR push still completes.
|
|
51
|
+
PUSH_GHCR="${PUSH_GHCR:-1}"
|
|
52
|
+
if [ -n "${ACR_IMAGE:-}" ]; then
|
|
53
|
+
echo "==> Pushing ${ACR_IMAGE} (Aliyun ACR — fast for mainland China)"
|
|
54
|
+
docker push "${ACR_IMAGE}:${VERSION}"
|
|
55
|
+
docker push "${ACR_IMAGE}:latest"
|
|
56
|
+
fi
|
|
57
|
+
|
|
58
|
+
if [ "${PUSH_GHCR}" = "1" ]; then
|
|
59
|
+
echo "==> Pushing ${GHCR_IMAGE}"
|
|
60
|
+
if docker push "${GHCR_IMAGE}:${VERSION}" && docker push "${GHCR_IMAGE}:latest"; then
|
|
61
|
+
:
|
|
62
|
+
else
|
|
63
|
+
echo "!! ghcr push failed (org/权限未就绪? 见 docs/release.md). ACR push above already completed." >&2
|
|
64
|
+
[ "${STRICT_GHCR:-}" = "1" ] && exit 1
|
|
65
|
+
fi
|
|
66
|
+
fi
|
|
67
|
+
|
|
68
|
+
echo "==> Done."
|
|
69
|
+
echo " Global: docker pull ${GHCR_IMAGE}:${VERSION}"
|
|
70
|
+
echo " China: docker pull ${ACR_IMAGE:-<ACR_REGISTRY>/<namespace>/baize-core}:${VERSION}"
|
package/scripts/install.sh
CHANGED
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
# Baize One-Click Installer
|
|
4
4
|
#
|
|
5
5
|
# Usage:
|
|
6
|
-
# curl -fsSL https://raw.githubusercontent.com/
|
|
6
|
+
# curl -fsSL https://raw.githubusercontent.com/baize01-ai/baize-core/main/scripts/install.sh | bash
|
|
7
7
|
#
|
|
8
8
|
# Install from a specific branch:
|
|
9
|
-
# curl -fsSL https://raw.githubusercontent.com/
|
|
9
|
+
# curl -fsSL https://raw.githubusercontent.com/baize01-ai/baize-core/main/scripts/install.sh | bash -s -- --branch <branch-name>
|
|
10
10
|
#
|
|
11
11
|
# Full non-interactive deployment:
|
|
12
12
|
# curl -fsSL .../install.sh | bash -s -- -y --setup-token sk-ant-oat01-xxx --domain example.com --https
|
|
@@ -74,7 +74,7 @@ while [ $# -gt 0 ]; do
|
|
|
74
74
|
done
|
|
75
75
|
|
|
76
76
|
# ── Configuration ─────────────────────────────────────────────
|
|
77
|
-
BAIZE_REPO="https://github.com/
|
|
77
|
+
BAIZE_REPO="https://github.com/baize01-ai/baize-core"
|
|
78
78
|
NODE_VERSION="24" # LTS-track major version
|
|
79
79
|
MIN_NODE_MAJOR=20
|
|
80
80
|
NVM_INSTALL_URL="https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.3/install.sh"
|
|
@@ -102,7 +102,7 @@ fail() { printf "${RED}[baize]${NC} %s\n" "$*" >&2; exit 1; }
|
|
|
102
102
|
if [ -z "$BRANCH" ]; then
|
|
103
103
|
# No --branch specified: resolve latest release tag (stable version).
|
|
104
104
|
# Uses GitHub API (curl is available; git may not be installed yet).
|
|
105
|
-
LATEST_TAG="$(curl -fsSL "https://api.github.com/repos/
|
|
105
|
+
LATEST_TAG="$(curl -fsSL "https://api.github.com/repos/baize01-ai/baize-core/releases/latest" 2>/dev/null \
|
|
106
106
|
| sed -n 's/.*"tag_name": *"\([^"]*\)".*/\1/p')"
|
|
107
107
|
if [ -n "$LATEST_TAG" ]; then
|
|
108
108
|
BRANCH="$LATEST_TAG"
|