@sogni-ai/sogni-creative-agent-skill 3.40.0 → 3.40.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.
@@ -3,7 +3,7 @@ name: sogni-creative-agent-skill
3
3
  description: "Generate and edit images, upscale images, create video and music, animate image folders into seamless reels, and manage reusable personas with Sogni AI. Use when a Hermes user asks to draw, render, upscale, edit or restyle an image, animate an image, make a video, create music or lyrics, build a media workflow, apply a saved identity, or refine an earlier Sogni result."
4
4
  license: MIT
5
5
  metadata:
6
- version: "3.40.0"
6
+ version: "3.40.1"
7
7
  author: Sogni AI
8
8
  hermes:
9
9
  category: creative
@@ -53,13 +53,22 @@ a command fails because the CLI is missing.
53
53
  run `sogni-agent-hermes --json --list-media` instead of guessing filenames.
54
54
  - Honor an explicitly requested model. Otherwise use the CLI defaults and
55
55
  consult [models.md](references/models.md) only when model selection matters.
56
+ - Answer capability questions without generating. Stop at text for a writing or
57
+ review request and at a still for a storyboard-image request. Continue through
58
+ a requested images-to-video sequence unless the user requested a review pause.
59
+ - Preserve exact prompts, source choices, counts, and the latest duration. Each
60
+ variation needs all its own lettering, visual, dialogue, and loop requirements.
61
+ Continue from successful stages instead of rendering them again.
56
62
  - Plan multi-step work in Hermes, then invoke the focused CLI command. Use the
57
63
  hosted workflow API only when its durable orchestration or replay behavior is
58
64
  useful.
59
65
  - Parse `--json` output when subsequent steps need exact job IDs, paths, URLs,
60
66
  costs, or error fields.
61
67
  - Return the final local path and the important render settings. On failure,
62
- preserve the CLI's error and actionable recovery hint.
68
+ preserve the CLI's error and actionable recovery hint. Do not automatically
69
+ add `--no-filter` or retry a rejection. Optional filter changes need the user's
70
+ explicit choice and cannot override a model's policy. Honor hosted requests
71
+ to wait for user input.
63
72
 
64
73
  ## Common commands
65
74
 
@@ -48,6 +48,52 @@ The direct-to-SDK flags remain the right call for explicit one-shot generation
48
48
  when you already know the exact model, dimensions, and prompt — use them
49
49
  whenever latency or cost rules out an LLM round-trip.
50
50
 
51
+ ## Preserve the requested work
52
+
53
+ - A model/capability question is an answer, not permission to render. A script
54
+ or storyboard-review request ends at the draft; a storyboard-image request
55
+ ends at the still. The `storyboard-video` preset creates a full video, so use
56
+ it only when that is the requested deliverable.
57
+ - When the user requests images, animation, and stitching together, finish those
58
+ stages in order unless they ask to review or select an intermediate result.
59
+ Treat returned artifacts as evidence of completion; do not resubmit a
60
+ successful stage because the assistant's summary omitted its tool call.
61
+ - Preserve exact image prompts, visible lettering, chosen models, source
62
+ selection, aspect ratio, and the latest requested duration. New tasks do not
63
+ inherit settings from unrelated previous renders. A pure size increase uses
64
+ `upscale_image`; editing requires an actual source reference.
65
+ - Separate image variations need `numberOfVariations` and a complete Dynamic
66
+ Prompt branch per output. Repeat shared text, branding, dialogue, and loop
67
+ motion in every affected branch. A single storyboard sheet instead needs all
68
+ requested scenes in order, with complete visual/action, camera, transition,
69
+ dialogue, and sound instructions. Preserve supplied titles and layout. In
70
+ “six 9:16 frames,” six is the count and 9:16 is the frame shape.
71
+ - Preserve reference order and bind the correct uploaded or generated asset.
72
+ An original image can be a prior generated result; it is not necessarily an
73
+ upload. For a loop ending on the original still, bind that original as the
74
+ final reference. Distinguish loose audio guidance from synchronized audio.
75
+ - Check the chosen model's duration and reference limits. A long video may fit
76
+ one native clip or require segments and stitching; do not silently shorten it
77
+ or replace an explicit model. For segmented storyboards, assign each clip its
78
+ own time window and scene beats while preserving locked music and timing.
79
+ - Let the hosted runtime repair malformed calls before dispatch. A correction
80
+ round does not authorize a second successful render. If a result says to wait
81
+ for the user or all outputs failed, surface that result and stop.
82
+ - Optional content-filter changes require the user's explicit choice. In hosted
83
+ chat, a supported settings tool must report success before retrying; declined
84
+ or unavailable confirmation leaves the setting unchanged. In direct CLI mode,
85
+ do not add `--no-filter` on your own. The setting cannot change GPT Image's
86
+ mandatory policy or resolve an unknown rejection. Attribute a rejection to a
87
+ provider only when the returned error supports that attribution.
88
+ When explicitly requested, `--no-filter` is forwarded on new durable workflow
89
+ starts as well as hosted chat. Resuming a workflow retains its original
90
+ preference; passing the flag on a resume does not change it.
91
+
92
+ These are also instructions for the calling agent when it authors direct CLI
93
+ commands or workflow JSON. The public runtime exposes local helpers and shared
94
+ contracts; the full hosted planner, call repair, and confirmation behavior run
95
+ on the server. Updating this skill does not deploy those server components.
96
+
51
97
  ## --api-chat (`POST /v1/chat/completions`)
52
98
 
53
99
  Text-first natural-language workflows through Sogni API's OpenAI-compatible
@@ -66,12 +112,18 @@ Tune with `--api-tools creative-agent|creative-tools|none`,
66
112
  `--thinking` / `--no-thinking` (forwarded as
67
113
  `chat_template_kwargs.enable_thinking`; hosted Qwen may normalize thinking
68
114
  server-side, so do not rely on `--no-thinking` as a hard suppression switch).
115
+ The default output budget is 4,096 tokens for hosted chat (including durable
116
+ chat) and storyboard planning. Keep enough room for every requested scene and
117
+ complete tool arguments; `--max-tokens` overrides that budget.
118
+ HTTP chat and storyboard-planning requests allow up to two minutes for a full
119
+ response by default; `SOGNI_HTTP_TIMEOUT_MS` overrides this timeout. Other HTTP
120
+ requests keep their existing timeouts.
69
121
 
70
122
  ### Hosted tool surfaces (`sogni_tools`)
71
123
 
72
124
  - `creative-tools` — the public API default when `sogni_tools` is omitted or
73
125
  true. Generation/editing tools (`generate_image`, `generate_video`,
74
- `generate_music`, `edit_image`, `upscale_image`, `apply_style`, `restore_photo`,
126
+ `generate_music`, `generate_speech`, `edit_image`, `upscale_image`, `apply_style`, `restore_photo`,
75
127
  `refine_result`, `animate_photo`, `change_angle`, `video_to_video`,
76
128
  `stitch_video`, `orbit_video`, `dance_montage`, `sound_to_video`,
77
129
  `extend_video`, `replace_video_segment`, `overlay_video`, `add_subtitles`),
@@ -106,6 +158,16 @@ deltas plus de-duplicated per-job progress / ETA / result lines from hosted
106
158
  run events. The SDK exposes `sogni.chat.runs.{create, get, cancel,
107
159
  streamEvents}`.
108
160
 
161
+ Durable chat runs the full creative agent with server-side tool execution.
162
+ Use `--api-chat` for `--api-tools creative-tools|none` or
163
+ `--no-api-tool-execution`; durable mode rejects those options before starting a
164
+ run rather than silently ignoring them. Completed assistant snapshots reconcile
165
+ with streamed text so each message appears once, including multi-round turns.
166
+
167
+ Review returned storyboard titles, visible text, and timings against the request
168
+ before rendering. Hosted draft generation can paraphrase supplied scene titles;
169
+ correct the draft first when exact wording matters.
170
+
109
171
  ## --api-workflow (`POST /v1/creative-agent/workflows`)
110
172
 
111
173
  Durable, async workflow records with event streaming and cancellation. The
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sogni-creative-agent",
3
- "version": "3.40.0",
3
+ "version": "3.40.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",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sogni-creative-agent",
3
- "version": "3.40.0",
3
+ "version": "3.40.1",
4
4
  "description": "Create images, generative video, music, and polished image-folder loops with Sogni AI.",
5
5
  "author": {
6
6
  "name": "Sogni AI",
package/CHANGELOG.md CHANGED
@@ -1,3 +1,21 @@
1
+ ## [3.40.1](https://github.com/Sogni-AI/sogni-creative-agent-skill/compare/v3.40.0...v3.40.1) (2026-09-10)
2
+
3
+ ### Bug Fixes
4
+
5
+ * Align the public runtime dependencies with Intelligence Client 3.28.4 and Sogni Client 5.36.3, including the fix that keeps storyboard aspect ratios separate from panel counts.
6
+ * Forward explicit content-filter preferences when starting durable workflows through either HTTP or SDK transport; resumed runs retain their original preference.
7
+ * Preserve structured SDK failures across project creation and job/project events, retaining actionable error messages and codes.
8
+ * Give hosted chat, durable chat, and storyboard planning a 4,096-token default output budget so larger scene descriptions and tool arguments have room to complete. Explicit `--max-tokens` values still take precedence.
9
+ * Allow two minutes for HTTP chat and storyboard-planning responses, preventing larger tool calls from hitting the former 30-second timeout. Explicit HTTP timeout overrides remain supported.
10
+ * Reconcile durable-chat completion snapshots with streamed deltas so complete drafts appear once, while retaining completion-only messages and later rounds.
11
+ * Reject unsupported durable-chat tool restrictions before starting a run; direct callers to `--api-chat` for restricted tools or planning without execution.
12
+
13
+ ### Documentation
14
+
15
+ * Align the root, Codex/Claude plugin, and Hermes skill guidance with tested Chat workflows: requested stage boundaries, exact prompts and output counts, complete variation prompts, ordered references, model-specific durations, and continuing from completed stages.
16
+ * Clarify user-confirmed recovery after generation failures, document the speech tool in the hosted surface, and distinguish local skill updates from server-side planner and repair behavior.
17
+ * Keep trial-access guidance current: cancelling a trial prevents the first charge while preserving trial access until its original end date.
18
+
1
19
  # [3.40.0](https://github.com/Sogni-AI/sogni-creative-agent-skill/compare/v3.39.1...v3.40.0) (2026-09-09)
2
20
 
3
21
 
package/README.md CHANGED
@@ -903,7 +903,7 @@ With an active subscription, the CLI also skips its client-side "insufficient SP
903
903
 
904
904
  ### Free-trial access
905
905
 
906
- Trials include evaluation limits on generation volume, media size, and API access. Full plan limits apply once the trial converts to paid. Cancelling during the trial ends Unlimited access immediately and prevents the first charge.
906
+ Trials include evaluation limits on generation volume, media size, and API access. Full plan limits apply once the trial converts to paid. Cancelling during the trial prevents the first charge and keeps trial access, with the same trial limits, until the original trial end date.
907
907
 
908
908
  ### Fair-use scheduling
909
909
 
@@ -918,7 +918,7 @@ Actual throughput varies with demand, available Supernet capacity, and fair-use
918
918
 
919
919
  - **Active / trialing:** covered renders run normally.
920
920
  - **Cancellation (paid):** Unlimited access continues until the end of the period already paid for; it simply does not renew.
921
- - **Cancellation (during trial):** access ends immediately and no charge is made.
921
+ - **Cancellation (during trial):** no charge is made, and trial access continues until the original trial end date. Cancelling does not extend the trial or make the account eligible for another one.
922
922
  - **Grace / payment retry:** if a renewal payment fails, the provider retries it and **Unlimited access is paused** during the retry window — covered renders are declined with a renewal-retry error, and access resumes automatically once payment succeeds. You can keep rendering with Spark or SOGNI in the meantime.
923
923
  - **Refunds:** mid-term refunds are not offered by default; App Store / Google Play purchases follow the store's refund process, and Stripe (web) refunds are handled by Sogni support.
924
924
 
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 promptless RTX VSR image upscaling through 16K, 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/H3 Balanced/LightX2V Turbo/FastH3 Turbo/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\", \"upscale 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.40.0"
5
+ version: "3.40.1"
6
6
  homepage: https://sogni.ai
7
7
  openclaw:
8
8
  emoji: "🎨"
@@ -117,6 +117,15 @@ sogni-agent -o /tmp/cat.png "a cat wearing a hat" # ✗ avoid — user can't
117
117
 
118
118
  ## Recommended path: you plan, Sogni executes
119
119
 
120
+ Preserve the requested deliverable: capability questions need an answer, a
121
+ writing/review request stops at the draft, and a storyboard-image request stops
122
+ at the still. Continue through images, animation, and stitching when the user
123
+ requested that full sequence; pause only at their requested review points.
124
+ Keep exact prompts, model choices, source references, output counts, and the
125
+ latest duration. Each variation needs its own complete prompt, including every
126
+ shared lettering, visual, dialogue, or loop requirement. Once a stage succeeds,
127
+ continue to the next requested stage instead of generating it again.
128
+
120
129
  You (the calling LLM) are almost always more capable than Sogni's hosted planning model, so **do the planning and tool selection yourself** and let the hosted endpoints do what only the server can — run on the GPU network, persist assets/manifests, orchestrate durable multi-step runs with replay, and apply structured-contract repair. Don't flatten a rich request into a single natural-language string and hand planning back to a weaker model. Match the mode to the work:
121
130
 
122
131
  - **One-shot generation** → direct-to-SDK flags (the Core Commands below). You already know the tool, model, and prompt — just run it. No LLM round-trip, lowest latency/cost.
@@ -125,6 +134,11 @@ You (the calling LLM) are almost always more capable than Sogni's hosted plannin
125
134
 
126
135
  **Read [`references/hosted-api.md`](./references/hosted-api.md) first** for the full hosted contract (tool surfaces, durable workflows, templates, replays, Seedance reference modes, media-reference uploads, cost controls).
127
136
 
137
+ On a failed generation, preserve the returned error and recovery hint. Do not
138
+ automatically add `--no-filter` or retry a rejected request. An optional filter
139
+ change needs the user's explicit choice and does not override a model's own
140
+ policy. If the hosted run waits for user input, surface that request and stop.
141
+
128
142
  ```bash
129
143
  # One-shot: you pick the tool, the server just executes (see Core Commands below)
130
144
  sogni-agent -q -Q hq -o ./poster.png "Turn the product photo into a launch poster"
@@ -401,7 +415,7 @@ When a generation cannot bill to the subscription, the CLI returns a structured
401
415
  - **`4080` — Renewal payment is being retried; access is paused.** Tell the user Unlimited resumes automatically once the renewal succeeds and that they can render now with Spark or SOGNI (`--token-type spark` / `sogni`). **Never auto-retry the covered job in a loop** — it will keep failing until billing recovers.
402
416
  - **`4081` — Higher plan required.** Suggest upgrading to Unlimited Pro.
403
417
 
404
- Cancelling a paid subscription keeps access until the end of the paid period; cancelling during the trial ends access immediately. Manage billing where it was purchased (Stripe portal for web, App Store / Google Play settings for mobile) — the CLI does not change plans.
418
+ Cancelling a paid subscription keeps access until the end of the paid period; cancelling during the trial prevents the first charge and keeps trial access until the original trial end. Manage billing where it was purchased (Stripe portal for web, App Store / Google Play settings for mobile) — the CLI does not change plans.
405
419
 
406
420
  ### Suggest next steps after a render
407
421
 
@@ -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.40.0",
5
+ "version": "3.40.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",
@@ -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.40.0",
5
+ "version": "3.40.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.40.0",
3
+ "version": "3.40.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",
@@ -95,13 +95,13 @@
95
95
  "sogni-agent.mjs"
96
96
  ],
97
97
  "dependencies": {
98
- "@sogni-ai/sogni-intelligence-client": "3.28.1",
98
+ "@sogni-ai/sogni-intelligence-client": "3.28.4",
99
99
  "execa": "^10.0.1",
100
100
  "json5": "^2.2.3",
101
101
  "sharp": "0.35.4"
102
102
  },
103
103
  "overrides": {
104
- "@sogni-ai/sogni-client": "5.36.1"
104
+ "@sogni-ai/sogni-client": "5.36.3"
105
105
  },
106
106
  "openclaw": {
107
107
  "extensions": [
@@ -25,6 +25,14 @@ Do not run the default `npx setup-sogni-agent-skill` from an installed plugin un
25
25
 
26
26
  ## Quick examples
27
27
 
28
+ Preserve the requested stage: answer capability questions, deliver drafts for
29
+ writing/review requests, and create only a still for storyboard-image requests.
30
+ Continue an explicitly requested images-to-video sequence through its remaining
31
+ stages unless the user requested a review pause. Preserve exact prompts, source
32
+ choices, counts, and model choices; repeat shared requirements in every variation.
33
+ Do not repeat a successful stage or automatically add `--no-filter` after failure.
34
+ Honor requests to wait for user input; model-specific policies still apply.
35
+
28
36
  - Image: `sogni-agent "a cat on the moon, cinematic"`
29
37
  - Image edit: `sogni-agent -c <path> "make it night, add fireflies"`
30
38
  - Video (image-to-video): `sogni-agent --video --ref <path> "gentle camera pan"` (defaults to `wan_v2.2-14b-fp8_i2v_lightx2v`)
@@ -48,6 +48,52 @@ The direct-to-SDK flags remain the right call for explicit one-shot generation
48
48
  when you already know the exact model, dimensions, and prompt — use them
49
49
  whenever latency or cost rules out an LLM round-trip.
50
50
 
51
+ ## Preserve the requested work
52
+
53
+ - A model/capability question is an answer, not permission to render. A script
54
+ or storyboard-review request ends at the draft; a storyboard-image request
55
+ ends at the still. The `storyboard-video` preset creates a full video, so use
56
+ it only when that is the requested deliverable.
57
+ - When the user requests images, animation, and stitching together, finish those
58
+ stages in order unless they ask to review or select an intermediate result.
59
+ Treat returned artifacts as evidence of completion; do not resubmit a
60
+ successful stage because the assistant's summary omitted its tool call.
61
+ - Preserve exact image prompts, visible lettering, chosen models, source
62
+ selection, aspect ratio, and the latest requested duration. New tasks do not
63
+ inherit settings from unrelated previous renders. A pure size increase uses
64
+ `upscale_image`; editing requires an actual source reference.
65
+ - Separate image variations need `numberOfVariations` and a complete Dynamic
66
+ Prompt branch per output. Repeat shared text, branding, dialogue, and loop
67
+ motion in every affected branch. A single storyboard sheet instead needs all
68
+ requested scenes in order, with complete visual/action, camera, transition,
69
+ dialogue, and sound instructions. Preserve supplied titles and layout. In
70
+ “six 9:16 frames,” six is the count and 9:16 is the frame shape.
71
+ - Preserve reference order and bind the correct uploaded or generated asset.
72
+ An original image can be a prior generated result; it is not necessarily an
73
+ upload. For a loop ending on the original still, bind that original as the
74
+ final reference. Distinguish loose audio guidance from synchronized audio.
75
+ - Check the chosen model's duration and reference limits. A long video may fit
76
+ one native clip or require segments and stitching; do not silently shorten it
77
+ or replace an explicit model. For segmented storyboards, assign each clip its
78
+ own time window and scene beats while preserving locked music and timing.
79
+ - Let the hosted runtime repair malformed calls before dispatch. A correction
80
+ round does not authorize a second successful render. If a result says to wait
81
+ for the user or all outputs failed, surface that result and stop.
82
+ - Optional content-filter changes require the user's explicit choice. In hosted
83
+ chat, a supported settings tool must report success before retrying; declined
84
+ or unavailable confirmation leaves the setting unchanged. In direct CLI mode,
85
+ do not add `--no-filter` on your own. The setting cannot change GPT Image's
86
+ mandatory policy or resolve an unknown rejection. Attribute a rejection to a
87
+ provider only when the returned error supports that attribution.
88
+ When explicitly requested, `--no-filter` is forwarded on new durable workflow
89
+ starts as well as hosted chat. Resuming a workflow retains its original
90
+ preference; passing the flag on a resume does not change it.
91
+
92
+ These are also instructions for the calling agent when it authors direct CLI
93
+ commands or workflow JSON. The public runtime exposes local helpers and shared
94
+ contracts; the full hosted planner, call repair, and confirmation behavior run
95
+ on the server. Updating this skill does not deploy those server components.
96
+
51
97
  ## --api-chat (`POST /v1/chat/completions`)
52
98
 
53
99
  Text-first natural-language workflows through Sogni API's OpenAI-compatible
@@ -66,12 +112,18 @@ Tune with `--api-tools creative-agent|creative-tools|none`,
66
112
  `--thinking` / `--no-thinking` (forwarded as
67
113
  `chat_template_kwargs.enable_thinking`; hosted Qwen may normalize thinking
68
114
  server-side, so do not rely on `--no-thinking` as a hard suppression switch).
115
+ The default output budget is 4,096 tokens for hosted chat (including durable
116
+ chat) and storyboard planning. Keep enough room for every requested scene and
117
+ complete tool arguments; `--max-tokens` overrides that budget.
118
+ HTTP chat and storyboard-planning requests allow up to two minutes for a full
119
+ response by default; `SOGNI_HTTP_TIMEOUT_MS` overrides this timeout. Other HTTP
120
+ requests keep their existing timeouts.
69
121
 
70
122
  ### Hosted tool surfaces (`sogni_tools`)
71
123
 
72
124
  - `creative-tools` — the public API default when `sogni_tools` is omitted or
73
125
  true. Generation/editing tools (`generate_image`, `generate_video`,
74
- `generate_music`, `edit_image`, `upscale_image`, `apply_style`, `restore_photo`,
126
+ `generate_music`, `generate_speech`, `edit_image`, `upscale_image`, `apply_style`, `restore_photo`,
75
127
  `refine_result`, `animate_photo`, `change_angle`, `video_to_video`,
76
128
  `stitch_video`, `orbit_video`, `dance_montage`, `sound_to_video`,
77
129
  `extend_video`, `replace_video_segment`, `overlay_video`, `add_subtitles`),
@@ -106,6 +158,16 @@ deltas plus de-duplicated per-job progress / ETA / result lines from hosted
106
158
  run events. The SDK exposes `sogni.chat.runs.{create, get, cancel,
107
159
  streamEvents}`.
108
160
 
161
+ Durable chat runs the full creative agent with server-side tool execution.
162
+ Use `--api-chat` for `--api-tools creative-tools|none` or
163
+ `--no-api-tool-execution`; durable mode rejects those options before starting a
164
+ run rather than silently ignoring them. Completed assistant snapshots reconcile
165
+ with streamed text so each message appears once, including multi-round turns.
166
+
167
+ Review returned storyboard titles, visible text, and timings against the request
168
+ before rendering. Hosted draft generation can paraphrase supplied scene titles;
169
+ correct the draft first when exact wording matters.
170
+
109
171
  ## --api-workflow (`POST /v1/creative-agent/workflows`)
110
172
 
111
173
  Durable, async workflow records with event streaming and cancellation. The
@@ -55,6 +55,30 @@ its exact bytes and its hash. Never re-save, re-crop or screenshot it, and never
55
55
  substitute a frame extracted from a video for it — a mask traced against one
56
56
  copy will not fit another.
57
57
 
58
+ ### Where the character goes in the shot
59
+
60
+ **Do not put the character front, centre, large and looking at the camera.**
61
+ This is the easiest mistake to make and the hardest to undo, because it is
62
+ usually written once into a shared identity block and then inherited by every
63
+ scene in the world. One build asked for "this single mascot visibly present and
64
+ full-bodied, around one third of the picture height" and then added "stands
65
+ center foreground" to each scene on top of it. Twenty-odd scenes came back as
66
+ the same portrait with different wallpaper. Mark: "NEVER PLACE the main
67
+ character front and center looking at the viewer in every scene ... the main
68
+ character should move in depth and position and not take up so much of the
69
+ screen and not always be looking at the viewer."
70
+
71
+ Compose around the *place* and let the character be in it: off to one side,
72
+ well back in depth, small against the scale, seen from the back or three-
73
+ quarters, occupied with something, entering or leaving. Vary it scene to scene.
74
+ A large camera-facing foreground pose is a choice to make once, for the scene
75
+ where it is the point — never the default.
76
+
77
+ Identity and framing are separate instructions, and only the framing should
78
+ move. Keep every clause about fur, glasses, nose, horn and proportions exactly
79
+ as it is; a character whose placement varies is still the same character, and
80
+ loosening the identity to get variety costs the thing the world is built on.
81
+
58
82
  ### Keeping a character
59
83
 
60
84
  A name is not an identity lock. `krea2_identity_edit_sogni_v0_3_alpha` takes
@@ -102,6 +126,54 @@ Four SAM 3 failures worth knowing before you spend anything:
102
126
 
103
127
  ### Crossings between scenes
104
128
 
129
+ **Describe a journey, never a transformation.** This is the single biggest
130
+ quality lever on a crossing and it is easy to get wrong. Write "the cabin drops
131
+ down the cable, cloud tearing past the windows, until the platform slides into
132
+ frame" and you get travel. Write "the cloud thins into rainforest mist" or "the
133
+ street gives way to the hill" and you get a dissolve — the model reads
134
+ *becomes*, *gives way to*, *opens out into* as an instruction to blend, and no
135
+ amount of "no crossfade" elsewhere in the prompt will override a concrete
136
+ instruction to morph.
137
+
138
+ The tell that a crossing is about to fail is that the journey is *impossible*:
139
+ into a telescope barrel, into a phone earpiece, into a jukebox cabinet, through
140
+ a mirror, into a slot in a rack. With no space to move through, blending is all
141
+ the model has left. Give it real geography instead — go *around* rather than
142
+ *through*. A telescope crossing works if the camera climbs the barrel and keeps
143
+ going up through actual cloud to the observatory; it dissolves if it goes in at
144
+ the eyepiece.
145
+
146
+ The reliable trick for a crossing that really is a portal — under a basket lid,
147
+ into a diving bell — is to let the object physically swallow the lens. The lid
148
+ swings down across frame, it is dark for a beat, and the camera comes out the
149
+ other side. That is occlusion, which is travel, and it never reads as a fade.
150
+
151
+ Distance matters as much as wording. A crossing is about five seconds; asking
152
+ for rainforest canopy to open ocean to Manhattan in that time makes the model
153
+ stall and go to mush even when every verb is a travel verb. Cut the geography
154
+ until the move is one continuous gesture.
155
+
156
+ **No frame-statistics metric can detect a fade. Look at the clip.** This is
157
+ worth stating flatly because two plausible metrics were tried and both inverted:
158
+
159
+ - *Edge energy at the midpoint against the ends.* Reads as a softness detector,
160
+ but fast camera travel with objects whipping past the lens produces real
161
+ motion blur, which drops edge energy exactly as a dissolve does.
162
+ - *Correlating the middle against both ends and taking the lower.* Reads as a
163
+ superimposition detector, but two scenes that simply look alike — two rainy
164
+ streets — correlate highly with nothing blended, and a deliberate dark
165
+ occlusion beat correlates with neither end while being exactly right.
166
+
167
+ Combining them does not help, because the occlusion the crossing wants — a lid
168
+ swinging over the lens, a bell going down into dark water, a turn into an
169
+ unlit stairwell — is, in frame statistics, indistinguishable from mush: a
170
+ middle that resembles neither end and carries little detail. Both rewrites
171
+ measured *worse* than the transformations they replaced and both were plainly
172
+ better on screen. Extract a strip of eight frames across the whole clip and
173
+ look at it. One picture smeared or blocked is travel; two pictures
174
+ superimposed is a fade. That judgement takes seconds and is the only one that
175
+ has been right.
176
+
105
177
  Anchor first *and* last frame on the exact retained stills. That is what makes a
106
178
  journey feel continuous instead of like a cut: the clip opens on the frame the
107
179
  visitor was already looking at and lands on the one they are about to explore.
@@ -3,7 +3,7 @@
3
3
  "private": true,
4
4
  "type": "module",
5
5
  "dependencies": {
6
- "@sogni-ai/sogni-intelligence-client": "3.28.1",
6
+ "@sogni-ai/sogni-intelligence-client": "3.28.4",
7
7
  "execa": "^10.0.1",
8
8
  "json5": "^2.2.3",
9
9
  "sharp": "0.35.4"
package/sogni-agent.mjs CHANGED
@@ -1423,12 +1423,18 @@ function isStructuredInsufficientBalanceError(error) {
1423
1423
  * / `addCanonicalErrorFields`) cannot tell that the failure is e.g.
1424
1424
  * `INSUFFICIENT_BALANCE`, so the "Buy Spark Packs" CTA silently no-ops.
1425
1425
  */
1426
- function buildProjectResultError(projectResult) {
1427
- const message = projectResult?.error || projectResult?.message || 'Project failed';
1426
+ function buildProjectResultError(projectResult, fallback = 'Project failed') {
1427
+ const nested = projectResult?.error;
1428
+ const failure = nested && typeof nested === 'object' ? nested : projectResult;
1429
+ const message = [typeof nested === 'object' ? nested?.message : nested, failure?.error, failure?.message, projectResult?.message, projectResult]
1430
+ .find((value) => typeof value === 'string' && value.trim()) || fallback;
1428
1431
  const err = new Error(message);
1429
- if (projectResult?.code) err.code = projectResult.code;
1430
- if (projectResult?.details) err.details = projectResult.details;
1431
- if (projectResult?.hint) err.hint = projectResult.hint;
1432
+ // SDK create responses and error events must keep the same typed failure.
1433
+ // In particular, an object-valued error must never become "[object Object]".
1434
+ for (const key of ['code', 'originalCode', 'errorCode', 'error_code', 'details', 'hint', 'originalError', 'isNSFW']) {
1435
+ const value = failure?.[key] ?? projectResult?.[key];
1436
+ if (value !== undefined) err[key] = value;
1437
+ }
1432
1438
  if (classifyCliError(err).category === 'insufficient_credits' && !err.hint) {
1433
1439
  err.hint = SPARK_PACKS_PURCHASE_HINT;
1434
1440
  }
@@ -4045,7 +4051,7 @@ Hosted API Modes:
4045
4051
  --no-api-tool-execution Ask for tool calls/plans but do not execute Sogni tools
4046
4052
  --llm-model <id> LLM model for --api-chat (default: ${DEFAULT_LLM_MODEL})
4047
4053
  --task-profile <p> LLM task profile for --api-chat: general|coding|reasoning
4048
- --max-tokens <num> Max chat completion tokens for --api-chat and storyboard planning
4054
+ --max-tokens <num> Max chat completion tokens for --api-chat and storyboard planning (default: 4096)
4049
4055
  --thinking, --no-thinking Toggle chat_template_kwargs.enable_thinking
4050
4056
  --system <text> System prompt for --api-chat
4051
4057
  --list-api-models List Sogni Intelligence LLM models from /v1/models
@@ -6528,6 +6534,7 @@ async function dispatchWorkflowActionViaSdk(action, apiKey, params) {
6528
6534
  ? { maxEstimatedCapacityUnits: params.maxEstimatedCapacityUnits }
6529
6535
  : {}),
6530
6536
  ...(params.confirmCost != null ? { confirmCost: params.confirmCost } : {}),
6537
+ ...(typeof params.safeContentFilter === 'boolean' ? { safeContentFilter: params.safeContentFilter } : {}),
6531
6538
  ...(params.idempotencyKey ? { idempotencyKey: params.idempotencyKey } : {}),
6532
6539
  ...(params.attribution ? { attribution: params.attribution } : {}),
6533
6540
  },
@@ -6663,6 +6670,13 @@ const DEFAULT_HTTP_TIMEOUT_MS = (() => {
6663
6670
  return Number.isFinite(raw) && raw > 0 ? raw : 30000;
6664
6671
  })();
6665
6672
 
6673
+ // Chat waits for a complete model response, including multi-scene tool JSON.
6674
+ // Keep catalog/download timeouts short while allowing hosted planning to finish.
6675
+ const CHAT_HTTP_TIMEOUT_MS = (() => {
6676
+ const raw = Number.parseInt(getEnv('SOGNI_HTTP_TIMEOUT_MS') || '', 10);
6677
+ return Number.isFinite(raw) && raw > 0 ? raw : 120000;
6678
+ })();
6679
+
6666
6680
  // Uploads keep the timer running for the whole request-body send (the fetch
6667
6681
  // promise only resolves once the server responds), so they get a longer budget
6668
6682
  // than the connect-phase default that suffices for GET/download/stream calls.
@@ -6694,6 +6708,7 @@ async function fetchApiJson(path, {
6694
6708
  body = undefined,
6695
6709
  headers = {},
6696
6710
  workloadAttribution = undefined,
6711
+ timeoutMs = DEFAULT_HTTP_TIMEOUT_MS,
6697
6712
  } = {}) {
6698
6713
  const url = await buildSafeApiUrl(path);
6699
6714
  const init = {
@@ -6702,7 +6717,7 @@ async function fetchApiJson(path, {
6702
6717
  ...(body === undefined ? {} : { body: JSON.stringify(body) })
6703
6718
  };
6704
6719
 
6705
- const response = await fetchWithTimeout(url, init);
6720
+ const response = await fetchWithTimeout(url, init, timeoutMs);
6706
6721
  const text = await response.text();
6707
6722
  let payload = {};
6708
6723
  if (text) {
@@ -7125,12 +7140,20 @@ V2 TURN ARCHITECTURE:
7125
7140
  - Do not narrate hidden planning, tool selection, JSON, function names, or internal architecture to the user.
7126
7141
 
7127
7142
  SOGNI PRODUCT KNOWLEDGE:
7128
- - Sogni can create and edit images, generate and transform videos, compose music/lyrics, restore photos, apply styles, analyze media, and use uploaded or generated assets as references.
7143
+ - Sogni can create and edit images, generate and transform videos, compose music/lyrics, generate speech, restore photos, apply styles, analyze media, and use uploaded or generated assets as references. Use the exposed tools and their current model contracts for exact capabilities.
7129
7144
  - GPT Image 2 in Sogni creates images from text prompts, edits/restyles uploaded or generated references, builds storyboard/keyframe sheets, character/reference boards, ad/product composites, and layout/text-heavy stills.
7130
7145
  - For action requests, use image generation for text-to-image and image editing when references guide identity, likeness, composition, style, objects, logos, or products. Paid renders show a preflight estimate before spending.
7131
- - Featured workflow: GPT Image 2 storyboard/keyframes -> Seedance 2.0 for finished social videos such as ads, trailers, character intros, and storyboard-to-video flows.
7146
+ - A storyboard/keyframe sheet can guide a finished video when the user requests that stage. Honor an explicit model choice; select a supported workflow, duration, and reference mode from the exposed model contract.
7132
7147
  - For Sogni, model, GPT Image, Seedance, or creative capability questions, describe the media tools Sogni can use instead of falling back to generic text-only limitations.
7133
- - For unknown product facts, state uncertainty and point to docs.sogni.ai or Discord.`;
7148
+ - For unknown product facts, state uncertainty and point to docs.sogni.ai or Discord.
7149
+
7150
+ MEDIA EXECUTION:
7151
+ - Preserve the requested stage: writing or reviewing a storyboard stops at text; a storyboard image stops at the still. An explicit create-images, animate, and stitch request authorizes those stages in order unless the user asks for a review pause.
7152
+ - Preserve exact image prompts, visible lettering, model choices, source selection, dimensions, and the latest requested duration. A new task does not inherit unrelated earlier render settings. Text-only creation has no source image; pure enlargement of a source uses the promptless upscale tool.
7153
+ - For separate image variations, use the requested count and one complete Dynamic Prompt branch per output. Repeat shared visible text, visual elements, dialogue, and loop motion in every affected branch. For one storyboard sheet, fully write every requested scene, preserving scene titles, panel count, and layout; aspect-ratio numbers are not panel counts.
7154
+ - Use actual uploaded/generated asset indices and preserve reference order. Bind explicit first and last frames, including a return to the original still for a loop. Distinguish audio used as a loose reference from audio driving synchronized performance.
7155
+ - Treat returned media and completed stages as authoritative. Continue only unfinished requested stages; do not render a successful stage again because a summary lacks a tool call. Stop when a tool asks to wait for the user or reports that all outputs failed.
7156
+ - When a tool offers an optional content-filter change, wait for the user's choice and a successful setting change before retrying. If confirmation is declined or unavailable, stop. Do not automatically change settings after a failure, attribute an unknown rejection to a provider, or offer the setting as a remedy for a mandatory model policy.`;
7134
7157
 
7135
7158
  /**
7136
7159
  * Build the persona/memory/personality dynamic-system-prompt suffix the
@@ -7279,6 +7302,11 @@ function chatRunWaitingStatus(type) {
7279
7302
  }
7280
7303
 
7281
7304
  async function runApiChat(log) {
7305
+ if (options.durableChat && (options.apiTools !== 'creative-agent' || options.apiToolExecution === false)) {
7306
+ const error = new Error('--durable-chat does not support --api-tools overrides or --no-api-tool-execution. Use --api-chat for restricted tools or planning without tool execution.');
7307
+ error.code = 'DURABLE_CHAT_UNSUPPORTED_TOOL_OPTIONS';
7308
+ throw error;
7309
+ }
7282
7310
  const creds = loadCredentials();
7283
7311
  const apiKey = requireApiKeyCredentials(creds, '--api-chat');
7284
7312
  const apiMediaRefs = getApiModeMediaReferences();
@@ -7289,7 +7317,7 @@ async function runApiChat(log) {
7289
7317
  model: options.llmModel || DEFAULT_LLM_MODEL,
7290
7318
  messages,
7291
7319
  temperature: 0.4,
7292
- max_tokens: options.apiMaxTokens || 1600,
7320
+ max_tokens: options.apiMaxTokens || 4096,
7293
7321
  token_type: options.tokenType || 'spark',
7294
7322
  app_source: SOGNI_APP_SOURCE,
7295
7323
  sogni_tools: options.apiTools,
@@ -7314,6 +7342,7 @@ async function runApiChat(log) {
7314
7342
  apiKey,
7315
7343
  method: 'POST',
7316
7344
  body,
7345
+ timeoutMs: CHAT_HTTP_TIMEOUT_MS,
7317
7346
  workloadAttribution,
7318
7347
  }));
7319
7348
  const message = extractChatMessage(payload);
@@ -7408,6 +7437,7 @@ async function runApiChatDurable(log, { apiKey, body, workloadAttribution }) {
7408
7437
  const restBase = new URL(restEndpoint).origin;
7409
7438
 
7410
7439
  const assistantParts = [];
7440
+ let currentAssistantText = '';
7411
7441
  const toolCalls = [];
7412
7442
  const workflows = [];
7413
7443
  let runId = null;
@@ -7447,12 +7477,23 @@ async function runApiChatDurable(log, { apiKey, body, workloadAttribution }) {
7447
7477
  for await (const event of helpers.sdkChatRunsStreamEvents(client, runId, {})) {
7448
7478
  const type = event?.type || event?.event || '';
7449
7479
  const payload = chatRunEventPayload(event);
7450
- // Stream assistant message deltas as they arrive.
7451
- const delta = chatRunAssistantDelta(type, payload);
7452
- if (typeof delta === 'string' && delta) {
7453
- assistantParts.push(delta);
7480
+ // Completion events contain a full message snapshot, not another
7481
+ // delta. Reconcile the current message before starting the next round.
7482
+ if (type === 'assistant_message_completed') {
7483
+ const completedText = typeof payload?.content === 'string' ? payload.content : currentAssistantText;
7454
7484
  if (!options.json) {
7455
- process.stdout.write(delta);
7485
+ const remainder = completedText.startsWith(currentAssistantText)
7486
+ ? completedText.slice(currentAssistantText.length)
7487
+ : `\n${completedText}`;
7488
+ if (remainder) process.stdout.write(remainder);
7489
+ }
7490
+ assistantParts.push(completedText);
7491
+ currentAssistantText = '';
7492
+ } else {
7493
+ const delta = chatRunAssistantDelta(type, payload);
7494
+ if (typeof delta === 'string' && delta) {
7495
+ currentAssistantText += delta;
7496
+ if (!options.json) process.stdout.write(delta);
7456
7497
  }
7457
7498
  }
7458
7499
  // Per-job progress / ETA / completion / error log lines for
@@ -7537,6 +7578,7 @@ async function runApiChatDurable(log, { apiKey, body, workloadAttribution }) {
7537
7578
  },
7538
7579
  );
7539
7580
 
7581
+ if (currentAssistantText) assistantParts.push(currentAssistantText);
7540
7582
  const content = assistantParts.join('');
7541
7583
  if (options.json) {
7542
7584
  console.log(JSON.stringify({
@@ -7759,7 +7801,7 @@ async function generateStoryboardWorkflowStoryline(apiKey) {
7759
7801
  model: options.llmModel || DEFAULT_LLM_MODEL,
7760
7802
  messages,
7761
7803
  temperature: 0.45,
7762
- max_tokens: options.apiMaxTokens || 1800,
7804
+ max_tokens: options.apiMaxTokens || 4096,
7763
7805
  token_type: options.tokenType || 'spark',
7764
7806
  app_source: SOGNI_APP_SOURCE,
7765
7807
  ...(options.apiTaskProfile ? { task_profile: options.apiTaskProfile } : {}),
@@ -7779,6 +7821,7 @@ async function generateStoryboardWorkflowStoryline(apiKey) {
7779
7821
  apiKey,
7780
7822
  method: 'POST',
7781
7823
  body,
7824
+ timeoutMs: CHAT_HTTP_TIMEOUT_MS,
7782
7825
  workloadAttribution,
7783
7826
  }));
7784
7827
  const message = extractChatMessage(payload);
@@ -8683,6 +8726,7 @@ async function runApiWorkflow() {
8683
8726
  mediaReferences: apiMediaReferences.length > 0 ? apiMediaReferences : undefined,
8684
8727
  maxEstimatedCapacityUnits: options.apiWorkflowMaxCost ?? undefined,
8685
8728
  confirmCost: options.apiWorkflowConfirmCost ?? undefined,
8729
+ safeContentFilter: options.noFilter === true ? false : undefined,
8686
8730
  idempotencyKey: options.apiWorkflowIdempotencyKey ?? undefined,
8687
8731
  attribution: workloadAttribution,
8688
8732
  }))
@@ -8699,6 +8743,7 @@ async function runApiWorkflow() {
8699
8743
  max_estimated_capacity_units: options.apiWorkflowMaxCost,
8700
8744
  } : {}),
8701
8745
  ...(options.apiWorkflowConfirmCost !== null ? { confirm_cost: options.apiWorkflowConfirmCost } : {}),
8746
+ ...(options.noFilter === true ? { safe_content_filter: false } : {}),
8702
8747
  token_type: tokenType,
8703
8748
  app_source: SOGNI_APP_SOURCE
8704
8749
  },
@@ -11006,7 +11051,7 @@ async function runImageEditProjectWithEvents(client, editConfig, expectedCount,
11006
11051
  if (projectId && data.projectId !== projectId) return;
11007
11052
  if (!projectId) projectId = data.projectId;
11008
11053
  cleanup();
11009
- rejectPromise(new Error(data.error || 'Job failed'));
11054
+ rejectPromise(buildProjectResultError(data, 'Job failed'));
11010
11055
  };
11011
11056
 
11012
11057
  const cleanup = () => {
@@ -12330,27 +12375,24 @@ async function main() {
12330
12375
 
12331
12376
  client.on(ClientEvent.JOB_FAILED, (data) => {
12332
12377
  clearTimeout(timeout);
12333
- reject(new Error(data.error || 'Job failed'));
12378
+ reject(buildProjectResultError(data, 'Job failed'));
12334
12379
  });
12335
12380
 
12336
12381
  client.on(ClientEvent.PROJECT_FAILED, (data) => {
12337
12382
  clearTimeout(timeout);
12338
- const message = data?.message || data?.error || 'Project failed';
12339
- reject(new Error(message));
12383
+ reject(buildProjectResultError(data));
12340
12384
  });
12341
12385
 
12342
12386
  client.on(ClientEvent.PROJECT_EVENT, (event) => {
12343
12387
  if (event?.type !== 'error') return;
12344
12388
  clearTimeout(timeout);
12345
- const message = event?.error?.message || event?.error?.error || 'Project failed';
12346
- reject(new Error(message));
12389
+ reject(buildProjectResultError(event));
12347
12390
  });
12348
12391
 
12349
12392
  client.on(ClientEvent.JOB_EVENT, (event) => {
12350
12393
  if (event?.type !== 'error') return;
12351
12394
  clearTimeout(timeout);
12352
- const message = event?.error?.message || event?.error?.error || 'Job failed';
12353
- reject(new Error(message));
12395
+ reject(buildProjectResultError(event, 'Job failed'));
12354
12396
  });
12355
12397
 
12356
12398
  // Progress for longer-running media jobs.
@@ -13486,12 +13528,12 @@ async function main() {
13486
13528
 
13487
13529
  client2.on(ClientEvent.JOB_FAILED, (data) => {
13488
13530
  clearTimeout(timeout);
13489
- reject(new Error(data.error || 'Second clip generation failed'));
13531
+ reject(buildProjectResultError(data, 'Second clip generation failed'));
13490
13532
  });
13491
13533
 
13492
13534
  client2.on(ClientEvent.PROJECT_FAILED, (data) => {
13493
13535
  clearTimeout(timeout);
13494
- reject(new Error(data?.message || 'Second clip project failed'));
13536
+ reject(buildProjectResultError(data, 'Second clip project failed'));
13495
13537
  });
13496
13538
 
13497
13539
  // Show progress for second clip
package/version.mjs CHANGED
@@ -1 +1 @@
1
- export const PACKAGE_VERSION = '3.40.0';
1
+ export const PACKAGE_VERSION = '3.40.1';