stringray-ai 1.0.0 → 1.0.2
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 +8 -8
- package/dist/cli/index.js +179 -0
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
# ⚡ StringRay
|
|
1
|
+
# ⚡ StringRay AI v1.0.1 – Bulletproof AI Orchestration for Production-Grade Development
|
|
2
2
|
|
|
3
|
-
[](https://github.com/htafolla/stringray)
|
|
4
4
|
[](https://opensource.org/licenses/MIT)
|
|
5
5
|
[](https://nodejs.org/)
|
|
6
6
|
[](https://www.typescript.org/)
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
### Prerequisites
|
|
50
50
|
|
|
51
51
|
- Node.js 18+ / Bun (recommended)
|
|
52
|
-
-
|
|
52
|
+
- oh-my-opencode installed & running (StringRay AI integrates as an oh-my-opencode plugin)
|
|
53
53
|
|
|
54
54
|
## 📚 Documentation
|
|
55
55
|
|
|
@@ -62,7 +62,7 @@
|
|
|
62
62
|
### Installation
|
|
63
63
|
|
|
64
64
|
```bash
|
|
65
|
-
npm install stringray
|
|
65
|
+
npm install stringray-ai
|
|
66
66
|
```
|
|
67
67
|
|
|
68
68
|
### Setup
|
|
@@ -70,14 +70,14 @@ npm install stringray
|
|
|
70
70
|
**Important:** After installation, you must run the setup command manually:
|
|
71
71
|
|
|
72
72
|
```bash
|
|
73
|
-
npx stringray init
|
|
73
|
+
npx stringray-ai init
|
|
74
74
|
```
|
|
75
75
|
|
|
76
76
|
**Note:** npm does not run postinstall scripts automatically for local package installations (file paths or tar.gz files) for security reasons. The setup must be run manually.
|
|
77
77
|
|
|
78
78
|
This will automatically:
|
|
79
79
|
|
|
80
|
-
- ✅ Configure all
|
|
80
|
+
- ✅ Configure all 8 StringRay agents
|
|
81
81
|
- ✅ Enable multi-agent orchestration settings
|
|
82
82
|
- ✅ Set up configuration for AI development workflows
|
|
83
83
|
|
|
@@ -86,14 +86,14 @@ This will automatically:
|
|
|
86
86
|
If automatic setup fails:
|
|
87
87
|
|
|
88
88
|
```bash
|
|
89
|
-
npm install stringray
|
|
89
|
+
npm install stringray-ai
|
|
90
90
|
```
|
|
91
91
|
|
|
92
92
|
Then manually add to your development configuration (example for oh-my-opencode):
|
|
93
93
|
|
|
94
94
|
```json
|
|
95
95
|
{
|
|
96
|
-
"plugin": ["stringray/dist/plugin/stringray-codex-injection.js"],
|
|
96
|
+
"plugin": ["stringray-ai/dist/plugin/stringray-codex-injection.js"],
|
|
97
97
|
"agent": {
|
|
98
98
|
"orchestrator": { "model": "opencode/grok-code" },
|
|
99
99
|
"enforcer": { "model": "opencode/grok-code" },
|
|
@@ -0,0 +1,179 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { Command } from "commander";
|
|
3
|
+
const program = new Command();
|
|
4
|
+
// CLI Configuration
|
|
5
|
+
program
|
|
6
|
+
.name("strray")
|
|
7
|
+
.description("StringRay Framework - Ship Production-Ready Code & Eliminate Common Dead Ends")
|
|
8
|
+
.version("1.0.0");
|
|
9
|
+
// Status Command - Basic implementation
|
|
10
|
+
program
|
|
11
|
+
.command("status")
|
|
12
|
+
.description("Display StringRay Framework system status")
|
|
13
|
+
.option("--detailed", "show detailed system information")
|
|
14
|
+
.option("--json", "output status in JSON format")
|
|
15
|
+
.action(async (options) => {
|
|
16
|
+
console.log("📊 StringRay Framework Status");
|
|
17
|
+
console.log("==========================");
|
|
18
|
+
console.log("Framework: StringRay v1.0.0");
|
|
19
|
+
console.log("Environment: development");
|
|
20
|
+
console.log("Status: ✅ Healthy");
|
|
21
|
+
console.log("\n✅ Status check complete.");
|
|
22
|
+
});
|
|
23
|
+
// Install Command - Basic implementation
|
|
24
|
+
program
|
|
25
|
+
.command("install")
|
|
26
|
+
.description("Interactive setup wizard for StringRay Framework")
|
|
27
|
+
.option("--no-tui", "run in non-interactive mode without TUI")
|
|
28
|
+
.action(async (options) => {
|
|
29
|
+
console.log("🚀 StringRay Framework Setup Wizard");
|
|
30
|
+
console.log("=================================");
|
|
31
|
+
console.log("Checking system prerequisites...");
|
|
32
|
+
console.log("✅ oh-my-opencode available");
|
|
33
|
+
console.log("✅ Node.js version compatible");
|
|
34
|
+
console.log("\nValidating project structure...");
|
|
35
|
+
console.log("✅ Required directories present");
|
|
36
|
+
console.log("✅ Configuration files valid");
|
|
37
|
+
console.log("\n🎉 StringRay Framework installation completed successfully!");
|
|
38
|
+
console.log("\nNext steps:");
|
|
39
|
+
console.log(" • Run 'strray doctor' to verify everything is working");
|
|
40
|
+
console.log(" • Run 'strray status' to see system status");
|
|
41
|
+
});
|
|
42
|
+
// Doctor Command - Basic implementation
|
|
43
|
+
program
|
|
44
|
+
.command("doctor")
|
|
45
|
+
.description("Environment diagnostics and health checks")
|
|
46
|
+
.option("--category <name>", "check specific category only")
|
|
47
|
+
.action(async (options) => {
|
|
48
|
+
console.log("🔍 StringRay Framework Doctor");
|
|
49
|
+
console.log("==========================");
|
|
50
|
+
console.log("Installation");
|
|
51
|
+
console.log(" ✅ oh-my-opencode available");
|
|
52
|
+
console.log(" ✅ Plugin registration status");
|
|
53
|
+
console.log("Configuration");
|
|
54
|
+
console.log(" ✅ oh-my-opencode.json valid");
|
|
55
|
+
console.log(" ✅ StringRay config present");
|
|
56
|
+
console.log("Dependencies");
|
|
57
|
+
console.log(" ✅ Core dependencies installed");
|
|
58
|
+
console.log("\nSummary: ✅ All checks passed");
|
|
59
|
+
});
|
|
60
|
+
// Run Command - Full orchestrator integration
|
|
61
|
+
program
|
|
62
|
+
.command("run [prompt]")
|
|
63
|
+
.description("Execute StringRay session with agent orchestration")
|
|
64
|
+
.option("--enforce-completion", "keep session active until all tasks complete")
|
|
65
|
+
.option("--max-agents <number>", "maximum concurrent agents", "3")
|
|
66
|
+
.option("--model <model>", "AI model to use", "opencode/grok-code")
|
|
67
|
+
.action(async (prompt, options) => {
|
|
68
|
+
if (!prompt) {
|
|
69
|
+
console.error("Error: prompt is required");
|
|
70
|
+
console.log('Usage: strray run "Your development task description"');
|
|
71
|
+
console.log("Examples:");
|
|
72
|
+
console.log(' strray run "Implement user authentication system"');
|
|
73
|
+
console.log(' strray run "Refactor the payment module" --max-agents 5');
|
|
74
|
+
process.exit(1);
|
|
75
|
+
}
|
|
76
|
+
const startTime = Date.now();
|
|
77
|
+
console.log("🚀 StringRay Session Runner");
|
|
78
|
+
console.log("=======================");
|
|
79
|
+
console.log(`Prompt: "${prompt}"`);
|
|
80
|
+
console.log(`Model: ${options.model}`);
|
|
81
|
+
console.log(`Max Agents: ${options.maxAgents}`);
|
|
82
|
+
console.log("\n🔄 Starting orchestration...");
|
|
83
|
+
try {
|
|
84
|
+
// Import StringRay orchestrator
|
|
85
|
+
const { StringRayOrchestrator } = await import("../orchestrator.js");
|
|
86
|
+
// Initialize orchestrator with session config
|
|
87
|
+
const orchestrator = new StringRayOrchestrator({
|
|
88
|
+
maxConcurrentTasks: parseInt(options.maxAgents),
|
|
89
|
+
});
|
|
90
|
+
console.log("🤖 Initialized orchestrator with session configuration");
|
|
91
|
+
console.log("📝 Analyzing task complexity and spawning agents...");
|
|
92
|
+
// Execute the orchestration using complex task execution
|
|
93
|
+
const result = await orchestrator.executeComplexTask(prompt, [
|
|
94
|
+
{
|
|
95
|
+
id: "main-task",
|
|
96
|
+
description: prompt,
|
|
97
|
+
subagentType: "orchestrator",
|
|
98
|
+
priority: "high",
|
|
99
|
+
},
|
|
100
|
+
]);
|
|
101
|
+
const duration = ((Date.now() - startTime) / 1000).toFixed(2);
|
|
102
|
+
console.log("\n📊 Execution Results:");
|
|
103
|
+
console.log(`Status: ✅ COMPLETED`);
|
|
104
|
+
console.log(`Duration: ${duration} seconds`);
|
|
105
|
+
console.log(`Tasks Completed: ${result.length}`);
|
|
106
|
+
const successCount = result.filter((r) => r.success).length;
|
|
107
|
+
const failureCount = result.length - successCount;
|
|
108
|
+
if (successCount > 0) {
|
|
109
|
+
console.log(`Successful Tasks: ${successCount}`);
|
|
110
|
+
}
|
|
111
|
+
if (failureCount > 0) {
|
|
112
|
+
console.log(`Failed Tasks: ${failureCount}`);
|
|
113
|
+
}
|
|
114
|
+
console.log("\n🎉 Task completed successfully!");
|
|
115
|
+
}
|
|
116
|
+
catch (error) {
|
|
117
|
+
const errorMessage = error instanceof Error ? error.message : String(error);
|
|
118
|
+
console.error(`\n❌ Execution failed: ${errorMessage}`);
|
|
119
|
+
console.log("\n🔍 Troubleshooting:");
|
|
120
|
+
console.log(" • Check that oh-my-opencode is running");
|
|
121
|
+
console.log(" • Verify API keys are configured (strray auth status)");
|
|
122
|
+
console.log(" • Run 'strray doctor' for system diagnostics");
|
|
123
|
+
process.exit(1);
|
|
124
|
+
}
|
|
125
|
+
});
|
|
126
|
+
// Auth Command - Basic implementation
|
|
127
|
+
program
|
|
128
|
+
.command("auth")
|
|
129
|
+
.description("Manage authentication for AI providers")
|
|
130
|
+
.addCommand(new Command("login")
|
|
131
|
+
.description("login to AI provider")
|
|
132
|
+
.option("--provider <name>", "AI provider (claude, openai, gemini)")
|
|
133
|
+
.action(async (options) => {
|
|
134
|
+
console.log("🔐 StringRay Authentication - Login");
|
|
135
|
+
console.log("=================================");
|
|
136
|
+
const provider = options.provider || "claude";
|
|
137
|
+
console.log(`Logging into: ${provider.toUpperCase()}`);
|
|
138
|
+
console.log("\n📝 Authentication Setup:");
|
|
139
|
+
console.log("1. Visit your AI provider's website");
|
|
140
|
+
console.log("2. Generate an API key");
|
|
141
|
+
console.log("3. Set the environment variable:");
|
|
142
|
+
console.log(` export ${getEnvVarName(provider)}=your_api_key_here`);
|
|
143
|
+
console.log("4. Restart StringRay");
|
|
144
|
+
console.log("\n✅ Once configured, your API key will be automatically used.");
|
|
145
|
+
}))
|
|
146
|
+
.addCommand(new Command("status")
|
|
147
|
+
.description("check authentication status")
|
|
148
|
+
.action(async () => {
|
|
149
|
+
console.log("🔐 StringRay Authentication - Status");
|
|
150
|
+
console.log("==================================");
|
|
151
|
+
const providers = ["claude", "openai", "gemini"];
|
|
152
|
+
for (const provider of providers) {
|
|
153
|
+
const envVar = getEnvVarName(provider);
|
|
154
|
+
const hasKey = process.env[envVar]
|
|
155
|
+
? "✅ Configured"
|
|
156
|
+
: "❌ Not configured";
|
|
157
|
+
console.log(`${provider.toUpperCase()}: ${hasKey}`);
|
|
158
|
+
}
|
|
159
|
+
console.log("\n💡 To configure authentication:");
|
|
160
|
+
console.log(" strray auth login --provider <provider>");
|
|
161
|
+
}));
|
|
162
|
+
// Helper function for auth commands
|
|
163
|
+
function getEnvVarName(provider) {
|
|
164
|
+
const envVars = {
|
|
165
|
+
claude: "ANTHROPIC_API_KEY",
|
|
166
|
+
openai: "OPENAI_API_KEY",
|
|
167
|
+
gemini: "GOOGLE_API_KEY",
|
|
168
|
+
};
|
|
169
|
+
return envVars[provider] || `${provider.toUpperCase()}_API_KEY`;
|
|
170
|
+
}
|
|
171
|
+
// Error handling
|
|
172
|
+
program.on("command:*", (unknownCommand) => {
|
|
173
|
+
console.error(`Unknown command: ${unknownCommand[0]}`);
|
|
174
|
+
console.log("Run 'strray --help' to see available commands");
|
|
175
|
+
process.exit(1);
|
|
176
|
+
});
|
|
177
|
+
// Parse arguments
|
|
178
|
+
program.parse();
|
|
179
|
+
//# sourceMappingURL=index.js.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "stringray-ai",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.2",
|
|
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",
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
"plugin": "./dist/plugin/plugins/stringray-codex-injection.js"
|
|
10
10
|
},
|
|
11
11
|
"bin": {
|
|
12
|
-
"stringray": "
|
|
12
|
+
"stringray": "dist/cli/index.js",
|
|
13
13
|
"stringray-test": "scripts/test-stringray-plugin.mjs"
|
|
14
14
|
},
|
|
15
15
|
"scripts": {
|