skillfree 0.1.10 → 0.1.12

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/SKILL.md CHANGED
@@ -112,10 +112,10 @@ skillfree pilot --type tts --text "你好世界" --output hello.mp3
112
112
 
113
113
  ```bash
114
114
  # 文生视频(自动轮询,完成后显示下载链接)
115
- skillfree pilot --type video --model wan2.6-t2v --prompt "波浪翻涌的海面,黄昏时分"
115
+ skillfree pilot --type video --model kling-v2-6-text2video --prompt "大龙虾在海底漫步"
116
116
 
117
117
  # 自动下载到本地
118
- skillfree pilot --type video --model wan2.6-t2v --prompt "波浪翻涌的海面" --output ./video.mp4
118
+ skillfree pilot --type video --model kling-v2-6-text2video --prompt "大龙虾在海底漫步" --output ./video.mp4
119
119
 
120
120
  # 超时后手动查询进度(使用提交时返回的 task_id)
121
121
  skillfree task <task_id>
@@ -126,13 +126,11 @@ skillfree task <task_id> --output ./video.mp4
126
126
 
127
127
  | 模型ID | 名称 | 积分 | 最适合的场景 |
128
128
  |--------|------|------|-------------|
129
- | `wan2.6-t2v` | Wan2.6 文生视频 | 50 | **性价比首选**。阿里出品,中文prompt理解好,5秒视频,画面连贯 |
130
- | `wan2.6-i2v` | Wan2.6 图生视频 | 50 | 给一张图,让它动起来,适合产品展示 |
131
- | `paiwo-v5.6-ttv` | 拍我 5.6 文生视频 | 160 | 更高质量,适合商业级视频内容制作 |
132
- | `paiwo-v5.6-itv` | 拍我 5.6 图生视频 | 160 | 图片转视频,质量更高 |
129
+ | `kling-v2-6-text2video` | 可灵 2.6 文生视频 | 427 | **默认首选**。快手出品,运动物理感最真实,商业广告级别 |
130
+ | `kling-v2-6-image2video` | 可灵 2.6 图生视频 | 427 | 图生视频旗舰,电影级画质 |
131
+ | `paiwo-v5.6-ttv` | 拍我 5.6 文生视频 | 160 | 性价比较高,适合商业级视频内容制作 |
132
+ | `paiwo-v5.6-itv` | 拍我 5.6 图生视频 | 160 | 图片转视频,质量较高 |
133
133
  | `paiwo-v5.6-itv2` | 拍我 5.6 首尾帧 | 214 | **首尾帧控制**。指定视频开始和结束画面,精准控制故事走向 |
134
- | `kling-v2-6-text2video` | 可灵 2.6 文生视频 | 427 | **顶级视频质量**。快手出品,运动物理感最真实,商业广告级别 |
135
- | `kling-v2-6-image2video` | 可灵 2.6 图生视频 | 427 | 图生视频中的旗舰,电影级画质 |
136
134
 
137
135
  ---
138
136
 
package/bin/skillfree.js CHANGED
@@ -66,21 +66,48 @@ program
66
66
  // ── task(查询异步任务状态)────────────────────────────────────────────────────
67
67
  program
68
68
  .command('task <taskId>')
69
- .description('查询异步任务状态(视频等)')
69
+ .description('查询异步任务状态(视频/音乐等)')
70
70
  .option('--output <path>', '任务完成后自动下载到本地')
71
71
  .action(async (taskId, flags) => {
72
72
  const { request } = require('../scripts/lib/client')
73
+ const fs = require('fs')
74
+
75
+ // Suno 任务用 suno:xxx 格式区分
76
+ if (taskId.startsWith('suno:')) {
77
+ const sunoId = taskId.slice(5)
78
+ const poll = await request('/suno/fetch/' + sunoId, { method: 'GET' })
79
+ const result = await poll.json()
80
+ if (result.code !== 'success') throw new Error(result.message || JSON.stringify(result))
81
+ const status = result.data?.status
82
+ const songs = result.data?.data || []
83
+ console.log(`\n📋 Suno 任务 ${sunoId}`)
84
+ console.log(` 状态:${status}`)
85
+ if (status === 'SUCCESS') {
86
+ songs.forEach((s, i) => {
87
+ console.log(` 歌曲${i+1}:${s.title} ${s.audio_url}`)
88
+ })
89
+ if (flags.output && songs[0]?.audio_url) {
90
+ const resp = await fetch(songs[0].audio_url)
91
+ fs.writeFileSync(flags.output, Buffer.from(await resp.arrayBuffer()))
92
+ console.log(`✅ 已下载到 ${flags.output}`)
93
+ } else {
94
+ console.log(`\n💡 下载:skillfree task ${taskId} --output ./music.mp3`)
95
+ }
96
+ } else {
97
+ console.log(`\n⏳ 仍在生成中,稍后再查...`)
98
+ }
99
+ return
100
+ }
101
+
102
+ // 视频任务
73
103
  const res = await request(`/v1/tasks/${taskId}`, { method: 'GET' })
74
104
  const task = await res.json()
75
105
  console.log(`\n📋 任务 ${taskId}`)
76
106
  console.log(` 状态:${task.status}`)
77
107
  console.log(` 模型:${task.model}`)
78
108
  if (task.status === 'completed' && task.output_url) {
79
- console.log(` 视频:${task.output_url}`)
109
+ console.log(` 链接:${task.output_url}`)
80
110
  if (flags.output) {
81
- const { downloadAndSave } = require('../scripts/commands/pilot')
82
- // 直接 fetch 下载
83
- const fs = require('fs')
84
111
  const resp = await fetch(task.output_url)
85
112
  fs.writeFileSync(flags.output, Buffer.from(await resp.arrayBuffer()))
86
113
  console.log(`✅ 已下载到 ${flags.output}`)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "skillfree",
3
- "version": "0.1.10",
3
+ "version": "0.1.12",
4
4
  "description": "🦞 一个 API,满足所有龙虾技能需求",
5
5
  "main": "bin/skillfree.js",
6
6
  "bin": {
@@ -231,7 +231,7 @@ async function pilot(flags) {
231
231
  }
232
232
  if (status === 'FAILED') throw new Error('Suno 任务失败: ' + JSON.stringify(result.data))
233
233
  }
234
- throw new Error('Suno 生成超时(150s),请手动查询 task_id: ' + taskId)
234
+ throw new Error(`Suno 生成超时(150s),任务仍在后台运行\n📋 稍后手动查询:skillfree task suno:${taskId}`)
235
235
 
236
236
  } else {
237
237
  // music-2.5(MiniMax),走 /v1/responses,需要 lyrics
@@ -335,7 +335,7 @@ async function pilot(flags) {
335
335
  // ── VIDEO ─────────────────────────────────────────────────────────────────────
336
336
  if (type === 'video') {
337
337
  if (!prompt) throw new Error('--prompt 是必需的(视频描述)')
338
- const videoModel = model || 'wan2.6-t2v'
338
+ const videoModel = model || 'kling-v2-6-text2video'
339
339
 
340
340
  // 1. 提交任务
341
341
  process.stdout.write(`🎬 提交视频任务(${videoModel})...`)