dsh-lovart-mcp 0.16.0 → 0.17.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 +2 -0
- package/client.js +1 -1
- package/lib/panel.mjs +1 -1
- package/lib/pricing.mjs +34 -4
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -71,6 +71,8 @@ dsh plugin install dsh-lovart-mcp
|
|
|
71
71
|
| Seedance 2.0 Fast 5 秒 720p | 70 |
|
|
72
72
|
| Seedance 2.0 5 秒 720p / 1080p | 90 / 250 |
|
|
73
73
|
| Seedance 2.5 Flash 5 秒 720p(含音频) | 101 |
|
|
74
|
+
| Hailuo 02 6 秒 768P(文生视频) | 12 |
|
|
75
|
+
| Vidu Q1 5 秒 1080p(参考图生视频,需 `images`) | 28 |
|
|
74
76
|
| 放大 / 矢量化 / 分层 / 改图 | 4 / 9 / 5 / 17 |
|
|
75
77
|
|
|
76
78
|
按 Pro 月付折算,1 积分约 $0.0082。其他模型的价格 Lovart 没有公开,插件会在花分前把估算和「需要确认」一起给你。
|
package/client.js
CHANGED
|
@@ -5,7 +5,7 @@ window.__ModuleLoader__.load({
|
|
|
5
5
|
factory(require) {
|
|
6
6
|
const React = require('react')
|
|
7
7
|
const h = React.createElement
|
|
8
|
-
const API = '/lovart-panel/api'
|
|
8
|
+
const API = '/lovart-panel-v1/api'
|
|
9
9
|
|
|
10
10
|
const cardStyle = {
|
|
11
11
|
border: '1px solid var(--dsw-alias-border-subtle, rgba(127,127,127,.25))',
|
package/lib/panel.mjs
CHANGED
|
@@ -4,7 +4,7 @@ import { callTool } from './mcp-call.mjs'
|
|
|
4
4
|
import { readProjects } from './account-data.mjs'
|
|
5
5
|
import { listTasks, loadLedger } from './ledger.mjs'
|
|
6
6
|
|
|
7
|
-
export const PANEL_API = '/lovart-panel/api'
|
|
7
|
+
export const PANEL_API = '/lovart-panel-v1/api'
|
|
8
8
|
const CREDITS_TTL_MS = 60_000
|
|
9
9
|
const PROJECTS_TTL_MS = 60_000
|
|
10
10
|
|
package/lib/pricing.mjs
CHANGED
|
@@ -58,36 +58,56 @@ export const VIDEO_MODELS = {
|
|
|
58
58
|
label: 'Seedance 2.0',
|
|
59
59
|
defaultResolution: '720p',
|
|
60
60
|
per5s: { '720p': 90, '1080p': 250 },
|
|
61
|
+
perSecond: { '720p': 18, '1080p': 50 },
|
|
61
62
|
measured: true,
|
|
62
63
|
},
|
|
63
64
|
'seedance/seedance-2-0-fast': {
|
|
64
65
|
label: 'Seedance 2.0 Fast',
|
|
65
66
|
defaultResolution: '720p',
|
|
66
67
|
per5s: { '720p': 70 },
|
|
68
|
+
perSecond: { '720p': 14 },
|
|
67
69
|
measured: true,
|
|
68
70
|
},
|
|
69
71
|
'seedance/seedance-2-0-mini': {
|
|
70
72
|
label: 'Seedance 2.0 Mini',
|
|
71
73
|
defaultResolution: '720p',
|
|
72
74
|
per5s: { '720p': 50 },
|
|
75
|
+
perSecond: { '720p': 10 },
|
|
73
76
|
measured: true,
|
|
74
77
|
},
|
|
75
78
|
'seedance/seedance-2-5-flash': {
|
|
76
79
|
label: 'Seedance 2.5 Flash',
|
|
77
80
|
defaultResolution: '720p',
|
|
78
81
|
per5s: { '720p': 101 },
|
|
82
|
+
perSecond: { '720p': 20.2 },
|
|
79
83
|
measured: true,
|
|
80
84
|
},
|
|
81
85
|
'kling/kling-v4-flash': {
|
|
82
86
|
label: 'Kling 4.0 Flash',
|
|
83
87
|
defaultResolution: '720p',
|
|
84
88
|
per5s: { '720p': 45 },
|
|
89
|
+
perSecond: { '720p': 9 },
|
|
85
90
|
measured: true,
|
|
86
91
|
},
|
|
87
92
|
'wan/wan-2-5-preview': {
|
|
88
93
|
label: 'Wan 2.5',
|
|
89
94
|
defaultResolution: '720p',
|
|
90
95
|
per5s: { '720p': 25 },
|
|
96
|
+
perSecond: { '720p': 5 },
|
|
97
|
+
measured: true,
|
|
98
|
+
},
|
|
99
|
+
'minimax/minimax-hailuo-02': {
|
|
100
|
+
label: 'Hailuo 02',
|
|
101
|
+
defaultResolution: '768p',
|
|
102
|
+
per5s: { '768p': 12 },
|
|
103
|
+
perSecond: { '768p': 2 },
|
|
104
|
+
measured: true,
|
|
105
|
+
},
|
|
106
|
+
'vidu/vidu-q1': {
|
|
107
|
+
label: 'Vidu Q1',
|
|
108
|
+
defaultResolution: '1080p',
|
|
109
|
+
per5s: { '1080p': 28 },
|
|
110
|
+
perSecond: { '1080p': 5.6 },
|
|
91
111
|
measured: true,
|
|
92
112
|
},
|
|
93
113
|
}
|
|
@@ -198,16 +218,26 @@ export function estimateVideo({ model, resolution, duration, count = 1 }) {
|
|
|
198
218
|
const res = resolution === undefined || String(resolution).trim() === '' || /K$/ui.test(String(resolution))
|
|
199
219
|
? entry.defaultResolution
|
|
200
220
|
: String(resolution).toLowerCase()
|
|
201
|
-
const
|
|
221
|
+
const pickRate = (table) => {
|
|
222
|
+
if (table === undefined) return undefined
|
|
223
|
+
const key = Object.keys(table).find((candidate) => candidate.toLowerCase() === res.toLowerCase())
|
|
224
|
+
return key === undefined ? undefined : table[key]
|
|
225
|
+
}
|
|
226
|
+
const per5s = pickRate(entry.per5s)
|
|
227
|
+
const perSecond = pickRate(entry.perSecond)
|
|
202
228
|
const seconds = Math.max(1, Number(duration) || 5)
|
|
203
|
-
const units = Math.max(1, Math.ceil(seconds / 5))
|
|
204
229
|
const countUnits = Math.max(1, Number(count) || 1)
|
|
205
|
-
const
|
|
230
|
+
const perOutput = typeof perSecond === 'number'
|
|
231
|
+
? Math.round(perSecond * seconds)
|
|
232
|
+
: typeof per5s === 'number'
|
|
233
|
+
? per5s * Math.max(1, Math.ceil(seconds / 5))
|
|
234
|
+
: null
|
|
235
|
+
const credits = perOutput === null ? null : perOutput * countUnits
|
|
206
236
|
return {
|
|
207
237
|
model: chosen,
|
|
208
238
|
label: entry.label,
|
|
209
239
|
credits,
|
|
210
|
-
perOutput
|
|
240
|
+
perOutput,
|
|
211
241
|
resolution: res,
|
|
212
242
|
seconds,
|
|
213
243
|
count: countUnits,
|