@sogni-ai/sogni-creative-agent-skill 3.15.0 → 3.16.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.15.0",
3
+ "version": "3.16.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",
package/CHANGELOG.md CHANGED
@@ -1,3 +1,19 @@
1
+ ## [Unreleased]
2
+
3
+ ## [3.16.0] - 2026-07-25
4
+
5
+ ### Added
6
+
7
+ * **cli:** add live Supernet media model discovery through `sogni-client`, including separator-insensitive
8
+ ID/name search, image/video/audio and Fast/Relaxed filters, JSON output, and official catalog tag search
9
+ with repeatable `--model-tag` filters for labels such as `spicy` and `uncensored`.
10
+
11
+ ### Changed
12
+
13
+ * **image edits:** consume `@sogni-ai/sogni-intelligence-client` `3.8.0` with Sogni Client `5.1.0-alpha.22`,
14
+ removing the duplicate Krea identity-edit CLI fallback while preserving the two-reference limit and 10-step
15
+ guidance defaults.
16
+
1
17
  # [3.15.0](https://github.com/Sogni-AI/sogni-creative-agent-skill/compare/v3.14.1...v3.15.0) (2026-07-21)
2
18
 
3
19
  ### Bug Fixes
package/README.md CHANGED
@@ -431,6 +431,11 @@ sogni-agent --api-chat --task-profile reasoning --no-thinking \
431
431
  "Plan a concise multi-step product launch workflow"
432
432
  sogni-agent --list-api-models
433
433
 
434
+ # Live Supernet media model discovery
435
+ sogni-agent --list-models
436
+ sogni-agent --search-models spicy
437
+ sogni-agent --list-models --model-media image --model-tag uncensored
438
+
434
439
  # Durable hosted chat run with SSE progress events
435
440
  SOGNI_SKILL_USE_SDK_TRANSPORT=1 sogni-agent --durable-chat \
436
441
  "Create a product launch storyboard and render the first hero image"
@@ -508,6 +513,9 @@ Run `sogni-agent --help` for the full CLI. Below are the options and tables most
508
513
  | `--watch-workflow`, `--list-workflows`, `--get-workflow <id>`, `--workflow-events <id>`, `--stream-workflow <id>`, `--cancel-workflow <id>`, `--resume-workflow <id>` | Manage durable workflows |
509
514
  | `--api-tools <mode>`, `--no-api-tool-execution`, `--llm-model <id>`, `--task-profile <profile>`, `--max-tokens <n>`, `--thinking` / `--no-thinking`, `--api-base-url <url>` | Tune hosted API requests |
510
515
  | `--list-api-models`, `--get-api-model <id>` | Inspect Sogni Intelligence LLM models |
516
+ | `--list-models [query]`, `--search-models <query>` | List or search currently available Supernet image, video, and audio models |
517
+ | `--model-media <type>`, `--model-network <network>` | Filter live model discovery by media or Fast/Relaxed network |
518
+ | `--model-tag <tag>` | Filter by an official catalog tag such as `spicy` or `uncensored`; repeat for AND matching |
511
519
  | `--list-replays [n]`, `--get-replay <id>`, `--ingest-replay <json\|@path>` | Manage Sogni Intelligence replay records (use `@path` to load JSON from a file) |
512
520
  | `--persona <name>` | Use a saved persona |
513
521
  | `--concat-videos <out> <clips...>` | Stitch clips locally with FFmpeg |
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.15.0"
5
+ version: "3.16.0"
6
6
  homepage: https://sogni.ai
7
7
  openclaw:
8
8
  emoji: "🎨"
@@ -167,6 +167,11 @@ sogni-agent --video -m happyhorse-1.1-r2v -c ref1.png -c ref2.png "Blend the ref
167
167
  sogni-agent --json --balance
168
168
  sogni-agent --last --json
169
169
  sogni-agent --json --list-media images
170
+ sogni-agent --list-models
171
+ sogni-agent --search-models darkbeast
172
+ sogni-agent --search-models spicy
173
+ sogni-agent --list-models --model-tag uncensored
174
+ sogni-agent --json --search-models darkbeast
170
175
  sogni-agent doctor --json
171
176
  ```
172
177
 
@@ -193,6 +198,10 @@ sogni-agent doctor --json
193
198
  | `--token-type spark\|sogni\|auto` | `auto` retries native models with SOGNI when SPARK is low | spark |
194
199
  | `--billing-mode auto\|subscription\|tokens` | `subscription` requires Sogni Unlimited coverage; `tokens` opts out of it | server decides |
195
200
  | `--last`, `--last-image` | Inspect last render / reuse it as context or ref | - |
201
+ | `--list-models [query]`, `--search-models <query>` | List or search the live Supernet image/video/audio model catalog | - |
202
+ | `--model-media image\|video\|audio\|all` | Filter live model discovery by output media | all |
203
+ | `--model-network fast\|relaxed` | Select the Supernet used for live model discovery | configured network or fast |
204
+ | `--model-tag <tag>` | Filter by an official catalog tag such as `spicy` or `uncensored`; repeat for AND matching | - |
196
205
  | `--json` | Machine-parseable stdout (progress goes to stderr) | false |
197
206
  | `-q, --quiet` | Suppress progress output | false |
198
207
  | `-t <sec>` | Timeout | 30 image / 300 video |
@@ -239,6 +248,10 @@ Use `sogni-agent --json --list-media images` (or `audio` / `all`) to find inboun
239
248
  - Before generating, check saved preferences with `--memory-list` and respect them; save stated standing preferences with `--memory-set`. Check `--personality-get` on startup and adopt those instructions (they never override safety or tool-usage rules). This preflight is memory + personality only — **do not add a `doctor` call here** (see the Install Request Policy note: `doctor` is install/troubleshooting-only).
240
249
  - **Read [`references/personas-memory.md`](./references/personas-memory.md)** for persona CRUD, voice cloning, multi-persona scenes, style transfer, and photo restoration recipes.
241
250
 
251
+ ### Seamless tiling and tessellations
252
+
253
+ When the requested image is meant to **repeat edge to edge without visible joins** — a seamless pattern, repeating texture, wallpaper, tiling background, or an Escher-style tessellation of interlocking figures — an ordinary render will not wrap. Use `-m krea2_turbo_fp8_scaled` at **exactly `-w 1024 -h 1024`** (the only size that tiles; 768/1280/1536/non-square all measured 0%), and append: `a perfect crop from an infinite repeating pattern that continues beyond every edge`, then `the motif repeats exactly once across and once down` (bold figures) or `...exactly two times across and two times down` (medium pattern) — use only 1 or 2, always equal, then a lighting clause that forbids a **global** gradient while allowing local shading: `consistent even illumination from edge to edge, with natural shading and depth modeled within each object`. Never omit or vaguen the lighting clause. Keep the subject's palette tonally close. Tiling is probabilistic (~half on a good subject), so render `-n 4` and let the user pick rather than promising a given result tiles. **Read [`references/seamless-tiling.md`](./references/seamless-tiling.md) for the full recipe, the Escher-tessellation variant, subject hit rates, and how to verify a seam.**
254
+
242
255
  ### Model selection
243
256
 
244
257
  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.
@@ -322,6 +335,7 @@ Uses Spark tokens from the user's Sogni account. 512x512 images are most cost-ef
322
335
  | [`references/video-editing.md`](./references/video-editing.md) | Animate between images, continue/bridge videos, 360 turnarounds, concat, audio remix/layering, v2v ControlNet |
323
336
  | [`references/loop-maker.md`](./references/loop-maker.md) | One-click image-folder loops with visual deduplication, direct LTX first/last-frame clips, music, and verification |
324
337
  | [`references/hosted-api.md`](./references/hosted-api.md) | `--api-chat`, `--durable-chat`, `--api-workflow`, workflow templates, replays, Seedance reference modes, cost controls |
338
+ | [`references/seamless-tiling.md`](./references/seamless-tiling.md) | Seamless repeating patterns, wallpapers, tiling textures, Escher tessellations |
325
339
  | [`references/models.md`](./references/models.md) | Choosing models, sizing/divisibility rules, image edit reference limits, music model options |
326
340
  | [`references/personas-memory.md`](./references/personas-memory.md) | Persona CRUD/voice cloning, multi-persona scenes, memories, personality, style transfer, photo restoration |
327
341
  | [`references/openclaw-config.md`](./references/openclaw-config.md) | OpenClaw plugin config defaults and overrides |
@@ -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.15.0",
5
+ "version": "3.16.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",
package/llm.txt CHANGED
@@ -86,6 +86,12 @@ You can also export `SOGNI_API_KEY` instead of writing the file. Confirm with
86
86
  `--task-profile general|coding|reasoning`, `--max-tokens <n>`,
87
87
  `--thinking` / `--no-thinking`, `--list-replays [n]`, `--get-replay <id>`,
88
88
  `--ingest-replay <json|@path>`.
89
+ - Live Supernet media models: `--list-models [query]` or
90
+ `--search-models <query>`, optionally with
91
+ `--model-media image|video|audio|all`, `--model-network fast|relaxed`, and
92
+ repeatable `--model-tag <tag>` filters such as `spicy` or `uncensored`, plus
93
+ `--json`. Availability comes from `sogni-client` and tags from the official
94
+ Sogni catalog; `--list-api-models` lists language models instead.
89
95
  - Media references from `-c`, `--ref`, `--ref-end`, `--ref-audio`,
90
96
  `--reference-audio-identity`, `--ref-video`, and `--mask` are uploaded and forwarded as
91
97
  `media_references`; API chat also attaches image refs as vision inputs.
@@ -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.15.0",
5
+ "version": "3.16.0",
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.15.0",
3
+ "version": "3.16.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",
@@ -86,13 +86,13 @@
86
86
  "sogni-agent.mjs"
87
87
  ],
88
88
  "dependencies": {
89
- "@sogni-ai/sogni-intelligence-client": "3.7.2",
89
+ "@sogni-ai/sogni-intelligence-client": "3.8.0",
90
90
  "execa": "^9.6.1",
91
91
  "json5": "^2.2.3",
92
92
  "sharp": "^0.34.5"
93
93
  },
94
94
  "overrides": {
95
- "@sogni-ai/sogni-client": "5.1.0-alpha.18"
95
+ "@sogni-ai/sogni-client": "5.1.0-alpha.22"
96
96
  },
97
97
  "openclaw": {
98
98
  "extensions": [
@@ -5,6 +5,37 @@ answering "which model should I use for X". For everyday generation prefer
5
5
  `-Q fast|hq|pro` and automatic workflow routing instead of memorizing IDs.
6
6
  `sogni-agent --help` is the canonical flag reference.
7
7
 
8
+ ## Live model discovery
9
+
10
+ The static tables below are recommendations, not the complete changing
11
+ Supernet catalog. Query the live catalog through the CLI, which uses
12
+ `sogni-client` model availability:
13
+
14
+ ```bash
15
+ sogni-agent --list-models
16
+ sogni-agent --search-models darkbeast
17
+ sogni-agent --search-models spicy
18
+ sogni-agent --list-models --model-tag uncensored
19
+ sogni-agent --list-models --model-tag spicy --model-tag uncensored
20
+ sogni-agent --list-models --model-media video
21
+ sogni-agent --json --search-models darkbeast
22
+ sogni-agent --list-models --model-network relaxed
23
+ ```
24
+
25
+ Search matches model IDs and names case-insensitively and ignores separators,
26
+ so `darkbeast`, `dark beast`, and `dark_beast` produce the same matches. It
27
+ also searches catalog tags such as `spicy`, `uncensored`, `community`, `new`,
28
+ and tier labels. `--model-tag <tag>` is repeatable and combines filters with
29
+ AND semantics.
30
+
31
+ Availability and worker counts come from `sogni-client`. Tags are joined from
32
+ the official Sogni model catalog, since the client availability objects do not
33
+ currently include catalog tags. Only models that are live on the selected
34
+ network are returned.
35
+
36
+ `--list-api-models` is different: it lists Sogni Intelligence language models
37
+ from `/v1/models`, not Supernet media models.
38
+
8
39
  ## Quality presets (images)
9
40
 
10
41
  | Preset | Model | Steps | Size | Speed |
@@ -0,0 +1,108 @@
1
+ # Seamless Tiling & Tessellations
2
+
3
+ How to render an image that repeats edge to edge without visible joins — a
4
+ seamless pattern, repeating texture, wallpaper, tiling background, or an
5
+ Escher-style tessellation of interlocking figures.
6
+
7
+ An ordinary render will **not** wrap. Diffusion models have no tiling mode
8
+ here (no circular padding is exposed), so border continuity is never
9
+ enforced — it only *emerges* when the sampled pattern happens to phase-align
10
+ with the canvas. Everything below is about stacking the odds, then checking.
11
+
12
+ ## The configuration
13
+
14
+ ```bash
15
+ sogni-agent -m krea2_turbo_fp8_scaled -w 1024 -h 1024 -n 4 -o tile.png \
16
+ "<subject>, a perfect crop from an infinite repeating pattern that continues beyond every edge, <motif-scale clause>, <lighting clause>"
17
+ ```
18
+
19
+ | Element | Why |
20
+ |---|---|
21
+ | `krea2_turbo_fp8_scaled` | The only model that composes edge-to-edge. `z_image_turbo_bf16` renders an object on a background instead and cannot tile. |
22
+ | **1024×1024, always** | The only size that tiles. 768, 1280, 1536, landscape, and 896×1152 all measured **0%**. It is the model's native resolution; off-native sizes never phase-align. |
23
+ | `a perfect crop from an infinite repeating pattern…` | Removes edge-framing behaviour — the model stops composing *for* a frame. |
24
+ | motif-scale clause | Sets how big the motif reads. Does **not** affect whether it tiles. |
25
+ | lighting clause | Kills the global light gradient, which is what makes opposite edges disagree. The dominant failure mode. |
26
+
27
+ ### Motif scale — pick for looks, not for tiling
28
+
29
+ `the motif repeats exactly N times across and N times down`
30
+
31
+ Use **N = 1** for large bold figures or **N = 2** for a medium pattern, and
32
+ keep the two counts equal. Measured over 30 renders each: 1× and 2× both hit
33
+ **63%**, against 50% for 4× and 40% for 3× — so stick to 1 or 2 and pick
34
+ between them purely on how large you want the motif to read. This clause is a
35
+ scale dial, not a tiling requirement.
36
+
37
+ ### Lighting — global evenness required, local depth optional
38
+
39
+ The constraint is *global*: no directional gradient or vignette across the
40
+ frame. Individual figures may still be shaded, which usually looks better.
41
+
42
+ - **Keep depth (recommended):** `consistent even illumination from edge to
43
+ edge, with natural shading and depth modeled within each object` — 47%,
44
+ and figures keep glossy highlights and three-dimensional modelling.
45
+ - **Flat graphic look:** `uniform flat lighting with no shadows or vignette`
46
+ — 59%, slightly better odds, flatter result.
47
+
48
+ **Do not omit this clause, and do not soften it to something vague** like
49
+ "evenly lit across the frame": both measured **8%**. The wording has to
50
+ explicitly forbid the gradient and vignette.
51
+
52
+ **Palette rule:** keep the subject tonally close — one dominant colour
53
+ family. High-contrast pairings expose the seam, because a border offset in
54
+ luminance can be flattened by prompting but an offset in *chroma* cannot.
55
+
56
+ ## For interlocking Escher tessellations
57
+
58
+ Phrase the subject as `photorealistic Escher tessellation of <objects>` and
59
+ add `every figure complete and recognizable, fitting its neighbors perfectly
60
+ with no gaps, no overlaps`.
61
+
62
+ `Escher tessellation` is the phrase that makes the model *deform silhouettes*
63
+ so neighbours nest. Without it you get dense packing, not tessellation.
64
+ Tested alternatives that do **not** work: "optical illusion", "negative
65
+ space", "figure-ground reversal", "interlocking silhouettes", "wallpaper",
66
+ "tessellation" alone.
67
+
68
+ Compliant rounded shapes tessellate — frogs, ducks, octopi, shells, leaves,
69
+ feathers, lizards, rubber chickens. Rigid objects (garden gnomes) resist and
70
+ fall back to packing.
71
+
72
+ ## It is probabilistic — always offer several
73
+
74
+ Roughly **half** the renders wrap cleanly on a good subject, fewer on a
75
+ hard one. So generate a batch and let the user pick:
76
+
77
+ ```bash
78
+ sogni-agent -m krea2_turbo_fp8_scaled -w 1024 -h 1024 -n 4 -o tile.png "<prompt>"
79
+ ```
80
+
81
+ Never promise that a given result tiles without checking. To check, place
82
+ two copies side by side and look at the join, or measure it: compare the
83
+ mean difference between opposite border rows/columns against the image's own
84
+ mean adjacent-pixel difference. A ratio near 1.0 is seamless; the join is
85
+ visible from roughly 3.5 upward.
86
+
87
+ ## Subjects with the best odds
88
+
89
+ Natural forms outperform kitsch — they already interlock, so the model is
90
+ not asked to invent a deformation, and their palettes are inherently tonal.
91
+
92
+ | Subject | Hit rate |
93
+ |---|---|
94
+ | iridescent teal peacock feathers | 4/4 |
95
+ | pearlescent white nautilus seashells | 3/4 |
96
+ | yellow rubber chickens | ~5/8 |
97
+ | morpho butterflies, ginkgo leaves, glass jellyfish, koi, ceramic lizards | 2/4 |
98
+ | green plastic aliens + glossy ceramic frogs | ~2/8 |
99
+
100
+ Avoid subjects that render on a white ground (origami cranes, delft
101
+ porcelain birds): they look beautiful but produce a uniform border, which
102
+ means the image is not actually edge-to-edge.
103
+
104
+ ## Reference implementation
105
+
106
+ <https://infinity.sogni.ai> generates these interactively, and the
107
+ repository (`Sogni-AI/sogni-infinity`) carries the full research log,
108
+ the seam validator, and the calibration evidence behind these numbers.
@@ -3,7 +3,7 @@
3
3
  "private": true,
4
4
  "type": "module",
5
5
  "dependencies": {
6
- "@sogni-ai/sogni-intelligence-client": "3.7.2",
6
+ "@sogni-ai/sogni-intelligence-client": "3.8.0",
7
7
  "execa": "^9.6.1",
8
8
  "json5": "^2.2.3",
9
9
  "sharp": "^0.34.5"
package/sogni-agent.mjs CHANGED
@@ -99,6 +99,20 @@ const SPARK_PACKS_PURCHASE_URL = 'https://docs.sogni.ai/pricing/#spark-packs';
99
99
  const SPARK_PACKS_PURCHASE_HINT = `Buy Spark Packs to continue: ${SPARK_PACKS_PURCHASE_URL}`;
100
100
 
101
101
  const UNLIMITED_PLAN_URL = 'https://docs.sogni.ai/pricing/unlimited-plan-details';
102
+ const SOGNI_MODEL_CATALOG_URL = 'https://www.sogni.ai/models';
103
+ const SOGNI_MODEL_CATALOG_MAX_BYTES = 5 * 1024 * 1024;
104
+ const SOGNI_MODEL_CATALOG_TIMEOUT_MS = 10000;
105
+ const KNOWN_MODEL_CATALOG_TAGS = new Set([
106
+ 'spicy',
107
+ 'uncensored',
108
+ 'community',
109
+ 'new',
110
+ 'popular',
111
+ 'fast',
112
+ 'free-tier',
113
+ 'standard',
114
+ 'premium'
115
+ ]);
102
116
 
103
117
  // Skill-local fallback guidance for Sogni Unlimited subscription billing errors,
104
118
  // keyed on the canonical socket error code (a structured fact, not an English
@@ -1249,25 +1263,6 @@ function isGptImage2ModelSelection(modelId) {
1249
1263
  return ['gpt-image-2', 'gptimage2', 'gpt-image', 'gpt_image_2'].includes(normalized);
1250
1264
  }
1251
1265
 
1252
- const KREA2_IDENTITY_EDIT_MODELS = new Set([
1253
- 'krea2_identity_edit_v1_2',
1254
- 'dark_beast_krea2_identity_edit_v1_2'
1255
- ]);
1256
-
1257
- function isKrea2IdentityEditModelSelection(modelId) {
1258
- return KREA2_IDENTITY_EDIT_MODELS.has(String(modelId || '').trim().toLowerCase());
1259
- }
1260
-
1261
- function getKrea2IdentityEditDefaults(modelId) {
1262
- if (!isKrea2IdentityEditModelSelection(modelId)) return null;
1263
- return {
1264
- steps: 10,
1265
- guidance: 1,
1266
- sampler: 'euler',
1267
- scheduler: 'simple'
1268
- };
1269
- }
1270
-
1271
1266
  function normalizeMusicModelId(value) {
1272
1267
  const raw = String(value || '').trim();
1273
1268
  if (!raw) return null;
@@ -1356,7 +1351,6 @@ function happyHorseModeFromModelId(modelId) {
1356
1351
 
1357
1352
  function getMaxContextImages(modelId) {
1358
1353
  if (isGptImage2ModelSelection(modelId)) return 16;
1359
- if (isKrea2IdentityEditModelSelection(modelId)) return 2;
1360
1354
  return getWrapperMaxContextImages(modelId);
1361
1355
  }
1362
1356
 
@@ -1941,6 +1935,11 @@ const options = {
1941
1935
  apiSystemPrompt: null,
1942
1936
  apiModelAction: null, // list|get
1943
1937
  apiModelId: null,
1938
+ liveModelAction: null, // list|search
1939
+ liveModelQuery: null,
1940
+ liveModelMedia: 'all', // image|video|audio|all
1941
+ liveModelNetwork: null, // fast|relaxed; defaults to configured network
1942
+ liveModelTags: [], // repeatable --model-tag filters (AND semantics)
1944
1943
  apiReplayAction: null, // list|get|ingest
1945
1944
  apiReplayId: null,
1946
1945
  apiReplayInput: null,
@@ -2593,6 +2592,42 @@ for (let i = 0; i < args.length; i++) {
2593
2592
  } else {
2594
2593
  options.listMedia = 'images';
2595
2594
  }
2595
+ } else if (arg === '--list-models' || arg === '--live-models') {
2596
+ options.liveModelAction = 'list';
2597
+ const next = args[i + 1];
2598
+ if (next && !next.startsWith('-')) {
2599
+ i++;
2600
+ options.liveModelQuery = next;
2601
+ }
2602
+ } else if (arg === '--search-models' || arg === '--find-models') {
2603
+ const raw = requireFlagValue(args, i, arg);
2604
+ i++;
2605
+ options.liveModelAction = 'search';
2606
+ options.liveModelQuery = raw;
2607
+ } else if (arg === '--model-media') {
2608
+ const raw = requireFlagValue(args, i, arg);
2609
+ i++;
2610
+ if (!['image', 'video', 'audio', 'all'].includes(raw)) {
2611
+ fatalCliError('--model-media must be one of image, video, audio, or all.', {
2612
+ code: 'INVALID_ARGUMENT',
2613
+ details: { value: raw }
2614
+ });
2615
+ }
2616
+ options.liveModelMedia = raw;
2617
+ } else if (arg === '--model-network') {
2618
+ const raw = requireFlagValue(args, i, arg);
2619
+ i++;
2620
+ if (!['fast', 'relaxed'].includes(raw)) {
2621
+ fatalCliError('--model-network must be fast or relaxed.', {
2622
+ code: 'INVALID_ARGUMENT',
2623
+ details: { value: raw }
2624
+ });
2625
+ }
2626
+ options.liveModelNetwork = raw;
2627
+ } else if (arg === '--model-tag') {
2628
+ const raw = requireFlagValue(args, i, arg);
2629
+ i++;
2630
+ options.liveModelTags.push(raw);
2596
2631
  // --- Hosted Sogni API paths ---
2597
2632
  } else if (arg === '--api-chat') {
2598
2633
  options.apiChat = true;
@@ -3066,6 +3101,11 @@ General:
3066
3101
  --billing-mode <mode> Billing: auto|subscription|tokens (default: server decides; "subscription"
3067
3102
  requires Sogni Unlimited coverage, "tokens" opts out of it)
3068
3103
  --balance, --balances Show account, plan, and SPARK/SOGNI balances and exit
3104
+ --list-models [query] List live Supernet media models; optionally filter by query
3105
+ --search-models <q> Search live models by ID or name (separator-insensitive)
3106
+ --model-media <type> Filter model discovery: image|video|audio|all (default: all)
3107
+ --model-network <n> Model discovery network: fast|relaxed (default: configured network)
3108
+ --model-tag <tag> Filter by catalog tag, e.g. spicy or uncensored (repeatable, AND)
3069
3109
  --doctor Health check: Node, credentials, ffmpeg, auth, plan, config, version
3070
3110
  --snooze-update Snooze the pending update reminder (1 day → 2 days → 1 week)
3071
3111
  --whats-new [version] Show bundled CHANGELOG entries (everything after <version> if given)
@@ -3863,6 +3903,7 @@ const apiWorkflowStartAction = options.apiWorkflowAction === 'start';
3863
3903
  const apiWorkflowStartHasExternalInput = options.apiWorkflowAction === 'start' && options.apiWorkflowInput;
3864
3904
  const apiWorkflowTemplate = options.apiWorkflowTemplate || 'generated_keyframe_video';
3865
3905
  const apiModelUtilityAction = Boolean(options.apiModelAction);
3906
+ const liveModelUtilityAction = Boolean(options.liveModelAction);
3866
3907
  const apiReplayUtilityAction = Boolean(options.apiReplayAction);
3867
3908
  const personaUtilityAction = Boolean(options.personaAction && options.personaAction !== 'generate');
3868
3909
  const contractUtilityAction = Boolean(options.contractAction);
@@ -3870,6 +3911,7 @@ const storyboardPlanUtilityAction = Boolean(options.storyboardPlanAction);
3870
3911
  const commandUsesGenerationSeed = !options.apiChat &&
3871
3912
  !apiWorkflowUtilityAction &&
3872
3913
  !apiModelUtilityAction &&
3914
+ !liveModelUtilityAction &&
3873
3915
  !apiReplayUtilityAction &&
3874
3916
  !contractUtilityAction &&
3875
3917
  !storyboardPlanUtilityAction &&
@@ -3894,12 +3936,17 @@ if (apiWorkflowStartAction && apiWorkflowTemplate === 'generated_keyframe_video'
3894
3936
  if (apiWorkflowStartAction && apiWorkflowTemplate === 'storyboard_video' && !options.prompt && !apiWorkflowStartHasExternalInput) {
3895
3937
  fatalCliError('--api-workflow storyboard-video preset requires a prompt or --workflow-input JSON.', { code: 'INVALID_ARGUMENT' });
3896
3938
  }
3939
+ if (!liveModelUtilityAction && (options.liveModelMedia !== 'all' || options.liveModelNetwork || options.liveModelTags.length > 0)) {
3940
+ fatalCliError('--model-media, --model-network, and --model-tag require --list-models or --search-models.', {
3941
+ code: 'INVALID_ARGUMENT'
3942
+ });
3943
+ }
3897
3944
  // Normalize a whitespace-only prompt to empty so the guard below treats it as
3898
3945
  // "no prompt" rather than silently sending blank text to the server.
3899
3946
  if (typeof options.prompt === 'string' && options.prompt.trim() === '') {
3900
3947
  options.prompt = '';
3901
3948
  }
3902
- if (!options.prompt && !options.apiChat && !apiWorkflowUtilityAction && !apiWorkflowStartAction && !apiModelUtilityAction && !apiReplayUtilityAction && !contractUtilityAction && !storyboardPlanUtilityAction && !options.estimateVideoCost && !options.multiAngle && !options.showBalance && !options.showVersion && !options.doctor && !options.extractLastFrame && !options.extractFirstFrame && !options.extractFrameAt && !options.verifyVideo && !options.concatVideos && !options.sourceReelDir && !options.remixAudio && !options.listMedia && !options.memoryAction && !options.personalityAction && !personaUtilityAction) {
3949
+ if (!options.prompt && !options.apiChat && !apiWorkflowUtilityAction && !apiWorkflowStartAction && !apiModelUtilityAction && !liveModelUtilityAction && !apiReplayUtilityAction && !contractUtilityAction && !storyboardPlanUtilityAction && !options.estimateVideoCost && !options.multiAngle && !options.showBalance && !options.showVersion && !options.doctor && !options.extractLastFrame && !options.extractFirstFrame && !options.extractFrameAt && !options.verifyVideo && !options.concatVideos && !options.sourceReelDir && !options.remixAudio && !options.listMedia && !options.memoryAction && !options.personalityAction && !personaUtilityAction) {
3903
3950
  fatalCliError('No prompt provided. Use --help for usage.', { code: 'INVALID_ARGUMENT' });
3904
3951
  }
3905
3952
 
@@ -5898,6 +5945,236 @@ async function runApiModels() {
5898
5945
  }
5899
5946
  }
5900
5947
 
5948
+ function normalizeLiveModelSearch(value) {
5949
+ return String(value || '')
5950
+ .normalize('NFKC')
5951
+ .toLocaleLowerCase()
5952
+ .replace(/[^\p{L}\p{N}]+/gu, '');
5953
+ }
5954
+
5955
+ function normalizeLiveModelTag(value) {
5956
+ return String(value || '')
5957
+ .normalize('NFKC')
5958
+ .toLocaleLowerCase()
5959
+ .trim()
5960
+ .replace(/[\s_]+/g, '-');
5961
+ }
5962
+
5963
+ function decodeModelCatalogAttribute(value) {
5964
+ return String(value || '')
5965
+ .replace(/&#(\d+);/g, (_match, code) => String.fromCodePoint(Number(code)))
5966
+ .replace(/&#x([0-9a-f]+);/gi, (_match, code) => String.fromCodePoint(Number.parseInt(code, 16)))
5967
+ .replace(/&quot;/g, '"')
5968
+ .replace(/&#39;|&apos;/g, "'")
5969
+ .replace(/&lt;/g, '<')
5970
+ .replace(/&gt;/g, '>')
5971
+ .replace(/&amp;/g, '&');
5972
+ }
5973
+
5974
+ function modelCatalogEntriesFromHtml(html) {
5975
+ const entries = [];
5976
+ const anchorPattern = /<a\b[^>]*>/gi;
5977
+ let anchorMatch;
5978
+ while ((anchorMatch = anchorPattern.exec(String(html || ''))) !== null) {
5979
+ const attributes = {};
5980
+ const attributePattern = /([:\w-]+)\s*=\s*"([^"]*)"/g;
5981
+ let attributeMatch;
5982
+ while ((attributeMatch = attributePattern.exec(anchorMatch[0])) !== null) {
5983
+ attributes[attributeMatch[1].toLowerCase()] = decodeModelCatalogAttribute(attributeMatch[2]);
5984
+ }
5985
+ const classes = (attributes.class || '').split(/\s+/);
5986
+ if (!classes.includes('mcard')) continue;
5987
+
5988
+ const textTokens = (attributes['data-text'] || '')
5989
+ .toLocaleLowerCase()
5990
+ .split(/\s+/)
5991
+ .filter(Boolean);
5992
+ const capabilities = (attributes['data-caps'] || '')
5993
+ .toLocaleLowerCase()
5994
+ .split(/\s+/)
5995
+ .filter(Boolean);
5996
+ const tags = new Set();
5997
+ if (attributes['data-uncensored'] === '1' || capabilities.includes('uncensored')) {
5998
+ tags.add('uncensored');
5999
+ }
6000
+ if (attributes['data-community'] === '1') tags.add('community');
6001
+ const tier = normalizeLiveModelTag(attributes['data-tier']);
6002
+ if (tier) tags.add(tier);
6003
+ for (const tag of KNOWN_MODEL_CATALOG_TAGS) {
6004
+ if (textTokens.includes(tag)) tags.add(tag);
6005
+ }
6006
+ entries.push({
6007
+ modelIds: new Set(textTokens),
6008
+ tags: [...tags].sort()
6009
+ });
6010
+ }
6011
+ return entries;
6012
+ }
6013
+
6014
+ async function fetchModelCatalogEntries() {
6015
+ if (getEnv('SOGNI_AGENT_TEST_STATE_PATH')) {
6016
+ return modelCatalogEntriesFromHtml(getEnv('SOGNI_AGENT_TEST_MODEL_CATALOG_HTML') || '');
6017
+ }
6018
+
6019
+ const controller = new AbortController();
6020
+ const timeoutId = setTimeout(() => controller.abort(), SOGNI_MODEL_CATALOG_TIMEOUT_MS);
6021
+ try {
6022
+ const response = await fetchSafeUrl(
6023
+ SOGNI_MODEL_CATALOG_URL,
6024
+ {
6025
+ headers: { Accept: 'text/html' },
6026
+ signal: controller.signal
6027
+ },
6028
+ { allowedHosts: ['www.sogni.ai'] }
6029
+ );
6030
+ if (!response.ok) {
6031
+ const err = new Error(`Sogni model catalog returned HTTP ${response.status}.`);
6032
+ err.code = 'MODEL_CATALOG_UNAVAILABLE';
6033
+ throw err;
6034
+ }
6035
+ const contentLength = Number(response.headers.get('content-length'));
6036
+ if (Number.isFinite(contentLength) && contentLength > SOGNI_MODEL_CATALOG_MAX_BYTES) {
6037
+ const err = new Error('Sogni model catalog response is unexpectedly large.');
6038
+ err.code = 'MODEL_CATALOG_INVALID';
6039
+ throw err;
6040
+ }
6041
+ const html = await response.text();
6042
+ if (Buffer.byteLength(html, 'utf8') > SOGNI_MODEL_CATALOG_MAX_BYTES) {
6043
+ const err = new Error('Sogni model catalog response is unexpectedly large.');
6044
+ err.code = 'MODEL_CATALOG_INVALID';
6045
+ throw err;
6046
+ }
6047
+ const entries = modelCatalogEntriesFromHtml(html);
6048
+ if (entries.length === 0) {
6049
+ const err = new Error('Sogni model catalog contained no model cards.');
6050
+ err.code = 'MODEL_CATALOG_INVALID';
6051
+ throw err;
6052
+ }
6053
+ return entries;
6054
+ } finally {
6055
+ clearTimeout(timeoutId);
6056
+ }
6057
+ }
6058
+
6059
+ function enrichLiveModelsWithCatalogTags(models, catalogEntries) {
6060
+ return models.map((model) => {
6061
+ const modelId = String(model.id || '').toLocaleLowerCase();
6062
+ const entry = catalogEntries.find((candidate) => candidate.modelIds.has(modelId));
6063
+ return {
6064
+ ...model,
6065
+ tags: entry?.tags || []
6066
+ };
6067
+ });
6068
+ }
6069
+
6070
+ async function runLiveModels() {
6071
+ const creds = loadCredentials();
6072
+ const apiKey = requireApiKeyCredentials(
6073
+ creds,
6074
+ options.liveModelAction === 'search' ? '--search-models' : '--list-models'
6075
+ );
6076
+ const network = options.liveModelNetwork || openclawConfig?.defaultNetwork || 'fast';
6077
+ const media = options.liveModelMedia || 'all';
6078
+ const query = options.liveModelQuery?.trim() || null;
6079
+ const normalizedQuery = normalizeLiveModelSearch(query);
6080
+ const tagFilters = [...new Set(options.liveModelTags.map(normalizeLiveModelTag).filter(Boolean))];
6081
+ if (query && !normalizedQuery) {
6082
+ const err = new Error('Model search query must contain at least one letter or number.');
6083
+ err.code = 'INVALID_ARGUMENT';
6084
+ throw err;
6085
+ }
6086
+ const modelClient = new SogniClientWrapper({
6087
+ appSource: SOGNI_APP_SOURCE,
6088
+ network,
6089
+ autoConnect: false,
6090
+ apiKey,
6091
+ authType: 'apiKey'
6092
+ });
6093
+
6094
+ try {
6095
+ await connectSogniClient(modelClient);
6096
+ let models = await modelClient.getAvailableModels({ sortByWorkers: true });
6097
+ const queryAsTag = normalizeLiveModelTag(query);
6098
+ const catalogRequired = tagFilters.length > 0 || KNOWN_MODEL_CATALOG_TAGS.has(queryAsTag);
6099
+ let catalogTagsAvailable = false;
6100
+ try {
6101
+ const catalogEntries = await fetchModelCatalogEntries();
6102
+ if (catalogRequired && catalogEntries.length === 0) {
6103
+ const err = new Error('Sogni model catalog contained no model cards.');
6104
+ err.code = 'MODEL_CATALOG_INVALID';
6105
+ throw err;
6106
+ }
6107
+ models = enrichLiveModelsWithCatalogTags(models, catalogEntries);
6108
+ catalogTagsAvailable = catalogEntries.length > 0;
6109
+ } catch (error) {
6110
+ if (catalogRequired) {
6111
+ if (!error.code) error.code = 'MODEL_CATALOG_UNAVAILABLE';
6112
+ error.hint = 'Tag filtering requires the live Sogni model catalog at https://www.sogni.ai/models.';
6113
+ throw error;
6114
+ }
6115
+ models = enrichLiveModelsWithCatalogTags(models, []);
6116
+ if (!options.quiet && !options.json && !JSON_ERROR_MODE) {
6117
+ console.error(`Warning: model catalog tags unavailable: ${cliErrorMessage(error)}`);
6118
+ }
6119
+ }
6120
+ if (media !== 'all') {
6121
+ models = models.filter((model) => model.media === media);
6122
+ }
6123
+ if (tagFilters.length > 0) {
6124
+ models = models.filter((model) =>
6125
+ tagFilters.every((tag) => model.tags.includes(tag))
6126
+ );
6127
+ }
6128
+ if (normalizedQuery) {
6129
+ models = models.filter((model) =>
6130
+ normalizeLiveModelSearch(`${model.id} ${model.name} ${model.tags.join(' ')}`).includes(normalizedQuery)
6131
+ );
6132
+ }
6133
+
6134
+ const result = {
6135
+ success: true,
6136
+ type: 'live-models',
6137
+ network,
6138
+ media,
6139
+ query,
6140
+ tagFilters,
6141
+ catalogTagsAvailable,
6142
+ count: models.length,
6143
+ models,
6144
+ timestamp: new Date().toISOString()
6145
+ };
6146
+ if (options.json || JSON_ERROR_MODE) {
6147
+ console.log(JSON.stringify(result));
6148
+ return;
6149
+ }
6150
+
6151
+ const scope = [
6152
+ media === 'all' ? 'all media' : media,
6153
+ `network=${network}`,
6154
+ query ? `query=${JSON.stringify(query)}` : null,
6155
+ tagFilters.length ? `tags=${tagFilters.join('+')}` : null
6156
+ ].filter(Boolean).join(', ');
6157
+ console.log(`Live Sogni models (${models.length}; ${scope})`);
6158
+ if (models.length === 0) {
6159
+ console.log('No matching models found.');
6160
+ return;
6161
+ }
6162
+ console.log('MEDIA\tWORKERS\tMODEL ID\tTAGS\tNAME');
6163
+ for (const model of models) {
6164
+ console.log(`${model.media}\t${model.workerCount}\t${model.id}\t${model.tags.join(',') || '-'}\t${model.name}`);
6165
+ }
6166
+ } finally {
6167
+ try {
6168
+ if (modelClient.isConnected()) {
6169
+ await Promise.race([
6170
+ modelClient.disconnect(),
6171
+ new Promise(resolve => setTimeout(resolve, 1000))
6172
+ ]);
6173
+ }
6174
+ } catch {}
6175
+ }
6176
+ }
6177
+
5901
6178
  function recordsFromReplayPayload(payload) {
5902
6179
  const data = extractApiEnvelopeData(payload);
5903
6180
  return Array.isArray(data?.records) ? data.records : Array.isArray(payload?.records) ? payload.records : [];
@@ -9053,6 +9330,11 @@ async function main() {
9053
9330
  return;
9054
9331
  }
9055
9332
 
9333
+ if (options.liveModelAction) {
9334
+ await runLiveModels();
9335
+ return;
9336
+ }
9337
+
9056
9338
  if (options.apiReplayAction) {
9057
9339
  await runApiReplay();
9058
9340
  return;
@@ -9950,8 +10232,7 @@ async function main() {
9950
10232
  const contextBuffers = await Promise.all(
9951
10233
  options.contextImages.map(img => fetchMediaBuffer(img))
9952
10234
  );
9953
- const modelDefaults = getModelDefaults(options.model, openclawConfig)
9954
- ?? getKrea2IdentityEditDefaults(options.model);
10235
+ const modelDefaults = getModelDefaults(options.model, openclawConfig);
9955
10236
  const steps = options.steps ?? modelDefaults?.steps ?? (options.model.includes('lightning') ? 4 : 20);
9956
10237
  const guidance = options.guidance ?? modelDefaults?.guidance ?? (options.model.includes('lightning') ? 3.5 : 7.5);
9957
10238
  const gptImageQuality = isGptImage2ModelSelection(options.model)
package/version.mjs CHANGED
@@ -1 +1 @@
1
- export const PACKAGE_VERSION = '3.15.0';
1
+ export const PACKAGE_VERSION = '3.16.0';