@pippit-dev/cli 1.0.26 → 1.0.27

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 (35) hide show
  1. package/README.md +23 -1
  2. package/checksums.txt +6 -6
  3. package/cmd/generate_image/generate_image.go +1 -0
  4. package/cmd/generate_video/generate_video.go +4 -3
  5. package/cmd/model.go +74 -0
  6. package/cmd/model_test.go +81 -0
  7. package/cmd/root.go +1 -0
  8. package/cmd/short_drama/short_drama.go +1 -0
  9. package/cmd/source_test.go +179 -0
  10. package/cmd/submit_run.go +3 -0
  11. package/cmd/update/update.go +1 -1
  12. package/cmd/video_tool/video_tool.go +2 -0
  13. package/dist/checksums.txt +6 -6
  14. package/internal/common/submit_run.go +38 -1
  15. package/internal/config/config.go +13 -10
  16. package/internal/config/config_test.go +3 -0
  17. package/internal/generate_image/generate_image.go +2 -1
  18. package/internal/generate_video/generate_video.go +12 -3
  19. package/internal/generate_video/generate_video_test.go +126 -0
  20. package/internal/models/describe.go +281 -0
  21. package/internal/models/describe_test.go +199 -0
  22. package/internal/models/models.go +220 -0
  23. package/internal/models/models_test.go +200 -0
  24. package/internal/short_drama/submit_run.go +2 -0
  25. package/internal/video_tool/video_tool.go +4 -2
  26. package/package.json +1 -1
  27. package/skills/short-drama/SKILL.md +4 -0
  28. package/skills/xyq-nest-skill/SKILL.md +10 -0
  29. package/skills/xyq-nest-skill/commands/erase-video-subtitle.md +2 -0
  30. package/skills/xyq-nest-skill/commands/generate-image.md +2 -0
  31. package/skills/xyq-nest-skill/commands/generate-video.md +31 -7
  32. package/skills/xyq-nest-skill/commands/model.md +59 -0
  33. package/skills/xyq-nest-skill/commands/video-super-resolution.md +2 -0
  34. package/skills/xyq-nest-skill/scripts/ensure-cli.js +2 -2
  35. package/skills/xyq-nest-skill/scripts/install.md +1 -1
@@ -9,7 +9,7 @@ const path = require("path");
9
9
  const REQUIRED_COMMANDS = [
10
10
  "status", "login", "logout", "query-result",
11
11
  "generate-image", "generate-video", "video-super-resolution",
12
- "erase-video-subtitle", "get-credit-balance",
12
+ "erase-video-subtitle", "get-credit-balance", "model list", "model describe",
13
13
  ];
14
14
 
15
15
  function npmCommand() {
@@ -79,7 +79,7 @@ function ensureCLI({ canvas = false } = {}) {
79
79
  if (expectedVersion && version !== expectedVersion) {
80
80
  throw new Error(`CLI 版本 ${version} 与 npm 包版本 ${expectedVersion} 不一致。`);
81
81
  }
82
- const commands = REQUIRED_COMMANDS.map((command) => [command]);
82
+ const commands = REQUIRED_COMMANDS.map((command) => command.split(" "));
83
83
  if (canvas) {
84
84
  for (const command of ["create", "get", "allocate", "upload", "apply"]) commands.push(["canvas", command]);
85
85
  }
@@ -10,7 +10,7 @@ node "{baseDir}/scripts/ensure-cli.js"
10
10
 
11
11
  ## 查找与复用
12
12
 
13
- 脚本依次检查 PATH 中的 CLI 和自身缓存,验证版本及本 Skill 使用命令的 `--help`;命令集合维护在脚本的 `REQUIRED_COMMANDS`。帮助检查不调用生成服务,也不需要凭据,不证明账号权限或服务端运行状态。
13
+ 脚本依次检查 PATH 中的 CLI 和自身缓存,验证版本及本 Skill 使用命令的 `--help`;命令集合维护在脚本的 `REQUIRED_COMMANDS`,包含 `model list` 和 `model describe`。帮助检查不调用生成服务,也不需要凭据,不证明账号权限或服务端运行状态。
14
14
 
15
15
  命令齐全则直接复用,不检查最新版本;不存在或缺少必需命令时,获取 `@pippit-dev/cli@latest`。PATH 旧版本缺少命令但缓存完整时复用缓存,避免每次升级。版本命令不能运行或检查超时则报告运行错误。
16
16