compshare-cli 0.4.4__tar.gz → 0.5.1__tar.gz

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.
Files changed (72) hide show
  1. {compshare_cli-0.4.4 → compshare_cli-0.5.1}/CHANGELOG.md +21 -0
  2. {compshare_cli-0.4.4/src/compshare_cli.egg-info → compshare_cli-0.5.1}/PKG-INFO +33 -8
  3. {compshare_cli-0.4.4 → compshare_cli-0.5.1}/README.md +28 -3
  4. {compshare_cli-0.4.4 → compshare_cli-0.5.1}/RELEASING.md +1 -1
  5. {compshare_cli-0.4.4 → compshare_cli-0.5.1}/connector/compshare/connector-meta.json +4 -4
  6. {compshare_cli-0.4.4 → compshare_cli-0.5.1}/connector/compshare/mcp.json +1 -1
  7. {compshare_cli-0.4.4 → compshare_cli-0.5.1}/connector/compshare/skills/compshare/SKILL.md +14 -11
  8. {compshare_cli-0.4.4 → compshare_cli-0.5.1}/connector/compshare/token-schema.json +2 -2
  9. {compshare_cli-0.4.4 → compshare_cli-0.5.1}/pyproject.toml +4 -4
  10. {compshare_cli-0.4.4 → compshare_cli-0.5.1}/skills/compshare-cli/SKILL.md +40 -3
  11. {compshare_cli-0.4.4 → compshare_cli-0.5.1}/src/compshare_cli/__init__.py +1 -1
  12. {compshare_cli-0.4.4 → compshare_cli-0.5.1}/src/compshare_cli/commands/instance.py +41 -34
  13. compshare_cli-0.5.1/src/compshare_cli/commands/minimax.py +1133 -0
  14. {compshare_cli-0.4.4 → compshare_cli-0.5.1}/src/compshare_cli/i18n.py +150 -16
  15. {compshare_cli-0.4.4 → compshare_cli-0.5.1}/src/compshare_cli/mcp_server.py +26 -0
  16. {compshare_cli-0.4.4 → compshare_cli-0.5.1}/src/compshare_cli/ssh.py +101 -31
  17. {compshare_cli-0.4.4 → compshare_cli-0.5.1}/src/compshare_cli/ssh_cache.py +9 -5
  18. {compshare_cli-0.4.4 → compshare_cli-0.5.1/src/compshare_cli.egg-info}/PKG-INFO +33 -8
  19. {compshare_cli-0.4.4 → compshare_cli-0.5.1}/src/compshare_cli.egg-info/SOURCES.txt +2 -0
  20. {compshare_cli-0.4.4 → compshare_cli-0.5.1}/tests/test_actions.py +1 -1
  21. {compshare_cli-0.4.4 → compshare_cli-0.5.1}/tests/test_cli.py +194 -14
  22. {compshare_cli-0.4.4 → compshare_cli-0.5.1}/tests/test_mcp_server.py +6 -0
  23. {compshare_cli-0.4.4 → compshare_cli-0.5.1}/tests/test_minimax.py +51 -2
  24. compshare_cli-0.5.1/tests/test_minimax_media.py +279 -0
  25. {compshare_cli-0.4.4 → compshare_cli-0.5.1}/tests/test_ssh.py +162 -2
  26. compshare_cli-0.5.1/tests/test_ssh_cache.py +118 -0
  27. compshare_cli-0.5.1/tests/test_ssh_integration.py +217 -0
  28. compshare_cli-0.4.4/src/compshare_cli/commands/minimax.py +0 -428
  29. compshare_cli-0.4.4/tests/test_ssh_cache.py +0 -47
  30. {compshare_cli-0.4.4 → compshare_cli-0.5.1}/LICENSE +0 -0
  31. {compshare_cli-0.4.4 → compshare_cli-0.5.1}/MANIFEST.in +0 -0
  32. {compshare_cli-0.4.4 → compshare_cli-0.5.1}/connector/compshare/icon.svg +0 -0
  33. {compshare_cli-0.4.4 → compshare_cli-0.5.1}/setup.cfg +0 -0
  34. {compshare_cli-0.4.4 → compshare_cli-0.5.1}/skills/compshare-cli/agents/openai.yaml +0 -0
  35. {compshare_cli-0.4.4 → compshare_cli-0.5.1}/src/compshare_cli/__main__.py +0 -0
  36. {compshare_cli-0.4.4 → compshare_cli-0.5.1}/src/compshare_cli/actions.py +0 -0
  37. {compshare_cli-0.4.4 → compshare_cli-0.5.1}/src/compshare_cli/api.py +0 -0
  38. {compshare_cli-0.4.4 → compshare_cli-0.5.1}/src/compshare_cli/cli.py +0 -0
  39. {compshare_cli-0.4.4 → compshare_cli-0.5.1}/src/compshare_cli/commands/__init__.py +0 -0
  40. {compshare_cli-0.4.4 → compshare_cli-0.5.1}/src/compshare_cli/commands/bandwidth.py +0 -0
  41. {compshare_cli-0.4.4 → compshare_cli-0.5.1}/src/compshare_cli/commands/common.py +0 -0
  42. {compshare_cli-0.4.4 → compshare_cli-0.5.1}/src/compshare_cli/commands/doctor.py +0 -0
  43. {compshare_cli-0.4.4 → compshare_cli-0.5.1}/src/compshare_cli/commands/feedback.py +0 -0
  44. {compshare_cli-0.4.4 → compshare_cli-0.5.1}/src/compshare_cli/commands/image.py +0 -0
  45. {compshare_cli-0.4.4 → compshare_cli-0.5.1}/src/compshare_cli/commands/storage.py +0 -0
  46. {compshare_cli-0.4.4 → compshare_cli-0.5.1}/src/compshare_cli/commands/team.py +0 -0
  47. {compshare_cli-0.4.4 → compshare_cli-0.5.1}/src/compshare_cli/config.py +0 -0
  48. {compshare_cli-0.4.4 → compshare_cli-0.5.1}/src/compshare_cli/errors.py +0 -0
  49. {compshare_cli-0.4.4 → compshare_cli-0.5.1}/src/compshare_cli/insights.py +0 -0
  50. {compshare_cli-0.4.4 → compshare_cli-0.5.1}/src/compshare_cli/instance_templates.py +0 -0
  51. {compshare_cli-0.4.4 → compshare_cli-0.5.1}/src/compshare_cli/location.py +0 -0
  52. {compshare_cli-0.4.4 → compshare_cli-0.5.1}/src/compshare_cli/output.py +0 -0
  53. {compshare_cli-0.4.4 → compshare_cli-0.5.1}/src/compshare_cli/parsing.py +0 -0
  54. {compshare_cli-0.4.4 → compshare_cli-0.5.1}/src/compshare_cli/remote_jobs.py +0 -0
  55. {compshare_cli-0.4.4 → compshare_cli-0.5.1}/src/compshare_cli/runtime.py +0 -0
  56. {compshare_cli-0.4.4 → compshare_cli-0.5.1}/src/compshare_cli/sdk.py +0 -0
  57. {compshare_cli-0.4.4 → compshare_cli-0.5.1}/src/compshare_cli.egg-info/dependency_links.txt +0 -0
  58. {compshare_cli-0.4.4 → compshare_cli-0.5.1}/src/compshare_cli.egg-info/entry_points.txt +0 -0
  59. {compshare_cli-0.4.4 → compshare_cli-0.5.1}/src/compshare_cli.egg-info/requires.txt +0 -0
  60. {compshare_cli-0.4.4 → compshare_cli-0.5.1}/src/compshare_cli.egg-info/top_level.txt +0 -0
  61. {compshare_cli-0.4.4 → compshare_cli-0.5.1}/tests/test_api.py +0 -0
  62. {compshare_cli-0.4.4 → compshare_cli-0.5.1}/tests/test_bandwidth.py +0 -0
  63. {compshare_cli-0.4.4 → compshare_cli-0.5.1}/tests/test_config.py +0 -0
  64. {compshare_cli-0.4.4 → compshare_cli-0.5.1}/tests/test_feedback.py +0 -0
  65. {compshare_cli-0.4.4 → compshare_cli-0.5.1}/tests/test_instance_templates.py +0 -0
  66. {compshare_cli-0.4.4 → compshare_cli-0.5.1}/tests/test_location.py +0 -0
  67. {compshare_cli-0.4.4 → compshare_cli-0.5.1}/tests/test_output.py +0 -0
  68. {compshare_cli-0.4.4 → compshare_cli-0.5.1}/tests/test_parsing.py +0 -0
  69. {compshare_cli-0.4.4 → compshare_cli-0.5.1}/tests/test_release_version.py +0 -0
  70. {compshare_cli-0.4.4 → compshare_cli-0.5.1}/tests/test_remote_jobs.py +0 -0
  71. {compshare_cli-0.4.4 → compshare_cli-0.5.1}/tests/test_sdk.py +0 -0
  72. {compshare_cli-0.4.4 → compshare_cli-0.5.1}/tests/test_workbuddy_connector.py +0 -0
@@ -2,6 +2,27 @@
2
2
 
3
3
  ## Unreleased
4
4
 
5
+ ## 0.5.1
6
+
7
+ - 修复 SSH 远程命令参数中的空格、空参数、引号和 Shell 特殊字符丢失的问题,
8
+ 并使 `--print` 输出的命令与实际执行一致;Shell 脚本使用 `-- sh -lc '脚本'`。
9
+ - 文件传输共用 SSH 连接缓存,支持 `--refresh`、`--no-cache`、`--cache-ttl` 和
10
+ `--connect-timeout`;交互式 SSH 也应用连接超时,连接或认证失败后清除失效缓存。
11
+ - 修复 SCP 的 IPv6、SSH URI 和 `-l` 用户名覆盖处理,区分文件传输错误、远程命令错误
12
+ 与连接或认证错误,避免把远程程序的 `Permission denied` 误判为认证失败。
13
+ - 非交互密钥认证不再请求密码,密码自动填写兼容 `BatchMode` 配置;缺失 SSH 程序或
14
+ askpass 助手时返回可读错误,JSON 输出能处理非 UTF-8 远程输出。
15
+ - 忽略损坏、结构无效或时间戳异常的 SSH 缓存,保持凭证文件权限且不修改已有父目录权限。
16
+ - 新增真实 OpenSSH 回归测试,覆盖参数、脚本、双向文件传输、主机密钥校验与远程任务。
17
+
18
+ ## 0.5.0
19
+
20
+ - 对齐 MiniMax H3 视频 API:支持 480P、4K、最长 30 秒、Skill、静音、水印和模型筛选,
21
+ 并允许只传尾帧或仅用素材生成。
22
+ - 新增 Qwen-Image 图片任务与 IndexTTS 2.5 语音任务命令,支持创建、查询、取消、删除、
23
+ 参考素材上传与登记,以及图片价格、语音价格和音色管理。
24
+ - 新增视频 Skill 查询、创建、更新和删除命令,并开放对应 MCP 读写分类。
25
+
5
26
  ## 0.4.4
6
27
 
7
28
  - 新增 WorkBuddy `MCP + Skill` Token 连接器,通过本地 stdio MCP 安全注入 API 公钥/私钥,
@@ -1,13 +1,13 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: compshare-cli
3
- Version: 0.4.4
3
+ Version: 0.5.1
4
4
  Summary: Command-line client for CompShare GPU compute and MiniMax H3
5
5
  Author: CompShare
6
6
  License-Expression: Apache-2.0
7
- Project-URL: Homepage, https://github.com/BennielAllan/compshare-cli
8
- Project-URL: Repository, https://github.com/BennielAllan/compshare-cli
9
- Project-URL: Changelog, https://github.com/BennielAllan/compshare-cli/blob/master/CHANGELOG.md
10
- Project-URL: Issues, https://github.com/BennielAllan/compshare-cli/issues
7
+ Project-URL: Homepage, https://github.com/compshare-cn/compshare-cli
8
+ Project-URL: Repository, https://github.com/compshare-cn/compshare-cli
9
+ Project-URL: Changelog, https://github.com/compshare-cn/compshare-cli/blob/master/CHANGELOG.md
10
+ Project-URL: Issues, https://github.com/compshare-cn/compshare-cli/issues
11
11
  Requires-Python: >=3.9
12
12
  Description-Content-Type: text/markdown
13
13
  License-File: LICENSE
@@ -27,14 +27,14 @@ Dynamic: license-file
27
27
 
28
28
  # CompShare CLI
29
29
 
30
- 在终端管理优云智算 GPU 实例、镜像、云盘、US3 挂载、独享带宽、团队资源和 MiniMax H3 视频任务。
30
+ 在终端管理优云智算 GPU 实例、镜像、云盘、US3 挂载、独享带宽、团队资源和 MiniMax H3 视频、图片、语音任务。
31
31
 
32
32
  - 交互式创建实例,实时查询规格、库存和价格
33
33
  - 支持批量生命周期操作、等待状态和跨地域查询
34
34
  - 支持可断线恢复的远程任务、状态查询和增量日志读取
35
35
  - 支持社区/自定义镜像、云盘、团队额度与账单
36
36
  - 支持独享带宽询价、购买、改配、退款预估及实例 EIP 切换
37
- - 支持创建、查询和取消 MiniMax H3 视频任务,并查看积分套餐包与余额
37
+ - 支持 MiniMax H3 视频、Qwen-Image 图片和 IndexTTS 2.5 语音任务,以及素材上传、视频 Skill 和积分查询
38
38
  - 默认中文帮助,可切换英文;所有命令支持 JSON 输出
39
39
  - 可通过 `compshare feedback` 反馈 CLI 问题和建议
40
40
 
@@ -82,17 +82,42 @@ compshare instance list --all
82
82
 
83
83
  # 连接实例
84
84
  compshare instance ssh INSTANCE_ID
85
+ compshare --json instance ssh INSTANCE_ID -- nvidia-smi
86
+ compshare --json instance ssh INSTANCE_ID -- sh -lc 'cd /workspace && pwd'
87
+
88
+ # 上传、下载文件或目录
89
+ compshare --json instance cp INSTANCE_ID ./model.bin :/workspace/model.bin
90
+ compshare --json instance cp INSTANCE_ID ./dataset :/workspace/dataset
91
+ compshare --json instance cp INSTANCE_ID :/workspace/results ./results
85
92
 
86
93
  # MiniMax H3:先预演,再创建
87
94
  compshare --json minimax create '一只猫在海边奔跑' --dry-run
88
95
  compshare --json minimax create '一只猫在海边奔跑' --yes
89
96
  compshare --json minimax points
90
97
 
98
+ # 图片:查看价格、创建任务、查询结果
99
+ compshare --json minimax image config
100
+ compshare --json minimax image create '一只戴着宇航头盔的猫' --resolution 1K --dry-run
101
+ compshare --json minimax image create '一只戴着宇航头盔的猫' --resolution 1K --yes
102
+ compshare --json minimax image show TASK_ID
103
+
104
+ # 语音:先查询可用音色,再创建任务
105
+ compshare --json minimax audio pricing
106
+ compshare --json minimax audio voices
107
+ compshare --json minimax audio create '你好,欢迎使用优云智算。' --voice-id VOICE_ID --dry-run
108
+ compshare --json minimax audio create '你好,欢迎使用优云智算。' --voice-id VOICE_ID --yes
109
+
91
110
  # 查看帮助
92
111
  compshare -h
93
112
  compshare instance -h
94
113
  ```
95
114
 
115
+ SSH 远程命令放在 `--` 后面,参数中的空格、引号和 `$` 会按原样传递;需要管道、重定向
116
+ 或 `&&` 时使用 `sh -lc '脚本'`。SSH 和文件传输共用一小时有效的连接缓存,重置密码或
117
+ 重装后可用 `--refresh` 强制刷新,`--no-cache` 禁用缓存。`--connect-timeout` 设置连接
118
+ 建立的最长时间(默认 30 秒),`ssh --timeout` 设置等待实例运行的时间;长任务使用
119
+ `instance job`。
120
+
96
121
  ## 命令概览
97
122
 
98
123
  ```text
@@ -103,7 +128,7 @@ compshare instance GPU 实例、规格、库存、价格和生命周期
103
128
  compshare image 平台、自定义、社区及共享镜像
104
129
  compshare storage 云盘和 US3 挂载
105
130
  compshare bandwidth 独享带宽和实例 EIP 带宽归属
106
- compshare minimax MiniMax H3 视频任务和积分
131
+ compshare minimax MiniMax H3 视频、图片、语音、Skill 和积分
107
132
  compshare team 团队、邀请、成员额度、账单和审计
108
133
  ```
109
134
 
@@ -1,13 +1,13 @@
1
1
  # CompShare CLI
2
2
 
3
- 在终端管理优云智算 GPU 实例、镜像、云盘、US3 挂载、独享带宽、团队资源和 MiniMax H3 视频任务。
3
+ 在终端管理优云智算 GPU 实例、镜像、云盘、US3 挂载、独享带宽、团队资源和 MiniMax H3 视频、图片、语音任务。
4
4
 
5
5
  - 交互式创建实例,实时查询规格、库存和价格
6
6
  - 支持批量生命周期操作、等待状态和跨地域查询
7
7
  - 支持可断线恢复的远程任务、状态查询和增量日志读取
8
8
  - 支持社区/自定义镜像、云盘、团队额度与账单
9
9
  - 支持独享带宽询价、购买、改配、退款预估及实例 EIP 切换
10
- - 支持创建、查询和取消 MiniMax H3 视频任务,并查看积分套餐包与余额
10
+ - 支持 MiniMax H3 视频、Qwen-Image 图片和 IndexTTS 2.5 语音任务,以及素材上传、视频 Skill 和积分查询
11
11
  - 默认中文帮助,可切换英文;所有命令支持 JSON 输出
12
12
  - 可通过 `compshare feedback` 反馈 CLI 问题和建议
13
13
 
@@ -55,17 +55,42 @@ compshare instance list --all
55
55
 
56
56
  # 连接实例
57
57
  compshare instance ssh INSTANCE_ID
58
+ compshare --json instance ssh INSTANCE_ID -- nvidia-smi
59
+ compshare --json instance ssh INSTANCE_ID -- sh -lc 'cd /workspace && pwd'
60
+
61
+ # 上传、下载文件或目录
62
+ compshare --json instance cp INSTANCE_ID ./model.bin :/workspace/model.bin
63
+ compshare --json instance cp INSTANCE_ID ./dataset :/workspace/dataset
64
+ compshare --json instance cp INSTANCE_ID :/workspace/results ./results
58
65
 
59
66
  # MiniMax H3:先预演,再创建
60
67
  compshare --json minimax create '一只猫在海边奔跑' --dry-run
61
68
  compshare --json minimax create '一只猫在海边奔跑' --yes
62
69
  compshare --json minimax points
63
70
 
71
+ # 图片:查看价格、创建任务、查询结果
72
+ compshare --json minimax image config
73
+ compshare --json minimax image create '一只戴着宇航头盔的猫' --resolution 1K --dry-run
74
+ compshare --json minimax image create '一只戴着宇航头盔的猫' --resolution 1K --yes
75
+ compshare --json minimax image show TASK_ID
76
+
77
+ # 语音:先查询可用音色,再创建任务
78
+ compshare --json minimax audio pricing
79
+ compshare --json minimax audio voices
80
+ compshare --json minimax audio create '你好,欢迎使用优云智算。' --voice-id VOICE_ID --dry-run
81
+ compshare --json minimax audio create '你好,欢迎使用优云智算。' --voice-id VOICE_ID --yes
82
+
64
83
  # 查看帮助
65
84
  compshare -h
66
85
  compshare instance -h
67
86
  ```
68
87
 
88
+ SSH 远程命令放在 `--` 后面,参数中的空格、引号和 `$` 会按原样传递;需要管道、重定向
89
+ 或 `&&` 时使用 `sh -lc '脚本'`。SSH 和文件传输共用一小时有效的连接缓存,重置密码或
90
+ 重装后可用 `--refresh` 强制刷新,`--no-cache` 禁用缓存。`--connect-timeout` 设置连接
91
+ 建立的最长时间(默认 30 秒),`ssh --timeout` 设置等待实例运行的时间;长任务使用
92
+ `instance job`。
93
+
69
94
  ## 命令概览
70
95
 
71
96
  ```text
@@ -76,7 +101,7 @@ compshare instance GPU 实例、规格、库存、价格和生命周期
76
101
  compshare image 平台、自定义、社区及共享镜像
77
102
  compshare storage 云盘和 US3 挂载
78
103
  compshare bandwidth 独享带宽和实例 EIP 带宽归属
79
- compshare minimax MiniMax H3 视频任务和积分
104
+ compshare minimax MiniMax H3 视频、图片、语音、Skill 和积分
80
105
  compshare team 团队、邀请、成员额度、账单和审计
81
106
  ```
82
107
 
@@ -9,7 +9,7 @@ PyPI Trusted Publishing 自动上传。仓库不需要保存 PyPI Token。
9
9
 
10
10
  | 字段 | 值 |
11
11
  | --- | --- |
12
- | Owner | `BennielAllan` |
12
+ | Owner | `compshare-cn` |
13
13
  | Repository | `compshare-cli` |
14
14
  | Workflow | `release.yml` |
15
15
  | Environment | `pypi` |
@@ -2,13 +2,13 @@
2
2
  "name": "CompShare",
3
3
  "name_zh": "优云智算",
4
4
  "name_en": "CompShare",
5
- "description": "Manage CompShare GPU instances, images, storage, networking, teams, and MiniMax H3 tasks.",
6
- "description_zh": "连接优云智算账户,查询和管理 GPU 实例、镜像、存储、网络、团队及 MiniMax H3 视频任务。",
7
- "description_en": "Manage CompShare GPU instances, images, storage, networking, teams, and MiniMax H3 tasks.",
5
+ "description": "Manage CompShare GPU instances, images, storage, networking, teams, and MiniMax H3 media tasks.",
6
+ "description_zh": "连接优云智算账户,查询和管理 GPU 实例、镜像、存储、网络、团队及 MiniMax H3 视频、图片和语音任务。",
7
+ "description_en": "Manage CompShare GPU instances, images, storage, networking, teams, and MiniMax H3 media tasks.",
8
8
  "source": "compshare",
9
9
  "type": "mcp",
10
10
  "auth_mode": "token",
11
- "version": "0.4.4",
11
+ "version": "0.5.1",
12
12
  "minWorkbuddyVersion": "5.0.0",
13
13
  "examples_zh": [
14
14
  "查询上海可用的 RTX 4090 GPU 规格、库存和价格",
@@ -7,7 +7,7 @@
7
7
  "--python",
8
8
  "3.11",
9
9
  "--from",
10
- "compshare-cli[mcp]==0.4.4",
10
+ "compshare-cli[mcp]==0.5.1",
11
11
  "compshare-mcp"
12
12
  ],
13
13
  "env": {
@@ -1,16 +1,16 @@
1
1
  ---
2
2
  name: compshare
3
- description: Manage CompShare GPU cloud resources and MiniMax H3 tasks through the controlled CompShare MCP bridge.
4
- description_zh: 通过受控 CompShare MCP 桥接查询和管理优云智算 GPU 云资源及 MiniMax H3 任务。
5
- description_en: Manage CompShare GPU cloud resources and MiniMax H3 tasks through the controlled CompShare MCP bridge.
6
- version: "0.4.4"
3
+ description: Manage CompShare GPU cloud resources and MiniMax H3 media tasks through the controlled CompShare MCP bridge.
4
+ description_zh: 通过受控 CompShare MCP 桥接查询和管理优云智算 GPU 云资源及 MiniMax H3 视频、图片和语音任务。
5
+ description_en: Manage CompShare GPU cloud resources and MiniMax H3 media tasks through the controlled CompShare MCP bridge.
6
+ version: "0.5.1"
7
7
  author: "CompShare"
8
8
  ---
9
9
 
10
10
  # CompShare 优云智算
11
11
 
12
12
  通过本 Connector 提供的 MCP 工具查询和管理 GPU 实例、镜像、云盘、US3、独享带宽、
13
- 团队资源与 MiniMax H3 视频任务。凭证由 WorkBuddy Token 表单注入;不要要求用户在对话中
13
+ 团队资源与 MiniMax H3 视频、图片和语音任务。凭证由 WorkBuddy Token 表单注入;不要要求用户在对话中
14
14
  发送公钥、私钥或模型 API Key。
15
15
 
16
16
  本 Connector 不提供产品知识库问答。用户询问产品文档或政策时,不要猜测,也不要尝试调用
@@ -37,7 +37,7 @@ author: "CompShare"
37
37
  ### `compshare_status`
38
38
 
39
39
  检查 WorkBuddy 是否注入 GPU API 公钥/私钥、当前 CLI 版本和 API 连通性。`minimaxApiKey`
40
- 为 `false` 只影响 MiniMax H3,不影响 GPU 资源。认证失败时,让用户在 Connector 设置中更新
40
+ 为 `false` 只影响 MiniMax H3 媒体任务,不影响 GPU 资源。认证失败时,让用户在 Connector 设置中更新
41
41
  凭证;不要改用 `compshare config`,也不要索取聊天中的明文密钥。
42
42
 
43
43
  ```json
@@ -161,12 +161,15 @@ JSON 创建至少提供 GPU、每实例 GPU 数、CPU、内存、镜像、Region
161
161
  MiniMax 使用 Token 表单中的独立 `COMPSHARE_MINIMAX_API_KEY`。缺失时让用户编辑 Connector
162
162
  凭证,不要把 GPU API 私钥当作模型 Key。
163
163
 
164
- 创建前先读取积分、套餐、已有任务,再通过只读工具调用 `minimax create --dry-run`。展示
165
- 分辨率、时长、比例、素材 URL 和费用影响后确认,使用相同幂等键调用写工具正式创建。
166
- 重试不确定请求时必须复用原幂等键。取消未完成任务也属于写操作。
164
+ 视频创建前先读取积分、套餐、已有任务,再通过只读工具调用 `minimax create --dry-run`。
165
+ 图片先读取 `minimax image config`,语音先读取 `minimax audio pricing` 和
166
+ `minimax audio voices`;再用相应的 `create --dry-run` 预演。展示分辨率、时长、比例、
167
+ 素材及费用影响后确认,使用相同幂等键调用写工具正式创建。重试不确定请求时必须复用
168
+ 原幂等键。取消、删除任务和上传参考素材也属于写操作。
167
169
 
168
- 所有图片、视频和音频输入必须是公开可访问 URL。生成视频 URL 默认脱敏;不要为了显示它
169
- 而绕过连接器的敏感输出限制。
170
+ 视频素材支持公开 URL 或 Data URL;图片和语音参考素材通过 `image upload`、
171
+ `audio upload` 登记后使用资产 ID。生成结果 URL 默认脱敏;不要为了显示它而绕过连接器
172
+ 的敏感输出限制。
170
173
 
171
174
  ## 故障恢复
172
175
 
@@ -37,8 +37,8 @@
37
37
  "required": false,
38
38
  "placeholder": "模型 API 服务 → API KEY(sk-ml-...)",
39
39
  "placeholder_en": "Model API Service -> API KEY (sk-ml-...)",
40
- "description": "仅在通过连接器创建或管理 MiniMax H3 视频任务时需要。",
41
- "description_en": "Required only for creating or managing MiniMax H3 video tasks through this connector."
40
+ "description": "仅在通过连接器创建或管理 MiniMax H3 视频、图片或语音任务时需要。",
41
+ "description_en": "Required only for creating or managing MiniMax H3 video, image, or speech tasks through this connector."
42
42
  }
43
43
  ]
44
44
  }
@@ -23,10 +23,10 @@ dependencies = [
23
23
  ]
24
24
 
25
25
  [project.urls]
26
- Homepage = "https://github.com/BennielAllan/compshare-cli"
27
- Repository = "https://github.com/BennielAllan/compshare-cli"
28
- Changelog = "https://github.com/BennielAllan/compshare-cli/blob/master/CHANGELOG.md"
29
- Issues = "https://github.com/BennielAllan/compshare-cli/issues"
26
+ Homepage = "https://github.com/compshare-cn/compshare-cli"
27
+ Repository = "https://github.com/compshare-cn/compshare-cli"
28
+ Changelog = "https://github.com/compshare-cn/compshare-cli/blob/master/CHANGELOG.md"
29
+ Issues = "https://github.com/compshare-cn/compshare-cli/issues"
30
30
 
31
31
  [project.optional-dependencies]
32
32
  dev = [
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: compshare-cli
3
- description: Manage CompShare GPU cloud resources and MiniMax H3 video tasks through the compshare CLI. Use when Codex needs to install or configure compshare-cli, search GPU specifications and inventory, inspect pricing, create or manage instances, connect over SSH, transfer files, run durable remote jobs, manage images, disks, US3, teams or billing, create or inspect MiniMax H3 videos, or diagnose CLI problems.
3
+ description: Manage CompShare GPU cloud resources and MiniMax H3 video, image, and speech tasks through the compshare CLI. Use when Codex needs to install or configure compshare-cli, search GPU specifications and inventory, inspect pricing, create or manage instances, connect over SSH, transfer files, run durable remote jobs, manage images, disks, US3, teams or billing, create or inspect MiniMax H3 media, or diagnose CLI problems.
4
4
  ---
5
5
 
6
6
  # CompShare CLI
@@ -281,7 +281,7 @@ team invite/member/quota/billing
281
281
 
282
282
  Treat image deletion, disk deletion, disk detach/resize, quota changes and team mutations as state-changing operations. Read the current resource and request confirmation before adding `--yes` where supported.
283
283
 
284
- ## MiniMax H3 video tasks
284
+ ## MiniMax H3 media tasks
285
285
 
286
286
  Inspect points and existing work before creating a task:
287
287
 
@@ -306,7 +306,9 @@ compshare --json minimax create 'A sailboat crossing a golden sea' \
306
306
 
307
307
  Use `--first-frame` and `--last-frame` for frame-driven video, or repeat
308
308
  `--reference-image`, `--reference-video` and `--reference-audio` for reference-driven video.
309
- All media inputs must be publicly accessible URLs. For callbacks, pass `--callback-url` and set
309
+ Video supports 480P, 768P, 1080P, 2K and 4K and durations from 4 to 30 seconds. Use
310
+ `minimax skill list` to find a Skill, then pass both `--context-ir` and `--skill-id`.
311
+ Video inputs may use publicly accessible URLs or Data URLs. For callbacks, pass `--callback-url` and set
310
312
  `COMPSHARE_MINIMAX_CALLBACK_TOKEN` if the receiver validates a token.
311
313
  Generated video URLs stay redacted unless the user explicitly needs them and `--show-sensitive`
312
314
  is added as a root option.
@@ -317,6 +319,41 @@ Cancellation reads the current task before submitting the request:
317
319
  compshare --json minimax cancel TASK_ID --yes
318
320
  ```
319
321
 
322
+ For images, inspect current pricing before creating a task. Each request creates one image:
323
+
324
+ ```bash
325
+ compshare --json minimax image config
326
+ compshare --json minimax image list --status queued
327
+ compshare --json minimax image create 'A cat on the moon' --resolution 1K \
328
+ --idempotency-key IMAGE_REQUEST_ID --dry-run
329
+ compshare --json minimax image create 'A cat on the moon' --resolution 1K \
330
+ --idempotency-key IMAGE_REQUEST_ID --yes
331
+ compshare --json minimax image show TASK_ID
332
+ ```
333
+
334
+ For reference images, `minimax image upload FILE --width PIXELS --height PIXELS --yes`
335
+ returns an asset ID; repeat `--reference-asset ASSET_ID` when creating an image. Check the
336
+ actual dimensions before upload because the API validates them.
337
+
338
+ For speech, inspect pricing and voices before creating a task:
339
+
340
+ ```bash
341
+ compshare --json minimax audio pricing
342
+ compshare --json minimax audio voices --kind preset
343
+ compshare --json minimax audio create 'Hello from CompShare.' --voice-id VOICE_ID \
344
+ --idempotency-key SPEECH_REQUEST_ID --dry-run
345
+ compshare --json minimax audio create 'Hello from CompShare.' --voice-id VOICE_ID \
346
+ --idempotency-key SPEECH_REQUEST_ID --yes
347
+ compshare --json minimax audio show TASK_ID
348
+ ```
349
+
350
+ For an authorized reference recording, `minimax audio upload FILE --duration-ms MS --yes`
351
+ returns an asset ID. Use `--voice-source asset --asset-id ASSET_ID`, or save it with
352
+ `minimax audio voice-create ASSET_ID NAME --yes` and then use `--voice-source custom --voice-id VOICE_ID`.
353
+ Generated image and speech URLs stay redacted unless the user explicitly needs them and
354
+ `--show-sensitive` is added as a root option. Download speech output promptly; the API retains
355
+ it for seven days. Deleting a finished task also removes its output.
356
+
320
357
  ## Diagnostics and feedback
321
358
 
322
359
  ```bash
@@ -1,3 +1,3 @@
1
1
  """CompShare command-line client."""
2
2
 
3
- __version__ = "0.4.4"
3
+ __version__ = "0.5.1"
@@ -2,7 +2,6 @@ from __future__ import annotations
2
2
 
3
3
  import os
4
4
  import shlex
5
- import subprocess
6
5
  import sys
7
6
  import time
8
7
  from datetime import datetime
@@ -64,8 +63,10 @@ from compshare_cli.ssh import (
64
63
  execute_captured,
65
64
  execute_captured_with_password,
66
65
  execute_with_password,
66
+ run_command,
67
67
  scp_download_command,
68
68
  scp_upload_command,
69
+ ssh_login_command,
69
70
  )
70
71
  from compshare_cli.ssh_cache import DEFAULT_TTL, SSHCredentialCache
71
72
 
@@ -495,8 +496,7 @@ def _remote_job_connection(
495
496
  raise UsageError(tr("Instance {instance} has no SSH login command.", instance=instance))
496
497
  raw_password = host.get("Password")
497
498
  password = decode_password(str(raw_password)) if raw_password is not None else None
498
- argv = [*shlex.split(str(login_command))]
499
- argv[1:1] = ["-o", f"ConnectTimeout={connect_timeout}"]
499
+ argv = ssh_login_command(login_command, connect_timeout=connect_timeout)
500
500
  argv.append(shell_command(script))
501
501
  return argv, password, credential_source
502
502
 
@@ -540,9 +540,9 @@ def _remote_job_records(
540
540
 
541
541
 
542
542
  def _remote_job_stream(state: Runtime, instance: str, script: str) -> int:
543
- argv, password, credential_source = _remote_job_connection(state, instance, script)
544
- exit_code = execute_with_password(argv, password) if password else subprocess.call(argv)
545
- if exit_code == 255 and credential_source == "cache":
543
+ argv, password, _ = _remote_job_connection(state, instance, script)
544
+ exit_code = execute_with_password(argv, password) if password else run_command(argv)
545
+ if exit_code == 255:
546
546
  SSHCredentialCache().delete(_ssh_cache_profile(state), instance)
547
547
  return exit_code
548
548
 
@@ -2891,16 +2891,14 @@ def ssh(
2891
2891
  password = decode_password(str(raw_password)) if raw_password is not None else None
2892
2892
  if not command:
2893
2893
  raise UsageError(tr("Instance {instance} has no SSH login command.", instance=instance))
2894
- argv = [*shlex.split(command), *(remote_command or [])]
2894
+ argv = ssh_login_command(command, connect_timeout=connect_timeout)
2895
2895
  if remote_command:
2896
- argv[1:1] = ["-o", f"ConnectTimeout={connect_timeout}"]
2896
+ argv.append(joined_command(remote_command))
2897
2897
  if print_only or (state.json_output and not remote_command):
2898
2898
  Renderer(state.json_output, state.show_sensitive).data(
2899
2899
  {
2900
2900
  "instance": instance,
2901
- "command": command
2902
- if not remote_command
2903
- else f"{command} {shlex.join(remote_command)}",
2901
+ "command": shlex.join(argv),
2904
2902
  "password": password,
2905
2903
  "credential_source": credential_source,
2906
2904
  }
@@ -2920,7 +2918,7 @@ def ssh(
2920
2918
  "code": execution.error_code,
2921
2919
  "message": message,
2922
2920
  }
2923
- if credential_source == "cache" and execution.phase in {
2921
+ if use_cache and execution.phase in {
2924
2922
  "authentication",
2925
2923
  "connection",
2926
2924
  "ssh",
@@ -2956,21 +2954,13 @@ def ssh(
2956
2954
  err=True,
2957
2955
  )
2958
2956
  else:
2959
- if exit_code == 255 and credential_source == "cache":
2957
+ if exit_code == 255 and use_cache:
2960
2958
  SSHCredentialCache().delete(_ssh_cache_profile(state), instance)
2961
2959
  raise typer.Exit(exit_code)
2962
2960
  if password and not state.show_sensitive:
2963
2961
  typer.echo(tr("Password hidden; rerun with --show-sensitive to display it."))
2964
- elif not password:
2965
- typer.echo(
2966
- tr(
2967
- "The API did not return a password. Run `compshare instance password {instance}` "
2968
- "to set one.",
2969
- instance=instance,
2970
- )
2971
- )
2972
- exit_code = subprocess.call(argv)
2973
- if exit_code == 255 and credential_source == "cache":
2962
+ exit_code = run_command(argv)
2963
+ if exit_code == 255 and use_cache:
2974
2964
  SSHCredentialCache().delete(_ssh_cache_profile(state), instance)
2975
2965
  raise typer.Exit(exit_code)
2976
2966
 
@@ -2994,6 +2984,22 @@ def cp(
2994
2984
  "--auto-password/--no-auto-password",
2995
2985
  help="Automatically enter the password returned by the API.",
2996
2986
  ),
2987
+ connect_timeout: int = typer.Option(
2988
+ 30, "--connect-timeout", min=1, help="Maximum SSH connection time in seconds."
2989
+ ),
2990
+ use_cache: bool = typer.Option(
2991
+ True,
2992
+ "--cache/--no-cache",
2993
+ help="Cache SSH connection data to avoid repeated instance queries.",
2994
+ ),
2995
+ cache_ttl: int = typer.Option(
2996
+ DEFAULT_TTL, "--cache-ttl", min=1, help="SSH connection cache lifetime in seconds."
2997
+ ),
2998
+ refresh: bool = typer.Option(
2999
+ False,
3000
+ "--refresh",
3001
+ help="Refresh SSH connection data from the API before connecting.",
3002
+ ),
2997
3003
  ) -> None:
2998
3004
  source_is_remote = source_path.startswith(":")
2999
3005
  destination_is_remote = destination_path.startswith(":")
@@ -3019,14 +3025,16 @@ def cp(
3019
3025
  raise UsageError(tr("Remote path cannot be empty."))
3020
3026
 
3021
3027
  state = runtime(ctx)
3022
- _, _, host = locate_instance(state, instance)
3028
+ _, _, host, _ = _locate_ssh_instance(
3029
+ state, instance, use_cache=use_cache, refresh=refresh, cache_ttl=cache_ttl
3030
+ )
3023
3031
  login_command = host.get("SshLoginCommand")
3024
3032
  raw_password = host.get("Password")
3025
3033
  password = decode_password(str(raw_password)) if raw_password is not None else None
3026
3034
  if not login_command:
3027
3035
  raise UsageError(tr("Instance {instance} has no SSH login command.", instance=instance))
3028
3036
  try:
3029
- ssh_argv = shlex.split(str(login_command))
3037
+ ssh_argv = ssh_login_command(login_command, connect_timeout=connect_timeout)
3030
3038
  if direction == "download":
3031
3039
  argv = scp_download_command(ssh_argv, remote_path, str(local), recursive=True)
3032
3040
  else:
@@ -3061,6 +3069,8 @@ def cp(
3061
3069
  "code": execution.error_code,
3062
3070
  "message": message,
3063
3071
  }
3072
+ if use_cache and execution.phase in {"authentication", "connection", "ssh"}:
3073
+ SSHCredentialCache().delete(_ssh_cache_profile(state), instance)
3064
3074
  Renderer(True, state.show_sensitive).data(
3065
3075
  {
3066
3076
  "instance": instance,
@@ -3084,15 +3094,12 @@ def cp(
3084
3094
  err=True,
3085
3095
  )
3086
3096
  else:
3097
+ if exit_code == 255 and use_cache:
3098
+ SSHCredentialCache().delete(_ssh_cache_profile(state), instance)
3087
3099
  raise typer.Exit(exit_code)
3088
3100
  if password and not state.show_sensitive:
3089
3101
  typer.echo(tr("Password hidden; rerun with --show-sensitive to display it."))
3090
- elif not password:
3091
- typer.echo(
3092
- tr(
3093
- "The API did not return a password. Run `compshare instance password {instance}` "
3094
- "to set one.",
3095
- instance=instance,
3096
- )
3097
- )
3098
- raise typer.Exit(subprocess.call(argv))
3102
+ exit_code = run_command(argv)
3103
+ if exit_code == 255 and use_cache:
3104
+ SSHCredentialCache().delete(_ssh_cache_profile(state), instance)
3105
+ raise typer.Exit(exit_code)