clustr-ai 0.1.8
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/LICENSE +21 -0
- package/README.md +42 -0
- package/bin/clustr.js +106 -0
- package/dist/client/assets/index-B5DBV_7j.js +109 -0
- package/dist/client/assets/index-Y3n54xBs.css +32 -0
- package/dist/client/favicon.svg +12 -0
- package/dist/client/index.html +14 -0
- package/dist/server/index.js +483 -0
- package/dist/server/mcp-stdio-bridge.js +43 -0
- package/package.json +45 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 dash2199
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
# Clustr
|
|
2
|
+
|
|
3
|
+
<!-- dummy line for testing file change detection -->
|
|
4
|
+
|
|
5
|
+
Run multiple AI coding agents at once and watch them work together from a single dashboard.
|
|
6
|
+
|
|
7
|
+
Clustr lets you create a team of AI agents, assign them tasks, and let them collaborate — all from your browser. Each agent works independently but can talk to the others, share notes, and coordinate automatically.
|
|
8
|
+
|
|
9
|
+
## Quick Start
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
npx clustr-ai
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
Open [http://localhost:3100](http://localhost:3100) in your browser.
|
|
16
|
+
|
|
17
|
+
## Prerequisites
|
|
18
|
+
|
|
19
|
+
- **Node.js 18+**
|
|
20
|
+
- **Claude Code CLI** — `npm install -g @anthropic-ai/claude-code`
|
|
21
|
+
|
|
22
|
+
## Environment Variables
|
|
23
|
+
|
|
24
|
+
| Variable | Default | Description |
|
|
25
|
+
|---|---|---|
|
|
26
|
+
| `CLUSTR_PORT` | `3100` | Server port |
|
|
27
|
+
| `CLUSTR_MAX_AGENTS` | `5` | Max concurrent agents |
|
|
28
|
+
|
|
29
|
+
## How It Works
|
|
30
|
+
|
|
31
|
+
1. Create AI agents from the dashboard — give each one a name and a task
|
|
32
|
+
2. Agents talk to each other automatically — sharing updates, asking questions, and coordinating work
|
|
33
|
+
3. A shared notepad lets all agents stay on the same page
|
|
34
|
+
4. Watch everything happen live — see your agents, their conversations, and progress in real time
|
|
35
|
+
|
|
36
|
+
## Documentation
|
|
37
|
+
|
|
38
|
+
See the full docs at [hiclustrmvp.vercel.app/docs](https://hiclustrmvp.vercel.app/docs).
|
|
39
|
+
|
|
40
|
+
## License
|
|
41
|
+
|
|
42
|
+
MIT
|
package/bin/clustr.js
ADDED
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
import { spawn } from 'child_process';
|
|
4
|
+
import { fileURLToPath } from 'url';
|
|
5
|
+
import path from 'path';
|
|
6
|
+
import fs from 'fs';
|
|
7
|
+
|
|
8
|
+
import { execFileSync } from 'child_process';
|
|
9
|
+
|
|
10
|
+
const __dirname = path.dirname(fileURLToPath(import.meta.url));
|
|
11
|
+
const root = path.resolve(__dirname, '..');
|
|
12
|
+
|
|
13
|
+
const pkg = JSON.parse(fs.readFileSync(path.join(root, 'package.json'), 'utf-8'));
|
|
14
|
+
|
|
15
|
+
// --- Pre-flight checks ---
|
|
16
|
+
const nodeVersion = parseInt(process.versions.node, 10);
|
|
17
|
+
if (nodeVersion < 18) {
|
|
18
|
+
console.error(`\n Clustr requires Node.js 18 or later. You have ${process.versions.node}.\n`);
|
|
19
|
+
process.exit(1);
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
function commandExists(cmd) {
|
|
23
|
+
try {
|
|
24
|
+
const which = process.platform === 'win32' ? 'where' : 'which';
|
|
25
|
+
execFileSync(which, [cmd], { stdio: 'ignore' });
|
|
26
|
+
return true;
|
|
27
|
+
} catch {
|
|
28
|
+
return false;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
if (!commandExists('claude')) {
|
|
33
|
+
console.warn('\n \u26A0 Claude CLI not found. Install it to spawn agents:');
|
|
34
|
+
console.warn(' npm install -g @anthropic-ai/claude-code\n');
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
const args = process.argv.slice(2);
|
|
38
|
+
|
|
39
|
+
if (args.includes('--version') || args.includes('-v')) {
|
|
40
|
+
console.log(pkg.version);
|
|
41
|
+
process.exit(0);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
if (args.includes('--help') || args.includes('-h')) {
|
|
45
|
+
console.log(`
|
|
46
|
+
Clustr v${pkg.version} — ${pkg.description}
|
|
47
|
+
|
|
48
|
+
Usage:
|
|
49
|
+
npx clustr-ai Start the Clustr workspace
|
|
50
|
+
clustr-ai --help Show this help message
|
|
51
|
+
clustr-ai --version Show version number
|
|
52
|
+
|
|
53
|
+
Environment variables:
|
|
54
|
+
CLUSTR_PORT Server port (default: 3100)
|
|
55
|
+
CLUSTR_MAX_AGENTS Max concurrent agents (default: 5)
|
|
56
|
+
|
|
57
|
+
Once running, open http://localhost:3100 in your browser.
|
|
58
|
+
`);
|
|
59
|
+
process.exit(0);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
const bridgePath = path.join(root, 'dist', 'server', 'mcp-stdio-bridge.js');
|
|
63
|
+
if (!fs.existsSync(bridgePath)) {
|
|
64
|
+
console.log('Building server...');
|
|
65
|
+
const build = spawn('npm', ['run', 'build:server'], { cwd: root, stdio: 'inherit' });
|
|
66
|
+
build.on('exit', (code) => {
|
|
67
|
+
if (code !== 0) {
|
|
68
|
+
console.error('Server build failed');
|
|
69
|
+
process.exit(1);
|
|
70
|
+
}
|
|
71
|
+
start();
|
|
72
|
+
});
|
|
73
|
+
} else {
|
|
74
|
+
start();
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
function start() {
|
|
78
|
+
const clientDir = path.join(root, 'dist', 'client');
|
|
79
|
+
const hasClient = fs.existsSync(path.join(clientDir, 'index.html'));
|
|
80
|
+
|
|
81
|
+
const port = process.env.CLUSTR_PORT || '3100';
|
|
82
|
+
|
|
83
|
+
const server = spawn('node', [path.join(root, 'dist', 'server', 'index.js')], {
|
|
84
|
+
cwd: root,
|
|
85
|
+
stdio: 'inherit',
|
|
86
|
+
env: {
|
|
87
|
+
...process.env,
|
|
88
|
+
CLUSTR_PORT: port,
|
|
89
|
+
CLUSTR_SERVE_CLIENT: hasClient ? clientDir : '',
|
|
90
|
+
},
|
|
91
|
+
});
|
|
92
|
+
|
|
93
|
+
console.log(`\n Clustr is starting on http://localhost:${port}\n`);
|
|
94
|
+
|
|
95
|
+
if (!hasClient) {
|
|
96
|
+
console.log(' (Client not built — run "npm run build:client" for the full UI)');
|
|
97
|
+
console.log(' API is still available at /api/*\n');
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
process.on('SIGINT', () => { server.kill('SIGINT'); process.exit(); });
|
|
101
|
+
process.on('SIGTERM', () => { server.kill('SIGTERM'); process.exit(); });
|
|
102
|
+
|
|
103
|
+
server.on('exit', (code) => {
|
|
104
|
+
process.exit(code ?? 0);
|
|
105
|
+
});
|
|
106
|
+
}
|