Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,19 @@ The format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and

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

## [2.8.6] - 2026-11-12

### Added

- **Console dataset queries**: Add `bl dataset groups` with pagination and name filtering, and `bl dataset version` to list versions by `--dataset-group-id` or query one version by `--dataset-id`, with optional `--include-status`.
- **Console file URLs**: Add `bl file url --file-key` to resolve a Console file key to a download URL without downloading the file.
- **Console deployment queries**: Add `bl deploy instances` with pagination, keyword and model-service-ID filters. Existing API-key `dataset list/get` and `deploy list` commands remain unchanged.

### Fixed

- **Console response handling**: Correctly parse nested success and failure responses, preserve service error messages, codes and request IDs, and avoid treating valid workspace lists as empty.
- **Workspace validation**: Reject an explicitly blank `--workspace-id` instead of silently falling back to another configured workspace.

## [2.8.5] - 2026-11-10

### Fixed
Expand Down
13 changes: 13 additions & 0 deletions CHANGELOG.zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,19 @@

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

## [2.8.6] - 2026-11-12

### 新增

- **Console 数据集查询**:新增 `bl dataset groups`,支持分页和名称筛选;新增 `bl dataset version`,通过 `--dataset-group-id` 列出组内版本,或通过 `--dataset-id` 查询单版本详情,可选 `--include-status` 补充状态。
- **Console 文件地址解析**:新增 `bl file url --file-key`,将 Console 文件键解析为下载 URL,不自动下载文件。
- **Console 部署查询**:新增 `bl deploy instances`,支持分页、关键词和模型服务 ID 筛选。原有 API Key 域的 `dataset list/get` 与 `deploy list` 保持不变。

### 修复

- **Console 响应处理**:正确解析嵌套成功与失败响应,保留服务端错误消息、错误码及请求 ID,避免将有效工作空间列表误判为空。
- **工作空间参数校验**:拒绝显式传入空白 `--workspace-id`,避免静默回退到其他已配置工作空间。

## [2.8.5] - 2026-11-10

### 修复
Expand Down
14 changes: 14 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,20 @@ Knowledge bases accrue running-time charges from creation, even without queries.

Keep the returned IDs and recovery record. Closing the CLI or a later failure does not stop billing; follow the reported cleanup actions to delete unused knowledge bases. See the [Knowledge Studio quick start](packages/kscli/README.md#quick-start) for retrieval and cleanup. The `bailian-knowledge` Skill is available through `bl skill init`.

### Console dataset and deployment queries

```bash
bl dataset groups --page 1 --page-size 10 --output json
bl dataset version --dataset-group-id <group-id> --output json
bl dataset version --dataset-id <version-id> --include-status --output json
bl file url --file-key <console-file-key> --output json
bl deploy instances --page 1 --page-size 10 --output json
```

Use `dataset groups` (`--name` optionally filters on the server) to obtain `records[].datasetGroupId`, then `dataset version --dataset-group-id <group-id>` to get `{result:[...]}` with `result[].datasetId` and its optional `fileId`. Use `dataset version --dataset-id <version-id>` for details; `--include-status` is available only in detail mode. Exactly one of `--dataset-group-id` and `--dataset-id` is required; they cannot be combined. `fileId` is not `datasetId` and must not be passed as a version ID. Groups fetch one page with one embedded version preview per group; `version --dataset-group-id` does not promise exhaustive results or expose pagination. The API Key / `file_id` semantics of `dataset list` are unchanged.

These read-only commands use Console authentication. An optional `--workspace-id` resolves the workspace's Console identity before querying; resolution failure stops the request. `dataset version --dataset-id` keeps metadata and version/task state separate and does not infer validation success or training readiness. `file url` only resolves a download address. `deploy instances` returns one page of independent services (`records` is the list, `items` the total), not capacity instances. The API-key `dataset get --file-id` and `deploy list` commands are unchanged. Add `--dry-run` to preview without business requests; framework update checks/telemetry follow their settings.

### RAG audio and video

`bl knowledge doc import --index-id <id> --doc-id <fileId>` imports an existing file into a knowledge base; `doc list --details` shows per-file processing settings. Media support includes parser options, streaming uploads, and media references in search/chunk output. Chat JSON separates the final answer from phases, tools, docs, usage, and raw events; quiet mode hides progress and informational messages while preserving the final result, including every JSON field. See the [command guide](docs/knowledge/knowledge-cli-guide.md).
Expand Down
14 changes: 14 additions & 0 deletions README.zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,20 @@ bl knowledge init --workspace-id <workspace-id> --dry-run

保留返回的 ID 和恢复记录。退出 CLI 或后续步骤失败不会停止计费;按返回的清理动作删除不再需要的知识库。检索及清理示例见 [Knowledge Studio 快速开始](packages/kscli/README.zh.md#快速开始)。知识库 Skill `bailian-knowledge` 通过 `bl skill init` 安装。

### Console 数据集与部署查询

```bash
bl dataset groups --page 1 --page-size 10 --output json
bl dataset version --dataset-group-id <组ID> --output json
bl dataset version --dataset-id <版本ID> --include-status --output json
bl file url --file-key <Console文件键> --output json
bl deploy instances --page 1 --page-size 10 --output json
```

先用 `dataset groups`(可加 `--name` 服务端筛选)获取 `records[].datasetGroupId`,再用 `dataset version --dataset-group-id <组ID>` 获取 `{result:[...]}`,其中包含 `result[].datasetId` 及可能返回的 `fileId`。查询详情用 `dataset version --dataset-id <版本ID>`,`--include-status` 仅详情模式可用。`--dataset-group-id` 与 `--dataset-id` 必选一个且不能同传。`fileId` 不是 `datasetId`,不能作为版本 ID 传入。组列表仅取一页,每组附带一条版本预览;`version --dataset-group-id` 不承诺返回全部版本,也不提供分页选项。原有 `dataset list` 的 API Key / `file_id` 语义保持不变。

以上只读命令使用 Console 鉴权。可选 `--workspace-id` 会在查询前解析对应空间的 Console 身份,解析失败即停止。`dataset version --dataset-id` 分开保留元信息与版本/任务状态,不推导校验成功或训练就绪;`file url` 仅解析下载地址;`deploy instances` 返回独立部署服务的单页数据(`records` 为列表、`items` 为总数),不是容量实例。原有 API Key 域的 `dataset get --file-id` 与 `deploy list` 保持不变。添加 `--dry-run` 可预览且不发送业务请求;框架更新检查和埋点遵循其配置。

### RAG 音视频接入

`bl knowledge doc import --index-id <id> --doc-id <fileId>` 将历史文件导入已有库;`doc list --details` 查看文件级处理参数。支持音视频 parser、流式上传,以及检索/切片中的媒体来源展示。问答 JSON 将最终 answer 与 phases/tools/docs/usage/events 分开保存,quiet 只隐藏进度和过程提示,保留最终结果及完整 JSON 字段。参阅 [命令指南](docs/knowledge/knowledge-cli-guide.md)。
Expand Down
2 changes: 1 addition & 1 deletion packages/bailian-kb-dsh/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "bailian-kb-dsh",
"version": "2.8.5",
"version": "2.8.6",
"description": "Bailian knowledge-base tools for DeepSeek Harness: kb_search and kb_chat over the DashScope RAG API, plus the bl CLI management skill.",
"keywords": [
"alibaba-cloud",
Expand Down
2 changes: 1 addition & 1 deletion packages/bailian-memo-dsh/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "bailian-memo-dsh",
"version": "2.8.5",
"version": "2.8.6",
"description": "Bailian personal memory for DeepSeek Harness: automatic recall, silent curation, and user-controlled remember/forget.",
"keywords": [
"alibaba-cloud",
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "bailian-cli",
"version": "2.8.5",
"version": "2.8.6",
"description": "CLI for Aliyun Model Studio (DashScope) AI Platform.",
"keywords": [
"agent",
Expand Down
8 changes: 8 additions & 0 deletions packages/cli/src/commands.ts
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ import {
speechVocabularyUpdate,
speechVocabularyDelete,
fileUpload,
fileUrl,
consoleCall,
securityOverview,
securityAlerts,
Expand Down Expand Up @@ -163,6 +164,8 @@ import {
datasetUpload,
datasetList,
datasetGet,
datasetVersion,
datasetGroups,
datasetDelete,
datasetValidate,
finetuneTextCreate,
Expand Down Expand Up @@ -193,6 +196,7 @@ import {
deployAudioCreate,
deployImageCreate,
deployList,
deployInstances,
deployGet,
deployCapacityList,
deployCapacityGet,
Expand Down Expand Up @@ -439,6 +443,7 @@ export const commands: Record<string, AnyCommand> = {
"speech vocabulary update": speechVocabularyUpdate,
"speech vocabulary delete": speechVocabularyDelete,
"file upload": fileUpload,
"file url": fileUrl,
"console call": consoleCall,
"agents security overview": securityOverview,
"agents security alerts": securityAlerts,
Expand Down Expand Up @@ -505,6 +510,8 @@ export const commands: Record<string, AnyCommand> = {
"dataset upload": datasetUpload,
"dataset list": datasetList,
"dataset get": datasetGet,
"dataset version": datasetVersion,
"dataset groups": datasetGroups,
"dataset delete": datasetDelete,
"dataset validate": datasetValidate,
"finetune text create": finetuneTextCreate,
Expand Down Expand Up @@ -535,6 +542,7 @@ export const commands: Record<string, AnyCommand> = {
"deploy audio create": deployAudioCreate,
"deploy image create": deployImageCreate,
"deploy list": deployList,
"deploy instances": deployInstances,
"deploy get": deployGet,
"deploy capacity list": deployCapacityList,
"deploy capacity get": deployCapacityGet,
Expand Down
2 changes: 1 addition & 1 deletion packages/commands/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "bailian-cli-commands",
"version": "2.8.5",
"version": "2.8.6",
"description": "Command library for bailian-cli products (knowledge, memory, media, …). See https://www.npmjs.com/package/bailian-cli for usage.",
"homepage": "https://bailian.console.aliyun.com/cli",
"bugs": {
Expand Down
111 changes: 111 additions & 0 deletions packages/commands/src/commands/dataset/groups.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,111 @@
import {
CONSOLE_DATASET_GROUPS_API,
buildConsoleDatasetGroupsRequest,
listConsoleDatasetGroups,
} from "bailian-cli-core";
import { defineConsoleReadCommand, consoleReadTargetPreview } from "../shared/console-read.ts";

export default defineConsoleReadCommand({
auth: "console",
description: {
"en-US": "List Console dataset groups",
"zh-CN": "查询 Console 数据集组列表",
},
usageArgs: "[--page <n>] [--page-size <n>] [--name <name>]",
flags: {
page: {
type: "number",
valueHint: "<n>",
description: {
"en-US": "Page number, a positive safe integer (default: 1)",
"zh-CN": "页码,正安全整数(默认:1)",
},
},
pageSize: {
type: "number",
valueHint: "<n>",
description: {
"en-US": "Groups per page, a positive safe integer (default: 10)",
"zh-CN": "每页组数,正安全整数(默认:10)",
},
},
name: {
type: "string",
valueHint: "<name>",
description: {
"en-US": "Nonblank dataset group name for server-side filtering; trimmed before sending",
"zh-CN": "用于服务端筛选的非空白数据集组名称,去除首尾空白后传递",
},
},
},
exampleArgs: ["", "--page 2 --page-size 20", "--name example-dataset --dry-run"],
notes: [
{
"en-US":
"Fetches only the requested page. records contains dataset groups; items is the server's total count for the query. All business-response fields are preserved. The API Key / file_id semantics of dataset list are unchanged.",
"zh-CN":
"仅获取请求的当前页。records 为数据集组列表,items 为服务端返回的查询总数。保留所有业务响应字段,不改变 dataset list 的 API Key / file_id 语义。",
},
{
"en-US":
"Each group's datasets is only a one-version preview, not its complete version list. Pass datasetGroupId to dataset version --dataset-group-id for {result:[...]} (no completeness guarantee or pagination); use dataset version --dataset-id with a version's datasetId for details (--include-status is detail-only). Exactly one ID flag is required; they cannot be combined. fileId is not datasetId.",
"zh-CN":
"各组的 datasets 仅是一条版本预览,不是完整版本列表。将 datasetGroupId 传给 dataset version --dataset-group-id,返回 {result:[...]}(不保证全量,无分页);查询详情用 dataset version --dataset-id,传入版本的 datasetId,仅此模式可加 --include-status。两个 ID 参数必选一个且不能同传。fileId 不是 datasetId。",
},
{
"en-US":
"--name is trimmed and sent to the server without local filtering. No type filter is hardcoded, but server-side scope and defaults still affect results; this is not an account-wide exhaustive listing. There is no --all option.",
"zh-CN":
"--name 去除首尾空白后交由服务端筛选,不做本地筛选。不硬编码类型过滤,但服务端作用域与默认条件仍影响结果,不代表整个账号的全量列表。不提供 --all 选项。",
},
{
"en-US":
"The preview requests one import task per version, without guaranteeing the latest task or all tasks. Status codes are preserved as returned; no release, validation, or training readiness is inferred.",
"zh-CN":
"预览为每个版本请求一条导入任务,不保证是最新任务或涵盖全部任务。保留返回的状态原码,不据此判断发布、校验或训练就绪。",
},
],
validate(flags) {
if (flags.page !== undefined && (!Number.isSafeInteger(flags.page) || flags.page < 1)) {
return {
"en-US": "--page must be a positive safe integer.",
"zh-CN": "--page 必须为正安全整数。",
};
}
if (
flags.pageSize !== undefined &&
(!Number.isSafeInteger(flags.pageSize) || flags.pageSize < 1)
) {
return {
"en-US": "--page-size must be a positive safe integer.",
"zh-CN": "--page-size 必须为正安全整数。",
};
}
if (flags.name !== undefined && !flags.name.trim()) {
return {
"en-US": "--name must not be blank when provided.",
"zh-CN": "传入的 --name 不能仅包含空白或为空。",
};
}
return undefined;
},
async run(ctx) {
const params = {
page: ctx.flags.page ?? 1,
pageSize: ctx.flags.pageSize ?? 10,
name: ctx.flags.name?.trim(),
};
if (ctx.settings.dryRun) {
const preview = {
action: "dataset.groups",
api: CONSOLE_DATASET_GROUPS_API,
data: buildConsoleDatasetGroupsRequest(params),
...consoleReadTargetPreview(ctx.settings),
};
ctx.output.result(preview, { text: JSON.stringify(preview, null, 2) });
return;
}
const response = await listConsoleDatasetGroups(ctx.client, params);
ctx.output.result(response, { text: JSON.stringify(response, null, 2) });
},
});
Loading
Loading