@claude-flow/cli 3.0.0-alpha.13 → 3.0.0-alpha.15

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (106) hide show
  1. package/dist/src/commands/doctor.d.ts.map +1 -1
  2. package/dist/src/commands/doctor.js +75 -2
  3. package/dist/src/commands/doctor.js.map +1 -1
  4. package/dist/tsconfig.tsbuildinfo +1 -1
  5. package/package.json +12 -4
  6. package/.agentic-flow/intelligence.json +0 -17
  7. package/.claude-flow/agents/store.json +0 -16
  8. package/.claude-flow/daemon-state.json +0 -123
  9. package/.claude-flow/daemon-test.log +0 -0
  10. package/.claude-flow/daemon.log +0 -0
  11. package/.claude-flow/daemon2.log +0 -0
  12. package/.claude-flow/daemon3.log +0 -0
  13. package/.claude-flow/hive-mind/state.json +0 -51
  14. package/.claude-flow/metrics/agent-metrics.json +0 -1
  15. package/.claude-flow/metrics/codebase-map.json +0 -11
  16. package/.claude-flow/metrics/consolidation.json +0 -6
  17. package/.claude-flow/metrics/performance.json +0 -87
  18. package/.claude-flow/metrics/security-audit.json +0 -10
  19. package/.claude-flow/metrics/task-metrics.json +0 -10
  20. package/.claude-flow/metrics/test-gaps.json +0 -6
  21. package/__tests__/README.md +0 -140
  22. package/__tests__/TEST_SUMMARY.md +0 -144
  23. package/__tests__/cli.test.ts +0 -558
  24. package/__tests__/commands.test.ts +0 -726
  25. package/__tests__/config-adapter.test.ts +0 -362
  26. package/__tests__/config-loading.test.ts +0 -106
  27. package/__tests__/coverage/.tmp/coverage-0.json +0 -1
  28. package/__tests__/coverage/.tmp/coverage-1.json +0 -1
  29. package/__tests__/coverage/.tmp/coverage-2.json +0 -1
  30. package/__tests__/coverage/.tmp/coverage-3.json +0 -1
  31. package/__tests__/coverage/.tmp/coverage-4.json +0 -1
  32. package/__tests__/coverage/.tmp/coverage-5.json +0 -1
  33. package/__tests__/mcp-client.test.ts +0 -480
  34. package/__tests__/p1-commands.test.ts +0 -1064
  35. package/agents/architect.yaml +0 -11
  36. package/agents/coder.yaml +0 -11
  37. package/agents/reviewer.yaml +0 -10
  38. package/agents/security-architect.yaml +0 -10
  39. package/agents/tester.yaml +0 -10
  40. package/docs/CONFIG_LOADING.md +0 -236
  41. package/docs/IMPLEMENTATION_COMPLETE.md +0 -421
  42. package/docs/MCP_CLIENT_GUIDE.md +0 -620
  43. package/docs/REFACTORING_SUMMARY.md +0 -247
  44. package/scripts/publish.sh +0 -46
  45. package/src/commands/agent.ts +0 -955
  46. package/src/commands/claims.ts +0 -317
  47. package/src/commands/completions.ts +0 -558
  48. package/src/commands/config.ts +0 -452
  49. package/src/commands/daemon.ts +0 -621
  50. package/src/commands/deployment.ts +0 -323
  51. package/src/commands/doctor.ts +0 -382
  52. package/src/commands/embeddings.ts +0 -686
  53. package/src/commands/hive-mind.ts +0 -928
  54. package/src/commands/hooks.ts +0 -2603
  55. package/src/commands/index.ts +0 -154
  56. package/src/commands/init.ts +0 -597
  57. package/src/commands/mcp.ts +0 -753
  58. package/src/commands/memory.ts +0 -1161
  59. package/src/commands/migrate.ts +0 -447
  60. package/src/commands/neural.ts +0 -253
  61. package/src/commands/performance.ts +0 -292
  62. package/src/commands/plugins.ts +0 -316
  63. package/src/commands/process.ts +0 -695
  64. package/src/commands/providers.ts +0 -259
  65. package/src/commands/security.ts +0 -288
  66. package/src/commands/session.ts +0 -891
  67. package/src/commands/start.ts +0 -457
  68. package/src/commands/status.ts +0 -736
  69. package/src/commands/swarm.ts +0 -648
  70. package/src/commands/task.ts +0 -792
  71. package/src/commands/workflow.ts +0 -742
  72. package/src/config-adapter.ts +0 -210
  73. package/src/index.ts +0 -443
  74. package/src/infrastructure/in-memory-repositories.ts +0 -310
  75. package/src/init/claudemd-generator.ts +0 -631
  76. package/src/init/executor.ts +0 -762
  77. package/src/init/helpers-generator.ts +0 -628
  78. package/src/init/index.ts +0 -60
  79. package/src/init/mcp-generator.ts +0 -83
  80. package/src/init/settings-generator.ts +0 -284
  81. package/src/init/statusline-generator.ts +0 -211
  82. package/src/init/types.ts +0 -447
  83. package/src/mcp-client.ts +0 -241
  84. package/src/mcp-server.ts +0 -577
  85. package/src/mcp-tools/agent-tools.ts +0 -466
  86. package/src/mcp-tools/config-tools.ts +0 -370
  87. package/src/mcp-tools/hive-mind-tools.ts +0 -521
  88. package/src/mcp-tools/hooks-tools.ts +0 -1888
  89. package/src/mcp-tools/index.ts +0 -16
  90. package/src/mcp-tools/memory-tools.ts +0 -270
  91. package/src/mcp-tools/session-tools.ts +0 -359
  92. package/src/mcp-tools/swarm-tools.ts +0 -105
  93. package/src/mcp-tools/task-tools.ts +0 -347
  94. package/src/mcp-tools/types.ts +0 -33
  95. package/src/mcp-tools/workflow-tools.ts +0 -573
  96. package/src/output.ts +0 -639
  97. package/src/parser.ts +0 -417
  98. package/src/prompt.ts +0 -619
  99. package/src/services/index.ts +0 -15
  100. package/src/services/worker-daemon.ts +0 -726
  101. package/src/suggest.ts +0 -245
  102. package/src/types.ts +0 -287
  103. package/tmp.json +0 -0
  104. package/tsconfig.json +0 -16
  105. package/tsconfig.tsbuildinfo +0 -1
  106. package/vitest.config.ts +0 -13
@@ -1,11 +0,0 @@
1
- # architect agent configuration
2
- type: architect
3
- version: "3.0.0"
4
- capabilities:
5
- - system-design
6
- - api-design
7
- - documentation
8
- optimizations:
9
- - context-caching
10
- - memory-persistence
11
- createdAt: "2026-01-07T04:38:55.779Z"
package/agents/coder.yaml DELETED
@@ -1,11 +0,0 @@
1
- # coder agent configuration
2
- type: coder
3
- version: "3.0.0"
4
- capabilities:
5
- - code-generation
6
- - refactoring
7
- - debugging
8
- optimizations:
9
- - flash-attention
10
- - token-reduction
11
- createdAt: "2026-01-07T04:38:55.778Z"
@@ -1,10 +0,0 @@
1
- # reviewer agent configuration
2
- type: reviewer
3
- version: "3.0.0"
4
- capabilities:
5
- - code-review
6
- - quality-analysis
7
- - best-practices
8
- optimizations:
9
- - incremental-analysis
10
- createdAt: "2026-01-07T04:38:55.779Z"
@@ -1,10 +0,0 @@
1
- # security-architect agent configuration
2
- type: security-architect
3
- version: "3.0.0"
4
- capabilities:
5
- - threat-modeling
6
- - vulnerability-analysis
7
- - security-review
8
- optimizations:
9
- - pattern-matching
10
- createdAt: "2026-01-07T04:38:55.779Z"
@@ -1,10 +0,0 @@
1
- # tester agent configuration
2
- type: tester
3
- version: "3.0.0"
4
- capabilities:
5
- - unit-testing
6
- - integration-testing
7
- - coverage
8
- optimizations:
9
- - parallel-execution
10
- createdAt: "2026-01-07T04:38:55.779Z"
@@ -1,236 +0,0 @@
1
- # CLI Configuration Loading
2
-
3
- ## Overview
4
-
5
- The CLI module now supports loading configuration from multiple sources with proper validation and type conversion.
6
-
7
- ## Implementation
8
-
9
- ### Files Added/Modified
10
-
11
- 1. **`src/config-adapter.ts`** (NEW)
12
- - Converts between `SystemConfig` (from `@claude-flow/shared`) and `V3Config` (CLI-specific format)
13
- - Provides bidirectional conversion functions:
14
- - `systemConfigToV3Config()` - Convert SystemConfig to V3Config
15
- - `v3ConfigToSystemConfig()` - Convert V3Config to SystemConfig
16
-
17
- 2. **`src/index.ts`** (MODIFIED)
18
- - Implemented `loadConfig()` method (previously TODO)
19
- - Loads configuration from file or default search paths
20
- - Handles errors gracefully (config loading is optional)
21
- - Displays warnings when config validation fails
22
-
23
- 3. **`__tests__/config-adapter.test.ts`** (NEW)
24
- - Unit tests for config conversion functions
25
- - Tests minimal configs, missing fields, and round-trip conversion
26
- - Verifies different coordination strategies
27
-
28
- 4. **`__tests__/config-loading.test.ts`** (NEW)
29
- - Integration tests for config loading
30
- - Tests file loading, missing files, and invalid JSON
31
-
32
- ## Configuration Sources
33
-
34
- The CLI loads configuration in the following priority order:
35
-
36
- 1. **Explicit file path** - When `--config` flag is provided
37
- 2. **Auto-discovery** - Searches for config files in:
38
- - Current working directory
39
- - Parent directory
40
- - `~/.claude-flow/`
41
-
42
- ### Supported Config Files
43
-
44
- - `claude-flow.config.json`
45
- - `claude-flow.config.js`
46
- - `claude-flow.json`
47
- - `.claude-flow.json`
48
-
49
- ## Environment Variables
50
-
51
- Configuration can also be overridden via environment variables:
52
-
53
- - `CLAUDE_FLOW_MAX_AGENTS` - Maximum concurrent agents
54
- - `CLAUDE_FLOW_DATA_DIR` - Data directory path
55
- - `CLAUDE_FLOW_MEMORY_TYPE` - Memory backend type
56
- - `CLAUDE_FLOW_MCP_TRANSPORT` - MCP transport type
57
- - `CLAUDE_FLOW_MCP_PORT` - MCP server port
58
- - `CLAUDE_FLOW_SWARM_TOPOLOGY` - Swarm topology type
59
-
60
- ## Configuration Schema
61
-
62
- ### V3Config (CLI Format)
63
-
64
- ```typescript
65
- interface V3Config {
66
- version: string;
67
- projectRoot: string;
68
-
69
- agents: {
70
- defaultType: string;
71
- autoSpawn: boolean;
72
- maxConcurrent: number;
73
- timeout: number;
74
- providers: ProviderConfig[];
75
- };
76
-
77
- swarm: {
78
- topology: 'hierarchical' | 'mesh' | 'ring' | 'star' | 'hybrid';
79
- maxAgents: number;
80
- autoScale: boolean;
81
- coordinationStrategy: 'consensus' | 'leader' | 'distributed';
82
- healthCheckInterval: number;
83
- };
84
-
85
- memory: {
86
- backend: 'agentdb' | 'sqlite' | 'memory' | 'hybrid';
87
- persistPath: string;
88
- cacheSize: number;
89
- enableHNSW: boolean;
90
- vectorDimension: number;
91
- };
92
-
93
- mcp: {
94
- serverHost: string;
95
- serverPort: number;
96
- autoStart: boolean;
97
- transportType: 'stdio' | 'http' | 'websocket';
98
- tools: string[];
99
- };
100
-
101
- cli: {
102
- colorOutput: boolean;
103
- interactive: boolean;
104
- verbosity: 'quiet' | 'normal' | 'verbose' | 'debug';
105
- outputFormat: 'text' | 'json' | 'table';
106
- progressStyle: 'bar' | 'spinner' | 'dots' | 'none';
107
- };
108
-
109
- hooks: {
110
- enabled: boolean;
111
- autoExecute: boolean;
112
- hooks: HookDefinition[];
113
- };
114
- }
115
- ```
116
-
117
- ## Usage Examples
118
-
119
- ### Command Line
120
-
121
- ```bash
122
- # Use default config search paths
123
- claude-flow agent spawn -t coder
124
-
125
- # Use specific config file
126
- claude-flow agent spawn -t coder --config ./custom-config.json
127
-
128
- # Override with environment variables
129
- CLAUDE_FLOW_MAX_AGENTS=20 claude-flow swarm init
130
- ```
131
-
132
- ### Example Config File
133
-
134
- ```json
135
- {
136
- "orchestrator": {
137
- "lifecycle": {
138
- "autoStart": true,
139
- "maxConcurrentAgents": 15,
140
- "shutdownTimeoutMs": 30000,
141
- "cleanupOrphanedAgents": true
142
- },
143
- "session": {
144
- "dataDir": "./data",
145
- "persistState": true,
146
- "stateFile": "session.json"
147
- },
148
- "monitoring": {
149
- "enabled": true,
150
- "metricsIntervalMs": 5000,
151
- "healthCheckIntervalMs": 10000
152
- }
153
- },
154
- "swarm": {
155
- "topology": "hierarchical-mesh",
156
- "maxAgents": 15
157
- },
158
- "memory": {
159
- "type": "hybrid",
160
- "agentdb": {
161
- "dimensions": 1536,
162
- "indexType": "hnsw"
163
- }
164
- },
165
- "mcp": {
166
- "enabled": true,
167
- "transport": {
168
- "type": "stdio",
169
- "host": "localhost",
170
- "port": 3000
171
- },
172
- "enabledTools": ["agent/*", "swarm/*", "memory/*"]
173
- },
174
- "logging": {
175
- "level": "info",
176
- "pretty": true,
177
- "destination": "console",
178
- "format": "text"
179
- },
180
- "hooks": {
181
- "enabled": true,
182
- "autoExecute": false,
183
- "definitions": []
184
- }
185
- }
186
- ```
187
-
188
- ## Error Handling
189
-
190
- The config loading implementation handles errors gracefully:
191
-
192
- 1. **File not found** - Falls back to default configuration
193
- 2. **Invalid JSON** - Logs warning and uses defaults
194
- 3. **Validation errors** - Displays warnings for invalid fields
195
- 4. **Missing required fields** - Merges with default values
196
-
197
- Debug mode (`DEBUG=1`) provides additional error details.
198
-
199
- ## Testing
200
-
201
- All tests pass successfully:
202
-
203
- ```bash
204
- # Run config adapter unit tests
205
- npx vitest run __tests__/config-adapter.test.ts
206
-
207
- # Run config loading integration tests
208
- npx vitest run __tests__/config-loading.test.ts
209
- ```
210
-
211
- ### Test Coverage
212
-
213
- - ✅ SystemConfig to V3Config conversion
214
- - ✅ V3Config to SystemConfig conversion
215
- - ✅ Round-trip conversion preserves values
216
- - ✅ Handles missing optional fields
217
- - ✅ Different coordination strategies
218
- - ✅ File loading
219
- - ✅ Missing file handling
220
- - ✅ Invalid JSON handling
221
-
222
- ## Architecture Decisions
223
-
224
- 1. **Adapter Pattern** - Separates SystemConfig (shared) from V3Config (CLI-specific)
225
- 2. **Optional Loading** - Config files are optional, failures don't crash CLI
226
- 3. **Validation** - Uses existing Zod schemas from `@claude-flow/shared`
227
- 4. **Merge Strategy** - Merges loaded config with defaults
228
- 5. **Environment Priority** - Environment variables override file config
229
-
230
- ## Future Enhancements
231
-
232
- - [ ] TypeScript config support (`.ts` files)
233
- - [ ] Config validation command (`claude-flow config validate`)
234
- - [ ] Config migration tool (v2 → v3)
235
- - [ ] Interactive config setup wizard
236
- - [ ] Schema documentation generation