stringray-ai 1.0.5 → 1.0.7

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.
Files changed (2) hide show
  1. package/dist/cli/index.js +71 -11
  2. package/package.json +1 -1
package/dist/cli/index.js CHANGED
@@ -21,7 +21,7 @@ program
21
21
  console.log("Status: ✅ Healthy");
22
22
  console.log("\n✅ Status check complete.");
23
23
  });
24
- // Install Command - Basic implementation
24
+ // Install Command - Full implementation
25
25
  program
26
26
  .command("install")
27
27
  .description("Interactive setup wizard for StringRay Framework")
@@ -29,16 +29,76 @@ program
29
29
  .action(async (options) => {
30
30
  console.log("🚀 StringRay Framework Setup Wizard");
31
31
  console.log("=================================");
32
- console.log("Checking system prerequisites...");
33
- console.log("✅ oh-my-opencode available");
34
- console.log("✅ Node.js version compatible");
35
- console.log("\nValidating project structure...");
36
- console.log("✅ Required directories present");
37
- console.log("✅ Configuration files valid");
38
- console.log("\n🎉 StringRay Framework installation completed successfully!");
39
- console.log("\nNext steps:");
40
- console.log(" • Run 'strray doctor' to verify everything is working");
41
- console.log(" • Run 'strray status' to see system status");
32
+
33
+ try {
34
+ // Check system prerequisites
35
+ console.log("Checking system prerequisites...");
36
+
37
+ // Check Node.js version
38
+ const nodeVersion = process.versions.node;
39
+ const majorVersion = parseInt(nodeVersion.split('.')[0]);
40
+ if (majorVersion < 18) {
41
+ console.error(`❌ Node.js version ${nodeVersion} is not supported. Please upgrade to Node.js 18+`);
42
+ process.exit(1);
43
+ }
44
+ console.log("✅ Node.js version compatible");
45
+
46
+ // Check if oh-my-opencode is available
47
+ try {
48
+ const { execSync } = await import('child_process');
49
+ execSync('which oh-my-opencode', { stdio: 'pipe' });
50
+ console.log("✅ oh-my-opencode available");
51
+ } catch (error) {
52
+ console.log("⚠️ oh-my-opencode not found in PATH (this is okay if using as a plugin)");
53
+ }
54
+
55
+ // Create configuration files
56
+ console.log("\nCreating configuration files...");
57
+
58
+ // Create .opencode directory
59
+ const fs = await import('fs');
60
+ const path = await import('path');
61
+
62
+ const opencodeDir = path.join(process.cwd(), '.opencode');
63
+ if (!fs.existsSync(opencodeDir)) {
64
+ fs.mkdirSync(opencodeDir, { recursive: true });
65
+ console.log("✅ Created .opencode directory");
66
+ }
67
+
68
+ // Create oh-my-opencode.json configuration
69
+ const ohMyOpencodeConfig = {
70
+ "plugin": [
71
+ "oh-my-opencode",
72
+ "stringray-ai/dist/plugin/stringray-codex-injection.js"
73
+ ]
74
+ };
75
+
76
+ const configPath = path.join(opencodeDir, 'oh-my-opencode.json');
77
+ fs.writeFileSync(configPath, JSON.stringify(ohMyOpencodeConfig, null, 2));
78
+ console.log("✅ Created oh-my-opencode.json configuration");
79
+
80
+ // Copy .mcp.json configuration
81
+ const mcpConfigSource = path.join(__dirname, '..', '.mcp.json');
82
+ const mcpConfigDest = path.join(process.cwd(), '.mcp.json');
83
+
84
+ if (fs.existsSync(mcpConfigSource)) {
85
+ fs.copyFileSync(mcpConfigSource, mcpConfigDest);
86
+ console.log("✅ Copied MCP server configuration");
87
+ } else {
88
+ console.log("⚠️ MCP configuration not found in package");
89
+ }
90
+
91
+ console.log("\n🎉 StringRay Framework installation completed successfully!");
92
+
93
+ console.log("\nNext steps:");
94
+ console.log(" • Run 'stringray-ai doctor' to verify everything is working");
95
+ console.log(" • Run 'stringray-ai status' to see system status");
96
+ console.log(" • Start oh-my-opencode to use StringRay AI features");
97
+
98
+ } catch (error) {
99
+ console.error("❌ Installation failed:", error.message);
100
+ process.exit(1);
101
+ }
42
102
  });
43
103
  // Doctor Command - Basic implementation
44
104
  program
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "stringray-ai",
3
- "version": "1.0.5",
3
+ "version": "1.0.7",
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",