stringray-ai 1.0.27 ā 1.0.29
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/cli/index.js +77 -10
- package/package.json +1 -1
package/dist/cli/index.js
CHANGED
|
@@ -28,16 +28,83 @@ program
|
|
|
28
28
|
.action(async (options) => {
|
|
29
29
|
console.log("š StringRay Framework Setup Wizard");
|
|
30
30
|
console.log("=================================");
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
31
|
+
|
|
32
|
+
try {
|
|
33
|
+
// Check system prerequisites
|
|
34
|
+
console.log("Checking system prerequisites...");
|
|
35
|
+
|
|
36
|
+
// Check Node.js version
|
|
37
|
+
const nodeVersion = process.versions.node;
|
|
38
|
+
const majorVersion = parseInt(nodeVersion.split('.')[0]);
|
|
39
|
+
if (majorVersion < 18) {
|
|
40
|
+
console.error(`ā Node.js version ${nodeVersion} is not supported. Please upgrade to Node.js 18+`);
|
|
41
|
+
process.exit(1);
|
|
42
|
+
}
|
|
43
|
+
console.log("ā
Node.js version compatible");
|
|
44
|
+
|
|
45
|
+
// Check if oh-my-opencode is available
|
|
46
|
+
try {
|
|
47
|
+
const { execSync } = await import('child_process');
|
|
48
|
+
execSync('which oh-my-opencode', { stdio: 'pipe' });
|
|
49
|
+
console.log("ā
oh-my-opencode available");
|
|
50
|
+
} catch (error) {
|
|
51
|
+
console.log("ā ļø oh-my-opencode not found in PATH (this is okay if using as a plugin)");
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
// Create configuration files
|
|
55
|
+
console.log("\nCreating configuration files...");
|
|
56
|
+
|
|
57
|
+
// Create .opencode directory
|
|
58
|
+
const fs = await import('fs');
|
|
59
|
+
const path = await import('path');
|
|
60
|
+
|
|
61
|
+
const opencodeDir = path.join(process.cwd(), '.opencode');
|
|
62
|
+
if (!fs.existsSync(opencodeDir)) {
|
|
63
|
+
fs.mkdirSync(opencodeDir, { recursive: true });
|
|
64
|
+
console.log("ā
Created .opencode directory");
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
// Create oh-my-opencode.json configuration
|
|
68
|
+
const ohMyOpencodeConfig = {
|
|
69
|
+
"plugin": [
|
|
70
|
+
"oh-my-opencode",
|
|
71
|
+
"stringray-ai/dist/plugin/stringray-codex-injection.js"
|
|
72
|
+
]
|
|
73
|
+
};
|
|
74
|
+
|
|
75
|
+
const configPath = path.join(opencodeDir, 'oh-my-opencode.json');
|
|
76
|
+
fs.writeFileSync(configPath, JSON.stringify(ohMyOpencodeConfig, null, 2));
|
|
77
|
+
console.log("ā
Created oh-my-opencode.json configuration");
|
|
78
|
+
|
|
79
|
+
// Copy .mcp.json configuration
|
|
80
|
+
// Use ES module compatible path resolution
|
|
81
|
+
const { fileURLToPath } = await import('url');
|
|
82
|
+
const currentDir = path.dirname(fileURLToPath(import.meta.url));
|
|
83
|
+
// Go up two levels: cli/ -> dist/ -> package root
|
|
84
|
+
const mcpConfigSource = path.join(currentDir, '..', '..', '.mcp.json');
|
|
85
|
+
const mcpConfigDest = path.join(process.cwd(), '.mcp.json');
|
|
86
|
+
|
|
87
|
+
if (fs.existsSync(mcpConfigSource)) {
|
|
88
|
+
fs.copyFileSync(mcpConfigSource, mcpConfigDest);
|
|
89
|
+
console.log("ā
Copied MCP server configuration");
|
|
90
|
+
} else {
|
|
91
|
+
console.warn('Warning: MCP config not found in package');
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
console.log("\nš StringRay Framework installation completed successfully!");
|
|
95
|
+
console.log("ā
Enterprise AI orchestration ready!");
|
|
96
|
+
console.log("š Welcome to the future of AI-powered development!");
|
|
97
|
+
|
|
98
|
+
console.log("\nNext steps:");
|
|
99
|
+
console.log(" ⢠Run 'stringray-ai doctor' to verify everything is working");
|
|
100
|
+
console.log(" ⢠Run 'stringray-ai status' to see system status");
|
|
101
|
+
console.log(" ⢠Start oh-my-opencode to use StringRay AI features");
|
|
102
|
+
|
|
103
|
+
} catch (error) {
|
|
104
|
+
console.error("ā Installation failed:", error.message);
|
|
105
|
+
console.error("ā Stack trace:", error.stack);
|
|
106
|
+
process.exit(1);
|
|
107
|
+
}
|
|
41
108
|
});
|
|
42
109
|
// Doctor Command - Basic implementation
|
|
43
110
|
program
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "stringray-ai",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.29",
|
|
4
4
|
"description": "ā” StringRay ā”: Bulletproof AI orchestration with systematic error prevention. Zero dead ends. Ship clean, tested, optimized code ā every time.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/plugin/index.js",
|