@sogni-ai/sogni-creative-agent-skill 3.73.1 → 3.73.2
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/image-prompting.md +1 -1
- package/.agents/skills/sogni-creative-agent-skill/references/video-prompting.md +8 -8
- package/.claude-plugin/plugin.json +1 -1
- package/.codex-plugin/plugin.json +1 -1
- package/CHANGELOG.md +6 -0
- package/SKILL.md +1 -1
- package/desktop-extension/manifest.json +1 -1
- package/openclaw.plugin.json +1 -1
- package/package.json +2 -2
- package/references/image-prompting.md +1 -1
- package/references/video-prompting.md +8 -8
- package/skill-package.json +1 -1
- package/sogni-agent.mjs +69 -26
- package/version.mjs +1 -1
|
@@ -3,7 +3,7 @@ name: sogni-creative-agent-skill
|
|
|
3
3
|
description: "Generate and edit images, create Pixal3D 3D models, remove backgrounds with BiRefNet, synthesize Qwen3-TTS speech, 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, build a playable world, apply a saved identity, or refine an earlier Sogni result."
|
|
4
4
|
license: MIT
|
|
5
5
|
metadata:
|
|
6
|
-
version: "3.73.
|
|
6
|
+
version: "3.73.2"
|
|
7
7
|
author: Sogni AI
|
|
8
8
|
hermes:
|
|
9
9
|
category: creative
|
|
@@ -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.
|
|
67
|
+
<!-- Generated by npm run sync:prompt-guides from @sogni-ai/sogni-intelligence-client 4.33.1; edit the rules there, not here. -->
|
|
68
68
|
|
|
69
69
|
## Per-model rules from Sogni's image prompt writer
|
|
70
70
|
|
|
@@ -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.
|
|
127
|
+
<!-- Generated by npm run sync:prompt-guides from @sogni-ai/sogni-intelligence-client 4.33.1; 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.
|
|
182
|
+
<!-- Generated by npm run sync:prompt-guides from @sogni-ai/sogni-intelligence-client 4.33.1; edit the rules there, not here. -->
|
|
183
183
|
|
|
184
184
|
### Sogni's prompt rules: ltx-2.3
|
|
185
185
|
|
|
@@ -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.
|
|
980
|
+
<!-- Generated by npm run sync:prompt-guides from @sogni-ai/sogni-intelligence-client 4.33.1; edit the rules there, not here. -->
|
|
981
981
|
|
|
982
982
|
### Sogni's prompt rules: minimax-h3
|
|
983
983
|
|
|
@@ -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.
|
|
1198
|
+
<!-- Generated by npm run sync:prompt-guides from @sogni-ai/sogni-intelligence-client 4.33.1; 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.
|
|
1272
|
+
<!-- Generated by npm run sync:prompt-guides from @sogni-ai/sogni-intelligence-client 4.33.1; 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.
|
|
1381
|
+
<!-- Generated by npm run sync:prompt-guides from @sogni-ai/sogni-intelligence-client 4.33.1; 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.
|
|
1471
|
+
<!-- Generated by npm run sync:prompt-guides from @sogni-ai/sogni-intelligence-client 4.33.1; 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.
|
|
1526
|
+
<!-- Generated by npm run sync:prompt-guides from @sogni-ai/sogni-intelligence-client 4.33.1; edit the rules there, not here. -->
|
|
1527
1527
|
|
|
1528
1528
|
### Sogni's prompt rules: happyhorse-1.1
|
|
1529
1529
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "sogni-creative-agent",
|
|
3
|
-
"version": "3.73.
|
|
3
|
+
"version": "3.73.2",
|
|
4
4
|
"description": "Sogni Creative Agent: image, 3D, speech, 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,9 @@
|
|
|
1
|
+
## [3.73.2] - 2026-11-22
|
|
2
|
+
|
|
3
|
+
- If another connection takes over while a render is running, the CLI reports error 4015 immediately and prints `sogni-agent --result <project-id> --wait` for each affected project. You can collect the original render without submitting or paying for it again.
|
|
4
|
+
- A takeover during startup identifies the shared app ID. A takeover after the final job completes still lets the CLI finish saving the result.
|
|
5
|
+
- Use Sogni SDK 5.86.1 and intelligence-client 4.33.1.
|
|
6
|
+
|
|
1
7
|
## [3.73.1] - 2026-11-22
|
|
2
8
|
|
|
3
9
|
- Media references continue to download through configured proxies across supported Node versions, with clearer failures for invalid, oversized or stalled downloads.
|
package/SKILL.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
name: sogni-creative-agent-skill
|
|
3
3
|
description: "CLI and agent skill for personal LoRAs, image, video, and music generation using Sogni AI's decentralized GPU network. Supports Pixal3D single- and multi-view image-to-GLB, BiRefNet background removal, Qwen3-TTS speech/voice cloning/design, MiniMax Music 3, SAM 3 object selection, promptless RTX VSR image upscaling through 16K, promptless FlashVSR and RelayVSR video upscaling up to 2160p, one-click image-folder loop reels, personas (people with saved photos and voices), persistent memories, custom personality, style transfer, angle synthesis, MiniMax H3/H3 Balanced/LightX2V Turbo/FastH3 Turbo (including audio-to-video from an uploaded track)/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\", \"upscale a video\", \"make a video/animate\", \"turn this image folder into a loop\", \"make music\", \"build a playable world\", \"apply a style\", or \"generate me as a superhero\"."
|
|
4
4
|
metadata:
|
|
5
|
-
version: "3.73.
|
|
5
|
+
version: "3.73.2"
|
|
6
6
|
homepage: https://sogni.ai
|
|
7
7
|
openclaw:
|
|
8
8
|
emoji: "🎨"
|
|
@@ -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.73.
|
|
5
|
+
"version": "3.73.2",
|
|
6
6
|
"description": "Generate images, video, music, and speech, and upscale images and video, 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/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.73.
|
|
5
|
+
"version": "3.73.2",
|
|
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.73.
|
|
3
|
+
"version": "3.73.2",
|
|
4
4
|
"description": "Sogni Creative Agent Skill: agent skill and CLI for Sogni AI image, 3D, speech, video, and music generation.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "sogni-agent.mjs",
|
|
@@ -108,7 +108,7 @@
|
|
|
108
108
|
"progress-events.mjs"
|
|
109
109
|
],
|
|
110
110
|
"dependencies": {
|
|
111
|
-
"@sogni-ai/sogni-intelligence-client": "4.
|
|
111
|
+
"@sogni-ai/sogni-intelligence-client": "4.33.1",
|
|
112
112
|
"execa": "^10.0.1",
|
|
113
113
|
"json5": "^2.2.3",
|
|
114
114
|
"sharp": "0.35.5"
|
|
@@ -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.
|
|
67
|
+
<!-- Generated by npm run sync:prompt-guides from @sogni-ai/sogni-intelligence-client 4.33.1; edit the rules there, not here. -->
|
|
68
68
|
|
|
69
69
|
## Per-model rules from Sogni's image prompt writer
|
|
70
70
|
|
|
@@ -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.
|
|
127
|
+
<!-- Generated by npm run sync:prompt-guides from @sogni-ai/sogni-intelligence-client 4.33.1; 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.
|
|
182
|
+
<!-- Generated by npm run sync:prompt-guides from @sogni-ai/sogni-intelligence-client 4.33.1; edit the rules there, not here. -->
|
|
183
183
|
|
|
184
184
|
### Sogni's prompt rules: ltx-2.3
|
|
185
185
|
|
|
@@ -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.
|
|
980
|
+
<!-- Generated by npm run sync:prompt-guides from @sogni-ai/sogni-intelligence-client 4.33.1; edit the rules there, not here. -->
|
|
981
981
|
|
|
982
982
|
### Sogni's prompt rules: minimax-h3
|
|
983
983
|
|
|
@@ -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.
|
|
1198
|
+
<!-- Generated by npm run sync:prompt-guides from @sogni-ai/sogni-intelligence-client 4.33.1; 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.
|
|
1272
|
+
<!-- Generated by npm run sync:prompt-guides from @sogni-ai/sogni-intelligence-client 4.33.1; 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.
|
|
1381
|
+
<!-- Generated by npm run sync:prompt-guides from @sogni-ai/sogni-intelligence-client 4.33.1; 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.
|
|
1471
|
+
<!-- Generated by npm run sync:prompt-guides from @sogni-ai/sogni-intelligence-client 4.33.1; 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.
|
|
1526
|
+
<!-- Generated by npm run sync:prompt-guides from @sogni-ai/sogni-intelligence-client 4.33.1; edit the rules there, not here. -->
|
|
1527
1527
|
|
|
1528
1528
|
### Sogni's prompt rules: happyhorse-1.1
|
|
1529
1529
|
|
package/skill-package.json
CHANGED
package/sogni-agent.mjs
CHANGED
|
@@ -853,12 +853,15 @@ function resolveConfiguredPath(rawPath, fallbackPath, label) {
|
|
|
853
853
|
async function disableLiveModelAvailabilityEvents(wrapper) {
|
|
854
854
|
const sdkClient = wrapper?.client;
|
|
855
855
|
|
|
856
|
+
const stopWatching = watchForConnectionTakeover(wrapper);
|
|
856
857
|
try {
|
|
857
858
|
if (typeof sdkClient?.setSocketEventSubscriptions === 'function') {
|
|
858
859
|
await sdkClient.setSocketEventSubscriptions(SOCKET_EVENT_SUBSCRIPTIONS);
|
|
859
860
|
}
|
|
860
861
|
} catch (err) {
|
|
861
862
|
// Subscription optimization is best-effort and must not block generation.
|
|
863
|
+
} finally {
|
|
864
|
+
stopWatching();
|
|
862
865
|
}
|
|
863
866
|
}
|
|
864
867
|
|
|
@@ -980,6 +983,10 @@ function classifyCliError(error, context = {}) {
|
|
|
980
983
|
error = unwrapGenericProjectError(error);
|
|
981
984
|
const rawMessage = cliErrorMessage(error);
|
|
982
985
|
|
|
986
|
+
if (error?.code === '4015') {
|
|
987
|
+
return { error_type: 'SWITCH_CONNECTION', category: 'connection_error', message: rawMessage, retryable: false };
|
|
988
|
+
}
|
|
989
|
+
|
|
983
990
|
if (RELAXED_UNAVAILABLE_MESSAGE.test(rawMessage)) {
|
|
984
991
|
return {
|
|
985
992
|
error_type: 'MODEL_UNAVAILABLE',
|
|
@@ -1289,23 +1296,55 @@ function reportFatalError(error) {
|
|
|
1289
1296
|
process.on('uncaughtException', reportFatalError);
|
|
1290
1297
|
process.on('unhandledRejection', reportFatalError);
|
|
1291
1298
|
|
|
1292
|
-
|
|
1293
|
-
|
|
1294
|
-
// by the global handlers above.)
|
|
1299
|
+
const connectionTakeovers = new WeakMap();
|
|
1300
|
+
|
|
1295
1301
|
/** The CLI's SDK client, signed in with the API key under one app ID. */
|
|
1296
1302
|
function createSkillSogniClient(creds, appId) {
|
|
1297
|
-
|
|
1303
|
+
const takeover = new AbortController();
|
|
1304
|
+
const client = new SogniClientWrapper({
|
|
1298
1305
|
appSource: SOGNI_APP_SOURCE,
|
|
1299
1306
|
appId,
|
|
1300
1307
|
attribution: clientAttribution(AGENT_ATTRIBUTION),
|
|
1301
1308
|
network: renderNetwork,
|
|
1302
1309
|
autoConnect: false,
|
|
1310
|
+
onConnectionTakeover: () => takeover.abort(),
|
|
1303
1311
|
apiKey: creds.SOGNI_API_KEY,
|
|
1304
1312
|
authType: 'apiKey'
|
|
1305
1313
|
});
|
|
1314
|
+
connectionTakeovers.set(client, takeover.signal);
|
|
1315
|
+
client.on(ClientEvent.PROJECT_CREATED, project => runProjectIds.add(project.id));
|
|
1316
|
+
return client;
|
|
1317
|
+
}
|
|
1318
|
+
|
|
1319
|
+
// A 4015 ends this socket's event stream. Keep completed downloads and other
|
|
1320
|
+
// REST-only work independent of it, and stop only commands relying on the socket.
|
|
1321
|
+
function watchForConnectionTakeover(client, projectId = options.projectLookup?.projectId) {
|
|
1322
|
+
const signal = connectionTakeovers.get(client);
|
|
1323
|
+
const report = () => {
|
|
1324
|
+
const projects = sdkClientOf(client)?.projects?.trackedProjects || [];
|
|
1325
|
+
const ids = new Set(projectId ? [projectId] : []);
|
|
1326
|
+
for (const project of projects) {
|
|
1327
|
+
if (!project.finished && runProjectIds.has(project.id)) ids.add(project.id);
|
|
1328
|
+
}
|
|
1329
|
+
const projectIds = [...ids];
|
|
1330
|
+
const waitCommands = projectIds.map(waitCommandFor);
|
|
1331
|
+
const usesFixedId = getEnv('SOGNI_APP_ID') || getEnv('SOGNI_APP_ID_PATH');
|
|
1332
|
+
const appIdHint = 'For parallel runs, let the CLI allocate its app IDs or give each process its own SOGNI_APP_ID.';
|
|
1333
|
+
fatalCliError('Another connection took over this Sogni app ID (4015).', {
|
|
1334
|
+
code: '4015',
|
|
1335
|
+
details: { projectIds, waitCommands },
|
|
1336
|
+
hint: waitCommands.length
|
|
1337
|
+
? `${usesFixedId ? 'Clear the shared SOGNI_APP_ID or SOGNI_APP_ID_PATH before recovery. ' : ''}Recover the existing render with: ${waitCommands.join('; ')}`
|
|
1338
|
+
: appIdHint
|
|
1339
|
+
});
|
|
1340
|
+
};
|
|
1341
|
+
if (signal.aborted) report();
|
|
1342
|
+
signal.addEventListener('abort', report, { once: true });
|
|
1343
|
+
return () => signal.removeEventListener('abort', report);
|
|
1306
1344
|
}
|
|
1307
1345
|
|
|
1308
1346
|
async function connectSogniClient(client) {
|
|
1347
|
+
const stopWatching = watchForConnectionTakeover(client);
|
|
1309
1348
|
try {
|
|
1310
1349
|
await client.connect();
|
|
1311
1350
|
} catch (error) {
|
|
@@ -1315,6 +1354,8 @@ async function connectSogniClient(client) {
|
|
|
1315
1354
|
if (!error.code) error.code = 'INVALID_API_KEY';
|
|
1316
1355
|
}
|
|
1317
1356
|
throw error;
|
|
1357
|
+
} finally {
|
|
1358
|
+
stopWatching();
|
|
1318
1359
|
}
|
|
1319
1360
|
}
|
|
1320
1361
|
|
|
@@ -14186,6 +14227,7 @@ function waitCommandFor(projectId) {
|
|
|
14186
14227
|
* still ends a run whose submission never completes.
|
|
14187
14228
|
*/
|
|
14188
14229
|
function createProjectWaitTracker(client, log, timeoutMs = options.timeout) {
|
|
14230
|
+
const stopWatching = watchForConnectionTakeover(client);
|
|
14189
14231
|
const projects = new Map();
|
|
14190
14232
|
const reasons = new Map();
|
|
14191
14233
|
const described = new Map();
|
|
@@ -14212,6 +14254,7 @@ function createProjectWaitTracker(client, log, timeoutMs = options.timeout) {
|
|
|
14212
14254
|
return now - startedAt - heldMs - (heldSince === null ? 0 : now - heldSince);
|
|
14213
14255
|
};
|
|
14214
14256
|
const cleanup = () => {
|
|
14257
|
+
stopWatching();
|
|
14215
14258
|
clearTimeout(timer);
|
|
14216
14259
|
if (typeof sdkProjects?.off === 'function') sdkProjects.off('queueChanged', onQueueChanged);
|
|
14217
14260
|
};
|
|
@@ -14536,12 +14579,14 @@ async function followProjectToEnd(client, projectId, { log, creds, timeoutMs })
|
|
|
14536
14579
|
}
|
|
14537
14580
|
}
|
|
14538
14581
|
const deadline = Date.now() + timeoutMs;
|
|
14539
|
-
|
|
14582
|
+
const stopWatching = watchForConnectionTakeover(client, projectId);
|
|
14540
14583
|
let trackingClient = client;
|
|
14541
14584
|
let sideClient = null;
|
|
14542
14585
|
let claim = null;
|
|
14543
14586
|
let stopProgressEvents = () => {};
|
|
14587
|
+
let stopWatchingSideClient;
|
|
14544
14588
|
try {
|
|
14589
|
+
let tracked = await trackedProjectAfterSync(projectsApi, projectId);
|
|
14545
14590
|
if (!tracked) {
|
|
14546
14591
|
const inFlight = await projectsApi.listProjectsElsewhere();
|
|
14547
14592
|
const holder = (inFlight || []).find((project) => project?.id === projectId);
|
|
@@ -14551,8 +14596,14 @@ async function followProjectToEnd(client, projectId, { log, creds, timeoutMs })
|
|
|
14551
14596
|
log(`Taking project ${projectId} back from the run that submitted it...`);
|
|
14552
14597
|
sideClient = createSkillSogniClient(creds, claim.appId);
|
|
14553
14598
|
await connectSogniClient(sideClient);
|
|
14599
|
+
stopWatchingSideClient = watchForConnectionTakeover(sideClient, projectId);
|
|
14554
14600
|
tracked = await trackedProjectAfterSync(sdkClientOf(sideClient).projects, projectId);
|
|
14555
|
-
|
|
14601
|
+
if (tracked) {
|
|
14602
|
+
stopWatching();
|
|
14603
|
+
trackingClient = sideClient;
|
|
14604
|
+
} else {
|
|
14605
|
+
stopWatchingSideClient();
|
|
14606
|
+
}
|
|
14556
14607
|
}
|
|
14557
14608
|
if (!tracked) {
|
|
14558
14609
|
log(claim?.heldByPid
|
|
@@ -14570,6 +14621,8 @@ async function followProjectToEnd(client, projectId, { log, creds, timeoutMs })
|
|
|
14570
14621
|
}
|
|
14571
14622
|
await settleTrackedProject(tracked, { log, deadline, timeoutMs });
|
|
14572
14623
|
} finally {
|
|
14624
|
+
stopWatching();
|
|
14625
|
+
stopWatchingSideClient?.();
|
|
14573
14626
|
stopProgressEvents();
|
|
14574
14627
|
if (sideClient) {
|
|
14575
14628
|
try { await sideClient.disconnect(); } catch { /* already closed */ }
|
|
@@ -14704,6 +14757,7 @@ async function buildProjectTimeoutError(projects, timeoutMs, label = 'Project')
|
|
|
14704
14757
|
}
|
|
14705
14758
|
|
|
14706
14759
|
async function runImageEditProjectWithEvents(client, editConfig, expectedCount, log, timeoutMs, label) {
|
|
14760
|
+
const stopWatching = watchForConnectionTakeover(client);
|
|
14707
14761
|
const results = [];
|
|
14708
14762
|
let completed = 0;
|
|
14709
14763
|
let projectId = null;
|
|
@@ -14744,6 +14798,7 @@ async function runImageEditProjectWithEvents(client, editConfig, expectedCount,
|
|
|
14744
14798
|
};
|
|
14745
14799
|
|
|
14746
14800
|
const cleanup = () => {
|
|
14801
|
+
stopWatching();
|
|
14747
14802
|
clearTimeout(timeout);
|
|
14748
14803
|
removeClientListener(client, ClientEvent.JOB_COMPLETED, onCompleted);
|
|
14749
14804
|
removeClientListener(client, ClientEvent.JOB_FAILED, onFailed);
|
|
@@ -15068,7 +15123,8 @@ async function runMultiAngleFlow(client, log) {
|
|
|
15068
15123
|
if (options.autoResizeVideoAssets !== null) {
|
|
15069
15124
|
clipConfig.autoResizeVideoAssets = options.autoResizeVideoAssets;
|
|
15070
15125
|
}
|
|
15071
|
-
const
|
|
15126
|
+
const stopWatching = watchForConnectionTakeover(client);
|
|
15127
|
+
const clipResult = await client.createVideoProject(withBillingMode(clipConfig)).finally(stopWatching);
|
|
15072
15128
|
|
|
15073
15129
|
// Check for errors in the response (e.g., insufficient tokens)
|
|
15074
15130
|
if (clipResult?.error || clipResult?.message) {
|
|
@@ -15867,15 +15923,7 @@ async function runDoctor() {
|
|
|
15867
15923
|
if (creds?.SOGNI_API_KEY) {
|
|
15868
15924
|
let doctorClient = null;
|
|
15869
15925
|
try {
|
|
15870
|
-
doctorClient =
|
|
15871
|
-
appSource: SOGNI_APP_SOURCE,
|
|
15872
|
-
appId: getOrCreateSogniAppId(),
|
|
15873
|
-
attribution: clientAttribution(AGENT_ATTRIBUTION),
|
|
15874
|
-
network: renderNetwork,
|
|
15875
|
-
autoConnect: false,
|
|
15876
|
-
apiKey: creds.SOGNI_API_KEY,
|
|
15877
|
-
authType: 'apiKey'
|
|
15878
|
-
});
|
|
15926
|
+
doctorClient = createSkillSogniClient(creds, getOrCreateSogniAppId());
|
|
15879
15927
|
const authFlow = (async () => {
|
|
15880
15928
|
await connectSogniClient(doctorClient);
|
|
15881
15929
|
const balance = await doctorClient.getBalance();
|
|
@@ -17825,7 +17873,8 @@ async function main() {
|
|
|
17825
17873
|
// projects.create() resolves once the request is handed to the socket, before the server
|
|
17826
17874
|
// has it, so exiting at once dropped every detached project (2026-10-01: none reached
|
|
17827
17875
|
// the server, yet each was reported as submitted). Report only what the server answered.
|
|
17828
|
-
const
|
|
17876
|
+
const stopWatching = watchForConnectionTakeover(client);
|
|
17877
|
+
const unconfirmed = await awaitServerAnswer([...activeProjects]).finally(stopWatching);
|
|
17829
17878
|
const refused = [...activeProjects].find((project) => project?.status === 'failed');
|
|
17830
17879
|
if (refused) throw buildProjectResultError({ error: refused.terminalError?.() ?? refused.error }, 'Sogni refused the project');
|
|
17831
17880
|
if (unconfirmed.length) {
|
|
@@ -18018,20 +18067,13 @@ async function main() {
|
|
|
18018
18067
|
|
|
18019
18068
|
// Create a new client for second clip to avoid event conflicts
|
|
18020
18069
|
const creds = loadCredentials();
|
|
18021
|
-
const client2 =
|
|
18022
|
-
appSource: SOGNI_APP_SOURCE,
|
|
18023
|
-
appId: getOrCreateSogniAppId(),
|
|
18024
|
-
attribution: clientAttribution(AGENT_ATTRIBUTION),
|
|
18025
|
-
network: renderNetwork,
|
|
18026
|
-
autoConnect: false,
|
|
18027
|
-
apiKey: creds.SOGNI_API_KEY,
|
|
18028
|
-
authType: 'apiKey'
|
|
18029
|
-
});
|
|
18070
|
+
const client2 = createSkillSogniClient(creds, getOrCreateSogniAppId());
|
|
18030
18071
|
await connectSogniClient(client2);
|
|
18031
18072
|
await disableLiveModelAvailabilityEvents(client2);
|
|
18032
18073
|
|
|
18033
18074
|
// Create second clip and wait for completion via events
|
|
18034
18075
|
let activeClip2Project = null;
|
|
18076
|
+
const stopWatchingClip2 = watchForConnectionTakeover(client2);
|
|
18035
18077
|
const clip2Promise = new Promise((resolve, reject) => {
|
|
18036
18078
|
const timeout = setTimeout(() => {
|
|
18037
18079
|
void buildProjectTimeoutError([activeClip2Project], options.timeout, 'second clip project')
|
|
@@ -18039,6 +18081,7 @@ async function main() {
|
|
|
18039
18081
|
}, options.timeout);
|
|
18040
18082
|
|
|
18041
18083
|
client2.on(ClientEvent.JOB_COMPLETED, async (data) => {
|
|
18084
|
+
stopWatchingClip2();
|
|
18042
18085
|
try {
|
|
18043
18086
|
clearTimeout(timeout);
|
|
18044
18087
|
if (data.job?.isWithheld === true) {
|
package/version.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const PACKAGE_VERSION = '3.73.
|
|
1
|
+
export const PACKAGE_VERSION = '3.73.2';
|