@sogni-ai/sogni-creative-agent-skill 3.20.0 → 3.22.0

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.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sogni-creative-agent",
3
- "version": "3.20.0",
3
+ "version": "3.22.0",
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.20.0",
3
+ "version": "3.22.0",
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,43 @@
1
+ # [3.22.0](https://github.com/Sogni-AI/sogni-creative-agent-skill/compare/v3.21.0...v3.22.0) (2026-07-30)
2
+
3
+
4
+ ### Features
5
+
6
+ * **images:** route identity-sensitive edits of referenced people and characters
7
+ through Krea 2 Identity Edit by default while preserving explicit model choices
8
+ * **images:** add concise Krea edit prompting, ordered base/detail references,
9
+ and worker-owned execution defaults for stronger likeness preservation while
10
+ preserving deliberate direct-CLI control overrides
11
+ * **models:** add the explicit `ltx23-eros` selector for LTX-2.3 10Eros
12
+ image-to-video, with required filter acknowledgement and fixed model settings
13
+ * **video:** add start-frame-aware 10Eros cinematic prompting guidance for
14
+ coherent performance, camera motion, atmosphere, dialogue, and sound
15
+
16
+ # [3.21.0](https://github.com/Sogni-AI/sogni-creative-agent-skill/compare/v3.20.0...v3.21.0) (2026-07-31)
17
+
18
+
19
+ ### Features
20
+
21
+ * **telemetry:** identify Codex, Claude Code, Claude Desktop, Hermes Agent, and OpenClaw through fixed host markers and allowlisted MCP client metadata; attach privacy-safe framework, surface, workload, and semantic operation lineage to Sogni-owned requests without sending prompts, user paths, credentials, or headers to presigned uploads
22
+
23
+
24
+ ### Dependencies
25
+
26
+ * use `@sogni-ai/sogni-intelligence-client` 3.10.0 and `@sogni-ai/sogni-client` 5.3.0 for the published attribution contract
27
+
28
+ # [3.20.0](https://github.com/Sogni-AI/sogni-creative-agent-skill/compare/v3.19.0...v3.20.0) (2026-07-29)
29
+
30
+
31
+ ### Bug Fixes
32
+
33
+ * **deps:** use `@sogni-ai/sogni-intelligence-client` 3.9.0
34
+
35
+
36
+ ### Features
37
+
38
+ * **images:** support up to eight ordered Krea 2 Turbo LoRAs with independently
39
+ validated bipolar strengths, including negative inverse-effect values
40
+
1
41
  # [3.19.0](https://github.com/Sogni-AI/sogni-creative-agent-skill/compare/v3.18.1...v3.19.0) (2026-07-28)
2
42
 
3
43
 
package/README.md CHANGED
@@ -575,6 +575,7 @@ Prefer `-Q fast|hq|pro` for images and automatic workflow routing for video. Pas
575
575
  | Direct music generation | `ace_step_1.5_xl_turbo` (or `--music-model turbo`) |
576
576
  | Music with stronger lyric handling | `ace_step_1.5_xl_sft` (or `--music-model sft`) |
577
577
  | Text-to-video with native dialogue/audio | `ltx23-22b-fp8_t2v_distilled` |
578
+ | Explicit uncensored image-to-video on 30GB+ GPUs | `ltx23-eros` with `--no-filter` |
578
579
  | Image+audio-to-video | `ltx23-22b-fp8_ia2v_distilled` |
579
580
  | Audio-to-video | `ltx23-22b-fp8_a2v_distilled` |
580
581
  | Video-to-video with ControlNet | `ltx23-22b-fp8_v2v_distilled` |
@@ -582,7 +583,7 @@ Prefer `-Q fast|hq|pro` for images and automatic workflow routing for video. Pas
582
583
  | Seedance video-to-video without ControlNet | `seedance2-v2v` |
583
584
  | Face lip-sync with uploaded audio | `wan_v2.2-14b-fp8_s2v_lightx2v` |
584
585
 
585
- `gpt-image-2` supports flexible OpenAI image sizes up to 3840 px on either edge, max 3:1 aspect ratio, and total pixels from 655,360 to 8,294,400; the API snaps dimensions to valid multiples of 16. For image editing with `gpt-image-2`, you can pass up to 16 context images. Krea 2 Identity Edit (`krea2_identity_edit_v1_2`) and Dark Beast Krea 2 Identity Edit (`dark_beast_krea2_identity_edit_v1_2`) use `-c/--context`, support 1-2 references, 512-2048 px output, 8-12 steps, and guidance 1.
586
+ `gpt-image-2` supports flexible OpenAI image sizes up to 3840 px on either edge, max 3:1 aspect ratio, and total pixels from 655,360 to 8,294,400; the API snaps dimensions to valid multiples of 16. For image editing with `gpt-image-2`, you can pass up to 16 context images. For likeness-preserving edits of a referenced person or character, agents default to Krea 2 Identity Edit (`krea2_identity_edit_v1_2`) unless you explicitly choose another model. It and Dark Beast Krea 2 Identity Edit (`dark_beast_krea2_identity_edit_v1_2`) use `-c/--context`, accept 1-2 references at 512-2048 px, and leave execution defaults to the current model tier.
586
587
 
587
588
  Music generation uses `--music` and outputs `mp3` by default. `--audio` remains the video-reference alias for `--ref-audio`; use `--music` or `--generate-music` for direct audio-only generation.
588
589
 
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, 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.20.0"
5
+ version: "3.22.0"
6
6
  homepage: https://sogni.ai
7
7
  openclaw:
8
8
  emoji: "🎨"
@@ -151,6 +151,9 @@ sogni-agent -q --video -o ./video.mp4 "<cinematic prose paragraph>"
151
151
  sogni-agent -q --video --ref /path/to/image.png -o ./video.mp4 "<cinematic prose paragraph>"
152
152
  sogni-agent -q --video --ref ./first.png --ref-end ./last.png -o ./morph.mp4 "<LTX transition paragraph>"
153
153
 
154
+ # LTX-2.3 10Eros v1.4 (explicit uncensored I2V; 30GB+ workers only)
155
+ sogni-agent -q --video --workflow i2v --ref /path/to/image.png -m ltx23-eros --no-filter -o ./video.mp4 "<LTX-rewritten paragraph>"
156
+
154
157
  # Sound-to-video (lip-sync), image+audio, audio-only (workflow auto-inferred)
155
158
  sogni-agent --video --ref face.jpg --ref-audio speech.m4a -m wan_v2.2-14b-fp8_s2v_lightx2v "lip sync talking head"
156
159
  sogni-agent --video --ref cover.jpg --ref-audio song.mp3 "music video with synchronized motion"
@@ -225,15 +228,16 @@ sogni-agent doctor --json
225
228
  sogni-agent -c photo.jpg -m qwen_image_edit_2511_fp8 "turn this into anime style; keep the same face, pose, clothing, background, framing, and composition"
226
229
  ```
227
230
 
228
- - For identity-preserving Krea edits, use `-m krea2_identity_edit_v1_2` with 1-2 context images; use `-m dark_beast_krea2_identity_edit_v1_2` for the Dark Beast Krea 2 identity edit LoRA. Both use 512-2048 px output, 8-12 steps, guidance 1, and default to 10 steps.
231
+ - For an edit of a referenced person or character that must preserve likeness or character identity while changing clothing, hair or makeup, pose or position, face/head/body, background, lighting, or visual style, default to `-m krea2_identity_edit_v1_2` with `-c`. Infer that semantic intent in any language; never route from keyword or regex matching. Also use it for a single-character sheet unless Pro/detail-critical layout requirements favor GPT Image 2. An explicitly requested model always wins; use `-m dark_beast_krea2_identity_edit_v1_2` only when the creator explicitly requests that community/uncensored variant. Both accept 1-2 references at 512-2048 px. For two references, pass the base scene first and the person/detail/outfit/pose/style reference second. Write a concise 1-4 sentence delta instruction, do not send a negative prompt, and leave steps, guidance, sampler, and scheduler unset so the current model tier and worker choose their optimized defaults.
229
232
  - For Krea 2 style/control LoRAs, use the base text-to-image model `-m krea2_turbo_fp8_scaled` with repeatable ordered `--lora <id> --lora-strength <n>` arguments (or comma-separated `--loras` / `--lora-strengths`). Up to 8 LoRAs may be stacked. Order matters, strengths are positional, omitted strengths default to 1, and many Krea 2 LoRAs are bipolar sliders whose negative values apply the inverse effect. Do not clamp them to 0-2. The first use of an uncached LoRA may pause while the worker downloads it.
230
- - Do not route to `--photobooth` merely because the user asks to preserve a face in a style edit — face-preserving full-image edits use `-c` with an image edit model. When context images are provided without `-m`, the CLI defaults to `qwen_image_edit_2511_fp8_lightning`; select `-m gpt-image-2` for up to 16 reference images and OpenAI-backed editing (Qwen supports up to 3; Krea identity edit supports up to 2).
233
+ - Do not route to `--photobooth` merely because the user asks to preserve a face in a style edit — face-preserving full-image edits use `-c` with Krea 2 Identity Edit by the semantic rule above. The bare CLI still defaults context edits without `-m` to `qwen_image_edit_2511_fp8_lightning`, so agents must pass the Krea model explicitly for identity-sensitive edits. Select `-m gpt-image-2` for up to 16 reference images and OpenAI-backed editing (Qwen supports up to 3; Krea identity edit supports up to 2).
231
234
 
232
235
  ### LTX video prompts
233
236
 
234
237
  Whenever the chosen video model is in the LTX family (including the default t2v), **do not pass the user's short request through unchanged**. Rewrite it into one unbroken paragraph of 4-8 flowing present-tense sentences describing a single continuous shot — concrete subjects, named light sources, one action thread, dialogue embedded in double quotes with the speaker identified, positive phrasing only, no headers/bullets/negative-prompts. **Read [`references/video-prompting.md`](./references/video-prompting.md) for the full rule, duration pacing, orientation mapping, and camera-language normalization before writing the prompt.**
235
238
 
236
- For lawful adult mature-theme video requests, read
239
+ Whenever the creator explicitly requests 10Eros, and for lawful adult
240
+ mature-theme video requests generally, read
237
241
  [`references/private-mature-video.md`](./references/private-mature-video.md)
238
242
  before choosing a model, LoRA, or specialized prompt token. Keep the exact
239
243
  tokens in that scoped reference rather than ordinary model recommendations.
@@ -268,6 +272,8 @@ When the requested image is meant to **repeat edge to edge without visible joins
268
272
 
269
273
  Prefer `-Q` presets and automatic workflow routing. When a specific model is needed (GPT Image 2 text rendering, Seedance or HappyHorse native audio, WAN lip-sync, LTX dialogue), **read [`references/models.md`](./references/models.md)** for the catalog, recommended selectors, and sizing/divisibility rules.
270
274
 
275
+ `ltx23-eros` is an explicit-only uncensored LTX-2.3 image-to-video selector. Never choose it merely because a prompt appears sexual or another model rejects a request. Use it only when the user explicitly asks for 10Eros/the uncensored model and explicitly permits disabling the content filter. It requires an input image, `--no-filter`, and a 30GB+ worker; the CLI pins its required 9 steps, guidance 1, `euler_ancestral` sampler, and `manual_sigmas` scheduler.
276
+
271
277
  ### Insufficient funds
272
278
 
273
279
  Use `--token-type auto` to retry native Sogni models with SOGNI tokens when SPARK is insufficient. Vendor models (Seedance, HappyHorse, GPT Image 2) require Premium Spark eligibility and never fall back to SOGNI. When you see **"Debit Error: Insufficient funds"** even with auto-fallback, reply exactly:
@@ -0,0 +1,258 @@
1
+ import { randomUUID } from 'node:crypto';
2
+ import { PACKAGE_VERSION } from './version.mjs';
3
+
4
+ export const SOGNI_APP_SOURCE = 'sogni-creative-agent-skill';
5
+
6
+ const FRAMEWORK_ALIASES = new Map([
7
+ ['codex', 'codex'],
8
+ ['codex-cli', 'codex'],
9
+ ['openai-codex', 'codex'],
10
+ ['claude-code', 'claude-code'],
11
+ ['claude-desktop', 'claude-desktop'],
12
+ ['claude-ai', 'claude-desktop'],
13
+ ['hermes', 'hermes-agent'],
14
+ ['hermes-agent', 'hermes-agent'],
15
+ ['openclaw', 'openclaw'],
16
+ ['clawdbot', 'openclaw'],
17
+ ]);
18
+
19
+ const SURFACES = new Set([
20
+ 'plugin',
21
+ 'personal_skill',
22
+ 'mcp',
23
+ 'cli',
24
+ ]);
25
+
26
+ const EXECUTION_MODES = new Set(['browser', 'durable', 'server', 'unknown']);
27
+ // Keep this identical to the SDK/socket/API contract so accepted producer
28
+ // values are not silently discarded downstream.
29
+ const VERSION_PATTERN = /^[0-9][0-9A-Za-z._+-]{0,31}$/;
30
+ const OPERATION_ID_PATTERN = /^[0-9A-Za-z][0-9A-Za-z._:-]{0,127}$/;
31
+
32
+ function slug(value) {
33
+ return String(value ?? '')
34
+ .trim()
35
+ .toLowerCase()
36
+ .replace(/[\s_]+/g, '-')
37
+ .replace(/-+/g, '-');
38
+ }
39
+
40
+ function boundedVersion(value) {
41
+ const normalized = String(value ?? '').trim();
42
+ return VERSION_PATTERN.test(normalized) ? normalized : undefined;
43
+ }
44
+
45
+ function operationId(value) {
46
+ const normalized = String(value ?? '').trim();
47
+ return OPERATION_ID_PATTERN.test(normalized) ? normalized : undefined;
48
+ }
49
+
50
+ export function normalizeAgentFramework(value) {
51
+ return FRAMEWORK_ALIASES.get(slug(value)) ?? 'unknown';
52
+ }
53
+
54
+ export function normalizeAgentSurface(value) {
55
+ const normalized = String(value ?? '').trim().toLowerCase().replace(/-/g, '_');
56
+ return SURFACES.has(normalized) ? normalized : undefined;
57
+ }
58
+
59
+ export function resolveAgentAttribution({
60
+ env = process.env,
61
+ surfaceVersion = PACKAGE_VERSION,
62
+ } = {}) {
63
+ const declaredFramework = normalizeAgentFramework(env.SOGNI_AGENT_FRAMEWORK);
64
+ const openClawInvocation = typeof env.OPENCLAW_PLUGIN_CONFIG === 'string'
65
+ && env.OPENCLAW_PLUGIN_CONFIG.length > 0;
66
+ const hasDeclaredFramework = declaredFramework !== 'unknown';
67
+ const agentFramework = hasDeclaredFramework
68
+ ? declaredFramework
69
+ : openClawInvocation
70
+ ? 'openclaw'
71
+ : 'unknown';
72
+ const declaredSurface = normalizeAgentSurface(env.SOGNI_AGENT_SURFACE);
73
+ const agentSurface = declaredSurface ?? (openClawInvocation ? 'plugin' : 'cli');
74
+ const agentFrameworkVersion = agentFramework === 'unknown'
75
+ ? undefined
76
+ : boundedVersion(env.SOGNI_AGENT_FRAMEWORK_VERSION);
77
+ const executionMode = EXECUTION_MODES.has(String(env.SOGNI_AGENT_EXECUTION_MODE ?? '').trim())
78
+ ? String(env.SOGNI_AGENT_EXECUTION_MODE).trim()
79
+ : undefined;
80
+
81
+ return Object.freeze({
82
+ appSource: SOGNI_APP_SOURCE,
83
+ interactionKind: 'external_agent',
84
+ workloadKind: 'agent_mediated',
85
+ agentFramework,
86
+ agentFrameworkVersion,
87
+ agentSurface,
88
+ agentSurfaceVersion: boundedVersion(env.SOGNI_AGENT_SURFACE_VERSION)
89
+ ?? boundedVersion(surfaceVersion)
90
+ ?? undefined,
91
+ executionMode,
92
+ attributionMethod: hasDeclaredFramework || declaredSurface || openClawInvocation
93
+ ? 'wrapper_declared'
94
+ : 'known_source',
95
+ });
96
+ }
97
+
98
+ export function normalizeMcpClientInfo(clientInfo, {
99
+ fallback = resolveAgentAttribution(),
100
+ surfaceVersion = PACKAGE_VERSION,
101
+ } = {}) {
102
+ const framework = normalizeAgentFramework(clientInfo?.name);
103
+ const useFallback = framework === 'unknown' && fallback?.agentFramework !== 'unknown';
104
+ return Object.freeze({
105
+ ...fallback,
106
+ agentFramework: useFallback ? fallback.agentFramework : framework,
107
+ agentFrameworkVersion: framework === 'unknown'
108
+ ? (useFallback ? fallback.agentFrameworkVersion : undefined)
109
+ : boundedVersion(clientInfo?.version),
110
+ agentSurface: 'mcp',
111
+ agentSurfaceVersion: boundedVersion(surfaceVersion),
112
+ attributionMethod: framework === 'unknown' && !useFallback
113
+ ? 'known_source'
114
+ : 'wrapper_declared',
115
+ });
116
+ }
117
+
118
+ export function attributionEnvironment(attribution) {
119
+ return {
120
+ SOGNI_AGENT_FRAMEWORK: attribution.agentFramework,
121
+ SOGNI_AGENT_SURFACE: attribution.agentSurface,
122
+ SOGNI_AGENT_SURFACE_VERSION: attribution.agentSurfaceVersion,
123
+ SOGNI_AGENT_FRAMEWORK_VERSION: attribution.agentFrameworkVersion,
124
+ SOGNI_AGENT_EXECUTION_MODE: attribution.executionMode,
125
+ };
126
+ }
127
+
128
+ export function connectionAttribution(attribution) {
129
+ return {
130
+ interactionKind: attribution.interactionKind,
131
+ agentFramework: attribution.agentFramework,
132
+ ...(attribution.agentFrameworkVersion
133
+ ? { agentFrameworkVersion: attribution.agentFrameworkVersion }
134
+ : {}),
135
+ agentSurface: attribution.agentSurface,
136
+ ...(attribution.agentSurfaceVersion
137
+ ? { agentSurfaceVersion: attribution.agentSurfaceVersion }
138
+ : {}),
139
+ ...(attribution.executionMode ? { executionMode: attribution.executionMode } : {}),
140
+ };
141
+ }
142
+
143
+ export function workloadAttributionDefaults(attribution) {
144
+ return {
145
+ workloadKind: attribution.workloadKind,
146
+ agentFramework: attribution.agentFramework,
147
+ ...(attribution.agentFrameworkVersion
148
+ ? { agentFrameworkVersion: attribution.agentFrameworkVersion }
149
+ : {}),
150
+ agentSurface: attribution.agentSurface,
151
+ ...(attribution.agentSurfaceVersion
152
+ ? { agentSurfaceVersion: attribution.agentSurfaceVersion }
153
+ : {}),
154
+ ...(attribution.executionMode ? { executionMode: attribution.executionMode } : {}),
155
+ };
156
+ }
157
+
158
+ export function clientAttribution(attribution) {
159
+ return {
160
+ connection: connectionAttribution(attribution),
161
+ workload: workloadAttributionDefaults(attribution),
162
+ };
163
+ }
164
+
165
+ function generatedOperationId() {
166
+ return `op_${randomUUID()}`;
167
+ }
168
+
169
+ export function createInvocationLineage({
170
+ env = process.env,
171
+ generateOperationId = generatedOperationId,
172
+ } = {}) {
173
+ const declaredScope = env.SOGNI_AGENT_OPERATION_SCOPE === 'child' ? 'child' : 'top_level';
174
+ const declaredRoot = operationId(env.SOGNI_AGENT_ROOT_OPERATION_ID);
175
+ const rootOperationId = declaredRoot ?? operationId(env.SOGNI_AGENT_OPERATION_ID)
176
+ ?? generateOperationId();
177
+ const declaredOperation = operationId(env.SOGNI_AGENT_OPERATION_ID);
178
+ const declaredParent = operationId(env.SOGNI_AGENT_PARENT_OPERATION_ID);
179
+ let topLevelIssued = declaredScope === 'child';
180
+ let firstIssued = false;
181
+ let lastOperationId = declaredParent ?? rootOperationId;
182
+
183
+ return {
184
+ rootOperationId,
185
+ next({ scope = 'auto', parentOperationId } = {}) {
186
+ // A command invoked as a child cannot promote one of its internal calls
187
+ // into a second top-level workload, even if that code path normally owns
188
+ // the root when the CLI runs standalone.
189
+ const resolvedScope = declaredScope === 'child'
190
+ ? 'child'
191
+ : scope === 'top_level' || scope === 'child'
192
+ ? scope
193
+ : (!topLevelIssued ? 'top_level' : 'child');
194
+ let nextOperationId;
195
+ if (!firstIssued && declaredOperation) {
196
+ nextOperationId = declaredOperation;
197
+ } else if (resolvedScope === 'top_level' && !topLevelIssued) {
198
+ nextOperationId = rootOperationId;
199
+ } else {
200
+ nextOperationId = generateOperationId();
201
+ }
202
+ const resolvedParent = resolvedScope === 'child'
203
+ ? operationId(parentOperationId)
204
+ ?? (!firstIssued ? declaredParent : undefined)
205
+ ?? lastOperationId
206
+ ?? rootOperationId
207
+ : undefined;
208
+ firstIssued = true;
209
+ if (resolvedScope === 'top_level') topLevelIssued = true;
210
+ lastOperationId = nextOperationId;
211
+ return {
212
+ operationScope: resolvedScope,
213
+ operationId: nextOperationId,
214
+ rootOperationId,
215
+ ...(resolvedParent ? { parentOperationId: resolvedParent } : {}),
216
+ };
217
+ },
218
+ };
219
+ }
220
+
221
+ export function semanticWorkloadAttribution(attribution, lineage) {
222
+ return {
223
+ ...workloadAttributionDefaults(attribution),
224
+ ...lineage,
225
+ };
226
+ }
227
+
228
+ export function attributionHeaders(attribution, workload) {
229
+ const headers = {
230
+ 'X-App-Source': attribution.appSource,
231
+ 'X-Sogni-Interaction-Kind': attribution.interactionKind,
232
+ 'X-Sogni-Workload-Kind': workload?.workloadKind ?? attribution.workloadKind,
233
+ 'X-Sogni-Agent-Framework': attribution.agentFramework,
234
+ 'X-Sogni-Agent-Surface': attribution.agentSurface,
235
+ };
236
+ if (attribution.agentFrameworkVersion) {
237
+ headers['X-Sogni-Agent-Framework-Version'] = attribution.agentFrameworkVersion;
238
+ }
239
+ if (attribution.agentSurfaceVersion) {
240
+ headers['X-Sogni-Agent-Surface-Version'] = attribution.agentSurfaceVersion;
241
+ }
242
+ if (attribution.executionMode) {
243
+ headers['X-Sogni-Execution-Mode'] = attribution.executionMode;
244
+ }
245
+ if (workload?.operationScope) {
246
+ headers['X-Sogni-Operation-Scope'] = workload.operationScope;
247
+ }
248
+ if (workload?.operationId) {
249
+ headers['X-Sogni-Operation-Id'] = workload.operationId;
250
+ }
251
+ if (workload?.rootOperationId) {
252
+ headers['X-Sogni-Root-Operation-Id'] = workload.rootOperationId;
253
+ }
254
+ if (workload?.parentOperationId) {
255
+ headers['X-Sogni-Parent-Operation-Id'] = workload.parentOperationId;
256
+ }
257
+ return headers;
258
+ }
@@ -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.20.0",
5
+ "version": "3.22.0",
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",
@@ -13,7 +13,9 @@
13
13
  "command": "node",
14
14
  "args": ["${__dirname}/server/index.mjs"],
15
15
  "env": {
16
- "SOGNI_API_KEY": "${user_config.api_key}"
16
+ "SOGNI_API_KEY": "${user_config.api_key}",
17
+ "SOGNI_AGENT_FRAMEWORK": "claude-desktop",
18
+ "SOGNI_AGENT_SURFACE": "mcp"
17
19
  }
18
20
  }
19
21
  },
@@ -12,6 +12,11 @@ import { TOOLS, getTool } from './tools.mjs';
12
12
  import { buildChildEnv, resolveAgentPath, resolveFfmpegPath } from './resolve.mjs';
13
13
  import { collectInlineImages } from './inline-images.mjs';
14
14
  import { runImportMedia } from './import-media.mjs';
15
+ import {
16
+ attributionEnvironment,
17
+ normalizeMcpClientInfo,
18
+ resolveAgentAttribution,
19
+ } from '../../attribution.mjs';
15
20
 
16
21
  const HERE = dirname(fileURLToPath(import.meta.url));
17
22
  const PROTOCOL_FALLBACK = '2025-06-18';
@@ -25,6 +30,10 @@ try {
25
30
  } catch {
26
31
  // Running outside a packaged layout (e.g. unit tests before Task 4); harmless.
27
32
  }
33
+ let mcpAttributionEnv = attributionEnvironment(normalizeMcpClientInfo(undefined, {
34
+ fallback: resolveAgentAttribution({ surfaceVersion: VERSION }),
35
+ surfaceVersion: VERSION,
36
+ }));
28
37
 
29
38
  function send(msg) {
30
39
  process.stdout.write(JSON.stringify(msg) + '\n');
@@ -65,7 +74,11 @@ async function callTool(name, input, progressToken) {
65
74
  return textResult(err.message, true);
66
75
  }
67
76
 
68
- const env = buildChildEnv({ agentPath, ffmpegPath: resolveFfmpegPath() });
77
+ const env = buildChildEnv({
78
+ agentPath,
79
+ ffmpegPath: resolveFfmpegPath(),
80
+ attributionEnv: mcpAttributionEnv,
81
+ });
69
82
 
70
83
  return await new Promise((resolve) => {
71
84
  const child = spawn(process.execPath, [agentPath, ...args], {
@@ -129,6 +142,10 @@ async function dispatch(msg) {
129
142
  const isRequest = id !== undefined && id !== null;
130
143
 
131
144
  if (method === 'initialize') {
145
+ mcpAttributionEnv = attributionEnvironment(normalizeMcpClientInfo(params?.clientInfo, {
146
+ fallback: resolveAgentAttribution({ surfaceVersion: VERSION }),
147
+ surfaceVersion: VERSION,
148
+ }));
132
149
  send({
133
150
  jsonrpc: '2.0',
134
151
  id,
@@ -49,7 +49,12 @@ export function resolveFfmpegPath({ env = process.env } = {}) {
49
49
  return candidates.find((p) => existsSync(p)) ?? null;
50
50
  }
51
51
 
52
- export function buildChildEnv({ env = process.env, agentPath, ffmpegPath = null } = {}) {
52
+ export function buildChildEnv({
53
+ env = process.env,
54
+ agentPath,
55
+ ffmpegPath = null,
56
+ attributionEnv = {},
57
+ } = {}) {
53
58
  const extraBins = ['/opt/homebrew/bin', '/usr/local/bin'];
54
59
  if (agentPath) extraBins.push(dirname(agentPath));
55
60
  const child = {
@@ -57,6 +62,13 @@ export function buildChildEnv({ env = process.env, agentPath, ffmpegPath = null
57
62
  PATH: [...extraBins, env.PATH ?? ''].filter(Boolean).join(delimiter),
58
63
  };
59
64
  if (ffmpegPath) child.FFMPEG_PATH = ffmpegPath;
65
+ for (const [name, value] of Object.entries(attributionEnv)) {
66
+ if (typeof value === 'string' && value.length > 0) {
67
+ child[name] = value;
68
+ } else {
69
+ delete child[name];
70
+ }
71
+ }
60
72
  // The .mcpb user_config template injects "" when the API-key field is left
61
73
  // blank; an empty env var would shadow ~/.config/sogni/credentials.
62
74
  if (child.SOGNI_API_KEY === '') delete child.SOGNI_API_KEY;
@@ -2194,7 +2194,7 @@ const PROMPT_CONTRACTS = [
2194
2194
  "contractId": "edit_image_v1",
2195
2195
  "version": "1.0.0",
2196
2196
  "toolName": "edit_image",
2197
- "baseDescription": "edit_image applies instruction-based edits to uploaded or generated images. Use when\nuploaded or reference images must guide identity or likeness.\n\nImage-to-Image prompt order: [IDENTITY LOCK] → [REQUESTED EDIT] → [REFERENCE ROLE\nMAPPING] → [POSE/COMPOSITION] → [STYLE] → [LIGHTING/REALISM] → [PRESERVE ALL\nUNMENTIONED DETAILS]. GOLDEN RULE: When editing a person, state which image owns\nidentity so it is not ambiguous. Describe only the DELTA — what changes. Don't\nrewrite the entire image; the base image already contains most of the truth. Default to minimal\nchange. For multi-image edits, assign one primary role per reference image (identity, pose,\noutfit, style, environment). Do not let a style/pose/clothing reference silently override the face.\nUse positive constraints — \"preserve exact facial likeness, face structure, eye shape, nose\nshape, mouth shape, jawline, skin tone, hairline, apparent age, and overall recognizability\"\n— not vague negatives like \"don't mess up the face\".\n\nKREA IDENTITY EDIT: Use model=\"krea-identity-edit\" for Krea 2 Identity Edit LoRA v1.2,\nidentity-preserving Krea edits, and the krea2_identity_edit_v1_2 model id. Use\nmodel=\"dark-beast-krea2-identity-edit\" for Dark Beast Krea 2 Identity Edit or the\ndark_beast_krea2_identity_edit_v1_2 model id. These models require one reference image,\naccept up to two context images, work best at 512-2048 px, default to 10 steps with\nguidance 1, and do not use negative prompts. Put the primary scene/base image first and\nthe person/detail reference second for scene-plus-person edits; reference them with\ncontext_image_0 and context_image_1 when model_ref tokens are needed.\n\nUPLOADED IMAGE VARIANT SETS: When the user supplies a photo/portrait/reference image and\nasks for N distinct generated images deriving from that source while changing paired\nper-output details, prefer one edit_image call with sourceImageIndex=-1,\nnumberOfVariations=N, and ONE Dynamic Prompt branch with N complete options. Each option\nmust be a full concrete image prompt for one output, including the uploaded subject/reference\nanchor, requested pose or placement preservation, the specific changed appearance/style/role,\nclothing or surface details when relevant, setting/background, and any requested label text or\nvisual symbol. If one option is a remade original/preserved source and the rest are themed\nvariants, the original option should explicitly say to preserve the original clothing/wardrobe/outfit\nand background/setting, plus any requested added label, flag, logo, symbol, or prop.\nDo not call generate_image, analyze_image, or multiple serial edit_image calls first.\n\nSELECTION-GATED IMAGE STAGES: If the user asks for N image options and says they will pick\none before a later dance/video/animation, prefer one edit_image call with numberOfVariations=N\nand one Dynamic Prompt branch. After images are created, stop and ask the user to choose\nunless the user explicitly asked to run the later stage immediately.\n\nMULTI-PERSONA (COMBINED): When multiple personas must appear in the SAME scene, make\none edit_image call with all persona faces in one prompt and omit personaName.\nPer-persona splits (one call each with personaName set) are RARE — only when the user\nexplicitly asks for solo images of each person individually.\n\nSTORYBOARD IMAGE BATCH RULE: When rendering scene keyframes from a screenplay/storyboard,\nnumberOfVariations is only the count; the prompt should be one Dynamic Prompt branch with one\nfull keyframe prompt per scene:\n{scene 1 full keyframe prompt|scene 2 full keyframe prompt|...|scene N full keyframe prompt}.\nDo not set numberOfVariations=N with only the first scene prompt — that creates N versions of\nscene 1. For full project requests, one edit_image batch for all scene keyframes, then one\nanimate_photo batch for all video clips in parallel.\nException: if the storyboard/shot sheet is already uploaded and the user asks to make a\ntrailer/video/movie/clip from that uploaded board, do not extract panels or redraw keyframes.\nUse generate_video with Seedance references for one continuous clip unless the user explicitly\nasks for separate image keyframes or a storyboard sheet output.\n\nDIRECT UPLOADED GPT IMAGE 2 STORYBOARD SHEETS: If the user uploaded reference images and\nasks for one finished GPT Image 2 storyboard/keyframe sheet now, call edit_image directly\nwith sourceImageIndex=-1, model=\"gpt-image-2\", numberOfVariations=1, and the requested\ncanvas/aspect settings. If the user did not explicitly specify a storyboard page/canvas/sheet\nshape, default the GPT Image 2 storyboard sheet pixel dimensions to a balanced grid that hosts\nthe target cell aspect ratio natively (e.g., 12 cells with 9:16 portrait video target -> ~3:4\nportrait sheet around 1728x2304; 12 cells with 16:9 landscape video target -> ~4:3 landscape\nsheet around 2304x1728; 6 cells with 9:16 target -> ~27:32 portrait sheet around 1840x2176). Do\nNOT default the sheet to 2560x1440 landscape when cells are portrait — a landscape sheet with\na portrait-cell grid physically forces cells to ~4:3 landscape and the model will not render\n9:16 portrait rectangles inside it. Keep individual scene-cell/frame areas at the target video\naspect ratio. Do not call map_assets_for_model, analyze_image, generate_image, or a separate\nplanning tool first. The uploaded files are already available as references; describe their\nroles plainly in the edit_image prompt and generate the sheet in that call.\n\nDO NOT USE edit_image FOR UPLOADED REFERENCE LOOPED VIDEO SEGMENTS: If the user says the\nsame uploaded image/reference should be reused as the first frame and last frame of each\nscripted segment/scene/clip before stitching, they are explicitly asking to animate the\nuploaded image, not to generate new storyboard keyframes. Do not call edit_image for that\nrequest. Call animate_photo once with repeated uploaded source indices and per-scene prompts.",
2197
+ "baseDescription": "edit_image applies instruction-based edits to uploaded or generated images. Use when\nuploaded or reference images must guide identity or likeness.\n\nImage-to-Image prompt order: [IDENTITY LOCK] → [REQUESTED EDIT] → [REFERENCE ROLE\nMAPPING] → [POSE/COMPOSITION] → [STYLE] → [LIGHTING/REALISM] → [PRESERVE ALL\nUNMENTIONED DETAILS]. GOLDEN RULE: When editing a person, state which image owns\nidentity so it is not ambiguous. Describe only the DELTA — what changes. Don't\nrewrite the entire image; the base image already contains most of the truth. Default to minimal\nchange. For multi-image edits, assign one primary role per reference image (identity, pose,\noutfit, style, environment). Do not let a style/pose/clothing reference silently override the face.\nUse positive constraints — \"preserve exact facial likeness, face structure, eye shape, nose\nshape, mouth shape, jawline, skin tone, hairline, apparent age, and overall recognizability\"\n— not vague negatives like \"don't mess up the face\".\n\nKREA IDENTITY EDIT: Use model=\"krea-identity-edit\" whenever an edit of a referenced\nperson or character must keep likeness or character identity while changing clothing,\nhair or makeup, pose or position, face/head/body, background, lighting, or visual style.\nInfer that semantic intent in any language; never route from keyword or regex matching.\nAlso use it for a non-Pro single-character sheet. An explicitly requested model always\nwins. Use model=\"dark-beast-krea2-identity-edit\" only when the user explicitly requests\nthat model, its uncensored/community variant, or dark_beast_krea2_identity_edit_v1_2.\nThese models require one reference image, accept up to two context images, and work best\nat 512-2048 px. Let the model tier and worker choose current execution defaults, and do\nnot use negative prompts. Put the primary scene/base image first and an optional\nperson/detail reference second; reference them with context_image_0 and context_image_1\nwhen model_ref tokens are needed.\n\nKREA 2 IDENTITY EDIT PROMPTING: Use a concise 1-4 sentence delta instruction instead of\nthe generic 50-200 word expansion. Name the requested change and only the details that\nmust remain fixed; do not restate the whole image or dump a facial-feature inventory.\nWith two references, assign their roles compactly: base scene/image first, then the\nperson/detail/outfit/pose/style reference. Longer structured prompts remain appropriate\nfor character sheets, grids, editorial layouts, or exact visible text.\n\nUPLOADED IMAGE VARIANT SETS: When the user supplies a photo/portrait/reference image and\nasks for N distinct generated images deriving from that source while changing paired\nper-output details, prefer one edit_image call with sourceImageIndex=-1,\nnumberOfVariations=N, and ONE Dynamic Prompt branch with N complete options. Each option\nmust be a full concrete image prompt for one output, including the uploaded subject/reference\nanchor, requested pose or placement preservation, the specific changed appearance/style/role,\nclothing or surface details when relevant, setting/background, and any requested label text or\nvisual symbol. If one option is a remade original/preserved source and the rest are themed\nvariants, the original option should explicitly say to preserve the original clothing/wardrobe/outfit\nand background/setting, plus any requested added label, flag, logo, symbol, or prop.\nDo not call generate_image, analyze_image, or multiple serial edit_image calls first.\n\nSELECTION-GATED IMAGE STAGES: If the user asks for N image options and says they will pick\none before a later dance/video/animation, prefer one edit_image call with numberOfVariations=N\nand one Dynamic Prompt branch. After images are created, stop and ask the user to choose\nunless the user explicitly asked to run the later stage immediately.\n\nMULTI-PERSONA (COMBINED): When multiple personas must appear in the SAME scene, make\none edit_image call with all persona faces in one prompt and omit personaName.\nPer-persona splits (one call each with personaName set) are RARE — only when the user\nexplicitly asks for solo images of each person individually.\n\nSTORYBOARD IMAGE BATCH RULE: When rendering scene keyframes from a screenplay/storyboard,\nnumberOfVariations is only the count; the prompt should be one Dynamic Prompt branch with one\nfull keyframe prompt per scene:\n{scene 1 full keyframe prompt|scene 2 full keyframe prompt|...|scene N full keyframe prompt}.\nDo not set numberOfVariations=N with only the first scene prompt — that creates N versions of\nscene 1. For full project requests, one edit_image batch for all scene keyframes, then one\nanimate_photo batch for all video clips in parallel.\nException: if the storyboard/shot sheet is already uploaded and the user asks to make a\ntrailer/video/movie/clip from that uploaded board, do not extract panels or redraw keyframes.\nUse generate_video with Seedance references for one continuous clip unless the user explicitly\nasks for separate image keyframes or a storyboard sheet output.\n\nDIRECT UPLOADED GPT IMAGE 2 STORYBOARD SHEETS: If the user uploaded reference images and\nasks for one finished GPT Image 2 storyboard/keyframe sheet now, call edit_image directly\nwith sourceImageIndex=-1, model=\"gpt-image-2\", numberOfVariations=1, and the requested\ncanvas/aspect settings. If the user did not explicitly specify a storyboard page/canvas/sheet\nshape, default the GPT Image 2 storyboard sheet pixel dimensions to a balanced grid that hosts\nthe target cell aspect ratio natively (e.g., 12 cells with 9:16 portrait video target -> ~3:4\nportrait sheet around 1728x2304; 12 cells with 16:9 landscape video target -> ~4:3 landscape\nsheet around 2304x1728; 6 cells with 9:16 target -> ~27:32 portrait sheet around 1840x2176). Do\nNOT default the sheet to 2560x1440 landscape when cells are portrait — a landscape sheet with\na portrait-cell grid physically forces cells to ~4:3 landscape and the model will not render\n9:16 portrait rectangles inside it. Keep individual scene-cell/frame areas at the target video\naspect ratio. Do not call map_assets_for_model, analyze_image, generate_image, or a separate\nplanning tool first. The uploaded files are already available as references; describe their\nroles plainly in the edit_image prompt and generate the sheet in that call.\n\nDO NOT USE edit_image FOR UPLOADED REFERENCE LOOPED VIDEO SEGMENTS: If the user says the\nsame uploaded image/reference should be reused as the first frame and last frame of each\nscripted segment/scene/clip before stitching, they are explicitly asking to animate the\nuploaded image, not to generate new storyboard keyframes. Do not call edit_image for that\nrequest. Call animate_photo once with repeated uploaded source indices and per-scene prompts.",
2198
2198
  "parameterDocs": {
2199
2199
  "sourceImageIndex": "Index of uploaded/generated image. Use -1 for the first uploaded image.",
2200
2200
  "numberOfVariations": "Number of output variants. When > 1, use a Dynamic Prompt branch with one complete prompt per output.",
@@ -0,0 +1,4 @@
1
+ #!/usr/bin/env node
2
+ process.env.SOGNI_AGENT_FRAMEWORK = 'claude-code';
3
+ process.env.SOGNI_AGENT_SURFACE = 'plugin';
4
+ await import('../sogni-agent.mjs');
@@ -0,0 +1,4 @@
1
+ #!/usr/bin/env node
2
+ process.env.SOGNI_AGENT_FRAMEWORK = 'codex';
3
+ process.env.SOGNI_AGENT_SURFACE = 'plugin';
4
+ await import('../sogni-agent.mjs');
@@ -0,0 +1,4 @@
1
+ #!/usr/bin/env node
2
+ process.env.SOGNI_AGENT_FRAMEWORK = 'hermes-agent';
3
+ process.env.SOGNI_AGENT_SURFACE = 'personal_skill';
4
+ await import('../sogni-agent.mjs');
@@ -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.20.0",
5
+ "version": "3.22.0",
6
6
  "skills": [
7
7
  "."
8
8
  ],
package/package.json CHANGED
@@ -1,11 +1,14 @@
1
1
  {
2
2
  "name": "@sogni-ai/sogni-creative-agent-skill",
3
- "version": "3.20.0",
3
+ "version": "3.22.0",
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",
7
7
  "bin": {
8
- "sogni-agent": "sogni-agent.mjs"
8
+ "sogni-agent": "sogni-agent.mjs",
9
+ "sogni-agent-codex": "host-launchers/codex.mjs",
10
+ "sogni-agent-claude-code": "host-launchers/claude-code.mjs",
11
+ "sogni-agent-hermes": "host-launchers/hermes.mjs"
9
12
  },
10
13
  "scripts": {
11
14
  "openclaw:sync": "node scripts/sync-openclaw-plugin.mjs",
@@ -68,6 +71,7 @@
68
71
  "skills/",
69
72
  "llm.txt",
70
73
  "skill-package.json",
74
+ "host-launchers/",
71
75
  "scripts/sync-version.mjs",
72
76
  "scripts/check-version-sync.mjs",
73
77
  "scripts/check-creative-agent-runtime.mjs",
@@ -78,6 +82,7 @@
78
82
  "openclaw-plugin.mjs",
79
83
  "openclaw.plugin.json",
80
84
  "env.mjs",
85
+ "attribution.mjs",
81
86
  "ssrf-guard.mjs",
82
87
  "sogni-app-id.mjs",
83
88
  "sogni-hosted-client.mjs",
@@ -87,13 +92,13 @@
87
92
  "sogni-agent.mjs"
88
93
  ],
89
94
  "dependencies": {
90
- "@sogni-ai/sogni-intelligence-client": "3.9.0",
95
+ "@sogni-ai/sogni-intelligence-client": "3.11.0",
91
96
  "execa": "^9.6.1",
92
97
  "json5": "^2.2.3",
93
98
  "sharp": "^0.34.5"
94
99
  },
95
100
  "overrides": {
96
- "@sogni-ai/sogni-client": "5.1.0-alpha.24"
101
+ "@sogni-ai/sogni-client": "5.3.1"
97
102
  },
98
103
  "openclaw": {
99
104
  "extensions": [
@@ -7,6 +7,9 @@ description: Turn a folder of images into a polished, music-backed seamless loop
7
7
 
8
8
  Create the image-folder loop described in the user's current request. Treat text after the explicit skill invocation as its arguments when the host provides them.
9
9
 
10
+ When running this Claude Code plugin, invoke `sogni-agent-claude-code` wherever
11
+ the root skill or loop workflow says `sogni-agent`.
12
+
10
13
  1. Resolve the plugin root as two directories above this `SKILL.md`. Read the root `SKILL.md` completely. A host-provided plugin-root variable may be used, but do not depend on one.
11
14
  2. Read `references/loop-maker.md` under that plugin root completely and follow it as the canonical workflow.
12
15
  3. Treat the first folder path in the arguments as the source. Treat remaining text as optional preferences such as the opening image, music direction, output name, pacing, aspect ratio, compositor effects, or cleanup request.
@@ -7,6 +7,11 @@ description: "Sogni Creative Agent: image, video, and music generation using Sog
7
7
 
8
8
  Generate **images, videos, and music** via Sogni AI's decentralized GPU network through the `sogni-agent` CLI shipped with this plugin.
9
9
 
10
+ **Claude Code plugin command:** invoke `sogni-agent-claude-code` for every
11
+ Sogni command in this skill. Wherever this file or a referenced root guide says
12
+ `sogni-agent`, substitute `sogni-agent-claude-code`. This fixed launcher
13
+ preserves normal CLI behavior while attributing the request to Claude Code.
14
+
10
15
  ## Setup
11
16
 
12
17
  1. Install the CLI (one-time): `npm install -g @sogni-ai/sogni-creative-agent-skill@latest`.