@wundr.io/cli 1.0.10 → 1.0.12

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 (269) hide show
  1. package/bin/wundr.js +8 -4
  2. package/package.json +23 -23
  3. package/src/ai/ai-service.ts +16 -17
  4. package/src/ai/claude-client.ts +16 -16
  5. package/src/ai/conversation-manager.ts +29 -29
  6. package/src/cli.ts +4 -4
  7. package/src/commands/ai.ts +246 -78
  8. package/src/commands/alignment.ts +74 -74
  9. package/src/commands/analyze-optimized.ts +111 -78
  10. package/src/commands/analyze.ts +14 -14
  11. package/src/commands/batch.ts +179 -42
  12. package/src/commands/chat.ts +37 -30
  13. package/src/commands/claude-init.ts +41 -45
  14. package/src/commands/claude-setup.ts +204 -119
  15. package/src/commands/computer-setup.ts +85 -43
  16. package/src/commands/create-command.ts +4 -4
  17. package/src/commands/create.ts +27 -27
  18. package/src/commands/dashboard.ts +24 -24
  19. package/src/commands/govern.ts +25 -25
  20. package/src/commands/governance.ts +34 -34
  21. package/src/commands/guardian.ts +56 -56
  22. package/src/commands/init.ts +25 -22
  23. package/src/commands/orchestrator.ts +68 -41
  24. package/src/commands/performance-optimizer.ts +34 -35
  25. package/src/commands/plugins.ts +27 -27
  26. package/src/commands/project-update.ts +175 -72
  27. package/src/commands/rag.ts +185 -78
  28. package/src/commands/session.ts +35 -35
  29. package/src/commands/setup.ts +40 -344
  30. package/src/commands/test-init.ts +3 -3
  31. package/src/commands/test.ts +4 -4
  32. package/src/commands/watch.ts +28 -29
  33. package/src/commands/worktree.ts +49 -49
  34. package/src/context/context-manager.ts +10 -10
  35. package/src/context/session-manager.ts +41 -41
  36. package/src/framework/command-interface.ts +520 -0
  37. package/src/framework/command-registry.ts +942 -0
  38. package/src/framework/completion-exporter.ts +383 -0
  39. package/src/framework/debug-logger.ts +519 -0
  40. package/src/framework/error-handler.ts +867 -0
  41. package/src/framework/help-generator.ts +540 -0
  42. package/src/framework/index.ts +169 -0
  43. package/src/framework/interactive-repl.ts +703 -0
  44. package/src/framework/output-formatter.ts +834 -0
  45. package/src/framework/progress-manager.ts +539 -0
  46. package/src/index.ts +4 -4
  47. package/src/interactive/interactive-mode.ts +16 -16
  48. package/src/lib/conflict-resolution.ts +799 -9
  49. package/src/lib/merge-strategy.ts +529 -7
  50. package/src/lib/safety-mechanisms.ts +422 -18
  51. package/src/lib/state-detection.ts +1015 -13
  52. package/src/nlp/command-mapper.ts +29 -29
  53. package/src/nlp/command-parser.ts +17 -17
  54. package/src/nlp/intent-classifier.ts +7 -7
  55. package/src/nlp/intent-parser.ts +54 -52
  56. package/src/plugins/plugin-manager.ts +61 -39
  57. package/src/tests/computer-setup-integration.test.ts +46 -15
  58. package/src/types/modules.d.ts +424 -1
  59. package/src/utils/backup-rollback-manager.ts +11 -8
  60. package/src/utils/config-manager.ts +3 -3
  61. package/src/utils/error-handler.ts +2 -2
  62. package/src/utils/logger.ts +22 -22
  63. package/templates/batch/ci-cd.yaml +7 -7
  64. package/test-suites/api/health.spec.ts +20 -23
  65. package/test-suites/helpers/test-config.ts +14 -13
  66. package/test-suites/ui/accessibility.spec.ts +27 -22
  67. package/test-suites/ui/smoke.spec.ts +26 -21
  68. package/LICENSE +0 -21
  69. package/dist/ai/ai-service.d.ts +0 -152
  70. package/dist/ai/ai-service.d.ts.map +0 -1
  71. package/dist/ai/ai-service.js +0 -430
  72. package/dist/ai/ai-service.js.map +0 -1
  73. package/dist/ai/claude-client.d.ts +0 -130
  74. package/dist/ai/claude-client.d.ts.map +0 -1
  75. package/dist/ai/claude-client.js +0 -340
  76. package/dist/ai/claude-client.js.map +0 -1
  77. package/dist/ai/conversation-manager.d.ts +0 -164
  78. package/dist/ai/conversation-manager.d.ts.map +0 -1
  79. package/dist/ai/conversation-manager.js +0 -614
  80. package/dist/ai/conversation-manager.js.map +0 -1
  81. package/dist/ai/index.d.ts +0 -5
  82. package/dist/ai/index.d.ts.map +0 -1
  83. package/dist/ai/index.js +0 -8
  84. package/dist/ai/index.js.map +0 -1
  85. package/dist/cli.d.ts +0 -36
  86. package/dist/cli.d.ts.map +0 -1
  87. package/dist/cli.js +0 -192
  88. package/dist/cli.js.map +0 -1
  89. package/dist/commands/ai.d.ts +0 -89
  90. package/dist/commands/ai.d.ts.map +0 -1
  91. package/dist/commands/ai.js +0 -799
  92. package/dist/commands/ai.js.map +0 -1
  93. package/dist/commands/alignment.d.ts +0 -78
  94. package/dist/commands/alignment.d.ts.map +0 -1
  95. package/dist/commands/alignment.js +0 -817
  96. package/dist/commands/alignment.js.map +0 -1
  97. package/dist/commands/analyze-optimized.d.ts +0 -14
  98. package/dist/commands/analyze-optimized.d.ts.map +0 -1
  99. package/dist/commands/analyze-optimized.js +0 -600
  100. package/dist/commands/analyze-optimized.js.map +0 -1
  101. package/dist/commands/analyze.d.ts +0 -65
  102. package/dist/commands/analyze.d.ts.map +0 -1
  103. package/dist/commands/analyze.js +0 -435
  104. package/dist/commands/analyze.js.map +0 -1
  105. package/dist/commands/batch.d.ts +0 -71
  106. package/dist/commands/batch.d.ts.map +0 -1
  107. package/dist/commands/batch.js +0 -738
  108. package/dist/commands/batch.js.map +0 -1
  109. package/dist/commands/chat.d.ts +0 -71
  110. package/dist/commands/chat.d.ts.map +0 -1
  111. package/dist/commands/chat.js +0 -674
  112. package/dist/commands/chat.js.map +0 -1
  113. package/dist/commands/claude-init.d.ts +0 -28
  114. package/dist/commands/claude-init.d.ts.map +0 -1
  115. package/dist/commands/claude-init.js +0 -591
  116. package/dist/commands/claude-init.js.map +0 -1
  117. package/dist/commands/claude-setup.d.ts +0 -119
  118. package/dist/commands/claude-setup.d.ts.map +0 -1
  119. package/dist/commands/claude-setup.js +0 -1073
  120. package/dist/commands/claude-setup.js.map +0 -1
  121. package/dist/commands/computer-setup-commands.d.ts +0 -53
  122. package/dist/commands/computer-setup-commands.d.ts.map +0 -1
  123. package/dist/commands/computer-setup-commands.js +0 -705
  124. package/dist/commands/computer-setup-commands.js.map +0 -1
  125. package/dist/commands/computer-setup.d.ts +0 -7
  126. package/dist/commands/computer-setup.d.ts.map +0 -1
  127. package/dist/commands/computer-setup.js +0 -849
  128. package/dist/commands/computer-setup.js.map +0 -1
  129. package/dist/commands/create-command.d.ts +0 -7
  130. package/dist/commands/create-command.d.ts.map +0 -1
  131. package/dist/commands/create-command.js +0 -158
  132. package/dist/commands/create-command.js.map +0 -1
  133. package/dist/commands/create.d.ts +0 -74
  134. package/dist/commands/create.d.ts.map +0 -1
  135. package/dist/commands/create.js +0 -556
  136. package/dist/commands/create.js.map +0 -1
  137. package/dist/commands/dashboard.d.ts +0 -91
  138. package/dist/commands/dashboard.d.ts.map +0 -1
  139. package/dist/commands/dashboard.js +0 -538
  140. package/dist/commands/dashboard.js.map +0 -1
  141. package/dist/commands/govern.d.ts +0 -70
  142. package/dist/commands/govern.d.ts.map +0 -1
  143. package/dist/commands/govern.js +0 -481
  144. package/dist/commands/govern.js.map +0 -1
  145. package/dist/commands/governance.d.ts +0 -17
  146. package/dist/commands/governance.d.ts.map +0 -1
  147. package/dist/commands/governance.js +0 -703
  148. package/dist/commands/governance.js.map +0 -1
  149. package/dist/commands/guardian.d.ts +0 -20
  150. package/dist/commands/guardian.d.ts.map +0 -1
  151. package/dist/commands/guardian.js +0 -597
  152. package/dist/commands/guardian.js.map +0 -1
  153. package/dist/commands/init.d.ts +0 -59
  154. package/dist/commands/init.d.ts.map +0 -1
  155. package/dist/commands/init.js +0 -650
  156. package/dist/commands/init.js.map +0 -1
  157. package/dist/commands/orchestrator.d.ts +0 -7
  158. package/dist/commands/orchestrator.d.ts.map +0 -1
  159. package/dist/commands/orchestrator.js +0 -571
  160. package/dist/commands/orchestrator.js.map +0 -1
  161. package/dist/commands/performance-optimizer.d.ts +0 -30
  162. package/dist/commands/performance-optimizer.d.ts.map +0 -1
  163. package/dist/commands/performance-optimizer.js +0 -650
  164. package/dist/commands/performance-optimizer.js.map +0 -1
  165. package/dist/commands/plugins.d.ts +0 -87
  166. package/dist/commands/plugins.d.ts.map +0 -1
  167. package/dist/commands/plugins.js +0 -685
  168. package/dist/commands/plugins.js.map +0 -1
  169. package/dist/commands/rag.d.ts +0 -7
  170. package/dist/commands/rag.d.ts.map +0 -1
  171. package/dist/commands/rag.js +0 -748
  172. package/dist/commands/rag.js.map +0 -1
  173. package/dist/commands/session.d.ts +0 -41
  174. package/dist/commands/session.d.ts.map +0 -1
  175. package/dist/commands/session.js +0 -441
  176. package/dist/commands/session.js.map +0 -1
  177. package/dist/commands/setup.d.ts +0 -29
  178. package/dist/commands/setup.d.ts.map +0 -1
  179. package/dist/commands/setup.js +0 -397
  180. package/dist/commands/setup.js.map +0 -1
  181. package/dist/commands/test-init.d.ts +0 -9
  182. package/dist/commands/test-init.d.ts.map +0 -1
  183. package/dist/commands/test-init.js +0 -222
  184. package/dist/commands/test-init.js.map +0 -1
  185. package/dist/commands/test.d.ts +0 -25
  186. package/dist/commands/test.d.ts.map +0 -1
  187. package/dist/commands/test.js +0 -217
  188. package/dist/commands/test.js.map +0 -1
  189. package/dist/commands/vp.d.ts +0 -7
  190. package/dist/commands/vp.d.ts.map +0 -1
  191. package/dist/commands/vp.js +0 -571
  192. package/dist/commands/vp.js.map +0 -1
  193. package/dist/commands/watch.d.ts +0 -76
  194. package/dist/commands/watch.d.ts.map +0 -1
  195. package/dist/commands/watch.js +0 -613
  196. package/dist/commands/watch.js.map +0 -1
  197. package/dist/commands/worktree.d.ts +0 -63
  198. package/dist/commands/worktree.d.ts.map +0 -1
  199. package/dist/commands/worktree.js +0 -774
  200. package/dist/commands/worktree.js.map +0 -1
  201. package/dist/context/context-manager.d.ts +0 -155
  202. package/dist/context/context-manager.d.ts.map +0 -1
  203. package/dist/context/context-manager.js +0 -383
  204. package/dist/context/context-manager.js.map +0 -1
  205. package/dist/context/index.d.ts +0 -3
  206. package/dist/context/index.d.ts.map +0 -1
  207. package/dist/context/index.js +0 -6
  208. package/dist/context/index.js.map +0 -1
  209. package/dist/context/session-manager.d.ts +0 -207
  210. package/dist/context/session-manager.d.ts.map +0 -1
  211. package/dist/context/session-manager.js +0 -686
  212. package/dist/context/session-manager.js.map +0 -1
  213. package/dist/index.d.ts +0 -8
  214. package/dist/index.d.ts.map +0 -1
  215. package/dist/index.js +0 -51
  216. package/dist/index.js.map +0 -1
  217. package/dist/interactive/interactive-mode.d.ts +0 -76
  218. package/dist/interactive/interactive-mode.d.ts.map +0 -1
  219. package/dist/interactive/interactive-mode.js +0 -732
  220. package/dist/interactive/interactive-mode.js.map +0 -1
  221. package/dist/nlp/command-mapper.d.ts +0 -174
  222. package/dist/nlp/command-mapper.d.ts.map +0 -1
  223. package/dist/nlp/command-mapper.js +0 -624
  224. package/dist/nlp/command-mapper.js.map +0 -1
  225. package/dist/nlp/command-parser.d.ts +0 -106
  226. package/dist/nlp/command-parser.d.ts.map +0 -1
  227. package/dist/nlp/command-parser.js +0 -417
  228. package/dist/nlp/command-parser.js.map +0 -1
  229. package/dist/nlp/index.d.ts +0 -5
  230. package/dist/nlp/index.d.ts.map +0 -1
  231. package/dist/nlp/index.js +0 -8
  232. package/dist/nlp/index.js.map +0 -1
  233. package/dist/nlp/intent-classifier.d.ts +0 -59
  234. package/dist/nlp/intent-classifier.d.ts.map +0 -1
  235. package/dist/nlp/intent-classifier.js +0 -384
  236. package/dist/nlp/intent-classifier.js.map +0 -1
  237. package/dist/nlp/intent-parser.d.ts +0 -152
  238. package/dist/nlp/intent-parser.d.ts.map +0 -1
  239. package/dist/nlp/intent-parser.js +0 -744
  240. package/dist/nlp/intent-parser.js.map +0 -1
  241. package/dist/plugins/plugin-manager.d.ts +0 -120
  242. package/dist/plugins/plugin-manager.d.ts.map +0 -1
  243. package/dist/plugins/plugin-manager.js +0 -595
  244. package/dist/plugins/plugin-manager.js.map +0 -1
  245. package/dist/types/index.d.ts +0 -224
  246. package/dist/types/index.d.ts.map +0 -1
  247. package/dist/types/index.js +0 -3
  248. package/dist/types/index.js.map +0 -1
  249. package/dist/utils/backup-rollback-manager.d.ts +0 -72
  250. package/dist/utils/backup-rollback-manager.d.ts.map +0 -1
  251. package/dist/utils/backup-rollback-manager.js +0 -289
  252. package/dist/utils/backup-rollback-manager.js.map +0 -1
  253. package/dist/utils/claude-config-installer.d.ts +0 -98
  254. package/dist/utils/claude-config-installer.d.ts.map +0 -1
  255. package/dist/utils/claude-config-installer.js +0 -678
  256. package/dist/utils/claude-config-installer.js.map +0 -1
  257. package/dist/utils/config-manager.d.ts +0 -73
  258. package/dist/utils/config-manager.d.ts.map +0 -1
  259. package/dist/utils/config-manager.js +0 -339
  260. package/dist/utils/config-manager.js.map +0 -1
  261. package/dist/utils/error-handler.d.ts +0 -46
  262. package/dist/utils/error-handler.d.ts.map +0 -1
  263. package/dist/utils/error-handler.js +0 -169
  264. package/dist/utils/error-handler.js.map +0 -1
  265. package/dist/utils/logger.d.ts +0 -25
  266. package/dist/utils/logger.d.ts.map +0 -1
  267. package/dist/utils/logger.js +0 -105
  268. package/dist/utils/logger.js.map +0 -1
  269. package/src/commands/computer-setup-commands.ts +0 -872
@@ -2,7 +2,14 @@
2
2
  * Integration tests for computer-setup with Claude Code configuration
3
3
  */
4
4
 
5
- import { describe, it, expect, beforeEach, afterEach, jest } from '@jest/globals';
5
+ import {
6
+ describe,
7
+ it,
8
+ expect,
9
+ beforeEach,
10
+ afterEach,
11
+ jest,
12
+ } from '@jest/globals';
6
13
  import * as fs from 'fs/promises';
7
14
  import * as path from 'path';
8
15
  import { existsSync } from 'fs';
@@ -79,7 +86,10 @@ describe('Computer Setup Integration Tests', () => {
79
86
  await fs.writeFile(testFile, 'original content');
80
87
 
81
88
  // Create backup
82
- const metadata = await backupManager.createBackup([testFile], 'Test backup');
89
+ const metadata = await backupManager.createBackup(
90
+ [testFile],
91
+ 'Test backup'
92
+ );
83
93
 
84
94
  // Modify file
85
95
  await fs.writeFile(testFile, 'modified content');
@@ -102,7 +112,10 @@ describe('Computer Setup Integration Tests', () => {
102
112
  const testFile = path.join(testDir, 'test.txt');
103
113
  await fs.writeFile(testFile, 'content');
104
114
 
105
- const metadata = await backupManager.createBackup([testFile], 'Test backup');
115
+ const metadata = await backupManager.createBackup(
116
+ [testFile],
117
+ 'Test backup'
118
+ );
106
119
 
107
120
  const isValid = await backupManager.verifyBackup(metadata.backupId);
108
121
  expect(isValid).toBe(true);
@@ -206,7 +219,9 @@ describe('Computer Setup Integration Tests', () => {
206
219
  const conventionsPath = path.join(claudeDir, 'conventions.json');
207
220
  expect(existsSync(conventionsPath)).toBe(true);
208
221
 
209
- const conventions = JSON.parse(await fs.readFile(conventionsPath, 'utf-8'));
222
+ const conventions = JSON.parse(
223
+ await fs.readFile(conventionsPath, 'utf-8')
224
+ );
210
225
  expect(conventions).toHaveProperty('fileNaming');
211
226
  expect(conventions).toHaveProperty('codeStyle');
212
227
  });
@@ -220,9 +235,15 @@ describe('Computer Setup Integration Tests', () => {
220
235
  expect(result.success).toBe(true);
221
236
 
222
237
  const agentsDir = path.join(claudeDir, 'agents');
223
- expect(existsSync(path.join(agentsDir, 'backend-developer.json'))).toBe(true);
224
- expect(existsSync(path.join(agentsDir, 'frontend-developer.json'))).toBe(true);
225
- expect(existsSync(path.join(agentsDir, 'fullstack-developer.json'))).toBe(true);
238
+ expect(existsSync(path.join(agentsDir, 'backend-developer.json'))).toBe(
239
+ true
240
+ );
241
+ expect(existsSync(path.join(agentsDir, 'frontend-developer.json'))).toBe(
242
+ true
243
+ );
244
+ expect(existsSync(path.join(agentsDir, 'fullstack-developer.json'))).toBe(
245
+ true
246
+ );
226
247
  });
227
248
 
228
249
  it('should install git-worktree workflows', async () => {
@@ -279,7 +300,10 @@ describe('Computer Setup Integration Tests', () => {
279
300
  expect(result.skipped).toContain('CLAUDE.md');
280
301
 
281
302
  // Content should remain unchanged
282
- const content = await fs.readFile(path.join(claudeDir, 'CLAUDE.md'), 'utf-8');
303
+ const content = await fs.readFile(
304
+ path.join(claudeDir, 'CLAUDE.md'),
305
+ 'utf-8'
306
+ );
283
307
  expect(content).toBe('existing content');
284
308
  });
285
309
 
@@ -296,7 +320,10 @@ describe('Computer Setup Integration Tests', () => {
296
320
  expect(result.installed).toContain('CLAUDE.md');
297
321
 
298
322
  // Content should be updated
299
- const content = await fs.readFile(path.join(claudeDir, 'CLAUDE.md'), 'utf-8');
323
+ const content = await fs.readFile(
324
+ path.join(claudeDir, 'CLAUDE.md'),
325
+ 'utf-8'
326
+ );
300
327
  expect(content).toContain('Test content');
301
328
  });
302
329
 
@@ -347,16 +374,20 @@ describe('Computer Setup Integration Tests', () => {
347
374
  // Verify all components installed
348
375
  expect(existsSync(path.join(claudeDir, 'CLAUDE.md'))).toBe(true);
349
376
  expect(existsSync(path.join(claudeDir, 'conventions.json'))).toBe(true);
350
- expect(existsSync(path.join(claudeDir, 'hooks', 'pre-commit'))).toBe(true);
351
- expect(existsSync(path.join(claudeDir, 'agents', 'backend-developer.json'))).toBe(
377
+ expect(existsSync(path.join(claudeDir, 'hooks', 'pre-commit'))).toBe(
352
378
  true
353
379
  );
354
380
  expect(
355
- existsSync(path.join(claudeDir, 'workflows', 'feature-development.json'))
381
+ existsSync(path.join(claudeDir, 'agents', 'backend-developer.json'))
382
+ ).toBe(true);
383
+ expect(
384
+ existsSync(
385
+ path.join(claudeDir, 'workflows', 'feature-development.json')
386
+ )
387
+ ).toBe(true);
388
+ expect(
389
+ existsSync(path.join(claudeDir, 'scripts', 'validate-setup.sh'))
356
390
  ).toBe(true);
357
- expect(existsSync(path.join(claudeDir, 'scripts', 'validate-setup.sh'))).toBe(
358
- true
359
- );
360
391
  });
361
392
 
362
393
  it('should support complete backup and rollback cycle', async () => {
@@ -1,5 +1,416 @@
1
1
  /* eslint-disable @typescript-eslint/no-unsafe-function-type */
2
- // Type declarations for external modules
2
+ /**
3
+ * Ambient module declarations for workspace packages that may not be built.
4
+ *
5
+ * These declarations provide type stubs so the CLI package compiles
6
+ * independently of whether sibling workspace packages have been built.
7
+ * When the real packages are built and resolvable, TypeScript will prefer
8
+ * their actual declarations over these ambient ones.
9
+ */
10
+
11
+ // ---------------------------------------------------------------------------
12
+ // @wundr.io/computer-setup
13
+ // ---------------------------------------------------------------------------
14
+
15
+ declare module '@wundr.io/computer-setup' {
16
+ import { EventEmitter } from 'events';
17
+
18
+ export interface DeveloperProfile {
19
+ name: string;
20
+ email?: string;
21
+ role: string;
22
+ team?: string;
23
+ company?: string;
24
+ preferences?: ProfilePreferences;
25
+ languages?: Record<string, boolean>;
26
+ frameworks?: Record<string, boolean>;
27
+ tools: {
28
+ packageManagers?: Record<string, boolean>;
29
+ containers?: Record<string, boolean>;
30
+ editors?: Record<string, boolean>;
31
+ databases?: Record<string, boolean>;
32
+ cloud?: Record<string, boolean>;
33
+ ci?: Record<string, boolean>;
34
+ languages?: Record<string, boolean>;
35
+ cloudCLIs?: Record<string, boolean>;
36
+ monitoring?: Record<string, boolean>;
37
+ communication?: Record<string, boolean>;
38
+ };
39
+ }
40
+
41
+ export interface ProfilePreferences {
42
+ shell: 'bash' | 'zsh' | 'fish';
43
+ editor: 'vscode' | 'vim' | 'neovim' | 'sublime' | 'intellij';
44
+ theme: 'dark' | 'light' | 'auto';
45
+ gitConfig: {
46
+ userName: string;
47
+ userEmail: string;
48
+ signCommits: boolean;
49
+ gpgKey?: string;
50
+ sshKey?: string;
51
+ defaultBranch: string;
52
+ aliases: Record<string, string>;
53
+ };
54
+ aiTools: {
55
+ claudeCode: boolean;
56
+ ruflo: boolean;
57
+ mcpTools: string[];
58
+ swarmAgents: string[];
59
+ };
60
+ }
61
+
62
+ export interface SetupPlatform {
63
+ os: 'darwin' | 'linux' | 'win32';
64
+ arch: 'x64' | 'arm64';
65
+ distro?: string;
66
+ version?: string;
67
+ node?: string;
68
+ shell?: string;
69
+ }
70
+
71
+ export interface SetupResult {
72
+ success: boolean;
73
+ completedSteps: string[];
74
+ failedSteps: string[];
75
+ skippedSteps: string[];
76
+ warnings: string[];
77
+ errors: Error[];
78
+ duration: number;
79
+ report?: any;
80
+ }
81
+
82
+ export interface SetupProgress {
83
+ totalSteps: number;
84
+ completedSteps: number;
85
+ currentStep: string;
86
+ percentage: number;
87
+ estimatedTimeRemaining: number;
88
+ logs: string[];
89
+ }
90
+
91
+ export interface SetupProfile {
92
+ name: string;
93
+ description: string;
94
+ estimatedTimeMinutes: number;
95
+ [key: string]: any;
96
+ }
97
+
98
+ // ComputerSetupManager is the single setup orchestrator. (RealSetupOrchestrator
99
+ // and SetupOrchestrator were retired during the orchestrator consolidation.)
100
+ export class ComputerSetupManager extends EventEmitter {
101
+ static getInstance(): ComputerSetupManager;
102
+ initialize(): Promise<void>;
103
+ validateSetup(profile?: any): Promise<boolean>;
104
+ cleanup(): Promise<void>;
105
+ getProfile(name: string): Promise<DeveloperProfile>;
106
+ getDefaultProfile(): Promise<DeveloperProfile>;
107
+ getAvailableProfiles(): Promise<DeveloperProfile[]>;
108
+ setup(options: any): Promise<SetupResult>;
109
+ on(event: string, callback: Function): this;
110
+ }
111
+ }
112
+
113
+ // ---------------------------------------------------------------------------
114
+ // @wundr.io/core (supplement missing RAG exports)
115
+ // ---------------------------------------------------------------------------
116
+
117
+ declare module '@wundr.io/core' {
118
+ // Core exports that exist in built dist
119
+ export interface WundrError extends Error {
120
+ code?: string;
121
+ }
122
+ export interface EventBusEvent {
123
+ type: string;
124
+ payload?: unknown;
125
+ }
126
+ export type EventHandler = (event: EventBusEvent) => void | Promise<void>;
127
+ export interface EventBus {
128
+ emit(event: EventBusEvent): void;
129
+ on(type: string, handler: EventHandler): void;
130
+ off(type: string, handler: EventHandler): void;
131
+ }
132
+ export interface ValidationResult {
133
+ valid: boolean;
134
+ errors: string[];
135
+ }
136
+ export type UtilityFunction = (...args: any[]) => any;
137
+ export type AsyncUtilityFunction = (...args: any[]) => Promise<any>;
138
+ export interface Result<T> {
139
+ success: boolean;
140
+ data?: T;
141
+ error?: Error;
142
+ }
143
+ export interface BaseConfig {
144
+ [key: string]: unknown;
145
+ }
146
+ export type CoreEventType = string;
147
+ export const CORE_EVENTS: Record<string, string>;
148
+
149
+ // Logging
150
+ export function getLogger(name: string): any;
151
+ export function log(level: string, message: string, ...args: any[]): void;
152
+
153
+ // Events
154
+ export function getEventBus(): EventBus;
155
+
156
+ // Errors
157
+ export function success<T>(data: T): Result<T>;
158
+ export function failure(error: Error): Result<never>;
159
+ export function isSuccess<T>(result: Result<T>): boolean;
160
+ export function isFailure<T>(result: Result<T>): boolean;
161
+ export class BaseWundrError extends Error {
162
+ code: string;
163
+ constructor(message: string, code: string);
164
+ }
165
+
166
+ // RAG (not yet in built dist)
167
+ export interface RagInitOptions {
168
+ projectPath?: string;
169
+ projectName?: string;
170
+ force?: boolean;
171
+ skipIndexing?: boolean;
172
+ includePatterns?: string[];
173
+ excludePatterns?: string[];
174
+ chunkSize?: number;
175
+ chunkOverlap?: number;
176
+ embeddingModel?: string;
177
+ }
178
+
179
+ export interface RagInitResult {
180
+ success: boolean;
181
+ filesIndexed: number;
182
+ chunksCreated: number;
183
+ storePath: string;
184
+ configPath: string;
185
+ excludePath: string;
186
+ errors: string[];
187
+ warnings: string[];
188
+ framework: {
189
+ name: string;
190
+ projectType: string;
191
+ };
192
+ }
193
+
194
+ export function initProjectRag(
195
+ projectPathOrOptions: string | RagInitOptions,
196
+ options?: RagInitOptions
197
+ ): Promise<RagInitResult>;
198
+ export function isRagInitialized(projectPath: string): Promise<boolean>;
199
+ export function removeRag(projectPath: string): Promise<void>;
200
+ export function reindexProject(projectPath: string): Promise<RagInitResult>;
201
+
202
+ export const version: string;
203
+ export const name: string;
204
+ }
205
+
206
+ // ---------------------------------------------------------------------------
207
+ // @wundr.io/governance
208
+ // ---------------------------------------------------------------------------
209
+
210
+ declare module '@wundr.io/governance' {
211
+ export interface EvaluationContext {
212
+ projectPath?: string;
213
+ configPath?: string;
214
+ environment?: string;
215
+ evaluationId?: string;
216
+ timestamp?: Date;
217
+ source?: string;
218
+ repository?: string;
219
+ metadata?: Record<string, unknown>;
220
+ [key: string]: unknown;
221
+ }
222
+
223
+ export interface EvaluationResult {
224
+ passed: boolean;
225
+ score: number;
226
+ overallScore: number;
227
+ violations: PolicyViolation[];
228
+ warnings: string[];
229
+ details: EvaluationDetail[];
230
+ results: EvaluationResult[];
231
+ criticalIssues: string[];
232
+ issues: any[];
233
+ recommendations: any[];
234
+ }
235
+
236
+ export interface EvaluationDetail {
237
+ evaluator: string;
238
+ passed: boolean;
239
+ score: number;
240
+ message: string;
241
+ }
242
+
243
+ export interface PolicyViolation {
244
+ rule: string;
245
+ severity: string;
246
+ message: string;
247
+ description: string;
248
+ policyName: string;
249
+ policyId: string;
250
+ file?: string;
251
+ line?: number;
252
+ location: string;
253
+ suggestion?: string;
254
+ suggestedFix: string;
255
+ }
256
+
257
+ export interface ComplianceResult {
258
+ compliant: boolean;
259
+ score: number;
260
+ violations: PolicyViolation[];
261
+ recommendations: string[];
262
+ passedPolicies: any[];
263
+ skippedPolicies: any[];
264
+ }
265
+
266
+ export interface IPREConfig {
267
+ version: string;
268
+ metadata?: {
269
+ name?: string;
270
+ description?: string;
271
+ author?: string;
272
+ };
273
+ intent?: any;
274
+ policies?: any;
275
+ rewards?: any;
276
+ evaluators?: any;
277
+ }
278
+
279
+ export interface PolicyRule {
280
+ name: string;
281
+ description: string;
282
+ severity: string;
283
+ check: (context: EvaluationContext) => Promise<boolean>;
284
+ }
285
+
286
+ export interface EvaluatorSuite {
287
+ policyCompliance: EvaluatorAgent & {
288
+ checkPolicyCompliance(
289
+ context: EvaluationContext
290
+ ): Promise<ComplianceResult>;
291
+ };
292
+ rewardAlignment: EvaluatorAgent;
293
+ driftDetection: EvaluatorAgent;
294
+ [key: string]: any;
295
+ }
296
+
297
+ export class EvaluatorAgent {
298
+ constructor(config: any);
299
+ evaluate(context: EvaluationContext): Promise<EvaluationResult>;
300
+ }
301
+
302
+ export function createEvaluator(config: any): EvaluatorAgent;
303
+ export function createEvaluatorSuite(configs?: any): EvaluatorSuite;
304
+ export function runEvaluatorSuite(
305
+ suite: EvaluatorAgent[] | EvaluatorSuite,
306
+ context: EvaluationContext
307
+ ): Promise<EvaluationResult>;
308
+
309
+ export class PolicyEngine {
310
+ constructor(config?: any);
311
+ loadPolicies(path: string): Promise<void>;
312
+ check(context: EvaluationContext): Promise<ComplianceResult>;
313
+ addRule(rule: PolicyRule): void;
314
+ getViolationStats(): {
315
+ total: number;
316
+ bySeverity: Record<string, number>;
317
+ byCategory: Record<string, number>;
318
+ };
319
+ }
320
+
321
+ export const version: string;
322
+ export const name: string;
323
+ }
324
+
325
+ // ---------------------------------------------------------------------------
326
+ // @wundr.io/guardian-dashboard
327
+ // ---------------------------------------------------------------------------
328
+
329
+ declare module '@wundr.io/guardian-dashboard' {
330
+ export type HealthStatus =
331
+ | 'healthy'
332
+ | 'degraded'
333
+ | 'unhealthy'
334
+ | 'unknown'
335
+ | 'HEALTHY'
336
+ | 'CONCERNING'
337
+ | 'CRITICAL'
338
+ | 'DEGRADED'
339
+ | 'UNHEALTHY'
340
+ | 'UNKNOWN';
341
+ export type InterventionSeverity = 'critical' | 'high' | 'medium' | 'low';
342
+
343
+ export interface SessionDriftData {
344
+ sessionId: string;
345
+ driftScore: number;
346
+ timestamp: Date;
347
+ metrics: Record<string, number>;
348
+ }
349
+
350
+ export interface AggregatedDriftReport {
351
+ averageDrift: number;
352
+ averageScore: number;
353
+ maxDrift: number;
354
+ minScore: number;
355
+ maxScore: number;
356
+ sessionCount: number;
357
+ totalSessions: number;
358
+ overallStatus: HealthStatus;
359
+ trend: string;
360
+ trendDirection: 'improving' | 'stable' | 'degrading';
361
+ sessions: SessionDriftData[];
362
+ criticalSessions: SessionDriftData[];
363
+ concerningSessions: SessionDriftData[];
364
+ timestamp: Date;
365
+ }
366
+
367
+ export interface InterventionRecommendation {
368
+ id: string;
369
+ severity: InterventionSeverity;
370
+ title: string;
371
+ description: string;
372
+ suggestedAction: string;
373
+ estimatedImpact: number;
374
+ dimension: string;
375
+ action: string;
376
+ rationale: string;
377
+ urgency: number;
378
+ }
379
+
380
+ export interface AlignmentDriftMetrics {
381
+ overallDrift: number;
382
+ componentDrifts: Record<string, number>;
383
+ healthStatus: HealthStatus;
384
+ }
385
+
386
+ export class AlignmentDebtCalculator {
387
+ constructor(config?: any);
388
+ calculate(metrics: AlignmentDriftMetrics): number;
389
+ getDebtTrend(history: AlignmentDriftMetrics[]): string;
390
+ }
391
+
392
+ export class DriftScoreAggregator {
393
+ constructor(config?: any);
394
+ aggregate(sessions: SessionDriftData[]): AggregatedDriftReport;
395
+ addSessions(sessions: SessionDriftData[]): void;
396
+ aggregateSessionScores(sessions: SessionDriftData[]): AggregatedDriftReport;
397
+ getHealthStatus(score: number): HealthStatus;
398
+ }
399
+
400
+ export class InterventionRecommender {
401
+ constructor(config?: any);
402
+ recommend(report: AggregatedDriftReport): InterventionRecommendation[];
403
+ recommendInterventions(data: any): InterventionRecommendation[];
404
+ prioritize(
405
+ recommendations: InterventionRecommendation[]
406
+ ): InterventionRecommendation[];
407
+ }
408
+ }
409
+
410
+ // ---------------------------------------------------------------------------
411
+ // @wundr/computer-setup (legacy without .io)
412
+ // ---------------------------------------------------------------------------
413
+
3
414
  declare module '@wundr/computer-setup' {
4
415
  export class ComputerSetupManager {
5
416
  static getInstance(): ComputerSetupManager;
@@ -22,6 +433,10 @@ declare module '@wundr/computer-setup' {
22
433
  }
23
434
  }
24
435
 
436
+ // ---------------------------------------------------------------------------
437
+ // @wundr/core (legacy without .io)
438
+ // ---------------------------------------------------------------------------
439
+
25
440
  declare module '@wundr/core' {
26
441
  export interface CoreConfig {
27
442
  [key: string]: any;
@@ -30,6 +445,10 @@ declare module '@wundr/core' {
30
445
  export function getLogger(name: string): any;
31
446
  }
32
447
 
448
+ // ---------------------------------------------------------------------------
449
+ // @wundr/project-templates
450
+ // ---------------------------------------------------------------------------
451
+
33
452
  declare module '@wundr/project-templates' {
34
453
  export interface TemplateConfig {
35
454
  name: string;
@@ -42,6 +461,10 @@ declare module '@wundr/project-templates' {
42
461
  export const projectTemplates: Record<string, any>;
43
462
  }
44
463
 
464
+ // ---------------------------------------------------------------------------
465
+ // open
466
+ // ---------------------------------------------------------------------------
467
+
45
468
  declare module 'open' {
46
469
  interface Options {
47
470
  app?: string | string[];
@@ -39,8 +39,7 @@ export class BackupRollbackManager {
39
39
 
40
40
  constructor(backupDir?: string) {
41
41
  this.homeDir = process.env.HOME || process.env.USERPROFILE || '';
42
- this.backupDir =
43
- backupDir || path.join(this.homeDir, '.wundr', 'backups');
42
+ this.backupDir = backupDir || path.join(this.homeDir, '.wundr', 'backups');
44
43
  this.metadataFile = path.join(this.backupDir, 'metadata.json');
45
44
  }
46
45
 
@@ -67,7 +66,7 @@ export class BackupRollbackManager {
67
66
  */
68
67
  async createBackup(
69
68
  files: string[],
70
- reason: string = 'Manual backup',
69
+ reason: string = 'Manual backup'
71
70
  ): Promise<BackupMetadata> {
72
71
  const backupId = this.generateBackupId();
73
72
  const timestamp = new Date().toISOString();
@@ -203,7 +202,9 @@ export class BackupRollbackManager {
203
202
  console.log(chalk.green(`\n✅ Restored ${restoredFiles.length} files`));
204
203
 
205
204
  if (failedFiles.length > 0) {
206
- console.log(chalk.red(`❌ Failed to restore ${failedFiles.length} files`));
205
+ console.log(
206
+ chalk.red(`❌ Failed to restore ${failedFiles.length} files`)
207
+ );
207
208
  failedFiles.forEach(file => {
208
209
  console.log(chalk.red(` - ${file}`));
209
210
  });
@@ -224,8 +225,9 @@ export class BackupRollbackManager {
224
225
  try {
225
226
  const content = await fs.readFile(this.metadataFile, 'utf-8');
226
227
  const backups = JSON.parse(content) as BackupMetadata[];
227
- return backups.sort((a, b) =>
228
- new Date(b.timestamp).getTime() - new Date(a.timestamp).getTime(),
228
+ return backups.sort(
229
+ (a, b) =>
230
+ new Date(b.timestamp).getTime() - new Date(a.timestamp).getTime()
229
231
  );
230
232
  } catch (error) {
231
233
  logger.error('Failed to list backups', error);
@@ -347,8 +349,9 @@ export class BackupRollbackManager {
347
349
  console.log(chalk.white('Backup ID:'), chalk.green(metadata.backupId));
348
350
  console.log(chalk.white('Timestamp:'), chalk.gray(metadata.timestamp));
349
351
  console.log(chalk.white('Reason:'), chalk.gray(metadata.reason));
350
- console.log(chalk.white('Status:'),
351
- metadata.success ? chalk.green('Success') : chalk.red('Failed'),
352
+ console.log(
353
+ chalk.white('Status:'),
354
+ metadata.success ? chalk.green('Success') : chalk.red('Failed')
352
355
  );
353
356
  console.log(chalk.white('Files:'), chalk.cyan(metadata.files.length));
354
357
 
@@ -104,7 +104,7 @@ export class ConfigManager {
104
104
  'WUNDR_CONFIG_INVALID',
105
105
  'Failed to load or parse configuration file',
106
106
  { configPath: configFile },
107
- true,
107
+ true
108
108
  );
109
109
  }
110
110
  }
@@ -129,7 +129,7 @@ export class ConfigManager {
129
129
  'WUNDR_CONFIG_INVALID',
130
130
  'Failed to save configuration file',
131
131
  { configPath: configFile },
132
- false,
132
+ false
133
133
  );
134
134
  }
135
135
  }
@@ -169,7 +169,7 @@ export class ConfigManager {
169
169
  return {
170
170
  valid: false,
171
171
  errors: error.issues.map(
172
- issue => `${issue.path.join('.')}: ${issue.message}`,
172
+ issue => `${issue.path.join('.')}: ${issue.message}`
173
173
  ),
174
174
  };
175
175
  }
@@ -116,7 +116,7 @@ class ErrorHandler {
116
116
 
117
117
  console.error(chalk.yellow('\n💡 This appears to be an unexpected error.'));
118
118
  console.error(
119
- chalk.yellow(' Please report this issue with the above details.'),
119
+ chalk.yellow(' Please report this issue with the above details.')
120
120
  );
121
121
  }
122
122
 
@@ -167,7 +167,7 @@ class ErrorHandler {
167
167
  code: string,
168
168
  message: string,
169
169
  context?: Record<string, any>,
170
- recoverable = false,
170
+ recoverable = false
171
171
  ): WundrError {
172
172
  const error = new Error(message) as WundrError;
173
173
  error.code = code;