Skip to content

Commit 17b13de

Browse files
committed
merge: merged main to current branch
2 parents ca98d8a + cf2592c commit 17b13de

142 files changed

Lines changed: 11583 additions & 749 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.

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,3 +47,6 @@ packages/cli/scene/**/outputs/
4747

4848
# Environment variables (sensitive data)
4949
.env
50+
51+
# Local scratch / plan drafts (never commit)
52+
.scratch/

CHANGELOG.md

Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,89 @@ 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.13.1] - 2026-08-03
10+
11+
### Changed
12+
13+
- **Default text model upgraded to Qwen3.8-Max**`bl text chat`, pipelines, API key validation, the config UI, and Managed Agent init templates now default to `qwen3.8-max`; Token Plan also moves from the preview model to the stable release.
14+
15+
## [1.13.0] - 2026-07-30
16+
17+
### Added
18+
19+
- **`bl config ui` Skills / MCP / Agents / Assets inventory** — browse installed skills, MCP servers, coding agents, and generated assets in the local Web UI with click-to-open detail drawers:
20+
- Skills: render `SKILL.md` as Markdown (GFM tables supported), show local vs remote origin badges, and install a skill by uploading a `.zip` archive into any supported agent's skills root.
21+
- MCP: view and edit JSON configuration with secret masking and mask-preserving writes; create, update, and delete MCP entries across Claude Code, Qwen Code, OpenCode, Cursor, Windsurf, Gemini, Qoder Work, OpenClaw, and Claude Desktop.
22+
- Agents: quick-launch coding agents directly from the UI (gated on the CLI binary being on PATH).
23+
- Assets: categorized, time-sorted browser with preview, open-locally, and delete.
24+
- **Model catalog suggestion chips** — per-category model names surfaced as click-to-fill chips under each `default_*_model` field in the config UI.
25+
- **Profiles tile grid** — profiles displayed as a tile grid with an add-tile and a design-consistent new-profile modal.
26+
27+
### Changed
28+
29+
- Config UI layout: collapsible grouped sidebar with icons and persistent state, responsive breakpoint, wider main area, sticky view headers, and right-side drawers for editing.
30+
31+
### Fixed
32+
33+
- Symlinked skill directories are now correctly identified as an installed source.
34+
- Config file detection now supports environment-variable-based paths and legacy configuration schemes.
35+
36+
## [1.12.0] - 2026-07-28
37+
38+
### Added
39+
40+
- **`bl config agent --key` / `--region`** — run commands generated by the Model Studio web console as-is: `--key` accepts the console's encoded API key and decodes it locally (use instead of `--api-key`), and `--region` derives the Token Plan endpoint from a region name (use instead of `--base-url`).
41+
- **`bl config agent --context-window`** — set the context window written to the OpenClaw configuration (default 256000).
42+
- **`bl config agent --wire-api`** — choose the wire protocol written to the Codex configuration; `chat` is kept for legacy Codex 0.80.0 and earlier (a warning is shown).
43+
44+
### Changed
45+
46+
- `bl config agent` for Codex now writes `wire_api = "responses"` by default, matching current Codex releases that no longer accept `chat`.
47+
- `bl config agent` for Qwen Code now writes the `DASHSCOPE_API_KEY` environment variable instead of `BAILIAN_CLI_API_KEY`.
48+
49+
### Fixed
50+
51+
- `bl config agent` configurations now match each agent's official format: Claude Code honors `CLAUDE_CONFIG_DIR` and removes a stale `ANTHROPIC_API_KEY`; Qwen Code uses the v3 settings schema and writes credentials so a system-level `OPENAI_API_KEY` no longer takes precedence; OpenCode accepts JSONC config files (comments and trailing commas); OpenClaw registers the primary model in the model allowlist with complete cost metadata; Hermes uses the official flat `model.*` layout; Codex writes the official `env_key` with an `auth.json` fallback.
52+
- `bl config agent` now preserves existing user configuration when writing: it merges instead of overwriting, avoids duplicate provider entries, and keeps custom display names.
53+
54+
## [1.11.2] - 2026-07-28
55+
56+
### Changed
57+
58+
- MCP tools and WebSearch now provide activation guidance and direct marketplace links when Bailian reports that the corresponding service is not activated. WebSearch also guides users with legacy SSE connections to reactivate the service using Streamable HTTP.
59+
60+
### Fixed
61+
62+
- Fixed text chat and API Key validation compatibility failures caused by sending unsupported `enable_thinking` values. Text chat now sends the parameter only when thinking is explicitly enabled, while validation uses a compatible model without sending it.
63+
64+
## [1.11.1] - 2026-07-28
65+
66+
### Added
67+
68+
- `bl image edit` now supports `--function` for specifying edit operations with Wanx image-edit models such as `wanx2.1-imageedit`.
69+
70+
### Fixed
71+
72+
- Fixed image generation and editing failures and incorrect size parameters for some image models, improving compatibility with Qwen-Image, Wan/Wanx, Z-Image, and dated `wanx-v1` variants.
73+
74+
## [1.11.0] - 2026-07-28
75+
76+
### Added
77+
78+
- **`bl managed-agent`** — declaratively manage Managed Agent infrastructure through a unified CLI. The Bailian provider connects to AgentStudio, with Claude, Qoder, and Ark providers also supported:
79+
- `init` / `validate` / `plan` / `apply` / `destroy` — initialize and validate `agents.yaml`, preview and apply resource changes, and destroy managed resources.
80+
- `state list` / `state show` / `state rm` / `state import` — inspect and manage local resource state, including adopting an existing remote resource or removing it from local state without destroying it remotely.
81+
- `session create` / `session list` / `session get` / `session delete` / `session run` / `session send` / `session events` — manage the full session lifecycle with streaming responses and structured `--output json` output.
82+
- `skill-list` — browse custom and official skills; use `--source all` to return both catalogs in one call.
83+
84+
### Changed
85+
86+
- Model Base URLs are now normalized to the URL origin; paths, query parameters, and fragments supplied in the Base URL are no longer included when constructing API request paths.
87+
88+
### Fixed
89+
90+
- The installation guide no longer recommends the removed `--non-interactive` flag and now documents explicit required arguments, `--output json`, and `NO_COLOR=1` for non-interactive environments.
91+
992
## [1.10.1] - 2026-07-22
1093

1194
### Changed

CHANGELOG.zh.md

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

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

9+
## [1.13.1] - 2026-08-03
10+
11+
### 变更
12+
13+
- **默认文本模型升级至 Qwen3.8-Max**`bl text chat`、Pipeline、API Key 登录校验、配置 UI 和 Managed Agent 初始化模板现在默认使用 `qwen3.8-max`;Token Plan 也由预览版切换至正式版。
14+
15+
## [1.13.0] - 2026-07-30
16+
17+
### 新增
18+
19+
- **`bl config ui` 技能 / MCP / 代理 / 资产清单** — 在本地 Web UI 中浏览已安装的技能、MCP 服务器、编码代理和生成的资产,点击打开右侧详情抽屉:
20+
- 技能:将 `SKILL.md` 渲染为 Markdown(支持 GFM 表格),展示本地/远程来源徽章,支持上传 `.zip` 压缩包将技能安装到任意受支持代理的技能目录。
21+
- MCP:查看和编辑 JSON 配置,支持密钥掩码与掩码保真写回;支持在 Claude Code、Qwen Code、OpenCode、Cursor、Windsurf、Gemini、Qoder Work、OpenClaw 和 Claude Desktop 中创建、更新、删除 MCP 条目。
22+
- 代理:从 UI 一键启动编码代理(需对应 CLI 二进制在 PATH 中)。
23+
- 资产:按类别分组、按时间排序的浏览器,支持预览、本地打开和删除。
24+
- **模型目录建议芯片** — 在配置 UI 的每个 `default_*_model` 字段下方展示按类别分组的模型名称,点击即可填入。
25+
- **Profile 磁贴网格** — 配置文件以磁贴网格展示,新增添加磁贴和设计一致的新建 Profile 弹窗。
26+
27+
### 变更
28+
29+
- 配置 UI 布局:可折叠分组侧边栏(带图标和持久化状态)、响应式断点、更宽的主区域、吸顶视图标题、右侧抽屉式编辑。
30+
31+
### 修复
32+
33+
- 修复软链接技能目录未被正确识别为已安装来源的问题。
34+
- 配置文件检测现支持基于环境变量的路径和旧版配置方案。
35+
36+
## [1.12.0] - 2026-07-28
37+
38+
### 新增
39+
40+
- **`bl config agent --key` / `--region`** —— 百炼控制台生成的命令可直接运行:`--key` 接收控制台编码后的 API Key 并在本地解码(与 `--api-key` 二选一);`--region` 根据地域名自动派生 Token Plan 接入地址(与 `--base-url` 二选一)。
41+
- **`bl config agent --context-window`** —— 设置写入 OpenClaw 配置的上下文窗口大小(默认 256000)。
42+
- **`bl config agent --wire-api`** —— 选择写入 Codex 配置的通信协议;`chat` 仅保留给 Codex 0.80.0 及更早版本(会显示警告)。
43+
44+
### 变更
45+
46+
- `bl config agent` 配置 Codex 时默认写入 `wire_api = "responses"`,以适配已不再支持 `chat` 的新版 Codex。
47+
- `bl config agent` 配置 Qwen Code 时改用 `DASHSCOPE_API_KEY` 环境变量,不再使用 `BAILIAN_CLI_API_KEY`
48+
49+
### 修复
50+
51+
- `bl config agent` 写入的配置现已与各 Agent 官方格式对齐:Claude Code 尊重 `CLAUDE_CONFIG_DIR` 并清理残留的 `ANTHROPIC_API_KEY`;Qwen Code 采用 v3 配置 schema 并正确写入凭证,避免被系统级 `OPENAI_API_KEY` 干扰;OpenCode 支持带注释和尾部逗号的 JSONC 配置文件;OpenClaw 会将主模型注册进模型白名单并补齐计费元数据;Hermes 改用官方扁平 `model.*` 结构;Codex 写入官方 `env_key` 并支持 `auth.json` 兜底。
52+
- `bl config agent` 写入配置时现会保留用户已有配置:合并而非覆盖,避免重复添加 provider 条目,并保留用户自定义的显示名。
53+
54+
## [1.11.2] - 2026-07-28
55+
56+
### 变更
57+
58+
- MCP 工具或 WebSearch 因对应服务未开通而不可用时,CLI 现在会提供开通指引和市场直达链接;对于使用旧版 SSE 连接的 WebSearch,还会提示重新开通以切换至 Streamable HTTP。
59+
60+
### 修复
61+
62+
- 修复文本对话与 API Key 登录校验因传递不受支持的 `enable_thinking` 参数值而产生的兼容性错误。文本对话仅在用户明确开启思考模式时传递该参数,登录校验则改用兼容模型且不再传递该参数。
63+
64+
## [1.11.1] - 2026-07-28
65+
66+
### 新增
67+
68+
- `bl image edit` 新增 `--function` 参数,支持为万相图片编辑模型(如 `wanx2.1-imageedit`)指定编辑功能。
69+
70+
### 修复
71+
72+
- 修复部分图片模型在图片生成与编辑时的调用失败和尺寸参数错误,并完善 Qwen-Image、Wan/Wanx、Z-Image 系列及 `wanx-v1` 日期版本的兼容性。
73+
74+
## [1.11.0] - 2026-07-28
75+
76+
### 新增
77+
78+
- **`bl managed-agent`** —— 通过统一 CLI 声明式管理 Managed Agent 基础设施;百炼 Provider 对接 AgentStudio,并支持 Claude、Qoder 和 Ark:
79+
- `init` / `validate` / `plan` / `apply` / `destroy` —— 基于 `agents.yaml` 初始化、校验、预览和执行资源变更,以及销毁已托管资源。
80+
- `state list` / `state show` / `state rm` / `state import` —— 查看和管理本地资源状态,包括纳管已有远端资源或仅解除本地跟踪。
81+
- `session create` / `session list` / `session get` / `session delete` / `session run` / `session send` / `session events` —— 完整的会话生命周期操作,支持流式响应和结构化的 `--output json` 输出。
82+
- `skill-list` —— 浏览自定义与官方 Skill;使用 `--source all` 可一次返回两个来源。
83+
84+
### 变更
85+
86+
- 模型 Base URL 现在统一仅保留 URL Origin;传入的路径、查询参数和 Fragment 不再参与后续 API 请求路径拼接。
87+
88+
### 修复
89+
90+
- 安装指南不再推荐已移除的 `--non-interactive`,改为说明显式传入必填参数,并使用 `--output json``NO_COLOR=1` 适配非交互环境。
91+
992
## [1.10.1] - 2026-07-22
1093

1194
### 变更

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ _Built for AI Agents. Every command works as a structured tool call._
2424

2525
Equip your AI Agent out-of-the-box with these capabilities, composable across complex tasks:
2626

27-
- **Text chat** — Qwen3.7-max: major gains in agentic coding, frontend coding, and vibe coding
27+
- **Text chat** — Qwen3.8-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
3030
- **Video generation & editing** — happyhorse-1.1 series: text-/image-/reference-to-video and natural-language video editing (up to 9-image reference)

README.zh.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ _专为 AI Agent 打造,每个命令均可作为结构化工具调用。_
2424

2525
让您的 AI Agent 开箱即具备以下能力,并可在复杂任务中自动组合调用:
2626

27-
- **文本对话** — Qwen3.7-max:Agentic coding、前端编程、Vibe coding 等能力显著增强
27+
- **文本对话** — Qwen3.8-max:Agentic coding、前端编程、Vibe coding 等能力显著增强
2828
- **全模态对话** — 文本 + 图像 + 音频 + 视频全模态支持
2929
- **图像生成与编辑** — Qwen-Image 2.0:专业文字渲染、真实质感、强语义遵循、多图合成
3030
- **视频生成与编辑** — happyhorse-1.1 系列,支持文生 / 图生 / 参考生(最多 9 张图参考)/ 自然语言视频编辑

docs/agents/config-profile-change.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,9 @@
4646
- `config list` 标识所有 Profile 与当前激活项。
4747
- `config show``auth status` 只输出本次最终选择的 `config``config_file`,不重复携带激活状态。
4848
- `config ui` 从持久化元数据读取激活项,提供显式激活操作,并在删除激活项后刷新为 `default`
49-
- `config ui` 保存时只替换 UI 管理的字段;Profile 中未展示但仍属于 `ConfigFile` 的合法字段必须保留,不能因打开并保存 UI 而丢失。
49+
- `config ui` 展示并可编辑完整 `ConfigFile`(含 `console_*``telemetry`),保存时按类型(数字/布尔/枚举)归一化写回;`config set` 仍只暴露较窄的 `VALID_KEYS`。UI 未管理的顶层元数据(如 `active_config`)不进入 Profile block,仍由写盘逻辑单独保留。
50+
- `config ui` 只读展示本地 agent 生态:Skills 跨全部 agent skill 目录(`~/.agents/skills` 及各 agent 的 `skills/`,含软链接)按 id 聚合并标注安装来源;MCP、Agents 从各 agent 本地配置读取。
51+
- `config ui` 提供 Assets 资产管理:扫描 `output_dir`(默认 `~/bailian-output`)下的 `images/videos/speech/omni` 分类及根目录散落文件,按分类与生成时间(mtime)标记,支持按分类筛选、内联预览(图/视频/音频)与删除单个文件;文件读取与删除均通过限定在输出目录内的路径校验(防目录穿越)。
5052
- 同步 E2E topic routes、Skill setup 和自动生成 reference。
5153

5254
## 6. 最小测试矩阵
@@ -62,7 +64,8 @@
6264
`--config default` 成功后切回 `default`
6365
- Console token 自动刷新不从其他 Profile 借用 AK/SK,也不把新 token 写入其他 Profile。
6466
- `config list/show/use/ui``auth status` 和依赖默认模型的消费命令覆盖对应 E2E。
65-
- `config ui` 覆盖保存时保留未管理字段,并继续允许空值清除 UI 管理字段。
67+
- `config ui` 覆盖保存时保留顶层元数据(如 `active_config`),继续允许空值清除字段,并覆盖 `console_*`/`telemetry` 的类型归一化与枚举校验。
68+
- Assets:`listAssets` 覆盖分类归类、时间倒序、目录缺失返回空;`resolveAssetPath` 覆盖目录穿越拦截;`contentType` 覆盖常见扩展名映射。
6669

6770
## 7. 完成检查
6871

docs/agents/url-change.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ runtime/src/urls.ts ← 用户面控制台 URL(cn-only)
2020
BAILIAN_CONSOLE BAILIAN_CONSOLE_ROOT/cn-beijing
2121
API_KEY_PAGE BAILIAN_CONSOLE/?tab=app#/api-key
2222
TOKEN_PLAN_PAGE BAILIAN_CONSOLE_ROOT/cn-beijing?tab=plan#/efm/subscription/overview
23+
MCP_WEBSEARCH_PAGE mcpMarketplaceDetailPage("WebSearch")
24+
mcpMarketplaceDetailPage BAILIAN_CONSOLE?tab=mcp#/mcp-market/detail/<serverCode>
2325
2426
core/files/upload.ts ← 文件上传 endpoint(cn-pinned)
2527
UPLOAD_API ${REGIONS.cn}/api/v1/uploads

packages/cli/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ _Built for AI Agents. Every command works as a structured tool call._
2424

2525
Equip your AI Agent out-of-the-box with these capabilities, composable across complex tasks:
2626

27-
- **Text chat** — Qwen3.7-max: major gains in agentic coding, frontend coding, and vibe coding
27+
- **Text chat** — Qwen3.8-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
3030
- **Video generation & editing** — happyhorse-1.1 series: text-/image-/reference-to-video and natural-language video editing (up to 9-image reference)

packages/cli/README.zh.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ _专为 AI Agent 打造,每个命令均可作为结构化工具调用。_
2424

2525
让您的 AI Agent 开箱即具备以下能力,并可在复杂任务中自动组合调用:
2626

27-
- **文本对话** — Qwen3.7-max:Agentic coding、前端编程、Vibe coding 等能力显著增强
27+
- **文本对话** — Qwen3.8-max:Agentic coding、前端编程、Vibe coding 等能力显著增强
2828
- **全模态对话** — 文本 + 图像 + 音频 + 视频全模态支持
2929
- **图像生成与编辑** — Qwen-Image 2.0:专业文字渲染、真实质感、强语义遵循、多图合成
3030
- **视频生成与编辑** — happyhorse-1.1 系列,支持文生 / 图生 / 参考生(最多 9 张图参考)/ 自然语言视频编辑

packages/cli/package.json

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "bailian-cli",
3-
"version": "1.10.1",
3+
"version": "1.13.1",
44
"description": "CLI for Aliyun Model Studio (DashScope) AI Platform.",
55
"keywords": [
66
"agent",
@@ -25,7 +25,8 @@
2525
},
2626
"files": [
2727
"dist",
28-
"README.zh.md"
28+
"README.zh.md",
29+
"postinstall.js"
2930
],
3031
"type": "module",
3132
"exports": {
@@ -45,12 +46,14 @@
4546
"build": "vp pack",
4647
"dev": "tsx src/main.ts",
4748
"test": "vp test",
48-
"check": "vp check"
49+
"check": "vp check",
50+
"postinstall": "node postinstall.js"
4951
},
5052
"dependencies": {
5153
"bailian-cli-commands": "workspace:*",
5254
"bailian-cli-core": "workspace:*",
53-
"bailian-cli-runtime": "workspace:*"
55+
"bailian-cli-runtime": "workspace:*",
56+
"tar-stream": "catalog:"
5457
},
5558
"devDependencies": {
5659
"@clack/prompts": "^0.7.0",

0 commit comments

Comments
 (0)