Skip to content

Commit 882bc6b

Browse files
committed
feat(asset-center): remove oss transfer commands
1 parent 78ca730 commit 882bc6b

20 files changed

Lines changed: 186 additions & 1579 deletions

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ Equip your AI Agent out-of-the-box with these capabilities, composable across co
4141
- **Model recommendation** — Describe your scenario and get best-fit model suggestions; supports scoped search, model comparison, and alternative discovery
4242
- **Fine-tuning & deployment** — Upload datasets, create text/audio/image fine-tune jobs (`finetune text|audio|image create`; text covers SFT/LoRA/DPO/CPT), probe job status non-blockingly (`finetune watch`), query per-model training capability (`finetune capability`), and deploy trained models as endpoints (`deploy text|audio|image create`)
4343
- **Console capabilities** — Browse the model marketplace (`model list`) and Bailian apps (`app list`), review a unified usage view (`usage summary`), check free-tier quota (`usage free`), view model usage statistics (`usage stats`), manage workspaces (`workspace list`), and manage rate limits (`quota list/request/check/history`)
44-
- **Asset center** — Browse and manage model-generated assets (`asset-center list/get/download`), favorites and recycle bin (`favorite`/`delete`), storage quota (`stats`/`storage`), OSS transfer (`oss slr/bind/show/update/unbind`), and transfer logs (`transfer list`)
44+
- **Asset center** — Browse and manage model-generated assets (`asset-center list/get/download`), favorites and recycle bin (`favorite`/`delete`), and storage quota (`stats`/`storage`)
4545
- **Local file auto-upload** — Every URL parameter accepts a local path; uploaded to free temp storage with 48-hour validity
4646

4747
## Showcase: One-Sentence Cinematic Video

README.zh.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ _专为 AI Agent 打造,每个命令均可作为结构化工具调用。_
4141
- **模型推荐** — 描述你的场景,智能推荐最适合的模型;支持限定范围搜索、模型对比和替代发现
4242
- **微调与部署** — 上传数据集、创建文本/音频/图像调优任务(`finetune text|audio|image create`;文本涵盖 SFT/LoRA/DPO/CPT)、非阻塞探测任务状态(`finetune watch`)、按模型查训练能力(`finetune capability`),并把训练好的模型部署为推理服务(`deploy text|audio|image create`
4343
- **控制台能力** — 浏览模型市场(`model list`)和百炼应用(`app list`),查看统一用量视图(`usage summary`),查询模型免费额度(`usage free`),查看模型用量统计(`usage stats`),管理业务空间(`workspace list`),管理限流与提额(`quota list/request/check/history`
44-
- **资产中心** — 管理模型生成资产(`asset-center list/get/download`)、收藏与回收站(`favorite`/`delete`)、容量统计(`stats`/`storage`、OSS 转存(`oss slr/bind/show/update/unbind`)与转存日志(`transfer list`
44+
- **资产中心** — 管理模型生成资产(`asset-center list/get/download`)、收藏与回收站(`favorite`/`delete`)、容量统计(`stats`/`storage`
4545
- **本地文件自动上传** — 所有 URL 参数同时支持本地路径,免费临时存储 48 小时
4646

4747
## 示例:一句话生成一部电影短片

docs/ONBOARDING.zh.md

Lines changed: 29 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -429,34 +429,34 @@ describe.skipIf(!isConsoleE2EReady())("e2e: asset-center(Console …)", () =
429429

430430
当前 `packages/cli/src/commands.ts` 注册的命令组:
431431

432-
| 命令组 | 子命令示例 | auth 域 |
433-
| -------------- | ---------------------------------------------------------------------------------------- | ---------------- |
434-
| `auth` | login, status, logout | none / console |
435-
| `text` | chat | apiKey |
436-
| `omni` | (全模态对话) | apiKey |
437-
| `image` | generate, edit | apiKey |
438-
| `video` | generate, edit, ref, task get, download | apiKey |
439-
| `vision` | describe | apiKey |
440-
| `speech` | synthesize, recognize | apiKey |
441-
| `knowledge` | retrieve, search, chat | apiKey |
442-
| `memory` | add, search, list, update, delete, profile create/get | apiKey |
443-
| `app` | call, list | apiKey / console |
444-
| `mcp` | call, list, tools | apiKey |
445-
| `search` | web | apiKey |
446-
| `file` | upload | apiKey |
447-
| `config` | show, set | none |
448-
| `console` | call | console |
449-
| `usage` | free, freetier, stats | console |
450-
| `workspace` | list | console |
451-
| `quota` | list, request, history, check | console |
452-
| `dataset` | upload, list, get, delete, validate | console |
453-
| `finetune` | create, list, get, cancel, delete, logs, checkpoints, export, watch, capability | console |
454-
| `deploy` | create, list, get, models, scale, update, delete | console |
455-
| `token-plan` | list-seats, create-key, assign-seats, add-member | console |
456-
| `asset-center` | list, get, favorite, unfavorite, delete, download, stats, storage, transfer list, oss \* | console |
457-
| `pipeline` | run, validate | apiKey |
458-
| `advisor` | recommend | apiKey |
459-
| `update` | (自更新) | none |
432+
| 命令组 | 子命令示例 | auth 域 |
433+
| -------------- | ------------------------------------------------------------------------------- | ---------------- |
434+
| `auth` | login, status, logout | none / console |
435+
| `text` | chat | apiKey |
436+
| `omni` | (全模态对话) | apiKey |
437+
| `image` | generate, edit | apiKey |
438+
| `video` | generate, edit, ref, task get, download | apiKey |
439+
| `vision` | describe | apiKey |
440+
| `speech` | synthesize, recognize | apiKey |
441+
| `knowledge` | retrieve, search, chat | apiKey |
442+
| `memory` | add, search, list, update, delete, profile create/get | apiKey |
443+
| `app` | call, list | apiKey / console |
444+
| `mcp` | call, list, tools | apiKey |
445+
| `search` | web | apiKey |
446+
| `file` | upload | apiKey |
447+
| `config` | show, set | none |
448+
| `console` | call | console |
449+
| `usage` | free, freetier, stats | console |
450+
| `workspace` | list | console |
451+
| `quota` | list, request, history, check | console |
452+
| `dataset` | upload, list, get, delete, validate | console |
453+
| `finetune` | create, list, get, cancel, delete, logs, checkpoints, export, watch, capability | console |
454+
| `deploy` | create, list, get, models, scale, update, delete | console |
455+
| `token-plan` | list-seats, create-key, assign-seats, add-member | console |
456+
| `asset-center` | list, get, favorite, unfavorite, delete, download, stats, storage | console |
457+
| `pipeline` | run, validate | apiKey |
458+
| `advisor` | recommend | apiKey |
459+
| `update` | (自更新) | none |
460460

461461
---
462462

@@ -530,7 +530,7 @@ pnpm run release:check # 发版前校验
530530

531531
1. **命令实现 ≠ 产品路径** — 同一 `knowledgeRetrieve` 可以是 `bl knowledge retrieve``kscli retrieve`
532532
2. **defineCommand 是契约**`auth` + `flags` + `run(ctx)` 是命令的全部接口;凭证和网络细节下沉到 core/runtime。
533-
3. **registry 从 map 建树**`"asset-center oss bind"` 自动变成三级命令组,help 动态生成。
533+
3. **registry 从 map 建树**`"asset-center list"` 等 path 自动变成命令组,help 动态生成。
534534
4. **flags 用 camelCase 定义** — runtime 渲染为 `--kebab-case``ParsedFlags<typeof FLAGS>` 提供类型安全。
535535
5. **dry-run 是全局 flag**`--dry-run` 在 auth stage 有例外处理,命令在 `run` 开头判断 `ctx.settings.dryRun`
536536
6. **本地路径即 URL** — 所有接受 URL 的参数同时支持本地文件路径,core `files/upload` 自动上传。

packages/cli/src/commands.ts

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -92,12 +92,6 @@ import {
9292
assetDownload,
9393
assetStats,
9494
assetStorage,
95-
assetTransferList,
96-
assetOssSlrAuthorize,
97-
assetOssBind,
98-
assetOssShow,
99-
assetOssUpdate,
100-
assetOssUnbind,
10195
workspaceInit,
10296
pluginInstall,
10397
pluginLink,
@@ -224,12 +218,6 @@ export const commands: Record<string, AnyCommand> = {
224218
"asset-center download": assetDownload,
225219
"asset-center stats": assetStats,
226220
"asset-center storage": assetStorage,
227-
"asset-center transfer list": assetTransferList,
228-
"asset-center oss slr authorize": assetOssSlrAuthorize,
229-
"asset-center oss bind": assetOssBind,
230-
"asset-center oss show": assetOssShow,
231-
"asset-center oss update": assetOssUpdate,
232-
"asset-center oss unbind": assetOssUnbind,
233221
"workspace init": workspaceInit,
234222
"plugin install": pluginInstall,
235223
"plugin link": pluginLink,

packages/cli/tests/e2e/asset-center.e2e.test.ts

Lines changed: 2 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ describe("e2e: asset-center", () => {
88
const output = `${stdout}\n${stderr}`;
99
expect(output).toContain("list");
1010
expect(output).toContain("storage");
11-
expect(output).toContain("oss");
11+
expect(output).not.toContain("oss");
1212
});
1313

1414
test("asset-center list --help 正常退出", async () => {
@@ -41,7 +41,7 @@ describe("e2e: asset-center", () => {
4141
const { stderr, exitCode } = await runCli(["asset-center", "download", "--help"]);
4242
expect(exitCode, stderr).toBe(0);
4343
expect(stderr).toContain("--id");
44-
expect(stderr).not.toContain("--out");
44+
expect(stderr).not.toMatch(/(^|\s)--out(\s|$)/);
4545
});
4646

4747
test("asset-center stats --help 正常退出", async () => {
@@ -55,19 +55,6 @@ describe("e2e: asset-center", () => {
5555
expect(exitCode, stderr).toBe(0);
5656
expect(stderr).toContain("bl asset-center storage");
5757
});
58-
59-
test("asset-center oss bind --help 正常退出", async () => {
60-
const { stderr, exitCode } = await runCli(["asset-center", "oss", "bind", "--help"]);
61-
expect(exitCode, stderr).toBe(0);
62-
expect(stderr).toContain("--bucket");
63-
expect(stderr).toContain("--policy");
64-
});
65-
66-
test("asset-center transfer list --help 正常退出", async () => {
67-
const { stderr, exitCode } = await runCli(["asset-center", "transfer", "list", "--help"]);
68-
expect(exitCode, stderr).toBe(0);
69-
expect(stderr).toContain("--status");
70-
});
7158
});
7259

7360
describe.skipIf(!isConsoleE2EReady())("e2e: asset-center(Console)", () => {
@@ -89,24 +76,6 @@ describe.skipIf(!isConsoleE2EReady())("e2e: asset-center(Console)", () => {
8976
expect(stderr).toMatch(/--id|Missing required argument/i);
9077
});
9178

92-
test("asset-center oss bind policy=BEFORE_DAYS 缺 --before-days 报错", async () => {
93-
const { stderr, exitCode } = await runCli([
94-
"asset-center",
95-
"oss",
96-
"bind",
97-
"--bucket",
98-
"b",
99-
"--region",
100-
"cn-hangzhou",
101-
"--path-prefix",
102-
"p/",
103-
"--policy",
104-
"BEFORE_DAYS",
105-
]);
106-
expect(exitCode).toBe(2);
107-
expect(stderr).toContain("--before-days");
108-
});
109-
11079
test("asset-center list --dry-run 输出请求参数", async () => {
11180
const { stdout, stderr, exitCode } = await runCli([
11281
"asset-center",
@@ -150,21 +119,6 @@ describe.skipIf(!isConsoleE2EReady())("e2e: asset-center(Console)", () => {
150119
expect(data.api).toContain("getStorageQuota");
151120
});
152121

153-
test("asset-center oss slr authorize --dry-run 输出请求参数", async () => {
154-
const { stdout, stderr, exitCode } = await runCli([
155-
"asset-center",
156-
"oss",
157-
"slr",
158-
"authorize",
159-
"--dry-run",
160-
"--output",
161-
"json",
162-
]);
163-
expect(exitCode, stderr).toBe(0);
164-
const data = parseStdoutJson<{ api?: string }>(stdout);
165-
expect(data.api).toContain("createOssSLR");
166-
});
167-
168122
test("【console】asset-center list 真实调用或鉴权失败优雅退出", async () => {
169123
const workspaceId = process.env.BAILIAN_WORKSPACE_ID;
170124
const args = ["asset-center", "list", "--output", "json", "--page-size", "1"];

0 commit comments

Comments
 (0)