Skip to content

Commit b0c48ba

Browse files
committed
Merge branch 'main' into feat/self-built-framework
1 parent d20e037 commit b0c48ba

172 files changed

Lines changed: 12241 additions & 887 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.

.github/workflows/publish.yml

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,13 @@ name: Publish
33
on:
44
workflow_dispatch:
55
inputs:
6+
package:
7+
description: "Which package set to publish"
8+
required: true
9+
type: choice
10+
options:
11+
- bailian-cli
12+
- knowledge-studio-cli
613
mode:
714
description: "Publish mode"
815
required: true
@@ -16,13 +23,13 @@ on:
1623
type: string
1724

1825
concurrency:
19-
group: publish-${{ inputs.mode }}-${{ inputs.channel }}
26+
group: publish-${{ inputs.package }}-${{ inputs.mode }}-${{ inputs.channel }}
2027
cancel-in-progress: false
2128

2229
jobs:
2330
publish-stable:
2431
if: inputs.mode == 'stable'
25-
name: publish stable to npm + tag
32+
name: publish stable (${{ inputs.package }}) to npm + tag
2633
runs-on: ubuntu-latest
2734
environment: production # Required Reviewers gate
2835
permissions:
@@ -51,11 +58,11 @@ jobs:
5158
- run: pnpm install --frozen-lockfile
5259

5360
- name: publish-stable
54-
run: node tools/release/publish-stable.mjs
61+
run: node tools/release/publish-stable.mjs ${{ inputs.package == 'knowledge-studio-cli' && '--knowledge' || '' }}
5562

5663
publish-channel:
5764
if: inputs.mode == 'channel'
58-
name: publish beta to npm
65+
name: publish channel (${{ inputs.package }}) to npm
5966
runs-on: ubuntu-latest
6067
permissions:
6168
contents: read # no tag, no Release; just publish
@@ -83,4 +90,4 @@ jobs:
8390
- run: pnpm install --frozen-lockfile
8491

8592
- name: publish-channel
86-
run: node tools/release/publish-channel.mjs --channel "${{ inputs.channel }}"
93+
run: node tools/release/publish-channel.mjs ${{ inputs.package == 'knowledge-studio-cli' && '--knowledge' || '' }} --channel "${{ inputs.channel }}"

CHANGELOG.md

Lines changed: 63 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,72 @@
22

33
All notable changes to `bailian-cli` and `bailian-cli-core` are documented here.
44

5-
The format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). The two packages share a single version number — they are always released together.
5+
The format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). The `bailian-cli`, `bailian-cli-core`, `bailian-cli-runtime`, and `bailian-cli-commands` packages share a single version number — they are always released together.
66

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

9+
## [1.6.1] - 2026-07-03
10+
11+
### Changed
12+
13+
- `bl vision describe` examples and skill reference now use `qwen3-vl-plus` instead of the legacy `qwen-vl-plus` model id, matching the command's default model.
14+
15+
## [1.6.0] - 2026-07-02
16+
17+
### Added
18+
19+
- `bl knowledge search` — semantic search across knowledge bases using the new workspace-based RAG API. Supports `--query`, `--agent-id`, `--workspace-id`, `--image` (multimodal retrieval, repeatable), and `--query-history` (JSON conversation context for multi-turn query rewriting).
20+
- `bl knowledge chat` — knowledge-base Q&A with SSE streaming. Supports `--message` (repeatable, with `role:content` prefix for multi-turn history), `--agent-id`, `--workspace-id`, and `--image` (multimodal). Displays real-time progress with step-change labels (retrieval, planning, generation) in interactive mode.
21+
- `bailian-cli-core` gains new types and endpoints for the workspace-based knowledge API: `KnowledgeSearchRequest` / `KnowledgeSearchResponse`, `KnowledgeChatRequest` / `KnowledgeChatStreamChunk` / `KnowledgeChatMessage` / `KnowledgeChatContentPart`, and `knowledgeSearchEndpoint` / `knowledgeChatEndpoint`.
22+
- `kscli` now ships `search` and `chat` commands alongside the existing `retrieve`.
23+
24+
### Changed
25+
26+
- `bl knowledge retrieve` is now marked as deprecated in its description; use `bl knowledge search` instead.
27+
- `kscli` README (EN + ZH) updated to feature `search` and `chat` as the primary commands, with `retrieve` marked deprecated.
28+
29+
## [1.5.0] - 2026-07-01
30+
31+
### Added
32+
33+
- Model fine-tuning — `bl finetune`: create, list, get, watch, and cancel jobs; fetch training logs; list checkpoints; export a checkpoint as a deployable model; and query training capability (by model or by training type). Supports `sft`, `sft-lora`, `dpo`, `dpo-lora`, and `cpt` training types.
34+
- Model deployment — `bl deploy`: create, list, get, update (rate limits), scale, and delete deployments; list deployable models and plans.
35+
- Dataset management — `bl dataset`: upload, list, get, and delete dataset files, plus `bl dataset validate` to check a local `.jsonl` before uploading (ChatML / DPO / CPT formats).
36+
- Token Plan management — `bl token-plan`: list subscription seats, add members, batch-assign seats, and create a per-seat API key.
37+
- Automatic update check: after a command finishes, the CLI checks npm for a newer release (throttled) and shows an `Update available` hint; a major stable-version gap upgrades itself automatically. Skipped with `--quiet` or when running `bl update`.
38+
- Composable packages: `bailian-cli-runtime` (CLI framework) and `bailian-cli-commands` (command library) are now published alongside `bailian-cli-core`, and a new sibling CLI `knowledge-studio-cli` (`kscli`) ships on top of them. `bl` behavior is unchanged.
39+
40+
### Removed
41+
42+
- `bl config export-schema` (exported CLI commands as Anthropic/OpenAI-compatible JSON tool schemas) has been removed.
43+
44+
### Fixed
45+
46+
- Console gateway commands (`bl console call`, etc.) now surface a readable message when the gateway returns a non-string `errorCode`, instead of `[object Object]`.
47+
48+
## [1.4.2] - 2026-06-24
49+
50+
### Added
51+
52+
- `bl omni --list-voices` prints the built-in output voices (ID, name, description, language) and exits without needing an API key. The built-in voice table is expanded from 6 to 17 voices, including dialect voices such as Dylan, Sunny, and Kiki.
53+
54+
### Changed
55+
56+
- `bl omni` default `--voice` is now `Tina` (previously `Cherry`). The `--voice` help points at `--list-voices` instead of listing every option inline.
57+
- `bl speech synthesize --list-voices` and its missing-`--voice` hint now include a link to the official CosyVoice voice documentation.
58+
- Agent skill setup guidance now covers console site selection (`--console-site domestic` / `international`) for console login and gateway commands.
59+
60+
### Fixed
61+
62+
- `bl speech synthesize` corrects the `cosyvoice-v3-flash` built-in voice ID from `longanhuan` to `longanhuan_v3`.
63+
64+
## [1.4.1] - 2026-06-22
65+
66+
### Changed
67+
68+
- Video generation now defaults to the upgraded HappyHorse 1.1 model for better quality. The 1.0 models are still available via `--model`.
69+
- `bl update` now keeps the agent skill in sync across all your agent apps (Claude Code, Cursor, etc.), and refreshes it even when the CLI is already up to date.
70+
971
## [1.4.0] - 2026-06-17
1072

1173
### Added

CHANGELOG.zh.md

Lines changed: 63 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,72 @@
22

33
`bailian-cli``bailian-cli-core` 的所有重要变更都记录在此。
44

5-
格式遵循 [Keep a Changelog](https://keepachangelog.com/zh-CN/1.1.0/),版本号遵循 [语义化版本](https://semver.org/lang/zh-CN/spec/v2.0.0.html)两个包共享一个版本号,总是一起发布。
5+
格式遵循 [Keep a Changelog](https://keepachangelog.com/zh-CN/1.1.0/),版本号遵循 [语义化版本](https://semver.org/lang/zh-CN/spec/v2.0.0.html)`bailian-cli``bailian-cli-core``bailian-cli-runtime``bailian-cli-commands` 共享一个版本号,总是一起发布。
66

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

9+
## [1.6.1] - 2026-07-03
10+
11+
### 变更
12+
13+
- `bl vision describe` 的示例与 skill 参考文档中的模型 id 由旧版 `qwen-vl-plus` 更新为 `qwen3-vl-plus`,与命令默认模型保持一致。
14+
15+
## [1.6.0] - 2026-07-02
16+
17+
### 新增
18+
19+
- `bl knowledge search` — 基于新版 workspace RAG API 的知识库语义检索。支持 `--query``--agent-id``--workspace-id``--image`(多模态检索,可重复)和 `--query-history`(多轮对话上下文 JSON,用于查询重写)。
20+
- `bl knowledge chat` — 知识库 SSE 流式问答。支持 `--message`(可重复,支持 `角色:内容` 前缀传入多轮历史)、`--agent-id``--workspace-id``--image`(多模态)。交互模式下实时展示检索、规划、生成等步骤进度。
21+
- `bailian-cli-core` 新增 workspace 级知识 API 类型与端点:`KnowledgeSearchRequest` / `KnowledgeSearchResponse``KnowledgeChatRequest` / `KnowledgeChatStreamChunk` / `KnowledgeChatMessage` / `KnowledgeChatContentPart`,以及 `knowledgeSearchEndpoint` / `knowledgeChatEndpoint`
22+
- `kscli` 现已包含 `search``chat` 命令。
23+
24+
### 变更
25+
26+
- `bl knowledge retrieve` 描述中已标记为废弃,请改用 `bl knowledge search`
27+
- `kscli` README(中英文)更新,以 `search``chat` 为主推命令,`retrieve` 标记为废弃。
28+
29+
## [1.5.0] - 2026-07-01
30+
31+
### 新增
32+
33+
- 模型精调 —— `bl finetune`:创建、列出、查询、观察、取消训练任务;拉取训练日志;列出 checkpoint;将 checkpoint 导出为可部署模型;查询训练能力(按模型或按训练类型)。支持 `sft``sft-lora``dpo``dpo-lora``cpt` 训练类型。
34+
- 模型部署 —— `bl deploy`:创建、列出、查询、更新(限流)、扩缩容、删除部署;列出可部署模型与套餐。
35+
- 数据集管理 —— `bl dataset`:上传、列出、查询、删除数据集文件,并新增 `bl dataset validate` 在上传前本地校验 `.jsonl`(ChatML / DPO / CPT 格式)。
36+
- Token Plan 管理 —— `bl token-plan`:列出订阅座位、添加成员、批量分配座位、为座位创建 API Key。
37+
- 自动更新检查:命令执行完成后,CLI 会(节流地)检查 npm 上是否有新版本并提示 `Update available`;若与稳定版存在大版本差距则自动升级。`--quiet` 或执行 `bl update` 时跳过。
38+
- 可组合包:`bailian-cli-runtime`(CLI 框架)与 `bailian-cli-commands`(命令库)现在与 `bailian-cli-core` 一起发布,并在其之上新增了同家族 CLI `knowledge-studio-cli`(`kscli`)。`bl` 行为保持不变。
39+
40+
### 已移除
41+
42+
- 移除 `bl config export-schema` 命令(原用于把 CLI 命令导出为 Anthropic/OpenAI 兼容的 JSON tool schema)。
43+
44+
### 修复
45+
46+
- 控制台网关类命令(`bl console call` 等)在网关返回非字符串 `errorCode` 时,现在会给出可读的错误信息,而不是 `[object Object]`
47+
48+
## [1.4.2] - 2026-06-24
49+
50+
### 新增
51+
52+
- `bl omni --list-voices` 无需 API key 即可打印内置输出音色列表(ID、名称、描述、语言)并退出。内置音色表从 6 个扩展到 17 个,新增 Dylan、Sunny、Kiki 等方言音色。
53+
54+
### 变更
55+
56+
- `bl omni` 默认 `--voice` 改为 `Tina`(原为 `Cherry`)。`--voice` 帮助文案改为指向 `--list-voices`,不再内联列出全部音色。
57+
- `bl speech synthesize --list-voices` 输出及缺少 `--voice` 时的提示中,新增官方 CosyVoice 音色文档链接。
58+
- Agent skill 配置指引新增 console 站点选择说明(`--console-site domestic` / `international`),适用于 console 登录与网关类命令。
59+
60+
### 修复
61+
62+
- `bl speech synthesize` 修正 `cosyvoice-v3-flash` 内置音色 ID,由 `longanhuan` 改为 `longanhuan_v3`
63+
64+
## [1.4.1] - 2026-06-22
65+
66+
### 变更
67+
68+
- 视频生成默认升级到 HappyHorse 1.1 模型,画面质量更佳。如需使用 1.0 模型,可通过 `--model` 指定。
69+
- `bl update` 现在会把 agent skill 同步更新到所有 agent 应用(Claude Code、Cursor 等),即使 CLI 已是最新版本也会刷新 skill。
70+
971
## [1.4.0] - 2026-06-17
1072

1173
### 新增

README.md

Lines changed: 35 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ Equip your AI Agent out-of-the-box with these capabilities, composable across co
2727
- **Text chat** — Qwen3.7-max: major gains in agentic coding, frontend coding, and vibe coding
2828
- **Multimodal (Omni)** — Full omni-modal support across text + image + audio + video
2929
- **Image generation & editing** — Qwen-Image 2.0: pro text rendering, photorealism, strong semantic adherence, multi-image composition
30-
- **Video generation & editing**HappyHorse-1.0 series: text-/image-/reference-to-video and natural-language video editing (up to 9-image reference)
30+
- **Video generation & editing**happyhorse-1.1 series: text-/image-/reference-to-video and natural-language video editing (up to 9-image reference)
3131
- **Speech synthesis & recognition** — CosyVoice streaming TTS, voice cloning from 5–20s samples; FunAudio-ASR covers 30 languages including 7 Chinese dialects and 20+ Mandarin accents
3232
- **Image & video understanding** — Qwen-VL: long-form video analysis, chart/document parsing, visual reasoning, multilingual OCR
3333

@@ -38,6 +38,7 @@ Equip your AI Agent out-of-the-box with these capabilities, composable across co
3838
- **MCP integration** — Orchestrate Bailian MCP servers: list services, inspect tools, and invoke any tool directly from the terminal
3939
- **Web search** — Real-time internet retrieval for up-to-date, accurate answers
4040
- **Model recommendation** — Describe your scenario and get best-fit model suggestions; supports scoped search, model comparison, and alternative discovery
41+
- **Fine-tuning & deployment** — Upload datasets, create SFT/LoRA/DPO/CPT jobs (`finetune create`), probe job status non-blockingly (`finetune watch`), query per-model training capability (`finetune capability`), and deploy trained models as endpoints (`deploy create`)
4142
- **Console capabilities** — Browse Bailian apps (`app list`), check free-tier quota (`usage free`), view model usage statistics (`usage stats`), manage workspaces (`workspace list`), and manage rate limits (`quota list/request/check/history`)
4243
- **Local file auto-upload** — Every URL parameter accepts a local path; uploaded to free temp storage with 48-hour validity
4344

@@ -54,7 +55,7 @@ Equip your AI Agent out-of-the-box with these capabilities, composable across co
5455
A complete **2-minute, 16:9 cinematic short film** — produced end-to-end from a single natural-language sentence, with **zero manual editing**. This showcase demonstrates how an AI Agent can compose a multi-step creative pipeline by orchestrating three primitives:
5556

5657
- **[Qwen Code](https://github.com/QwenLM/qwen-code)** — the agentic coding model that interprets the user's intent and drives the workflow
57-
- **[Aliyun Model Studio CLI](https://bailian.console.aliyun.com/cli?source_channel=cli_github&)** — invokes **HappyHorse 1.0**, Aliyun Model Studio's text-/image-/reference-to-video generation model
58+
- **[Aliyun Model Studio CLI](https://bailian.console.aliyun.com/cli?source_channel=cli_github&)** — invokes **HappyHorse 1.1**, Aliyun Model Studio's text-/image-/reference-to-video generation model
5859
- **[spark-video Skill](https://github.com/JohnKeating1997/spark-video)** — handles scene decomposition, storyboarding, shot continuity, and final stitching
5960

6061
### The single prompt
@@ -67,7 +68,7 @@ A complete **2-minute, 16:9 cinematic short film** — produced end-to-end from
6768

6869
1. **Qwen Code** parses the request, plans the narrative beats, and decides which tools to call.
6970
2. The **spark-video Skill** breaks the story into shots, writes per-shot prompts, and enforces visual continuity (characters, lighting, palette, lens language).
70-
3. **`bl video generate`** dispatches each shot to **HappyHorse 1.0** in parallel.
71+
3. **`bl video generate`** dispatches each shot to **HappyHorse 1.1** in parallel.
7172
4. The skill stitches all clips back together into a single 16:9 / ~2-min deliverable.
7273

7374
No timeline scrubbing. No frame-by-frame editing. Just one sentence → one video.
@@ -111,22 +112,30 @@ bl advisor recommend --message "qwen-max vs deepseek-v3 for code generation"
111112
# Browser login (required for console capability commands)
112113
bl auth login --console
113114

115+
# Fine-tune & deploy — a one-shot train-to-serve workflow
116+
bl dataset upload --file ./train.jsonl # Upload a .jsonl dataset (validated first)
117+
bl finetune create --model qwen3-8b --datasets ./train.jsonl --training-type sft-lora # Local paths auto-upload
118+
bl finetune watch --job-id ft-xxx --output json # Non-blocking status probe (exit 0/1/3 = done/failed/running)
119+
bl finetune capability --model qwen3-8b # Which training types a model supports
120+
bl deploy create --model qwen3-8b --name my-svc --plan mu # Deploy the trained model as an endpoint
121+
114122
# Browse apps / free-tier quota / usage statistics / workspaces
115123
bl app list
116-
bl usage free --model qwen3-max
117-
bl usage free --expiring 30 # Quotas expiring within 30 days
118-
bl usage free --sort remaining # Sort by remaining % ascending
119-
bl usage stats --workspace-id <id> # Usage overview for a workspace
120-
bl usage stats --model qwen-turbo --workspace-id <id> # Per-model usage
124+
bl usage free # Free-tier quota across models (add --model/--expiring/--sort)
125+
bl usage stats --workspace-id <id> # Model usage statistics (add --model for per-model)
121126
bl workspace list # List all workspaces
122127

123-
# Rate limit management
124-
bl quota list # View RPM/TPM limits for all models
125-
bl quota list --model qwen3.6-plus # View limits for a specific model
126-
bl quota check # Current usage vs rate limits
127-
bl quota check --model qwen3.6-plus --period 5 # Check usage over last 5 minutes
128+
# Rate limit management (list / check / request / history)
129+
bl quota list # View RPM/TPM limits (add --model to filter)
130+
bl quota check # Current usage vs rate limits (add --model/--period)
128131
bl quota request --model qwen3.6-plus --tpm 6000000 # Request a temporary TPM increase
129-
bl quota history # View quota change history
132+
bl quota history # View quota-change history
133+
134+
# Token Plan team management (requires AK/SK, see auth below)
135+
bl token-plan list-seats # View subscription seat details
136+
bl token-plan add-member --account-name dev --org-id org_xxx
137+
bl token-plan assign-seats --workspace-id ws_xxx --seat-type standard --account-id acc_xxx
138+
bl token-plan create-key --account-id acc_xxx --workspace-id ws_xxx
130139
```
131140

132141
> More examples and scenarios: [Aliyun Model Studio CLI Site](https://bailian.console.aliyun.com/cli?source_channel=cli_github&)
@@ -156,6 +165,18 @@ Required for console capability commands (`app list`, `usage free`, `usage stats
156165
bl auth login --console
157166
```
158167

168+
### Alibaba Cloud AK/SK (Token Plan only)
169+
170+
Required for the `token-plan` command group. Get your AccessKey from [RAM Console](https://ram.console.aliyun.com/manage/ak).
171+
172+
> Recommended: create a RAM sub-account with minimum privileges instead of using the root account's AK/SK.
173+
174+
```bash
175+
export ALIBABA_CLOUD_ACCESS_KEY_ID=LTAI5t...
176+
export ALIBABA_CLOUD_ACCESS_KEY_SECRET=...
177+
export BAILIAN_WORKSPACE_ID=ws-...
178+
```
179+
159180
## Configuration
160181

161182
```bash

0 commit comments

Comments
 (0)