Skip to content

Commit 3d56f00

Browse files
authored
Merge branch 'main' into feat/security-commands
2 parents 73cb20c + 2220f93 commit 3d56f00

62 files changed

Lines changed: 2665 additions & 123 deletions

Some content is hidden

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

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,13 @@ The format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and
1515
### Internal
1616

1717
- Add Agent security E2E coverage (help, missing-workspace usage error, dry-run host derivation and `--base-url` override, query-string filters, enum fast-fail) and generate the `bailian-cli` skill reference for the new `security` group.
18+
## [1.23.0] - 2026-09-10
19+
20+
### Added
21+
22+
- **Profile-level watermark control** — configure `watermark` with `bl config set --key watermark --value true|false` to control the default watermark behavior for image generation and editing, video generation and editing, and reference-to-video commands.
23+
- **ASR accuracy controls**`bl speech recognize` now supports instant hot words with `--vocabulary`, contextual word enhancement with `--context`, and reusable pre-built vocabularies with `--vocabulary-id` for supported ASR models.
24+
- **Speech vocabulary management** — added `bl speech vocabulary create|list|get|update|delete` to manage reusable pre-built hot-word vocabularies.
1825

1926
## [1.22.0] - 2026-09-08
2027

CHANGELOG.zh.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,13 @@
1515
### 内部
1616

1717
- 补充 Agent 安全 E2E 覆盖(help、缺 workspace 的 usage 错误、dry-run 域名推导与 `--base-url` 覆盖、query string 筛选、枚举快失败),并为新的 `security` 组生成 `bailian-cli` 技能 reference。
18+
## [1.23.0] - 2026-09-10
19+
20+
### 新增
21+
22+
- **Profile 级水印控制** —— 可通过 `bl config set --key watermark --value true|false` 设置图片生成与编辑、视频生成与编辑以及参考生视频命令的默认水印行为。
23+
- **ASR 准确率增强** —— `bl speech recognize` 现支持通过 `--vocabulary` 传入即时热词、通过 `--context` 增强上下文词表,以及通过 `--vocabulary-id` 使用适用于对应 ASR 模型的预编译热词表。
24+
- **语音热词表管理** —— 新增 `bl speech vocabulary create|list|get|update|delete`,用于管理可复用的预编译热词表。
1825

1926
## [1.22.0] - 2026-09-08
2027

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,7 @@ Once installed, just describe your task to your AI Agent — no need to assemble
115115
| ------------------------ | --------------------------------------------------------------------------------- |
116116
| Managed Agent | "Create a Managed Agent that can generate short-film storyboards and videos." |
117117
| Image & video generation | "Generate an image of a cat in a spacesuit on Mars, then turn it into a video." |
118+
| Speech recognition | "Transcribe this audio; if proper nouns are wrong, add hot words and try again." |
118119
| Usage & quota | "Show my recent model usage, free-tier quota, and rate limits." |
119120
| Model selection | "Recommend a model for image understanding and customer support." |
120121
| About Bailian CLI | "Tell me what Bailian CLI can do for me, and suggest how to use it for my needs." |

README.zh.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,7 @@ irm https://bailian.aliyun.com/cli/install.ps1 | iex
114114
| ---------------- | ----------------------------------------------------------------------- |
115115
| Managed Agent | “帮我创建一个能够生成短片分镜和视频的 Managed Agent。” |
116116
| 图片和视频生成 | “生成一张穿着太空服的猫站在火星上的图片,再把它制作成一段视频。” |
117+
| 语音识别 | “把这段音频转写成文字,专有名词识别不准的话帮我加上热词再试。” |
117118
| 用量与额度 | “查看最近的模型用量、免费额度和限流情况。” |
118119
| 模型选型 | “推荐一个适合图片理解和智能客服的模型。” |
119120
| 了解 Bailian CLI | “介绍一下 Bailian CLI 能帮我完成哪些任务,并根据我的需求推荐使用方式。” |

packages/cli/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,7 @@ Once installed, just describe your task to your AI Agent — no need to assemble
115115
| ------------------------ | --------------------------------------------------------------------------------- |
116116
| Managed Agent | "Create a Managed Agent that can generate short-film storyboards and videos." |
117117
| Image & video generation | "Generate an image of a cat in a spacesuit on Mars, then turn it into a video." |
118+
| Speech recognition | "Transcribe this audio; if proper nouns are wrong, add hot words and try again." |
118119
| Usage & quota | "Show my recent model usage, free-tier quota, and rate limits." |
119120
| Model selection | "Recommend a model for image understanding and customer support." |
120121
| About Bailian CLI | "Tell me what Bailian CLI can do for me, and suggest how to use it for my needs." |

packages/cli/README.zh.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,7 @@ irm https://bailian.aliyun.com/cli/install.ps1 | iex
114114
| ---------------- | ----------------------------------------------------------------------- |
115115
| Managed Agent | “帮我创建一个能够生成短片分镜和视频的 Managed Agent。” |
116116
| 图片和视频生成 | “生成一张穿着太空服的猫站在火星上的图片,再把它制作成一段视频。” |
117+
| 语音识别 | “把这段音频转写成文字,专有名词识别不准的话帮我加上热词再试。” |
117118
| 用量与额度 | “查看最近的模型用量、免费额度和限流情况。” |
118119
| 模型选型 | “推荐一个适合图片理解和智能客服的模型。” |
119120
| 了解 Bailian CLI | “介绍一下 Bailian CLI 能帮我完成哪些任务,并根据我的需求推荐使用方式。” |

packages/cli/src/commands.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,11 @@ import {
7070
searchWeb,
7171
speechSynthesize,
7272
speechRecognize,
73+
speechVocabularyCreate,
74+
speechVocabularyList,
75+
speechVocabularyGet,
76+
speechVocabularyUpdate,
77+
speechVocabularyDelete,
7378
fileUpload,
7479
consoleCall,
7580
securityOverview,
@@ -288,6 +293,11 @@ export const commands: Record<string, AnyCommand> = {
288293
"search web": searchWeb,
289294
"speech synthesize": speechSynthesize,
290295
"speech recognize": speechRecognize,
296+
"speech vocabulary create": speechVocabularyCreate,
297+
"speech vocabulary list": speechVocabularyList,
298+
"speech vocabulary get": speechVocabularyGet,
299+
"speech vocabulary update": speechVocabularyUpdate,
300+
"speech vocabulary delete": speechVocabularyDelete,
291301
"file upload": fileUpload,
292302
"console call": consoleCall,
293303
"security overview": securityOverview,

packages/commands/src/commands/config/set.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@ export default defineCommand({
1212
valueHint: "<key>",
1313
description: {
1414
"en-US":
15-
"Config key (language, base_url, output, output_dir, timeout, api_key, api_key_capabilities, access_token, access_key_id, access_key_secret, security_token, default_*_model, workspace_id)",
15+
"Config key (language, base_url, output, output_dir, timeout, watermark, api_key, api_key_capabilities, access_token, access_key_id, access_key_secret, security_token, default_*_model, workspace_id)",
1616
"zh-CN":
17-
"配置项名称(language、base_url、output、output_dir、timeout、api_key、api_key_capabilities、access_token、access_key_id、access_key_secret、security_token、default_*_model、workspace_id)",
17+
"配置项名称(language、base_url、output、output_dir、timeout、watermark、api_key、api_key_capabilities、access_token、access_key_id、access_key_secret、security_token、default_*_model、workspace_id)",
1818
},
1919
required: true,
2020
},
@@ -29,6 +29,7 @@ export default defineCommand({
2929
"--key language --value zh-CN",
3030
"--key output --value json",
3131
"--key timeout --value 600",
32+
"--key watermark --value false",
3233
"--key base_url --value https://dashscope.aliyuncs.com",
3334
"--config company-plan --key api-key-capabilities --value text.chat,image.generate",
3435
],

packages/commands/src/commands/config/shared.ts

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import {
33
ExitCode,
44
isApiKeyCapability,
55
normalizeModelBaseUrl,
6+
parseBooleanValue,
67
SUPPORTED_LANGUAGES,
78
} from "bailian-cli-core";
89

@@ -13,6 +14,7 @@ export const VALID_KEYS = [
1314
"output",
1415
"output_dir",
1516
"timeout",
17+
"watermark",
1618
"api_key",
1719
"access_token",
1820
"access_key_id",
@@ -62,7 +64,7 @@ export const UI_ENUM_KEYS: Record<string, string[]> = {
6264
};
6365

6466
// Keys the UI renders as a true/false dropdown and stores as a boolean.
65-
export const UI_BOOLEAN_KEYS = new Set<string>(["telemetry"]);
67+
export const UI_BOOLEAN_KEYS = new Set<string>(["telemetry", "watermark"]);
6668

6769
// Default model each `default_*_model` key falls back to when left unset. These
6870
// mirror the inline `|| "<model>"` fallbacks in the generation commands
@@ -164,7 +166,10 @@ export function resolveKey(key: string): string {
164166
* Validate a single config entry and coerce its value to the stored type.
165167
* Throws BailianError(USAGE) for unknown keys or invalid values.
166168
*/
167-
export function validateAndCoerce(key: string, value: string): string | number | string[] {
169+
export function validateAndCoerce(
170+
key: string,
171+
value: string,
172+
): string | number | boolean | string[] {
168173
const resolvedKey = resolveKey(key);
169174

170175
if (!(VALID_KEYS as readonly string[]).includes(resolvedKey)) {
@@ -201,6 +206,8 @@ export function validateAndCoerce(key: string, value: string): string | number |
201206

202207
if (resolvedKey === "base_url") return normalizeModelBaseUrl(value);
203208

209+
if (resolvedKey === "watermark") return parseBooleanValue(value, "watermark");
210+
204211
if (resolvedKey === "api_key_capabilities") {
205212
let rawCapabilities: unknown;
206213
if (value.trim().startsWith("[")) {

packages/commands/src/commands/config/show.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ export default defineCommand({
1818
base_url: client.baseUrl,
1919
output: settings.output,
2020
timeout: settings.timeout,
21+
watermark: settings.watermark,
2122
config: settings.configName ?? "default",
2223
config_file: store.path,
2324
};

0 commit comments

Comments
 (0)