@wundr.io/cli 1.0.0 → 1.0.2-dev.20260530174250.ef0ec927

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 (230) hide show
  1. package/README.md +696 -280
  2. package/bin/wundr.js +13 -5
  3. package/package.json +30 -9
  4. package/src/ai/ai-service.ts +6 -4
  5. package/src/ai/claude-client.ts +6 -2
  6. package/src/ai/conversation-manager.ts +12 -5
  7. package/src/cli.ts +42 -13
  8. package/src/commands/ai.ts +340 -64
  9. package/src/commands/alignment.ts +1212 -0
  10. package/src/commands/analyze-optimized.ts +371 -33
  11. package/src/commands/analyze.ts +8 -6
  12. package/src/commands/batch.ts +166 -26
  13. package/src/commands/chat.ts +20 -10
  14. package/src/commands/claude-init.ts +31 -27
  15. package/src/commands/claude-setup.ts +761 -81
  16. package/src/commands/computer-setup.ts +524 -12
  17. package/src/commands/create-command.ts +3 -3
  18. package/src/commands/create.ts +9 -6
  19. package/src/commands/dashboard.ts +11 -6
  20. package/src/commands/govern.ts +11 -6
  21. package/src/commands/governance.ts +1005 -0
  22. package/src/commands/guardian.ts +887 -0
  23. package/src/commands/init.ts +104 -11
  24. package/src/commands/orchestrator.ts +789 -0
  25. package/src/commands/performance-optimizer.ts +15 -10
  26. package/src/commands/plugins.ts +8 -5
  27. package/src/commands/project-update.ts +1156 -0
  28. package/src/commands/rag.ts +1011 -0
  29. package/src/commands/session.ts +631 -0
  30. package/src/commands/setup.ts +42 -344
  31. package/src/commands/test-init.ts +3 -2
  32. package/src/commands/test.ts +3 -2
  33. package/src/commands/watch.ts +21 -11
  34. package/src/commands/worktree.ts +1057 -0
  35. package/src/context/context-manager.ts +5 -2
  36. package/src/context/session-manager.ts +18 -7
  37. package/src/framework/command-interface.ts +520 -0
  38. package/src/framework/command-registry.ts +942 -0
  39. package/src/framework/completion-exporter.ts +383 -0
  40. package/src/framework/debug-logger.ts +519 -0
  41. package/src/framework/error-handler.ts +867 -0
  42. package/src/framework/help-generator.ts +540 -0
  43. package/src/framework/index.ts +169 -0
  44. package/src/framework/interactive-repl.ts +703 -0
  45. package/src/framework/output-formatter.ts +834 -0
  46. package/src/framework/progress-manager.ts +539 -0
  47. package/src/index.ts +3 -2
  48. package/src/interactive/interactive-mode.ts +14 -7
  49. package/src/lib/conflict-resolution.ts +818 -0
  50. package/src/lib/merge-strategy.ts +550 -0
  51. package/src/lib/safety-mechanisms.ts +451 -0
  52. package/src/lib/state-detection.ts +1030 -0
  53. package/src/nlp/command-mapper.ts +8 -3
  54. package/src/nlp/command-parser.ts +5 -2
  55. package/src/nlp/intent-parser.ts +23 -9
  56. package/src/plugins/plugin-manager.ts +50 -24
  57. package/src/tests/computer-setup-integration.test.ts +470 -0
  58. package/src/types/index.ts +1 -1
  59. package/src/types/modules.d.ts +425 -1
  60. package/src/utils/backup-rollback-manager.ts +366 -0
  61. package/src/utils/claude-config-installer.ts +823 -0
  62. package/src/utils/config-manager.ts +9 -6
  63. package/src/utils/error-handler.ts +3 -1
  64. package/src/utils/logger.ts +35 -12
  65. package/templates/batch/ci-cd.yaml +7 -7
  66. package/test-suites/api/health.spec.ts +20 -23
  67. package/test-suites/helpers/test-config.ts +14 -13
  68. package/test-suites/ui/accessibility.spec.ts +27 -22
  69. package/test-suites/ui/smoke.spec.ts +26 -21
  70. package/dist/ai/ai-service.d.ts +0 -152
  71. package/dist/ai/ai-service.d.ts.map +0 -1
  72. package/dist/ai/ai-service.js +0 -430
  73. package/dist/ai/ai-service.js.map +0 -1
  74. package/dist/ai/claude-client.d.ts +0 -130
  75. package/dist/ai/claude-client.d.ts.map +0 -1
  76. package/dist/ai/claude-client.js +0 -339
  77. package/dist/ai/claude-client.js.map +0 -1
  78. package/dist/ai/conversation-manager.d.ts +0 -164
  79. package/dist/ai/conversation-manager.d.ts.map +0 -1
  80. package/dist/ai/conversation-manager.js +0 -612
  81. package/dist/ai/conversation-manager.js.map +0 -1
  82. package/dist/ai/index.d.ts +0 -5
  83. package/dist/ai/index.d.ts.map +0 -1
  84. package/dist/ai/index.js +0 -8
  85. package/dist/ai/index.js.map +0 -1
  86. package/dist/cli.d.ts +0 -36
  87. package/dist/cli.d.ts.map +0 -1
  88. package/dist/cli.js +0 -173
  89. package/dist/cli.js.map +0 -1
  90. package/dist/commands/ai.d.ts +0 -89
  91. package/dist/commands/ai.d.ts.map +0 -1
  92. package/dist/commands/ai.js +0 -735
  93. package/dist/commands/ai.js.map +0 -1
  94. package/dist/commands/analyze-optimized.d.ts +0 -14
  95. package/dist/commands/analyze-optimized.d.ts.map +0 -1
  96. package/dist/commands/analyze-optimized.js +0 -437
  97. package/dist/commands/analyze-optimized.js.map +0 -1
  98. package/dist/commands/analyze.d.ts +0 -65
  99. package/dist/commands/analyze.d.ts.map +0 -1
  100. package/dist/commands/analyze.js +0 -435
  101. package/dist/commands/analyze.js.map +0 -1
  102. package/dist/commands/batch.d.ts +0 -71
  103. package/dist/commands/batch.d.ts.map +0 -1
  104. package/dist/commands/batch.js +0 -738
  105. package/dist/commands/batch.js.map +0 -1
  106. package/dist/commands/chat.d.ts +0 -71
  107. package/dist/commands/chat.d.ts.map +0 -1
  108. package/dist/commands/chat.js +0 -674
  109. package/dist/commands/chat.js.map +0 -1
  110. package/dist/commands/claude-init.d.ts +0 -28
  111. package/dist/commands/claude-init.d.ts.map +0 -1
  112. package/dist/commands/claude-init.js +0 -587
  113. package/dist/commands/claude-init.js.map +0 -1
  114. package/dist/commands/claude-setup.d.ts +0 -32
  115. package/dist/commands/claude-setup.d.ts.map +0 -1
  116. package/dist/commands/claude-setup.js +0 -570
  117. package/dist/commands/claude-setup.js.map +0 -1
  118. package/dist/commands/computer-setup-commands.d.ts +0 -39
  119. package/dist/commands/computer-setup-commands.d.ts.map +0 -1
  120. package/dist/commands/computer-setup-commands.js +0 -563
  121. package/dist/commands/computer-setup-commands.js.map +0 -1
  122. package/dist/commands/computer-setup.d.ts +0 -7
  123. package/dist/commands/computer-setup.d.ts.map +0 -1
  124. package/dist/commands/computer-setup.js +0 -481
  125. package/dist/commands/computer-setup.js.map +0 -1
  126. package/dist/commands/create-command.d.ts +0 -7
  127. package/dist/commands/create-command.d.ts.map +0 -1
  128. package/dist/commands/create-command.js +0 -158
  129. package/dist/commands/create-command.js.map +0 -1
  130. package/dist/commands/create.d.ts +0 -74
  131. package/dist/commands/create.d.ts.map +0 -1
  132. package/dist/commands/create.js +0 -556
  133. package/dist/commands/create.js.map +0 -1
  134. package/dist/commands/dashboard.d.ts +0 -91
  135. package/dist/commands/dashboard.d.ts.map +0 -1
  136. package/dist/commands/dashboard.js +0 -537
  137. package/dist/commands/dashboard.js.map +0 -1
  138. package/dist/commands/govern.d.ts +0 -70
  139. package/dist/commands/govern.d.ts.map +0 -1
  140. package/dist/commands/govern.js +0 -480
  141. package/dist/commands/govern.js.map +0 -1
  142. package/dist/commands/init.d.ts +0 -55
  143. package/dist/commands/init.d.ts.map +0 -1
  144. package/dist/commands/init.js +0 -584
  145. package/dist/commands/init.js.map +0 -1
  146. package/dist/commands/performance-optimizer.d.ts +0 -30
  147. package/dist/commands/performance-optimizer.d.ts.map +0 -1
  148. package/dist/commands/performance-optimizer.js +0 -649
  149. package/dist/commands/performance-optimizer.js.map +0 -1
  150. package/dist/commands/plugins.d.ts +0 -87
  151. package/dist/commands/plugins.d.ts.map +0 -1
  152. package/dist/commands/plugins.js +0 -685
  153. package/dist/commands/plugins.js.map +0 -1
  154. package/dist/commands/setup.d.ts +0 -29
  155. package/dist/commands/setup.d.ts.map +0 -1
  156. package/dist/commands/setup.js +0 -399
  157. package/dist/commands/setup.js.map +0 -1
  158. package/dist/commands/test-init.d.ts +0 -9
  159. package/dist/commands/test-init.d.ts.map +0 -1
  160. package/dist/commands/test-init.js +0 -222
  161. package/dist/commands/test-init.js.map +0 -1
  162. package/dist/commands/test.d.ts +0 -25
  163. package/dist/commands/test.d.ts.map +0 -1
  164. package/dist/commands/test.js +0 -217
  165. package/dist/commands/test.js.map +0 -1
  166. package/dist/commands/watch.d.ts +0 -76
  167. package/dist/commands/watch.d.ts.map +0 -1
  168. package/dist/commands/watch.js +0 -610
  169. package/dist/commands/watch.js.map +0 -1
  170. package/dist/context/context-manager.d.ts +0 -155
  171. package/dist/context/context-manager.d.ts.map +0 -1
  172. package/dist/context/context-manager.js +0 -383
  173. package/dist/context/context-manager.js.map +0 -1
  174. package/dist/context/index.d.ts +0 -3
  175. package/dist/context/index.d.ts.map +0 -1
  176. package/dist/context/index.js +0 -6
  177. package/dist/context/index.js.map +0 -1
  178. package/dist/context/session-manager.d.ts +0 -207
  179. package/dist/context/session-manager.d.ts.map +0 -1
  180. package/dist/context/session-manager.js +0 -682
  181. package/dist/context/session-manager.js.map +0 -1
  182. package/dist/index.d.ts +0 -8
  183. package/dist/index.d.ts.map +0 -1
  184. package/dist/index.js +0 -51
  185. package/dist/index.js.map +0 -1
  186. package/dist/interactive/interactive-mode.d.ts +0 -76
  187. package/dist/interactive/interactive-mode.d.ts.map +0 -1
  188. package/dist/interactive/interactive-mode.js +0 -730
  189. package/dist/interactive/interactive-mode.js.map +0 -1
  190. package/dist/nlp/command-mapper.d.ts +0 -174
  191. package/dist/nlp/command-mapper.d.ts.map +0 -1
  192. package/dist/nlp/command-mapper.js +0 -623
  193. package/dist/nlp/command-mapper.js.map +0 -1
  194. package/dist/nlp/command-parser.d.ts +0 -106
  195. package/dist/nlp/command-parser.d.ts.map +0 -1
  196. package/dist/nlp/command-parser.js +0 -416
  197. package/dist/nlp/command-parser.js.map +0 -1
  198. package/dist/nlp/index.d.ts +0 -5
  199. package/dist/nlp/index.d.ts.map +0 -1
  200. package/dist/nlp/index.js +0 -8
  201. package/dist/nlp/index.js.map +0 -1
  202. package/dist/nlp/intent-classifier.d.ts +0 -59
  203. package/dist/nlp/intent-classifier.d.ts.map +0 -1
  204. package/dist/nlp/intent-classifier.js +0 -384
  205. package/dist/nlp/intent-classifier.js.map +0 -1
  206. package/dist/nlp/intent-parser.d.ts +0 -152
  207. package/dist/nlp/intent-parser.d.ts.map +0 -1
  208. package/dist/nlp/intent-parser.js +0 -739
  209. package/dist/nlp/intent-parser.js.map +0 -1
  210. package/dist/plugins/plugin-manager.d.ts +0 -120
  211. package/dist/plugins/plugin-manager.d.ts.map +0 -1
  212. package/dist/plugins/plugin-manager.js +0 -595
  213. package/dist/plugins/plugin-manager.js.map +0 -1
  214. package/dist/types/index.d.ts +0 -224
  215. package/dist/types/index.d.ts.map +0 -1
  216. package/dist/types/index.js +0 -3
  217. package/dist/types/index.js.map +0 -1
  218. package/dist/utils/config-manager.d.ts +0 -73
  219. package/dist/utils/config-manager.d.ts.map +0 -1
  220. package/dist/utils/config-manager.js +0 -339
  221. package/dist/utils/config-manager.js.map +0 -1
  222. package/dist/utils/error-handler.d.ts +0 -46
  223. package/dist/utils/error-handler.d.ts.map +0 -1
  224. package/dist/utils/error-handler.js +0 -169
  225. package/dist/utils/error-handler.js.map +0 -1
  226. package/dist/utils/logger.d.ts +0 -25
  227. package/dist/utils/logger.d.ts.map +0 -1
  228. package/dist/utils/logger.js +0 -94
  229. package/dist/utils/logger.js.map +0 -1
  230. package/src/commands/computer-setup-commands.ts +0 -709
@@ -1,4 +1,416 @@
1
- // Type declarations for external modules
1
+ /* eslint-disable @typescript-eslint/no-unsafe-function-type */
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
+
2
414
  declare module '@wundr/computer-setup' {
3
415
  export class ComputerSetupManager {
4
416
  static getInstance(): ComputerSetupManager;
@@ -21,6 +433,10 @@ declare module '@wundr/computer-setup' {
21
433
  }
22
434
  }
23
435
 
436
+ // ---------------------------------------------------------------------------
437
+ // @wundr/core (legacy without .io)
438
+ // ---------------------------------------------------------------------------
439
+
24
440
  declare module '@wundr/core' {
25
441
  export interface CoreConfig {
26
442
  [key: string]: any;
@@ -29,6 +445,10 @@ declare module '@wundr/core' {
29
445
  export function getLogger(name: string): any;
30
446
  }
31
447
 
448
+ // ---------------------------------------------------------------------------
449
+ // @wundr/project-templates
450
+ // ---------------------------------------------------------------------------
451
+
32
452
  declare module '@wundr/project-templates' {
33
453
  export interface TemplateConfig {
34
454
  name: string;
@@ -41,6 +461,10 @@ declare module '@wundr/project-templates' {
41
461
  export const projectTemplates: Record<string, any>;
42
462
  }
43
463
 
464
+ // ---------------------------------------------------------------------------
465
+ // open
466
+ // ---------------------------------------------------------------------------
467
+
44
468
  declare module 'open' {
45
469
  interface Options {
46
470
  app?: string | string[];