@sogni-ai/sogni-creative-agent-skill 3.71.1 → 3.72.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/.agents/skills/sogni-creative-agent-skill/SKILL.md +1 -1
- package/.agents/skills/sogni-creative-agent-skill/references/h3-video-loras.md +3 -3
- package/.agents/skills/sogni-creative-agent-skill/references/hosted-api.md +2 -2
- package/.agents/skills/sogni-creative-agent-skill/references/image-prompting.md +1 -1
- package/.agents/skills/sogni-creative-agent-skill/references/long-jobs-and-queues.md +57 -0
- package/.agents/skills/sogni-creative-agent-skill/references/models.md +2 -2
- package/.agents/skills/sogni-creative-agent-skill/references/private-mature-video.md +1 -2
- package/.agents/skills/sogni-creative-agent-skill/references/video-prompting.md +10 -10
- package/.claude-plugin/plugin.json +1 -1
- package/.codex-plugin/plugin.json +1 -1
- package/CHANGELOG.md +13 -0
- package/README.md +8 -5
- package/SKILL.md +6 -6
- package/desktop-extension/manifest.json +1 -1
- package/generated/creative-agent-runtime.mjs +1 -1
- package/llm.txt +5 -0
- package/openclaw.plugin.json +1 -1
- package/package.json +5 -3
- package/plugin-skills/sogni-creative-agent/SKILL.md +2 -2
- package/progress-events.mjs +186 -0
- package/references/h3-video-loras.md +3 -3
- package/references/hosted-api.md +2 -2
- package/references/image-prompting.md +1 -1
- package/references/long-jobs-and-queues.md +57 -0
- package/references/models.md +2 -2
- package/references/private-mature-video.md +1 -2
- package/references/video-prompting.md +10 -10
- package/render-accounting.mjs +213 -0
- package/skill-package.json +1 -1
- package/sogni-agent.mjs +790 -54
- package/sogni-app-id.mjs +141 -45
- package/version.mjs +1 -1
|
@@ -0,0 +1,186 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* --progress-events: one `SOGNI_EVENT <json>` stderr line per lifecycle event
|
|
3
|
+
* the Sogni SDK reports while a render waits or runs. Each line carries only
|
|
4
|
+
* what the server sent; nothing here estimates a time or a percentage.
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
export const SOGNI_EVENT_PREFIX = 'SOGNI_EVENT ';
|
|
8
|
+
|
|
9
|
+
// A countdown or step stream arrives about once a second. Each kind of line
|
|
10
|
+
// prints at most once per interval for a project; a phase change prints at once.
|
|
11
|
+
export const PROGRESS_EVENT_INTERVAL_MS = 5000;
|
|
12
|
+
|
|
13
|
+
// The phase each event announces. A time-left line belongs to no phase: the
|
|
14
|
+
// countdown runs through queueing, model loading and rendering alike.
|
|
15
|
+
const EVENT_PHASES = {
|
|
16
|
+
queued: 'queued',
|
|
17
|
+
'model-loading': 'model-loading',
|
|
18
|
+
started: 'started',
|
|
19
|
+
progress: 'running',
|
|
20
|
+
retry: 'retry',
|
|
21
|
+
eta: null
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
function finiteNumber(value) {
|
|
25
|
+
return typeof value === 'number' && Number.isFinite(value) ? value : undefined;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* Line writer with the per-project throttle. A line whose event starts a new
|
|
30
|
+
* phase prints at once and drops every line still waiting. Otherwise each event
|
|
31
|
+
* kind prints its first line, then at most one line per interval: the newest
|
|
32
|
+
* one waiting when the interval has passed. A line identical to the last one
|
|
33
|
+
* of its kind never prints. `close(projectId)` drops waiting lines once the
|
|
34
|
+
* project has ended.
|
|
35
|
+
*/
|
|
36
|
+
export function createProgressEventWriter({
|
|
37
|
+
write,
|
|
38
|
+
now = Date.now,
|
|
39
|
+
setTimer = setTimeout,
|
|
40
|
+
clearTimer = clearTimeout,
|
|
41
|
+
intervalMs = PROGRESS_EVENT_INTERVAL_MS
|
|
42
|
+
}) {
|
|
43
|
+
const projects = new Map();
|
|
44
|
+
const projectState = (key) => {
|
|
45
|
+
if (!projects.has(key)) projects.set(key, { phase: null, kinds: new Map() });
|
|
46
|
+
return projects.get(key);
|
|
47
|
+
};
|
|
48
|
+
const kindState = (project, event) => {
|
|
49
|
+
if (!project.kinds.has(event)) project.kinds.set(event, { lastLine: null, lastAt: -Infinity, pending: null, timer: null });
|
|
50
|
+
return project.kinds.get(event);
|
|
51
|
+
};
|
|
52
|
+
const print = (slot, line) => {
|
|
53
|
+
slot.lastLine = line;
|
|
54
|
+
slot.lastAt = now();
|
|
55
|
+
write(`${SOGNI_EVENT_PREFIX}${line}\n`);
|
|
56
|
+
};
|
|
57
|
+
const cancel = (slot) => {
|
|
58
|
+
if (slot.timer) clearTimer(slot.timer);
|
|
59
|
+
slot.timer = null;
|
|
60
|
+
slot.pending = null;
|
|
61
|
+
};
|
|
62
|
+
|
|
63
|
+
return {
|
|
64
|
+
emit(event, projectId, fields = {}) {
|
|
65
|
+
if (!Object.hasOwn(EVENT_PHASES, event)) return;
|
|
66
|
+
const payload = { event, ...(projectId ? { projectId } : {}) };
|
|
67
|
+
for (const [key, value] of Object.entries(fields)) {
|
|
68
|
+
if (value !== undefined) payload[key] = value;
|
|
69
|
+
}
|
|
70
|
+
const line = JSON.stringify(payload);
|
|
71
|
+
const project = projectState(projectId || '');
|
|
72
|
+
const slot = kindState(project, event);
|
|
73
|
+
const phase = EVENT_PHASES[event];
|
|
74
|
+
if (phase && phase !== project.phase) {
|
|
75
|
+
for (const other of project.kinds.values()) cancel(other);
|
|
76
|
+
project.phase = phase;
|
|
77
|
+
print(slot, line);
|
|
78
|
+
return;
|
|
79
|
+
}
|
|
80
|
+
if (line === slot.lastLine) {
|
|
81
|
+
cancel(slot);
|
|
82
|
+
return;
|
|
83
|
+
}
|
|
84
|
+
const waitMs = slot.lastAt + intervalMs - now();
|
|
85
|
+
if (waitMs <= 0) {
|
|
86
|
+
cancel(slot);
|
|
87
|
+
print(slot, line);
|
|
88
|
+
return;
|
|
89
|
+
}
|
|
90
|
+
slot.pending = line;
|
|
91
|
+
if (slot.timer) return;
|
|
92
|
+
slot.timer = setTimer(() => {
|
|
93
|
+
slot.timer = null;
|
|
94
|
+
const pending = slot.pending;
|
|
95
|
+
slot.pending = null;
|
|
96
|
+
if (pending && pending !== slot.lastLine) print(slot, pending);
|
|
97
|
+
}, waitMs);
|
|
98
|
+
slot.timer?.unref?.();
|
|
99
|
+
},
|
|
100
|
+
close(projectId) {
|
|
101
|
+
const project = projects.get(projectId || '');
|
|
102
|
+
if (!project) return;
|
|
103
|
+
for (const slot of project.kinds.values()) cancel(slot);
|
|
104
|
+
}
|
|
105
|
+
};
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
/**
|
|
109
|
+
* Follow one SDK client's project, job and retry events for the projects
|
|
110
|
+
* `allow(projectId)` accepts, writing them through `writer`. The percentage is
|
|
111
|
+
* the SDK's own figure for the whole project. Returns a function that stops
|
|
112
|
+
* following.
|
|
113
|
+
*/
|
|
114
|
+
export function attachProgressEvents(sdk, { allow, writer }) {
|
|
115
|
+
const projectsApi = sdk?.projects;
|
|
116
|
+
const socket = sdk?.apiClient?.socket;
|
|
117
|
+
if (typeof projectsApi?.on !== 'function') return () => {};
|
|
118
|
+
|
|
119
|
+
const projectPercent = (projectId) => {
|
|
120
|
+
const tracked = Array.isArray(projectsApi.trackedProjects)
|
|
121
|
+
? projectsApi.trackedProjects.find((project) => project?.id === projectId)
|
|
122
|
+
: null;
|
|
123
|
+
return finiteNumber(tracked?.progress);
|
|
124
|
+
};
|
|
125
|
+
|
|
126
|
+
const onProject = (event) => {
|
|
127
|
+
if (!event?.projectId || !allow(event.projectId)) return;
|
|
128
|
+
if (event.type === 'queued') {
|
|
129
|
+
writer.emit('queued', event.projectId, {
|
|
130
|
+
queuePosition: finiteNumber(event.queuePosition),
|
|
131
|
+
startsInSeconds: finiteNumber(event.estimatedStartSeconds)
|
|
132
|
+
});
|
|
133
|
+
} else if (event.type === 'completed' || event.type === 'error') {
|
|
134
|
+
writer.close(event.projectId);
|
|
135
|
+
}
|
|
136
|
+
};
|
|
137
|
+
|
|
138
|
+
const onJob = (event) => {
|
|
139
|
+
if (!event?.projectId || !allow(event.projectId)) return;
|
|
140
|
+
switch (event.type) {
|
|
141
|
+
case 'initiating':
|
|
142
|
+
writer.emit('model-loading', event.projectId);
|
|
143
|
+
break;
|
|
144
|
+
case 'started':
|
|
145
|
+
writer.emit('started', event.projectId);
|
|
146
|
+
break;
|
|
147
|
+
case 'progress': {
|
|
148
|
+
const etaSeconds = finiteNumber(event.etaSeconds);
|
|
149
|
+
writer.emit('progress', event.projectId, {
|
|
150
|
+
percent: projectPercent(event.projectId),
|
|
151
|
+
step: finiteNumber(event.step),
|
|
152
|
+
stepCount: finiteNumber(event.stepCount),
|
|
153
|
+
// The worker sends 0 when it has no estimate for this step.
|
|
154
|
+
etaSeconds: etaSeconds > 0 ? etaSeconds : undefined
|
|
155
|
+
});
|
|
156
|
+
break;
|
|
157
|
+
}
|
|
158
|
+
case 'jobETA': {
|
|
159
|
+
const etaSeconds = finiteNumber(event.etaSeconds);
|
|
160
|
+
if (etaSeconds !== undefined) writer.emit('eta', event.projectId, { etaSeconds });
|
|
161
|
+
break;
|
|
162
|
+
}
|
|
163
|
+
default:
|
|
164
|
+
break;
|
|
165
|
+
}
|
|
166
|
+
};
|
|
167
|
+
|
|
168
|
+
// The SDK handles a reassigned render internally and emits no job event for
|
|
169
|
+
// it, so the retry notice is read from the socket frame itself.
|
|
170
|
+
const onRetry = (data) => {
|
|
171
|
+
if (!data?.jobID || !allow(data.jobID)) return;
|
|
172
|
+
writer.emit('retry', data.jobID, {
|
|
173
|
+
attempt: finiteNumber(data.attempt),
|
|
174
|
+
maxAttempts: finiteNumber(data.maxAttempts)
|
|
175
|
+
});
|
|
176
|
+
};
|
|
177
|
+
|
|
178
|
+
projectsApi.on('project', onProject);
|
|
179
|
+
projectsApi.on('job', onJob);
|
|
180
|
+
if (typeof socket?.on === 'function') socket.on('jobRetry', onRetry);
|
|
181
|
+
return () => {
|
|
182
|
+
projectsApi.off?.('project', onProject);
|
|
183
|
+
projectsApi.off?.('job', onJob);
|
|
184
|
+
socket?.off?.('jobRetry', onRetry);
|
|
185
|
+
};
|
|
186
|
+
}
|
|
@@ -16,7 +16,7 @@ Video LoRAs are a different shape from the Krea 2 image sliders:
|
|
|
16
16
|
|
|
17
17
|
## Selecting a compatible model
|
|
18
18
|
|
|
19
|
-
|
|
19
|
+
When MiniMax H3 is selected for loose visual references and the creator has opted to use the Sensitive Content Filter off, prefer **Prism** (`minimax-h3-r2v-prism`) or `minimax-h3-r2v-prism-2stage` for two-stage, 1080p or 2K. Both require `--no-filter`. Otherwise use `minimax-h3-r2v-balanced` or `minimax-h3-r2v-balanced-2stage`. Keep the requested model and check compatibility with any requested LoRA. For Personal LoRAs, use a tier listed in the authenticated catalog for that LoRA.
|
|
20
20
|
|
|
21
21
|
LoRAs attach to the resolved H3 model, so name the mode in the same command:
|
|
22
22
|
|
|
@@ -25,8 +25,8 @@ LoRAs attach to the resolved H3 model, so name the mode in the same command:
|
|
|
25
25
|
| Text-to-video | `-m minimax-h3-t2v` (`-turbo`) | `minimax-h3-fl2va-fp8_t2v` |
|
|
26
26
|
| Image-to-video | `-m minimax-h3-i2v` (`-turbo`) | `minimax-h3-fl2va-fp8_i2v` |
|
|
27
27
|
| First+last frame | `-m minimax-h3-flf2v` (`-turbo`) | `minimax-h3-fl2va-fp8_flf2v` |
|
|
28
|
-
| Balanced reference-to-video (default) | `-m minimax-h3-r2v-balanced` | `minimax-h3-ref2va-fp8_r2v_balanced` |
|
|
29
|
-
| Prism reference-to-video (
|
|
28
|
+
| Balanced reference-to-video (filter-on default) | `-m minimax-h3-r2v-balanced` | `minimax-h3-ref2va-fp8_r2v_balanced` |
|
|
29
|
+
| Prism reference-to-video (filter-off default; `--no-filter`) | `-m minimax-h3-r2v-prism` (`-2stage`) | `minimax-h3-prism-int8_r2v` |
|
|
30
30
|
| Standard reference-to-video (explicit choice) | `-m minimax-h3-r2v` (`-turbo`) | `minimax-h3-ref2va-fp8_r2v` |
|
|
31
31
|
| FastH3 text-to-video | `-m minimax-h3-fasth3-t2v-turbo` | `minimax-h3-fastvideo-int8_t2v_turbo` |
|
|
32
32
|
| FastH3 image-to-video | `-m minimax-h3-fasth3-i2v-turbo` | `minimax-h3-fastvideo-int8_i2v_turbo` |
|
package/references/hosted-api.md
CHANGED
|
@@ -354,9 +354,9 @@ Submit these media tools as durable workflow steps (`toolName` and `arguments`)
|
|
|
354
354
|
|
|
355
355
|
Negative indices address uploads (-1 first); non-negative indices address generated results. 3D views are from the subject's perspective: left means the subject's own left side faces camera (subject faces screen-left), right means screen-right. Supply original images of the same subject at consistent height and framing; any subset of the three orbit views enables multi-view reconstruction. Keep the GLB in the model artifact lane, never feed it into an image tool.
|
|
356
356
|
|
|
357
|
-
|
|
357
|
+
When MiniMax H3 is selected for loose visual references and the creator has opted to use the Sensitive Content Filter off, prefer **Prism** (`minimax-h3-r2v-prism`) or `minimax-h3-r2v-prism-2stage` for two-stage, 1080p or 2K. Otherwise use `minimax-h3-r2v-balanced` or `minimax-h3-r2v-balanced-2stage`. Keep the requested model and check compatibility with any requested LoRA.
|
|
358
358
|
|
|
359
|
-
For two-stage Turbo H3, use explicit `minimax-h3-fasth3-*-turbo-2stage` selectors on the relevant video tool with `targetResolution`. For 1080p or 2K
|
|
359
|
+
For two-stage Turbo H3, use explicit `minimax-h3-fasth3-*-turbo-2stage` selectors on the relevant video tool with `targetResolution`. For 1080p or 2K Reference to Video, send the matching two-stage selector on `generate_video` with `targetResolution` set to 1080 or 1440. Prism requires the filter to be explicitly off in the hosted request. Audio-guided IA2V/FLFA2V/A2V selectors belong on `sound_to_video` and require the uploaded audio plus their named endpoint images. They preserve the supplied audio and reject LoRAs. Other H3 modes, FastH3 Reference included, discover personal LoRAs through the [authenticated catalog](personal-loras.md).
|
|
360
360
|
|
|
361
361
|
## MiniMax H3 keyframes in hosted tools
|
|
362
362
|
|
|
@@ -64,7 +64,7 @@ Prompt-only families return the directly runnable prompt with no label,
|
|
|
64
64
|
Markdown fence, preamble, explanation, or render offer.
|
|
65
65
|
|
|
66
66
|
<!-- BEGIN GENERATED PROMPT GUIDE: image-models -->
|
|
67
|
-
<!-- Generated by npm run sync:prompt-guides from @sogni-ai/sogni-intelligence-client 4.32.
|
|
67
|
+
<!-- Generated by npm run sync:prompt-guides from @sogni-ai/sogni-intelligence-client 4.32.2; edit the rules there, not here. -->
|
|
68
68
|
|
|
69
69
|
## Per-model rules from Sogni's image prompt writer
|
|
70
70
|
|
|
@@ -115,6 +115,63 @@ then.
|
|
|
115
115
|
later, and `--wait` needs 5.58.0; an older installation says so and asks for a
|
|
116
116
|
skill update.
|
|
117
117
|
|
|
118
|
+
## Price, charge and progress for host apps
|
|
119
|
+
|
|
120
|
+
Three opt-in flags let an app show a render's price before it starts, what it
|
|
121
|
+
cost afterwards, and its queue and time-left status while it runs. Without them
|
|
122
|
+
the output is unchanged.
|
|
123
|
+
|
|
124
|
+
```bash
|
|
125
|
+
# Price this exact request and exit; nothing is submitted.
|
|
126
|
+
sogni-agent --quote --json -m z_image_turbo_bf16 -w 1024 -h 1024 "A red bicycle against a brick wall"
|
|
127
|
+
|
|
128
|
+
# Render, report what Sogni recorded as the charge, and print status lines.
|
|
129
|
+
sogni-agent --json --receipt --progress-events --video -m minimax-h3-fasth3-t2v-turbo --duration 5 -o clip.mp4 "Waves at sunset"
|
|
130
|
+
sogni-agent --json --receipt --progress-events --result <projectId> --wait -o clip.mp4
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
`--quote` resolves every priced setting the way the render would (model id,
|
|
134
|
+
size, count, steps, frames or duration, fps, network, token type) and prints
|
|
135
|
+
`{ "type": "quote", "media", "model", "network", "tokenType", "settings",
|
|
136
|
+
"price", "partnerModel", "planCovered", "plan", "time", "dailyFairUsePct",
|
|
137
|
+
"balance" }`. `price` is Sogni's quote for all outputs; on partner models
|
|
138
|
+
(Seedance, Seedream, GPT Image, HappyHorse, Wan 3) a member with a plan
|
|
139
|
+
discount also gets `memberPrice`, the quote after that discount. Sogni settles
|
|
140
|
+
some partner models from the vendor's actual usage, so the charge it records
|
|
141
|
+
(`--receipt`) can differ slightly from the quote. Partner models are never
|
|
142
|
+
plan-covered. `planCovered` is the CLI's reading of the
|
|
143
|
+
account; Sogni decides again when the render is submitted. `time` holds Sogni's
|
|
144
|
+
own estimate (`renderSeconds`, `queueSeconds`, `totalSeconds`) and is absent
|
|
145
|
+
when Sogni has none for these settings; `dailyFairUsePct` and `balance` appear
|
|
146
|
+
only when known. A request Sogni cannot quote (a looping return clip,
|
|
147
|
+
`--multi-angle`, source reels, hosted chat and workflows, Wan 3
|
|
148
|
+
`--smart-duration`, music or speech on Relaxed) fails with
|
|
149
|
+
`errorCode: "QUOTE_UNAVAILABLE"`; a lost connection keeps its own error.
|
|
150
|
+
|
|
151
|
+
`--receipt` adds `charge` to a finished render's JSON and to `--result`:
|
|
152
|
+
`paidBy` (`plan`, `spark`, `sogni` or `credit` for promotional credit) comes
|
|
153
|
+
from Sogni's project record, `amount` is what left the balances (all zero when
|
|
154
|
+
the plan paid) and `value` is the work's price as Sogni recorded it. When the
|
|
155
|
+
record cannot be read or does not say, `charge` is `null` and
|
|
156
|
+
`chargeUnavailable` gives the reason. It costs one extra request per project,
|
|
157
|
+
after the project finished.
|
|
158
|
+
|
|
159
|
+
`--progress-events` writes one stderr line per lifecycle event, beside the usual
|
|
160
|
+
progress lines, also with `-q`:
|
|
161
|
+
|
|
162
|
+
```text
|
|
163
|
+
SOGNI_EVENT {"event":"queued","projectId":"…","queuePosition":3,"startsInSeconds":45}
|
|
164
|
+
SOGNI_EVENT {"event":"model-loading","projectId":"…"}
|
|
165
|
+
SOGNI_EVENT {"event":"started","projectId":"…"}
|
|
166
|
+
SOGNI_EVENT {"event":"progress","projectId":"…","percent":40,"step":12,"stepCount":30,"etaSeconds":95}
|
|
167
|
+
SOGNI_EVENT {"event":"eta","projectId":"…","etaSeconds":95}
|
|
168
|
+
SOGNI_EVENT {"event":"retry","projectId":"…","attempt":2,"maxAttempts":3}
|
|
169
|
+
```
|
|
170
|
+
|
|
171
|
+
A field appears only when the server sent it. Each kind of line prints at most
|
|
172
|
+
once every 5 seconds per project (the newest value then); a new phase prints at
|
|
173
|
+
once.
|
|
174
|
+
|
|
118
175
|
## Fast, Relaxed and Priority
|
|
119
176
|
|
|
120
177
|
`--network fast|relaxed` selects the worker network for a render. `--priority` is a per-run opt-in for paid Unlimited or Unlimited Pro on Fast: earlier queue placement behind Premium Spark, with daily and monthly fair-use consumption at 1.5×. Explain that tradeoff and use it only when requested. It applies to covered worker models, excluding third-party vendor models, Relaxed, token billing, hosted chat and hosted workflows. It does not make the GPU faster. If refused, show the error and let the user choose standard Fast or Relaxed. Never retry or spend Premium Spark automatically.
|
package/references/models.md
CHANGED
|
@@ -1704,12 +1704,12 @@ model recommendations.
|
|
|
1704
1704
|
| MiniMax H3 LightX2V Turbo image-to-video from one first frame | `minimax-h3-i2v-turbo` with `--ref` |
|
|
1705
1705
|
| MiniMax H3 LightX2V Turbo first frame → last frame transition | `minimax-h3-flf2v-turbo` with `--ref A --ref-end B` |
|
|
1706
1706
|
| MiniMax H3 Ref2VA Turbo from loose references | `minimax-h3-r2v-turbo` with `--ref`/`-c`, repeatable `--ref-video`, and repeatable `--ref-audio` |
|
|
1707
|
-
| MiniMax H3 from loose references (default: Balanced R2V) | `minimax-h3-r2v-balanced` with the same references as `minimax-h3-r2v` |
|
|
1707
|
+
| MiniMax H3 from loose references (filter-on default: Balanced R2V) | `minimax-h3-r2v-balanced` with the same references as `minimax-h3-r2v` |
|
|
1708
1708
|
| MiniMax H3 FastH3 Turbo text-to-video | `minimax-h3-fasth3-turbo` or `minimax-h3-fasth3-t2v-turbo` |
|
|
1709
1709
|
| MiniMax H3 FastH3 Turbo image-to-video | `minimax-h3-fasth3-i2v-turbo` with `--ref` |
|
|
1710
1710
|
| MiniMax H3 FastH3 Turbo first frame → last frame | `minimax-h3-fasth3-flf2v-turbo` with `--ref A --ref-end B` |
|
|
1711
1711
|
| MiniMax H3 1080p or 2K (FastH3 Two-Stage, delivered at twice the canvas) | `minimax-h3-fasth3-turbo-2stage` (2K default; `--target-resolution 1080` or `720`), or `minimax-h3-fasth3-t2v-turbo-2stage` / `-i2v-turbo-2stage` / `-flf2v-turbo-2stage` |
|
|
1712
|
-
| MiniMax H3 1080p or 2K reference-to-video (Ref2VA Two-Stage, delivered at twice the canvas) | `minimax-h3-r2v-balanced-2stage` (
|
|
1712
|
+
| MiniMax H3 1080p or 2K reference-to-video (Ref2VA Two-Stage, delivered at twice the canvas) | `minimax-h3-r2v-balanced-2stage` (Balanced with the filter on; use `minimax-h3-r2v-prism-2stage` with `--no-filter` when the filter is off) with the same references as `minimax-h3-r2v`; 2K default, `--target-resolution 1080` or `720` |
|
|
1713
1713
|
| MiniMax H3 video driven by the user's own voice or song | `minimax-h3-fasth3-ia2v-turbo` (`--ref` + `--ref-audio`), `minimax-h3-fasth3-flfa2v-turbo` (`--ref` + `--ref-end` + `--ref-audio`), or `minimax-h3-fasth3-a2v-turbo` (`--ref-audio`); add `-2stage` for Two-Stage |
|
|
1714
1714
|
| Face lip-sync with uploaded audio | `wan_v2.2-14b-fp8_s2v_lightx2v` |
|
|
1715
1715
|
|
|
@@ -38,8 +38,7 @@ Other models:
|
|
|
38
38
|
merge of two MiniMax H3 reference-to-video finetunes that renders adult scenes
|
|
39
39
|
more realistically, the most consistent MiniMax H3 model for mature themes
|
|
40
40
|
and the default here (see [Routing](#routing)); for 1080p or 2K use its
|
|
41
|
-
two-stage form, `minimax-h3-r2v-prism-2stage`.
|
|
42
|
-
for other work; both require `--no-filter`. It takes
|
|
41
|
+
two-stage form, `minimax-h3-r2v-prism-2stage`. Both require explicit approval to use the filter off (`--no-filter`). It takes
|
|
43
42
|
Balanced R2V's references (up to 9 images, 3 videos and 3 audio clips, 12
|
|
44
43
|
files, at least one image or video), keyframes, LoRAs and six-field Ref2VA
|
|
45
44
|
prompt contract. It renders the 768p class (1344×768 by default,
|
|
@@ -124,7 +124,7 @@ LTX-2.5 text-to-video, one shot, so one sentence: "A medium shot frames a woman
|
|
|
124
124
|
```
|
|
125
125
|
|
|
126
126
|
<!-- BEGIN GENERATED PROMPT GUIDE: ltx-2.5 -->
|
|
127
|
-
<!-- Generated by npm run sync:prompt-guides from @sogni-ai/sogni-intelligence-client 4.32.
|
|
127
|
+
<!-- Generated by npm run sync:prompt-guides from @sogni-ai/sogni-intelligence-client 4.32.2; edit the rules there, not here. -->
|
|
128
128
|
|
|
129
129
|
### Sogni's prompt rules: ltx-2.5
|
|
130
130
|
|
|
@@ -179,7 +179,7 @@ Preserve requested visual style and production value without adding new objects,
|
|
|
179
179
|
<!-- END GENERATED PROMPT GUIDE: ltx-2.5 -->
|
|
180
180
|
|
|
181
181
|
<!-- BEGIN GENERATED PROMPT GUIDE: ltx-2.3 -->
|
|
182
|
-
<!-- Generated by npm run sync:prompt-guides from @sogni-ai/sogni-intelligence-client 4.32.
|
|
182
|
+
<!-- Generated by npm run sync:prompt-guides from @sogni-ai/sogni-intelligence-client 4.32.2; edit the rules there, not here. -->
|
|
183
183
|
|
|
184
184
|
### Sogni's prompt rules: ltx-2.3
|
|
185
185
|
|
|
@@ -227,7 +227,7 @@ Preserve requested visual style and production value without adding new objects,
|
|
|
227
227
|
|
|
228
228
|
## MiniMax H3 Prompting
|
|
229
229
|
|
|
230
|
-
|
|
230
|
+
When MiniMax H3 is selected for loose visual references and the creator has opted to use the Sensitive Content Filter off, prefer **Prism** (`minimax-h3-r2v-prism`) or `minimax-h3-r2v-prism-2stage` for two-stage, 1080p or 2K. Both require `--no-filter`. Otherwise use `minimax-h3-r2v-balanced` or `minimax-h3-r2v-balanced-2stage`. Keep the requested model and check compatibility with any requested LoRA.
|
|
231
231
|
|
|
232
232
|
Write every H3 prompt using MiniMax's official structured rewrite contract. Do
|
|
233
233
|
not substitute an unstructured prompt for the required fields. The field names,
|
|
@@ -977,7 +977,7 @@ the exact waveform-conditioned lip-sync input. Remote audio URLs and additional
|
|
|
977
977
|
audio references keep their existing handling.
|
|
978
978
|
|
|
979
979
|
<!-- BEGIN GENERATED PROMPT GUIDE: minimax-h3 -->
|
|
980
|
-
<!-- Generated by npm run sync:prompt-guides from @sogni-ai/sogni-intelligence-client 4.32.
|
|
980
|
+
<!-- Generated by npm run sync:prompt-guides from @sogni-ai/sogni-intelligence-client 4.32.2; edit the rules there, not here. -->
|
|
981
981
|
|
|
982
982
|
### Sogni's prompt rules: minimax-h3
|
|
983
983
|
|
|
@@ -1059,7 +1059,7 @@ FINAL ASSESSMENT: silently verify the exact field order, required alignment line
|
|
|
1059
1059
|
- Use stable (S1) speaker IDs and wrap exact spoken words in <d>[Language] ...</d>; keep visible text in exact double quotes.
|
|
1060
1060
|
- overall_soundscape owns diegetic ambience and effects; non_diegetic_music owns audience-only score and is N/A when there is none.
|
|
1061
1061
|
- Standard runs 20 steps with res_multistep/simple. Balanced uses fixed 8-step Euler/simple acceleration: LightX2V for FL2VA and Larry v4 for Ref2VA. FL2VA Turbo runs 4 steps with simple scheduling; er_sde is the default sampler, with euler and sa_solver available as explicit A/B variants. Ref2VA Turbo uses the exact upstream 4-step euler/simple recipe. All run at fixed 24 fps and guidance 1.
|
|
1062
|
-
-
|
|
1062
|
+
- For MiniMax video from loose references, honor a specified model first, then the eligible tier recommended by the session. Otherwise use minimax-h3-r2v-balanced, or minimax-h3-r2v-balanced-2stage for two-stage, 1080p or 2K.
|
|
1063
1063
|
- Standard, Balanced, and Turbo Ref2VA use exactly six ordered fields: subject_definitions, summary, retention_analysis, detailed_description, overall_soundscape, non_diegetic_music. The two-stage Ref2VA selectors (minimax-h3-r2v-2stage at 20 steps, minimax-h3-r2v-balanced-2stage at 8 steps) write the same six-field contract with the same references; only the delivered size changes. FastH3 Reference (minimax-h3-fasth3-r2v-turbo and its -2stage form, the FastH3 tier's reference-to-video) writes the same six-field contract.
|
|
1064
1064
|
- Ref2VA uses <Subject N> for reusable visible content, <Picture N> only for concrete keyframe/composition anchors, <Video N> for whole-video relationships, and <Audio N> for copied or referenced signals. It requires at least one image or video; audio alone is invalid.
|
|
1065
1065
|
- The FastH3 audio guide on sound_to_video (minimax-h3-fasth3-ia2v-turbo, minimax-h3-fasth3-flfa2v-turbo, minimax-h3-fasth3-a2v-turbo and their -2stage forms) writes the Base contract of its mode: image + audio as I2V, first/last frame + audio as FLF2V, audio only as T2V. The uploaded audio drives the picture from frame 0 and is the soundtrack, so describe what it contains and never add other dialogue or music. Use these selectors only when the user asks for MiniMax H3 or FastH3.
|
|
@@ -1195,7 +1195,7 @@ A low tracking shot races alongside a teal 1960s convertible down a sunlit coast
|
|
|
1195
1195
|
```
|
|
1196
1196
|
|
|
1197
1197
|
<!-- BEGIN GENERATED PROMPT GUIDE: seedance-2.5 -->
|
|
1198
|
-
<!-- Generated by npm run sync:prompt-guides from @sogni-ai/sogni-intelligence-client 4.32.
|
|
1198
|
+
<!-- Generated by npm run sync:prompt-guides from @sogni-ai/sogni-intelligence-client 4.32.2; edit the rules there, not here. -->
|
|
1199
1199
|
|
|
1200
1200
|
### Sogni's prompt rules: seedance-2.5
|
|
1201
1201
|
|
|
@@ -1269,7 +1269,7 @@ TARGET CAPABILITIES: Seedance 2.5 uses the same director-style prompt grammar an
|
|
|
1269
1269
|
<!-- END GENERATED PROMPT GUIDE: seedance-2.5 -->
|
|
1270
1270
|
|
|
1271
1271
|
<!-- BEGIN GENERATED PROMPT GUIDE: seedance-2.0 -->
|
|
1272
|
-
<!-- Generated by npm run sync:prompt-guides from @sogni-ai/sogni-intelligence-client 4.32.
|
|
1272
|
+
<!-- Generated by npm run sync:prompt-guides from @sogni-ai/sogni-intelligence-client 4.32.2; edit the rules there, not here. -->
|
|
1273
1273
|
|
|
1274
1274
|
### Sogni's prompt rules: seedance-2.0
|
|
1275
1275
|
|
|
@@ -1378,7 +1378,7 @@ writer uses close this section.
|
|
|
1378
1378
|
motion timing, camera path, framing, and background.
|
|
1379
1379
|
|
|
1380
1380
|
<!-- BEGIN GENERATED PROMPT GUIDE: wan-2.2 -->
|
|
1381
|
-
<!-- Generated by npm run sync:prompt-guides from @sogni-ai/sogni-intelligence-client 4.32.
|
|
1381
|
+
<!-- Generated by npm run sync:prompt-guides from @sogni-ai/sogni-intelligence-client 4.32.2; edit the rules there, not here. -->
|
|
1382
1382
|
|
|
1383
1383
|
### Sogni's prompt rules: wan-2.2
|
|
1384
1384
|
|
|
@@ -1468,7 +1468,7 @@ The rules Sogni's own prompt writer uses close this section.
|
|
|
1468
1468
|
- Prompts may run to 20,000 characters.
|
|
1469
1469
|
|
|
1470
1470
|
<!-- BEGIN GENERATED PROMPT GUIDE: wan-3 -->
|
|
1471
|
-
<!-- Generated by npm run sync:prompt-guides from @sogni-ai/sogni-intelligence-client 4.32.
|
|
1471
|
+
<!-- Generated by npm run sync:prompt-guides from @sogni-ai/sogni-intelligence-client 4.32.2; edit the rules there, not here. -->
|
|
1472
1472
|
|
|
1473
1473
|
### Sogni's prompt rules: wan-3
|
|
1474
1474
|
|
|
@@ -1523,7 +1523,7 @@ audio that is always on. What it renders well and the reference limits are in
|
|
|
1523
1523
|
[models.md § HappyHorse 1.1](./models.md#happyhorse-11-prompting-tips).
|
|
1524
1524
|
|
|
1525
1525
|
<!-- BEGIN GENERATED PROMPT GUIDE: happyhorse-1.1 -->
|
|
1526
|
-
<!-- Generated by npm run sync:prompt-guides from @sogni-ai/sogni-intelligence-client 4.32.
|
|
1526
|
+
<!-- Generated by npm run sync:prompt-guides from @sogni-ai/sogni-intelligence-client 4.32.2; edit the rules there, not here. -->
|
|
1527
1527
|
|
|
1528
1528
|
### Sogni's prompt rules: happyhorse-1.1
|
|
1529
1529
|
|
|
@@ -0,0 +1,213 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* --quote and --receipt: the price, plan coverage and time Sogni quotes for a
|
|
3
|
+
* request before it starts, and the charge Sogni recorded for a project after
|
|
4
|
+
* it finished. Prices and times come from Sogni; this module only arranges them.
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
/** Error code for a request Sogni cannot quote, as opposed to a network or account failure. */
|
|
8
|
+
export const QUOTE_UNAVAILABLE = 'QUOTE_UNAVAILABLE';
|
|
9
|
+
|
|
10
|
+
/** An Error with the QUOTE_UNAVAILABLE code and an optional hint. */
|
|
11
|
+
export function quoteUnavailableError(message, { hint, details, cause } = {}) {
|
|
12
|
+
const err = new Error(message);
|
|
13
|
+
err.code = QUOTE_UNAVAILABLE;
|
|
14
|
+
err.retryable = false;
|
|
15
|
+
if (hint) err.hint = hint;
|
|
16
|
+
if (details) err.details = details;
|
|
17
|
+
if (cause) err.cause = cause;
|
|
18
|
+
return err;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
/** A finite number from a Sogni amount (sent as a decimal string or a number), else undefined. */
|
|
22
|
+
export function parseAmount(value) {
|
|
23
|
+
if (value === null || value === undefined || value === '') return undefined;
|
|
24
|
+
const number = typeof value === 'number' ? value : Number.parseFloat(String(value));
|
|
25
|
+
return Number.isFinite(number) ? number : undefined;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
function compact(object) {
|
|
29
|
+
const out = {};
|
|
30
|
+
for (const [key, value] of Object.entries(object)) {
|
|
31
|
+
if (value !== undefined) out[key] = value;
|
|
32
|
+
}
|
|
33
|
+
return out;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
// Rounds away float noise from decimal arithmetic without changing a value
|
|
37
|
+
// Sogni could have sent: its amounts carry far fewer than 15 significant digits.
|
|
38
|
+
function tidy(value) {
|
|
39
|
+
return Number(value.toPrecision(15));
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
/** `{ spark, sogni, usd }` from an SDK cost estimate, each only when Sogni sent it. */
|
|
43
|
+
export function quotePrice(estimate) {
|
|
44
|
+
return compact({
|
|
45
|
+
spark: parseAmount(estimate?.spark),
|
|
46
|
+
sogni: parseAmount(estimate?.sogni),
|
|
47
|
+
usd: parseAmount(estimate?.usd)
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* Sogni's time estimate, or null when it sent none. The SDK returns the render
|
|
53
|
+
* and total seconds; Sogni computes the total as render plus queue wait
|
|
54
|
+
* (rounded to 0.01 s), so the wait is their difference at that precision.
|
|
55
|
+
*/
|
|
56
|
+
export function quoteTime(estimate) {
|
|
57
|
+
const renderSeconds = parseAmount(estimate?.estimatedRenderSeconds);
|
|
58
|
+
const totalSeconds = parseAmount(estimate?.estimatedTotalSeconds);
|
|
59
|
+
const queueSeconds = renderSeconds !== undefined && totalSeconds !== undefined
|
|
60
|
+
? Math.max(0, Math.round((totalSeconds - renderSeconds) * 100) / 100)
|
|
61
|
+
: undefined;
|
|
62
|
+
const time = compact({ renderSeconds, queueSeconds, totalSeconds });
|
|
63
|
+
return Object.keys(time).length ? time : null;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
/**
|
|
67
|
+
* The account's plan as `--quote` reports it: `{ active: false }` without a
|
|
68
|
+
* plan, `{ active: true, tier?, partnerDiscountBps? }` with one, or null when
|
|
69
|
+
* the plan could not be read.
|
|
70
|
+
*/
|
|
71
|
+
export function planFromSubscription(subscription) {
|
|
72
|
+
if (!subscription || typeof subscription !== 'object') return null;
|
|
73
|
+
if (subscription.active !== true) return { active: false };
|
|
74
|
+
const bps = parseAmount(subscription.frontierDiscountBps);
|
|
75
|
+
return compact({
|
|
76
|
+
active: true,
|
|
77
|
+
tier: typeof subscription.tier === 'string' && subscription.tier ? subscription.tier : undefined,
|
|
78
|
+
partnerDiscountBps: bps !== undefined && bps > 0 ? bps : undefined
|
|
79
|
+
});
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
/**
|
|
83
|
+
* Whether the plan would pay for the request, as the CLI reads the account:
|
|
84
|
+
* an active plan, a model plans cover (not a partner model), SPARK billing and
|
|
85
|
+
* no explicit token billing. Sogni decides again when the project is submitted.
|
|
86
|
+
*/
|
|
87
|
+
export function isPlanCovered({ plan, partnerModel, billingMode, tokenType }) {
|
|
88
|
+
return plan?.active === true && !partnerModel && billingMode !== 'tokens' && tokenType !== 'sogni';
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
/**
|
|
92
|
+
* The quote for a partner model after a member's discount: Sogni takes `bps`
|
|
93
|
+
* basis points off the Spark, SOGNI and USD amounts when it admits the project.
|
|
94
|
+
* Sogni settles some partner models from the vendor's actual usage, so the
|
|
95
|
+
* recorded charge can differ slightly. Null when there is no discount.
|
|
96
|
+
*/
|
|
97
|
+
export function memberPrice(price, bps) {
|
|
98
|
+
if (!(bps > 0) || bps >= 10000) return null;
|
|
99
|
+
const factor = (10000 - bps) / 10000;
|
|
100
|
+
const discounted = {};
|
|
101
|
+
for (const key of ['spark', 'sogni', 'usd']) {
|
|
102
|
+
if (price[key] !== undefined) discounted[key] = tidy(price[key] * factor);
|
|
103
|
+
}
|
|
104
|
+
return { ...discounted, discountBps: bps };
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
/** `{ spark, sogni, premiumSpark? }` from the wrapper's balance, or null when none could be read. */
|
|
108
|
+
export function quoteBalance(balance) {
|
|
109
|
+
if (!balance || typeof balance !== 'object') return null;
|
|
110
|
+
const out = compact({
|
|
111
|
+
spark: parseAmount(balance.spark),
|
|
112
|
+
sogni: parseAmount(balance.sogni),
|
|
113
|
+
premiumSpark: parseAmount(balance.premiumSpark)
|
|
114
|
+
});
|
|
115
|
+
return out.spark === undefined && out.sogni === undefined ? null : out;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
/** The `--quote --json` object, fields in the documented order. */
|
|
119
|
+
export function buildQuoteResult({
|
|
120
|
+
media, model, network, tokenType, settings, estimate, partnerModel, subscription, balance, billingMode
|
|
121
|
+
}) {
|
|
122
|
+
const price = quotePrice(estimate);
|
|
123
|
+
const plan = planFromSubscription(subscription);
|
|
124
|
+
const discount = partnerModel && plan?.active ? memberPrice(price, plan.partnerDiscountBps) : null;
|
|
125
|
+
const time = quoteTime(estimate);
|
|
126
|
+
const dailyFairUsePct = parseAmount(estimate?.dailyFairUsePct);
|
|
127
|
+
const balances = quoteBalance(balance);
|
|
128
|
+
return {
|
|
129
|
+
success: true,
|
|
130
|
+
type: 'quote',
|
|
131
|
+
media,
|
|
132
|
+
model,
|
|
133
|
+
network,
|
|
134
|
+
tokenType,
|
|
135
|
+
settings,
|
|
136
|
+
price,
|
|
137
|
+
...(discount ? { memberPrice: discount } : {}),
|
|
138
|
+
partnerModel: Boolean(partnerModel),
|
|
139
|
+
planCovered: isPlanCovered({ plan, partnerModel, billingMode, tokenType }),
|
|
140
|
+
...(plan ? { plan } : {}),
|
|
141
|
+
...(time ? { time } : {}),
|
|
142
|
+
...(dailyFairUsePct !== undefined ? { dailyFairUsePct } : {}),
|
|
143
|
+
...(balances ? { balance: balances } : {})
|
|
144
|
+
};
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
// Sogni's payment models, named for the person who paid.
|
|
148
|
+
const PAID_BY = {
|
|
149
|
+
subscription: 'plan',
|
|
150
|
+
paid_spark: 'spark',
|
|
151
|
+
free_spark: 'spark',
|
|
152
|
+
sogni: 'sogni',
|
|
153
|
+
promo_credit: 'credit'
|
|
154
|
+
};
|
|
155
|
+
|
|
156
|
+
function unavailable(reason) {
|
|
157
|
+
return { charge: null, chargeUnavailable: reason };
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
/**
|
|
161
|
+
* The charge Sogni recorded for one finished project record
|
|
162
|
+
* (`GET /v2/projects/:id`): who paid, what left the balances, and the work's
|
|
163
|
+
* value. Returns `{ charge }` or `{ charge: null, chargeUnavailable }`.
|
|
164
|
+
*/
|
|
165
|
+
export function chargeFromProjectRecord(record) {
|
|
166
|
+
if (!record || typeof record !== 'object') return unavailable('Sogni returned no record for this project.');
|
|
167
|
+
if (record.finished === false) return unavailable('Sogni had not finished this project when its record was read.');
|
|
168
|
+
const paidBy = PAID_BY[record.paymentModel];
|
|
169
|
+
if (!paidBy) return unavailable('Sogni did not record how this project was paid.');
|
|
170
|
+
const cost = record.costActual;
|
|
171
|
+
const value = compact({
|
|
172
|
+
spark: parseAmount(cost?.costInSpark),
|
|
173
|
+
sogni: parseAmount(cost?.costInSogni),
|
|
174
|
+
usd: parseAmount(cost?.costInUSD)
|
|
175
|
+
});
|
|
176
|
+
let amount;
|
|
177
|
+
if (paidBy === 'plan' || paidBy === 'credit') {
|
|
178
|
+
amount = { spark: 0, sogni: 0, usd: 0 };
|
|
179
|
+
} else if (paidBy === 'spark') {
|
|
180
|
+
if (value.spark === undefined) return unavailable('Sogni did not record this project\'s Spark cost.');
|
|
181
|
+
amount = { spark: value.spark, sogni: 0, usd: value.usd ?? 0 };
|
|
182
|
+
} else {
|
|
183
|
+
if (value.sogni === undefined) return unavailable('Sogni did not record this project\'s SOGNI cost.');
|
|
184
|
+
amount = { spark: 0, sogni: value.sogni, usd: value.usd ?? 0 };
|
|
185
|
+
}
|
|
186
|
+
return { charge: { paidBy, amount, ...(Object.keys(value).length ? { value } : {}) } };
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
/**
|
|
190
|
+
* One charge for every project a run submitted: amounts add up when the same
|
|
191
|
+
* balance paid for all of them; otherwise the charge is reported unavailable.
|
|
192
|
+
*/
|
|
193
|
+
export function chargeFromProjectRecords(records) {
|
|
194
|
+
const charges = records.map(chargeFromProjectRecord);
|
|
195
|
+
const missing = charges.find((entry) => entry.charge === null);
|
|
196
|
+
if (missing) return missing;
|
|
197
|
+
if (charges.length === 0) return unavailable('This run submitted no project.');
|
|
198
|
+
if (charges.length === 1) return charges[0];
|
|
199
|
+
const paidBy = charges[0].charge.paidBy;
|
|
200
|
+
if (charges.some((entry) => entry.charge.paidBy !== paidBy)) {
|
|
201
|
+
return unavailable('This run\'s projects were paid in different ways.');
|
|
202
|
+
}
|
|
203
|
+
const sum = (field) => {
|
|
204
|
+
const out = {};
|
|
205
|
+
for (const key of ['spark', 'sogni', 'usd']) {
|
|
206
|
+
const values = charges.map((entry) => entry.charge[field]?.[key]);
|
|
207
|
+
if (values.every((value) => value !== undefined)) out[key] = tidy(values.reduce((total, value) => total + value, 0));
|
|
208
|
+
}
|
|
209
|
+
return out;
|
|
210
|
+
};
|
|
211
|
+
const value = sum('value');
|
|
212
|
+
return { charge: { paidBy, amount: sum('amount'), ...(Object.keys(value).length ? { value } : {}) } };
|
|
213
|
+
}
|