Skip to content

Commit 70b5006

Browse files
committed
Merge remote-tracking branch 'origin/main' into feat/iteration1-w1-foundation
2 parents 4086da5 + 5ed15d3 commit 70b5006

96 files changed

Lines changed: 5128 additions & 997 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

AGENTS.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ packages/core/src/auth/ # apiKey / console credential 解析与落盘
3535
packages/core/src/client/ # HTTP client / endpoints / console gateway
3636
```
3737

38-
Skill / 命令手册随 `skills/bailian-*/``npx skills add modelstudioai/cli --all -g` 安装(整包装齐,含共享协议 `bailian-protocol`)。业务 skill(`bailian-cli` / `bailian-gen` / `bailian-finetune` / `bailian-managed-agent`)执行前读 `skills/bailian-protocol/`;不要依赖 frontmatter `companions`(安装器不强制)。`tools/generate-reference.ts`**`packages/cli/src/commands.ts`** 按一级命令归属表分流写入各 `skills/<skill>/reference/`(纳入 git);`tools/sync-skill-metadata.ts``packages/cli/package.json` 同步各 `skills/*/SKILL.md``metadata.version`。两者由根脚本 `pnpm run sync:skill-assets``.vite-hooks/pre-commit` 执行。hub `bailian-cli` 的路由表不复述领域命令明细;SKILL 文案 / 安装约定 / hand-off 见 [docs/agents/skill-change.md](docs/agents/skill-change.md)
38+
Skill / 命令手册随 `skills/bailian-*/``bl skill init` 安装(装齐 registry 中全部 `bailian-*`,含共享协议 `bailian-protocol`)。业务 skill(`bailian-cli` / `bailian-gen` / `bailian-finetune` / `bailian-managed-agent`)执行前读 `skills/bailian-protocol/`;不要依赖 frontmatter `companions`(安装器不强制)。`tools/generate-reference.ts`**`packages/cli/src/commands.ts`** 按一级命令归属表分流写入各 `skills/<skill>/reference/`(纳入 git);`tools/sync-skill-metadata.ts``packages/cli/package.json` 同步各 `skills/*/SKILL.md``metadata.version`。两者由根脚本 `pnpm run sync:skill-assets``.vite-hooks/pre-commit` 执行。hub `bailian-cli` 的路由表不复述领域命令明细;SKILL 文案 / 安装约定 / hand-off 见 [docs/agents/skill-change.md](docs/agents/skill-change.md)
3939

4040
约定:
4141

CHANGELOG.md

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,56 @@ The format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and
66

77
[中文版](CHANGELOG.zh.md) · [README](README.md) · [Contributing](CONTRIBUTING.md)
88

9+
## [1.15.1] - 2026-08-17
10+
11+
### Added
12+
13+
- **Model permission management**`bl permission list` shows per-model inference / fine-tune / deploy grants; `bl permission grant` and `bl permission revoke` manage them, with `--all` to one-key grant inference for every model in the workspace (including future ones).
14+
15+
### Changed
16+
17+
- **`bl quota request` renamed to `bl quota update`** — set per-model QPM/TPM via `--rpm`/`--tpm` and clear custom limits with the new `--delete`; omitted fields keep their current values, and the old `quota request` path keeps working as an alias.
18+
- **`bl quota list` reworked** — now reads the model-limits API and shows per-model and workspace-level request/usage limits plus async queue/concurrency limits in a single table.
19+
- **`bl model list` no longer requires Console login** — the model catalog and `--enrich` parameter-schema endpoints are public.
20+
- **`bl skill init` output simplified** — per-skill status is now `success`/`failed` (previously `installed`) with an aggregate `success`/`partial`/`failed` result; the `publishedAt` and `agents` fields were removed.
21+
22+
## [1.15.0] - 2026-08-14
23+
24+
### Added
25+
26+
- **Responses API for `bl text chat`** — Use `--api responses` to call the DashScope Responses API with streaming, tool definitions, and structured JSON output; Chat Completions remains the default.
27+
- **Subscription plan usage views**`bl usage token-plan` displays 5-hour and weekly quota usage, while `bl usage coding-plan` displays 5-hour, weekly, and monthly usage; both support text and JSON output.
28+
- **Authentication requirements in command help** — Help output now states whether a command requires an API Key, Console login, or Alibaba Cloud OpenAPI credentials.
29+
30+
### Changed
31+
32+
- **Broader speech-recognition model support**`bl speech recognize` now routes asynchronous file-transcription and synchronous Flash ASR models to the appropriate DashScope APIs, with clear guidance for unsupported realtime models.
33+
- **MCP transport compatibility** — MCP commands now fall back from Streamable HTTP to classic SSE for compatible Bailian and custom endpoints.
34+
35+
### Fixed
36+
37+
- Binary updates now refresh installed Agent Skills after a successful CLI upgrade.
38+
- Fixed unavailable Token Plan quota values and missing reset times.
39+
- Fixed Qwen3 file-transcription result handling so waiting mode and `--out` work correctly.
40+
- Fixed MCP SSE chunk parsing, header timeouts, abort cleanup, and fallback status matching.
41+
- Network failures in JSON output now preserve the errno value in `cause.code`.
42+
43+
## [1.14.3] - 2026-08-12
44+
45+
### Fixed
46+
47+
- **Free-tier quota compatibility**`bl usage free` and `bl usage freetier` now use the current Bailian Commerce console APIs for quota queries, activation, and deactivation, with consistent asynchronous-task polling.
48+
49+
## [1.14.2] - 2026-08-07
50+
51+
### Added
52+
53+
- **`bl skill init`** — Install all first-party `bailian-*` skills into detected local AI Agents in one step.
54+
55+
### Changed
56+
57+
- **Skill command interface** — Skill management commands now default to JSON output for Agent workflows; `bl skill add` and `bl skill update` use explicit `--all` and `--name` selectors.
58+
959
## [1.14.1] - 2026-08-05
1060

1161
### Added

CHANGELOG.zh.md

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,56 @@
66

77
[English](CHANGELOG.md) · [README](README.zh.md) · [参与贡献](CONTRIBUTING.zh.md)
88

9+
## [1.15.1] - 2026-08-17
10+
11+
### 新增
12+
13+
- **模型权限管理** —— `bl permission list` 查看各模型的推理 / 微调 / 部署授权;`bl permission grant``bl permission revoke` 负责授予和回收,支持 `--all` 一键为工作区全部模型(含后续新增模型)开启推理授权。
14+
15+
### 变更
16+
17+
- **`bl quota request` 更名为 `bl quota update`** —— 通过 `--rpm`/`--tpm` 设置单模型 QPM/TPM,新增 `--delete` 一键清除自定义限制;未指定的字段保持当前值,旧命令 `quota request` 仍作为别名可用。
18+
- **`bl quota list` 重构** —— 改从模型限制接口读取数据,单表展示模型级与工作区级的请求/用量限制及异步队列/并发限制。
19+
- **`bl model list` 不再需要控制台登录** —— 模型目录与 `--enrich` 参数结构端点均为公开接口。
20+
- **`bl skill init` 输出精简** —— 单技能状态改为 `success`/`failed`(原为 `installed`),新增 `success`/`partial`/`failed` 汇总结果;移除 `publishedAt``agents` 字段。
21+
22+
## [1.15.0] - 2026-08-14
23+
24+
### 新增
25+
26+
- **`bl text chat` 支持 Responses API** —— 可通过 `--api responses` 调用 DashScope Responses API,支持流式输出、工具定义和结构化 JSON 输出;默认仍使用 Chat Completions。
27+
- **订阅套餐用量视图** —— `bl usage token-plan` 支持查看 5 小时和每周额度,`bl usage coding-plan` 支持查看 5 小时、每周和每月额度;两者均提供文本与 JSON 输出。
28+
- **命令帮助展示鉴权要求** —— Help 输出现在会明确标注命令需要 API Key、控制台登录还是阿里云 OpenAPI 凭证。
29+
30+
### 变更
31+
32+
- **扩展语音识别模型支持** —— `bl speech recognize` 现在会将异步文件转写和同步 Flash ASR 模型路由至对应的 DashScope API,并为暂不支持的实时模型提供明确提示。
33+
- **增强 MCP 传输兼容性** —— MCP 命令现在可为兼容的百炼及自定义端点从 Streamable HTTP 自动回退至经典 SSE。
34+
35+
### 修复
36+
37+
- 二进制方式升级 CLI 成功后,现在会同步刷新已安装的 Agent Skills。
38+
- 修复 Token Plan 额度不可用或缺少重置时间时的展示问题。
39+
- 修复 Qwen3 文件转写结果处理,使等待模式和 `--out` 能够正常工作。
40+
- 修复 MCP SSE 分块解析、响应头超时、中止清理和回退状态匹配问题。
41+
- JSON 输出中的网络错误现在会在 `cause.code` 中保留 errno。
42+
43+
## [1.14.3] - 2026-08-12
44+
45+
### 修复
46+
47+
- **免费额度兼容性** —— `bl usage free``bl usage freetier` 现在使用最新的 Bailian Commerce 控制台 API 查询、开通和关闭免费额度,并统一处理异步任务轮询。
48+
49+
## [1.14.2] - 2026-08-07
50+
51+
### 新增
52+
53+
- **`bl skill init`** —— 一次性将全部官方 `bailian-*` Skill 安装到本机检测到的 AI Agent。
54+
55+
### 变更
56+
57+
- **Skill 命令接口** —— Skill 管理命令现在默认输出适合 Agent 工作流的 JSON;`bl skill add``bl skill update` 使用明确的 `--all``--name` 选择参数。
58+
959
## [1.14.1] - 2026-08-05
1060

1161
### 新增

INSTALL.md

Lines changed: 34 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,38 @@
11
# 阿里云百炼CLI 安装说明(供 AI Agent 阅读)
22

3-
本文档面向 **AI Agent**:按下列步骤为用户安装并校验 **阿里云百炼CLI**(命令 `bl` / `bailian`)。**优先**使用二进制一键安装(无需 Node);若环境已有 Node / 需要 Command Pack,再用 npm。不要臆造版本号或路径;以用户环境为准。
3+
本文档面向 **AI Agent**:按下列步骤为用户安装并校验 **阿里云百炼CLI**(命令 `bl` / `bailian`)。**优先**在已有 Node.js(**≥ 18.17.0**)的环境用 npm 安装;若没有可用 Node / npm,再走二进制一键安装。不要臆造版本号或路径;以用户环境为准。
44

5-
## 1. 推荐:二进制安装(无需 Node)
5+
## 1. 推荐:npm 安装(要求 **≥ 18.17.0**
6+
7+
1. `node -v` 确认版本 ≥ 18.17.0。
8+
2. `npm -v` 确认可用(**仅允许 npm** 全局安装,不要用 pnpm/yarn)。
9+
3. 执行:
10+
11+
```bash
12+
npm install -g bailian-cli
13+
```
14+
15+
4. 校验:`bl --version`
16+
17+
安装 skills(CLI 内置,无需 Git / npx skills):
18+
19+
```bash
20+
bl skill init
21+
```
22+
23+
**Supported:** `bl skill init` 一次装齐 registry 中全部 `bailian-*`(含共享协议 `bailian-protocol`)。
24+
25+
**Advanced / 按需子集:**
26+
27+
```bash
28+
bl skill add --name bailian-protocol,bailian-gen
29+
```
30+
31+
安装成功后,用中文简要说明已安装的 skills 及用户可做什么。
32+
33+
## 2. 备选:二进制安装(无需 Node)
34+
35+
当环境没有 Node / npm,或 Node 版本过低无法走 npm 时,使用二进制安装脚本。脚本安装 CLI 成功后会自动执行 `bl skill init`
636

737
```bash
838
curl -fsSL https://bailian.aliyun.com/cli/install.sh | bash
@@ -37,36 +67,9 @@ bl --version
3767
which bl # Windows: where.exe bl
3868
```
3969

40-
> CDN / GitHub Release 未就绪或下载失败时,回退到下方 npm 安装。
41-
42-
## 2. 备选:npm 安装(要求 **≥ 18.17.0**
43-
44-
1. `node -v` 确认版本。
45-
2. `npm -v` 确认可用(**仅允许 npm** 全局安装,不要用 pnpm/yarn)。
46-
3. 执行:
47-
48-
```bash
49-
npm install -g bailian-cli
50-
```
51-
52-
4. 校验:`bl --version`
70+
若自动 skill 安装失败,再手动执行:`bl skill init`
5371

54-
可选 skills(与 CLI 本体无关,按需):
55-
56-
```bash
57-
npx skills add modelstudioai/cli --all -g
58-
```
59-
60-
**Supported:** 始终使用 `--all -g`,一次装齐整套 `bailian-*`(含共享协议 `bailian-protocol`)。Agent Skills / `npx skills` **不会**按 metadata 自动拉依赖。
61-
62-
**Advanced / 不推荐:** 子集 `-s` 时 skills CLI 不会自动带上 `bailian-protocol`;若坚持子集,必须手动同时指定,例如:
63-
64-
```bash
65-
# Advanced: you MUST include bailian-protocol yourself — installer does not pull it
66-
npx skills add modelstudioai/cli -g -s bailian-protocol -s bailian-gen
67-
```
68-
69-
安装成功后,用中文简要说明已安装的 skills 及用户可做什么。
72+
> CDN / GitHub Release 未就绪或下载失败时,若本机已有合格 Node,回退到上方 npm 安装。
7073
7174
---
7275

README.md

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,15 +82,31 @@ Send the following to your Agent — it will detect your environment, then insta
8282
Please read https://bailian.aliyun.com/cli/install.md and install the Aliyun Model Studio CLI for me
8383
```
8484

85-
**Manual install (npm)**
85+
**Install with NPM**
8686

8787
```bash
8888
npm install -g bailian-cli
89-
npx skills add modelstudioai/cli --all -g
89+
bl skill init
9090
```
9191

9292
> Requires Node.js >= 18.17.
9393
94+
**Install on macOS/Linux**
95+
96+
```bash
97+
curl -fsSL https://bailian.aliyun.com/cli/install.sh | bash
98+
```
99+
100+
> No Node.js required. The installer automatically installs Bailian Skills.
101+
102+
**Install on Windows**
103+
104+
```powershell
105+
irm https://bailian.aliyun.com/cli/install.ps1 | iex
106+
```
107+
108+
> No Node.js required. The installer automatically installs Bailian Skills.
109+
94110
## Quick Start
95111

96112
Once installed, just describe your task to your AI Agent — no need to assemble commands by hand.

README.zh.md

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,15 +81,31 @@ _专为 AI Agent 打造,每个命令均可作为结构化工具调用。_
8181
请阅读:https://bailian.aliyun.com/cli/install.md 并按照说明为我安装阿里云百炼 CLI
8282
```
8383

84-
**手动安装(npm)**
84+
**NPM 安装**
8585

8686
```bash
8787
npm install -g bailian-cli
88-
npx skills add modelstudioai/cli --all -g
88+
bl skill init
8989
```
9090

9191
> 需要预先安装 Node.js >= 18.17。
9292
93+
**macOS/Linux 安装**
94+
95+
```bash
96+
curl -fsSL https://bailian.aliyun.com/cli/install.sh | bash
97+
```
98+
99+
> 无需预先安装 Node.js,安装脚本会自动安装 Bailian Skills。
100+
101+
**Windows 安装**
102+
103+
```powershell
104+
irm https://bailian.aliyun.com/cli/install.ps1 | iex
105+
```
106+
107+
> 无需预先安装 Node.js,安装脚本会自动安装 Bailian Skills。
108+
93109
## 快速开始
94110

95111
安装完成后,直接在 AI Agent 中描述你的任务,无需手动拼接命令。

docs/agents/skill-change.md

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -11,16 +11,17 @@
1111

1212
## 统一口径(安装)
1313

14-
1. **Supported install:** `npx skills add modelstudioai/cli --all -g`(整包装齐,含 `bailian-protocol`
15-
2. **`bailian-protocol` 是共享协议 skill**,业务 skill 执行前应 Read 它;Agent Skills / `npx skills` **不会**按 frontmatter 自动拉依赖
14+
1. **Supported install:** `bl skill init`(装齐 registry 中全部 `bailian-*`,含 `bailian-protocol`
15+
2. **`bailian-protocol` 是共享协议 skill**,业务 skill 执行前应 Read 它
1616
3. **不要**在 frontmatter 写 `companions`,也不要对外说「companions = 安装器硬依赖」
17-
4. 子集安装(`-s`)为 **advanced / 不推荐**:skills CLI 不会自动带上 protocol;漏装会导致相对路径 Read 失败
17+
4. 子集安装:`bl skill add --name bailian-protocol,<skill>`;漏装 protocol 会导致相对路径 Read 失败
18+
5. **`bl skill add --all`** 安装 registry 全量(含 `spark-video` 等非 bailian 技能);一键安装 / `bl update``skill init`,不要用 `--all`
1819

1920
## 概念图
2021

2122
```text
2223
bailian-protocol ← 共享协议(consent / 鉴权 / 版本 / 错误上报)
23-
▲ 靠 --all -g 与业务 skill 同装;非安装器强制 companions
24+
▲ 靠 `bl skill init` 与业务 skill 同装;非安装器强制 companions
2425
2526
┌───────┴────────┬────────────────┬──────────────────┐
2627
bailian-gen bailian-finetune bailian-managed-agent
@@ -37,18 +38,18 @@ bailian-gen bailian-finetune bailian-managed-agent
3738

3839
### A. 分层边界
3940

40-
- [ ] **整包装齐**:安装/升级文案主推 `--all -g`;业务 skill ****声明 `companions`
41-
- [ ] **协议读取**:CRITICAL / references 可链 `../bailian-protocol/…`;若读不到 → 停止执行 `bl`,提示 `npx skills add modelstudioai/cli --all -g`
41+
- [ ] **整包装齐**:安装/升级文案主推 `bl skill init`;业务 skill ****声明 `companions`
42+
- [ ] **协议读取**:CRITICAL / references 可链 `../bailian-protocol/…`;若读不到 → 停止执行 `bl`,提示 `bl skill init`
4243
- [ ] **软 hand-off**:兄弟业务 skill **只写 skill 名**;已安装则 Read,未安装则 `bl … --help` 或提示整包安装;**不要**`../bailian-gen/…` 等写成执行前提
4344
- [ ] **Hub vs 领域**`bailian-cli` 的「When to use which command」只列 hub 拥有的意图;媒体 / 精调 / managed-agent 各留 hand-off 行,**不抄**领域默认模型与子命令明细
4445
- [ ] **渐进披露**:SKILL 写意图路由与领域硬规则;flags / usage / examples 以 `reference/``bl <command> --help` 为准,表后保留「勿猜 flag」指向句
4546

4647
### B. 文案与落款一致性
4748

4849
- [ ] 领域 skill(gen / finetune / managed-agent)路由或命令表后有指向 `reference/` 的句;文末 `## references`(protocol + reference)与家族对齐
49-
- [ ] description 含 WHAT + WHEN + 反触发;安装说明指向 `--all -g`,不写 companions 必装
50+
- [ ] description 含 WHAT + WHEN + 反触发;安装说明指向 `bl skill init`,不写 companions 必装
5051
- [ ] Quick examples 只演示本 skill 职责(hub 不示范 `bl image` / `bl video` 等)
51-
- [ ] 若改了安装方式:同步 `README.md` / `README.zh.md` / `INSTALL.md` / `skills/*/README*` / `skills/bailian-protocol/assets/setup.md` 中的 `npx skills add …` 示例(改 `INSTALL.md` 时按 [install-doc-change.md](install-doc-change.md) 同步静态页)
52+
- [ ] 若改了安装方式:同步 `README.md` / `README.zh.md` / `INSTALL.md` / `skills/*/README*` / `skills/bailian-protocol/assets/setup.md` 中的 `bl skill init` / `bl skill add …` 示例(改 `INSTALL.md` 时按 [install-doc-change.md](install-doc-change.md) 同步静态页)
5253

5354
### C. 归属与生成
5455

@@ -60,16 +61,16 @@ bailian-gen bailian-finetune bailian-managed-agent
6061

6162
```sh
6263
pnpm run sync:skill-assets
63-
# 本地试装(测本仓库改动,勿只拉远端)
64-
npx skills add "$(pwd)" --all -g -y
64+
# 已发布版本试装
65+
bl skill init
6566
```
6667

6768
抽查:打开 `skills/bailian-cli/SKILL.md` 确认无领域子命令明细表、无 `companions`;打开对应领域 skill 确认有「勿猜 flag」与 hand-off。
6869

6970
## 常见漏点
7071

7172
- ✗ hub 路由表再次抄回 image / video / finetune / managed-agent 明细 → token 膨胀且与领域 skill 双份漂移
72-
- ✗ 重新加回 `companions` 并宣称安装器硬依赖 → 与 Agent Skills / `npx skills` 合同不符
73+
- ✗ 重新加回 `companions` 并宣称安装器硬依赖 → 与 `bl skill add` 合同不符
7374
- ✗ 软 hand-off 写成硬路径 `../bailian-*/SKILL.md` 当执行前提 → 子集安装断链
7475
- ✗ 只改 SKILL、忘改 `GROUP_OWNER_SKILL` → reference 落错 skill
7576
- ✗ 手改 `skills/*/reference/*.md` → 下次 generate 被覆盖

packages/cli/README.md

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,15 +82,31 @@ Send the following to your Agent — it will detect your environment, then insta
8282
Please read https://bailian.aliyun.com/cli/install.md and install the Aliyun Model Studio CLI for me
8383
```
8484

85-
**Manual install (npm)**
85+
**Install with NPM**
8686

8787
```bash
8888
npm install -g bailian-cli
89-
npx skills add modelstudioai/cli --all -g
89+
bl skill init
9090
```
9191

9292
> Requires Node.js >= 18.17.
9393
94+
**Install on macOS/Linux**
95+
96+
```bash
97+
curl -fsSL https://bailian.aliyun.com/cli/install.sh | bash
98+
```
99+
100+
> No Node.js required. The installer automatically installs Bailian Skills.
101+
102+
**Install on Windows**
103+
104+
```powershell
105+
irm https://bailian.aliyun.com/cli/install.ps1 | iex
106+
```
107+
108+
> No Node.js required. The installer automatically installs Bailian Skills.
109+
94110
## Quick Start
95111

96112
Once installed, just describe your task to your AI Agent — no need to assemble commands by hand.

0 commit comments

Comments
 (0)