claude-flow 2.0.0-alpha.99 → 2.0.0
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/.claude/agents/MIGRATION_SUMMARY.md +7 -0
- package/.claude/agents/README.md +7 -0
- package/.claude/agents/consensus/README.md +7 -0
- package/.claude/agents/flow-nexus/app-store.md +88 -0
- package/.claude/agents/flow-nexus/authentication.md +69 -0
- package/.claude/agents/flow-nexus/challenges.md +81 -0
- package/.claude/agents/flow-nexus/neural-network.md +88 -0
- package/.claude/agents/flow-nexus/payments.md +83 -0
- package/.claude/agents/flow-nexus/sandbox.md +76 -0
- package/.claude/agents/flow-nexus/swarm.md +76 -0
- package/.claude/agents/flow-nexus/user-tools.md +96 -0
- package/.claude/agents/flow-nexus/workflow.md +84 -0
- package/.claude/agents/optimization/README.md +7 -0
- package/.claude/agents/optimization/benchmark-suite.md +7 -0
- package/.claude/agents/optimization/load-balancer.md +7 -0
- package/.claude/agents/optimization/performance-monitor.md +7 -0
- package/.claude/agents/optimization/resource-allocator.md +7 -0
- package/.claude/agents/optimization/topology-optimizer.md +7 -0
- package/.claude/agents/swarm/README.md +7 -0
- package/.claude/checkpoints/1756227652.json +1 -0
- package/.claude/checkpoints/1756227653.json +1 -0
- package/.claude/checkpoints/1756227666.json +1 -0
- package/.claude/checkpoints/1756227668.json +1 -0
- package/.claude/checkpoints/1756227723.json +1 -0
- package/.claude/checkpoints/1756227725.json +1 -0
- package/.claude/checkpoints/1756227731.json +1 -0
- package/.claude/checkpoints/1756227733.json +1 -0
- package/.claude/checkpoints/1756231330.json +1 -0
- package/.claude/checkpoints/1756231331.json +1 -0
- package/.claude/checkpoints/1756231342.json +1 -0
- package/.claude/checkpoints/1756231344.json +1 -0
- package/.claude/checkpoints/1756231355.json +1 -0
- package/.claude/checkpoints/1756231357.json +1 -0
- package/.claude/checkpoints/1756231367.json +1 -0
- package/.claude/checkpoints/1756231368.json +1 -0
- package/.claude/checkpoints/1756231458.json +1 -0
- package/.claude/checkpoints/1756231459.json +1 -0
- package/.claude/checkpoints/1756231477.json +1 -0
- package/.claude/checkpoints/1756231479.json +1 -0
- package/.claude/checkpoints/1756233026.json +1 -0
- package/.claude/checkpoints/1756233028.json +1 -0
- package/.claude/checkpoints/1756233040.json +1 -0
- package/.claude/checkpoints/1756233041.json +1 -0
- package/.claude/checkpoints/1756233057.json +1 -0
- package/.claude/checkpoints/1756233059.json +1 -0
- package/.claude/checkpoints/1756233090.json +1 -0
- package/.claude/checkpoints/1756233092.json +1 -0
- package/.claude/checkpoints/1756233141.json +1 -0
- package/.claude/checkpoints/1756233143.json +1 -0
- package/.claude/checkpoints/1756475935.json +1 -0
- package/.claude/checkpoints/1756475936.json +1 -0
- package/.claude/checkpoints/1756475996.json +1 -0
- package/.claude/checkpoints/1756475998.json +1 -0
- package/.claude/checkpoints/1756476093.json +1 -0
- package/.claude/checkpoints/1756476098.json +1 -0
- package/.claude/checkpoints/1756476100.json +1 -0
- package/.claude/checkpoints/1756476101.json +1 -0
- package/.claude/checkpoints/1756476161.json +1 -0
- package/.claude/checkpoints/1756476163.json +1 -0
- package/.claude/checkpoints/1756476183.json +1 -0
- package/.claude/checkpoints/1756476184.json +1 -0
- package/.claude/checkpoints/1756476193.json +1 -0
- package/.claude/checkpoints/1756476194.json +1 -0
- package/.claude/checkpoints/1756476202.json +1 -0
- package/.claude/checkpoints/1756476204.json +1 -0
- package/.claude/checkpoints/1756476268.json +1 -0
- package/.claude/checkpoints/1756476269.json +1 -0
- package/.claude/checkpoints/1756476287.json +1 -0
- package/.claude/checkpoints/1756476288.json +1 -0
- package/.claude/checkpoints/1756997935.json +1 -0
- package/.claude/checkpoints/1756997937.json +1 -0
- package/.claude/checkpoints/1756997938.json +1 -0
- package/.claude/checkpoints/1756997940.json +1 -0
- package/.claude/checkpoints/1756997942.json +1 -0
- package/.claude/checkpoints/1756997944.json +1 -0
- package/.claude/checkpoints/1756997945.json +1 -0
- package/.claude/checkpoints/1756997947.json +1 -0
- package/.claude/checkpoints/1756997949.json +1 -0
- package/.claude/checkpoints/1756997951.json +1 -0
- package/.claude/checkpoints/1756997953.json +1 -0
- package/.claude/checkpoints/1756997955.json +1 -0
- package/.claude/checkpoints/1756997956.json +1 -0
- package/.claude/checkpoints/1756997958.json +1 -0
- package/.claude/checkpoints/1756997960.json +1 -0
- package/.claude/checkpoints/1756997962.json +1 -0
- package/.claude/checkpoints/1756997964.json +1 -0
- package/.claude/checkpoints/1756997966.json +1 -0
- package/.claude/checkpoints/1756997968.json +1 -0
- package/.claude/checkpoints/1756997970.json +1 -0
- package/.claude/checkpoints/1757190213.json +1 -0
- package/.claude/checkpoints/1757190215.json +1 -0
- package/.claude/checkpoints/1757190217.json +1 -0
- package/.claude/checkpoints/1757190219.json +1 -0
- package/.claude/checkpoints/1757190220.json +1 -0
- package/.claude/checkpoints/1757190222.json +1 -0
- package/.claude/checkpoints/1757190224.json +1 -0
- package/.claude/checkpoints/1757190225.json +1 -0
- package/.claude/checkpoints/1757190227.json +1 -0
- package/.claude/checkpoints/1757190229.json +1 -0
- package/.claude/checkpoints/1757190231.json +1 -0
- package/.claude/checkpoints/1757190232.json +1 -0
- package/.claude/checkpoints/1757190234.json +1 -0
- package/.claude/checkpoints/1757190236.json +1 -0
- package/.claude/checkpoints/1757190238.json +1 -0
- package/.claude/checkpoints/1757190240.json +1 -0
- package/.claude/checkpoints/1757190241.json +1 -0
- package/.claude/checkpoints/1757190243.json +1 -0
- package/.claude/checkpoints/1757190245.json +1 -0
- package/.claude/checkpoints/1757190247.json +1 -0
- package/.claude/checkpoints/1757190608.json +1 -0
- package/.claude/checkpoints/1757190610.json +1 -0
- package/.claude/checkpoints/1757190626.json +1 -0
- package/.claude/checkpoints/1757190628.json +1 -0
- package/.claude/checkpoints/1757190993.json +1 -0
- package/.claude/checkpoints/1757190997.json +1 -0
- package/.claude/checkpoints/1757191001.json +1 -0
- package/.claude/checkpoints/1757191004.json +1 -0
- package/.claude/checkpoints/1757191007.json +1 -0
- package/.claude/checkpoints/1757191009.json +1 -0
- package/.claude/checkpoints/1757191012.json +1 -0
- package/.claude/checkpoints/1757191014.json +1 -0
- package/.claude/checkpoints/1757191016.json +1 -0
- package/.claude/checkpoints/1757191019.json +1 -0
- package/.claude/checkpoints/1757191022.json +1 -0
- package/.claude/checkpoints/1757191024.json +1 -0
- package/.claude/checkpoints/1757191027.json +1 -0
- package/.claude/checkpoints/1757191029.json +1 -0
- package/.claude/checkpoints/1757191032.json +1 -0
- package/.claude/checkpoints/1757191034.json +1 -0
- package/.claude/checkpoints/1757191037.json +1 -0
- package/.claude/checkpoints/1757191040.json +1 -0
- package/.claude/checkpoints/1757191061.json +1 -0
- package/.claude/checkpoints/1757191063.json +1 -0
- package/.claude/checkpoints/1757191084.json +1 -0
- package/.claude/checkpoints/1757191086.json +1 -0
- package/.claude/checkpoints/1757192316.json +1 -0
- package/.claude/checkpoints/1757192318.json +1 -0
- package/.claude/checkpoints/1757192389.json +1 -0
- package/.claude/checkpoints/1757192391.json +1 -0
- package/.claude/checkpoints/1757192489.json +1 -0
- package/.claude/checkpoints/1757192491.json +1 -0
- package/.claude/checkpoints/1757192521.json +1 -0
- package/.claude/checkpoints/1757192523.json +1 -0
- package/.claude/checkpoints/1757192541.json +1 -0
- package/.claude/checkpoints/1757192543.json +1 -0
- package/.claude/checkpoints/1757193796.json +1 -0
- package/.claude/checkpoints/summary-session-20250826-165852.md +1351 -0
- package/.claude/checkpoints/summary-session-20250826-170402.md +1367 -0
- package/.claude/checkpoints/summary-session-20250826-175112.md +1327 -0
- package/.claude/checkpoints/summary-session-20250826-175609.md +1324 -0
- package/.claude/checkpoints/summary-session-20250826-175743.md +1327 -0
- package/.claude/checkpoints/summary-session-20250826-180554.md +1340 -0
- package/.claude/checkpoints/summary-session-20250826-181530.md +1344 -0
- package/.claude/checkpoints/summary-session-20250826-181633.md +1347 -0
- package/.claude/checkpoints/summary-session-20250826-182235.md +1350 -0
- package/.claude/checkpoints/summary-session-20250826-182618.md +1353 -0
- package/.claude/checkpoints/summary-session-20250826-183200.md +1372 -0
- package/.claude/checkpoints/summary-session-20250826-183232.md +1379 -0
- package/.claude/checkpoints/summary-session-20250829-133605.md +38 -0
- package/.claude/checkpoints/summary-session-20250829-134121.md +41 -0
- package/.claude/checkpoints/summary-session-20250829-134400.md +46 -0
- package/.claude/checkpoints/summary-session-20250829-134858.md +49 -0
- package/.claude/checkpoints/summary-session-20250829-135402.md +52 -0
- package/.claude/checkpoints/summary-session-20250829-135640.md +58 -0
- package/.claude/checkpoints/summary-session-20250829-135754.md +65 -0
- package/.claude/checkpoints/summary-session-20250829-135902.md +71 -0
- package/.claude/checkpoints/summary-session-20250829-140629.md +119 -0
- package/.claude/checkpoints/summary-session-20250829-140733.md +121 -0
- package/.claude/checkpoints/summary-session-20250902-190126.md +38 -0
- package/.claude/checkpoints/summary-session-20250904-150003.md +87 -0
- package/.claude/checkpoints/summary-session-20250906-202218.md +2757 -0
- package/.claude/checkpoints/summary-session-20250906-202622.md +2814 -0
- package/.claude/checkpoints/summary-session-20250906-203037.md +2826 -0
- package/.claude/checkpoints/task-1756227619.json +1 -0
- package/.claude/checkpoints/task-1756230633.json +1 -0
- package/.claude/checkpoints/task-1756230902.json +1 -0
- package/.claude/checkpoints/task-1756230993.json +1 -0
- package/.claude/checkpoints/task-1756231253.json +1 -0
- package/.claude/checkpoints/task-1756232070.json +1 -0
- package/.claude/checkpoints/task-1756232144.json +1 -0
- package/.claude/checkpoints/task-1756232251.json +1 -0
- package/.claude/checkpoints/task-1756232564.json +1 -0
- package/.claude/checkpoints/task-1756232982.json +1 -0
- package/.claude/checkpoints/task-1756233131.json +1 -0
- package/.claude/checkpoints/task-1756474562.json +1 -0
- package/.claude/checkpoints/task-1756474754.json +1 -0
- package/.claude/checkpoints/task-1756474922.json +1 -0
- package/.claude/checkpoints/task-1756475028.json +1 -0
- package/.claude/checkpoints/task-1756475307.json +1 -0
- package/.claude/checkpoints/task-1756475349.json +1 -0
- package/.claude/checkpoints/task-1756475699.json +1 -0
- package/.claude/checkpoints/task-1756475719.json +1 -0
- package/.claude/checkpoints/task-1756475828.json +1 -0
- package/.claude/checkpoints/task-1756475858.json +1 -0
- package/.claude/checkpoints/task-1756475868.json +1 -0
- package/.claude/checkpoints/task-1756476373.json +1 -0
- package/.claude/checkpoints/task-1756839595.json +1 -0
- package/.claude/checkpoints/task-1756997821.json +1 -0
- package/.claude/checkpoints/task-1757189936.json +1 -0
- package/.claude/checkpoints/task-1757190154.json +1 -0
- package/.claude/checkpoints/task-1757190301.json +1 -0
- package/.claude/checkpoints/task-1757190369.json +1 -0
- package/.claude/checkpoints/task-1757190483.json +1 -0
- package/.claude/checkpoints/task-1757190841.json +1 -0
- package/.claude/checkpoints/task-1757191219.json +1 -0
- package/.claude/checkpoints/task-1757192639.json +1 -0
- package/.claude/checkpoints/task-1757194091.json +1 -0
- package/.claude/commands/flow-nexus/app-store.md +124 -0
- package/.claude/commands/flow-nexus/challenges.md +120 -0
- package/.claude/commands/flow-nexus/login-registration.md +65 -0
- package/.claude/commands/flow-nexus/neural-network.md +134 -0
- package/.claude/commands/flow-nexus/payments.md +116 -0
- package/.claude/commands/flow-nexus/sandbox.md +83 -0
- package/.claude/commands/flow-nexus/swarm.md +87 -0
- package/.claude/commands/flow-nexus/user-tools.md +152 -0
- package/.claude/commands/flow-nexus/workflow.md +115 -0
- package/bin/claude-flow +1 -1
- package/package.json +1 -1
- package/src/api/auth-service.ts +644 -0
- package/src/api/database-schema.sql +366 -0
- package/src/api/database-service.ts +788 -0
- package/src/api/swarm-api.ts +741 -0
- package/src/cli/commands/index.ts +711 -1
- package/src/cli/simple-commands/hive-mind/session-manager.js +12 -0
- package/src/cli/simple-commands/init/agent-copier.js +129 -1
- package/src/cli/simple-commands/init/index.js +116 -1
- package/src/cli/simple-commands/init/templates/claude-md.js +295 -1
- package/src/core/version.js +1 -1
- package/src/ui/console/index.html +4 -0
- package/src/ui/console/js/real-time-dashboard.js +715 -0
- package/src/ui/console/js/swarm-integration.js +485 -0
- package/src/ui/console/js/swarm-visualizer.js +879 -0
- package/src/ui/console/styles/swarm-visualizer.css +487 -0
- package/src/cli/simple-commands/init/.claude-flow/metrics/agent-metrics.json +0 -1
- package/src/cli/simple-commands/init/.claude-flow/metrics/performance.json +0 -9
- package/src/cli/simple-commands/init/.claude-flow/metrics/task-metrics.json +0 -10
- package/src/cli/simple-commands/init/.swarm/memory.db +0 -0
|
@@ -983,6 +983,12 @@ To enable persistence, see: https://github.com/ruvnet/claude-code-flow/docs/wind
|
|
|
983
983
|
return true;
|
|
984
984
|
}
|
|
985
985
|
|
|
986
|
+
// Check if database connection is still open before operations
|
|
987
|
+
if (!this.db || !this.db.open) {
|
|
988
|
+
console.warn('Database connection closed, cannot remove child PID during cleanup');
|
|
989
|
+
return false;
|
|
990
|
+
}
|
|
991
|
+
|
|
986
992
|
const session = this.db.prepare('SELECT child_pids FROM sessions WHERE id = ?').get(sessionId);
|
|
987
993
|
if (!session) return false;
|
|
988
994
|
|
|
@@ -1016,6 +1022,12 @@ To enable persistence, see: https://github.com/ruvnet/claude-code-flow/docs/wind
|
|
|
1016
1022
|
if (!session || !session.child_pids) return [];
|
|
1017
1023
|
return sessionSerializer.deserializeLogData(session.child_pids);
|
|
1018
1024
|
} else {
|
|
1025
|
+
// Check if database connection is still open
|
|
1026
|
+
if (!this.db || !this.db.open) {
|
|
1027
|
+
console.warn('Database connection closed, cannot get child PIDs during cleanup');
|
|
1028
|
+
return [];
|
|
1029
|
+
}
|
|
1030
|
+
|
|
1019
1031
|
// Use SQLite
|
|
1020
1032
|
const session = this.db.prepare('SELECT child_pids FROM sessions WHERE id = ?').get(sessionId);
|
|
1021
1033
|
if (!session || !session.child_pids) return [];
|
|
@@ -162,7 +162,10 @@ export async function createAgentDirectories(targetDir, dryRun = false) {
|
|
|
162
162
|
'.claude/agents/documentation',
|
|
163
163
|
'.claude/agents/documentation/api-docs',
|
|
164
164
|
'.claude/agents/specialized',
|
|
165
|
-
'.claude/agents/specialized/mobile'
|
|
165
|
+
'.claude/agents/specialized/mobile',
|
|
166
|
+
'.claude/agents/flow-nexus',
|
|
167
|
+
'.claude/commands',
|
|
168
|
+
'.claude/commands/flow-nexus'
|
|
166
169
|
];
|
|
167
170
|
|
|
168
171
|
if (dryRun) {
|
|
@@ -180,6 +183,131 @@ export async function createAgentDirectories(targetDir, dryRun = false) {
|
|
|
180
183
|
/**
|
|
181
184
|
* Validate agent system after copying
|
|
182
185
|
*/
|
|
186
|
+
/**
|
|
187
|
+
* Copy all command files from the installed package to project directory
|
|
188
|
+
*/
|
|
189
|
+
export async function copyCommandFiles(targetDir, options = {}) {
|
|
190
|
+
const { force = false, dryRun = false } = options;
|
|
191
|
+
|
|
192
|
+
// Path to command files - try multiple locations
|
|
193
|
+
const packageCommandsDir = join(__dirname, '../../../../.claude/commands'); // From npm package
|
|
194
|
+
const localCommandsDir = '/workspaces/claude-code-flow/.claude/commands'; // Local development
|
|
195
|
+
const cwdCommandsDir = join(process.cwd(), '.claude/commands'); // Current working directory
|
|
196
|
+
|
|
197
|
+
let sourceCommandsDir;
|
|
198
|
+
|
|
199
|
+
// Try local development first, then package, then cwd
|
|
200
|
+
try {
|
|
201
|
+
await fs.access(localCommandsDir);
|
|
202
|
+
sourceCommandsDir = localCommandsDir;
|
|
203
|
+
console.log(' 📁 Using local development command files');
|
|
204
|
+
} catch {
|
|
205
|
+
try {
|
|
206
|
+
await fs.access(packageCommandsDir);
|
|
207
|
+
sourceCommandsDir = packageCommandsDir;
|
|
208
|
+
console.log(' 📁 Using packaged command files');
|
|
209
|
+
} catch {
|
|
210
|
+
try {
|
|
211
|
+
await fs.access(cwdCommandsDir);
|
|
212
|
+
sourceCommandsDir = cwdCommandsDir;
|
|
213
|
+
console.log(' 📁 Using current directory command files');
|
|
214
|
+
} catch {
|
|
215
|
+
console.log(' ⚠️ No command files found in any location');
|
|
216
|
+
return { success: false, error: 'Command files not found' };
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
const targetCommandsDir = join(targetDir, '.claude/commands');
|
|
222
|
+
|
|
223
|
+
console.log('📁 Copying command system files...');
|
|
224
|
+
console.log(` 📂 Source: ${sourceCommandsDir}`);
|
|
225
|
+
console.log(` 📂 Target: ${targetCommandsDir}`);
|
|
226
|
+
|
|
227
|
+
try {
|
|
228
|
+
// Create target directory
|
|
229
|
+
if (!dryRun) {
|
|
230
|
+
await fs.mkdir(targetCommandsDir, { recursive: true });
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
const copiedFiles = [];
|
|
234
|
+
const errors = [];
|
|
235
|
+
|
|
236
|
+
// Recursively copy all command files
|
|
237
|
+
async function copyRecursive(srcDir, destDir) {
|
|
238
|
+
const items = await fs.readdir(srcDir, { withFileTypes: true });
|
|
239
|
+
|
|
240
|
+
for (const item of items) {
|
|
241
|
+
const srcPath = join(srcDir, item.name);
|
|
242
|
+
const destPath = join(destDir, item.name);
|
|
243
|
+
|
|
244
|
+
if (item.isDirectory()) {
|
|
245
|
+
if (!dryRun) {
|
|
246
|
+
await fs.mkdir(destPath, { recursive: true });
|
|
247
|
+
}
|
|
248
|
+
await copyRecursive(srcPath, destPath);
|
|
249
|
+
} else if (item.isFile() && item.name.endsWith('.md')) {
|
|
250
|
+
try {
|
|
251
|
+
// Check if file already exists
|
|
252
|
+
let shouldCopy = force;
|
|
253
|
+
if (!force) {
|
|
254
|
+
try {
|
|
255
|
+
await fs.access(destPath);
|
|
256
|
+
// File exists, skip unless force is true
|
|
257
|
+
continue;
|
|
258
|
+
} catch {
|
|
259
|
+
// File doesn't exist, safe to copy
|
|
260
|
+
shouldCopy = true;
|
|
261
|
+
}
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
if (shouldCopy && !dryRun) {
|
|
265
|
+
const content = await fs.readFile(srcPath, 'utf8');
|
|
266
|
+
await fs.writeFile(destPath, content, 'utf8');
|
|
267
|
+
copiedFiles.push(destPath.replace(targetDir + '/', ''));
|
|
268
|
+
} else if (dryRun) {
|
|
269
|
+
copiedFiles.push(destPath.replace(targetDir + '/', ''));
|
|
270
|
+
}
|
|
271
|
+
} catch (err) {
|
|
272
|
+
errors.push(`Failed to copy ${item.name}: ${err.message}`);
|
|
273
|
+
}
|
|
274
|
+
}
|
|
275
|
+
}
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
await copyRecursive(sourceCommandsDir, targetCommandsDir);
|
|
279
|
+
|
|
280
|
+
if (!dryRun && copiedFiles.length > 0) {
|
|
281
|
+
console.log(` ✅ Copied ${copiedFiles.length} command files`);
|
|
282
|
+
console.log(' 📋 Command system initialized with comprehensive documentation');
|
|
283
|
+
console.log(' 🎯 Available categories: Analysis, Automation, GitHub, Hooks, Memory, Flow Nexus');
|
|
284
|
+
} else if (dryRun) {
|
|
285
|
+
console.log(` [DRY RUN] Would copy ${copiedFiles.length} command files`);
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
if (errors.length > 0) {
|
|
289
|
+
console.log(' ⚠️ Some command files could not be copied:');
|
|
290
|
+
errors.forEach(error => console.log(` - ${error}`));
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
return {
|
|
294
|
+
success: true,
|
|
295
|
+
copiedFiles,
|
|
296
|
+
errors,
|
|
297
|
+
totalCommands: copiedFiles.length
|
|
298
|
+
};
|
|
299
|
+
|
|
300
|
+
} catch (err) {
|
|
301
|
+
console.log(` ❌ Failed to copy command files: ${err.message}`);
|
|
302
|
+
return {
|
|
303
|
+
success: false,
|
|
304
|
+
error: err.message,
|
|
305
|
+
copiedFiles: [],
|
|
306
|
+
errors: [err.message]
|
|
307
|
+
};
|
|
308
|
+
}
|
|
309
|
+
}
|
|
310
|
+
|
|
183
311
|
export async function validateAgentSystem(targetDir) {
|
|
184
312
|
const agentsDir = join(targetDir, '.claude/agents');
|
|
185
313
|
|
|
@@ -41,7 +41,7 @@ import { createOptimizedClaudeSlashCommands } from './claude-commands/optimized-
|
|
|
41
41
|
import { promises as fs } from 'fs';
|
|
42
42
|
import { copyTemplates } from './template-copier.js';
|
|
43
43
|
import { copyRevisedTemplates, validateTemplatesExist } from './copy-revised-templates.js';
|
|
44
|
-
import { copyAgentFiles, createAgentDirectories, validateAgentSystem } from './agent-copier.js';
|
|
44
|
+
import { copyAgentFiles, createAgentDirectories, validateAgentSystem, copyCommandFiles } from './agent-copier.js';
|
|
45
45
|
import { showInitHelp } from './help.js';
|
|
46
46
|
import { batchInitCommand, batchInitFromConfig, validateBatchOptions } from './batch-init.js';
|
|
47
47
|
import { ValidationSystem, runFullValidation } from './validation/index.js';
|
|
@@ -110,6 +110,11 @@ async function setupMcpServers(dryRun = false) {
|
|
|
110
110
|
command: 'npx ruv-swarm mcp start',
|
|
111
111
|
description: 'ruv-swarm MCP server for enhanced coordination',
|
|
112
112
|
},
|
|
113
|
+
{
|
|
114
|
+
name: 'flow-nexus',
|
|
115
|
+
command: 'npx flow-nexus@latest mcp start',
|
|
116
|
+
description: 'Flow Nexus Complete MCP server for advanced AI orchestration',
|
|
117
|
+
},
|
|
113
118
|
];
|
|
114
119
|
|
|
115
120
|
for (const server of servers) {
|
|
@@ -150,6 +155,11 @@ export async function initCommand(subArgs, flags) {
|
|
|
150
155
|
const hasVerificationFlags = subArgs.includes('--verify') || subArgs.includes('--pair') ||
|
|
151
156
|
flags.verify || flags.pair;
|
|
152
157
|
|
|
158
|
+
// Handle Flow Nexus minimal init
|
|
159
|
+
if (flags['flow-nexus']) {
|
|
160
|
+
return await flowNexusMinimalInit(flags, subArgs);
|
|
161
|
+
}
|
|
162
|
+
|
|
153
163
|
// Default to enhanced Claude Flow v2 init unless other modes are specified
|
|
154
164
|
// Use --basic flag for old behavior, or verification flags for verification mode
|
|
155
165
|
if (!flags.basic && !flags.minimal && !flags.sparc && !hasVerificationFlags) {
|
|
@@ -529,6 +539,7 @@ export async function initCommand(subArgs, flags) {
|
|
|
529
539
|
console.log(' 📋 Then add MCP servers manually with:');
|
|
530
540
|
console.log(' claude mcp add claude-flow claude-flow mcp start');
|
|
531
541
|
console.log(' claude mcp add ruv-swarm npx ruv-swarm mcp start');
|
|
542
|
+
console.log(' claude mcp add flow-nexus npx flow-nexus@latest mcp start');
|
|
532
543
|
}
|
|
533
544
|
}
|
|
534
545
|
} catch (err) {
|
|
@@ -1437,6 +1448,7 @@ ${commands.map((cmd) => `- [${cmd}](./${cmd}.md)`).join('\n')}
|
|
|
1437
1448
|
console.log('\n 📋 To add MCP servers manually:');
|
|
1438
1449
|
console.log(' claude mcp add claude-flow npx claude-flow@alpha mcp start');
|
|
1439
1450
|
console.log(' claude mcp add ruv-swarm npx ruv-swarm@latest mcp start');
|
|
1451
|
+
console.log(' claude mcp add flow-nexus npx flow-nexus@latest mcp start');
|
|
1440
1452
|
console.log('\n 💡 MCP servers are defined in .mcp.json (project scope)');
|
|
1441
1453
|
}
|
|
1442
1454
|
} else if (!dryRun && !isClaudeCodeInstalled()) {
|
|
@@ -1446,6 +1458,7 @@ ${commands.map((cmd) => `- [${cmd}](./${cmd}.md)`).join('\n')}
|
|
|
1446
1458
|
console.log('\n 📋 After installing, add MCP servers:');
|
|
1447
1459
|
console.log(' claude mcp add claude-flow npx claude-flow@alpha mcp start');
|
|
1448
1460
|
console.log(' claude mcp add ruv-swarm npx ruv-swarm@latest mcp start');
|
|
1461
|
+
console.log(' claude mcp add flow-nexus npx flow-nexus@latest mcp start');
|
|
1449
1462
|
console.log('\n 💡 MCP servers are defined in .mcp.json (project scope)');
|
|
1450
1463
|
}
|
|
1451
1464
|
|
|
@@ -1460,6 +1473,20 @@ ${commands.map((cmd) => `- [${cmd}](./${cmd}.md)`).join('\n')}
|
|
|
1460
1473
|
|
|
1461
1474
|
if (agentResult.success) {
|
|
1462
1475
|
await validateAgentSystem(workingDir);
|
|
1476
|
+
|
|
1477
|
+
// Copy command files including Flow Nexus commands
|
|
1478
|
+
console.log('\n📚 Setting up command system...');
|
|
1479
|
+
const commandResult = await copyCommandFiles(workingDir, {
|
|
1480
|
+
force: force,
|
|
1481
|
+
dryRun: dryRun
|
|
1482
|
+
});
|
|
1483
|
+
|
|
1484
|
+
if (commandResult.success) {
|
|
1485
|
+
console.log('✅ ✓ Command system setup complete with Flow Nexus integration');
|
|
1486
|
+
} else {
|
|
1487
|
+
console.log('⚠️ Command system setup failed:', commandResult.error);
|
|
1488
|
+
}
|
|
1489
|
+
|
|
1463
1490
|
console.log('✅ ✓ Agent system setup complete with 64 specialized agents');
|
|
1464
1491
|
} else {
|
|
1465
1492
|
console.log('⚠️ Agent system setup failed:', agentResult.error);
|
|
@@ -1531,3 +1558,91 @@ ${commands.map((cmd) => `- [${cmd}](./${cmd}.md)`).join('\n')}
|
|
|
1531
1558
|
}
|
|
1532
1559
|
}
|
|
1533
1560
|
}
|
|
1561
|
+
|
|
1562
|
+
/**
|
|
1563
|
+
* Flow Nexus minimal initialization - only creates Flow Nexus CLAUDE.md, commands, and agents
|
|
1564
|
+
*/
|
|
1565
|
+
async function flowNexusMinimalInit(flags, subArgs) {
|
|
1566
|
+
console.log('🌐 Flow Nexus: Initializing minimal setup...');
|
|
1567
|
+
|
|
1568
|
+
try {
|
|
1569
|
+
const force = flags.force || flags.f;
|
|
1570
|
+
|
|
1571
|
+
// Import functions we need
|
|
1572
|
+
const { createFlowNexusClaudeMd } = await import('./templates/claude-md.js');
|
|
1573
|
+
const { promises: fs } = await import('fs');
|
|
1574
|
+
|
|
1575
|
+
// Create Flow Nexus CLAUDE.md
|
|
1576
|
+
console.log('📝 Creating Flow Nexus CLAUDE.md...');
|
|
1577
|
+
const flowNexusClaudeMd = createFlowNexusClaudeMd();
|
|
1578
|
+
await fs.writeFile('CLAUDE.md', flowNexusClaudeMd);
|
|
1579
|
+
console.log(' ✅ Created CLAUDE.md with Flow Nexus integration');
|
|
1580
|
+
|
|
1581
|
+
// Create .claude/commands/flow-nexus directory and copy commands
|
|
1582
|
+
console.log('📁 Setting up Flow Nexus commands...');
|
|
1583
|
+
await fs.mkdir('.claude/commands/flow-nexus', { recursive: true });
|
|
1584
|
+
|
|
1585
|
+
// Copy Flow Nexus command files
|
|
1586
|
+
const sourceCommandsDir = '/workspaces/claude-code-flow/.claude/commands/flow-nexus';
|
|
1587
|
+
try {
|
|
1588
|
+
const commandFiles = await fs.readdir(sourceCommandsDir);
|
|
1589
|
+
let copiedCommands = 0;
|
|
1590
|
+
|
|
1591
|
+
for (const file of commandFiles) {
|
|
1592
|
+
if (file.endsWith('.md')) {
|
|
1593
|
+
const sourcePath = `${sourceCommandsDir}/${file}`;
|
|
1594
|
+
const destPath = `.claude/commands/flow-nexus/${file}`;
|
|
1595
|
+
const content = await fs.readFile(sourcePath, 'utf8');
|
|
1596
|
+
await fs.writeFile(destPath, content);
|
|
1597
|
+
copiedCommands++;
|
|
1598
|
+
}
|
|
1599
|
+
}
|
|
1600
|
+
|
|
1601
|
+
console.log(` ✅ Copied ${copiedCommands} Flow Nexus command files`);
|
|
1602
|
+
} catch (err) {
|
|
1603
|
+
console.log(' ⚠️ Could not copy Flow Nexus commands:', err.message);
|
|
1604
|
+
}
|
|
1605
|
+
|
|
1606
|
+
// Create .claude/agents/flow-nexus directory and copy agents
|
|
1607
|
+
console.log('🤖 Setting up Flow Nexus agents...');
|
|
1608
|
+
await fs.mkdir('.claude/agents/flow-nexus', { recursive: true });
|
|
1609
|
+
|
|
1610
|
+
// Copy Flow Nexus agent files
|
|
1611
|
+
const sourceAgentsDir = '/workspaces/claude-code-flow/.claude/agents/flow-nexus';
|
|
1612
|
+
try {
|
|
1613
|
+
const agentFiles = await fs.readdir(sourceAgentsDir);
|
|
1614
|
+
let copiedAgents = 0;
|
|
1615
|
+
|
|
1616
|
+
for (const file of agentFiles) {
|
|
1617
|
+
if (file.endsWith('.md')) {
|
|
1618
|
+
const sourcePath = `${sourceAgentsDir}/${file}`;
|
|
1619
|
+
const destPath = `.claude/agents/flow-nexus/${file}`;
|
|
1620
|
+
const content = await fs.readFile(sourcePath, 'utf8');
|
|
1621
|
+
await fs.writeFile(destPath, content);
|
|
1622
|
+
copiedAgents++;
|
|
1623
|
+
}
|
|
1624
|
+
}
|
|
1625
|
+
|
|
1626
|
+
console.log(` ✅ Copied ${copiedAgents} Flow Nexus agent files`);
|
|
1627
|
+
} catch (err) {
|
|
1628
|
+
console.log(' ⚠️ Could not copy Flow Nexus agents:', err.message);
|
|
1629
|
+
}
|
|
1630
|
+
|
|
1631
|
+
console.log('\n🎉 Flow Nexus minimal initialization complete!');
|
|
1632
|
+
console.log('📚 Created: CLAUDE.md with Flow Nexus documentation');
|
|
1633
|
+
console.log('📁 Created: .claude/commands/flow-nexus/ directory with command documentation');
|
|
1634
|
+
console.log('🤖 Created: .claude/agents/flow-nexus/ directory with specialized agents');
|
|
1635
|
+
console.log('');
|
|
1636
|
+
console.log('💡 Quick Start:');
|
|
1637
|
+
console.log(' 1. Register: mcp__flow-nexus__user_register({ email, password })');
|
|
1638
|
+
console.log(' 2. Login: mcp__flow-nexus__user_login({ email, password })');
|
|
1639
|
+
console.log(' 3. Deploy: mcp__flow-nexus__swarm_init({ topology: "mesh", maxAgents: 5 })');
|
|
1640
|
+
console.log('');
|
|
1641
|
+
console.log('🔗 Use Flow Nexus MCP tools in Claude Code for full functionality');
|
|
1642
|
+
|
|
1643
|
+
} catch (err) {
|
|
1644
|
+
console.log(`❌ Flow Nexus initialization failed: ${err.message}`);
|
|
1645
|
+
console.log('Stack trace:', err.stack);
|
|
1646
|
+
process.exit(1);
|
|
1647
|
+
}
|
|
1648
|
+
}
|
|
@@ -36,6 +36,57 @@ If ANY answer is "No", you MUST combine operations into a single message!
|
|
|
36
36
|
- Follow project conventions
|
|
37
37
|
- Run typecheck before committing
|
|
38
38
|
|
|
39
|
+
## 🌐 Flow Nexus Cloud Platform
|
|
40
|
+
|
|
41
|
+
Flow Nexus extends Claude Flow with cloud-powered features:
|
|
42
|
+
|
|
43
|
+
### Quick Start
|
|
44
|
+
1. **Register**: \`mcp__flow-nexus__user_register\` with email/password
|
|
45
|
+
2. **Login**: \`mcp__flow-nexus__user_login\` to access features
|
|
46
|
+
3. **Check Balance**: \`mcp__flow-nexus__check_balance\` for credits
|
|
47
|
+
|
|
48
|
+
### Key Capabilities
|
|
49
|
+
|
|
50
|
+
**🤖 AI Swarms**
|
|
51
|
+
- Deploy multi-agent swarms in cloud sandboxes
|
|
52
|
+
- Pre-built templates for common architectures
|
|
53
|
+
- Auto-scaling and load balancing
|
|
54
|
+
|
|
55
|
+
**📦 E2B Sandboxes**
|
|
56
|
+
- \`mcp__flow-nexus__sandbox_create\` - Isolated execution environments
|
|
57
|
+
- Support for Node.js, Python, React, Next.js
|
|
58
|
+
- Real-time code execution with environment variables
|
|
59
|
+
|
|
60
|
+
**⚡ Workflows**
|
|
61
|
+
- \`mcp__flow-nexus__workflow_create\` - Event-driven automation
|
|
62
|
+
- Parallel task processing with message queues
|
|
63
|
+
- Reusable workflow templates
|
|
64
|
+
|
|
65
|
+
**🎯 Challenges & Learning**
|
|
66
|
+
- \`mcp__flow-nexus__challenges_list\` - Coding challenges
|
|
67
|
+
- Earn rUv credits by completing tasks
|
|
68
|
+
- Global leaderboard and achievements
|
|
69
|
+
|
|
70
|
+
**🧠 Neural Networks**
|
|
71
|
+
- \`mcp__flow-nexus__neural_train\` - Train custom models
|
|
72
|
+
- Distributed training across sandboxes
|
|
73
|
+
- Pre-built templates for ML tasks
|
|
74
|
+
|
|
75
|
+
**💰 Credits & Billing**
|
|
76
|
+
- Pay-as-you-go with rUv credits
|
|
77
|
+
- Auto-refill configuration available
|
|
78
|
+
- Free tier for getting started
|
|
79
|
+
|
|
80
|
+
### Example: Deploy a Swarm
|
|
81
|
+
\`\`\`javascript
|
|
82
|
+
// Login and deploy
|
|
83
|
+
mcp__flow-nexus__user_login { email: "user@example.com", password: "***" }
|
|
84
|
+
mcp__flow-nexus__swarm_init { topology: "mesh", maxAgents: 5 }
|
|
85
|
+
mcp__flow-nexus__sandbox_create { template: "node", name: "api-dev" }
|
|
86
|
+
\`\`\`
|
|
87
|
+
|
|
88
|
+
Learn more: https://github.com/ruvnet/claude-flow#flow-nexus
|
|
89
|
+
|
|
39
90
|
## Project Info
|
|
40
91
|
This is a Claude-Flow AI agent orchestration system.
|
|
41
92
|
`;
|
|
@@ -141,6 +192,57 @@ This is a Claude-Flow AI agent orchestration system with the following component
|
|
|
141
192
|
- Use \`./claude-flow status\` to check system health
|
|
142
193
|
- Monitor with \`./claude-flow monitor\` for real-time updates
|
|
143
194
|
- Verbose output available with \`--verbose\` flag on most commands
|
|
195
|
+
|
|
196
|
+
## 🌐 Flow Nexus Cloud Platform
|
|
197
|
+
|
|
198
|
+
Flow Nexus extends Claude Flow with cloud-powered features:
|
|
199
|
+
|
|
200
|
+
### Quick Start
|
|
201
|
+
1. **Register**: \`mcp__flow-nexus__user_register\` with email/password
|
|
202
|
+
2. **Login**: \`mcp__flow-nexus__user_login\` to access features
|
|
203
|
+
3. **Check Balance**: \`mcp__flow-nexus__check_balance\` for credits
|
|
204
|
+
|
|
205
|
+
### Key Capabilities
|
|
206
|
+
|
|
207
|
+
**🤖 AI Swarms**
|
|
208
|
+
- Deploy multi-agent swarms in cloud sandboxes
|
|
209
|
+
- Pre-built templates for common architectures
|
|
210
|
+
- Auto-scaling and load balancing
|
|
211
|
+
|
|
212
|
+
**📦 E2B Sandboxes**
|
|
213
|
+
- \`mcp__flow-nexus__sandbox_create\` - Isolated execution environments
|
|
214
|
+
- Support for Node.js, Python, React, Next.js
|
|
215
|
+
- Real-time code execution with environment variables
|
|
216
|
+
|
|
217
|
+
**⚡ Workflows**
|
|
218
|
+
- \`mcp__flow-nexus__workflow_create\` - Event-driven automation
|
|
219
|
+
- Parallel task processing with message queues
|
|
220
|
+
- Reusable workflow templates
|
|
221
|
+
|
|
222
|
+
**🎯 Challenges & Learning**
|
|
223
|
+
- \`mcp__flow-nexus__challenges_list\` - Coding challenges
|
|
224
|
+
- Earn rUv credits by completing tasks
|
|
225
|
+
- Global leaderboard and achievements
|
|
226
|
+
|
|
227
|
+
**🧠 Neural Networks**
|
|
228
|
+
- \`mcp__flow-nexus__neural_train\` - Train custom models
|
|
229
|
+
- Distributed training across sandboxes
|
|
230
|
+
- Pre-built templates for ML tasks
|
|
231
|
+
|
|
232
|
+
**💰 Credits & Billing**
|
|
233
|
+
- Pay-as-you-go with rUv credits
|
|
234
|
+
- Auto-refill configuration available
|
|
235
|
+
- Free tier for getting started
|
|
236
|
+
|
|
237
|
+
### Example: Deploy a Swarm
|
|
238
|
+
\`\`\`javascript
|
|
239
|
+
// Login and deploy
|
|
240
|
+
mcp__flow-nexus__user_login { email: "user@example.com", password: "***" }
|
|
241
|
+
mcp__flow-nexus__swarm_init { topology: "mesh", maxAgents: 5 }
|
|
242
|
+
mcp__flow-nexus__sandbox_create { template: "node", name: "api-dev" }
|
|
243
|
+
\`\`\`
|
|
244
|
+
|
|
245
|
+
Learn more: https://github.com/ruvnet/claude-flow#flow-nexus
|
|
144
246
|
`;
|
|
145
247
|
}
|
|
146
248
|
|
|
@@ -466,6 +568,57 @@ This SPARC-enabled project follows a systematic development approach:
|
|
|
466
568
|
- Claude Code slash commands provide quick access to SPARC modes
|
|
467
569
|
|
|
468
570
|
For more information about SPARC methodology, see: https://github.com/ruvnet/claude-code-flow/docs/sparc.md
|
|
571
|
+
|
|
572
|
+
## 🌐 Flow Nexus Cloud Platform
|
|
573
|
+
|
|
574
|
+
Flow Nexus extends Claude Flow with cloud-powered features:
|
|
575
|
+
|
|
576
|
+
### Quick Start
|
|
577
|
+
1. **Register**: \`mcp__flow-nexus__user_register\` with email/password
|
|
578
|
+
2. **Login**: \`mcp__flow-nexus__user_login\` to access features
|
|
579
|
+
3. **Check Balance**: \`mcp__flow-nexus__check_balance\` for credits
|
|
580
|
+
|
|
581
|
+
### Key Capabilities
|
|
582
|
+
|
|
583
|
+
**🤖 AI Swarms**
|
|
584
|
+
- Deploy multi-agent swarms in cloud sandboxes
|
|
585
|
+
- Pre-built templates for common architectures
|
|
586
|
+
- Auto-scaling and load balancing
|
|
587
|
+
|
|
588
|
+
**📦 E2B Sandboxes**
|
|
589
|
+
- \`mcp__flow-nexus__sandbox_create\` - Isolated execution environments
|
|
590
|
+
- Support for Node.js, Python, React, Next.js
|
|
591
|
+
- Real-time code execution with environment variables
|
|
592
|
+
|
|
593
|
+
**⚡ Workflows**
|
|
594
|
+
- \`mcp__flow-nexus__workflow_create\` - Event-driven automation
|
|
595
|
+
- Parallel task processing with message queues
|
|
596
|
+
- Reusable workflow templates
|
|
597
|
+
|
|
598
|
+
**🎯 Challenges & Learning**
|
|
599
|
+
- \`mcp__flow-nexus__challenges_list\` - Coding challenges
|
|
600
|
+
- Earn rUv credits by completing tasks
|
|
601
|
+
- Global leaderboard and achievements
|
|
602
|
+
|
|
603
|
+
**🧠 Neural Networks**
|
|
604
|
+
- \`mcp__flow-nexus__neural_train\` - Train custom models
|
|
605
|
+
- Distributed training across sandboxes
|
|
606
|
+
- Pre-built templates for ML tasks
|
|
607
|
+
|
|
608
|
+
**💰 Credits & Billing**
|
|
609
|
+
- Pay-as-you-go with rUv credits
|
|
610
|
+
- Auto-refill configuration available
|
|
611
|
+
- Free tier for getting started
|
|
612
|
+
|
|
613
|
+
### Example: Deploy a Swarm
|
|
614
|
+
\`\`\`javascript
|
|
615
|
+
// Login and deploy
|
|
616
|
+
mcp__flow-nexus__user_login { email: "user@example.com", password: "***" }
|
|
617
|
+
mcp__flow-nexus__swarm_init { topology: "mesh", maxAgents: 5 }
|
|
618
|
+
mcp__flow-nexus__sandbox_create { template: "node", name: "api-dev" }
|
|
619
|
+
\`\`\`
|
|
620
|
+
|
|
621
|
+
Learn more: https://github.com/ruvnet/claude-flow#flow-nexus
|
|
469
622
|
`;
|
|
470
623
|
}
|
|
471
624
|
|
|
@@ -614,8 +767,10 @@ This project uses SPARC (Specification, Pseudocode, Architecture, Refinement, Co
|
|
|
614
767
|
## 🚀 Quick Setup
|
|
615
768
|
|
|
616
769
|
\`\`\`bash
|
|
617
|
-
# Add Claude Flow
|
|
770
|
+
# Add MCP servers (Claude Flow required, others optional)
|
|
618
771
|
claude mcp add claude-flow npx claude-flow@alpha mcp start
|
|
772
|
+
claude mcp add ruv-swarm npx ruv-swarm mcp start # Optional: Enhanced coordination
|
|
773
|
+
claude mcp add flow-nexus npx flow-nexus@latest mcp start # Optional: Cloud features
|
|
619
774
|
\`\`\`
|
|
620
775
|
|
|
621
776
|
## MCP Tool Categories
|
|
@@ -635,6 +790,23 @@ claude mcp add claude-flow npx claude-flow@alpha mcp start
|
|
|
635
790
|
### System
|
|
636
791
|
\`benchmark_run\`, \`features_detect\`, \`swarm_monitor\`
|
|
637
792
|
|
|
793
|
+
### Flow-Nexus MCP Tools (Optional Advanced Features)
|
|
794
|
+
Flow-Nexus extends MCP capabilities with 70+ cloud-based orchestration tools:
|
|
795
|
+
|
|
796
|
+
**Key MCP Tool Categories:**
|
|
797
|
+
- **Swarm & Agents**: \`swarm_init\`, \`swarm_scale\`, \`agent_spawn\`, \`task_orchestrate\`
|
|
798
|
+
- **Sandboxes**: \`sandbox_create\`, \`sandbox_execute\`, \`sandbox_upload\` (cloud execution)
|
|
799
|
+
- **Templates**: \`template_list\`, \`template_deploy\` (pre-built project templates)
|
|
800
|
+
- **Neural AI**: \`neural_train\`, \`neural_patterns\`, \`seraphina_chat\` (AI assistant)
|
|
801
|
+
- **GitHub**: \`github_repo_analyze\`, \`github_pr_manage\` (repository management)
|
|
802
|
+
- **Real-time**: \`execution_stream_subscribe\`, \`realtime_subscribe\` (live monitoring)
|
|
803
|
+
- **Storage**: \`storage_upload\`, \`storage_list\` (cloud file management)
|
|
804
|
+
|
|
805
|
+
**Authentication Required:**
|
|
806
|
+
- Register: \`mcp__flow-nexus__user_register\` or \`npx flow-nexus@latest register\`
|
|
807
|
+
- Login: \`mcp__flow-nexus__user_login\` or \`npx flow-nexus@latest login\`
|
|
808
|
+
- Access 70+ specialized MCP tools for advanced orchestration
|
|
809
|
+
|
|
638
810
|
## 🚀 Agent Execution Flow with Claude Code
|
|
639
811
|
|
|
640
812
|
### The Correct Pattern:
|
|
@@ -792,6 +964,7 @@ Message 4: Write "file.js"
|
|
|
792
964
|
|
|
793
965
|
- Documentation: https://github.com/ruvnet/claude-flow
|
|
794
966
|
- Issues: https://github.com/ruvnet/claude-flow/issues
|
|
967
|
+
- Flow-Nexus Platform: https://flow-nexus.ruv.io (registration required for cloud features)
|
|
795
968
|
|
|
796
969
|
---
|
|
797
970
|
|
|
@@ -805,3 +978,124 @@ NEVER proactively create documentation files (*.md) or README files. Only create
|
|
|
805
978
|
Never save working files, text/mds and tests to the root folder.
|
|
806
979
|
`;
|
|
807
980
|
}
|
|
981
|
+
|
|
982
|
+
export function createFlowNexusClaudeMd() {
|
|
983
|
+
return `# Claude Code Configuration - Flow Nexus Integration
|
|
984
|
+
|
|
985
|
+
## 🌐 Flow Nexus Cloud Platform
|
|
986
|
+
|
|
987
|
+
Flow Nexus extends Claude Flow with cloud-powered features for AI development and deployment.
|
|
988
|
+
|
|
989
|
+
### Quick Start
|
|
990
|
+
1. **Register**: Use \`mcp__flow-nexus__user_register\` with email/password
|
|
991
|
+
2. **Login**: Use \`mcp__flow-nexus__user_login\` to access features
|
|
992
|
+
3. **Check Balance**: Use \`mcp__flow-nexus__check_balance\` for credits
|
|
993
|
+
|
|
994
|
+
### 🚀 Key Capabilities
|
|
995
|
+
|
|
996
|
+
**🤖 AI Swarms**
|
|
997
|
+
- Deploy multi-agent swarms in cloud sandboxes
|
|
998
|
+
- Pre-built templates for common architectures
|
|
999
|
+
- Auto-scaling and load balancing
|
|
1000
|
+
|
|
1001
|
+
**📦 E2B Sandboxes**
|
|
1002
|
+
- \`mcp__flow-nexus__sandbox_create\` - Isolated execution environments
|
|
1003
|
+
- Support for Node.js, Python, React, Next.js
|
|
1004
|
+
- Real-time code execution with environment variables
|
|
1005
|
+
|
|
1006
|
+
**⚡ Workflows**
|
|
1007
|
+
- \`mcp__flow-nexus__workflow_create\` - Event-driven automation
|
|
1008
|
+
- Parallel task processing with message queues
|
|
1009
|
+
- Reusable workflow templates
|
|
1010
|
+
|
|
1011
|
+
**🎯 Challenges & Learning**
|
|
1012
|
+
- \`mcp__flow-nexus__challenges_list\` - Coding challenges
|
|
1013
|
+
- Earn rUv credits by completing tasks
|
|
1014
|
+
- Global leaderboard and achievements
|
|
1015
|
+
|
|
1016
|
+
**🧠 Neural Networks**
|
|
1017
|
+
- \`mcp__flow-nexus__neural_train\` - Train custom models
|
|
1018
|
+
- Distributed training across sandboxes
|
|
1019
|
+
- Pre-built templates for ML tasks
|
|
1020
|
+
|
|
1021
|
+
**💰 Credits & Billing**
|
|
1022
|
+
- Pay-as-you-go with rUv credits
|
|
1023
|
+
- Auto-refill configuration available
|
|
1024
|
+
- Free tier for getting started
|
|
1025
|
+
|
|
1026
|
+
### 🤖 Flow Nexus Agents
|
|
1027
|
+
|
|
1028
|
+
Specialized agents for Flow Nexus operations available in \`.claude/agents/flow-nexus/\`:
|
|
1029
|
+
|
|
1030
|
+
- **flow-nexus-auth**: Authentication and user management
|
|
1031
|
+
- **flow-nexus-sandbox**: E2B sandbox deployment and management
|
|
1032
|
+
- **flow-nexus-swarm**: AI swarm orchestration and scaling
|
|
1033
|
+
- **flow-nexus-workflow**: Event-driven workflow automation
|
|
1034
|
+
- **flow-nexus-neural**: Neural network training and deployment
|
|
1035
|
+
- **flow-nexus-challenges**: Coding challenges and gamification
|
|
1036
|
+
- **flow-nexus-app-store**: Application marketplace management
|
|
1037
|
+
- **flow-nexus-payments**: Credit management and billing
|
|
1038
|
+
- **flow-nexus-user-tools**: User management and system utilities
|
|
1039
|
+
|
|
1040
|
+
### 📁 Flow Nexus Commands
|
|
1041
|
+
|
|
1042
|
+
Detailed Flow Nexus command documentation available in \`.claude/commands/flow-nexus/\`:
|
|
1043
|
+
|
|
1044
|
+
- \`login-registration.md\` - Authentication workflows
|
|
1045
|
+
- \`sandbox.md\` - E2B sandbox management
|
|
1046
|
+
- \`swarm.md\` - AI swarm deployment
|
|
1047
|
+
- \`workflow.md\` - Automation workflows
|
|
1048
|
+
- \`neural-network.md\` - ML model training
|
|
1049
|
+
- \`challenges.md\` - Coding challenges
|
|
1050
|
+
- \`app-store.md\` - App marketplace
|
|
1051
|
+
- \`payments.md\` - Credit and billing
|
|
1052
|
+
- \`user-tools.md\` - User utilities
|
|
1053
|
+
|
|
1054
|
+
### 💡 Example: Deploy a Swarm
|
|
1055
|
+
\`\`\`javascript
|
|
1056
|
+
// 1. Login to Flow Nexus
|
|
1057
|
+
mcp__flow-nexus__user_login({
|
|
1058
|
+
email: "user@example.com",
|
|
1059
|
+
password: "password"
|
|
1060
|
+
})
|
|
1061
|
+
|
|
1062
|
+
// 2. Initialize swarm
|
|
1063
|
+
mcp__flow-nexus__swarm_init({
|
|
1064
|
+
topology: "mesh",
|
|
1065
|
+
maxAgents: 5
|
|
1066
|
+
})
|
|
1067
|
+
|
|
1068
|
+
// 3. Create sandbox
|
|
1069
|
+
mcp__flow-nexus__sandbox_create({
|
|
1070
|
+
template: "node",
|
|
1071
|
+
name: "api-dev"
|
|
1072
|
+
})
|
|
1073
|
+
|
|
1074
|
+
// 4. Orchestrate task
|
|
1075
|
+
mcp__flow-nexus__task_orchestrate({
|
|
1076
|
+
task: "Build REST API with authentication",
|
|
1077
|
+
strategy: "parallel"
|
|
1078
|
+
})
|
|
1079
|
+
\`\`\`
|
|
1080
|
+
|
|
1081
|
+
### 🔗 Integration with Claude Code
|
|
1082
|
+
|
|
1083
|
+
Flow Nexus seamlessly integrates with Claude Code through MCP (Model Context Protocol):
|
|
1084
|
+
|
|
1085
|
+
1. **Add MCP Server**: \`claude mcp add flow-nexus npx flow-nexus@latest mcp start\`
|
|
1086
|
+
2. **Use in Claude Code**: Access all Flow Nexus tools through MCP interface
|
|
1087
|
+
3. **Agent Coordination**: Use Flow Nexus agents for specialized cloud operations
|
|
1088
|
+
4. **Command Reference**: Use slash commands for quick Flow Nexus operations
|
|
1089
|
+
|
|
1090
|
+
### 📚 Learn More
|
|
1091
|
+
|
|
1092
|
+
- Documentation: https://github.com/ruvnet/claude-flow#flow-nexus
|
|
1093
|
+
- MCP Integration: Use \`mcp__flow-nexus__*\` tools in Claude Code
|
|
1094
|
+
- Agent Usage: Type \`/\` in Claude Code to see Flow Nexus commands
|
|
1095
|
+
- Community: Join discussions and share templates
|
|
1096
|
+
|
|
1097
|
+
---
|
|
1098
|
+
|
|
1099
|
+
**Ready to build with Flow Nexus? Start with authentication and explore the cloud-powered AI development platform!**
|
|
1100
|
+
`;
|
|
1101
|
+
}
|
package/src/core/version.js
CHANGED
|
@@ -24,7 +24,7 @@ try {
|
|
|
24
24
|
} catch (error) {
|
|
25
25
|
// Fallback version if package.json can't be read
|
|
26
26
|
console.warn('Warning: Could not read version from package.json, using fallback');
|
|
27
|
-
VERSION = '2.0.0-alpha.
|
|
27
|
+
VERSION = '2.0.0-alpha.101';
|
|
28
28
|
BUILD_DATE = new Date().toISOString().split('T')[0];
|
|
29
29
|
}
|
|
30
30
|
|