@wundr.io/cli 1.0.1 → 1.0.3

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 (249) hide show
  1. package/dist/ai/ai-service.d.ts +152 -0
  2. package/dist/ai/ai-service.d.ts.map +1 -0
  3. package/dist/ai/ai-service.js +430 -0
  4. package/dist/ai/ai-service.js.map +1 -0
  5. package/dist/ai/claude-client.d.ts +130 -0
  6. package/dist/ai/claude-client.d.ts.map +1 -0
  7. package/dist/ai/claude-client.js +340 -0
  8. package/dist/ai/claude-client.js.map +1 -0
  9. package/dist/ai/conversation-manager.d.ts +164 -0
  10. package/dist/ai/conversation-manager.d.ts.map +1 -0
  11. package/dist/ai/conversation-manager.js +614 -0
  12. package/dist/ai/conversation-manager.js.map +1 -0
  13. package/dist/ai/index.d.ts +5 -0
  14. package/dist/ai/index.d.ts.map +1 -0
  15. package/dist/ai/index.js +8 -0
  16. package/dist/ai/index.js.map +1 -0
  17. package/dist/cli.d.ts +36 -0
  18. package/dist/cli.d.ts.map +1 -0
  19. package/dist/cli.js +192 -0
  20. package/dist/cli.js.map +1 -0
  21. package/dist/commands/ai.d.ts +89 -0
  22. package/dist/commands/ai.d.ts.map +1 -0
  23. package/dist/commands/ai.js +735 -0
  24. package/dist/commands/ai.js.map +1 -0
  25. package/dist/commands/alignment.d.ts +78 -0
  26. package/dist/commands/alignment.d.ts.map +1 -0
  27. package/dist/commands/alignment.js +817 -0
  28. package/dist/commands/alignment.js.map +1 -0
  29. package/dist/commands/analyze-optimized.d.ts +14 -0
  30. package/dist/commands/analyze-optimized.d.ts.map +1 -0
  31. package/dist/commands/analyze-optimized.js +440 -0
  32. package/dist/commands/analyze-optimized.js.map +1 -0
  33. package/dist/commands/analyze.d.ts +65 -0
  34. package/dist/commands/analyze.d.ts.map +1 -0
  35. package/dist/commands/analyze.js +435 -0
  36. package/dist/commands/analyze.js.map +1 -0
  37. package/dist/commands/batch.d.ts +71 -0
  38. package/dist/commands/batch.d.ts.map +1 -0
  39. package/dist/commands/batch.js +738 -0
  40. package/dist/commands/batch.js.map +1 -0
  41. package/dist/commands/chat.d.ts +71 -0
  42. package/dist/commands/chat.d.ts.map +1 -0
  43. package/dist/commands/chat.js +674 -0
  44. package/dist/commands/chat.js.map +1 -0
  45. package/dist/commands/claude-init.d.ts +28 -0
  46. package/dist/commands/claude-init.d.ts.map +1 -0
  47. package/dist/commands/claude-init.js +591 -0
  48. package/dist/commands/claude-init.js.map +1 -0
  49. package/dist/commands/claude-setup.d.ts +119 -0
  50. package/dist/commands/claude-setup.d.ts.map +1 -0
  51. package/dist/commands/claude-setup.js +1073 -0
  52. package/dist/commands/claude-setup.js.map +1 -0
  53. package/dist/commands/computer-setup-commands.d.ts +53 -0
  54. package/dist/commands/computer-setup-commands.d.ts.map +1 -0
  55. package/dist/commands/computer-setup-commands.js +705 -0
  56. package/dist/commands/computer-setup-commands.js.map +1 -0
  57. package/dist/commands/computer-setup.d.ts +7 -0
  58. package/dist/commands/computer-setup.d.ts.map +1 -0
  59. package/dist/commands/computer-setup.js +849 -0
  60. package/dist/commands/computer-setup.js.map +1 -0
  61. package/dist/commands/create-command.d.ts +7 -0
  62. package/dist/commands/create-command.d.ts.map +1 -0
  63. package/dist/commands/create-command.js +158 -0
  64. package/dist/commands/create-command.js.map +1 -0
  65. package/dist/commands/create.d.ts +74 -0
  66. package/dist/commands/create.d.ts.map +1 -0
  67. package/dist/commands/create.js +556 -0
  68. package/dist/commands/create.js.map +1 -0
  69. package/dist/commands/dashboard.d.ts +91 -0
  70. package/dist/commands/dashboard.d.ts.map +1 -0
  71. package/dist/commands/dashboard.js +538 -0
  72. package/dist/commands/dashboard.js.map +1 -0
  73. package/dist/commands/govern.d.ts +70 -0
  74. package/dist/commands/govern.d.ts.map +1 -0
  75. package/dist/commands/govern.js +481 -0
  76. package/dist/commands/govern.js.map +1 -0
  77. package/dist/commands/governance.d.ts +17 -0
  78. package/dist/commands/governance.d.ts.map +1 -0
  79. package/dist/commands/governance.js +703 -0
  80. package/dist/commands/governance.js.map +1 -0
  81. package/dist/commands/guardian.d.ts +20 -0
  82. package/dist/commands/guardian.d.ts.map +1 -0
  83. package/dist/commands/guardian.js +597 -0
  84. package/dist/commands/guardian.js.map +1 -0
  85. package/dist/commands/init.d.ts +59 -0
  86. package/dist/commands/init.d.ts.map +1 -0
  87. package/dist/commands/init.js +650 -0
  88. package/dist/commands/init.js.map +1 -0
  89. package/dist/commands/performance-optimizer.d.ts +30 -0
  90. package/dist/commands/performance-optimizer.d.ts.map +1 -0
  91. package/dist/commands/performance-optimizer.js +650 -0
  92. package/dist/commands/performance-optimizer.js.map +1 -0
  93. package/dist/commands/plugins.d.ts +87 -0
  94. package/dist/commands/plugins.d.ts.map +1 -0
  95. package/dist/commands/plugins.js +685 -0
  96. package/dist/commands/plugins.js.map +1 -0
  97. package/dist/commands/rag.d.ts +7 -0
  98. package/dist/commands/rag.d.ts.map +1 -0
  99. package/dist/commands/rag.js +748 -0
  100. package/dist/commands/rag.js.map +1 -0
  101. package/dist/commands/session.d.ts +41 -0
  102. package/dist/commands/session.d.ts.map +1 -0
  103. package/dist/commands/session.js +441 -0
  104. package/dist/commands/session.js.map +1 -0
  105. package/dist/commands/setup.d.ts +29 -0
  106. package/dist/commands/setup.d.ts.map +1 -0
  107. package/dist/commands/setup.js +397 -0
  108. package/dist/commands/setup.js.map +1 -0
  109. package/dist/commands/test-init.d.ts +9 -0
  110. package/dist/commands/test-init.d.ts.map +1 -0
  111. package/dist/commands/test-init.js +222 -0
  112. package/dist/commands/test-init.js.map +1 -0
  113. package/dist/commands/test.d.ts +25 -0
  114. package/dist/commands/test.d.ts.map +1 -0
  115. package/dist/commands/test.js +217 -0
  116. package/dist/commands/test.js.map +1 -0
  117. package/dist/commands/vp.d.ts +7 -0
  118. package/dist/commands/vp.d.ts.map +1 -0
  119. package/dist/commands/vp.js +571 -0
  120. package/dist/commands/vp.js.map +1 -0
  121. package/dist/commands/watch.d.ts +76 -0
  122. package/dist/commands/watch.d.ts.map +1 -0
  123. package/dist/commands/watch.js +613 -0
  124. package/dist/commands/watch.js.map +1 -0
  125. package/dist/commands/worktree.d.ts +63 -0
  126. package/dist/commands/worktree.d.ts.map +1 -0
  127. package/dist/commands/worktree.js +774 -0
  128. package/dist/commands/worktree.js.map +1 -0
  129. package/dist/context/context-manager.d.ts +155 -0
  130. package/dist/context/context-manager.d.ts.map +1 -0
  131. package/dist/context/context-manager.js +383 -0
  132. package/dist/context/context-manager.js.map +1 -0
  133. package/dist/context/index.d.ts +3 -0
  134. package/dist/context/index.d.ts.map +1 -0
  135. package/dist/context/index.js +6 -0
  136. package/dist/context/index.js.map +1 -0
  137. package/dist/context/session-manager.d.ts +207 -0
  138. package/dist/context/session-manager.d.ts.map +1 -0
  139. package/dist/context/session-manager.js +686 -0
  140. package/dist/context/session-manager.js.map +1 -0
  141. package/dist/index.d.ts +8 -0
  142. package/dist/index.d.ts.map +1 -0
  143. package/dist/index.js +51 -0
  144. package/dist/index.js.map +1 -0
  145. package/dist/interactive/interactive-mode.d.ts +76 -0
  146. package/dist/interactive/interactive-mode.d.ts.map +1 -0
  147. package/dist/interactive/interactive-mode.js +732 -0
  148. package/dist/interactive/interactive-mode.js.map +1 -0
  149. package/dist/nlp/command-mapper.d.ts +174 -0
  150. package/dist/nlp/command-mapper.d.ts.map +1 -0
  151. package/dist/nlp/command-mapper.js +624 -0
  152. package/dist/nlp/command-mapper.js.map +1 -0
  153. package/dist/nlp/command-parser.d.ts +106 -0
  154. package/dist/nlp/command-parser.d.ts.map +1 -0
  155. package/dist/nlp/command-parser.js +417 -0
  156. package/dist/nlp/command-parser.js.map +1 -0
  157. package/dist/nlp/index.d.ts +5 -0
  158. package/dist/nlp/index.d.ts.map +1 -0
  159. package/dist/nlp/index.js +8 -0
  160. package/dist/nlp/index.js.map +1 -0
  161. package/dist/nlp/intent-classifier.d.ts +59 -0
  162. package/dist/nlp/intent-classifier.d.ts.map +1 -0
  163. package/dist/nlp/intent-classifier.js +384 -0
  164. package/dist/nlp/intent-classifier.js.map +1 -0
  165. package/dist/nlp/intent-parser.d.ts +152 -0
  166. package/dist/nlp/intent-parser.d.ts.map +1 -0
  167. package/dist/nlp/intent-parser.js +744 -0
  168. package/dist/nlp/intent-parser.js.map +1 -0
  169. package/dist/plugins/plugin-manager.d.ts +120 -0
  170. package/dist/plugins/plugin-manager.d.ts.map +1 -0
  171. package/dist/plugins/plugin-manager.js +595 -0
  172. package/dist/plugins/plugin-manager.js.map +1 -0
  173. package/dist/types/index.d.ts +224 -0
  174. package/dist/types/index.d.ts.map +1 -0
  175. package/dist/types/index.js +3 -0
  176. package/dist/types/index.js.map +1 -0
  177. package/dist/utils/backup-rollback-manager.d.ts +72 -0
  178. package/dist/utils/backup-rollback-manager.d.ts.map +1 -0
  179. package/dist/utils/backup-rollback-manager.js +289 -0
  180. package/dist/utils/backup-rollback-manager.js.map +1 -0
  181. package/dist/utils/claude-config-installer.d.ts +94 -0
  182. package/dist/utils/claude-config-installer.d.ts.map +1 -0
  183. package/dist/utils/claude-config-installer.js +628 -0
  184. package/dist/utils/claude-config-installer.js.map +1 -0
  185. package/dist/utils/config-manager.d.ts +73 -0
  186. package/dist/utils/config-manager.d.ts.map +1 -0
  187. package/dist/utils/config-manager.js +339 -0
  188. package/dist/utils/config-manager.js.map +1 -0
  189. package/dist/utils/error-handler.d.ts +46 -0
  190. package/dist/utils/error-handler.d.ts.map +1 -0
  191. package/dist/utils/error-handler.js +169 -0
  192. package/dist/utils/error-handler.js.map +1 -0
  193. package/dist/utils/logger.d.ts +25 -0
  194. package/dist/utils/logger.d.ts.map +1 -0
  195. package/dist/utils/logger.js +105 -0
  196. package/dist/utils/logger.js.map +1 -0
  197. package/package.json +23 -4
  198. package/src/ai/ai-service.ts +22 -19
  199. package/src/ai/claude-client.ts +20 -16
  200. package/src/ai/conversation-manager.ts +37 -30
  201. package/src/cli.ts +42 -13
  202. package/src/commands/ai.ts +59 -57
  203. package/src/commands/alignment.ts +1212 -0
  204. package/src/commands/analyze-optimized.ts +70 -62
  205. package/src/commands/analyze.ts +22 -20
  206. package/src/commands/batch.ts +41 -38
  207. package/src/commands/chat.ts +37 -34
  208. package/src/commands/claude-init.ts +38 -30
  209. package/src/commands/claude-setup.ts +692 -97
  210. package/src/commands/computer-setup-commands.ts +45 -39
  211. package/src/commands/computer-setup.ts +474 -4
  212. package/src/commands/create-command.ts +7 -7
  213. package/src/commands/create.ts +36 -33
  214. package/src/commands/dashboard.ts +33 -28
  215. package/src/commands/govern.ts +34 -29
  216. package/src/commands/governance.ts +1005 -0
  217. package/src/commands/guardian.ts +887 -0
  218. package/src/commands/init.ts +112 -22
  219. package/src/commands/performance-optimizer.ts +48 -42
  220. package/src/commands/plugins.ts +35 -32
  221. package/src/commands/project-update.ts +1053 -0
  222. package/src/commands/rag.ts +904 -0
  223. package/src/commands/session.ts +631 -0
  224. package/src/commands/setup.ts +35 -31
  225. package/src/commands/test-init.ts +6 -5
  226. package/src/commands/test.ts +7 -6
  227. package/src/commands/vp.ts +762 -0
  228. package/src/commands/watch.ts +44 -33
  229. package/src/commands/worktree.ts +1057 -0
  230. package/src/context/context-manager.ts +15 -12
  231. package/src/context/session-manager.ts +51 -40
  232. package/src/index.ts +7 -6
  233. package/src/interactive/interactive-mode.ts +25 -18
  234. package/src/lib/conflict-resolution.ts +28 -0
  235. package/src/lib/merge-strategy.ts +28 -0
  236. package/src/lib/safety-mechanisms.ts +47 -0
  237. package/src/lib/state-detection.ts +28 -0
  238. package/src/nlp/command-mapper.ts +35 -30
  239. package/src/nlp/command-parser.ts +20 -17
  240. package/src/nlp/intent-classifier.ts +7 -7
  241. package/src/nlp/intent-parser.ts +61 -49
  242. package/src/plugins/plugin-manager.ts +27 -23
  243. package/src/types/index.ts +1 -1
  244. package/src/types/modules.d.ts +1 -0
  245. package/src/utils/backup-rollback-manager.ts +13 -11
  246. package/src/utils/claude-config-installer.ts +18 -16
  247. package/src/utils/config-manager.ts +12 -9
  248. package/src/utils/error-handler.ts +5 -3
  249. package/src/utils/logger.ts +35 -12
@@ -1,11 +1,14 @@
1
- import { Command } from 'commander';
2
- import fs from 'fs-extra';
3
1
  import path from 'path';
2
+
4
3
  import chalk from 'chalk';
5
- import { ConfigManager } from '../utils/config-manager';
6
- import { PluginManager } from '../plugins/plugin-manager';
7
- import { logger } from '../utils/logger';
4
+ import fs from 'fs-extra';
5
+
8
6
  import { errorHandler } from '../utils/error-handler';
7
+ import { logger } from '../utils/logger';
8
+
9
+ import type { PluginManager } from '../plugins/plugin-manager';
10
+ import type { ConfigManager } from '../utils/config-manager';
11
+ import type { Command } from 'commander';
9
12
 
10
13
  /**
11
14
  * Plugin commands for managing CLI extensions
@@ -14,7 +17,7 @@ export class PluginCommands {
14
17
  constructor(
15
18
  private program: Command,
16
19
  private configManager: ConfigManager,
17
- private pluginManager: PluginManager
20
+ private pluginManager: PluginManager,
18
21
  ) {
19
22
  this.registerCommands();
20
23
  }
@@ -180,7 +183,7 @@ export class PluginCommands {
180
183
  'WUNDR_PLUGIN_LIST_FAILED',
181
184
  'Failed to list plugins',
182
185
  { options },
183
- true
186
+ true,
184
187
  );
185
188
  }
186
189
  }
@@ -198,7 +201,7 @@ export class PluginCommands {
198
201
  (await this.pluginManager.isPluginInstalled(plugin))
199
202
  ) {
200
203
  logger.warn(
201
- `Plugin ${plugin} is already installed. Use --force to reinstall.`
204
+ `Plugin ${plugin} is already installed. Use --force to reinstall.`,
202
205
  );
203
206
  return;
204
207
  }
@@ -215,7 +218,7 @@ export class PluginCommands {
215
218
  'WUNDR_PLUGIN_INSTALL_FAILED',
216
219
  'Failed to install plugin',
217
220
  { plugin, options },
218
- true
221
+ true,
219
222
  );
220
223
  }
221
224
  }
@@ -254,7 +257,7 @@ export class PluginCommands {
254
257
  'WUNDR_PLUGIN_UNINSTALL_FAILED',
255
258
  'Failed to uninstall plugin',
256
259
  { plugin, options },
257
- true
260
+ true,
258
261
  );
259
262
  }
260
263
  }
@@ -275,7 +278,7 @@ export class PluginCommands {
275
278
  'WUNDR_PLUGIN_ENABLE_FAILED',
276
279
  'Failed to enable plugin',
277
280
  { plugin },
278
- true
281
+ true,
279
282
  );
280
283
  }
281
284
  }
@@ -296,7 +299,7 @@ export class PluginCommands {
296
299
  'WUNDR_PLUGIN_DISABLE_FAILED',
297
300
  'Failed to disable plugin',
298
301
  { plugin },
299
- true
302
+ true,
300
303
  );
301
304
  }
302
305
  }
@@ -330,7 +333,7 @@ export class PluginCommands {
330
333
  'WUNDR_PLUGIN_INFO_FAILED',
331
334
  'Failed to show plugin info',
332
335
  { plugin },
333
- true
336
+ true,
334
337
  );
335
338
  }
336
339
  }
@@ -356,7 +359,7 @@ export class PluginCommands {
356
359
  'WUNDR_PLUGIN_UPDATE_FAILED',
357
360
  'Failed to update plugin(s)',
358
361
  { plugin, options },
359
- true
362
+ true,
360
363
  );
361
364
  }
362
365
  }
@@ -375,7 +378,7 @@ export class PluginCommands {
375
378
  } else {
376
379
  pluginConfig = await this.createPluginFromTemplate(
377
380
  name,
378
- options.template
381
+ options.template,
379
382
  );
380
383
  }
381
384
 
@@ -392,7 +395,7 @@ export class PluginCommands {
392
395
  'WUNDR_PLUGIN_CREATE_FAILED',
393
396
  'Failed to create plugin',
394
397
  { name, options },
395
- true
398
+ true,
396
399
  );
397
400
  }
398
401
  }
@@ -418,7 +421,7 @@ export class PluginCommands {
418
421
  'WUNDR_PLUGIN_PUBLISH_FAILED',
419
422
  'Failed to publish plugin',
420
423
  { options },
421
- true
424
+ true,
422
425
  );
423
426
  }
424
427
  }
@@ -450,14 +453,14 @@ export class PluginCommands {
450
453
  Updated: plugin.updated
451
454
  ? new Date(plugin.updated).toLocaleDateString()
452
455
  : 'Unknown',
453
- }))
456
+ })),
454
457
  );
455
458
  } catch (error) {
456
459
  throw errorHandler.createError(
457
460
  'WUNDR_PLUGIN_SEARCH_FAILED',
458
461
  'Failed to search plugins',
459
462
  { query, options },
460
- true
463
+ true,
461
464
  );
462
465
  }
463
466
  }
@@ -480,7 +483,7 @@ export class PluginCommands {
480
483
  'WUNDR_PLUGIN_LINK_FAILED',
481
484
  'Failed to link plugin',
482
485
  { pluginPath },
483
- true
486
+ true,
484
487
  );
485
488
  }
486
489
  }
@@ -497,7 +500,7 @@ export class PluginCommands {
497
500
  'WUNDR_PLUGIN_UNLINK_FAILED',
498
501
  'Failed to unlink plugin',
499
502
  { plugin },
500
- true
503
+ true,
501
504
  );
502
505
  }
503
506
  }
@@ -519,7 +522,7 @@ export class PluginCommands {
519
522
  'WUNDR_PLUGIN_TEST_FAILED',
520
523
  'Failed to test plugin',
521
524
  { plugin, options },
522
- true
525
+ true,
523
526
  );
524
527
  }
525
528
  }
@@ -530,19 +533,19 @@ export class PluginCommands {
530
533
  private async setPluginConfig(
531
534
  plugin: string,
532
535
  key: string,
533
- value: string
536
+ value: string,
534
537
  ): Promise<void> {
535
538
  try {
536
539
  await this.pluginManager.setPluginConfig(plugin, key, value);
537
540
  logger.success(
538
- `Plugin configuration updated: ${plugin}.${key} = ${value}`
541
+ `Plugin configuration updated: ${plugin}.${key} = ${value}`,
539
542
  );
540
543
  } catch (error) {
541
544
  throw errorHandler.createError(
542
545
  'WUNDR_PLUGIN_CONFIG_SET_FAILED',
543
546
  'Failed to set plugin configuration',
544
547
  { plugin, key, value },
545
- true
548
+ true,
546
549
  );
547
550
  }
548
551
  }
@@ -564,7 +567,7 @@ export class PluginCommands {
564
567
  'WUNDR_PLUGIN_CONFIG_GET_FAILED',
565
568
  'Failed to get plugin configuration',
566
569
  { plugin, key },
567
- true
570
+ true,
568
571
  );
569
572
  }
570
573
  }
@@ -573,7 +576,7 @@ export class PluginCommands {
573
576
  * Helper methods for plugin operations
574
577
  */
575
578
  private async listInstalledPlugins(
576
- enabledOnly: boolean = false
579
+ enabledOnly: boolean = false,
577
580
  ): Promise<void> {
578
581
  const plugins = await this.pluginManager.getInstalledPlugins();
579
582
  const filteredPlugins = enabledOnly
@@ -582,13 +585,13 @@ export class PluginCommands {
582
585
 
583
586
  if (filteredPlugins.length === 0) {
584
587
  logger.info(
585
- enabledOnly ? 'No enabled plugins found' : 'No plugins installed'
588
+ enabledOnly ? 'No enabled plugins found' : 'No plugins installed',
586
589
  );
587
590
  return;
588
591
  }
589
592
 
590
593
  logger.info(
591
- `${enabledOnly ? 'Enabled plugins' : 'Installed plugins'} (${filteredPlugins.length}):`
594
+ `${enabledOnly ? 'Enabled plugins' : 'Installed plugins'} (${filteredPlugins.length}):`,
592
595
  );
593
596
 
594
597
  const pluginData = filteredPlugins.map(plugin => ({
@@ -662,7 +665,7 @@ export class PluginCommands {
662
665
 
663
666
  private async createPluginFromTemplate(
664
667
  name: string,
665
- template: string
668
+ template: string,
666
669
  ): Promise<any> {
667
670
  const templates: Record<string, any> = {
668
671
  basic: {
@@ -684,7 +687,7 @@ export class PluginCommands {
684
687
 
685
688
  private async generatePluginStructure(
686
689
  pluginPath: string,
687
- config: any
690
+ config: any,
688
691
  ): Promise<void> {
689
692
  await fs.ensureDir(pluginPath);
690
693
 
@@ -751,7 +754,7 @@ export class PluginCommands {
751
754
  // Create main plugin file
752
755
  const pluginCode = this.generatePluginCode(
753
756
  path.basename(pluginPath),
754
- config
757
+ config,
755
758
  );
756
759
  await fs.writeFile(path.join(srcDir, 'index.ts'), pluginCode);
757
760