@sogni-ai/sogni-creative-agent-skill 2.2.0 → 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/llm.txt CHANGED
@@ -50,7 +50,7 @@ ask before cloning.
50
50
  Once-only setup, used by every integration above:
51
51
 
52
52
  The API key can always be found by logging into https://dashboard.sogni.ai and
53
- clicking your username.
53
+ opening the account menu.
54
54
 
55
55
  ```bash
56
56
  mkdir -p ~/.config/sogni
@@ -63,12 +63,22 @@ chmod 600 ~/.config/sogni/credentials
63
63
  You can also export `SOGNI_API_KEY` instead of writing the file.
64
64
 
65
65
  Hosted API modes require `SOGNI_API_KEY`: use `sogni-agent --api-chat "prompt"`
66
- for `/v1/chat/completions` with rich creative-agent tools, or
66
+ for `/v1/chat/completions` with rich creative-agent tools and sanitized
67
+ message forwarding, or
67
68
  `sogni-agent --api-workflow image-to-video --video-prompt "motion" "image prompt"`
68
69
  for durable `/v1/creative-agent/workflows` execution.
69
- Use the direct CLI path for uploaded media (`-c`, `--ref`, `--ref-audio`,
70
- `--ref-video`); hosted API modes do not accept those media flags for server-side
71
- tool 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.
72
82
 
73
83
  Reusable hosted workflow behavior belongs in `../sogni-creative-agent` before it
74
84
  is synced into this public skill. Use typed planner/runtime contracts for media
@@ -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": "2.2.0",
5
+ "version": "2.3.0",
6
6
  "skills": [
7
7
  "."
8
8
  ],
@@ -73,12 +73,35 @@
73
73
  "default": "qwen3.6-35b-a3b-gguf-iq4xs",
74
74
  "description": "Default LLM model for --api-chat."
75
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
+ },
76
90
  "defaultApiToolMode": {
77
91
  "type": "string",
78
- "enum": ["creative-agent", "rich", "hosted", "none"],
92
+ "enum": ["creative-agent", "creative-tools", "none"],
79
93
  "default": "creative-agent",
80
94
  "description": "Default Sogni tool family injected into --api-chat requests."
81
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
+ },
82
105
  "seedStrategy": {
83
106
  "type": "string",
84
107
  "enum": ["random", "prompt-hash"],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sogni-ai/sogni-creative-agent-skill",
3
- "version": "2.2.0",
3
+ "version": "2.3.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",
@@ -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",
@@ -50,6 +53,7 @@
50
53
  "llm.txt",
51
54
  "skill-package.json",
52
55
  "scripts/check-creative-agent-runtime.mjs",
56
+ "scripts/check-creative-agent-source.mjs",
53
57
  "version.mjs",
54
58
  "scripts/sync-openclaw-plugin.mjs",
55
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
+ );