@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.
- package/bin/wundr.js +8 -4
- package/package.json +23 -23
- package/src/ai/ai-service.ts +16 -17
- package/src/ai/claude-client.ts +16 -16
- package/src/ai/conversation-manager.ts +29 -29
- package/src/cli.ts +4 -4
- package/src/commands/ai.ts +246 -78
- package/src/commands/alignment.ts +74 -74
- package/src/commands/analyze-optimized.ts +111 -78
- package/src/commands/analyze.ts +14 -14
- package/src/commands/batch.ts +179 -42
- package/src/commands/chat.ts +37 -30
- package/src/commands/claude-init.ts +41 -45
- package/src/commands/claude-setup.ts +204 -119
- package/src/commands/computer-setup.ts +85 -43
- package/src/commands/create-command.ts +4 -4
- package/src/commands/create.ts +27 -27
- package/src/commands/dashboard.ts +24 -24
- package/src/commands/govern.ts +25 -25
- package/src/commands/governance.ts +34 -34
- package/src/commands/guardian.ts +56 -56
- package/src/commands/init.ts +25 -22
- package/src/commands/orchestrator.ts +68 -41
- package/src/commands/performance-optimizer.ts +34 -35
- package/src/commands/plugins.ts +27 -27
- package/src/commands/project-update.ts +175 -72
- package/src/commands/rag.ts +185 -78
- package/src/commands/session.ts +35 -35
- package/src/commands/setup.ts +40 -344
- package/src/commands/test-init.ts +3 -3
- package/src/commands/test.ts +4 -4
- package/src/commands/watch.ts +28 -29
- package/src/commands/worktree.ts +49 -49
- package/src/context/context-manager.ts +10 -10
- package/src/context/session-manager.ts +41 -41
- package/src/framework/command-interface.ts +520 -0
- package/src/framework/command-registry.ts +942 -0
- package/src/framework/completion-exporter.ts +383 -0
- package/src/framework/debug-logger.ts +519 -0
- package/src/framework/error-handler.ts +867 -0
- package/src/framework/help-generator.ts +540 -0
- package/src/framework/index.ts +169 -0
- package/src/framework/interactive-repl.ts +703 -0
- package/src/framework/output-formatter.ts +834 -0
- package/src/framework/progress-manager.ts +539 -0
- package/src/index.ts +4 -4
- package/src/interactive/interactive-mode.ts +16 -16
- package/src/lib/conflict-resolution.ts +799 -9
- package/src/lib/merge-strategy.ts +529 -7
- package/src/lib/safety-mechanisms.ts +422 -18
- package/src/lib/state-detection.ts +1015 -13
- package/src/nlp/command-mapper.ts +29 -29
- package/src/nlp/command-parser.ts +17 -17
- package/src/nlp/intent-classifier.ts +7 -7
- package/src/nlp/intent-parser.ts +54 -52
- package/src/plugins/plugin-manager.ts +61 -39
- package/src/tests/computer-setup-integration.test.ts +46 -15
- package/src/types/modules.d.ts +424 -1
- package/src/utils/backup-rollback-manager.ts +11 -8
- package/src/utils/config-manager.ts +3 -3
- package/src/utils/error-handler.ts +2 -2
- package/src/utils/logger.ts +22 -22
- package/templates/batch/ci-cd.yaml +7 -7
- package/test-suites/api/health.spec.ts +20 -23
- package/test-suites/helpers/test-config.ts +14 -13
- package/test-suites/ui/accessibility.spec.ts +27 -22
- package/test-suites/ui/smoke.spec.ts +26 -21
- package/LICENSE +0 -21
- package/dist/ai/ai-service.d.ts +0 -152
- package/dist/ai/ai-service.d.ts.map +0 -1
- package/dist/ai/ai-service.js +0 -430
- package/dist/ai/ai-service.js.map +0 -1
- package/dist/ai/claude-client.d.ts +0 -130
- package/dist/ai/claude-client.d.ts.map +0 -1
- package/dist/ai/claude-client.js +0 -340
- package/dist/ai/claude-client.js.map +0 -1
- package/dist/ai/conversation-manager.d.ts +0 -164
- package/dist/ai/conversation-manager.d.ts.map +0 -1
- package/dist/ai/conversation-manager.js +0 -614
- package/dist/ai/conversation-manager.js.map +0 -1
- package/dist/ai/index.d.ts +0 -5
- package/dist/ai/index.d.ts.map +0 -1
- package/dist/ai/index.js +0 -8
- package/dist/ai/index.js.map +0 -1
- package/dist/cli.d.ts +0 -36
- package/dist/cli.d.ts.map +0 -1
- package/dist/cli.js +0 -192
- package/dist/cli.js.map +0 -1
- package/dist/commands/ai.d.ts +0 -89
- package/dist/commands/ai.d.ts.map +0 -1
- package/dist/commands/ai.js +0 -799
- package/dist/commands/ai.js.map +0 -1
- package/dist/commands/alignment.d.ts +0 -78
- package/dist/commands/alignment.d.ts.map +0 -1
- package/dist/commands/alignment.js +0 -817
- package/dist/commands/alignment.js.map +0 -1
- package/dist/commands/analyze-optimized.d.ts +0 -14
- package/dist/commands/analyze-optimized.d.ts.map +0 -1
- package/dist/commands/analyze-optimized.js +0 -600
- package/dist/commands/analyze-optimized.js.map +0 -1
- package/dist/commands/analyze.d.ts +0 -65
- package/dist/commands/analyze.d.ts.map +0 -1
- package/dist/commands/analyze.js +0 -435
- package/dist/commands/analyze.js.map +0 -1
- package/dist/commands/batch.d.ts +0 -71
- package/dist/commands/batch.d.ts.map +0 -1
- package/dist/commands/batch.js +0 -738
- package/dist/commands/batch.js.map +0 -1
- package/dist/commands/chat.d.ts +0 -71
- package/dist/commands/chat.d.ts.map +0 -1
- package/dist/commands/chat.js +0 -674
- package/dist/commands/chat.js.map +0 -1
- package/dist/commands/claude-init.d.ts +0 -28
- package/dist/commands/claude-init.d.ts.map +0 -1
- package/dist/commands/claude-init.js +0 -591
- package/dist/commands/claude-init.js.map +0 -1
- package/dist/commands/claude-setup.d.ts +0 -119
- package/dist/commands/claude-setup.d.ts.map +0 -1
- package/dist/commands/claude-setup.js +0 -1073
- package/dist/commands/claude-setup.js.map +0 -1
- package/dist/commands/computer-setup-commands.d.ts +0 -53
- package/dist/commands/computer-setup-commands.d.ts.map +0 -1
- package/dist/commands/computer-setup-commands.js +0 -705
- package/dist/commands/computer-setup-commands.js.map +0 -1
- package/dist/commands/computer-setup.d.ts +0 -7
- package/dist/commands/computer-setup.d.ts.map +0 -1
- package/dist/commands/computer-setup.js +0 -849
- package/dist/commands/computer-setup.js.map +0 -1
- package/dist/commands/create-command.d.ts +0 -7
- package/dist/commands/create-command.d.ts.map +0 -1
- package/dist/commands/create-command.js +0 -158
- package/dist/commands/create-command.js.map +0 -1
- package/dist/commands/create.d.ts +0 -74
- package/dist/commands/create.d.ts.map +0 -1
- package/dist/commands/create.js +0 -556
- package/dist/commands/create.js.map +0 -1
- package/dist/commands/dashboard.d.ts +0 -91
- package/dist/commands/dashboard.d.ts.map +0 -1
- package/dist/commands/dashboard.js +0 -538
- package/dist/commands/dashboard.js.map +0 -1
- package/dist/commands/govern.d.ts +0 -70
- package/dist/commands/govern.d.ts.map +0 -1
- package/dist/commands/govern.js +0 -481
- package/dist/commands/govern.js.map +0 -1
- package/dist/commands/governance.d.ts +0 -17
- package/dist/commands/governance.d.ts.map +0 -1
- package/dist/commands/governance.js +0 -703
- package/dist/commands/governance.js.map +0 -1
- package/dist/commands/guardian.d.ts +0 -20
- package/dist/commands/guardian.d.ts.map +0 -1
- package/dist/commands/guardian.js +0 -597
- package/dist/commands/guardian.js.map +0 -1
- package/dist/commands/init.d.ts +0 -59
- package/dist/commands/init.d.ts.map +0 -1
- package/dist/commands/init.js +0 -650
- package/dist/commands/init.js.map +0 -1
- package/dist/commands/orchestrator.d.ts +0 -7
- package/dist/commands/orchestrator.d.ts.map +0 -1
- package/dist/commands/orchestrator.js +0 -571
- package/dist/commands/orchestrator.js.map +0 -1
- package/dist/commands/performance-optimizer.d.ts +0 -30
- package/dist/commands/performance-optimizer.d.ts.map +0 -1
- package/dist/commands/performance-optimizer.js +0 -650
- package/dist/commands/performance-optimizer.js.map +0 -1
- package/dist/commands/plugins.d.ts +0 -87
- package/dist/commands/plugins.d.ts.map +0 -1
- package/dist/commands/plugins.js +0 -685
- package/dist/commands/plugins.js.map +0 -1
- package/dist/commands/rag.d.ts +0 -7
- package/dist/commands/rag.d.ts.map +0 -1
- package/dist/commands/rag.js +0 -748
- package/dist/commands/rag.js.map +0 -1
- package/dist/commands/session.d.ts +0 -41
- package/dist/commands/session.d.ts.map +0 -1
- package/dist/commands/session.js +0 -441
- package/dist/commands/session.js.map +0 -1
- package/dist/commands/setup.d.ts +0 -29
- package/dist/commands/setup.d.ts.map +0 -1
- package/dist/commands/setup.js +0 -397
- package/dist/commands/setup.js.map +0 -1
- package/dist/commands/test-init.d.ts +0 -9
- package/dist/commands/test-init.d.ts.map +0 -1
- package/dist/commands/test-init.js +0 -222
- package/dist/commands/test-init.js.map +0 -1
- package/dist/commands/test.d.ts +0 -25
- package/dist/commands/test.d.ts.map +0 -1
- package/dist/commands/test.js +0 -217
- package/dist/commands/test.js.map +0 -1
- package/dist/commands/vp.d.ts +0 -7
- package/dist/commands/vp.d.ts.map +0 -1
- package/dist/commands/vp.js +0 -571
- package/dist/commands/vp.js.map +0 -1
- package/dist/commands/watch.d.ts +0 -76
- package/dist/commands/watch.d.ts.map +0 -1
- package/dist/commands/watch.js +0 -613
- package/dist/commands/watch.js.map +0 -1
- package/dist/commands/worktree.d.ts +0 -63
- package/dist/commands/worktree.d.ts.map +0 -1
- package/dist/commands/worktree.js +0 -774
- package/dist/commands/worktree.js.map +0 -1
- package/dist/context/context-manager.d.ts +0 -155
- package/dist/context/context-manager.d.ts.map +0 -1
- package/dist/context/context-manager.js +0 -383
- package/dist/context/context-manager.js.map +0 -1
- package/dist/context/index.d.ts +0 -3
- package/dist/context/index.d.ts.map +0 -1
- package/dist/context/index.js +0 -6
- package/dist/context/index.js.map +0 -1
- package/dist/context/session-manager.d.ts +0 -207
- package/dist/context/session-manager.d.ts.map +0 -1
- package/dist/context/session-manager.js +0 -686
- package/dist/context/session-manager.js.map +0 -1
- package/dist/index.d.ts +0 -8
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js +0 -51
- package/dist/index.js.map +0 -1
- package/dist/interactive/interactive-mode.d.ts +0 -76
- package/dist/interactive/interactive-mode.d.ts.map +0 -1
- package/dist/interactive/interactive-mode.js +0 -732
- package/dist/interactive/interactive-mode.js.map +0 -1
- package/dist/nlp/command-mapper.d.ts +0 -174
- package/dist/nlp/command-mapper.d.ts.map +0 -1
- package/dist/nlp/command-mapper.js +0 -624
- package/dist/nlp/command-mapper.js.map +0 -1
- package/dist/nlp/command-parser.d.ts +0 -106
- package/dist/nlp/command-parser.d.ts.map +0 -1
- package/dist/nlp/command-parser.js +0 -417
- package/dist/nlp/command-parser.js.map +0 -1
- package/dist/nlp/index.d.ts +0 -5
- package/dist/nlp/index.d.ts.map +0 -1
- package/dist/nlp/index.js +0 -8
- package/dist/nlp/index.js.map +0 -1
- package/dist/nlp/intent-classifier.d.ts +0 -59
- package/dist/nlp/intent-classifier.d.ts.map +0 -1
- package/dist/nlp/intent-classifier.js +0 -384
- package/dist/nlp/intent-classifier.js.map +0 -1
- package/dist/nlp/intent-parser.d.ts +0 -152
- package/dist/nlp/intent-parser.d.ts.map +0 -1
- package/dist/nlp/intent-parser.js +0 -744
- package/dist/nlp/intent-parser.js.map +0 -1
- package/dist/plugins/plugin-manager.d.ts +0 -120
- package/dist/plugins/plugin-manager.d.ts.map +0 -1
- package/dist/plugins/plugin-manager.js +0 -595
- package/dist/plugins/plugin-manager.js.map +0 -1
- package/dist/types/index.d.ts +0 -224
- package/dist/types/index.d.ts.map +0 -1
- package/dist/types/index.js +0 -3
- package/dist/types/index.js.map +0 -1
- package/dist/utils/backup-rollback-manager.d.ts +0 -72
- package/dist/utils/backup-rollback-manager.d.ts.map +0 -1
- package/dist/utils/backup-rollback-manager.js +0 -289
- package/dist/utils/backup-rollback-manager.js.map +0 -1
- package/dist/utils/claude-config-installer.d.ts +0 -98
- package/dist/utils/claude-config-installer.d.ts.map +0 -1
- package/dist/utils/claude-config-installer.js +0 -678
- package/dist/utils/claude-config-installer.js.map +0 -1
- package/dist/utils/config-manager.d.ts +0 -73
- package/dist/utils/config-manager.d.ts.map +0 -1
- package/dist/utils/config-manager.js +0 -339
- package/dist/utils/config-manager.js.map +0 -1
- package/dist/utils/error-handler.d.ts +0 -46
- package/dist/utils/error-handler.d.ts.map +0 -1
- package/dist/utils/error-handler.js +0 -169
- package/dist/utils/error-handler.js.map +0 -1
- package/dist/utils/logger.d.ts +0 -25
- package/dist/utils/logger.d.ts.map +0 -1
- package/dist/utils/logger.js +0 -105
- package/dist/utils/logger.js.map +0 -1
- package/src/commands/computer-setup-commands.ts +0 -872
|
@@ -18,7 +18,7 @@ export class DashboardCommands {
|
|
|
18
18
|
constructor(
|
|
19
19
|
private program: Command,
|
|
20
20
|
private configManager: ConfigManager,
|
|
21
|
-
private pluginManager: PluginManager
|
|
21
|
+
private pluginManager: PluginManager
|
|
22
22
|
) {
|
|
23
23
|
this.registerCommands();
|
|
24
24
|
}
|
|
@@ -66,7 +66,7 @@ export class DashboardCommands {
|
|
|
66
66
|
.option(
|
|
67
67
|
'--period <period>',
|
|
68
68
|
'report period (daily, weekly, monthly)',
|
|
69
|
-
'weekly'
|
|
69
|
+
'weekly'
|
|
70
70
|
)
|
|
71
71
|
.action(async (type, options) => {
|
|
72
72
|
await this.generateReport(type, options);
|
|
@@ -174,7 +174,7 @@ export class DashboardCommands {
|
|
|
174
174
|
await this.saveDashboardProcess(dashboardProcess, options);
|
|
175
175
|
|
|
176
176
|
logger.success(
|
|
177
|
-
`Dashboard started at http://${options.host}:${options.port}
|
|
177
|
+
`Dashboard started at http://${options.host}:${options.port}`
|
|
178
178
|
);
|
|
179
179
|
|
|
180
180
|
if (options.open) {
|
|
@@ -184,7 +184,7 @@ export class DashboardCommands {
|
|
|
184
184
|
// Keep the process alive if not in dev mode
|
|
185
185
|
if (!options.dev) {
|
|
186
186
|
logger.info(
|
|
187
|
-
'Dashboard is running in the background. Use "wundr dashboard stop" to stop it.'
|
|
187
|
+
'Dashboard is running in the background. Use "wundr dashboard stop" to stop it.'
|
|
188
188
|
);
|
|
189
189
|
}
|
|
190
190
|
} catch (error) {
|
|
@@ -192,7 +192,7 @@ export class DashboardCommands {
|
|
|
192
192
|
'WUNDR_DASHBOARD_START_FAILED',
|
|
193
193
|
'Failed to start dashboard',
|
|
194
194
|
{ options },
|
|
195
|
-
true
|
|
195
|
+
true
|
|
196
196
|
);
|
|
197
197
|
}
|
|
198
198
|
}
|
|
@@ -222,7 +222,7 @@ export class DashboardCommands {
|
|
|
222
222
|
'WUNDR_DASHBOARD_STOP_FAILED',
|
|
223
223
|
'Failed to stop dashboard',
|
|
224
224
|
{},
|
|
225
|
-
true
|
|
225
|
+
true
|
|
226
226
|
);
|
|
227
227
|
}
|
|
228
228
|
}
|
|
@@ -237,11 +237,11 @@ export class DashboardCommands {
|
|
|
237
237
|
|
|
238
238
|
if (isRunning && processInfo) {
|
|
239
239
|
logger.success(
|
|
240
|
-
`Dashboard is running on http://${processInfo.host}:${processInfo.port}
|
|
240
|
+
`Dashboard is running on http://${processInfo.host}:${processInfo.port}`
|
|
241
241
|
);
|
|
242
242
|
logger.info(`Process ID: ${processInfo.pid}`);
|
|
243
243
|
logger.info(
|
|
244
|
-
`Started: ${new Date(processInfo.started).toLocaleString()}
|
|
244
|
+
`Started: ${new Date(processInfo.started).toLocaleString()}`
|
|
245
245
|
);
|
|
246
246
|
} else {
|
|
247
247
|
logger.info('Dashboard is not running');
|
|
@@ -251,7 +251,7 @@ export class DashboardCommands {
|
|
|
251
251
|
'WUNDR_DASHBOARD_STATUS_FAILED',
|
|
252
252
|
'Failed to check dashboard status',
|
|
253
253
|
{},
|
|
254
|
-
true
|
|
254
|
+
true
|
|
255
255
|
);
|
|
256
256
|
}
|
|
257
257
|
}
|
|
@@ -276,7 +276,7 @@ export class DashboardCommands {
|
|
|
276
276
|
'WUNDR_DASHBOARD_REPORT_FAILED',
|
|
277
277
|
'Failed to generate report',
|
|
278
278
|
{ type, options },
|
|
279
|
-
true
|
|
279
|
+
true
|
|
280
280
|
);
|
|
281
281
|
}
|
|
282
282
|
}
|
|
@@ -301,7 +301,7 @@ export class DashboardCommands {
|
|
|
301
301
|
'WUNDR_DASHBOARD_EXPORT_FAILED',
|
|
302
302
|
'Failed to export data',
|
|
303
303
|
{ type, options },
|
|
304
|
-
true
|
|
304
|
+
true
|
|
305
305
|
);
|
|
306
306
|
}
|
|
307
307
|
}
|
|
@@ -332,7 +332,7 @@ export class DashboardCommands {
|
|
|
332
332
|
'WUNDR_DASHBOARD_IMPORT_FAILED',
|
|
333
333
|
'Failed to import data',
|
|
334
334
|
{ file, options },
|
|
335
|
-
true
|
|
335
|
+
true
|
|
336
336
|
);
|
|
337
337
|
}
|
|
338
338
|
}
|
|
@@ -350,7 +350,7 @@ export class DashboardCommands {
|
|
|
350
350
|
'WUNDR_DASHBOARD_CONFIG_SET_FAILED',
|
|
351
351
|
'Failed to set dashboard configuration',
|
|
352
352
|
{ key, value },
|
|
353
|
-
true
|
|
353
|
+
true
|
|
354
354
|
);
|
|
355
355
|
}
|
|
356
356
|
}
|
|
@@ -372,7 +372,7 @@ export class DashboardCommands {
|
|
|
372
372
|
'WUNDR_DASHBOARD_CONFIG_GET_FAILED',
|
|
373
373
|
'Failed to get dashboard configuration',
|
|
374
374
|
{ key },
|
|
375
|
-
true
|
|
375
|
+
true
|
|
376
376
|
);
|
|
377
377
|
}
|
|
378
378
|
}
|
|
@@ -401,7 +401,7 @@ export class DashboardCommands {
|
|
|
401
401
|
'WUNDR_DASHBOARD_ADD_WIDGET_FAILED',
|
|
402
402
|
'Failed to add widget',
|
|
403
403
|
{ type, options },
|
|
404
|
-
true
|
|
404
|
+
true
|
|
405
405
|
);
|
|
406
406
|
}
|
|
407
407
|
}
|
|
@@ -420,7 +420,7 @@ export class DashboardCommands {
|
|
|
420
420
|
'WUNDR_DASHBOARD_REMOVE_WIDGET_FAILED',
|
|
421
421
|
'Failed to remove widget',
|
|
422
422
|
{ id },
|
|
423
|
-
true
|
|
423
|
+
true
|
|
424
424
|
);
|
|
425
425
|
}
|
|
426
426
|
}
|
|
@@ -444,14 +444,14 @@ export class DashboardCommands {
|
|
|
444
444
|
Type: widget.type,
|
|
445
445
|
Position: `(${widget.position.x}, ${widget.position.y})`,
|
|
446
446
|
Created: new Date(widget.created).toLocaleDateString(),
|
|
447
|
-
}))
|
|
447
|
+
}))
|
|
448
448
|
);
|
|
449
449
|
} catch (error) {
|
|
450
450
|
throw errorHandler.createError(
|
|
451
451
|
'WUNDR_DASHBOARD_LIST_WIDGETS_FAILED',
|
|
452
452
|
'Failed to list widgets',
|
|
453
453
|
{},
|
|
454
|
-
true
|
|
454
|
+
true
|
|
455
455
|
);
|
|
456
456
|
}
|
|
457
457
|
}
|
|
@@ -482,7 +482,7 @@ export class DashboardCommands {
|
|
|
482
482
|
'WUNDR_DASHBOARD_THEME_FAILED',
|
|
483
483
|
'Failed to manage theme',
|
|
484
484
|
{ action, options },
|
|
485
|
-
true
|
|
485
|
+
true
|
|
486
486
|
);
|
|
487
487
|
}
|
|
488
488
|
}
|
|
@@ -493,8 +493,8 @@ export class DashboardCommands {
|
|
|
493
493
|
private async isDashboardRunning(): Promise<boolean> {
|
|
494
494
|
const processInfo = await this.loadDashboardProcess();
|
|
495
495
|
if (!processInfo) {
|
|
496
|
-
return false;
|
|
497
|
-
}
|
|
496
|
+
return false;
|
|
497
|
+
}
|
|
498
498
|
|
|
499
499
|
try {
|
|
500
500
|
process.kill(processInfo.pid, 0);
|
|
@@ -542,7 +542,7 @@ return false;
|
|
|
542
542
|
|
|
543
543
|
private async saveDashboardProcess(
|
|
544
544
|
processInfo: any,
|
|
545
|
-
options: any
|
|
545
|
+
options: any
|
|
546
546
|
): Promise<void> {
|
|
547
547
|
const processFile = path.join(process.cwd(), '.wundr', 'dashboard.pid');
|
|
548
548
|
await fs.ensureDir(path.dirname(processFile));
|
|
@@ -636,7 +636,7 @@ return false;
|
|
|
636
636
|
process.cwd(),
|
|
637
637
|
'.wundr',
|
|
638
638
|
'widgets',
|
|
639
|
-
`${widget.id}.json
|
|
639
|
+
`${widget.id}.json`
|
|
640
640
|
);
|
|
641
641
|
await fs.ensureDir(path.dirname(widgetFile));
|
|
642
642
|
await fs.writeJson(widgetFile, widget, { spaces: 2 });
|
|
@@ -647,7 +647,7 @@ return false;
|
|
|
647
647
|
process.cwd(),
|
|
648
648
|
'.wundr',
|
|
649
649
|
'widgets',
|
|
650
|
-
`${id}.json
|
|
650
|
+
`${id}.json`
|
|
651
651
|
);
|
|
652
652
|
if (await fs.pathExists(widgetFile)) {
|
|
653
653
|
await fs.remove(widgetFile);
|
package/src/commands/govern.ts
CHANGED
|
@@ -17,7 +17,7 @@ export class GovernCommands {
|
|
|
17
17
|
constructor(
|
|
18
18
|
private program: Command,
|
|
19
19
|
private configManager: ConfigManager,
|
|
20
|
-
private pluginManager: PluginManager
|
|
20
|
+
private pluginManager: PluginManager
|
|
21
21
|
) {
|
|
22
22
|
this.registerCommands();
|
|
23
23
|
}
|
|
@@ -84,7 +84,7 @@ export class GovernCommands {
|
|
|
84
84
|
.option(
|
|
85
85
|
'--scope <scope>',
|
|
86
86
|
'application scope (project, workspace)',
|
|
87
|
-
'project'
|
|
87
|
+
'project'
|
|
88
88
|
)
|
|
89
89
|
.action(async (policy, options) => {
|
|
90
90
|
await this.applyPolicy(policy, options);
|
|
@@ -117,7 +117,7 @@ export class GovernCommands {
|
|
|
117
117
|
.option(
|
|
118
118
|
'--scope <scope>',
|
|
119
119
|
'audit scope (security, quality, compliance)',
|
|
120
|
-
'all'
|
|
120
|
+
'all'
|
|
121
121
|
)
|
|
122
122
|
.option('--export <path>', 'export audit results')
|
|
123
123
|
.action(async options => {
|
|
@@ -131,12 +131,12 @@ export class GovernCommands {
|
|
|
131
131
|
.option(
|
|
132
132
|
'--type <type>',
|
|
133
133
|
'report type (compliance, quality, security)',
|
|
134
|
-
'compliance'
|
|
134
|
+
'compliance'
|
|
135
135
|
)
|
|
136
136
|
.option(
|
|
137
137
|
'--period <period>',
|
|
138
138
|
'report period (daily, weekly, monthly)',
|
|
139
|
-
'weekly'
|
|
139
|
+
'weekly'
|
|
140
140
|
)
|
|
141
141
|
.option('--output <path>', 'output file path')
|
|
142
142
|
.action(async options => {
|
|
@@ -184,7 +184,7 @@ export class GovernCommands {
|
|
|
184
184
|
'WUNDR_GOVERN_CHECK_FAILED',
|
|
185
185
|
'Failed to run compliance checks',
|
|
186
186
|
{ options },
|
|
187
|
-
true
|
|
187
|
+
true
|
|
188
188
|
);
|
|
189
189
|
}
|
|
190
190
|
}
|
|
@@ -212,14 +212,14 @@ export class GovernCommands {
|
|
|
212
212
|
Severity: rule.severity,
|
|
213
213
|
Description: rule.description,
|
|
214
214
|
Fixable: rule.fixable ? '✓' : '✗',
|
|
215
|
-
}))
|
|
215
|
+
}))
|
|
216
216
|
);
|
|
217
217
|
} catch (error) {
|
|
218
218
|
throw errorHandler.createError(
|
|
219
219
|
'WUNDR_GOVERN_LIST_RULES_FAILED',
|
|
220
220
|
'Failed to list rules',
|
|
221
221
|
{ options },
|
|
222
|
-
true
|
|
222
|
+
true
|
|
223
223
|
);
|
|
224
224
|
}
|
|
225
225
|
}
|
|
@@ -244,7 +244,7 @@ export class GovernCommands {
|
|
|
244
244
|
'WUNDR_GOVERN_ADD_RULE_FAILED',
|
|
245
245
|
'Failed to add rule',
|
|
246
246
|
{ rule, options },
|
|
247
|
-
true
|
|
247
|
+
true
|
|
248
248
|
);
|
|
249
249
|
}
|
|
250
250
|
}
|
|
@@ -271,7 +271,7 @@ export class GovernCommands {
|
|
|
271
271
|
'WUNDR_GOVERN_REMOVE_RULE_FAILED',
|
|
272
272
|
'Failed to remove rule',
|
|
273
273
|
{ rule },
|
|
274
|
-
true
|
|
274
|
+
true
|
|
275
275
|
);
|
|
276
276
|
}
|
|
277
277
|
}
|
|
@@ -295,7 +295,7 @@ export class GovernCommands {
|
|
|
295
295
|
process.cwd(),
|
|
296
296
|
'.wundr',
|
|
297
297
|
'policies',
|
|
298
|
-
`${name}.json
|
|
298
|
+
`${name}.json`
|
|
299
299
|
);
|
|
300
300
|
await fs.ensureDir(path.dirname(policyPath));
|
|
301
301
|
await fs.writeJson(policyPath, policy, { spaces: 2 });
|
|
@@ -306,7 +306,7 @@ export class GovernCommands {
|
|
|
306
306
|
'WUNDR_GOVERN_CREATE_POLICY_FAILED',
|
|
307
307
|
'Failed to create policy',
|
|
308
308
|
{ name, options },
|
|
309
|
-
true
|
|
309
|
+
true
|
|
310
310
|
);
|
|
311
311
|
}
|
|
312
312
|
}
|
|
@@ -322,7 +322,7 @@ export class GovernCommands {
|
|
|
322
322
|
process.cwd(),
|
|
323
323
|
'.wundr',
|
|
324
324
|
'policies',
|
|
325
|
-
`${policy}.json
|
|
325
|
+
`${policy}.json`
|
|
326
326
|
);
|
|
327
327
|
|
|
328
328
|
if (await fs.pathExists(policyPath)) {
|
|
@@ -345,7 +345,7 @@ export class GovernCommands {
|
|
|
345
345
|
'WUNDR_GOVERN_APPLY_POLICY_FAILED',
|
|
346
346
|
'Failed to apply policy',
|
|
347
347
|
{ policy, options },
|
|
348
|
-
true
|
|
348
|
+
true
|
|
349
349
|
);
|
|
350
350
|
}
|
|
351
351
|
}
|
|
@@ -392,7 +392,7 @@ export class GovernCommands {
|
|
|
392
392
|
'WUNDR_GOVERN_GATE_CHECK_FAILED',
|
|
393
393
|
'Failed to check quality gate',
|
|
394
394
|
{ options },
|
|
395
|
-
true
|
|
395
|
+
true
|
|
396
396
|
);
|
|
397
397
|
}
|
|
398
398
|
}
|
|
@@ -415,7 +415,7 @@ export class GovernCommands {
|
|
|
415
415
|
process.cwd(),
|
|
416
416
|
'.wundr',
|
|
417
417
|
'gates',
|
|
418
|
-
`${name}.json
|
|
418
|
+
`${name}.json`
|
|
419
419
|
);
|
|
420
420
|
await fs.ensureDir(path.dirname(gatePath));
|
|
421
421
|
await fs.writeJson(gatePath, gate, { spaces: 2 });
|
|
@@ -426,7 +426,7 @@ export class GovernCommands {
|
|
|
426
426
|
'WUNDR_GOVERN_CREATE_GATE_FAILED',
|
|
427
427
|
'Failed to create quality gate',
|
|
428
428
|
{ name, options },
|
|
429
|
-
true
|
|
429
|
+
true
|
|
430
430
|
);
|
|
431
431
|
}
|
|
432
432
|
}
|
|
@@ -469,7 +469,7 @@ export class GovernCommands {
|
|
|
469
469
|
'WUNDR_GOVERN_AUDIT_FAILED',
|
|
470
470
|
'Failed to run audit',
|
|
471
471
|
{ options },
|
|
472
|
-
true
|
|
472
|
+
true
|
|
473
473
|
);
|
|
474
474
|
}
|
|
475
475
|
}
|
|
@@ -483,7 +483,7 @@ export class GovernCommands {
|
|
|
483
483
|
|
|
484
484
|
const report = await this.createGovernanceReport(
|
|
485
485
|
options.type,
|
|
486
|
-
options.period
|
|
486
|
+
options.period
|
|
487
487
|
);
|
|
488
488
|
|
|
489
489
|
const outputPath =
|
|
@@ -496,7 +496,7 @@ export class GovernCommands {
|
|
|
496
496
|
'WUNDR_GOVERN_REPORT_FAILED',
|
|
497
497
|
'Failed to generate report',
|
|
498
498
|
{ options },
|
|
499
|
-
true
|
|
499
|
+
true
|
|
500
500
|
);
|
|
501
501
|
}
|
|
502
502
|
}
|
|
@@ -540,7 +540,7 @@ export class GovernCommands {
|
|
|
540
540
|
}
|
|
541
541
|
|
|
542
542
|
private async evaluateQualityGate(
|
|
543
|
-
gate: any
|
|
543
|
+
gate: any
|
|
544
544
|
): Promise<{ passed: boolean; failures: string[] }> {
|
|
545
545
|
// Implementation for evaluating quality gates
|
|
546
546
|
return { passed: true, failures: [] };
|
|
@@ -563,7 +563,7 @@ export class GovernCommands {
|
|
|
563
563
|
|
|
564
564
|
private async createGovernanceReport(
|
|
565
565
|
type: string,
|
|
566
|
-
period: string
|
|
566
|
+
period: string
|
|
567
567
|
): Promise<any> {
|
|
568
568
|
// Implementation for creating governance reports
|
|
569
569
|
return {
|
|
@@ -577,8 +577,8 @@ export class GovernCommands {
|
|
|
577
577
|
|
|
578
578
|
private displayViolations(violations: any[]): void {
|
|
579
579
|
if (violations.length === 0) {
|
|
580
|
-
return;
|
|
581
|
-
}
|
|
580
|
+
return;
|
|
581
|
+
}
|
|
582
582
|
|
|
583
583
|
console.log(chalk.yellow('\nCompliance Violations:'));
|
|
584
584
|
console.table(
|
|
@@ -588,7 +588,7 @@ return;
|
|
|
588
588
|
File: v.file,
|
|
589
589
|
Line: v.line || 'N/A',
|
|
590
590
|
Description: v.description,
|
|
591
|
-
}))
|
|
591
|
+
}))
|
|
592
592
|
);
|
|
593
593
|
}
|
|
594
594
|
|
|
@@ -243,7 +243,7 @@ async function runComplianceCheck(options: CheckOptions): Promise<void> {
|
|
|
243
243
|
'WUNDR_GOV_CHECK_FAILED',
|
|
244
244
|
'Failed to run IPRE compliance check',
|
|
245
245
|
{ options },
|
|
246
|
-
true
|
|
246
|
+
true
|
|
247
247
|
);
|
|
248
248
|
}
|
|
249
249
|
}
|
|
@@ -289,7 +289,7 @@ async function generateAlignmentReport(options: ReportOptions): Promise<void> {
|
|
|
289
289
|
totalDebt: calculateAlignmentDebt(
|
|
290
290
|
complianceResult,
|
|
291
291
|
alignmentEvalResult,
|
|
292
|
-
driftEvalResult
|
|
292
|
+
driftEvalResult
|
|
293
293
|
),
|
|
294
294
|
criticalIssues: countCriticalIssues(complianceResult),
|
|
295
295
|
highPriorityItems: countHighPriorityItems(alignmentEvalResult),
|
|
@@ -310,7 +310,7 @@ async function generateAlignmentReport(options: ReportOptions): Promise<void> {
|
|
|
310
310
|
recommendations: generateRecommendations(
|
|
311
311
|
complianceResult,
|
|
312
312
|
alignmentEvalResult,
|
|
313
|
-
driftEvalResult
|
|
313
|
+
driftEvalResult
|
|
314
314
|
),
|
|
315
315
|
};
|
|
316
316
|
|
|
@@ -327,17 +327,17 @@ async function generateAlignmentReport(options: ReportOptions): Promise<void> {
|
|
|
327
327
|
// Display summary
|
|
328
328
|
console.log(chalk.blue('\n--- Report Summary ---'));
|
|
329
329
|
console.log(
|
|
330
|
-
`Total Alignment Debt: ${chalk.yellow(report.summary.totalDebt.toFixed(2))}
|
|
330
|
+
`Total Alignment Debt: ${chalk.yellow(report.summary.totalDebt.toFixed(2))}`
|
|
331
331
|
);
|
|
332
332
|
console.log(`Critical Issues: ${chalk.red(report.summary.criticalIssues)}`);
|
|
333
333
|
console.log(
|
|
334
|
-
`High Priority Items: ${chalk.yellow(report.summary.highPriorityItems)}
|
|
334
|
+
`High Priority Items: ${chalk.yellow(report.summary.highPriorityItems)}`
|
|
335
335
|
);
|
|
336
336
|
console.log(
|
|
337
|
-
`Alignment Score: ${colorScore(report.summary.alignmentScore)}
|
|
337
|
+
`Alignment Score: ${colorScore(report.summary.alignmentScore)}`
|
|
338
338
|
);
|
|
339
339
|
console.log(
|
|
340
|
-
`Compliance Score: ${colorScore(report.summary.complianceScore)}
|
|
340
|
+
`Compliance Score: ${colorScore(report.summary.complianceScore)}`
|
|
341
341
|
);
|
|
342
342
|
console.log(`Drift Score: ${colorScore(1 - report.summary.driftScore)}`);
|
|
343
343
|
} catch (error) {
|
|
@@ -345,7 +345,7 @@ async function generateAlignmentReport(options: ReportOptions): Promise<void> {
|
|
|
345
345
|
'WUNDR_GOV_REPORT_FAILED',
|
|
346
346
|
'Failed to generate alignment debt report',
|
|
347
347
|
{ options },
|
|
348
|
-
true
|
|
348
|
+
true
|
|
349
349
|
);
|
|
350
350
|
}
|
|
351
351
|
}
|
|
@@ -381,7 +381,7 @@ async function showGovernanceStatus(): Promise<void> {
|
|
|
381
381
|
console.log(chalk.bold('Alignment Score:'));
|
|
382
382
|
displayProgressBar(status.alignmentScore);
|
|
383
383
|
console.log(
|
|
384
|
-
` ${colorScore(status.alignmentScore)} (${(status.alignmentScore * 100).toFixed(1)}%)\n
|
|
384
|
+
` ${colorScore(status.alignmentScore)} (${(status.alignmentScore * 100).toFixed(1)}%)\n`
|
|
385
385
|
);
|
|
386
386
|
|
|
387
387
|
// Policy Violations
|
|
@@ -393,7 +393,7 @@ async function showGovernanceStatus(): Promise<void> {
|
|
|
393
393
|
console.log(` - Security: ${violationStats.byCategory.security}`);
|
|
394
394
|
console.log(` - Compliance: ${violationStats.byCategory.compliance}`);
|
|
395
395
|
console.log(
|
|
396
|
-
` - Operational: ${violationStats.byCategory.operational}
|
|
396
|
+
` - Operational: ${violationStats.byCategory.operational}`
|
|
397
397
|
);
|
|
398
398
|
}
|
|
399
399
|
console.log();
|
|
@@ -408,7 +408,7 @@ async function showGovernanceStatus(): Promise<void> {
|
|
|
408
408
|
? chalk.green('[RESOLVED]')
|
|
409
409
|
: chalk.yellow('[OPEN]');
|
|
410
410
|
console.log(
|
|
411
|
-
` ${statusIcon} ${intervention.type}: ${intervention.description}
|
|
411
|
+
` ${statusIcon} ${intervention.type}: ${intervention.description}`
|
|
412
412
|
);
|
|
413
413
|
}
|
|
414
414
|
}
|
|
@@ -424,7 +424,7 @@ async function showGovernanceStatus(): Promise<void> {
|
|
|
424
424
|
const direction = indicator.change > 0 ? '+' : '';
|
|
425
425
|
console.log(
|
|
426
426
|
` ${severityColor(`[${indicator.severity.toUpperCase()}]`)} ` +
|
|
427
|
-
`${indicator.pattern}: ${direction}${(indicator.change * 100).toFixed(1)}
|
|
427
|
+
`${indicator.pattern}: ${direction}${(indicator.change * 100).toFixed(1)}%`
|
|
428
428
|
);
|
|
429
429
|
}
|
|
430
430
|
}
|
|
@@ -433,13 +433,13 @@ async function showGovernanceStatus(): Promise<void> {
|
|
|
433
433
|
// Last Check
|
|
434
434
|
if (status.lastCheck) {
|
|
435
435
|
console.log(
|
|
436
|
-
chalk.gray(`Last check: ${status.lastCheck.toLocaleString()}`)
|
|
436
|
+
chalk.gray(`Last check: ${status.lastCheck.toLocaleString()}`)
|
|
437
437
|
);
|
|
438
438
|
} else {
|
|
439
439
|
console.log(
|
|
440
440
|
chalk.gray(
|
|
441
|
-
'No previous checks found. Run "wundr governance check" to start.'
|
|
442
|
-
)
|
|
441
|
+
'No previous checks found. Run "wundr governance check" to start.'
|
|
442
|
+
)
|
|
443
443
|
);
|
|
444
444
|
}
|
|
445
445
|
} catch (error) {
|
|
@@ -447,7 +447,7 @@ async function showGovernanceStatus(): Promise<void> {
|
|
|
447
447
|
'WUNDR_GOV_STATUS_FAILED',
|
|
448
448
|
'Failed to fetch governance status',
|
|
449
449
|
{},
|
|
450
|
-
true
|
|
450
|
+
true
|
|
451
451
|
);
|
|
452
452
|
}
|
|
453
453
|
}
|
|
@@ -504,7 +504,7 @@ async function validateIPREConfig(file: string): Promise<void> {
|
|
|
504
504
|
'WUNDR_GOV_VALIDATE_FAILED',
|
|
505
505
|
`Failed to validate IPRE config: ${message}`,
|
|
506
506
|
{ file },
|
|
507
|
-
true
|
|
507
|
+
true
|
|
508
508
|
);
|
|
509
509
|
}
|
|
510
510
|
}
|
|
@@ -515,7 +515,7 @@ async function validateIPREConfig(file: string): Promise<void> {
|
|
|
515
515
|
|
|
516
516
|
function displayComplianceResult(
|
|
517
517
|
result: ComplianceResult,
|
|
518
|
-
verbose: boolean
|
|
518
|
+
verbose: boolean
|
|
519
519
|
): void {
|
|
520
520
|
const statusIcon = result.compliant
|
|
521
521
|
? chalk.green('[PASS]')
|
|
@@ -529,7 +529,7 @@ function displayComplianceResult(
|
|
|
529
529
|
console.log(chalk.yellow('\n Violations:'));
|
|
530
530
|
for (const violation of result.violations) {
|
|
531
531
|
console.log(
|
|
532
|
-
` - [${violation.severity.toUpperCase()}] ${violation.policyName}
|
|
532
|
+
` - [${violation.severity.toUpperCase()}] ${violation.policyName}`
|
|
533
533
|
);
|
|
534
534
|
console.log(` ${violation.description}`);
|
|
535
535
|
if (violation.suggestedFix) {
|
|
@@ -541,7 +541,7 @@ function displayComplianceResult(
|
|
|
541
541
|
|
|
542
542
|
function displayAlignmentResult(
|
|
543
543
|
result: EvaluationResult,
|
|
544
|
-
verbose: boolean
|
|
544
|
+
verbose: boolean
|
|
545
545
|
): void {
|
|
546
546
|
const statusIcon = result.passed
|
|
547
547
|
? chalk.green('[PASS]')
|
|
@@ -572,7 +572,7 @@ function displayDriftResult(result: EvaluationResult, verbose: boolean): void {
|
|
|
572
572
|
? chalk.green('[PASS]')
|
|
573
573
|
: chalk.red('[FAIL]');
|
|
574
574
|
console.log(
|
|
575
|
-
`${statusIcon} Drift Score: ${colorScore(result.score)} (${(driftScore * 100).toFixed(1)}% drift)
|
|
575
|
+
`${statusIcon} Drift Score: ${colorScore(result.score)} (${(driftScore * 100).toFixed(1)}% drift)`
|
|
576
576
|
);
|
|
577
577
|
console.log(` Drift Alerts: ${result.issues.length}`);
|
|
578
578
|
|
|
@@ -594,19 +594,19 @@ function displaySummary(result: {
|
|
|
594
594
|
? chalk.green('[PASSED]')
|
|
595
595
|
: chalk.red('[FAILED]');
|
|
596
596
|
console.log(
|
|
597
|
-
`\n${statusIcon} Overall Score: ${colorScore(result.overallScore)}
|
|
597
|
+
`\n${statusIcon} Overall Score: ${colorScore(result.overallScore)}`
|
|
598
598
|
);
|
|
599
599
|
|
|
600
600
|
if (result.criticalIssues.length > 0) {
|
|
601
601
|
console.log(
|
|
602
|
-
chalk.red(`\nCritical Issues (${result.criticalIssues.length}):`)
|
|
602
|
+
chalk.red(`\nCritical Issues (${result.criticalIssues.length}):`)
|
|
603
603
|
);
|
|
604
604
|
for (const issue of result.criticalIssues.slice(0, 5)) {
|
|
605
605
|
console.log(chalk.red(` - ${issue}`));
|
|
606
606
|
}
|
|
607
607
|
if (result.criticalIssues.length > 5) {
|
|
608
608
|
console.log(
|
|
609
|
-
chalk.gray(` ... and ${result.criticalIssues.length - 5} more`)
|
|
609
|
+
chalk.gray(` ... and ${result.criticalIssues.length - 5} more`)
|
|
610
610
|
);
|
|
611
611
|
}
|
|
612
612
|
}
|
|
@@ -648,7 +648,7 @@ function displayProgressBar(score: number): void {
|
|
|
648
648
|
function calculateAlignmentDebt(
|
|
649
649
|
compliance: ComplianceResult,
|
|
650
650
|
alignment: EvaluationResult,
|
|
651
|
-
drift: EvaluationResult
|
|
651
|
+
drift: EvaluationResult
|
|
652
652
|
): number {
|
|
653
653
|
// Calculate debt as weighted sum of issues
|
|
654
654
|
const complianceDebt = (1 - compliance.score) * 0.4;
|
|
@@ -666,7 +666,7 @@ function countHighPriorityItems(alignment: EvaluationResult): number {
|
|
|
666
666
|
return alignment.issues.filter(
|
|
667
667
|
issue =>
|
|
668
668
|
issue.toLowerCase().includes('critical') ||
|
|
669
|
-
issue.toLowerCase().includes('high')
|
|
669
|
+
issue.toLowerCase().includes('high')
|
|
670
670
|
).length;
|
|
671
671
|
}
|
|
672
672
|
|
|
@@ -723,21 +723,21 @@ function extractDriftAlerts(result: EvaluationResult): DriftAlertDetail[] {
|
|
|
723
723
|
function generateRecommendations(
|
|
724
724
|
compliance: ComplianceResult,
|
|
725
725
|
alignment: EvaluationResult,
|
|
726
|
-
drift: EvaluationResult
|
|
726
|
+
drift: EvaluationResult
|
|
727
727
|
): string[] {
|
|
728
728
|
const recommendations: string[] = [];
|
|
729
729
|
|
|
730
730
|
// Add compliance recommendations
|
|
731
731
|
if (compliance.violations.length > 0) {
|
|
732
732
|
recommendations.push(
|
|
733
|
-
'Address policy violations immediately, especially critical ones'
|
|
733
|
+
'Address policy violations immediately, especially critical ones'
|
|
734
734
|
);
|
|
735
735
|
const criticalCount = compliance.violations.filter(
|
|
736
|
-
v => v.severity === 'critical'
|
|
736
|
+
v => v.severity === 'critical'
|
|
737
737
|
).length;
|
|
738
738
|
if (criticalCount > 0) {
|
|
739
739
|
recommendations.push(
|
|
740
|
-
`Fix ${criticalCount} critical policy violation(s) before deployment
|
|
740
|
+
`Fix ${criticalCount} critical policy violation(s) before deployment`
|
|
741
741
|
);
|
|
742
742
|
}
|
|
743
743
|
}
|
|
@@ -893,10 +893,10 @@ function displayConfigSummary(config: IPREConfig): void {
|
|
|
893
893
|
console.log(`Values: ${config.intent?.values?.length || 0} defined`);
|
|
894
894
|
console.log(`Security Policies: ${config.policies?.security?.length || 0}`);
|
|
895
895
|
console.log(
|
|
896
|
-
`Compliance Policies: ${config.policies?.compliance?.length || 0}
|
|
896
|
+
`Compliance Policies: ${config.policies?.compliance?.length || 0}`
|
|
897
897
|
);
|
|
898
898
|
console.log(
|
|
899
|
-
`Operational Policies: ${config.policies?.operational?.length || 0}
|
|
899
|
+
`Operational Policies: ${config.policies?.operational?.length || 0}`
|
|
900
900
|
);
|
|
901
901
|
console.log(`Evaluators: ${config.evaluators?.length || 0}`);
|
|
902
902
|
if (config.rewards?.threshold) {
|
|
@@ -935,7 +935,7 @@ async function saveGovernanceState(
|
|
|
935
935
|
results: readonly EvaluationResult[];
|
|
936
936
|
criticalIssues: readonly string[];
|
|
937
937
|
};
|
|
938
|
-
}
|
|
938
|
+
}
|
|
939
939
|
): Promise<void> {
|
|
940
940
|
const statePath = path.join(process.cwd(), GOVERNANCE_STATE_PATH);
|
|
941
941
|
await fs.ensureDir(path.dirname(statePath));
|
|
@@ -973,7 +973,7 @@ async function loadRecentInterventions(): Promise<Intervention[]> {
|
|
|
973
973
|
}
|
|
974
974
|
|
|
975
975
|
function extractDriftIndicatorsFromState(
|
|
976
|
-
state: GovernanceState | null
|
|
976
|
+
state: GovernanceState | null
|
|
977
977
|
): DriftIndicator[] {
|
|
978
978
|
if (!state?.driftResult) {
|
|
979
979
|
return [];
|