Skip to content

Commit 10ddd0a

Browse files
Merge branch 'main' into feat/asset-center
Resolve conflicts by keeping asset-center commands alongside main's plugin/workspace/config updates. Co-authored-by: Cursor <cursoragent@cursor.com>
2 parents 7b5af2c + 678f60b commit 10ddd0a

224 files changed

Lines changed: 12136 additions & 3301 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/ISSUE_TEMPLATE/bug_report.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ body:
3939
attributes:
4040
label: Node version
4141
description: "Output of node --version"
42-
placeholder: "v22.12.0"
42+
placeholder: "v18.17.0"
4343
validations:
4444
required: true
4545

.vite-hooks/pre-commit

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/usr/bin/env sh
22
set -eu
33

4-
# Regenerate skill reference + SKILL metadata (needs bailian-cli-core dist).
4+
# Regenerate skill reference + SKILL metadata from source (no package build).
55
pnpm run sync:skill-assets
66

77
# Stage generator output so it is included in this commit.

AGENTS.md

Lines changed: 20 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
monorepo 现在按"纯逻辑 → 运行时框架 → 命令库 → 产品入口"分层:
88

99
- `packages/core``bailian-cli-core`,纯逻辑层:鉴权、配置、HTTP client、错误、类型、文件工具
10-
- `packages/runtime``bailian-cli-runtime`,通用 CLI 运行时:`createCli`、参数解析、registry/help、middleware、error handler、输出、pipeline
10+
- `packages/runtime``bailian-cli-runtime`,通用 CLI 运行时:`createCli`、参数解析、registry/help、middleware、error handler、输出、pipeline、Command Pack host
1111
- `packages/commands``bailian-cli-commands`,可复用命令实现库,只导出 command,不决定产品路径
1212
- `packages/cli``bailian-cli`,完整 `bl` 产品入口;`src/commands.ts` 组装 `bl` 暴露的命令路径
1313
- `packages/kscli``knowledge-studio-cli`,Knowledge Studio 专用入口;`src/main.ts` 复用 commands 并重映射为 `kscli` 路径
@@ -17,14 +17,16 @@ monorepo 现在按"纯逻辑 → 运行时框架 → 命令库 → 产品入口"
1717
```
1818
packages/cli/src/main.ts # bl 入口,注入 binName/version/clientName/npmPackage
1919
packages/cli/src/commands.ts # bl 产品命令 map,tools/generate-reference.ts 也读它
20+
packages/cli/src/command-pack-policy.ts # bl 的 Command Pack policy
2021
packages/kscli/src/main.ts # kscli 入口和命令 map
2122
2223
packages/commands/src/index.ts # re-export 单个命令实现
2324
packages/commands/src/commands/ # defineCommand({ auth, flags, usageArgs, exampleArgs, run })
2425
25-
packages/runtime/src/create-cli.ts # createCli(commands, identity)
26+
packages/runtime/src/create-cli.ts # createCli(commands, options)
2627
packages/runtime/src/registry.ts # 命令树解析 + 动态 help
2728
packages/runtime/src/middleware.ts # auth / telemetry / update / run command
29+
packages/runtime/src/command-packs/ # 通用 Command Pack 加载、校验、隔离安装目录和管理命令
2830
packages/runtime/src/urls.ts # 用户面控制台 URL
2931
3032
packages/core/src/types/command.ts # Command / flags / auth 类型
@@ -54,20 +56,22 @@ Skill / 命令手册随 `skills/bailian-cli/` 经 `npx skills add modelstudioai/
5456

5557
按当前任务从下表挑一条进入对应文档:
5658

57-
| 场景 | 何时进入 | 详见 |
58-
| -------------- | -------------------------------------------- | ------------------------------------------------------------------------ |
59-
| 命令增删改 | 增加 / 删除 / 重命名 `bl xxx` 或入口命令路径 | [docs/agents/command-add-remove.md](docs/agents/command-add-remove.md) |
60-
| E2E 测试维护 | 新增/改命令或 e2e 用例、补 help/缺参/dry-run | [docs/agents/cli-e2e-tests.md](docs/agents/cli-e2e-tests.md) |
61-
| 批量压测 | 改/跑多能力并发压测、`test:stress`、fixtures | [docs/agents/stress-batch-tests.md](docs/agents/stress-batch-tests.md) |
62-
| 选项变更 | 给已有命令加 `--flag` 或改默认值 | [docs/agents/command-flag-change.md](docs/agents/command-flag-change.md) |
63-
| 模型上下架 | 增加新模型 / 改默认模型 / 废弃旧模型 | [docs/agents/model-add-remove.md](docs/agents/model-add-remove.md) |
64-
| 错误文案变更 |`BailianError` 的 message 或 hint | [docs/agents/error-hint-change.md](docs/agents/error-hint-change.md) |
65-
| URL / 渠道变更 | 控制台域名 / 文档站 / 追踪参数 | [docs/agents/url-change.md](docs/agents/url-change.md) |
66-
| 鉴权扩展 | 加 OAuth / SSO / 换 token 来源 | [docs/agents/auth-change.md](docs/agents/auth-change.md) |
67-
| 配置项扩展 | 新 env var 或 `~/.bailian/config.json` 字段 | [docs/agents/config-add.md](docs/agents/config-add.md) |
68-
| 发布 | channel / stable 发布到 npm(CI 驱动) | [docs/agents/publish.md](docs/agents/publish.md) |
69-
| Change Log | 发版说明 / 历史版本说明 | [docs/agents/changelog-write.md](docs/agents/changelog-write.md) |
70-
| 工具链调整 | lint 规则 / 构建配置 / 依赖升级 | [docs/agents/lint-toolchain.md](docs/agents/lint-toolchain.md) |
59+
| 场景 | 何时进入 | 详见 |
60+
| -------------- | -------------------------------------------- | ---------------------------------------------------------------------------- |
61+
| 命令增删改 | 增加 / 删除 / 重命名 `bl xxx` 或入口命令路径 | [docs/agents/command-add-remove.md](docs/agents/command-add-remove.md) |
62+
| E2E 测试维护 | 新增/改命令或 e2e 用例、补 help/缺参/dry-run | [docs/agents/cli-e2e-tests.md](docs/agents/cli-e2e-tests.md) |
63+
| 批量压测 | 改/跑多能力并发压测、`test:stress`、fixtures | [docs/agents/stress-batch-tests.md](docs/agents/stress-batch-tests.md) |
64+
| 选项变更 | 给已有命令加 `--flag` 或改默认值 | [docs/agents/command-flag-change.md](docs/agents/command-flag-change.md) |
65+
| 模型上下架 | 增加新模型 / 改默认模型 / 废弃旧模型 | [docs/agents/model-add-remove.md](docs/agents/model-add-remove.md) |
66+
| 错误文案变更 |`BailianError` 的 message 或 hint | [docs/agents/error-hint-change.md](docs/agents/error-hint-change.md) |
67+
| URL / 渠道变更 | 控制台域名 / 文档站 / 追踪参数 | [docs/agents/url-change.md](docs/agents/url-change.md) |
68+
| 鉴权扩展 | 加 OAuth / SSO / 换 token 来源 | [docs/agents/auth-change.md](docs/agents/auth-change.md) |
69+
| 配置项扩展 | 新 env var 或 `~/.bailian/config.json` 字段 | [docs/agents/config-add.md](docs/agents/config-add.md) |
70+
| Profile / 激活 | 改命名 Profile、预设或 `active_config` | [docs/agents/config-profile-change.md](docs/agents/config-profile-change.md) |
71+
| 发布 | channel / stable 发布到 npm(CI 驱动) | [docs/agents/publish.md](docs/agents/publish.md) |
72+
| Change Log | 发版说明 / 历史版本说明 | [docs/agents/changelog-write.md](docs/agents/changelog-write.md) |
73+
| 工具链调整 | lint 规则 / 构建配置 / 依赖升级 | [docs/agents/lint-toolchain.md](docs/agents/lint-toolchain.md) |
74+
| Command Pack | 扩展包 / 白名单 / plugin 管理命令 | [docs/agents/command-pack.md](docs/agents/command-pack.md) |
7175

7276
如果当前任务无法对应任何场景,先按经验完成,然后**回来评估这是不是一类新场景** —— 是就新增 `docs/agents/<scenario>.md`,把清单沉淀下来。
7377

CHANGELOG.md

Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,97 @@ 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.10.1] - 2026-07-22
10+
11+
### Changed
12+
13+
- Token Plan defaults now use the current text, image, and dedicated text-to-video, image-to-video, and reference-to-video models.
14+
- The Bailian CLI Skill now distinguishes Bailian-specific tasks from ordinary host-agent work more accurately and avoids repeated consent prompts within an approved workflow.
15+
- Published CLI packages now support Node.js 18.17 and later, lowering the previous minimum requirement from Node.js 22.12.
16+
17+
### Fixed
18+
19+
- Token Plan now handles local images correctly for image editing, image-to-video, reference-to-video, and vision understanding without requiring a separately hosted URL.
20+
21+
## [1.10.0] - 2026-07-19
22+
23+
### Added
24+
25+
- **`bl config agent`** — configure Claude Code, Qwen Code, OpenCode, OpenClaw, Hermes Agent, or Codex to use DashScope in one command.
26+
27+
### Changed
28+
29+
- The Bailian CLI Skill now routes only matching Bailian and multimodal tasks to `bl`, and asks for consent before provider-neutral remote or billable calls.
30+
31+
### Fixed
32+
33+
- Full `bl auth logout` now clears the model Base URL so later logins cannot inherit a stale custom or Token Plan endpoint.
34+
35+
## [1.9.0] - 2026-07-17
36+
37+
### Added
38+
39+
- **Token Plan support** — log in and call supported models directly without manually configuring the endpoint.
40+
- **Named Config Profiles** — create, switch, and manage isolated configurations; logging in to a named Profile activates it automatically.
41+
- **Console Access Token automation** — generate and automatically refresh Console Access Tokens.
42+
- **`bl workspace init`** — initialize a Bailian workspace and activate the required services in one workflow.
43+
44+
### Fixed
45+
46+
- Improved configuration safety and consistency, including secret masking and preservation of custom configuration fields.
47+
48+
## [1.8.3] - 2026-07-16
49+
50+
### Fixed
51+
52+
- Fixed `bl text chat --messages-file -` failing on Windows by treating standard input as a `/dev/stdin` file path; piped JSON messages are now read from standard input correctly. (#103)
53+
54+
## [1.8.2] - 2026-07-15
55+
56+
### Changed
57+
58+
- `bl model list` now defaults to JSON output; pass `--output text` for the table view.
59+
60+
### Fixed
61+
62+
- `bl model list --enrich` now returns each model's input parameter schema (predictConfig); it was previously always empty because the console gateway response envelope was not unwrapped.
63+
64+
## [1.8.1] - 2026-07-14
65+
66+
### Changed
67+
68+
- Expanded the Command Pack allowlist to accept an additional internal command extension.
69+
70+
## [1.8.0] - 2026-07-13
71+
72+
### Added
73+
74+
- **`bl model list`** — browse the Bailian model marketplace: list model families or show full details for a single family (`--model`), with filters for provider, capability, feature, and context-window, pagination (`--page` / `--page-size`), pricing, and `--enrich` for richer metadata.
75+
- **`bl usage summary`** — a unified usage view combining free-tier quota and a recent usage overview; `--days` sets the overview window (default 7).
76+
- **Command Pack host support** — added support for allowlisted internal command extensions.
77+
- **Audio & image fine-tuning**`bl finetune audio create` (CosyVoice TTS) and `bl finetune image create` (Wan image generation) join the existing text flow. `bl finetune image create` supports `--generation-type t2i|i2i` to select text-to-image or image-to-image training.
78+
- **Audio & image deployment**`bl deploy audio create` and `bl deploy image create` deploy fine-tuned TTS and image models as endpoints.
79+
- **Multimodal dataset validation**`bl dataset upload` and `bl dataset validate` now accept `.zip` archives with `tts` and `image` schemas, validate referenced media files, and allow image archives up to 1 GB.
80+
81+
### Changed
82+
83+
- **Fine-tune and deploy commands are now split by modality (BREAKING)**: `bl finetune create``bl finetune text create`, and `bl deploy create``bl deploy text create`. Update any scripts that use the old paths.
84+
- **Deployment option renamed (BREAKING)**: `--template-id``--deploy-spec` on deployment creation commands.
85+
- **Fine-tune status exit behavior changed (BREAKING)**: `bl finetune watch` no longer reserves exit code 3 for running jobs. Running and succeeded jobs return 0; failed and canceled jobs use normal CLI errors.
86+
- `bl deploy audio create` now defaults to `--plan mu` (model-unit billing, per the CosyVoice deployment contract); text and image continue to default to `lora`.
87+
- `bl finetune audio create` now validates CosyVoice training data: audio files must be `.wav`, each `wav_fn` must start with `train/`, and exactly one training file is accepted.
88+
- `bl quota list` and `bl quota check` now report real RPM/TPM usage against limits, adding `RPM Left` / `TPM Left` columns with remaining-quota progress bars sourced from monitoring data.
89+
- `bl usage free` output now shares its rendering with `bl usage summary` for consistent free-tier tables.
90+
- `bl advisor recommend` no longer depends on a dedicated intent-detection model to analyze your request.
91+
92+
### Removed
93+
94+
- **Removed the `tongyi-intent-detect-v3` integration (BREAKING)** used by `bl advisor recommend`, along with the `intent_detect_base_url` config field and the `DASHSCOPE_INTENT_DETECT_BASE_URL` environment variable.
95+
96+
### Fixed
97+
98+
- Skill command-reference generation now reads product command maps directly from source and produces stable formatting during release checks.
99+
9100
## [1.7.0] - 2026-07-09
10101

11102
### Added

CHANGELOG.zh.md

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

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

9+
## [1.10.1] - 2026-07-22
10+
11+
### 变更
12+
13+
- Token Plan 默认模型已更新为当前文本、图片,以及文生视频、图生视频和参考生视频的专用模型。
14+
- 百炼 CLI Skill 现在能更准确地区分百炼专属任务与普通宿主 Agent 任务,并避免在已授权的工作流中重复征求同意。
15+
- 已发布的 CLI 包现在支持 Node.js 18.17 及以上版本,最低版本要求由 Node.js 22.12 下调至 18.17。
16+
17+
### 修复
18+
19+
- Token Plan 现在能在图片编辑、图生视频、参考生视频和视觉理解中正确处理本地图片,无需另行托管为 URL。
20+
21+
## [1.10.0] - 2026-07-19
22+
23+
### 新增
24+
25+
- **`bl config agent`** —— 一键配置 Claude Code、Qwen Code、OpenCode、OpenClaw、Hermes Agent 和 Codex 接入百炼模型服务。
26+
27+
### 变更
28+
29+
- 百炼 CLI Skill 现在只将匹配的百炼任务与多模态任务路由到 `bl`,并会在调用与平台无关的远程或计费能力前征求同意。
30+
31+
### 修复
32+
33+
- 完整执行 `bl auth logout` 时会同时清除模型 Base URL,避免后续登录继承失效的自定义或 Token Plan 接入地址。
34+
35+
## [1.9.0] - 2026-07-17
36+
37+
### 新增
38+
39+
- **支持 Token Plan** —— 登录后即可直接调用支持的模型,无需手动配置接入地址。
40+
- **命名 Config Profile** —— 支持创建、切换和管理相互隔离的配置,登录后会自动激活当前 Profile。
41+
- **Console Access Token 自动化** —— 支持生成并自动刷新 Console Access Token。
42+
- **`bl workspace init`** —— 一站式完成百炼工作空间初始化和所需服务开通。
43+
44+
### 修复
45+
46+
- 提升配置安全性与一致性,包括密钥脱敏和自定义配置字段保留。
47+
48+
## [1.8.3] - 2026-07-16
49+
50+
### 修复
51+
52+
- 修复 Windows 上 `bl text chat --messages-file -` 将标准输入当作 `/dev/stdin` 文件路径读取的问题;通过管道传入的 JSON 消息现在可以从标准输入正常读取。(#103
53+
54+
## [1.8.2] - 2026-07-15
55+
56+
### 变更
57+
58+
- `bl model list` 现在默认以 JSON 输出;需要表格视图请传 `--output text`
59+
60+
### 修复
61+
62+
- `bl model list --enrich` 现在能正确返回每个模型的输入参数 schema(predictConfig);此前因未解包控制台网关响应信封而始终为空。
63+
64+
## [1.8.1] - 2026-07-14
65+
66+
### 变更
67+
68+
- 扩展 Command Pack 白名单,允许加载额外的内部命令扩展。
69+
70+
## [1.8.0] - 2026-07-13
71+
72+
### 新增
73+
74+
- **`bl model list`** —— 浏览百炼模型市场:列出模型家族,或用 `--model` 查看单个家族的完整详情;支持按 provider、能力、特性、上下文窗口过滤,分页(`--page` / `--page-size`)、价格展示,以及 `--enrich` 获取更丰富的元数据。
75+
- **`bl usage summary`** —— 统一用量视图,一屏合并免费额度与近期用量概览;`--days` 设置概览时间窗口(默认 7 天)。
76+
- **Command Pack 宿主支持** —— 新增面向白名单内部命令扩展包的加载能力。
77+
- **音频与图像精调** —— 在原有文本流程之外新增 `bl finetune audio create`(CosyVoice 语音合成)与 `bl finetune image create`(万相图像生成)。`bl finetune image create` 支持 `--generation-type t2i|i2i` 显式选择文生图或图生图训练。
78+
- **音频与图像部署** —— `bl deploy audio create``bl deploy image create` 可将精调后的语音合成与图像模型部署为推理接入点。
79+
- **多模态数据集校验** —— `bl dataset upload``bl dataset validate` 现在支持使用 `tts``image` schema 的 `.zip` 压缩包,可校验包内引用的媒体文件,图像数据压缩包上限提升至 1 GB。
80+
81+
### 变更
82+
83+
- **精调与部署命令按模态拆分(BREAKING)**`bl finetune create``bl finetune text create``bl deploy create``bl deploy text create`。请更新使用旧路径的脚本。
84+
- **部署参数重命名(BREAKING)**:部署创建命令的 `--template-id` 更名为 `--deploy-spec`
85+
- **精调状态退出行为变更(BREAKING)**`bl finetune watch` 不再使用退出码 3 表示任务运行中;运行中与成功均返回 0,失败与取消使用 CLI 的常规错误流程。
86+
- `bl deploy audio create` 默认使用 `--plan mu`(按模型单元计费,符合 CosyVoice 部署契约);文本与图像仍默认 `lora`
87+
- `bl finetune audio create` 现在会校验 CosyVoice 训练数据:音频必须为 `.wav`,每条 `wav_fn` 必须以 `train/` 开头,且只接受一个训练文件。
88+
- `bl quota list``bl quota check` 现在会基于监控数据展示真实的 RPM/TPM 用量与限额,新增 `RPM Left` / `TPM Left` 列及剩余额度进度条。
89+
- `bl usage free` 的输出现在与 `bl usage summary` 共用渲染逻辑,免费额度表格更一致。
90+
- `bl advisor recommend` 不再依赖独立的意图识别模型来分析你的需求。
91+
92+
### 已移除
93+
94+
- **移除 `bl advisor recommend` 使用的 `tongyi-intent-detect-v3` 集成(BREAKING)**,同时移除 `intent_detect_base_url` 配置字段与 `DASHSCOPE_INTENT_DETECT_BASE_URL` 环境变量。
95+
96+
### 修复
97+
98+
- Skill 命令参考文档生成现在直接读取产品命令源码,并在发布检查中保持稳定格式。
99+
9100
## [1.7.0] - 2026-07-09
10101

11102
### 新增

CONTRIBUTING.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@ Developer guide for `bailian-cli` — the official CLI for Aliyun Model Studio (
66

77
## Prerequisites
88

9-
- Node.js ≥ 22.12
9+
- Node.js ≥ 22.12 (required for developing this repo)
10+
- End users installing the published CLI only need Node.js >= 18.17
1011
- pnpm 10.33.2 (`npm i -g pnpm@10.33.2`)
1112
- A DashScope API key for running e2e tests
1213

CONTRIBUTING.zh.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,9 @@
66

77
## 环境要求
88

9-
- Node.js ≥ 22.12
10-
- pnpm 10.33.2(`npm i -g pnpm@10.33.2`)
9+
- 参与本仓库开发:Node.js ≥ 22.12
10+
- 仅安装/使用已发布的 CLI:Node.js >= 18.17
11+
- pnpm 10.33.2(`npm i -g pnpm@10.33.2`
1112
- 跑 e2e 需要一个百炼 API Key
1213

1314
## 仓库结构

0 commit comments

Comments
 (0)