@mindscraft/branch-video-agent-cli 0.2.0 → 0.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +15 -0
- package/dist/commands/project.js +7 -0
- package/dist/lib/flags.js +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -46,6 +46,21 @@ branch-video-agent --help
|
|
|
46
46
|
'@ | npm exec --yes --package=@mindscraft/branch-video-agent-cli branch-video-agent -- project list
|
|
47
47
|
```
|
|
48
48
|
|
|
49
|
+
AIHub 导入公共库示例:
|
|
50
|
+
|
|
51
|
+
```powershell
|
|
52
|
+
@'
|
|
53
|
+
{
|
|
54
|
+
"global_context_str": "{\"project_title\":\"AIHub 导入项目\"}",
|
|
55
|
+
"script_body_str": "{\"project_title\":\"AIHub 导入项目\"}",
|
|
56
|
+
"result_script_str": "[]",
|
|
57
|
+
"workflow_run_id": "00000000-0000-4000-8000-000000000000"
|
|
58
|
+
}
|
|
59
|
+
'@ | npm exec --yes --package=@mindscraft/branch-video-agent-cli branch-video-agent -- project import-aihub
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
该命令与其他 `project` / `version` / `production` 命令一样,统一使用 `AIHUB_AGENT_TOKEN` Bearer 鉴权;服务端会兼容旧的 `X-AIHub-Import-Token` 头,但 CLI 不再单独管理第二套 token。
|
|
63
|
+
|
|
49
64
|
托管互动方案提交示例:
|
|
50
65
|
|
|
51
66
|
```powershell
|
package/dist/commands/project.js
CHANGED
|
@@ -21,6 +21,13 @@ export const projectCommands = {
|
|
|
21
21
|
});
|
|
22
22
|
return { data: result.data, requestId: result.requestId };
|
|
23
23
|
},
|
|
24
|
+
'import-aihub': async ({ client, payload }) => {
|
|
25
|
+
const result = await client.request('/api/branch-video/import/aihub', {
|
|
26
|
+
method: 'POST',
|
|
27
|
+
body: payload,
|
|
28
|
+
});
|
|
29
|
+
return { data: result.data, requestId: result.requestId };
|
|
30
|
+
},
|
|
24
31
|
update: async ({ client, payload }) => {
|
|
25
32
|
const projectId = getRequiredString(payload, 'projectId');
|
|
26
33
|
const result = await client.request(`/api/branch-video/${encodeURIComponent(projectId)}`, {
|
package/dist/lib/flags.js
CHANGED
|
@@ -93,7 +93,7 @@ export function getCliHelpText() {
|
|
|
93
93
|
'Groups:',
|
|
94
94
|
' preset list | upsert',
|
|
95
95
|
' workflow run | status | outputs',
|
|
96
|
-
' project list | get | create | update | delete',
|
|
96
|
+
' project list | get | create | import-aihub | update | delete',
|
|
97
97
|
' version list | get | publish',
|
|
98
98
|
' production schema | start | status | retry',
|
|
99
99
|
'',
|