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
14 changes: 14 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,20 @@ The format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and

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

## [2.10.0] - 2026-11-13

### Added

- **Flow-agent command group**: New `bl flow-agent` group for managing Bailian applications via the console gateway.
- `bl flow-agent create` / `get` / `update` / `publish` / `delete` / `copy` / `versions` for agents (app-control 2.0) and workflows; `delete` is high-risk and requires `--yes`.
- `bl flow-agent workflow get` / `save` / `publish` / `export` for workflow canvases; `save` replaces the whole draft with optimistic-lock versioning, `publish` normalizes triggers like the console editor.
- Agent config updates read the current draft and merge `--model` / `--instructions` / `--config-json` / `--config-file`.
- `bl flow-agent list --type workflow` lists workflows using the console exclusion filter.

### Deprecated

- **App group**: `bl app call` / `bl app list` are deprecated in favor of `bl flow-agent call` / `bl flow-agent list` and will be removed in a future release. The application control-plane commands introduced in 2.9.0 now live only under `bl flow-agent`.

## [2.9.0] - 2026-11-12

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

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

## [2.10.0] - 2026-11-13

### 新增

- **flow-agent 命令组**:新增 `bl flow-agent` 组,通过控制台网关管理百炼应用。
- `bl flow-agent create` / `get` / `update` / `publish` / `delete` / `copy` / `versions`:管理智能体(app-control 2.0)与工作流;`delete` 为高风险操作,需 `--yes`。
- `bl flow-agent workflow get` / `save` / `publish` / `export`:管理工作流画布;`save` 整幅替换草稿并带乐观锁版本,`publish` 按控制台编辑器逻辑规范化触发器。
- 智能体配置更新先读取当前草稿,再合并 `--model` / `--instructions` / `--config-json` / `--config-file`。
- `bl flow-agent list --type workflow` 按控制台排除法列出工作流。

### 已弃用

- **app 组**:`bl app call` / `bl app list` 已废弃,请改用 `bl flow-agent call` / `bl flow-agent list`,将在未来版本移除。2.9.0 引入的应用控制面命令现仅位于 `bl flow-agent` 下。

## [2.9.0] - 2026-11-12

### 新增
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ Synchronous Batch Chat is non-streaming; explicit realtime/international/Token P

### Console Login (OAuth, Recommended)

Required for console capability commands (model list, app list, MCP list, workspace, usage queries, rate-limit increases, direct console calls). It can create an ordinary API key when needed. Token Plan and other subscription plans cannot use `--console`; use the API Key login below.
Required for console capability commands (model list, flow-agent list, MCP list, workspace, usage queries, rate-limit increases, direct console calls). It can create an ordinary API key when needed. Token Plan and other subscription plans cannot use `--console`; use the API Key login below.

```bash
bl auth login --console
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.9.0",
"version": "2.10.0",
"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.9.0",
"version": "2.10.0",
"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/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ Synchronous Batch Chat is non-streaming; explicit realtime/international/Token P

### Console Login (OAuth, Recommended)

Required for console capability commands (model list, app list, MCP list, workspace, usage queries, rate-limit increases, direct console calls). It can create an ordinary API key when needed. Token Plan and other subscription plans cannot use `--console`; use the API Key login below.
Required for console capability commands (model list, flow-agent list, MCP list, workspace, usage queries, rate-limit increases, direct console calls). It can create an ordinary API key when needed. Token Plan and other subscription plans cannot use `--console`; use the API Key login below.

```bash
bl auth login --console
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.9.0",
"version": "2.10.0",
"description": "CLI for Aliyun Model Studio (DashScope) AI Platform.",
"keywords": [
"agent",
Expand Down
30 changes: 17 additions & 13 deletions packages/cli/src/commands.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import type { AnyCommand } from "bailian-cli-core";
import { deprecatedCommand } from "./deprecated.ts";
import {
authLogin,
authStatus,
Expand Down Expand Up @@ -387,19 +388,22 @@ export const commands: Record<string, AnyCommand> = {
"config ui": configUi,
"config agent": configAgent,
update,
"app call": appCall,
"app list": appList,
"app create": appCreate,
"app get": appGet,
"app update": appUpdate,
"app publish": appPublish,
"app delete": appDelete,
"app copy": appCopy,
"app versions": appVersions,
"app workflow get": appWorkflowGet,
"app workflow save": appWorkflowSave,
"app workflow publish": appWorkflowPublish,
"app workflow export": appWorkflowExport,
// Deprecated app group: only call/list remain, pointing at the flow-agent group.
"app call": deprecatedCommand(appCall, "flow-agent call"),
"app list": deprecatedCommand(appList, "flow-agent list"),
"flow-agent call": appCall,
"flow-agent list": appList,
"flow-agent create": appCreate,
"flow-agent get": appGet,
"flow-agent update": appUpdate,
"flow-agent publish": appPublish,
"flow-agent delete": appDelete,
"flow-agent copy": appCopy,
"flow-agent versions": appVersions,
"flow-agent workflow get": appWorkflowGet,
"flow-agent workflow save": appWorkflowSave,
"flow-agent workflow publish": appWorkflowPublish,
"flow-agent workflow export": appWorkflowExport,
"memory add": memoryAdd,
"memory search": memorySearch,
"memory list": memoryList,
Expand Down
39 changes: 39 additions & 0 deletions packages/cli/src/deprecated.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
import type { AnyCommand, LocalizedText } from "bailian-cli-core";

/**
* Wrap a command as a deprecated alias of its replacement product path.
*
* The wrapper keeps the original auth/risk/flags/prepare/validate intact (via
* spread) and only adds user-facing deprecation signals: a `[Deprecated]`
* description prefix, a leading note pointing at the replacement, and a stderr
* warning emitted on invocation. `--help` is rendered by the runtime before
* `run`, so it shows the note without emitting the warning.
*
* This lives in the product layer: the command library stays path-agnostic and
* the runtime gains no deprecation concept.
*/
export function deprecatedCommand(command: AnyCommand, replacementPath: string): AnyCommand {
const note: LocalizedText = {
"en-US": `Deprecated: use \`bl ${replacementPath}\` instead. This command will be removed in a future release.`,
"zh-CN": `已废弃:请改用 \`bl ${replacementPath}\`。该命令将在未来版本移除。`,
};
const prefix = (text: LocalizedText): LocalizedText =>
typeof text === "string"
? `[Deprecated] ${text}`
: {
"en-US": `[Deprecated] ${text["en-US"]}`,
"zh-CN": `[已废弃] ${text["zh-CN"]}`,
};
return {
...command,
description: prefix(command.description),
notes: [note, ...(command.notes ?? [])],
async run(ctx) {
ctx.output.info({
"en-US": `Warning: this command is deprecated; use \`bl ${replacementPath}\` instead.`,
"zh-CN": `警告:该命令已废弃,请改用 \`bl ${replacementPath}\`。`,
});
return command.run(ctx);
},
};
}
87 changes: 87 additions & 0 deletions packages/cli/tests/e2e/flow-agent-deprecation.e2e.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
import { mkdtempSync, rmSync } from "fs";
import { tmpdir } from "os";
import { join } from "path";
import { afterAll, describe, expect, test } from "vite-plus/test";
import { captureRegistryHelp } from "e2e/registry-smoke";
import { CommandRegistry } from "bailian-cli-runtime";
import { commands } from "../../src/commands.ts";
import { parseStdoutJson, runCli } from "./helpers.ts";

// Product-level: the real bl command map carries the deprecation wrappers
// (packages/cli/src/commands.ts), unlike the commands-library harness.
const registry = new CommandRegistry(commands, "bl");
const isolatedConfigDir = mkdtempSync(join(tmpdir(), "bl-flow-agent-deprecation-"));

afterAll(() => rmSync(isolatedConfigDir, { recursive: true, force: true }));

function runCliIsolated(args: string[]) {
return runCli(args, {
BAILIAN_CONFIG_DIR: isolatedConfigDir,
DASHSCOPE_QUIET: "0",
DO_NOT_TRACK: "1",
NO_UPDATE_NOTIFIER: "1",
});
}

describe("e2e: flow-agent group + app deprecation", () => {
test("flow-agent registers all 13 commands; app keeps only call/list", () => {
const flowAgentPaths = Object.keys(commands)
.filter((path) => path.startsWith("flow-agent "))
.sort();
expect(flowAgentPaths).toEqual([
"flow-agent call",
"flow-agent copy",
"flow-agent create",
"flow-agent delete",
"flow-agent get",
"flow-agent list",
"flow-agent publish",
"flow-agent update",
"flow-agent versions",
"flow-agent workflow export",
"flow-agent workflow get",
"flow-agent workflow publish",
"flow-agent workflow save",
]);
const appPaths = Object.keys(commands)
.filter((path) => path.startsWith("app "))
.sort();
expect(appPaths).toEqual(["app call", "app list"]);
});

test("app call help is deprecated and points to flow-agent call", () => {
const help = captureRegistryHelp(registry, ["app", "call"]);
expect(help).toContain("[Deprecated]");
expect(help).toContain("flow-agent call");
});

test("app list help is deprecated and points to flow-agent list", () => {
const help = captureRegistryHelp(registry, ["app", "list"]);
expect(help).toContain("[Deprecated]");
expect(help).toContain("flow-agent list");
});

test("flow-agent list help is not deprecated", () => {
const help = captureRegistryHelp(registry, ["flow-agent", "list"]);
expect(help).not.toContain("[Deprecated]");
});

test("removed app control-plane path is rejected (exit 2)", async () => {
const result = await runCliIsolated(["app", "create", "--name", "x", "--output", "json"]);
expect(result.exitCode, result.stderr).toBe(2);
});

test("app list --dry-run warns on stderr in text mode", async () => {
const result = await runCliIsolated(["app", "list", "--dry-run", "--output", "text"]);
expect(result.exitCode, result.stderr).toBe(0);
expect(result.stderr).toMatch(/deprecated/i);
expect(result.stderr).toContain("flow-agent list");
});

test("app list --dry-run keeps stdout JSON clean in json mode", async () => {
const result = await runCliIsolated(["app", "list", "--dry-run", "--output", "json"]);
expect(result.exitCode, result.stderr).toBe(0);
const data = parseStdoutJson<{ api: string }>(result.stdout);
expect(data.api).toBe("zeldaEasy.broadscope-bailian.app-control.list");
});
});
8 changes: 4 additions & 4 deletions packages/cli/tests/e2e/registry.smoke.e2e.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,8 @@ describe("e2e: bl registry smoke", () => {
expect(exitCode, stderr).toBe(0);
expect(stderr).toMatch(/\bbl\b/i);
expect(stderr).not.toMatch(/COMMAND\s+AUTH\s+DESCRIPTION/);
expect(stderr).toMatch(/app call\s+\[API Key\]\s+Call a Bailian application/);
expect(stderr).toMatch(/app list\s+\[Console\]\s+List Bailian applications/);
expect(stderr).toMatch(/app call\s+\[API Key\]\s+\[Deprecated\] Call a Bailian application/);
expect(stderr).toMatch(/app list\s+\[Console\]\s+\[Deprecated\] List Bailian applications/);
expect(stderr).toMatch(/token-plan create-key\s+\[AK\/SK\]\s+Create a Token Plan API key/);
expect(stderr).toMatch(/config show\s+\[No Auth\]\s+Display current configuration/);
expect(stderr).toMatch(/--base-url/);
Expand All @@ -76,8 +76,8 @@ describe("e2e: bl registry smoke", () => {
test("分组帮助按叶子命令展示不同鉴权域", async () => {
const { stderr, exitCode } = await runCliSmoke(["app", "--help"]);
expect(exitCode, stderr).toBe(0);
expect(stderr).toMatch(/app call\s+\[API Key\]\s+Call a Bailian application/);
expect(stderr).toMatch(/app list\s+\[Console\]\s+List Bailian applications/);
expect(stderr).toMatch(/app call\s+\[API Key\]\s+\[Deprecated\] Call a Bailian application/);
expect(stderr).toMatch(/app list\s+\[Console\]\s+\[Deprecated\] List Bailian applications/);
});

test.each([
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.9.0",
"version": "2.10.0",
"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
Loading
Loading