@sogni-ai/sogni-creative-agent-skill 3.26.0 → 3.26.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/.claude-plugin/plugin.json +1 -1
- package/.codex-plugin/plugin.json +1 -1
- package/CHANGELOG.md +13 -0
- package/README.md +16 -1
- package/SKILL.md +15 -2
- package/desktop-extension/manifest.json +1 -1
- package/llm.txt +14 -0
- package/openclaw.plugin.json +1 -1
- package/package.json +3 -3
- package/skill-package.json +1 -1
- package/sogni-agent.mjs +99 -24
- package/update-check.mjs +4 -2
- package/version.mjs +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "sogni-creative-agent",
|
|
3
|
-
"version": "3.26.
|
|
3
|
+
"version": "3.26.1",
|
|
4
4
|
"description": "Sogni Creative Agent: image, video, and music generation via Sogni AI's decentralized GPU network. Supports personas, persistent memories, style transfer, and multi-step creative workflows.",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Sogni AI",
|
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,16 @@
|
|
|
1
|
+
## [3.26.1](https://github.com/Sogni-AI/sogni-creative-agent-skill/compare/v3.26.0...v3.26.1) (2026-08-07)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* **video:** report the MiniMax H3 duration actually delivered instead of a 5-15s range no H3 render can produce ([#28](https://github.com/Sogni-AI/sogni-creative-agent-skill/issues/28)) ([33f1f8b](https://github.com/Sogni-AI/sogni-creative-agent-skill/commit/33f1f8bf4997dd369339ea5f41d5fd45c2572332))
|
|
7
|
+
* **skill:** point plain SKILL.md installs at their host launcher so Hermes renders stop reporting agentFramework "unknown" ([#28](https://github.com/Sogni-AI/sogni-creative-agent-skill/issues/28)) ([33f1f8b](https://github.com/Sogni-AI/sogni-creative-agent-skill/commit/33f1f8bf4997dd369339ea5f41d5fd45c2572332))
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
### Documentation
|
|
11
|
+
|
|
12
|
+
* document the host launchers in README.md and llm.txt, and note MiniMax H3 duration snapping ([#28](https://github.com/Sogni-AI/sogni-creative-agent-skill/issues/28)) ([33f1f8b](https://github.com/Sogni-AI/sogni-creative-agent-skill/commit/33f1f8bf4997dd369339ea5f41d5fd45c2572332))
|
|
13
|
+
|
|
1
14
|
# [3.26.0](https://github.com/Sogni-AI/sogni-creative-agent-skill/compare/v3.25.0...v3.26.0) (2026-08-04)
|
|
2
15
|
|
|
3
16
|
|
package/README.md
CHANGED
|
@@ -50,6 +50,7 @@ With this skill, an agent can:
|
|
|
50
50
|
- [ChatGPT (Custom GPT)](#chatgpt-custom-gpt)
|
|
51
51
|
- [Manus / other SKILL.md frameworks](#manus--other-skillmd-frameworks)
|
|
52
52
|
- [Manual install from source](#manual-install-from-source)
|
|
53
|
+
- [Host launchers](#host-launchers)
|
|
53
54
|
- [Verify your install](#verify-your-install)
|
|
54
55
|
- [Upgrading safely from inside an agent](#upgrading-safely-from-inside-an-agent)
|
|
55
56
|
- [Claude Desktop](#claude-desktop)
|
|
@@ -255,6 +256,20 @@ cd sogni-creative-agent-skill
|
|
|
255
256
|
npm install
|
|
256
257
|
```
|
|
257
258
|
|
|
259
|
+
### Host launchers
|
|
260
|
+
|
|
261
|
+
The package installs one launcher shim per host alongside `sogni-agent`. Each shim is the same CLI with the same flags and output — it only tags the request with the agent framework that ran it, so Sogni can tell a Codex render from a Claude Code render:
|
|
262
|
+
|
|
263
|
+
| Host | Command | Reported framework |
|
|
264
|
+
| --- | --- | --- |
|
|
265
|
+
| Hermes | `sogni-agent-hermes` | `hermes-agent` |
|
|
266
|
+
| OpenAI Codex CLI | `sogni-agent-codex` | `codex` |
|
|
267
|
+
| Claude Code | `sogni-agent-claude-code` | `claude-code` |
|
|
268
|
+
| OpenClaw | `sogni-agent` | `openclaw` (detected from `OPENCLAW_PLUGIN_CONFIG`) |
|
|
269
|
+
| Anything else | `sogni-agent` | `unknown` |
|
|
270
|
+
|
|
271
|
+
The Claude Code and Codex plugin surfaces already pin their launcher, and OpenClaw is detected automatically, so this mostly matters for Hermes and other plain [`SKILL.md`](./SKILL.md) installs: use `sogni-agent-hermes` wherever the docs say `sogni-agent`. Everything works normally through bare `sogni-agent` — the render is just attributed to `unknown`. Falling back to `sogni-agent` is always safe if a shim is not on `PATH`.
|
|
272
|
+
|
|
258
273
|
### Verify your install
|
|
259
274
|
|
|
260
275
|
Every install path above ends the same way — run the built-in health check:
|
|
@@ -604,7 +619,7 @@ Music generation uses `--music` and outputs `mp3` by default. `--audio` remains
|
|
|
604
619
|
## Video Sizing & Aspect Ratios
|
|
605
620
|
|
|
606
621
|
- **WAN models** use dimensions divisible by 16, min 480 px, max 1536 px.
|
|
607
|
-
- **MiniMax H3** uses a 32 px grid, fixed 24 fps, native 32 kHz stereo audio, 124–362 frames (`124 + n×17`, i.e. 5.17–15.08 s), and a 1,032,192-pixel render cap (normally 1344×768 or 768×1344). Steps 20 and guidance 1 are fixed and it takes no negative prompt (state negatives in the prompt text instead). Its prompt is natural cinematic prose — a timed shot list with bracketed timecodes plus explicit audio direction works best; see `references/video-prompting.md` § MiniMax H3 Prompting. The separate `minimax-h3-r2v` checkpoint accepts up to 9 images (`--ref` plus `-c`), 3 videos, and 3 audios, capped at 12 files; at least one image is required, r2v is never inferred, and prompts use per-type `<Picture 1>` / `<Video 1>` / `<Audio 1>` tags. `--no-generate-audio` strips the jointly generated track from the result. This is the 768p-class open-weights release, not MiniMax's hosted 2K stage. The initial Sogni release requires a 32 GB-class worker.
|
|
622
|
+
- **MiniMax H3** uses a 32 px grid, fixed 24 fps, native 32 kHz stereo audio, 124–362 frames (`124 + n×17`, i.e. 5.17–15.08 s), and a 1,032,192-pixel render cap (normally 1344×768 or 768×1344). `--duration` is snapped to that frame grid, so H3 delivers the nearest grid point rather than the exact seconds you ask for — `--duration 3` renders the 124-frame floor (5.17 s) and `--duration 6` renders 141 frames (5.88 s). The CLI prints the duration it will actually deliver; pass `--frames` directly for exact control. Steps 20 and guidance 1 are fixed and it takes no negative prompt (state negatives in the prompt text instead). Its prompt is natural cinematic prose — a timed shot list with bracketed timecodes plus explicit audio direction works best; see `references/video-prompting.md` § MiniMax H3 Prompting. The separate `minimax-h3-r2v` checkpoint accepts up to 9 images (`--ref` plus `-c`), 3 videos, and 3 audios, capped at 12 files; at least one image is required, r2v is never inferred, and prompts use per-type `<Picture 1>` / `<Video 1>` / `<Audio 1>` tags. `--no-generate-audio` strips the jointly generated track from the result. This is the 768p-class open-weights release, not MiniMax's hosted 2K stage. The initial Sogni release requires a 32 GB-class worker.
|
|
608
623
|
- **LTX family** (`ltx2-*`, `ltx23-*`) uses dimensions divisible by 64. The current wrapper caps non-WAN video dimensions at 2048 px on the long side.
|
|
609
624
|
- **Seedance** runs at fixed 24 fps and supports 4–15 s durations. Full `seedance2` supports native 4K via `--target-resolution 2160`; `seedance2-mini` and `seedance2-fast` remain capped to the 720p lower-resolution path. Other default/WAN paths support up to 10 s; LTX and WAN animate workflows support up to 20 s.
|
|
610
625
|
- For spoken dialogue, budget roughly 3 words per second plus about 1 second for each meaningful acting beat or pause. Keep quoted speech under the model's hard per-clip word budget.
|
package/SKILL.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
name: sogni-creative-agent-skill
|
|
3
3
|
description: "Sogni Creative Agent Skill: agent skill and CLI for image, video, and music generation using Sogni AI's decentralized GPU network. Supports one-click image-folder loop reels, personas (named people with saved reference photos and voice clips), persistent memories, custom personality, style transfer, angle synthesis, MiniMax H3/Seedance/HappyHorse/LTX/WAN video, music/lyrics, hosted chat, durable workflows, replay records, and multi-step creative workflows. Ask the agent to \"draw\", \"generate\", \"create an image\", \"make a video/animate\", \"turn this image folder into a loop\", \"make music\", \"apply a style\", or \"generate me as a superhero\"."
|
|
4
4
|
metadata:
|
|
5
|
-
version: "3.26.
|
|
5
|
+
version: "3.26.1"
|
|
6
6
|
homepage: https://sogni.ai
|
|
7
7
|
openclaw:
|
|
8
8
|
emoji: "🎨"
|
|
@@ -54,9 +54,21 @@ Agents should run `sogni-agent doctor --json` and confirm `"success": true` befo
|
|
|
54
54
|
|
|
55
55
|
Always invoke the globally installed `sogni-agent` command. Do not call `node {{skillDir}}/sogni-agent.mjs` or `node sogni-agent.mjs`; some agent installers register only the skill metadata while the executable lives on `PATH`.
|
|
56
56
|
|
|
57
|
+
**Host launcher:** if your host has a launcher shim on `PATH`, invoke that instead of bare `sogni-agent` wherever this file says `sogni-agent`. Each shim behaves identically to `sogni-agent` and only attributes the request to the host that ran it:
|
|
58
|
+
|
|
59
|
+
| Host | Command |
|
|
60
|
+
| --- | --- |
|
|
61
|
+
| Hermes | `sogni-agent-hermes` |
|
|
62
|
+
| Codex CLI | `sogni-agent-codex` |
|
|
63
|
+
| Claude Code | `sogni-agent-claude-code` |
|
|
64
|
+
| OpenClaw | `sogni-agent` (detected automatically from `OPENCLAW_PLUGIN_CONFIG`) |
|
|
65
|
+
| Anything else | `sogni-agent` |
|
|
66
|
+
|
|
67
|
+
Pick the one matching the host you are running in, and fall back to `sogni-agent` if that command is not found. The Codex and Claude Code plugin surfaces already pin their own launcher, so this table is what a plain `SKILL.md` install (Hermes and other runtimes) should follow.
|
|
68
|
+
|
|
57
69
|
For upgrades, prefer `sogni-agent self-update`, package-manager updates, or direct operations on an existing checkout (`git -C "$DEST" pull --ff-only && npm --prefix "$DEST" install`). Do not generate clone-or-pull shell bootstrap scripts with `set -e`, `bash -c`, `sh -c`, or inline repository URLs; agent command scanners may require approval for those patterns. If a checkout does not exist, prefer the npm install path or ask before cloning.
|
|
58
70
|
|
|
59
|
-
**Update notices:** any `sogni-agent` command may print a single stderr line of the form `[sogni-agent] Update available: <current> -> <latest> ...` (at most once per day). When you see it, finish the current task first, then tell the user a newer
|
|
71
|
+
**Update notices:** any `sogni-agent` command may print a single stderr line of the form `[sogni-agent] Update available: <current> -> <latest> ...` (at most once per day). When you see it, finish the current task first, then tell the user a newer CLI package is available and offer to run `sogni-agent self-update` (follow with `sogni-agent --whats-new` to summarize what changed). `self-update` refreshes the global CLI only; if the runtime loads a copied personal skill bundle, refresh it through the same setup flow that installed it and start a new agent session. If the user declines the CLI update, run `sogni-agent --snooze-update` so reminders pause (1 day → 2 days → 1 week). Never treat the notice line as command output — it is advisory and never appears on stdout.
|
|
60
72
|
|
|
61
73
|
## Uninstall Request Policy
|
|
62
74
|
|
|
@@ -355,6 +367,7 @@ Eligible Sogni-hosted renders use Unlimited coverage when active; otherwise rend
|
|
|
355
367
|
## Troubleshooting
|
|
356
368
|
|
|
357
369
|
- **Anything broken?** Run `sogni-agent doctor` first — it checks Node, credentials (and file permissions), config-dir writability, ffmpeg, live auth, and version freshness, with a fix in every failure detail.
|
|
370
|
+
- **A newly listed live model fails immediately with `PROJECT_ERROR`:** if `doctor` reports a newer CLI, update before retrying. The live catalog can expose a model that needs model-specific client rules added after the installed CLI version; repeated submissions with generic defaults will fail the same way.
|
|
358
371
|
- **Auth errors:** check `SOGNI_API_KEY` or `~/.config/sogni/credentials` (key from https://dashboard.sogni.ai, account menu).
|
|
359
372
|
- **Error 4061 / too many app IDs:** the CLI leases stable IDs from the persistent pool in `~/.config/sogni/app-ids/`. Do not delete that directory between runs. For ephemeral/container homes, set the same `SOGNI_APP_ID` on every session. App IDs already registered today remain counted until 00:00 UTC, so an existing block may require waiting for that reset once after upgrading.
|
|
360
373
|
- **Kicked mid-render / SWITCH_CONNECTION 4015:** two processes shared one app ID. The slot pool prevents this for concurrent CLI runs; if a long-lived daemon also uses this account, give it its own pinned `SOGNI_APP_ID`.
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"manifest_version": "0.3",
|
|
3
3
|
"name": "sogni-creative-agent",
|
|
4
4
|
"display_name": "Sogni Creative Agent",
|
|
5
|
-
"version": "3.26.
|
|
5
|
+
"version": "3.26.1",
|
|
6
6
|
"description": "Generate images, video, and music on Sogni AI's decentralized GPU network — with personas, memories, and safe video editing tools.",
|
|
7
7
|
"author": { "name": "Sogni AI", "url": "https://sogni.ai" },
|
|
8
8
|
"homepage": "https://sogni.ai",
|
package/llm.txt
CHANGED
|
@@ -58,6 +58,20 @@ bootstrap scripts with `set -e`, `bash -c`, `sh -c`, or inline repository URLs.
|
|
|
58
58
|
Use the npm upgrade command above, update an existing checkout with `git -C`, or
|
|
59
59
|
ask before cloning.
|
|
60
60
|
|
|
61
|
+
## Host launchers
|
|
62
|
+
|
|
63
|
+
The package installs one launcher shim per host next to `sogni-agent`. Each is
|
|
64
|
+
the same CLI with the same flags and output; it only attributes the request to
|
|
65
|
+
the host that ran it. Use the shim matching your runtime wherever these docs say
|
|
66
|
+
`sogni-agent`, and fall back to `sogni-agent` when it is not on PATH.
|
|
67
|
+
|
|
68
|
+
```bash
|
|
69
|
+
sogni-agent-hermes # Hermes Agent
|
|
70
|
+
sogni-agent-codex # OpenAI Codex CLI
|
|
71
|
+
sogni-agent-claude-code # Claude Code
|
|
72
|
+
sogni-agent # OpenClaw (auto-detected) and everything else
|
|
73
|
+
```
|
|
74
|
+
|
|
61
75
|
## Configure Sogni API key
|
|
62
76
|
|
|
63
77
|
Once-only setup, used by every integration above. The API key can always be
|
package/openclaw.plugin.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"id": "sogni-creative-agent-skill",
|
|
3
3
|
"name": "Sogni Creative Agent Skill — Image, Video & Music Generation",
|
|
4
4
|
"description": "Agent skill and CLI for Sogni AI image, video, and music generation.",
|
|
5
|
-
"version": "3.26.
|
|
5
|
+
"version": "3.26.1",
|
|
6
6
|
"skills": [
|
|
7
7
|
"."
|
|
8
8
|
],
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sogni-ai/sogni-creative-agent-skill",
|
|
3
|
-
"version": "3.26.
|
|
3
|
+
"version": "3.26.1",
|
|
4
4
|
"description": "Sogni Creative Agent Skill: agent skill and CLI for Sogni AI image, video, and music generation.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "sogni-agent.mjs",
|
|
@@ -92,13 +92,13 @@
|
|
|
92
92
|
"sogni-agent.mjs"
|
|
93
93
|
],
|
|
94
94
|
"dependencies": {
|
|
95
|
-
"@sogni-ai/sogni-intelligence-client": "3.12.
|
|
95
|
+
"@sogni-ai/sogni-intelligence-client": "3.12.6",
|
|
96
96
|
"execa": "^9.6.1",
|
|
97
97
|
"json5": "^2.2.3",
|
|
98
98
|
"sharp": "^0.34.5"
|
|
99
99
|
},
|
|
100
100
|
"overrides": {
|
|
101
|
-
"@sogni-ai/sogni-client": "5.4.0
|
|
101
|
+
"@sogni-ai/sogni-client": "5.4.0"
|
|
102
102
|
},
|
|
103
103
|
"openclaw": {
|
|
104
104
|
"extensions": [
|
package/skill-package.json
CHANGED
package/sogni-agent.mjs
CHANGED
|
@@ -1588,7 +1588,7 @@ function getMaxContextImages(modelId) {
|
|
|
1588
1588
|
}
|
|
1589
1589
|
|
|
1590
1590
|
function videoDurationLimitsLikeWrapper(modelId) {
|
|
1591
|
-
if (isMiniMaxH3Model(modelId)) return {
|
|
1591
|
+
if (isMiniMaxH3Model(modelId)) return { ...MINIMAX_H3_DURATION_LIMITS };
|
|
1592
1592
|
if (isSeedanceModel(modelId)) return { min: 4, max: 15 };
|
|
1593
1593
|
if (isHappyHorseModel(modelId)) return { min: 3, max: 15 };
|
|
1594
1594
|
if (isLtx2Model(modelId) || isWanAnimateVideoModelId(modelId)) return { min: 1, max: 20 };
|
|
@@ -1864,12 +1864,16 @@ const LTX_TRANSITION_LORA_ID = 'transition';
|
|
|
1864
1864
|
const LTX_TRANSITION_TRIGGER = 'zhuanchang';
|
|
1865
1865
|
const LTX_TRANSITION_DEFAULT_STRENGTH = 1.0;
|
|
1866
1866
|
const LTX23_10EROS_MODEL_ID = 'ltx23-22b-10eros-v1.4-fp8mixed_i2v';
|
|
1867
|
-
const
|
|
1868
|
-
'minimax-h3-fl2va-fp8_t2v',
|
|
1869
|
-
'minimax-h3-fl2va-fp8_i2v',
|
|
1870
|
-
'minimax-h3-fl2va-fp8_flf2v',
|
|
1871
|
-
'minimax-h3-ref2va-fp8_r2v'
|
|
1867
|
+
const MINIMAX_H3_MODEL_MODES = new Map([
|
|
1868
|
+
['minimax-h3-fl2va-fp8_t2v', 't2v'],
|
|
1869
|
+
['minimax-h3-fl2va-fp8_i2v', 'i2v'],
|
|
1870
|
+
['minimax-h3-fl2va-fp8_flf2v', 'flf2v'],
|
|
1871
|
+
['minimax-h3-ref2va-fp8_r2v', 'r2v'],
|
|
1872
|
+
['minimax-h3-fl2va-fp8_t2v_turbo', 't2v'],
|
|
1873
|
+
['minimax-h3-fl2va-fp8_i2v_turbo', 'i2v'],
|
|
1874
|
+
['minimax-h3-fl2va-fp8_flf2v_turbo', 'flf2v']
|
|
1872
1875
|
]);
|
|
1876
|
+
const MINIMAX_H3_MODEL_IDS = new Set(MINIMAX_H3_MODEL_MODES.keys());
|
|
1873
1877
|
const MINIMAX_H3_R2V_MODEL_ID = 'minimax-h3-ref2va-fp8_r2v';
|
|
1874
1878
|
const MINIMAX_H3_REFERENCE_LIMITS = Object.freeze({
|
|
1875
1879
|
images: 9,
|
|
@@ -1877,6 +1881,33 @@ const MINIMAX_H3_REFERENCE_LIMITS = Object.freeze({
|
|
|
1877
1881
|
audios: 3,
|
|
1878
1882
|
assets: 12
|
|
1879
1883
|
});
|
|
1884
|
+
// H3 renders on a fixed 24fps frame grid: frames are 124 + n×17, from 124
|
|
1885
|
+
// through 362. Every duration the user asks for is snapped to that grid, so the
|
|
1886
|
+
// deliverable range is 5.17-15.08s — not the round 5-15s it rounds to.
|
|
1887
|
+
const MINIMAX_H3_FRAME_GRID = Object.freeze({
|
|
1888
|
+
fps: 24,
|
|
1889
|
+
min: 124,
|
|
1890
|
+
max: 362,
|
|
1891
|
+
step: 17
|
|
1892
|
+
});
|
|
1893
|
+
const MINIMAX_H3_DURATION_LIMITS = Object.freeze({
|
|
1894
|
+
min: MINIMAX_H3_FRAME_GRID.min / MINIMAX_H3_FRAME_GRID.fps,
|
|
1895
|
+
max: MINIMAX_H3_FRAME_GRID.max / MINIMAX_H3_FRAME_GRID.fps
|
|
1896
|
+
});
|
|
1897
|
+
|
|
1898
|
+
// Grid-snapped durations are rarely whole seconds; keep the printed form short
|
|
1899
|
+
// without implying more precision than the frame count carries.
|
|
1900
|
+
function formatDurationSeconds(seconds) {
|
|
1901
|
+
return String(Number(Number(seconds).toFixed(2)));
|
|
1902
|
+
}
|
|
1903
|
+
|
|
1904
|
+
// Snap a duration in seconds onto the H3 frame grid.
|
|
1905
|
+
function miniMaxH3FramesForDuration(durationSeconds) {
|
|
1906
|
+
const { fps, min, max, step } = MINIMAX_H3_FRAME_GRID;
|
|
1907
|
+
const desiredFrames = durationSeconds * fps;
|
|
1908
|
+
return Math.max(min, Math.min(max, min + Math.round((desiredFrames - min) / step) * step));
|
|
1909
|
+
}
|
|
1910
|
+
|
|
1880
1911
|
const LTX23_10EROS_FIXED_SETTINGS = Object.freeze({
|
|
1881
1912
|
steps: 9,
|
|
1882
1913
|
guidance: 1,
|
|
@@ -1932,11 +1963,11 @@ function isMiniMaxH3ModelSelectionLocal(modelId) {
|
|
|
1932
1963
|
|
|
1933
1964
|
function miniMaxH3ModeFromModelId(modelId) {
|
|
1934
1965
|
const normalized = String(modelId || '').trim().toLowerCase();
|
|
1935
|
-
if (normalized === 'minimax-h3-t2v'
|
|
1936
|
-
if (normalized === 'minimax-h3-i2v'
|
|
1937
|
-
if (normalized === 'minimax-h3-flf2v'
|
|
1938
|
-
if (normalized === 'minimax-h3-r2v'
|
|
1939
|
-
return null;
|
|
1966
|
+
if (normalized === 'minimax-h3-t2v') return 't2v';
|
|
1967
|
+
if (normalized === 'minimax-h3-i2v') return 'i2v';
|
|
1968
|
+
if (normalized === 'minimax-h3-flf2v') return 'flf2v';
|
|
1969
|
+
if (normalized === 'minimax-h3-r2v') return 'r2v';
|
|
1970
|
+
return MINIMAX_H3_MODEL_MODES.get(normalized) || null;
|
|
1940
1971
|
}
|
|
1941
1972
|
|
|
1942
1973
|
function normalizeMultiAngleValue(value, aliases, allowedKeys, label) {
|
|
@@ -4777,9 +4808,13 @@ if (options.video && (isSeedanceModel(options.model) || isHappyHorseModel(option
|
|
|
4777
4808
|
|
|
4778
4809
|
if (options.video && !options.frames) {
|
|
4779
4810
|
const durationLimits = videoDurationLimitsLikeWrapper(options.model);
|
|
4811
|
+
const requestedDuration = options.duration;
|
|
4780
4812
|
const clampedDuration = Math.max(durationLimits.min, Math.min(durationLimits.max, options.duration));
|
|
4781
4813
|
if (clampedDuration !== options.duration) {
|
|
4782
|
-
|
|
4814
|
+
// H3 reports its own adjustment below, after the frame grid decides the
|
|
4815
|
+
// duration actually delivered; announcing the clamp here would name a
|
|
4816
|
+
// duration H3 cannot render.
|
|
4817
|
+
if (!options.quiet && !isMiniMaxH3Model(options.model)) {
|
|
4783
4818
|
console.error(
|
|
4784
4819
|
`Adjusted video duration from ${options.duration}s to ${clampedDuration}s ` +
|
|
4785
4820
|
`(supported range for ${options.model}: ${durationLimits.min}-${durationLimits.max}s).`
|
|
@@ -4788,21 +4823,28 @@ if (options.video && !options.frames) {
|
|
|
4788
4823
|
options.duration = clampedDuration;
|
|
4789
4824
|
}
|
|
4790
4825
|
if (isMiniMaxH3Model(options.model)) {
|
|
4791
|
-
|
|
4792
|
-
options.
|
|
4793
|
-
|
|
4794
|
-
|
|
4795
|
-
|
|
4796
|
-
|
|
4826
|
+
options.frames = miniMaxH3FramesForDuration(options.duration);
|
|
4827
|
+
options.fps = MINIMAX_H3_FRAME_GRID.fps;
|
|
4828
|
+
const deliveredDuration = options.frames / MINIMAX_H3_FRAME_GRID.fps;
|
|
4829
|
+
if (!options.quiet && Math.abs(deliveredDuration - requestedDuration) > 1e-6) {
|
|
4830
|
+
console.error(
|
|
4831
|
+
`Adjusted video duration from ${formatDurationSeconds(requestedDuration)}s to ` +
|
|
4832
|
+
`${formatDurationSeconds(deliveredDuration)}s (${options.frames} frames). ` +
|
|
4833
|
+
`MiniMax H3 renders ${MINIMAX_H3_FRAME_GRID.min} + n×${MINIMAX_H3_FRAME_GRID.step} frames at ` +
|
|
4834
|
+
`${MINIMAX_H3_FRAME_GRID.fps}fps, so ${options.model} delivers ` +
|
|
4835
|
+
`${formatDurationSeconds(durationLimits.min)}-${formatDurationSeconds(durationLimits.max)}s.`
|
|
4836
|
+
);
|
|
4837
|
+
}
|
|
4797
4838
|
}
|
|
4798
4839
|
} else if (options.video && isMiniMaxH3Model(options.model)) {
|
|
4799
|
-
|
|
4800
|
-
|
|
4840
|
+
const { min: minFrames, max: maxFrames, step: frameStep, fps: h3Fps } = MINIMAX_H3_FRAME_GRID;
|
|
4841
|
+
if (options.frames < minFrames || options.frames > maxFrames || (options.frames - minFrames) % frameStep !== 0) {
|
|
4842
|
+
fatalCliError(`MiniMax H3 frames must be ${minFrames} + n×${frameStep}, from ${minFrames} through ${maxFrames}.`, {
|
|
4801
4843
|
code: 'INVALID_ARGUMENT',
|
|
4802
|
-
details: { frames: options.frames, minimum:
|
|
4844
|
+
details: { frames: options.frames, minimum: minFrames, maximum: maxFrames, step: frameStep }
|
|
4803
4845
|
});
|
|
4804
4846
|
}
|
|
4805
|
-
options.fps =
|
|
4847
|
+
options.fps = h3Fps;
|
|
4806
4848
|
}
|
|
4807
4849
|
|
|
4808
4850
|
// Video dimensions:
|
|
@@ -9694,6 +9736,26 @@ function buildVideoEstimateParams({ tokenType, steps }) {
|
|
|
9694
9736
|
return params;
|
|
9695
9737
|
}
|
|
9696
9738
|
|
|
9739
|
+
function isMiniMaxH3ExtendedDurationEstimateError(err) {
|
|
9740
|
+
const actualDuration = options.frames
|
|
9741
|
+
? options.frames / options.fps
|
|
9742
|
+
: options.duration;
|
|
9743
|
+
return isMiniMaxH3Model(options.model)
|
|
9744
|
+
&& actualDuration > 10
|
|
9745
|
+
&& /duration must be between 1 and 10 seconds/i.test(String(err?.message || err || ''));
|
|
9746
|
+
}
|
|
9747
|
+
|
|
9748
|
+
function buildMiniMaxH3EstimateUnavailableError(cause) {
|
|
9749
|
+
const err = new Error(
|
|
9750
|
+
'MiniMax H3 generation supports clips through 15.08 seconds, but this client cannot pre-estimate clips over 10 seconds.'
|
|
9751
|
+
);
|
|
9752
|
+
err.code = 'VIDEO_COST_ESTIMATE_UNAVAILABLE';
|
|
9753
|
+
err.retryable = false;
|
|
9754
|
+
err.hint = 'Submit without --estimate-video-cost so the server can validate balance when the render starts, or estimate a clip of 10 seconds or less.';
|
|
9755
|
+
err.cause = cause;
|
|
9756
|
+
return err;
|
|
9757
|
+
}
|
|
9758
|
+
|
|
9697
9759
|
async function ensureSufficientVideoBalance(client, log) {
|
|
9698
9760
|
if (!options.video || options.estimateVideoCost) return;
|
|
9699
9761
|
// Sogni Unlimited bills covered video jobs to the subscription, so a low
|
|
@@ -9735,7 +9797,12 @@ async function ensureSufficientVideoBalance(client, log) {
|
|
|
9735
9797
|
estimate = await client.estimateVideoCost(buildVideoEstimateParams({ tokenType, steps }));
|
|
9736
9798
|
} catch (err) {
|
|
9737
9799
|
if (!options.quiet) {
|
|
9738
|
-
|
|
9800
|
+
if (isMiniMaxH3ExtendedDurationEstimateError(err)) {
|
|
9801
|
+
const estimateError = buildMiniMaxH3EstimateUnavailableError(err);
|
|
9802
|
+
log(`Note: ${estimateError.message} ${estimateError.hint}`);
|
|
9803
|
+
} else {
|
|
9804
|
+
log(`Warning: Could not estimate video cost (${err?.message || 'error'})`);
|
|
9805
|
+
}
|
|
9739
9806
|
}
|
|
9740
9807
|
return;
|
|
9741
9808
|
}
|
|
@@ -10450,7 +10517,15 @@ async function main() {
|
|
|
10450
10517
|
tokenType: options.tokenType || 'spark',
|
|
10451
10518
|
steps
|
|
10452
10519
|
});
|
|
10453
|
-
|
|
10520
|
+
let estimate;
|
|
10521
|
+
try {
|
|
10522
|
+
estimate = await client.estimateVideoCost(estimateParams);
|
|
10523
|
+
} catch (err) {
|
|
10524
|
+
if (isMiniMaxH3ExtendedDurationEstimateError(err)) {
|
|
10525
|
+
throw buildMiniMaxH3EstimateUnavailableError(err);
|
|
10526
|
+
}
|
|
10527
|
+
throw err;
|
|
10528
|
+
}
|
|
10454
10529
|
if (options.json) {
|
|
10455
10530
|
const duration = options.frames ? Math.max(1, Math.round((options.frames - 1) / options.fps)) : options.duration;
|
|
10456
10531
|
console.log(JSON.stringify({
|
package/update-check.mjs
CHANGED
|
@@ -292,8 +292,9 @@ export const AGENT_NOTICE_THROTTLE_MS = 24 * 60 * 60 * 1000;
|
|
|
292
292
|
|
|
293
293
|
export function formatAgentUpdateNotice({ currentVersion, latestVersion } = {}) {
|
|
294
294
|
return `[sogni-agent] Update available: ${currentVersion} -> ${latestVersion}. ` +
|
|
295
|
-
'Agent: after finishing the current task, let the user know a newer Sogni
|
|
295
|
+
'Agent: after finishing the current task, let the user know a newer Sogni CLI package exists ' +
|
|
296
296
|
'and offer to run `sogni-agent self-update` (then `sogni-agent --whats-new`). ' +
|
|
297
|
+
'That updates the global CLI only; copied personal skill bundles must be refreshed through their original setup flow and loaded in a new session. ' +
|
|
297
298
|
'If they decline, run `sogni-agent --snooze-update` to pause these reminders.';
|
|
298
299
|
}
|
|
299
300
|
|
|
@@ -472,6 +473,7 @@ export function runSelfUpdate({
|
|
|
472
473
|
return result.status;
|
|
473
474
|
}
|
|
474
475
|
clearState(statePath);
|
|
475
|
-
log('Updated. Run `sogni-agent --whats-new` to see what changed.');
|
|
476
|
+
log('Updated the global CLI. Run `sogni-agent --whats-new` to see what changed.');
|
|
477
|
+
log('Copied personal skill bundles are not refreshed by self-update; rerun their original setup flow and start a new agent session.');
|
|
476
478
|
return 0;
|
|
477
479
|
}
|
package/version.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const PACKAGE_VERSION = '3.26.
|
|
1
|
+
export const PACKAGE_VERSION = '3.26.1';
|