claude-flow 2.0.0-alpha.82 ā 2.0.0-alpha.84
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/analysis/code-analyzer.md +209 -0
- package/.claude/checkpoints/1754066715.json +1 -0
- package/.claude/checkpoints/1754066716.json +1 -0
- package/.claude/checkpoints/1754066724.json +1 -0
- package/.claude/checkpoints/1754066726.json +1 -0
- package/.claude/checkpoints/1754066740.json +1 -0
- package/.claude/checkpoints/1754066741.json +1 -0
- package/.claude/checkpoints/1754066750.json +1 -0
- package/.claude/checkpoints/1754066751.json +1 -0
- package/.claude/checkpoints/1754066761.json +1 -0
- package/.claude/checkpoints/1754066762.json +1 -0
- package/.claude/checkpoints/1754066775.json +1 -0
- package/.claude/checkpoints/1754066777.json +1 -0
- package/.claude/checkpoints/1754066783.json +1 -0
- package/.claude/checkpoints/1754066785.json +1 -0
- package/.claude/checkpoints/1754066815.json +1 -0
- package/.claude/checkpoints/1754066817.json +1 -0
- package/.claude/checkpoints/1754066900.json +1 -0
- package/.claude/checkpoints/1754066904.json +1 -0
- package/.claude/checkpoints/1754066974.json +1 -0
- package/.claude/checkpoints/1754066976.json +1 -0
- package/.claude/checkpoints/1754070695.json +1 -0
- package/.claude/checkpoints/1754070697.json +1 -0
- package/.claude/checkpoints/1754070704.json +1 -0
- package/.claude/checkpoints/1754070706.json +1 -0
- package/.claude/checkpoints/1754070716.json +1 -0
- package/.claude/checkpoints/1754070718.json +1 -0
- package/.claude/checkpoints/1754070730.json +1 -0
- package/.claude/checkpoints/1754070732.json +1 -0
- package/.claude/checkpoints/1754070738.json +1 -0
- package/.claude/checkpoints/1754070740.json +1 -0
- package/.claude/checkpoints/1754074148.json +1 -0
- package/.claude/checkpoints/1754074150.json +1 -0
- package/.claude/checkpoints/1754074157.json +1 -0
- package/.claude/checkpoints/1754074159.json +1 -0
- package/.claude/checkpoints/1754074166.json +1 -0
- package/.claude/checkpoints/1754074168.json +1 -0
- package/.claude/checkpoints/1754074230.json +1 -0
- package/.claude/checkpoints/1754074231.json +1 -0
- package/.claude/checkpoints/1754223063.json +1 -0
- package/.claude/checkpoints/1754223065.json +1 -0
- package/.claude/checkpoints/1754223090.json +1 -0
- package/.claude/checkpoints/1754223092.json +1 -0
- package/.claude/checkpoints/1754223122.json +1 -0
- package/.claude/checkpoints/1754223124.json +1 -0
- package/.claude/checkpoints/1754223139.json +1 -0
- package/.claude/checkpoints/1754223141.json +1 -0
- package/.claude/checkpoints/1754223152.json +1 -0
- package/.claude/checkpoints/1754223154.json +1 -0
- package/.claude/checkpoints/1754223257.json +1 -0
- package/.claude/checkpoints/1754223259.json +1 -0
- package/.claude/checkpoints/1754223270.json +1 -0
- package/.claude/checkpoints/1754223272.json +1 -0
- package/.claude/checkpoints/1754223355.json +1 -0
- package/.claude/checkpoints/1754223357.json +1 -0
- package/.claude/checkpoints/1754223377.json +1 -0
- package/.claude/checkpoints/1754223379.json +1 -0
- package/.claude/checkpoints/1754223405.json +1 -0
- package/.claude/checkpoints/1754223407.json +1 -0
- package/.claude/checkpoints/1754223564.json +1 -0
- package/.claude/checkpoints/1754223566.json +1 -0
- package/.claude/checkpoints/1754223787.json +1 -0
- package/.claude/checkpoints/1754223789.json +1 -0
- package/.claude/checkpoints/1754223824.json +1 -0
- package/.claude/checkpoints/1754223825.json +1 -0
- package/.claude/checkpoints/1754224013.json +1 -0
- package/.claude/checkpoints/1754224015.json +1 -0
- package/.claude/checkpoints/1754224065.json +1 -0
- package/.claude/checkpoints/1754224067.json +1 -0
- package/.claude/checkpoints/1754224099.json +1 -0
- package/.claude/checkpoints/1754224100.json +1 -0
- package/.claude/checkpoints/1754224140.json +1 -0
- package/.claude/checkpoints/1754224142.json +1 -0
- package/.claude/checkpoints/1754224274.json +1 -0
- package/.claude/checkpoints/1754224276.json +1 -0
- package/.claude/checkpoints/1754224352.json +1 -0
- package/.claude/checkpoints/1754224354.json +1 -0
- package/.claude/checkpoints/1754224363.json +1 -0
- package/.claude/checkpoints/1754224365.json +1 -0
- package/.claude/checkpoints/1754224378.json +1 -0
- package/.claude/checkpoints/1754224380.json +1 -0
- package/.claude/checkpoints/1754224553.json +1 -0
- package/.claude/checkpoints/1754224555.json +1 -0
- package/.claude/checkpoints/1754224563.json +1 -0
- package/.claude/checkpoints/1754224565.json +1 -0
- package/.claude/checkpoints/1754224592.json +1 -0
- package/.claude/checkpoints/1754224594.json +1 -0
- package/.claude/checkpoints/1754224730.json +1 -0
- package/.claude/checkpoints/1754224732.json +1 -0
- package/.claude/checkpoints/1754224847.json +1 -0
- package/.claude/checkpoints/1754224849.json +1 -0
- package/.claude/checkpoints/1754224865.json +1 -0
- package/.claude/checkpoints/1754224867.json +1 -0
- package/.claude/checkpoints/1754224886.json +1 -0
- package/.claude/checkpoints/1754224888.json +1 -0
- package/.claude/checkpoints/1754224937.json +1 -0
- package/.claude/checkpoints/1754224939.json +1 -0
- package/.claude/checkpoints/1754225071.json +1 -0
- package/.claude/checkpoints/1754225073.json +1 -0
- package/.claude/checkpoints/1754225092.json +1 -0
- package/.claude/checkpoints/1754225094.json +1 -0
- package/.claude/checkpoints/1754225377.json +1 -0
- package/.claude/checkpoints/1754225379.json +1 -0
- package/.claude/checkpoints/1754225471.json +1 -0
- package/.claude/checkpoints/1754225472.json +1 -0
- package/.claude/checkpoints/1754225541.json +1 -0
- package/.claude/checkpoints/1754225543.json +1 -0
- package/.claude/checkpoints/1754225568.json +1 -0
- package/.claude/checkpoints/1754225569.json +1 -0
- package/.claude/checkpoints/1754225661.json +1 -0
- package/.claude/checkpoints/1754225663.json +1 -0
- package/.claude/checkpoints/1754225759.json +1 -0
- package/.claude/checkpoints/1754225761.json +1 -0
- package/.claude/checkpoints/1754225804.json +1 -0
- package/.claude/checkpoints/1754225806.json +1 -0
- package/.claude/checkpoints/1754225812.json +1 -0
- package/.claude/checkpoints/1754225814.json +1 -0
- package/.claude/checkpoints/1754226486.json +1 -0
- package/.claude/checkpoints/1754226488.json +1 -0
- package/.claude/checkpoints/1754226547.json +1 -0
- package/.claude/checkpoints/1754226549.json +1 -0
- package/.claude/checkpoints/1754226885.json +1 -0
- package/.claude/checkpoints/1754226886.json +1 -0
- package/.claude/checkpoints/1754227128.json +1 -0
- package/.claude/checkpoints/1754227130.json +1 -0
- package/.claude/checkpoints/1754227181.json +1 -0
- package/.claude/checkpoints/1754227183.json +1 -0
- package/.claude/checkpoints/1754227202.json +1 -0
- package/.claude/checkpoints/1754227204.json +1 -0
- package/.claude/checkpoints/1754227412.json +1 -0
- package/.claude/checkpoints/1754227414.json +1 -0
- package/.claude/checkpoints/summary-session-20250731-195358.md +137 -0
- package/.claude/checkpoints/summary-session-20250731-201542.md +143 -0
- package/.claude/checkpoints/summary-session-20250731-201737.md +148 -0
- package/.claude/checkpoints/summary-session-20250731-202811.md +135 -0
- package/.claude/checkpoints/summary-session-20250731-204824.md +114 -0
- package/.claude/checkpoints/summary-session-20250801-165013.md +114 -0
- package/.claude/checkpoints/summary-session-20250801-165902.md +118 -0
- package/.claude/checkpoints/summary-session-20250801-170008.md +121 -0
- package/.claude/checkpoints/summary-session-20250801-170732.md +124 -0
- package/.claude/checkpoints/summary-session-20250801-172331.md +127 -0
- package/.claude/checkpoints/summary-session-20250801-174746.md +113 -0
- package/.claude/checkpoints/summary-session-20250801-175251.md +129 -0
- package/.claude/checkpoints/summary-session-20250801-180233.md +130 -0
- package/.claude/checkpoints/summary-session-20250801-182959.md +254 -0
- package/.claude/checkpoints/summary-session-20250801-183424.md +133 -0
- package/.claude/checkpoints/summary-session-20250801-185805.md +152 -0
- package/.claude/checkpoints/summary-session-20250801-192641.md +259 -0
- package/.claude/checkpoints/summary-session-20250803-122706.md +111 -0
- package/.claude/checkpoints/summary-session-20250803-123704.md +172 -0
- package/.claude/checkpoints/summary-session-20250803-123910.md +179 -0
- package/.claude/checkpoints/summary-session-20250803-124510.md +210 -0
- package/.claude/checkpoints/summary-session-20250803-124952.md +217 -0
- package/.claude/checkpoints/summary-session-20250803-125126.md +226 -0
- package/.claude/checkpoints/summary-session-20250803-125303.md +239 -0
- package/.claude/checkpoints/summary-session-20250803-125437.md +248 -0
- package/.claude/checkpoints/summary-session-20250803-125615.md +255 -0
- package/.claude/checkpoints/summary-session-20250803-125710.md +266 -0
- package/.claude/checkpoints/summary-session-20250803-125814.md +270 -0
- package/.claude/checkpoints/summary-session-20250803-130618.md +279 -0
- package/.claude/checkpoints/summary-session-20250803-130622.md +281 -0
- package/.claude/checkpoints/summary-session-20250803-131649.md +270 -0
- package/.claude/checkpoints/summary-session-20250803-132205.md +286 -0
- package/.claude/checkpoints/task-1753992757.json +7 -0
- package/.claude/checkpoints/task-1753992828.json +7 -0
- package/.claude/checkpoints/task-1753992996.json +7 -0
- package/.claude/checkpoints/task-1753993542.json +7 -0
- package/.claude/checkpoints/task-1753994277.json +7 -0
- package/.claude/checkpoints/task-1754066681.json +1 -0
- package/.claude/checkpoints/task-1754067528.json +1 -0
- package/.claude/checkpoints/task-1754067561.json +1 -0
- package/.claude/checkpoints/task-1754067770.json +1 -0
- package/.claude/checkpoints/task-1754068093.json +1 -0
- package/.claude/checkpoints/task-1754070418.json +1 -0
- package/.claude/checkpoints/task-1754070494.json +1 -0
- package/.claude/checkpoints/task-1754071234.json +1 -0
- package/.claude/checkpoints/task-1754072242.json +1 -0
- package/.claude/checkpoints/task-1754073057.json +1 -0
- package/.claude/checkpoints/task-1754073303.json +1 -0
- package/.claude/checkpoints/task-1754074009.json +1 -0
- package/.claude/checkpoints/task-1754074048.json +1 -0
- package/.claude/checkpoints/task-1754074070.json +1 -0
- package/.claude/checkpoints/task-1754074097.json +1 -0
- package/.claude/checkpoints/task-1754074145.json +1 -0
- package/.claude/checkpoints/task-1754074213.json +1 -0
- package/.claude/checkpoints/task-1754076025.json +1 -0
- package/.claude/checkpoints/task-1754222974.json +1 -0
- package/.claude/checkpoints/task-1754223177.json +1 -0
- package/.claude/checkpoints/task-1754223213.json +1 -0
- package/.claude/checkpoints/task-1754223296.json +1 -0
- package/.claude/checkpoints/task-1754223297.json +1 -0
- package/.claude/checkpoints/task-1754223327.json +1 -0
- package/.claude/checkpoints/task-1754223467.json +1 -0
- package/.claude/checkpoints/task-1754223502.json +1 -0
- package/.claude/checkpoints/task-1754223869.json +1 -0
- package/.claude/checkpoints/task-1754224042.json +1 -0
- package/.claude/checkpoints/task-1754224323.json +1 -0
- package/.claude/checkpoints/task-1754224368.json +1 -0
- package/.claude/checkpoints/task-1754224383.json +1 -0
- package/.claude/checkpoints/task-1754224406.json +1 -0
- package/.claude/checkpoints/task-1754224432.json +1 -0
- package/.claude/checkpoints/task-1754224451.json +1 -0
- package/.claude/checkpoints/task-1754224457.json +1 -0
- package/.claude/checkpoints/task-1754224463.json +1 -0
- package/.claude/checkpoints/task-1754224535.json +1 -0
- package/.claude/checkpoints/task-1754224720.json +1 -0
- package/.claude/checkpoints/task-1754224840.json +1 -0
- package/.claude/checkpoints/task-1754225063.json +1 -0
- package/.claude/checkpoints/task-1754225371.json +1 -0
- package/.claude/checkpoints/task-1754225450.json +1 -0
- package/.claude/checkpoints/task-1754225463.json +1 -0
- package/.claude/checkpoints/task-1754225535.json +1 -0
- package/.claude/checkpoints/task-1754225563.json +1 -0
- package/.claude/checkpoints/task-1754225641.json +1 -0
- package/.claude/checkpoints/task-1754225653.json +1 -0
- package/.claude/checkpoints/task-1754225752.json +1 -0
- package/.claude/checkpoints/task-1754225797.json +1 -0
- package/.claude/checkpoints/task-1754225840.json +1 -0
- package/.claude/checkpoints/task-1754226060.json +1 -0
- package/.claude/checkpoints/task-1754226366.json +1 -0
- package/.claude/checkpoints/task-1754226444.json +1 -0
- package/.claude/checkpoints/task-1754227038.json +1 -0
- package/.claude/checkpoints/task-1754227293.json +1 -0
- package/.claude/checkpoints/task-1754227376.json +1 -0
- package/.claude/checkpoints/task-1754227388.json +1 -0
- package/.claude/settings-github-npx.json +158 -0
- package/.claude/settings-npx-hooks.json +158 -0
- package/.claude/settings.json +4 -4
- package/CHANGELOG.md +39 -0
- package/bin/claude-flow +1 -1
- package/bin/claude-flow.js +20 -2
- package/package.json +10 -2
- package/src/agents/agent-loader.ts +32 -4
- package/src/cli/help-text.js +24 -11
- package/src/cli/index-remote.ts +1 -1
- package/src/cli/index.ts +1 -1
- package/src/cli/simple-cli.js +23 -5
- package/src/cli/simple-cli.ts +1 -1
- package/src/cli/simple-commands/hive-mind.js +76 -33
- package/src/cli/simple-commands/init/templates/CLAUDE.md +19 -19
- package/src/cli/simple-commands/process-ui-enhanced.js +1 -1
- package/src/cli/simple-commands/status.js +1 -1
- package/src/cli/simple-commands/swarm.js +114 -30
- package/src/constants/agent-types.ts +9 -15
- package/src/mcp/mcp-server.js +33 -7
- package/.claude/checkpoints/1753906298.json +0 -12
- package/bin/claude-flow-node-pkg +0 -0
package/src/cli/index-remote.ts
CHANGED
package/src/cli/index.ts
CHANGED
|
@@ -27,7 +27,7 @@ import { startREPL } from './repl.js';
|
|
|
27
27
|
import { CompletionGenerator } from './completion.js';
|
|
28
28
|
|
|
29
29
|
// Version information
|
|
30
|
-
const VERSION = '2.0.0-alpha.
|
|
30
|
+
const VERSION = '2.0.0-alpha.83';
|
|
31
31
|
const BUILD_DATE = new Date().toISOString().split('T')[0];
|
|
32
32
|
|
|
33
33
|
// Main CLI command
|
package/src/cli/simple-cli.js
CHANGED
|
@@ -27,7 +27,23 @@ import process from 'process';
|
|
|
27
27
|
import readline from 'readline';
|
|
28
28
|
import { getMainHelp, getCommandHelp, getStandardizedCommandHelp } from './help-text.js';
|
|
29
29
|
|
|
30
|
-
const VERSION = '2.0.0-alpha.
|
|
30
|
+
const VERSION = '2.0.0-alpha.83';
|
|
31
|
+
|
|
32
|
+
// Legacy agent type mapping for backward compatibility
|
|
33
|
+
const LEGACY_AGENT_MAPPING = {
|
|
34
|
+
analyst: 'code-analyzer',
|
|
35
|
+
coordinator: 'task-orchestrator',
|
|
36
|
+
optimizer: 'perf-analyzer',
|
|
37
|
+
documenter: 'api-docs',
|
|
38
|
+
monitor: 'performance-benchmarker',
|
|
39
|
+
specialist: 'system-architect',
|
|
40
|
+
architect: 'system-architect',
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
// Resolve legacy agent types to current equivalents
|
|
44
|
+
function resolveLegacyAgentType(legacyType) {
|
|
45
|
+
return LEGACY_AGENT_MAPPING[legacyType] || legacyType;
|
|
46
|
+
}
|
|
31
47
|
|
|
32
48
|
function printHelp(plain = false) {
|
|
33
49
|
console.log(getMainHelp(plain));
|
|
@@ -51,7 +67,7 @@ function printLegacyHelp() {
|
|
|
51
67
|
š Claude-Flow v${VERSION} - Enterprise-Grade AI Agent Orchestration Platform
|
|
52
68
|
|
|
53
69
|
šÆ ENTERPRISE FEATURES: Complete ruv-swarm integration with 90+ MCP tools, neural networking, and production-ready infrastructure
|
|
54
|
-
ā” ALPHA
|
|
70
|
+
ā” ALPHA 83: Enhanced GitHub hooks with npx commands, improved checkpoint reliability, seamless CI/CD integration
|
|
55
71
|
|
|
56
72
|
USAGE:
|
|
57
73
|
claude-flow <command> [options]
|
|
@@ -331,12 +347,13 @@ async function main() {
|
|
|
331
347
|
|
|
332
348
|
case 'spawn':
|
|
333
349
|
// Convenience alias for agent spawn
|
|
334
|
-
const
|
|
350
|
+
const rawSpawnType = subArgs[0] || 'general';
|
|
351
|
+
const spawnType = resolveLegacyAgentType(rawSpawnType);
|
|
335
352
|
const spawnName = flags.name || `agent-${Date.now()}`;
|
|
336
353
|
|
|
337
354
|
printSuccess(`Spawning ${spawnType} agent: ${spawnName}`);
|
|
338
355
|
console.log('š¤ Agent would be created with the following configuration:');
|
|
339
|
-
console.log(` Type: ${spawnType}`);
|
|
356
|
+
console.log(` Type: ${spawnType}${rawSpawnType !== spawnType ? ` (resolved from: ${rawSpawnType})` : ''}`);
|
|
340
357
|
console.log(` Name: ${spawnName}`);
|
|
341
358
|
console.log(' Capabilities: Research, Analysis, Code Generation');
|
|
342
359
|
console.log(' Status: Ready');
|
|
@@ -2349,7 +2366,8 @@ Shortcuts:
|
|
|
2349
2366
|
const subCmd = args[0];
|
|
2350
2367
|
switch (subCmd) {
|
|
2351
2368
|
case 'spawn':
|
|
2352
|
-
const
|
|
2369
|
+
const rawType = args[1] || 'researcher';
|
|
2370
|
+
const type = resolveLegacyAgentType(rawType);
|
|
2353
2371
|
const name = args[2] || `agent-${Date.now()}`;
|
|
2354
2372
|
const agent = {
|
|
2355
2373
|
id: `agent-${Date.now()}`,
|
package/src/cli/simple-cli.ts
CHANGED
|
@@ -1540,19 +1540,23 @@ async function listMemories() {
|
|
|
1540
1540
|
try {
|
|
1541
1541
|
console.log(chalk.blue('\nš Collective Memory Store\n'));
|
|
1542
1542
|
|
|
1543
|
-
//
|
|
1544
|
-
const
|
|
1545
|
-
const
|
|
1543
|
+
// Read directly from hive.db collective_memory table
|
|
1544
|
+
const dbPath = path.join(cwd(), '.hive-mind', 'hive.db');
|
|
1545
|
+
const db = new Database(dbPath);
|
|
1546
1546
|
|
|
1547
|
-
|
|
1548
|
-
|
|
1549
|
-
|
|
1550
|
-
|
|
1551
|
-
|
|
1552
|
-
|
|
1553
|
-
|
|
1554
|
-
|
|
1555
|
-
|
|
1547
|
+
const memories = db
|
|
1548
|
+
.prepare(
|
|
1549
|
+
`
|
|
1550
|
+
SELECT cm.*, s.name as swarm_name
|
|
1551
|
+
FROM collective_memory cm
|
|
1552
|
+
LEFT JOIN swarms s ON cm.swarm_id = s.id
|
|
1553
|
+
ORDER BY cm.created_at DESC
|
|
1554
|
+
LIMIT 50
|
|
1555
|
+
`,
|
|
1556
|
+
)
|
|
1557
|
+
.all();
|
|
1558
|
+
|
|
1559
|
+
db.close();
|
|
1556
1560
|
|
|
1557
1561
|
if (!memories || memories.length === 0) {
|
|
1558
1562
|
console.log(chalk.yellow('No memories found in the collective store.'));
|
|
@@ -1562,15 +1566,34 @@ async function listMemories() {
|
|
|
1562
1566
|
return;
|
|
1563
1567
|
}
|
|
1564
1568
|
|
|
1569
|
+
console.log(chalk.gray(`Found ${memories.length} memories in the collective store:\n`));
|
|
1570
|
+
|
|
1565
1571
|
memories.forEach((memory, index) => {
|
|
1566
|
-
console.log(chalk.cyan(`${index + 1}. ${memory.key
|
|
1567
|
-
console.log(`
|
|
1568
|
-
console.log(`
|
|
1569
|
-
|
|
1570
|
-
|
|
1572
|
+
console.log(chalk.cyan(`${index + 1}. ${memory.key}`));
|
|
1573
|
+
console.log(` Swarm: ${memory.swarm_name || memory.swarm_id}`);
|
|
1574
|
+
console.log(` Type: ${memory.type || 'knowledge'}`);
|
|
1575
|
+
console.log(` Created: ${new Date(memory.created_at).toLocaleString()}`);
|
|
1576
|
+
console.log(` Created by: ${memory.created_by || 'system'}`);
|
|
1577
|
+
|
|
1578
|
+
// Parse and display value
|
|
1579
|
+
let displayValue = memory.value;
|
|
1580
|
+
try {
|
|
1581
|
+
const parsed = JSON.parse(memory.value);
|
|
1582
|
+
displayValue = JSON.stringify(parsed);
|
|
1583
|
+
} catch {
|
|
1584
|
+
// Keep as string
|
|
1585
|
+
}
|
|
1586
|
+
|
|
1587
|
+
if (displayValue.length > 100) {
|
|
1588
|
+
console.log(` Value: ${displayValue.substring(0, 100)}...`);
|
|
1571
1589
|
} else {
|
|
1572
|
-
console.log(` Value: ${
|
|
1590
|
+
console.log(` Value: ${displayValue}`);
|
|
1573
1591
|
}
|
|
1592
|
+
|
|
1593
|
+
if (memory.confidence !== null && memory.confidence !== 1) {
|
|
1594
|
+
console.log(` Confidence: ${(memory.confidence * 100).toFixed(1)}%`);
|
|
1595
|
+
}
|
|
1596
|
+
|
|
1574
1597
|
console.log('');
|
|
1575
1598
|
});
|
|
1576
1599
|
} catch (error) {
|
|
@@ -1595,29 +1618,49 @@ async function searchMemories() {
|
|
|
1595
1618
|
|
|
1596
1619
|
console.log(chalk.blue(`\nš Searching for: "${searchTerm}"\n`));
|
|
1597
1620
|
|
|
1598
|
-
|
|
1599
|
-
const
|
|
1621
|
+
// Search directly in hive.db collective_memory table
|
|
1622
|
+
const dbPath = path.join(cwd(), '.hive-mind', 'hive.db');
|
|
1623
|
+
const db = new Database(dbPath);
|
|
1600
1624
|
|
|
1601
|
-
|
|
1602
|
-
|
|
1603
|
-
|
|
1604
|
-
|
|
1605
|
-
|
|
1606
|
-
|
|
1607
|
-
|
|
1608
|
-
|
|
1609
|
-
|
|
1625
|
+
const searchPattern = `%${searchTerm}%`;
|
|
1626
|
+
const memories = db
|
|
1627
|
+
.prepare(
|
|
1628
|
+
`
|
|
1629
|
+
SELECT cm.*, s.name as swarm_name
|
|
1630
|
+
FROM collective_memory cm
|
|
1631
|
+
LEFT JOIN swarms s ON cm.swarm_id = s.id
|
|
1632
|
+
WHERE cm.key LIKE ? OR cm.value LIKE ? OR cm.type LIKE ?
|
|
1633
|
+
ORDER BY cm.created_at DESC
|
|
1634
|
+
LIMIT 50
|
|
1635
|
+
`,
|
|
1636
|
+
)
|
|
1637
|
+
.all(searchPattern, searchPattern, searchPattern);
|
|
1638
|
+
|
|
1639
|
+
db.close();
|
|
1610
1640
|
|
|
1611
1641
|
if (!memories || memories.length === 0) {
|
|
1612
1642
|
console.log(chalk.yellow('No memories found matching your search.'));
|
|
1613
1643
|
return;
|
|
1614
1644
|
}
|
|
1615
1645
|
|
|
1646
|
+
console.log(chalk.gray(`Found ${memories.length} memories matching "${searchTerm}":\n`));
|
|
1647
|
+
|
|
1616
1648
|
memories.forEach((memory, index) => {
|
|
1617
|
-
console.log(chalk.green(`${index + 1}. ${memory.key
|
|
1618
|
-
console.log(`
|
|
1619
|
-
console.log(`
|
|
1620
|
-
console.log(`
|
|
1649
|
+
console.log(chalk.green(`${index + 1}. ${memory.key}`));
|
|
1650
|
+
console.log(` Swarm: ${memory.swarm_name || memory.swarm_id}`);
|
|
1651
|
+
console.log(` Type: ${memory.type || 'knowledge'}`);
|
|
1652
|
+
console.log(` Created: ${new Date(memory.created_at).toLocaleString()}`);
|
|
1653
|
+
|
|
1654
|
+
// Parse and display value with highlighting
|
|
1655
|
+
let displayValue = memory.value;
|
|
1656
|
+
try {
|
|
1657
|
+
const parsed = JSON.parse(memory.value);
|
|
1658
|
+
displayValue = JSON.stringify(parsed, null, 2);
|
|
1659
|
+
} catch {
|
|
1660
|
+
// Keep as string
|
|
1661
|
+
}
|
|
1662
|
+
|
|
1663
|
+
console.log(` Value: ${displayValue}`);
|
|
1621
1664
|
console.log('');
|
|
1622
1665
|
});
|
|
1623
1666
|
} catch (error) {
|
|
@@ -458,14 +458,14 @@ If you need to do X operations, they should be in 1 message, not X messages
|
|
|
458
458
|
mcp__claude-flow__swarm_init { topology: "mesh", maxAgents: 6 }
|
|
459
459
|
mcp__claude-flow__agent_spawn { type: "researcher" }
|
|
460
460
|
mcp__claude-flow__agent_spawn { type: "coder" }
|
|
461
|
-
mcp__claude-flow__agent_spawn { type: "
|
|
461
|
+
mcp__claude-flow__agent_spawn { type: "code-analyzer" }
|
|
462
462
|
mcp__claude-flow__agent_spawn { type: "tester" }
|
|
463
|
-
mcp__claude-flow__agent_spawn { type: "
|
|
463
|
+
mcp__claude-flow__agent_spawn { type: "task-orchestrator" }
|
|
464
464
|
|
|
465
465
|
// Claude Code execution - ALL in parallel
|
|
466
466
|
Task("You are researcher agent. MUST coordinate via hooks...")
|
|
467
467
|
Task("You are coder agent. MUST coordinate via hooks...")
|
|
468
|
-
Task("You are
|
|
468
|
+
Task("You are code-analyzer agent. MUST coordinate via hooks...")
|
|
469
469
|
Task("You are tester agent. MUST coordinate via hooks...")
|
|
470
470
|
TodoWrite { todos: [5-10 todos with all priorities and statuses] }
|
|
471
471
|
|
|
@@ -601,7 +601,7 @@ Once configured, Claude Flow MCP tools enhance Claude Code's coordination:
|
|
|
601
601
|
- Tool: `mcp__claude-flow__agent_spawn`
|
|
602
602
|
- Parameters: `{"type": "researcher", "name": "Literature Review"}`
|
|
603
603
|
- Tool: `mcp__claude-flow__agent_spawn`
|
|
604
|
-
- Parameters: `{"type": "
|
|
604
|
+
- Parameters: `{"type": "code-analyzer", "name": "Data Analysis"}`
|
|
605
605
|
- Result: Different cognitive patterns for Claude Code to use
|
|
606
606
|
|
|
607
607
|
**Step 3:** Coordinate research execution
|
|
@@ -634,7 +634,7 @@ Once configured, Claude Flow MCP tools enhance Claude Code's coordination:
|
|
|
634
634
|
**Step 2:** Define development perspectives
|
|
635
635
|
|
|
636
636
|
- Tool: `mcp__claude-flow__agent_spawn`
|
|
637
|
-
- Parameters: `{"type": "architect", "name": "System Design"}`
|
|
637
|
+
- Parameters: `{"type": "system-architect", "name": "System Design"}`
|
|
638
638
|
- Result: Architectural thinking pattern for Claude Code
|
|
639
639
|
|
|
640
640
|
**Step 3:** Coordinate implementation
|
|
@@ -802,9 +802,9 @@ See `.claude/commands/` for detailed documentation on all features.
|
|
|
802
802
|
- Medium tasks (4-6 components): 5-7 agents
|
|
803
803
|
- Complex tasks (7+ components): 8-12 agents
|
|
804
804
|
3. **Agent Type Distribution**: Balance agent types based on task:
|
|
805
|
-
- Always include 1
|
|
805
|
+
- Always include 1 task-orchestrator
|
|
806
806
|
- For code-heavy tasks: more coders
|
|
807
|
-
- For design tasks: more architects/
|
|
807
|
+
- For design tasks: more system-architects/code-analyzers
|
|
808
808
|
- For quality tasks: more testers/reviewers
|
|
809
809
|
|
|
810
810
|
**Example Auto-Decision Logic:**
|
|
@@ -896,15 +896,15 @@ Message 1: [BatchTool]
|
|
|
896
896
|
- mcp__claude-flow__swarm_init
|
|
897
897
|
- mcp__claude-flow__agent_spawn (researcher)
|
|
898
898
|
- mcp__claude-flow__agent_spawn (coder)
|
|
899
|
-
- mcp__claude-flow__agent_spawn (
|
|
899
|
+
- mcp__claude-flow__agent_spawn (code-analyzer)
|
|
900
900
|
- mcp__claude-flow__agent_spawn (tester)
|
|
901
|
-
- mcp__claude-flow__agent_spawn (
|
|
901
|
+
- mcp__claude-flow__agent_spawn (task-orchestrator)
|
|
902
902
|
|
|
903
903
|
Message 2: [BatchTool - Claude Code execution]
|
|
904
904
|
// Task agents with full coordination instructions
|
|
905
905
|
- Task("You are researcher agent. MANDATORY: Run hooks pre-task, post-edit, post-task. Task: Research API patterns")
|
|
906
906
|
- Task("You are coder agent. MANDATORY: Run hooks pre-task, post-edit, post-task. Task: Implement REST endpoints")
|
|
907
|
-
- Task("You are
|
|
907
|
+
- Task("You are code-analyzer agent. MANDATORY: Run hooks pre-task, post-edit, post-task. Task: Analyze performance")
|
|
908
908
|
- Task("You are tester agent. MANDATORY: Run hooks pre-task, post-edit, post-task. Task: Write comprehensive tests")
|
|
909
909
|
|
|
910
910
|
// TodoWrite with ALL todos batched
|
|
@@ -940,13 +940,13 @@ STEP 1: IMMEDIATE PARALLEL SPAWN (Single Message!)
|
|
|
940
940
|
|
|
941
941
|
// Spawn agents based on maxAgents count and task requirements
|
|
942
942
|
// If CLI specifies 3 agents, spawn 3. If no args, auto-decide optimal count (3-12)
|
|
943
|
-
- mcp__claude-flow__agent_spawn { type: "architect", name: "System Designer" }
|
|
943
|
+
- mcp__claude-flow__agent_spawn { type: "system-architect", name: "System Designer" }
|
|
944
944
|
- mcp__claude-flow__agent_spawn { type: "coder", name: "API Developer" }
|
|
945
945
|
- mcp__claude-flow__agent_spawn { type: "coder", name: "Frontend Dev" }
|
|
946
|
-
- mcp__claude-flow__agent_spawn { type: "
|
|
946
|
+
- mcp__claude-flow__agent_spawn { type: "code-analyzer", name: "DB Designer" }
|
|
947
947
|
- mcp__claude-flow__agent_spawn { type: "tester", name: "QA Engineer" }
|
|
948
948
|
- mcp__claude-flow__agent_spawn { type: "researcher", name: "Tech Lead" }
|
|
949
|
-
- mcp__claude-flow__agent_spawn { type: "
|
|
949
|
+
- mcp__claude-flow__agent_spawn { type: "task-orchestrator", name: "PM" }
|
|
950
950
|
- TodoWrite { todos: [multiple todos at once] }
|
|
951
951
|
|
|
952
952
|
STEP 2: PARALLEL TASK EXECUTION (Single Message!)
|
|
@@ -998,12 +998,12 @@ Dependencies: ā³ X deps | Actionable: ā¶
|
|
|
998
998
|
[BatchTool - Message 1]:
|
|
999
999
|
// Initialize and spawn ALL agents at once
|
|
1000
1000
|
mcp__claude-flow__swarm_init { topology: "hierarchical", maxAgents: 8, strategy: "parallel" }
|
|
1001
|
-
mcp__claude-flow__agent_spawn { type: "architect", name: "System Designer" }
|
|
1001
|
+
mcp__claude-flow__agent_spawn { type: "system-architect", name: "System Designer" }
|
|
1002
1002
|
mcp__claude-flow__agent_spawn { type: "coder", name: "API Developer" }
|
|
1003
1003
|
mcp__claude-flow__agent_spawn { type: "coder", name: "Auth Expert" }
|
|
1004
|
-
mcp__claude-flow__agent_spawn { type: "
|
|
1004
|
+
mcp__claude-flow__agent_spawn { type: "code-analyzer", name: "DB Designer" }
|
|
1005
1005
|
mcp__claude-flow__agent_spawn { type: "tester", name: "Test Engineer" }
|
|
1006
|
-
mcp__claude-flow__agent_spawn { type: "
|
|
1006
|
+
mcp__claude-flow__agent_spawn { type: "task-orchestrator", name: "Lead" }
|
|
1007
1007
|
|
|
1008
1008
|
// Update ALL todos at once - NEVER split todos!
|
|
1009
1009
|
TodoWrite { todos: [
|
|
@@ -1109,12 +1109,12 @@ When showing swarm status, use this format:
|
|
|
1109
1109
|
āāā š§ Memory: 15 coordination points stored
|
|
1110
1110
|
|
|
1111
1111
|
Agent Activity:
|
|
1112
|
-
āāā š¢ architect: Designing database schema...
|
|
1112
|
+
āāā š¢ system-architect: Designing database schema...
|
|
1113
1113
|
āāā š¢ coder-1: Implementing auth endpoints...
|
|
1114
1114
|
āāā š¢ coder-2: Building user CRUD operations...
|
|
1115
|
-
āāā š¢
|
|
1115
|
+
āāā š¢ code-analyzer: Optimizing query performance...
|
|
1116
1116
|
āāā š” tester: Waiting for auth completion...
|
|
1117
|
-
āāā š¢
|
|
1117
|
+
āāā š¢ task-orchestrator: Monitoring progress...
|
|
1118
1118
|
```
|
|
1119
1119
|
|
|
1120
1120
|
## š CRITICAL: TODOWRITE AND TASK TOOL BATCHING
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// process-ui-enhanced.js - Enhanced process management UI with multiple views - v2.0.0-alpha.
|
|
1
|
+
// process-ui-enhanced.js - Enhanced process management UI with multiple views - v2.0.0-alpha.83
|
|
2
2
|
import { printSuccess, printError, printWarning, printInfo } from '../utils.js';
|
|
3
3
|
import { compat } from '../runtime-detector.js';
|
|
4
4
|
import SwarmWebUIIntegration from './swarm-webui-integration.js';
|
|
@@ -19,7 +19,7 @@ export async function statusCommand(subArgs, flags) {
|
|
|
19
19
|
async function getSystemStatus(verbose = false) {
|
|
20
20
|
const status = {
|
|
21
21
|
timestamp: Date.now(),
|
|
22
|
-
version: '2.0.0-alpha.
|
|
22
|
+
version: '2.0.0-alpha.83',
|
|
23
23
|
orchestrator: {
|
|
24
24
|
running: false,
|
|
25
25
|
uptime: 0,
|
|
@@ -156,14 +156,17 @@ EXAMPLES:
|
|
|
156
156
|
claude-flow swarm "Develop user registration feature" --mode distributed
|
|
157
157
|
claude-flow swarm "Optimize React app performance" --strategy optimization
|
|
158
158
|
claude-flow swarm "Create microservice" --executor # Use built-in executor
|
|
159
|
+
claude-flow swarm "Build API" --claude # Open Claude Code CLI
|
|
159
160
|
claude-flow swarm "Build API endpoints" --output-format json # Get JSON output
|
|
160
161
|
claude-flow swarm "Research AI trends" --output-format json --output-file results.json
|
|
161
162
|
|
|
162
163
|
DEFAULT BEHAVIOR:
|
|
163
|
-
Swarm
|
|
164
|
+
Swarm attempts to open Claude Code CLI with comprehensive MCP tool instructions
|
|
164
165
|
including memory coordination, agent management, and task orchestration.
|
|
165
166
|
|
|
166
|
-
|
|
167
|
+
If Claude CLI is not available:
|
|
168
|
+
⢠Use --claude flag to open Claude Code CLI
|
|
169
|
+
⢠Use --executor flag to run with the built-in executor
|
|
167
170
|
|
|
168
171
|
STRATEGIES:
|
|
169
172
|
auto Automatically determine best approach (default)
|
|
@@ -210,6 +213,7 @@ OPTIONS:
|
|
|
210
213
|
--verbose Enable detailed logging
|
|
211
214
|
--dry-run Show configuration without executing
|
|
212
215
|
--executor Use built-in executor instead of Claude Code
|
|
216
|
+
--claude Open Claude Code CLI
|
|
213
217
|
--output-format <format> Output format: json, text (default: text)
|
|
214
218
|
--output-file <path> Save output to file instead of stdout
|
|
215
219
|
--no-interactive Run in non-interactive mode (auto-enabled with --output-format json)
|
|
@@ -352,33 +356,7 @@ export async function swarmCommand(args, flags) {
|
|
|
352
356
|
try {
|
|
353
357
|
const { execSync, spawn } = await import('child_process');
|
|
354
358
|
|
|
355
|
-
//
|
|
356
|
-
let claudeAvailable = false;
|
|
357
|
-
try {
|
|
358
|
-
execSync('which claude', { stdio: 'ignore' });
|
|
359
|
-
claudeAvailable = true;
|
|
360
|
-
} catch {
|
|
361
|
-
console.log('ā ļø Claude Code CLI not found in PATH');
|
|
362
|
-
console.log('Install it with: npm install -g @anthropic-ai/claude-code');
|
|
363
|
-
console.log('\nWould spawn Claude Code with swarm objective:');
|
|
364
|
-
console.log(`š Objective: ${objective}`);
|
|
365
|
-
console.log(
|
|
366
|
-
'\nTo use the built-in executor instead: claude-flow swarm "objective" --executor',
|
|
367
|
-
);
|
|
368
|
-
return;
|
|
369
|
-
}
|
|
370
|
-
|
|
371
|
-
// Claude is available, use it to run swarm
|
|
372
|
-
console.log('š Launching Claude Flow Swarm System...');
|
|
373
|
-
console.log(`š Objective: ${objective}`);
|
|
374
|
-
console.log(`šÆ Strategy: ${flags.strategy || 'auto'}`);
|
|
375
|
-
console.log(`šļø Mode: ${flags.mode || 'centralized'}`);
|
|
376
|
-
console.log(`š¤ Max Agents: ${flags['max-agents'] || 5}`);
|
|
377
|
-
if (isAnalysisMode) {
|
|
378
|
-
console.log(`š Analysis Mode: ENABLED (Read-Only - No Code Changes)`);
|
|
379
|
-
}
|
|
380
|
-
console.log();
|
|
381
|
-
|
|
359
|
+
// Get configuration values first
|
|
382
360
|
const strategy = flags.strategy || 'auto';
|
|
383
361
|
const mode = flags.mode || 'centralized';
|
|
384
362
|
const maxAgents = flags['max-agents'] || 5;
|
|
@@ -391,6 +369,7 @@ export async function swarmCommand(args, flags) {
|
|
|
391
369
|
const enableSparc =
|
|
392
370
|
flags.sparc !== false && (strategy === 'development' || strategy === 'auto');
|
|
393
371
|
|
|
372
|
+
// Build the complete swarm prompt before checking for claude
|
|
394
373
|
const swarmPrompt = `You are orchestrating a Claude Flow Swarm with advanced MCP tool coordination.
|
|
395
374
|
|
|
396
375
|
šÆ OBJECTIVE: ${objective}
|
|
@@ -787,6 +766,109 @@ Start by spawning a coordinator agent and creating the initial task structure. U
|
|
|
787
766
|
|
|
788
767
|
The swarm should be self-documenting - use memory_store to save all important information, decisions, and results throughout the execution.`;
|
|
789
768
|
|
|
769
|
+
// If --claude flag is used, force Claude Code even if CLI not available
|
|
770
|
+
if (flags && flags.claude) {
|
|
771
|
+
console.log('š Launching Claude Flow Swarm System...');
|
|
772
|
+
console.log(`š Objective: ${objective}`);
|
|
773
|
+
console.log(`šÆ Strategy: ${strategy}`);
|
|
774
|
+
console.log(`šļø Mode: ${mode}`);
|
|
775
|
+
console.log(`š¤ Max Agents: ${maxAgents}\n`);
|
|
776
|
+
|
|
777
|
+
console.log('š Launching Claude Code with Swarm Coordination');
|
|
778
|
+
console.log('ā'.repeat(60));
|
|
779
|
+
|
|
780
|
+
// Pass the prompt directly as an argument to claude
|
|
781
|
+
const claudeArgs = [swarmPrompt];
|
|
782
|
+
|
|
783
|
+
// Add auto-permission flag by default for swarm mode (unless explicitly disabled)
|
|
784
|
+
if (flags['dangerously-skip-permissions'] !== false && !flags['no-auto-permissions']) {
|
|
785
|
+
claudeArgs.push('--dangerously-skip-permissions');
|
|
786
|
+
console.log('š Using --dangerously-skip-permissions by default for seamless swarm execution');
|
|
787
|
+
}
|
|
788
|
+
|
|
789
|
+
// Spawn claude with the prompt as the first argument (exactly like hive-mind does)
|
|
790
|
+
const claudeProcess = spawn('claude', claudeArgs, {
|
|
791
|
+
stdio: 'inherit',
|
|
792
|
+
shell: false,
|
|
793
|
+
});
|
|
794
|
+
|
|
795
|
+
console.log('\nā Claude Code launched with swarm coordination prompt!');
|
|
796
|
+
console.log(' The swarm coordinator will orchestrate all agent tasks');
|
|
797
|
+
console.log(' Use MCP tools for coordination and memory sharing');
|
|
798
|
+
|
|
799
|
+
console.log('\nš” Pro Tips:');
|
|
800
|
+
console.log('ā'.repeat(30));
|
|
801
|
+
console.log('⢠Use TodoWrite to track parallel tasks');
|
|
802
|
+
console.log('⢠Store results with mcp__claude-flow__memory_usage');
|
|
803
|
+
console.log('⢠Monitor progress with mcp__claude-flow__swarm_monitor');
|
|
804
|
+
console.log('⢠Check task status with mcp__claude-flow__task_status');
|
|
805
|
+
|
|
806
|
+
// Set up clean termination
|
|
807
|
+
const cleanup = () => {
|
|
808
|
+
console.log('\nš Shutting down swarm gracefully...');
|
|
809
|
+
if (claudeProcess && !claudeProcess.killed) {
|
|
810
|
+
claudeProcess.kill('SIGTERM');
|
|
811
|
+
}
|
|
812
|
+
process.exit(0);
|
|
813
|
+
};
|
|
814
|
+
|
|
815
|
+
process.on('SIGINT', cleanup);
|
|
816
|
+
process.on('SIGTERM', cleanup);
|
|
817
|
+
|
|
818
|
+
// Wait for claude to exit
|
|
819
|
+
claudeProcess.on('exit', (code) => {
|
|
820
|
+
if (code === 0) {
|
|
821
|
+
console.log('\nā Swarm execution completed successfully');
|
|
822
|
+
} else if (code !== null) {
|
|
823
|
+
console.log(`\nā Swarm execution exited with code ${code}`);
|
|
824
|
+
}
|
|
825
|
+
process.exit(code || 0);
|
|
826
|
+
});
|
|
827
|
+
|
|
828
|
+
// Handle spawn errors (e.g., claude not found)
|
|
829
|
+
claudeProcess.on('error', (err) => {
|
|
830
|
+
if (err.code === 'ENOENT') {
|
|
831
|
+
console.error('\nā Claude Code CLI not found. Please install Claude Code:');
|
|
832
|
+
console.error(' https://claude.ai/download');
|
|
833
|
+
} else {
|
|
834
|
+
console.error('\nā Failed to launch Claude Code:', err.message);
|
|
835
|
+
}
|
|
836
|
+
process.exit(1);
|
|
837
|
+
});
|
|
838
|
+
|
|
839
|
+
return;
|
|
840
|
+
}
|
|
841
|
+
|
|
842
|
+
// Check if claude command exists
|
|
843
|
+
let claudeAvailable = false;
|
|
844
|
+
try {
|
|
845
|
+
execSync('which claude', { stdio: 'ignore' });
|
|
846
|
+
claudeAvailable = true;
|
|
847
|
+
} catch {
|
|
848
|
+
console.log('ā ļø Claude Code CLI not found in PATH');
|
|
849
|
+
console.log('Install it with: npm install -g @anthropic-ai/claude-code');
|
|
850
|
+
console.log('Or use --claude flag to open Claude Code CLI');
|
|
851
|
+
console.log('\nWould spawn Claude Code with swarm objective:');
|
|
852
|
+
console.log(`š Objective: ${objective}`);
|
|
853
|
+
console.log('\nOptions:');
|
|
854
|
+
console.log(' ⢠Use --executor flag for built-in executor: claude-flow swarm "objective" --executor');
|
|
855
|
+
console.log(' ⢠Use --claude flag to open Claude Code CLI: claude-flow swarm "objective" --claude');
|
|
856
|
+
return;
|
|
857
|
+
}
|
|
858
|
+
|
|
859
|
+
// Claude is available, use it to run swarm
|
|
860
|
+
console.log('š Launching Claude Flow Swarm System...');
|
|
861
|
+
console.log(`š Objective: ${objective}`);
|
|
862
|
+
console.log(`šÆ Strategy: ${flags.strategy || 'auto'}`);
|
|
863
|
+
console.log(`šļø Mode: ${flags.mode || 'centralized'}`);
|
|
864
|
+
console.log(`š¤ Max Agents: ${flags['max-agents'] || 5}`);
|
|
865
|
+
if (isAnalysisMode) {
|
|
866
|
+
console.log(`š Analysis Mode: ENABLED (Read-Only - No Code Changes)`);
|
|
867
|
+
}
|
|
868
|
+
console.log();
|
|
869
|
+
|
|
870
|
+
// Continue with the default swarm behavior if not using --claude flag
|
|
871
|
+
|
|
790
872
|
// Pass the prompt directly as an argument to claude
|
|
791
873
|
const claudeArgs = [swarmPrompt];
|
|
792
874
|
|
|
@@ -812,8 +894,9 @@ The swarm should be self-documenting - use memory_store to save all important in
|
|
|
812
894
|
claudeArgs.push('--output-format', 'stream-json'); // JSON streaming
|
|
813
895
|
claudeArgs.push('--verbose'); // Verbose output
|
|
814
896
|
|
|
815
|
-
console.log('š¤ Running in non-interactive mode with Claude');
|
|
897
|
+
console.log('š¤ Running in non-interactive mode with Claude CLI');
|
|
816
898
|
console.log('š Command: claude [prompt] -p --output-format stream-json --verbose');
|
|
899
|
+
console.log('š” Tip: Use --claude flag to open Claude Code CLI instead');
|
|
817
900
|
}
|
|
818
901
|
|
|
819
902
|
// Spawn claude with the prompt as the first argument
|
|
@@ -1400,6 +1483,7 @@ OPTIONS:
|
|
|
1400
1483
|
--verbose Enable detailed logging
|
|
1401
1484
|
--dry-run Show configuration without executing
|
|
1402
1485
|
--executor Use built-in executor instead of Claude Code
|
|
1486
|
+
--claude Open Claude Code CLI
|
|
1403
1487
|
--output-format <format> Output format: json, text (default: text)
|
|
1404
1488
|
--output-file <path> Save output to file instead of stdout
|
|
1405
1489
|
--no-interactive Run in non-interactive mode (auto-enabled with --output-format json)
|
|
@@ -3,21 +3,18 @@
|
|
|
3
3
|
* This file provides type-safe access to dynamically loaded agent definitions
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
import {
|
|
6
|
+
import {
|
|
7
|
+
getAvailableAgentTypes,
|
|
8
|
+
isValidAgentType as validateAgentType,
|
|
9
|
+
resolveLegacyAgentType as resolveLegacy,
|
|
10
|
+
LEGACY_AGENT_MAPPING as LEGACY_MAPPING
|
|
11
|
+
} from '../agents/agent-loader.js';
|
|
7
12
|
|
|
8
13
|
// Dynamic agent type - will be a string that matches available agents
|
|
9
14
|
export type AgentType = string;
|
|
10
15
|
|
|
11
|
-
//
|
|
12
|
-
export const LEGACY_AGENT_MAPPING =
|
|
13
|
-
analyst: 'code-analyzer',
|
|
14
|
-
coordinator: 'task-orchestrator',
|
|
15
|
-
optimizer: 'perf-analyzer',
|
|
16
|
-
documenter: 'api-docs',
|
|
17
|
-
monitor: 'performance-benchmarker',
|
|
18
|
-
specialist: 'system-architect',
|
|
19
|
-
architect: 'system-architect',
|
|
20
|
-
} as const;
|
|
16
|
+
// Re-export legacy mapping from agent-loader
|
|
17
|
+
export const LEGACY_AGENT_MAPPING = LEGACY_MAPPING;
|
|
21
18
|
|
|
22
19
|
/**
|
|
23
20
|
* Get all valid agent types dynamically
|
|
@@ -36,10 +33,7 @@ export async function isValidAgentType(type: string): Promise<boolean> {
|
|
|
36
33
|
/**
|
|
37
34
|
* Resolve legacy agent types to current equivalents
|
|
38
35
|
*/
|
|
39
|
-
export
|
|
40
|
-
const mapped = LEGACY_AGENT_MAPPING[legacyType as keyof typeof LEGACY_AGENT_MAPPING];
|
|
41
|
-
return mapped || legacyType;
|
|
42
|
-
}
|
|
36
|
+
export const resolveLegacyAgentType = resolveLegacy;
|
|
43
37
|
|
|
44
38
|
/**
|
|
45
39
|
* Create JSON Schema for agent type validation (async)
|