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

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

## [2.9.0] - 2026-11-12

### Added

- **App control-plane commands**: Manage Bailian applications from the CLI via the console gateway.
- `bl app create` / `get` / `update` / `publish` / `delete` / `copy` / `versions` for agents (app-control 2.0) and workflows; `delete` is high-risk and requires `--yes`.
- `bl app 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`.
- **App list filtering**: `bl app list --type workflow` lists workflows using the console exclusion filter.

### Changed

- **Omni default model**: `bl omni` now defaults to `qwen3.8-omni-flash` (was `qwen3.5-omni-plus`).

### Fixed

- **Free-tier model operations**: Tighten confirmation gating and error handling; recovery stays behind the confirmation gate.
- **Recovery hints**: Preserve the explicit `--config` profile after API Key fallback, and append `--config` for named profiles.

### Internal

- **Telemetry identity**: Replace the anonymous device_id with a persisted anonymous uid, published atomically (temp+rename) to avoid short-writes and stale-lock races.

## [2.8.6] - 2026-11-12

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

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

## [2.9.0] - 2026-11-12

### 新增

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

### 变更

- **Omni 默认模型**:`bl omni` 默认模型改为 `qwen3.8-omni-flash`(原 `qwen3.5-omni-plus`)。

### 修复

- **免费额度模型操作**:收紧确认闸门与错误处理;恢复操作保持在确认闸门之后。
- **恢复提示**:API Key 回退后保留显式 `--config` 配置 profile,并为命名 profile 追加 `--config` 提示。

### 内部

- **遥测身份**:以持久化的匿名 uid 替代匿名 device_id,采用原子发布(临时文件+重命名),避免短写与陈旧锁竞争。

## [2.8.6] - 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 @@ -25,7 +25,7 @@ _Built for AI Agents. Every command works as a structured tool call._

- **Model generation** — Full-modality generation across text, image, video, and speech, with editing and reference-based generation
- **Asset understanding** — Parse and ask questions about images, documents, audio, and long videos
- **App orchestration** — Call Managed Agents, agents, and workflows published on Aliyun Model Studio, wired to knowledge bases, memory, web search, and MCP tools
- **App orchestration** — Call Managed Agents, agents, and workflows published on Aliyun Model Studio, wired to knowledge bases, memory, web search, and MCP tools; create, update, publish, copy, and delete agents/workflows, and edit workflow canvases from the CLI
- **Native MCP setup** — Register Bailian MCP servers in Codex, Claude Code, Cursor, Qoder, Qoder Work, QwenWork (千问办公), Qwen Code, Gemini CLI, or Pi
- **Training & deployment** — Validate and upload datasets, fine-tune models, deploy dedicated models as endpoints
- **Batch inference** — Prepare CSV/JSONL, create and follow asynchronous Chat/Embedding tasks, download original results/errors with optional CSV, or send one synchronous Batch Chat request
Expand Down
2 changes: 1 addition & 1 deletion README.zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ _专为 AI Agent 打造,每个命令均可作为结构化工具调用。_

- **模型生成** — 文本、图像、视频、语音全模态生成,支持编辑与参考生成
- **素材理解** — 图像、文档、音频、长视频的解析与问答
- **应用编排** — 调用百炼已发布的 Managed Agent、智能体和工作流,接入知识库、记忆库、联网搜索与 MCP 工具
- **应用编排** — 调用百炼已发布的 Managed Agent、智能体和工作流,接入知识库、记忆库、联网搜索与 MCP 工具;并可在命令行创建/更新/发布/复制/删除智能体与工作流、编辑工作流画布
- **原生 MCP 接入** — 将百炼 MCP 服务注册到 Codex、Claude Code、Cursor、Qoder、Qoder Work、千问办公(QwenWork)、Qwen Code、Gemini CLI 或 Pi
- **模型训推** — 数据集校验上传、模型精调、专属模型部署上线
- **批量推理** — CSV/JSONL 构造、异步 Chat/Embedding 任务创建与跟踪、原始结果/错误下载及可选 CSV,或同步单请求 Batch Chat
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.6",
"version": "2.9.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.8.6",
"version": "2.9.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/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "bailian-cli",
"version": "2.8.6",
"version": "2.9.0",
"description": "CLI for Aliyun Model Studio (DashScope) AI Platform.",
"keywords": [
"agent",
Expand Down
22 changes: 22 additions & 0 deletions packages/cli/src/commands.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,17 @@ import {
update,
appCall,
appList,
appCreate,
appGet,
appUpdate,
appPublish,
appDelete,
appCopy,
appVersions,
appWorkflowGet,
appWorkflowSave,
appWorkflowPublish,
appWorkflowExport,
memoryAdd,
memorySearch,
memoryList,
Expand Down Expand Up @@ -378,6 +389,17 @@ export const commands: Record<string, AnyCommand> = {
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,
"memory add": memoryAdd,
"memory search": memorySearch,
"memory list": memoryList,
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.6",
"version": "2.9.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
45 changes: 45 additions & 0 deletions packages/commands/src/commands/app/copy.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
import { defineCommand } from "bailian-cli-core";
import {
APP_CONTROL_COPY_API,
APP_ID_FLAG,
consoleCall,
consoleDryRunPreview,
extractAppCode,
} from "./shared.ts";

export default defineCommand({
description: {
"en-US": "Copy a Bailian application (agent or workflow)",
"zh-CN": "复制百炼应用(智能体或工作流)",
},
auth: "console",
usageArgs: "--app-id <id> [flags]",
flags: {
...APP_ID_FLAG,
},
exampleArgs: ["--app-id abc123"],
async run(ctx) {
const { settings, flags } = ctx;
const code = flags.appId;
const data = { reqDTO: { code } };

if (settings.dryRun) {
ctx.output.result(consoleDryRunPreview(settings, APP_CONTROL_COPY_API, data));
return;
}

const payload = await consoleCall(ctx.client, APP_CONTROL_COPY_API, data);
const newAppCode = extractAppCode(payload);
ctx.output.result(
{ app_code: newAppCode ?? null, source_app_code: code, result: payload },
settings.output === "text"
? {
text: ctx.localize({
"en-US": `Application copied: ${newAppCode ?? "(see result)"}`,
"zh-CN": `应用已复制:${newAppCode ?? "(见 result)"}`,
}),
}
: undefined,
);
},
});
170 changes: 170 additions & 0 deletions packages/commands/src/commands/app/create.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,170 @@
import { defineCommand } from "bailian-cli-core";
import {
APP_CONTROL_CREATE_API,
APP_DATA_CREATE_DRAFT_API,
APP_TYPE_AGENT,
CONFIG_FLAGS,
APP_TYPE_FLAG,
consoleCall,
consoleDryRunPreview,
extractAppCode,
readConfigJson,
resolveAppType,
validateConfigFlags,
} from "./shared.ts";

/** Default agent config aligned with the console create modal (new-agent). */
function defaultAgentConfig(model?: string): Record<string, unknown> {
return {
model: model || "auto",
model_config: {
temperature: 0.7,
enable_thinking: true,
thinking_budget: 4000,
},
dialog_round: 3,
};
}

export default defineCommand({
description: {
"en-US": "Create a Bailian application (agent or workflow)",
"zh-CN": "创建百炼应用(智能体或工作流)",
},
auth: "console",
usageArgs: "--name <name> [flags]",
flags: {
name: {
type: "string",
valueHint: "<name>",
description: { "en-US": "Application name (required)", "zh-CN": "应用名称(必填)" },
required: true,
},
...APP_TYPE_FLAG,
description: {
type: "string",
valueHint: "<text>",
description: { "en-US": "Application description", "zh-CN": "应用描述" },
},
icon: {
type: "string",
valueHint: "<key>",
description: { "en-US": "Application icon key", "zh-CN": "应用图标 key" },
},
model: {
type: "string",
valueHint: "<model>",
description: {
"en-US": "Agent model ID (default: auto; agent only)",
"zh-CN": "智能体模型 ID(默认:auto;仅 agent 有效)",
},
},
...CONFIG_FLAGS,
},
notes: [
{
"en-US":
"Agent creation uses the app-control 2.0 API with a default config (model auto, dialog_round 3). --config-json/--config-file shallow-merges over the default config; --model overrides config.model.",
"zh-CN":
"智能体创建走 app-control 2.0 接口,携带默认配置(model auto、dialog_round 3)。--config-json/--config-file 浅合并覆盖默认配置;--model 覆盖 config.model。",
},
{
"en-US":
"Workflow creation creates an empty draft canvas; edit it with `app workflow save` and publish with `app workflow publish`.",
"zh-CN":
"工作流创建为空草稿画布;用 `app workflow save` 编辑画布,用 `app workflow publish` 发布。",
},
],
exampleArgs: [
{
"en-US": '--name "Customer service"',
"zh-CN": '--name "客户服务"',
},
{
"en-US": '--name "Customer service" --model qwen3-max --description "After-sales bot"',
"zh-CN": '--name "客户服务" --model qwen3-max --description "售后机器人"',
},
{
"en-US": '--name "Order flow" --type workflow',
"zh-CN": '--name "订单流程" --type workflow',
},
{
"en-US": '--name "My agent" --config-file ./agent-config.json',
"zh-CN": '--name "我的智能体" --config-file ./agent-config.json',
},
],
validate: (flags) => {
const conflict = validateConfigFlags(flags);
if (conflict) return conflict;
if (
resolveAppType(flags) === "workflow" &&
(flags.model !== undefined ||
flags.configJson !== undefined ||
flags.configFile !== undefined)
) {
return {
"en-US":
"--model/--config-json/--config-file only apply to agent creation; edit a workflow canvas with `app workflow save`",
"zh-CN":
"--model/--config-json/--config-file 仅适用于智能体创建;工作流画布请用 `app workflow save` 编辑",
};
}
return undefined;
},
async run(ctx) {
const { settings, flags } = ctx;
const appType = resolveAppType(flags);
const userConfig = await readConfigJson(flags);

let api: string;
let data: Record<string, unknown>;
if (appType === "workflow") {
api = APP_DATA_CREATE_DRAFT_API;
data = {
reqDTO: {
name: flags.name,
appDescription: flags.description,
applicationConfigDTO: {},
createType: "Workflow",
modelId: "",
icon: flags.icon,
subType: "chat",
},
};
} else {
const config = { ...defaultAgentConfig(flags.model), ...userConfig };
if (flags.model) config.model = flags.model;
api = APP_CONTROL_CREATE_API;
data = {
reqDTO: {
name: flags.name,
description: flags.description,
icon: flags.icon,
source: "console",
type: APP_TYPE_AGENT,
status: 1,
config,
},
};
}

if (settings.dryRun) {
ctx.output.result(consoleDryRunPreview(settings, api, data));
return;
}

const payload = await consoleCall(ctx.client, api, data);
const appCode = extractAppCode(payload);
ctx.output.result(
{ app_code: appCode ?? null, result: payload },
settings.output === "text"
? {
text: ctx.localize({
"en-US": `Application created: ${appCode ?? "(see result)"}`,
"zh-CN": `应用已创建:${appCode ?? "(见 result)"}`,
}),
}
: undefined,
);
},
});
Loading
Loading