Skip to content

Commit d4c0809

Browse files
committed
feat: resolve conflict
2 parents a5d078b + 14583cf commit d4c0809

31 files changed

Lines changed: 242 additions & 180 deletions

File tree

AGENTS.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -98,9 +98,9 @@ CLI 只为「自己能权威解释的错误」发出语义化信号,服务端的
9898
如果新命令使用了 `callConsoleGateway`,必须在 `options` 中添加以下三个全局 flag 的说明,以便 `--help` 中展示:
9999

100100
```ts
101-
{ flag: "--console-region <region>", description: "Console region (global flag)" },
102-
{ flag: "--console-site <site>", description: "Console site: domestic, international (global flag)" },
103-
{ flag: "--console-switch-agent <uid>", description: "Switch agent UID (global flag)", type: "number" },
101+
{ flag: "--console-region <region>", description: "Console region" },
102+
{ flag: "--console-site <site>", description: "Console site: domestic, international" },
103+
{ flag: "--console-switch-agent <uid>", description: "Switch agent UID", type: "number" },
104104
```
105105

106106
这些 flag 已在 `GLOBAL_OPTIONS``packages/core/src/types/command.ts`)中注册,由 `loadConfig` 写入 `config.consoleRegion` / `config.consoleSite` / `config.consoleSwitchAgent``callConsoleGateway` 自动读取——命令无需手动提取或传递。

CHANGELOG.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,15 @@ 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-
## [Unreleased]
9+
## [1.3.3] - 2026-06-16
1010

11-
### Removed
11+
### Changed
12+
13+
- `bl knowledge retrieve --help` now clearly indicates that `--api-key` is the recommended authentication method; AK/SK flags are explicitly marked as deprecated with guidance to use `--api-key` instead.
14+
15+
### Added
1216

13-
- Global `--region`, environment variable `DASHSCOPE_REGION`, and `bl config set --key region`. DashScope API endpoint is selected only via `--base-url`, `DASHSCOPE_BASE_URL`, or `base_url` in `config.json` (defaults to the China mainland URL). Existing `region` entries in `config.json` are ignored; set `base_url` explicitly if you relied on `us` / `intl`.
17+
- `notes` field for command definitions — commands can now include contextual notes (auth requirements, deprecation notices, etc.) that are displayed in both `--help` output and the generated reference docs.
1418

1519
## [1.3.2] - 2026-06-12
1620

CHANGELOG.zh.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,15 @@
66

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

9-
## [未发布]
9+
## [1.3.3] - 2026-06-16
1010

11-
### 移除
11+
### 变更
12+
13+
- `bl knowledge retrieve --help` 现在明确指出 `--api-key` 是推荐的鉴权方式;AK/SK 相关选项已标注废弃并引导用户使用 `--api-key`
14+
15+
### 新增
1216

13-
- 全局 `--region`、环境变量 `DASHSCOPE_REGION` 以及 `bl config set --key region`。DashScope API 地址仅通过 `--base-url``DASHSCOPE_BASE_URL``config.json` 中的 `base_url` 指定(默认中国大陆)。`config.json` 中的 `region` 字段不再读取;若曾依赖 `us` / `intl`,请改为设置对应的 `base_url`
17+
- 命令定义新增 `notes` 字段 — 命令可以附带上下文说明(鉴权要求、废弃提示等),同时展示在 `--help` 输出和生成的命令手册中
1418

1519
## [1.3.2] - 2026-06-12
1620

docs/agents/publish.md

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,12 @@ node tools/release/publish-channel.mjs --channel test --dry-run
6767
- [ ] `packages/cli/package.json``packages/core/package.json` 已升到目标版本
6868
- [ ] pre-release 格式正确(`1.0.0-beta.0` / `1.0.0-rc.1`**不要直接用 `1.0.0` 当 beta**
6969

70+
### CHANGELOG(仅 stable)
71+
72+
- [ ] `CHANGELOG.md``CHANGELOG.zh.md` 都已新增目标版本条目,中英文一一对应
73+
- [ ] 分类标题用 Keep a Changelog 规范的 `Added` / `Changed` / `Deprecated` / `Removed` / `Fixed` / `Security`(中文版对应 `新增` / `变更` / `已弃用` / `已移除` / `修复` / `安全`),**不要自创 `Improved` / `优化` 等规范外分类**
74+
- [ ] 条目日期与发版日期一致
75+
7076
### 用户面文档
7177

7278
- [ ] `README.md` / `README.zh.md` 的 Quick Start 命令仍能跑通
@@ -81,11 +87,12 @@ node tools/release/publish-channel.mjs --channel test --dry-run
8187

8288
## 常见漏点(基于历史踩坑)
8389

84-
| 漏点 | 后果 |
85-
| ----------------------------------------------------- | -------------------------------------------------- |
86-
| cli 升版号但 core 没升 | check.mjs 会拦下 |
87-
| `1.0.0` 当 beta 直接发 | 占了 `latest` tag,所有用户被强升,撤回成本极高 |
88-
| README 写的 bin 名实际 `package.json.bin` 没注册 | 用户复制命令报 `command not found` |
89-
| Node 徽章 `>=18`、engines `>=22.12` 不一致 | 用户在 Node 18 上 `npm i` 被 engine 警告或直接失败 |
90-
| npm Trusted Publisher 的 workflow filename 改了没同步 | OIDC 匹配不上,publish 报 404 |
91-
| CI 用 Node 22(npm 10)跑 publish | npm 10 不支持 OIDC token 交换,publish 报 404 |
90+
| 漏点 | 后果 |
91+
| -------------------------------------------------------- | -------------------------------------------------- |
92+
| cli 升版号但 core 没升 | check.mjs 会拦下 |
93+
| 发版漏更 CHANGELOG,或分类写成规范外的 `优化`/`Improved` | 用户看不到本次变更,分类与历史不一致 |
94+
| `1.0.0` 当 beta 直接发 | 占了 `latest` tag,所有用户被强升,撤回成本极高 |
95+
| README 写的 bin 名实际 `package.json.bin` 没注册 | 用户复制命令报 `command not found` |
96+
| Node 徽章 `>=18`、engines `>=22.12` 不一致 | 用户在 Node 18 上 `npm i` 被 engine 警告或直接失败 |
97+
| npm Trusted Publisher 的 workflow filename 改了没同步 | OIDC 匹配不上,publish 报 404 |
98+
| CI 用 Node 22(npm 10)跑 publish | npm 10 不支持 OIDC token 交换,publish 报 404 |

packages/cli/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "bailian-cli",
3-
"version": "1.3.2",
3+
"version": "1.3.3",
44
"description": "CLI for Aliyun Model Studio (DashScope) AI Platform.",
55
"keywords": [
66
"agent",

packages/cli/src/commands/app/list.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,14 +29,14 @@ export default defineCommand({
2929
description: "Results per page (default: 30)",
3030
type: "number",
3131
},
32-
{ flag: "--console-region <region>", description: "Console region (global flag)" },
32+
{ flag: "--console-region <region>", description: "Console region" },
3333
{
3434
flag: "--console-site <site>",
35-
description: "Console site: domestic, international (global flag)",
35+
description: "Console site: domestic, international",
3636
},
3737
{
3838
flag: "--console-switch-agent <uid>",
39-
description: "Switch agent UID (global flag)",
39+
description: "Switch agent UID",
4040
type: "number",
4141
},
4242
],

packages/cli/src/commands/auth/status.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -143,14 +143,14 @@ export default defineCommand({
143143
description: "Show current authentication state",
144144
usage: "bl auth status",
145145
options: [
146-
{ flag: "--console-region <region>", description: "Console region (global flag)" },
146+
{ flag: "--console-region <region>", description: "Console region" },
147147
{
148148
flag: "--console-site <site>",
149-
description: "Console site: domestic, international (global flag)",
149+
description: "Console site: domestic, international",
150150
},
151151
{
152152
flag: "--console-switch-agent <uid>",
153-
description: "Switch agent UID (global flag)",
153+
description: "Switch agent UID",
154154
type: "number",
155155
},
156156
],

packages/cli/src/commands/console/call.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,14 +27,14 @@ export default defineCommand({
2727
description: "Request data as JSON string",
2828
required: true,
2929
},
30-
{ flag: "--console-region <region>", description: "Console region (global flag)" },
30+
{ flag: "--console-region <region>", description: "Console region" },
3131
{
3232
flag: "--console-site <site>",
33-
description: "Console site: domestic, international (global flag)",
33+
description: "Console site: domestic, international",
3434
},
3535
{
3636
flag: "--console-switch-agent <uid>",
37-
description: "Switch agent UID (global flag)",
37+
description: "Switch agent UID",
3838
type: "number",
3939
},
4040
],

packages/cli/src/commands/knowledge/retrieve.ts

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -60,17 +60,24 @@ export default defineCommand({
6060
},
6161
{
6262
flag: "--workspace-id <id>",
63-
description: "Bailian workspace ID (required for AK/SK auth)",
63+
description: "Bailian workspace ID (only needed for deprecated AK/SK auth)",
64+
},
65+
{
66+
flag: "--access-key-id <key>",
67+
description: "Deprecated: use global --api-key instead",
6468
},
65-
{ flag: "--access-key-id <key>", description: "Alibaba Cloud Access Key ID (deprecated)" },
6669
{
6770
flag: "--access-key-secret <key>",
68-
description: "Alibaba Cloud Access Key Secret (deprecated)",
71+
description: "Deprecated: use global --api-key instead",
6972
},
7073
],
74+
notes: [
75+
"Authentication: pass `--api-key <key>`. AK/SK auth is deprecated and will be removed in a future version.",
76+
"`--workspace-id` is NOT required when using --api-key.",
77+
],
7178
examples: [
7279
'bl knowledge retrieve --index-id idx_xxx --query "如何使用阿里云百炼"',
73-
'bl knowledge retrieve --index-id idx_xxx --query "API限流" --rerank --rerank-model qwen3-rerank-hybrid',
80+
'bl knowledge retrieve --api-key $DASHSCOPE_API_KEY --index-id idx_xxx --query "RAG检索" --rerank --rerank-model qwen3-rerank-hybrid',
7481
],
7582
async run(config: Config, flags: GlobalFlags) {
7683
const indexId = flags.indexId as string;

packages/cli/src/commands/mcp/list.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,14 +36,14 @@ export default defineCommand({
3636
},
3737
{ flag: "--page <n>", description: "Page number (default: 1)", type: "number" },
3838
{ flag: "--page-size <n>", description: "Results per page (default: 30)", type: "number" },
39-
{ flag: "--console-region <region>", description: "Console region (global flag)" },
39+
{ flag: "--console-region <region>", description: "Console region" },
4040
{
4141
flag: "--console-site <site>",
42-
description: "Console site: domestic, international (global flag)",
42+
description: "Console site: domestic, international",
4343
},
4444
{
4545
flag: "--console-switch-agent <uid>",
46-
description: "Switch agent UID (global flag)",
46+
description: "Switch agent UID",
4747
type: "number",
4848
},
4949
],

0 commit comments

Comments
 (0)