@sogni-ai/sogni-creative-agent-skill 2.1.3 → 2.3.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.
- package/README.md +392 -181
- package/SKILL.md +187 -27
- package/generated/creative-agent-runtime.mjs +8559 -899
- package/llm.txt +29 -7
- package/openclaw.plugin.json +59 -4
- package/package.json +10 -4
- package/scripts/check-creative-agent-source.mjs +104 -0
- package/sogni-agent.mjs +2329 -186
- package/ssrf-guard.mjs +2 -1
- package/version.mjs +1 -1
package/llm.txt
CHANGED
|
@@ -45,24 +45,46 @@ bootstrap scripts with `set -e`, `bash -c`, `sh -c`, or inline repository URLs.
|
|
|
45
45
|
Use the npm upgrade command above, update an existing checkout with `git -C`, or
|
|
46
46
|
ask before cloning.
|
|
47
47
|
|
|
48
|
-
## Configure Sogni
|
|
48
|
+
## Configure Sogni API key
|
|
49
49
|
|
|
50
50
|
Once-only setup, used by every integration above:
|
|
51
51
|
|
|
52
|
+
The API key can always be found by logging into https://dashboard.sogni.ai and
|
|
53
|
+
opening the account menu.
|
|
54
|
+
|
|
52
55
|
```bash
|
|
53
56
|
mkdir -p ~/.config/sogni
|
|
54
57
|
cat > ~/.config/sogni/credentials << 'EOF'
|
|
55
58
|
SOGNI_API_KEY=your_api_key
|
|
56
|
-
# or:
|
|
57
|
-
# SOGNI_USERNAME=your_username
|
|
58
|
-
# SOGNI_PASSWORD=your_password
|
|
59
59
|
EOF
|
|
60
60
|
chmod 600 ~/.config/sogni/credentials
|
|
61
61
|
```
|
|
62
62
|
|
|
63
|
-
You can also export `SOGNI_API_KEY
|
|
64
|
-
|
|
65
|
-
|
|
63
|
+
You can also export `SOGNI_API_KEY` instead of writing the file.
|
|
64
|
+
|
|
65
|
+
Hosted API modes require `SOGNI_API_KEY`: use `sogni-agent --api-chat "prompt"`
|
|
66
|
+
for `/v1/chat/completions` with rich creative-agent tools and sanitized
|
|
67
|
+
message forwarding, or
|
|
68
|
+
`sogni-agent --api-workflow image-to-video --video-prompt "motion" "image prompt"`
|
|
69
|
+
for durable `/v1/creative-agent/workflows` execution.
|
|
70
|
+
Sogni Intelligence utilities are available with `--list-api-models`,
|
|
71
|
+
`--get-api-model <id>`, `--task-profile general|coding|reasoning`,
|
|
72
|
+
`--max-tokens <n>`, `--thinking` / `--no-thinking`, `--list-replays [n]`,
|
|
73
|
+
`--get-replay <id>`, and `--ingest-replay <json|path|@path>`.
|
|
74
|
+
Hosted API modes forward media references from `-c`, `--ref`, `--ref-end`,
|
|
75
|
+
`--ref-audio`, `--reference-audio-identity`, and `--ref-video` as
|
|
76
|
+
`media_references`; API chat also attaches image refs as vision inputs. Local
|
|
77
|
+
file references are uploaded to Sogni media storage first and then forwarded as
|
|
78
|
+
retrievable URLs. Workflow JSON can bind those refs with
|
|
79
|
+
`sourceStepId: "$input_media"`. Use `--workflow-max-cost`, `--confirm-cost`,
|
|
80
|
+
or `--no-confirm-cost` for durable workflow cost policy. JSON errors include
|
|
81
|
+
canonical `errorType`, `errorCategory`, and retryability when classified.
|
|
82
|
+
|
|
83
|
+
Reusable hosted workflow behavior belongs in `../sogni-creative-agent` before it
|
|
84
|
+
is synced into this public skill. Use typed planner/runtime contracts for media
|
|
85
|
+
routing and repair decisions; keep skill-local regex limited to CLI fact
|
|
86
|
+
extraction such as paths, URLs, extensions, dimensions, durations, and explicit
|
|
87
|
+
positions.
|
|
66
88
|
|
|
67
89
|
## Repo
|
|
68
90
|
|
package/openclaw.plugin.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"id": "sogni-creative-agent-skill",
|
|
3
|
-
"name": "Sogni Creative Agent Skill — Image &
|
|
4
|
-
"description": "Agent skill and CLI for Sogni AI image and
|
|
5
|
-
"version": "2.
|
|
3
|
+
"name": "Sogni Creative Agent Skill — Image, Video & Music Generation",
|
|
4
|
+
"description": "Agent skill and CLI for Sogni AI image, video, and music generation.",
|
|
5
|
+
"version": "2.3.0",
|
|
6
6
|
"skills": [
|
|
7
7
|
"."
|
|
8
8
|
],
|
|
@@ -25,6 +25,11 @@
|
|
|
25
25
|
"default": "coreml-sogniXLturbo_alpha1_ad",
|
|
26
26
|
"description": "Default model for photobooth face transfer."
|
|
27
27
|
},
|
|
28
|
+
"defaultMusicModel": {
|
|
29
|
+
"type": "string",
|
|
30
|
+
"default": "ace_step_1.5_turbo",
|
|
31
|
+
"description": "Default model for direct music/audio generation."
|
|
32
|
+
},
|
|
28
33
|
"videoModels": {
|
|
29
34
|
"type": "object",
|
|
30
35
|
"additionalProperties": false,
|
|
@@ -58,6 +63,45 @@
|
|
|
58
63
|
"default": "spark",
|
|
59
64
|
"description": "Default token balance to use."
|
|
60
65
|
},
|
|
66
|
+
"apiBaseUrl": {
|
|
67
|
+
"type": "string",
|
|
68
|
+
"default": "https://api.sogni.ai",
|
|
69
|
+
"description": "Default Sogni API base URL for --api-chat and --api-workflow modes."
|
|
70
|
+
},
|
|
71
|
+
"defaultLlmModel": {
|
|
72
|
+
"type": "string",
|
|
73
|
+
"default": "qwen3.6-35b-a3b-gguf-iq4xs",
|
|
74
|
+
"description": "Default LLM model for --api-chat."
|
|
75
|
+
},
|
|
76
|
+
"defaultTaskProfile": {
|
|
77
|
+
"type": "string",
|
|
78
|
+
"enum": ["general", "coding", "reasoning"],
|
|
79
|
+
"description": "Optional default Sogni Intelligence task profile forwarded as task_profile for --api-chat."
|
|
80
|
+
},
|
|
81
|
+
"defaultApiMaxTokens": {
|
|
82
|
+
"type": "integer",
|
|
83
|
+
"minimum": 1,
|
|
84
|
+
"description": "Optional default max_tokens value for --api-chat and storyboard planning chat calls."
|
|
85
|
+
},
|
|
86
|
+
"defaultApiThinking": {
|
|
87
|
+
"type": "boolean",
|
|
88
|
+
"description": "Optional default chat_template_kwargs.enable_thinking value for hosted chat requests."
|
|
89
|
+
},
|
|
90
|
+
"defaultApiToolMode": {
|
|
91
|
+
"type": "string",
|
|
92
|
+
"enum": ["creative-agent", "creative-tools", "none"],
|
|
93
|
+
"default": "creative-agent",
|
|
94
|
+
"description": "Default Sogni tool family injected into --api-chat requests."
|
|
95
|
+
},
|
|
96
|
+
"defaultWorkflowMaxCost": {
|
|
97
|
+
"type": "number",
|
|
98
|
+
"minimum": 0,
|
|
99
|
+
"description": "Optional default capacity-unit ceiling forwarded to --api-workflow requests unless --workflow-max-cost is provided."
|
|
100
|
+
},
|
|
101
|
+
"defaultWorkflowConfirmCost": {
|
|
102
|
+
"type": "boolean",
|
|
103
|
+
"description": "Optional default explicit cost confirmation forwarded to --api-workflow requests unless --confirm-cost or --no-confirm-cost is provided."
|
|
104
|
+
},
|
|
61
105
|
"seedStrategy": {
|
|
62
106
|
"type": "string",
|
|
63
107
|
"enum": ["random", "prompt-hash"],
|
|
@@ -116,10 +160,21 @@
|
|
|
116
160
|
"minimum": 30,
|
|
117
161
|
"default": 300
|
|
118
162
|
},
|
|
163
|
+
"defaultMusicDurationSec": {
|
|
164
|
+
"type": "integer",
|
|
165
|
+
"minimum": 10,
|
|
166
|
+
"maximum": 600,
|
|
167
|
+
"default": 30
|
|
168
|
+
},
|
|
169
|
+
"defaultMusicTimeoutSec": {
|
|
170
|
+
"type": "integer",
|
|
171
|
+
"minimum": 30,
|
|
172
|
+
"default": 600
|
|
173
|
+
},
|
|
119
174
|
"credentialsPath": {
|
|
120
175
|
"type": "string",
|
|
121
176
|
"default": "~/.config/sogni/credentials",
|
|
122
|
-
"description": "Optional path to Sogni credentials file (can also set SOGNI_CREDENTIALS_PATH)."
|
|
177
|
+
"description": "Optional path to Sogni API key credentials file (can also set SOGNI_CREDENTIALS_PATH)."
|
|
123
178
|
},
|
|
124
179
|
"lastRenderPath": {
|
|
125
180
|
"type": "string",
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sogni-ai/sogni-creative-agent-skill",
|
|
3
|
-
"version": "2.
|
|
4
|
-
"description": "Sogni Creative Agent Skill: agent skill and CLI for Sogni AI image and
|
|
3
|
+
"version": "2.3.0",
|
|
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": {
|
|
@@ -10,11 +10,14 @@
|
|
|
10
10
|
"scripts": {
|
|
11
11
|
"openclaw:sync": "node scripts/sync-openclaw-plugin.mjs",
|
|
12
12
|
"sync:creative-agent-runtime": "node ../sogni-creative-agent/scripts/sync-skill-runtime.mjs",
|
|
13
|
+
"check:creative-agent-source": "node scripts/check-creative-agent-source.mjs",
|
|
14
|
+
"check:creative-agent-source:strict": "node scripts/check-creative-agent-source.mjs --strict-network",
|
|
13
15
|
"check:creative-agent-runtime": "node scripts/check-creative-agent-runtime.mjs",
|
|
14
16
|
"test": "npm run check:creative-agent-runtime && node --test test/*.test.mjs test/*.integration.mjs",
|
|
15
17
|
"test:integration": "npm run check:creative-agent-runtime && node --test test/*.integration.mjs",
|
|
16
18
|
"test:coverage": "npm run check:creative-agent-runtime && node --test --experimental-test-coverage --test-coverage-include=sogni-agent.mjs --test-coverage-lines=50 --test-coverage-branches=35 --test-coverage-functions=50 test/sogni-agent.test.mjs",
|
|
17
|
-
"test:coverage:full": "npm run check:creative-agent-runtime && node --test --experimental-test-coverage --test-coverage-include=sogni-agent.mjs --test-coverage-lines=50 --test-coverage-branches=35 --test-coverage-functions=50 test/*.test.mjs test/*.integration.mjs"
|
|
19
|
+
"test:coverage:full": "npm run check:creative-agent-runtime && node --test --experimental-test-coverage --test-coverage-include=sogni-agent.mjs --test-coverage-lines=50 --test-coverage-branches=35 --test-coverage-functions=50 test/*.test.mjs test/*.integration.mjs",
|
|
20
|
+
"prepack": "npm run check:creative-agent-source:strict && npm run check:creative-agent-runtime"
|
|
18
21
|
},
|
|
19
22
|
"keywords": [
|
|
20
23
|
"sogni",
|
|
@@ -22,6 +25,8 @@
|
|
|
22
25
|
"agent",
|
|
23
26
|
"image-generation",
|
|
24
27
|
"video-generation",
|
|
28
|
+
"music-generation",
|
|
29
|
+
"audio-generation",
|
|
25
30
|
"openclaw",
|
|
26
31
|
"hermes-agent",
|
|
27
32
|
"manus",
|
|
@@ -39,7 +44,7 @@
|
|
|
39
44
|
},
|
|
40
45
|
"homepage": "https://github.com/Sogni-AI/sogni-creative-agent-skill#readme",
|
|
41
46
|
"engines": {
|
|
42
|
-
"node": ">=22
|
|
47
|
+
"node": ">=22"
|
|
43
48
|
},
|
|
44
49
|
"files": [
|
|
45
50
|
"LICENSE",
|
|
@@ -48,6 +53,7 @@
|
|
|
48
53
|
"llm.txt",
|
|
49
54
|
"skill-package.json",
|
|
50
55
|
"scripts/check-creative-agent-runtime.mjs",
|
|
56
|
+
"scripts/check-creative-agent-source.mjs",
|
|
51
57
|
"version.mjs",
|
|
52
58
|
"scripts/sync-openclaw-plugin.mjs",
|
|
53
59
|
"openclaw-plugin.mjs",
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* Verify that the private sibling repo used to generate the public runtime is
|
|
4
|
+
* a clean checkout of its remote default branch HEAD.
|
|
5
|
+
*
|
|
6
|
+
* The generated runtime check can only prove "fresh relative to this local
|
|
7
|
+
* checkout"; this script prevents publish/pack from validating against stale
|
|
8
|
+
* or uncommitted private source.
|
|
9
|
+
*/
|
|
10
|
+
import { existsSync } from 'node:fs';
|
|
11
|
+
import { spawnSync } from 'node:child_process';
|
|
12
|
+
import { dirname, join, resolve } from 'node:path';
|
|
13
|
+
import { fileURLToPath } from 'node:url';
|
|
14
|
+
|
|
15
|
+
const repoRoot = dirname(dirname(fileURLToPath(import.meta.url)));
|
|
16
|
+
const args = new Set(process.argv.slice(2));
|
|
17
|
+
const strictNetwork = args.has('--strict-network');
|
|
18
|
+
const allowDirty = process.env.SOGNI_CREATIVE_AGENT_ALLOW_DIRTY === '1';
|
|
19
|
+
const creativeAgentRoot = resolve(
|
|
20
|
+
repoRoot,
|
|
21
|
+
process.env.SOGNI_CREATIVE_AGENT_DIR || join('..', 'sogni-creative-agent'),
|
|
22
|
+
);
|
|
23
|
+
|
|
24
|
+
function runGit(gitArgs, options = {}) {
|
|
25
|
+
const result = spawnSync('git', gitArgs, {
|
|
26
|
+
cwd: creativeAgentRoot,
|
|
27
|
+
encoding: 'utf8',
|
|
28
|
+
timeout: options.timeout,
|
|
29
|
+
});
|
|
30
|
+
if (result.error || result.status !== 0) {
|
|
31
|
+
const reason = result.error?.message || result.stderr?.trim() || `exit ${result.status}`;
|
|
32
|
+
throw new Error(`git ${gitArgs.join(' ')} failed in ${creativeAgentRoot}: ${reason}`);
|
|
33
|
+
}
|
|
34
|
+
return result.stdout.trim();
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
function resolveRemoteDefaultHead() {
|
|
38
|
+
const result = spawnSync('git', ['ls-remote', '--symref', 'origin', 'HEAD'], {
|
|
39
|
+
cwd: creativeAgentRoot,
|
|
40
|
+
encoding: 'utf8',
|
|
41
|
+
timeout: Number(process.env.SOGNI_CREATIVE_AGENT_LS_REMOTE_TIMEOUT_MS || 10000),
|
|
42
|
+
});
|
|
43
|
+
if (result.error || result.status !== 0) {
|
|
44
|
+
const reason = result.error?.message || result.stderr?.trim() || `exit ${result.status}`;
|
|
45
|
+
throw new Error(`git ls-remote --symref origin HEAD failed: ${reason}`);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
let branch = '(default)';
|
|
49
|
+
let sha;
|
|
50
|
+
for (const line of result.stdout.split('\n')) {
|
|
51
|
+
const symrefMatch = line.match(/^ref:\s+refs\/heads\/(\S+)\s+HEAD$/);
|
|
52
|
+
if (symrefMatch) {
|
|
53
|
+
branch = symrefMatch[1];
|
|
54
|
+
continue;
|
|
55
|
+
}
|
|
56
|
+
const headMatch = line.match(/^([0-9a-f]{40})\s+HEAD$/i);
|
|
57
|
+
if (headMatch) sha = headMatch[1].toLowerCase();
|
|
58
|
+
}
|
|
59
|
+
if (!sha) {
|
|
60
|
+
throw new Error('Could not parse remote default HEAD SHA.');
|
|
61
|
+
}
|
|
62
|
+
return { branch, sha };
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
if (!existsSync(join(creativeAgentRoot, '.git'))) {
|
|
66
|
+
console.error(`Missing sibling sogni-creative-agent checkout at ${creativeAgentRoot}`);
|
|
67
|
+
console.error('Set SOGNI_CREATIVE_AGENT_DIR if the private repo lives elsewhere.');
|
|
68
|
+
process.exit(1);
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
const localSha = runGit(['rev-parse', 'HEAD']).toLowerCase();
|
|
72
|
+
const status = runGit(['status', '--porcelain']);
|
|
73
|
+
if (status && !allowDirty) {
|
|
74
|
+
console.error(`sogni-creative-agent has uncommitted changes at ${creativeAgentRoot}.`);
|
|
75
|
+
console.error('Public runtime publishing must be generated from committed private source.');
|
|
76
|
+
console.error(status);
|
|
77
|
+
console.error('Set SOGNI_CREATIVE_AGENT_ALLOW_DIRTY=1 only for intentional local validation.');
|
|
78
|
+
process.exit(1);
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
let remoteHead;
|
|
82
|
+
try {
|
|
83
|
+
remoteHead = resolveRemoteDefaultHead();
|
|
84
|
+
} catch (error) {
|
|
85
|
+
const message = `Could not resolve sogni-creative-agent remote default HEAD: ${error.message}`;
|
|
86
|
+
if (strictNetwork) {
|
|
87
|
+
console.error(`${message}. Refusing to continue in strict-network mode.`);
|
|
88
|
+
process.exit(1);
|
|
89
|
+
}
|
|
90
|
+
console.warn(`${message}. Skipping remote freshness check.`);
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
if (remoteHead && localSha !== remoteHead.sha) {
|
|
94
|
+
console.error('sogni-creative-agent checkout is not at the remote default branch HEAD.');
|
|
95
|
+
console.error(`Remote ${remoteHead.branch}: ${remoteHead.sha}`);
|
|
96
|
+
console.error(`Local HEAD: ${localSha}`);
|
|
97
|
+
console.error(`Fix: git -C ${creativeAgentRoot} fetch origin && git -C ${creativeAgentRoot} checkout ${remoteHead.sha}`);
|
|
98
|
+
process.exit(1);
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
const dirtySuffix = status ? ' with allowed local changes' : '';
|
|
102
|
+
console.log(
|
|
103
|
+
`sogni-creative-agent source OK (${localSha.slice(0, 12)}${remoteHead ? ` matches origin/${remoteHead.branch}` : ''}${dirtySuffix}).`,
|
|
104
|
+
);
|