claude-flow 3.0.0-alpha.10 → 3.0.0-alpha.11

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 (239) hide show
  1. package/package.json +10 -23
  2. package/README.md +0 -1186
  3. package/bin/cli.js +0 -14
  4. package/dist/src/commands/agent.d.ts +0 -8
  5. package/dist/src/commands/agent.d.ts.map +0 -1
  6. package/dist/src/commands/agent.js +0 -819
  7. package/dist/src/commands/agent.js.map +0 -1
  8. package/dist/src/commands/config.d.ts +0 -8
  9. package/dist/src/commands/config.d.ts.map +0 -1
  10. package/dist/src/commands/config.js +0 -406
  11. package/dist/src/commands/config.js.map +0 -1
  12. package/dist/src/commands/daemon.d.ts +0 -8
  13. package/dist/src/commands/daemon.d.ts.map +0 -1
  14. package/dist/src/commands/daemon.js +0 -545
  15. package/dist/src/commands/daemon.js.map +0 -1
  16. package/dist/src/commands/hive-mind.d.ts +0 -8
  17. package/dist/src/commands/hive-mind.d.ts.map +0 -1
  18. package/dist/src/commands/hive-mind.js +0 -844
  19. package/dist/src/commands/hive-mind.js.map +0 -1
  20. package/dist/src/commands/hooks.d.ts +0 -8
  21. package/dist/src/commands/hooks.d.ts.map +0 -1
  22. package/dist/src/commands/hooks.js +0 -2098
  23. package/dist/src/commands/hooks.js.map +0 -1
  24. package/dist/src/commands/index.d.ts +0 -52
  25. package/dist/src/commands/index.d.ts.map +0 -1
  26. package/dist/src/commands/index.js +0 -108
  27. package/dist/src/commands/index.js.map +0 -1
  28. package/dist/src/commands/init.d.ts +0 -8
  29. package/dist/src/commands/init.d.ts.map +0 -1
  30. package/dist/src/commands/init.js +0 -532
  31. package/dist/src/commands/init.js.map +0 -1
  32. package/dist/src/commands/mcp.d.ts +0 -11
  33. package/dist/src/commands/mcp.d.ts.map +0 -1
  34. package/dist/src/commands/mcp.js +0 -662
  35. package/dist/src/commands/mcp.js.map +0 -1
  36. package/dist/src/commands/memory.d.ts +0 -8
  37. package/dist/src/commands/memory.d.ts.map +0 -1
  38. package/dist/src/commands/memory.js +0 -977
  39. package/dist/src/commands/memory.js.map +0 -1
  40. package/dist/src/commands/migrate.d.ts +0 -8
  41. package/dist/src/commands/migrate.d.ts.map +0 -1
  42. package/dist/src/commands/migrate.js +0 -398
  43. package/dist/src/commands/migrate.js.map +0 -1
  44. package/dist/src/commands/process.d.ts +0 -10
  45. package/dist/src/commands/process.d.ts.map +0 -1
  46. package/dist/src/commands/process.js +0 -641
  47. package/dist/src/commands/process.js.map +0 -1
  48. package/dist/src/commands/session.d.ts +0 -8
  49. package/dist/src/commands/session.d.ts.map +0 -1
  50. package/dist/src/commands/session.js +0 -750
  51. package/dist/src/commands/session.js.map +0 -1
  52. package/dist/src/commands/start.d.ts +0 -8
  53. package/dist/src/commands/start.d.ts.map +0 -1
  54. package/dist/src/commands/start.js +0 -398
  55. package/dist/src/commands/start.js.map +0 -1
  56. package/dist/src/commands/status.d.ts +0 -8
  57. package/dist/src/commands/status.d.ts.map +0 -1
  58. package/dist/src/commands/status.js +0 -584
  59. package/dist/src/commands/status.js.map +0 -1
  60. package/dist/src/commands/swarm.d.ts +0 -8
  61. package/dist/src/commands/swarm.d.ts.map +0 -1
  62. package/dist/src/commands/swarm.js +0 -573
  63. package/dist/src/commands/swarm.js.map +0 -1
  64. package/dist/src/commands/task.d.ts +0 -8
  65. package/dist/src/commands/task.d.ts.map +0 -1
  66. package/dist/src/commands/task.js +0 -671
  67. package/dist/src/commands/task.js.map +0 -1
  68. package/dist/src/commands/workflow.d.ts +0 -8
  69. package/dist/src/commands/workflow.d.ts.map +0 -1
  70. package/dist/src/commands/workflow.js +0 -617
  71. package/dist/src/commands/workflow.js.map +0 -1
  72. package/dist/src/config-adapter.d.ts +0 -15
  73. package/dist/src/config-adapter.d.ts.map +0 -1
  74. package/dist/src/config-adapter.js +0 -185
  75. package/dist/src/config-adapter.js.map +0 -1
  76. package/dist/src/index.d.ts +0 -55
  77. package/dist/src/index.d.ts.map +0 -1
  78. package/dist/src/index.js +0 -353
  79. package/dist/src/index.js.map +0 -1
  80. package/dist/src/infrastructure/in-memory-repositories.d.ts +0 -68
  81. package/dist/src/infrastructure/in-memory-repositories.d.ts.map +0 -1
  82. package/dist/src/infrastructure/in-memory-repositories.js +0 -264
  83. package/dist/src/infrastructure/in-memory-repositories.js.map +0 -1
  84. package/dist/src/init/claudemd-generator.d.ts +0 -15
  85. package/dist/src/init/claudemd-generator.d.ts.map +0 -1
  86. package/dist/src/init/claudemd-generator.js +0 -626
  87. package/dist/src/init/claudemd-generator.js.map +0 -1
  88. package/dist/src/init/executor.d.ts +0 -11
  89. package/dist/src/init/executor.d.ts.map +0 -1
  90. package/dist/src/init/executor.js +0 -652
  91. package/dist/src/init/executor.js.map +0 -1
  92. package/dist/src/init/helpers-generator.d.ts +0 -42
  93. package/dist/src/init/helpers-generator.d.ts.map +0 -1
  94. package/dist/src/init/helpers-generator.js +0 -613
  95. package/dist/src/init/helpers-generator.js.map +0 -1
  96. package/dist/src/init/index.d.ts +0 -12
  97. package/dist/src/init/index.d.ts.map +0 -1
  98. package/dist/src/init/index.js +0 -15
  99. package/dist/src/init/index.js.map +0 -1
  100. package/dist/src/init/mcp-generator.d.ts +0 -18
  101. package/dist/src/init/mcp-generator.d.ts.map +0 -1
  102. package/dist/src/init/mcp-generator.js +0 -71
  103. package/dist/src/init/mcp-generator.js.map +0 -1
  104. package/dist/src/init/settings-generator.d.ts +0 -14
  105. package/dist/src/init/settings-generator.d.ts.map +0 -1
  106. package/dist/src/init/settings-generator.js +0 -267
  107. package/dist/src/init/settings-generator.js.map +0 -1
  108. package/dist/src/init/statusline-generator.d.ts +0 -14
  109. package/dist/src/init/statusline-generator.d.ts.map +0 -1
  110. package/dist/src/init/statusline-generator.js +0 -206
  111. package/dist/src/init/statusline-generator.js.map +0 -1
  112. package/dist/src/init/types.d.ts +0 -240
  113. package/dist/src/init/types.d.ts.map +0 -1
  114. package/dist/src/init/types.js +0 -210
  115. package/dist/src/init/types.js.map +0 -1
  116. package/dist/src/mcp-client.d.ts +0 -92
  117. package/dist/src/mcp-client.d.ts.map +0 -1
  118. package/dist/src/mcp-client.js +0 -203
  119. package/dist/src/mcp-client.js.map +0 -1
  120. package/dist/src/mcp-server.d.ts +0 -153
  121. package/dist/src/mcp-server.d.ts.map +0 -1
  122. package/dist/src/mcp-server.js +0 -453
  123. package/dist/src/mcp-server.js.map +0 -1
  124. package/dist/src/mcp-tools/agent-tools.d.ts +0 -8
  125. package/dist/src/mcp-tools/agent-tools.d.ts.map +0 -1
  126. package/dist/src/mcp-tools/agent-tools.js +0 -426
  127. package/dist/src/mcp-tools/agent-tools.js.map +0 -1
  128. package/dist/src/mcp-tools/config-tools.d.ts +0 -8
  129. package/dist/src/mcp-tools/config-tools.d.ts.map +0 -1
  130. package/dist/src/mcp-tools/config-tools.js +0 -333
  131. package/dist/src/mcp-tools/config-tools.js.map +0 -1
  132. package/dist/src/mcp-tools/hive-mind-tools.d.ts +0 -8
  133. package/dist/src/mcp-tools/hive-mind-tools.d.ts.map +0 -1
  134. package/dist/src/mcp-tools/hive-mind-tools.js +0 -447
  135. package/dist/src/mcp-tools/hive-mind-tools.js.map +0 -1
  136. package/dist/src/mcp-tools/hooks-tools.d.ts +0 -41
  137. package/dist/src/mcp-tools/hooks-tools.d.ts.map +0 -1
  138. package/dist/src/mcp-tools/hooks-tools.js +0 -1711
  139. package/dist/src/mcp-tools/hooks-tools.js.map +0 -1
  140. package/dist/src/mcp-tools/index.d.ts +0 -16
  141. package/dist/src/mcp-tools/index.d.ts.map +0 -1
  142. package/dist/src/mcp-tools/index.js +0 -15
  143. package/dist/src/mcp-tools/index.js.map +0 -1
  144. package/dist/src/mcp-tools/memory-tools.d.ts +0 -8
  145. package/dist/src/mcp-tools/memory-tools.d.ts.map +0 -1
  146. package/dist/src/mcp-tools/memory-tools.js +0 -235
  147. package/dist/src/mcp-tools/memory-tools.js.map +0 -1
  148. package/dist/src/mcp-tools/session-tools.d.ts +0 -8
  149. package/dist/src/mcp-tools/session-tools.d.ts.map +0 -1
  150. package/dist/src/mcp-tools/session-tools.js +0 -315
  151. package/dist/src/mcp-tools/session-tools.js.map +0 -1
  152. package/dist/src/mcp-tools/swarm-tools.d.ts +0 -8
  153. package/dist/src/mcp-tools/swarm-tools.d.ts.map +0 -1
  154. package/dist/src/mcp-tools/swarm-tools.js +0 -102
  155. package/dist/src/mcp-tools/swarm-tools.js.map +0 -1
  156. package/dist/src/mcp-tools/task-tools.d.ts +0 -8
  157. package/dist/src/mcp-tools/task-tools.d.ts.map +0 -1
  158. package/dist/src/mcp-tools/task-tools.js +0 -302
  159. package/dist/src/mcp-tools/task-tools.js.map +0 -1
  160. package/dist/src/mcp-tools/types.d.ts +0 -31
  161. package/dist/src/mcp-tools/types.d.ts.map +0 -1
  162. package/dist/src/mcp-tools/types.js +0 -7
  163. package/dist/src/mcp-tools/types.js.map +0 -1
  164. package/dist/src/mcp-tools/workflow-tools.d.ts +0 -8
  165. package/dist/src/mcp-tools/workflow-tools.d.ts.map +0 -1
  166. package/dist/src/mcp-tools/workflow-tools.js +0 -481
  167. package/dist/src/mcp-tools/workflow-tools.js.map +0 -1
  168. package/dist/src/output.d.ts +0 -133
  169. package/dist/src/output.d.ts.map +0 -1
  170. package/dist/src/output.js +0 -513
  171. package/dist/src/output.js.map +0 -1
  172. package/dist/src/parser.d.ts +0 -41
  173. package/dist/src/parser.d.ts.map +0 -1
  174. package/dist/src/parser.js +0 -353
  175. package/dist/src/parser.js.map +0 -1
  176. package/dist/src/prompt.d.ts +0 -44
  177. package/dist/src/prompt.d.ts.map +0 -1
  178. package/dist/src/prompt.js +0 -501
  179. package/dist/src/prompt.js.map +0 -1
  180. package/dist/src/services/index.d.ts +0 -7
  181. package/dist/src/services/index.d.ts.map +0 -1
  182. package/dist/src/services/index.js +0 -6
  183. package/dist/src/services/index.js.map +0 -1
  184. package/dist/src/services/worker-daemon.d.ts +0 -153
  185. package/dist/src/services/worker-daemon.d.ts.map +0 -1
  186. package/dist/src/services/worker-daemon.js +0 -567
  187. package/dist/src/services/worker-daemon.js.map +0 -1
  188. package/dist/src/types.d.ts +0 -198
  189. package/dist/src/types.d.ts.map +0 -1
  190. package/dist/src/types.js +0 -38
  191. package/dist/src/types.js.map +0 -1
  192. package/dist/tsconfig.tsbuildinfo +0 -1
  193. package/src/commands/agent.ts +0 -955
  194. package/src/commands/config.ts +0 -452
  195. package/src/commands/daemon.ts +0 -621
  196. package/src/commands/hive-mind.ts +0 -928
  197. package/src/commands/hooks.ts +0 -2603
  198. package/src/commands/index.ts +0 -118
  199. package/src/commands/init.ts +0 -597
  200. package/src/commands/mcp.ts +0 -753
  201. package/src/commands/memory.ts +0 -1161
  202. package/src/commands/migrate.ts +0 -447
  203. package/src/commands/process.ts +0 -695
  204. package/src/commands/session.ts +0 -891
  205. package/src/commands/start.ts +0 -457
  206. package/src/commands/status.ts +0 -736
  207. package/src/commands/swarm.ts +0 -648
  208. package/src/commands/task.ts +0 -792
  209. package/src/commands/workflow.ts +0 -742
  210. package/src/config-adapter.ts +0 -210
  211. package/src/index.ts +0 -427
  212. package/src/infrastructure/in-memory-repositories.ts +0 -310
  213. package/src/init/claudemd-generator.ts +0 -631
  214. package/src/init/executor.ts +0 -762
  215. package/src/init/helpers-generator.ts +0 -628
  216. package/src/init/index.ts +0 -60
  217. package/src/init/mcp-generator.ts +0 -83
  218. package/src/init/settings-generator.ts +0 -284
  219. package/src/init/statusline-generator.ts +0 -211
  220. package/src/init/types.ts +0 -447
  221. package/src/mcp-client.ts +0 -241
  222. package/src/mcp-server.ts +0 -577
  223. package/src/mcp-tools/agent-tools.ts +0 -466
  224. package/src/mcp-tools/config-tools.ts +0 -370
  225. package/src/mcp-tools/hive-mind-tools.ts +0 -521
  226. package/src/mcp-tools/hooks-tools.ts +0 -1888
  227. package/src/mcp-tools/index.ts +0 -16
  228. package/src/mcp-tools/memory-tools.ts +0 -270
  229. package/src/mcp-tools/session-tools.ts +0 -359
  230. package/src/mcp-tools/swarm-tools.ts +0 -105
  231. package/src/mcp-tools/task-tools.ts +0 -347
  232. package/src/mcp-tools/types.ts +0 -33
  233. package/src/mcp-tools/workflow-tools.ts +0 -573
  234. package/src/output.ts +0 -639
  235. package/src/parser.ts +0 -417
  236. package/src/prompt.ts +0 -619
  237. package/src/services/index.ts +0 -15
  238. package/src/services/worker-daemon.ts +0 -726
  239. package/src/types.ts +0 -287
@@ -1,18 +0,0 @@
1
- /**
2
- * MCP Configuration Generator
3
- * Creates .mcp.json for Claude Code MCP server integration
4
- */
5
- import type { InitOptions } from './types.js';
6
- /**
7
- * Generate MCP configuration
8
- */
9
- export declare function generateMCPConfig(options: InitOptions): object;
10
- /**
11
- * Generate .mcp.json as formatted string
12
- */
13
- export declare function generateMCPJson(options: InitOptions): string;
14
- /**
15
- * Generate MCP server add commands for manual setup
16
- */
17
- export declare function generateMCPCommands(options: InitOptions): string[];
18
- //# sourceMappingURL=mcp-generator.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"mcp-generator.d.ts","sourceRoot":"","sources":["../../../src/init/mcp-generator.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAa,MAAM,YAAY,CAAC;AAEzD;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,WAAW,GAAG,MAAM,CA0C9D;AAED;;GAEG;AACH,wBAAgB,eAAe,CAAC,OAAO,EAAE,WAAW,GAAG,MAAM,CAG5D;AAED;;GAEG;AACH,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,WAAW,GAAG,MAAM,EAAE,CAiBlE"}
@@ -1,71 +0,0 @@
1
- /**
2
- * MCP Configuration Generator
3
- * Creates .mcp.json for Claude Code MCP server integration
4
- */
5
- /**
6
- * Generate MCP configuration
7
- */
8
- export function generateMCPConfig(options) {
9
- const config = options.mcp;
10
- const mcpServers = {};
11
- // Claude Flow MCP server (core)
12
- if (config.claudeFlow) {
13
- mcpServers['claude-flow'] = {
14
- command: 'npx',
15
- args: ['@claude-flow/cli', 'mcp', 'start'],
16
- env: {
17
- CLAUDE_FLOW_MODE: 'v3',
18
- CLAUDE_FLOW_HOOKS_ENABLED: 'true',
19
- CLAUDE_FLOW_TOPOLOGY: options.runtime.topology,
20
- CLAUDE_FLOW_MAX_AGENTS: String(options.runtime.maxAgents),
21
- CLAUDE_FLOW_MEMORY_BACKEND: options.runtime.memoryBackend,
22
- },
23
- autoStart: config.autoStart,
24
- };
25
- }
26
- // Ruv-Swarm MCP server (enhanced coordination)
27
- if (config.ruvSwarm) {
28
- mcpServers['ruv-swarm'] = {
29
- command: 'npx',
30
- args: ['ruv-swarm', 'mcp', 'start'],
31
- env: {},
32
- optional: true,
33
- };
34
- }
35
- // Flow Nexus MCP server (cloud features)
36
- if (config.flowNexus) {
37
- mcpServers['flow-nexus'] = {
38
- command: 'npx',
39
- args: ['flow-nexus@latest', 'mcp', 'start'],
40
- env: {},
41
- optional: true,
42
- requiresAuth: true,
43
- };
44
- }
45
- return { mcpServers };
46
- }
47
- /**
48
- * Generate .mcp.json as formatted string
49
- */
50
- export function generateMCPJson(options) {
51
- const config = generateMCPConfig(options);
52
- return JSON.stringify(config, null, 2);
53
- }
54
- /**
55
- * Generate MCP server add commands for manual setup
56
- */
57
- export function generateMCPCommands(options) {
58
- const commands = [];
59
- const config = options.mcp;
60
- if (config.claudeFlow) {
61
- commands.push('claude mcp add claude-flow -- npx @claude-flow/cli mcp start');
62
- }
63
- if (config.ruvSwarm) {
64
- commands.push('claude mcp add ruv-swarm -- npx ruv-swarm mcp start');
65
- }
66
- if (config.flowNexus) {
67
- commands.push('claude mcp add flow-nexus -- npx flow-nexus@latest mcp start');
68
- }
69
- return commands;
70
- }
71
- //# sourceMappingURL=mcp-generator.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"mcp-generator.js","sourceRoot":"","sources":["../../../src/init/mcp-generator.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH;;GAEG;AACH,MAAM,UAAU,i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MAAM,GAAG,iBAAiB,CAAC,OAAO,CAAC,CAAC;IAC1C,OAAO,IAAI,CAAC,SAAS,CAAC,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC;AACzC,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,mBAAmB,CAAC,OAAoB;IACtD,MAAM,QAAQ,GAAa,EAAE,CAAC;IAC9B,MAAM,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC;IAE3B,IAAI,MAAM,CAAC,UAAU,EAAE,CAAC;QACtB,QAAQ,CAAC,IAAI,CAAC,8DAA8D,CAAC,CAAC;IAChF,CAAC;IAED,IAAI,MAAM,CAAC,QAAQ,EAAE,CAAC;QACpB,QAAQ,CAAC,IAAI,CAAC,qDAAqD,CAAC,CAAC;IACvE,CAAC;IAED,IAAI,MAAM,CAAC,SAAS,EAAE,CAAC;QACrB,QAAQ,CAAC,IAAI,CAAC,8DAA8D,CAAC,CAAC;IAChF,CAAC;IAED,OAAO,QAAQ,CAAC;AAClB,CAAC"}
@@ -1,14 +0,0 @@
1
- /**
2
- * Settings.json Generator
3
- * Creates .claude/settings.json with V3-optimized hook configurations
4
- */
5
- import type { InitOptions } from './types.js';
6
- /**
7
- * Generate the complete settings.json content
8
- */
9
- export declare function generateSettings(options: InitOptions): object;
10
- /**
11
- * Generate settings.json as formatted string
12
- */
13
- export declare function generateSettingsJson(options: InitOptions): string;
14
- //# sourceMappingURL=settings-generator.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"settings-generator.d.ts","sourceRoot":"","sources":["../../../src/init/settings-generator.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAe,MAAM,YAAY,CAAC;AAE3D;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,WAAW,GAAG,MAAM,CAiD7D;AA0ND;;GAEG;AACH,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,WAAW,GAAG,MAAM,CAGjE"}
@@ -1,267 +0,0 @@
1
- /**
2
- * Settings.json Generator
3
- * Creates .claude/settings.json with V3-optimized hook configurations
4
- */
5
- /**
6
- * Generate the complete settings.json content
7
- */
8
- export function generateSettings(options) {
9
- const settings = {};
10
- // Add hooks if enabled
11
- if (options.components.settings) {
12
- settings.hooks = generateHooksConfig(options.hooks);
13
- }
14
- // Add permissions
15
- settings.permissions = {
16
- // Auto-allow claude-flow MCP tools
17
- allow: [
18
- 'Bash(npx claude-flow*)',
19
- 'Bash(npx @claude-flow/*)',
20
- 'mcp__claude-flow__*',
21
- ],
22
- // Auto-deny dangerous operations
23
- deny: [],
24
- };
25
- // Add model preferences for V3
26
- settings.model = {
27
- default: 'claude-sonnet-4-20250514',
28
- // Use Haiku for quick routing decisions
29
- routing: 'claude-haiku',
30
- };
31
- // Add V3-specific settings
32
- settings.claudeFlow = {
33
- version: '3.0.0',
34
- enabled: true,
35
- swarm: {
36
- topology: options.runtime.topology,
37
- maxAgents: options.runtime.maxAgents,
38
- },
39
- memory: {
40
- backend: options.runtime.memoryBackend,
41
- enableHNSW: options.runtime.enableHNSW,
42
- },
43
- neural: {
44
- enabled: options.runtime.enableNeural,
45
- },
46
- daemon: {
47
- autoStart: true,
48
- workers: ['map', 'audit', 'optimize', 'consolidate', 'testgaps'],
49
- },
50
- };
51
- return settings;
52
- }
53
- /**
54
- * Generate hooks configuration
55
- */
56
- function generateHooksConfig(config) {
57
- const hooks = {};
58
- // PreToolUse hooks
59
- if (config.preToolUse) {
60
- hooks.PreToolUse = [
61
- // File edit hooks
62
- {
63
- matcher: '^(Write|Edit|MultiEdit)$',
64
- hooks: [
65
- {
66
- type: 'command',
67
- command: 'npx claude-flow@v3alpha hooks pre-edit --file "$TOOL_INPUT_file_path" --intelligence',
68
- timeout: config.timeout,
69
- continueOnError: config.continueOnError,
70
- },
71
- ],
72
- },
73
- // Bash command hooks
74
- {
75
- matcher: '^Bash$',
76
- hooks: [
77
- {
78
- type: 'command',
79
- command: 'npx claude-flow@v3alpha hooks pre-command --command "$TOOL_INPUT_command"',
80
- timeout: config.timeout,
81
- continueOnError: config.continueOnError,
82
- },
83
- ],
84
- },
85
- // Task/Agent hooks
86
- {
87
- matcher: '^Task$',
88
- hooks: [
89
- {
90
- type: 'command',
91
- command: 'npx claude-flow@v3alpha hooks pre-task --task-id "task-$(date +%s)" --description "$TOOL_INPUT_prompt"',
92
- timeout: config.timeout,
93
- continueOnError: config.continueOnError,
94
- },
95
- ],
96
- },
97
- // Search hooks
98
- {
99
- matcher: '^(Grep|Glob|Read)$',
100
- hooks: [
101
- {
102
- type: 'command',
103
- command: 'npx claude-flow@v3alpha hooks pre-search --pattern "$TOOL_INPUT_pattern"',
104
- timeout: 2000,
105
- continueOnError: true,
106
- },
107
- ],
108
- },
109
- ];
110
- }
111
- // PostToolUse hooks
112
- if (config.postToolUse) {
113
- hooks.PostToolUse = [
114
- // File edit hooks with learning
115
- {
116
- matcher: '^(Write|Edit|MultiEdit)$',
117
- hooks: [
118
- {
119
- type: 'command',
120
- command: 'npx claude-flow@v3alpha hooks post-edit --file "$TOOL_INPUT_file_path" --success "$TOOL_SUCCESS" --train-patterns',
121
- timeout: config.timeout,
122
- continueOnError: config.continueOnError,
123
- },
124
- ],
125
- },
126
- // Bash command hooks with metrics
127
- {
128
- matcher: '^Bash$',
129
- hooks: [
130
- {
131
- type: 'command',
132
- command: 'npx claude-flow@v3alpha hooks post-command --command "$TOOL_INPUT_command" --success "$TOOL_SUCCESS" --exit-code "$TOOL_EXIT_CODE"',
133
- timeout: config.timeout,
134
- continueOnError: config.continueOnError,
135
- },
136
- ],
137
- },
138
- // Task completion hooks
139
- {
140
- matcher: '^Task$',
141
- hooks: [
142
- {
143
- type: 'command',
144
- command: 'npx claude-flow@v3alpha hooks post-task --agent-id "$TOOL_RESULT_agent_id" --success "$TOOL_SUCCESS" --analyze',
145
- timeout: config.timeout,
146
- continueOnError: config.continueOnError,
147
- },
148
- ],
149
- },
150
- // Search caching
151
- {
152
- matcher: '^(Grep|Glob)$',
153
- hooks: [
154
- {
155
- type: 'command',
156
- command: 'npx claude-flow@v3alpha hooks post-search --cache-results',
157
- timeout: 2000,
158
- continueOnError: true,
159
- },
160
- ],
161
- },
162
- ];
163
- }
164
- // UserPromptSubmit for intelligent routing
165
- if (config.userPromptSubmit) {
166
- hooks.UserPromptSubmit = [
167
- {
168
- hooks: [
169
- {
170
- type: 'command',
171
- command: 'npx claude-flow@v3alpha hooks route --task "$PROMPT" --intelligence --include-explanation',
172
- timeout: config.timeout,
173
- continueOnError: config.continueOnError,
174
- },
175
- ],
176
- },
177
- ];
178
- }
179
- // SessionStart for context loading and daemon auto-start
180
- if (config.sessionStart) {
181
- hooks.SessionStart = [
182
- {
183
- hooks: [
184
- {
185
- type: 'command',
186
- command: 'npx claude-flow@v3alpha daemon start --quiet 2>/dev/null || true',
187
- timeout: 5000,
188
- continueOnError: true,
189
- },
190
- {
191
- type: 'command',
192
- command: 'npx claude-flow@v3alpha hooks session-start --session-id "$SESSION_ID" --load-context',
193
- timeout: 10000,
194
- continueOnError: true,
195
- },
196
- ],
197
- },
198
- ];
199
- }
200
- // Stop hooks for task evaluation
201
- if (config.stop) {
202
- hooks.Stop = [
203
- {
204
- hooks: [
205
- {
206
- type: 'prompt',
207
- prompt: `Evaluate task completion. Consider:
208
- 1. Were all requested changes made?
209
- 2. Did builds/tests pass?
210
- 3. Is follow-up work needed?
211
-
212
- Respond with {"decision": "stop"} if complete, or {"decision": "continue", "reason": "..."} if more work is needed.`,
213
- },
214
- ],
215
- },
216
- ];
217
- }
218
- // Notification hooks
219
- if (config.notification) {
220
- hooks.Notification = [
221
- {
222
- hooks: [
223
- {
224
- type: 'command',
225
- command: 'npx claude-flow@v3alpha hooks notify --message "$NOTIFICATION_MESSAGE" --swarm-status',
226
- timeout: 3000,
227
- continueOnError: true,
228
- },
229
- ],
230
- },
231
- ];
232
- }
233
- // PermissionRequest for auto-allowing claude-flow tools
234
- if (config.permissionRequest) {
235
- hooks.PermissionRequest = [
236
- {
237
- matcher: '^mcp__claude-flow__.*$',
238
- hooks: [
239
- {
240
- type: 'command',
241
- command: 'echo \'{"decision": "allow", "reason": "claude-flow MCP tool auto-approved"}\'',
242
- timeout: 1000,
243
- },
244
- ],
245
- },
246
- {
247
- matcher: '^Bash\\(npx @?claude-flow.*\\)$',
248
- hooks: [
249
- {
250
- type: 'command',
251
- command: 'echo \'{"decision": "allow", "reason": "claude-flow CLI auto-approved"}\'',
252
- timeout: 1000,
253
- },
254
- ],
255
- },
256
- ];
257
- }
258
- return hooks;
259
- }
260
- /**
261
- * Generate settings.json as formatted string
262
- */
263
- export function generateSettingsJson(options) {
264
- const settings = generateSettings(options);
265
- return JSON.stringify(settings, null, 2);
266
- }
267
- //# sourceMappingURL=settings-generator.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"settings-generator.js","sourceRoot":"","sources":["../../../src/init/settings-generator.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH;;GAEG;AACH,MAAM,UAAU,gBAAgB,CAAC,OAAoB;IACnD,MAAM,QAAQ,GAA4B,EAAE,CAAC;IAE7C,uBAAuB;IACvB,IAAI,OAAO,CAAC,UAAU,CAAC,QAAQ,EAAE,CAAC;QAChC,QAAQ,CAAC,KAAK,GAAG,mBAAmB,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;IACtD,CAAC;IAED,kBAAkB;IAClB,QAAQ,CAAC,WAAW,GAAG;QACrB,mCAAmC;QACnC,KAAK,EAAE;YACL,wBAAwB;YACxB,0BAA0B;YAC1B,qBAAqB;SACtB;QACD,iCAAiC;QACjC,IAAI,EAAE,EAAE;KACT,CAAC;IAEF,+BAA+B;IAC/B,QAAQ,CAAC,KAAK,GAAG;QACf,OAAO,EAAE,0BAA0B;QACnC,wCAAwC;QACxC,OAAO,EAAE,cAAc;KACxB,CAAC;IAEF,2BAA2B;IAC3B,QAAQ,CAAC,UAAU,GAAG;QACpB,OAAO,EAAE,OAAO;QAChB,OAAO,EAAE,IAAI;QACb,KAAK,EA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,EAAE;oBACL;wBACE,IAAI,EAAE,SAAS;wBACf,OAAO,EAAE,gFAAgF;wBACzF,OAAO,EAAE,IAAI;qBACd;iBACF;aACF;YACD;gBACE,OAAO,EAAE,iCAAiC;gBAC1C,KAAK,EAAE;oBACL;wBACE,IAAI,EAAE,SAAS;wBACf,OAAO,EAAE,2EAA2E;wBACpF,OAAO,EAAE,IAAI;qBACd;iBACF;aACF;SACF,CAAC;IACJ,CAAC;IAED,OAAO,KAAK,CAAC;AACf,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,oBAAoB,CAAC,OAAoB;IACvD,MAAM,QAAQ,GAAG,gBAAgB,CAAC,OAAO,CAAC,CAAC;IAC3C,OAAO,IAAI,CAAC,SAAS,CAAC,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC;AAC3C,CAAC"}
@@ -1,14 +0,0 @@
1
- /**
2
- * Statusline Configuration Generator
3
- * Creates statusline configuration for V3 progress display
4
- */
5
- import type { InitOptions } from './types.js';
6
- /**
7
- * Generate statusline configuration script
8
- */
9
- export declare function generateStatuslineScript(options: InitOptions): string;
10
- /**
11
- * Generate statusline hook for shell integration
12
- */
13
- export declare function generateStatuslineHook(options: InitOptions): string;
14
- //# sourceMappingURL=statusline-generator.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"statusline-generator.d.ts","sourceRoot":"","sources":["../../../src/init/statusline-generator.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAoB,MAAM,YAAY,CAAC;AAEhE;;GAEG;AACH,wBAAgB,wBAAwB,CAAC,OAAO,EAAE,WAAW,GAAG,MAAM,CAwKrE;AAED;;GAEG;AACH,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,WAAW,GAAG,MAAM,CA2BnE"}
@@ -1,206 +0,0 @@
1
- /**
2
- * Statusline Configuration Generator
3
- * Creates statusline configuration for V3 progress display
4
- */
5
- /**
6
- * Generate statusline configuration script
7
- */
8
- export function generateStatuslineScript(options) {
9
- const config = options.statusline;
10
- return `#!/usr/bin/env node
11
- /**
12
- * Claude Flow V3 Statusline Generator
13
- * Displays real-time V3 implementation progress and system status
14
- *
15
- * Usage: node statusline.js [--json]
16
- */
17
-
18
- const fs = require('fs');
19
- const path = require('path');
20
-
21
- // Configuration
22
- const CONFIG = {
23
- enabled: ${config.enabled},
24
- showProgress: ${config.showProgress},
25
- showSecurity: ${config.showSecurity},
26
- showSwarm: ${config.showSwarm},
27
- showHooks: ${config.showHooks},
28
- showPerformance: ${config.showPerformance},
29
- refreshInterval: ${config.refreshInterval},
30
- };
31
-
32
- // ANSI colors
33
- const colors = {
34
- reset: '\\x1b[0m',
35
- bright: '\\x1b[1m',
36
- dim: '\\x1b[2m',
37
- green: '\\x1b[32m',
38
- yellow: '\\x1b[33m',
39
- blue: '\\x1b[34m',
40
- magenta: '\\x1b[35m',
41
- cyan: '\\x1b[36m',
42
- red: '\\x1b[31m',
43
- };
44
-
45
- // Get V3 progress from filesystem
46
- function getV3Progress() {
47
- const v3Path = path.join(process.cwd(), 'v3', '@claude-flow');
48
- let modulesCount = 0;
49
- let filesCount = 0;
50
-
51
- try {
52
- if (fs.existsSync(v3Path)) {
53
- const modules = fs.readdirSync(v3Path);
54
- modulesCount = modules.filter(m => fs.statSync(path.join(v3Path, m)).isDirectory()).length;
55
-
56
- // Count TypeScript files
57
- const countFiles = (dir) => {
58
- let count = 0;
59
- const items = fs.readdirSync(dir, { withFileTypes: true });
60
- for (const item of items) {
61
- if (item.isDirectory() && item.name !== 'node_modules' && item.name !== 'dist') {
62
- count += countFiles(path.join(dir, item.name));
63
- } else if (item.isFile() && item.name.endsWith('.ts')) {
64
- count++;
65
- }
66
- }
67
- return count;
68
- };
69
- filesCount = countFiles(v3Path);
70
- }
71
- } catch (e) {
72
- // Ignore errors
73
- }
74
-
75
- return { modulesCount, filesCount };
76
- }
77
-
78
- // Get security status
79
- function getSecurityStatus() {
80
- // Check for security-related files
81
- const securityPath = path.join(process.cwd(), 'v3', '@claude-flow', 'security');
82
- const exists = fs.existsSync(securityPath);
83
-
84
- return {
85
- status: exists ? 'IN_PROGRESS' : 'PENDING',
86
- cvesFixed: exists ? 2 : 0,
87
- totalCves: 3,
88
- };
89
- }
90
-
91
- // Get swarm status
92
- function getSwarmStatus() {
93
- const configPath = path.join(process.cwd(), '.claude-flow', 'config.yaml');
94
-
95
- return {
96
- activeAgents: 0,
97
- maxAgents: ${options.runtime.maxAgents},
98
- topology: '${options.runtime.topology}',
99
- coordinationActive: false,
100
- };
101
- }
102
-
103
- // Get hooks metrics
104
- function getHooksMetrics() {
105
- const metricsPath = path.join(process.cwd(), '.claude-flow', 'data', 'hooks-metrics.json');
106
-
107
- try {
108
- if (fs.existsSync(metricsPath)) {
109
- return JSON.parse(fs.readFileSync(metricsPath, 'utf-8'));
110
- }
111
- } catch (e) {
112
- // Ignore errors
113
- }
114
-
115
- return {
116
- status: 'ACTIVE',
117
- patternsLearned: 0,
118
- routingAccuracy: 0,
119
- totalOperations: 0,
120
- };
121
- }
122
-
123
- // Generate statusline
124
- function generateStatusline() {
125
- const segments = [];
126
-
127
- if (CONFIG.showProgress) {
128
- const progress = getV3Progress();
129
- segments.push(\`\${colors.cyan}V3\${colors.reset} \${progress.modulesCount}mod/\${progress.filesCount}files\`);
130
- }
131
-
132
- if (CONFIG.showSecurity) {
133
- const security = getSecurityStatus();
134
- const statusColor = security.status === 'CLEAN' ? colors.green :
135
- security.status === 'IN_PROGRESS' ? colors.yellow : colors.red;
136
- segments.push(\`\${colors.magenta}SEC\${colors.reset} \${statusColor}\${security.cvesFixed}/\${security.totalCves}\${colors.reset}\`);
137
- }
138
-
139
- if (CONFIG.showSwarm) {
140
- const swarm = getSwarmStatus();
141
- segments.push(\`\${colors.blue}SWARM\${colors.reset} \${swarm.activeAgents}/\${swarm.maxAgents}\`);
142
- }
143
-
144
- if (CONFIG.showHooks) {
145
- const hooks = getHooksMetrics();
146
- segments.push(\`\${colors.green}HOOKS\${colors.reset} \${hooks.patternsLearned}pat\`);
147
- }
148
-
149
- if (CONFIG.showPerformance) {
150
- segments.push(\`\${colors.yellow}PERF\${colors.reset} 2.49x-7.47x\`);
151
- }
152
-
153
- return segments.join(' | ');
154
- }
155
-
156
- // Output JSON if requested
157
- if (process.argv.includes('--json')) {
158
- const data = {
159
- v3Progress: getV3Progress(),
160
- security: getSecurityStatus(),
161
- swarm: getSwarmStatus(),
162
- hooks: getHooksMetrics(),
163
- performance: {
164
- flashAttentionTarget: '2.49x-7.47x',
165
- searchImprovement: '150x-12500x',
166
- memoryReduction: '50-75%',
167
- },
168
- lastUpdated: new Date().toISOString(),
169
- };
170
- console.log(JSON.stringify(data, null, 2));
171
- } else {
172
- console.log(generateStatusline());
173
- }
174
- `;
175
- }
176
- /**
177
- * Generate statusline hook for shell integration
178
- */
179
- export function generateStatuslineHook(options) {
180
- if (!options.statusline.enabled) {
181
- return '# Statusline disabled';
182
- }
183
- return `# Claude Flow V3 Statusline Hook
184
- # Add to your shell RC file (.bashrc, .zshrc, etc.)
185
-
186
- # Function to get statusline
187
- claude_flow_statusline() {
188
- local statusline_script="\${CLAUDE_FLOW_DIR:-.claude}/helpers/statusline.js"
189
- if [ -f "$statusline_script" ]; then
190
- node "$statusline_script" 2>/dev/null || echo ""
191
- fi
192
- }
193
-
194
- # For bash PS1
195
- # export PS1='$(claude_flow_statusline) \\n\\$ '
196
-
197
- # For zsh RPROMPT
198
- # export RPROMPT='$(claude_flow_statusline)'
199
-
200
- # For starship (add to starship.toml)
201
- # [custom.claude_flow]
202
- # command = "node .claude/helpers/statusline.js 2>/dev/null"
203
- # when = "test -f .claude/helpers/statusline.js"
204
- `;
205
- }
206
- //# sourceMappingURL=statusline-generator.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"statusline-generator.js","sourceRoot":"","sources":["../../../src/init/statusline-generator.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH;;GAEG;AACH,MAAM,UAAU,wBAAwB,CAAC,OAAoB;IAC3D,MAAM,MAAM,GAAG,OAAO,CAAC,UAAU,CAAC;IAElC,OAAO;;;;;;;;;;;;;aAaI,MAAM,CAAC,OAAO;kBACT,MAAM,CAAC,YAAY;kBACnB,MAAM,CAAC,YAAY;eACtB,MAAM,CAAC,SAAS;eAChB,MAAM,CAAC,SAAS;qBACV,MAAM,CAAC,eAAe;qBACtB,MAAM,CAAC,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAoE1B,OAAO,CAAC,OAAO,CAAC,SAAS;iBACzB,OAAO,CAAC,OAAO,CAAC,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA4ExC,CAAC;AACF,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,sBAAsB,CAAC,OAAoB;IACzD,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,OAAO,EAAE,CAAC;QAChC,OAAO,uBAAuB,CAAC;IACjC,CAAC;IAED,OAAO;;;;;;;;;;;;;;;;;;;;;CAqBR,CAAC;AACF,CAAC"}