genesis-ai-cli 7.5.0 → 7.5.1
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/dist/src/mcp/tool-chain.js +16 -9
- package/package.json +1 -1
|
@@ -32,12 +32,17 @@ exports.CHAIN_TEMPLATES = {
|
|
|
32
32
|
id: 'generate',
|
|
33
33
|
server: 'stability-ai',
|
|
34
34
|
tool: 'stability-ai-generate-image',
|
|
35
|
-
params: (ctx) =>
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
35
|
+
params: (ctx) => {
|
|
36
|
+
const filename = ctx.data.filename || `genesis-${Date.now()}`;
|
|
37
|
+
// Store filename in context for later use
|
|
38
|
+
ctx.data._generatedFilename = filename;
|
|
39
|
+
return {
|
|
40
|
+
prompt: ctx.data.prompt || 'a beautiful landscape',
|
|
41
|
+
outputImageFileName: filename,
|
|
42
|
+
};
|
|
43
|
+
},
|
|
39
44
|
transform: (result) => ({
|
|
40
|
-
|
|
45
|
+
message: result,
|
|
41
46
|
}),
|
|
42
47
|
},
|
|
43
48
|
{
|
|
@@ -45,9 +50,10 @@ exports.CHAIN_TEMPLATES = {
|
|
|
45
50
|
server: 'filesystem',
|
|
46
51
|
tool: 'read_file',
|
|
47
52
|
params: (ctx) => ({
|
|
48
|
-
|
|
53
|
+
// Stability AI MCP saves images to /tmp/tadasant-mcp-server-stability-ai/
|
|
54
|
+
path: `/tmp/tadasant-mcp-server-stability-ai/${ctx.data._generatedFilename}.png`,
|
|
49
55
|
}),
|
|
50
|
-
condition: (ctx) => !!ctx.
|
|
56
|
+
condition: (ctx) => !!ctx.data._generatedFilename,
|
|
51
57
|
},
|
|
52
58
|
],
|
|
53
59
|
},
|
|
@@ -66,8 +72,9 @@ exports.CHAIN_TEMPLATES = {
|
|
|
66
72
|
count: 3,
|
|
67
73
|
}),
|
|
68
74
|
transform: (result) => ({
|
|
69
|
-
|
|
70
|
-
|
|
75
|
+
// Handle both flat response and nested results array
|
|
76
|
+
url: result.url || result.results?.[0]?.url || result.web?.results?.[0]?.url,
|
|
77
|
+
title: result.title || result.results?.[0]?.title || result.web?.results?.[0]?.title,
|
|
71
78
|
}),
|
|
72
79
|
},
|
|
73
80
|
{
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "genesis-ai-cli",
|
|
3
|
-
"version": "7.5.
|
|
3
|
+
"version": "7.5.1",
|
|
4
4
|
"description": "Autonomous AI System Creator - Brain ON by default, Active Inference integrated, Curiosity-driven, Φ monitoring in every response",
|
|
5
5
|
"main": "dist/src/index.js",
|
|
6
6
|
"types": "dist/src/index.d.ts",
|