@wundr.io/cli 1.0.0 → 1.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +696 -280
- package/dist/ai/ai-service.d.ts +2 -2
- package/dist/ai/ai-service.d.ts.map +1 -1
- package/dist/ai/ai-service.js +1 -1
- package/dist/ai/ai-service.js.map +1 -1
- package/dist/ai/claude-client.d.ts.map +1 -1
- package/dist/ai/claude-client.js +2 -1
- package/dist/ai/claude-client.js.map +1 -1
- package/dist/ai/conversation-manager.d.ts +2 -2
- package/dist/ai/conversation-manager.d.ts.map +1 -1
- package/dist/ai/conversation-manager.js +5 -3
- package/dist/ai/conversation-manager.js.map +1 -1
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +32 -13
- package/dist/cli.js.map +1 -1
- package/dist/commands/ai.d.ts +3 -3
- package/dist/commands/ai.d.ts.map +1 -1
- package/dist/commands/ai.js +2 -2
- package/dist/commands/ai.js.map +1 -1
- package/dist/commands/alignment.d.ts +78 -0
- package/dist/commands/alignment.d.ts.map +1 -0
- package/dist/commands/alignment.js +817 -0
- package/dist/commands/alignment.js.map +1 -0
- package/dist/commands/analyze-optimized.d.ts.map +1 -1
- package/dist/commands/analyze-optimized.js +9 -6
- package/dist/commands/analyze-optimized.js.map +1 -1
- package/dist/commands/analyze.d.ts +3 -3
- package/dist/commands/analyze.d.ts.map +1 -1
- package/dist/commands/analyze.js +2 -2
- package/dist/commands/analyze.js.map +1 -1
- package/dist/commands/batch.d.ts +3 -3
- package/dist/commands/batch.d.ts.map +1 -1
- package/dist/commands/batch.js +7 -7
- package/dist/commands/batch.js.map +1 -1
- package/dist/commands/chat.d.ts +3 -3
- package/dist/commands/chat.d.ts.map +1 -1
- package/dist/commands/chat.js +3 -3
- package/dist/commands/chat.js.map +1 -1
- package/dist/commands/claude-init.d.ts +1 -1
- package/dist/commands/claude-init.d.ts.map +1 -1
- package/dist/commands/claude-init.js +11 -7
- package/dist/commands/claude-init.js.map +1 -1
- package/dist/commands/claude-setup.d.ts +88 -1
- package/dist/commands/claude-setup.d.ts.map +1 -1
- package/dist/commands/claude-setup.js +549 -46
- package/dist/commands/claude-setup.js.map +1 -1
- package/dist/commands/computer-setup-commands.d.ts +17 -3
- package/dist/commands/computer-setup-commands.d.ts.map +1 -1
- package/dist/commands/computer-setup-commands.js +145 -3
- package/dist/commands/computer-setup-commands.js.map +1 -1
- package/dist/commands/computer-setup.d.ts.map +1 -1
- package/dist/commands/computer-setup.js +372 -4
- package/dist/commands/computer-setup.js.map +1 -1
- package/dist/commands/create-command.d.ts.map +1 -1
- package/dist/commands/create-command.js +3 -3
- package/dist/commands/create-command.js.map +1 -1
- package/dist/commands/create.d.ts +3 -3
- package/dist/commands/create.d.ts.map +1 -1
- package/dist/commands/create.js +3 -3
- package/dist/commands/create.js.map +1 -1
- package/dist/commands/dashboard.d.ts +3 -3
- package/dist/commands/dashboard.d.ts.map +1 -1
- package/dist/commands/dashboard.js +4 -3
- package/dist/commands/dashboard.js.map +1 -1
- package/dist/commands/govern.d.ts +3 -3
- package/dist/commands/govern.d.ts.map +1 -1
- package/dist/commands/govern.js +4 -3
- package/dist/commands/govern.js.map +1 -1
- package/dist/commands/governance.d.ts +17 -0
- package/dist/commands/governance.d.ts.map +1 -0
- package/dist/commands/governance.js +703 -0
- package/dist/commands/governance.js.map +1 -0
- package/dist/commands/guardian.d.ts +20 -0
- package/dist/commands/guardian.d.ts.map +1 -0
- package/dist/commands/guardian.js +597 -0
- package/dist/commands/guardian.js.map +1 -0
- package/dist/commands/init.d.ts +7 -3
- package/dist/commands/init.d.ts.map +1 -1
- package/dist/commands/init.js +71 -5
- package/dist/commands/init.js.map +1 -1
- package/dist/commands/performance-optimizer.d.ts +2 -2
- package/dist/commands/performance-optimizer.d.ts.map +1 -1
- package/dist/commands/performance-optimizer.js +8 -7
- package/dist/commands/performance-optimizer.js.map +1 -1
- package/dist/commands/plugins.d.ts +3 -3
- package/dist/commands/plugins.d.ts.map +1 -1
- package/dist/commands/plugins.js +2 -2
- package/dist/commands/plugins.js.map +1 -1
- package/dist/commands/rag.d.ts +7 -0
- package/dist/commands/rag.d.ts.map +1 -0
- package/dist/commands/rag.js +748 -0
- package/dist/commands/rag.js.map +1 -0
- package/dist/commands/session.d.ts +41 -0
- package/dist/commands/session.d.ts.map +1 -0
- package/dist/commands/session.js +441 -0
- package/dist/commands/session.js.map +1 -0
- package/dist/commands/setup.d.ts +3 -3
- package/dist/commands/setup.d.ts.map +1 -1
- package/dist/commands/setup.js +1 -3
- package/dist/commands/setup.js.map +1 -1
- package/dist/commands/test-init.d.ts.map +1 -1
- package/dist/commands/test-init.js +2 -2
- package/dist/commands/test-init.js.map +1 -1
- package/dist/commands/test.d.ts.map +1 -1
- package/dist/commands/test.js +2 -2
- package/dist/commands/test.js.map +1 -1
- package/dist/commands/vp.d.ts +7 -0
- package/dist/commands/vp.d.ts.map +1 -0
- package/dist/commands/vp.js +571 -0
- package/dist/commands/vp.js.map +1 -0
- package/dist/commands/watch.d.ts +3 -3
- package/dist/commands/watch.d.ts.map +1 -1
- package/dist/commands/watch.js +10 -7
- package/dist/commands/watch.js.map +1 -1
- package/dist/commands/worktree.d.ts +63 -0
- package/dist/commands/worktree.d.ts.map +1 -0
- package/dist/commands/worktree.js +774 -0
- package/dist/commands/worktree.js.map +1 -0
- package/dist/context/context-manager.d.ts +1 -1
- package/dist/context/context-manager.d.ts.map +1 -1
- package/dist/context/context-manager.js +1 -1
- package/dist/context/context-manager.js.map +1 -1
- package/dist/context/session-manager.d.ts +2 -2
- package/dist/context/session-manager.d.ts.map +1 -1
- package/dist/context/session-manager.js +9 -5
- package/dist/context/session-manager.js.map +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/interactive/interactive-mode.d.ts +2 -2
- package/dist/interactive/interactive-mode.d.ts.map +1 -1
- package/dist/interactive/interactive-mode.js +6 -4
- package/dist/interactive/interactive-mode.js.map +1 -1
- package/dist/nlp/command-mapper.d.ts +1 -1
- package/dist/nlp/command-mapper.d.ts.map +1 -1
- package/dist/nlp/command-mapper.js +3 -2
- package/dist/nlp/command-mapper.js.map +1 -1
- package/dist/nlp/command-parser.d.ts +1 -1
- package/dist/nlp/command-parser.d.ts.map +1 -1
- package/dist/nlp/command-parser.js +2 -1
- package/dist/nlp/command-parser.js.map +1 -1
- package/dist/nlp/intent-parser.d.ts +1 -1
- package/dist/nlp/intent-parser.d.ts.map +1 -1
- package/dist/nlp/intent-parser.js +14 -9
- package/dist/nlp/intent-parser.js.map +1 -1
- package/dist/plugins/plugin-manager.d.ts +2 -2
- package/dist/plugins/plugin-manager.d.ts.map +1 -1
- package/dist/plugins/plugin-manager.js +3 -3
- package/dist/plugins/plugin-manager.js.map +1 -1
- package/dist/types/index.d.ts +1 -1
- package/dist/types/index.d.ts.map +1 -1
- package/dist/utils/backup-rollback-manager.d.ts +72 -0
- package/dist/utils/backup-rollback-manager.d.ts.map +1 -0
- package/dist/utils/backup-rollback-manager.js +289 -0
- package/dist/utils/backup-rollback-manager.js.map +1 -0
- package/dist/utils/claude-config-installer.d.ts +94 -0
- package/dist/utils/claude-config-installer.d.ts.map +1 -0
- package/dist/utils/claude-config-installer.js +628 -0
- package/dist/utils/claude-config-installer.js.map +1 -0
- package/dist/utils/config-manager.d.ts +1 -1
- package/dist/utils/config-manager.d.ts.map +1 -1
- package/dist/utils/config-manager.js +5 -5
- package/dist/utils/config-manager.js.map +1 -1
- package/dist/utils/error-handler.d.ts +1 -1
- package/dist/utils/error-handler.d.ts.map +1 -1
- package/dist/utils/error-handler.js.map +1 -1
- package/dist/utils/logger.d.ts +1 -1
- package/dist/utils/logger.d.ts.map +1 -1
- package/dist/utils/logger.js +22 -11
- package/dist/utils/logger.js.map +1 -1
- package/package.json +26 -7
- package/src/ai/ai-service.ts +22 -19
- package/src/ai/claude-client.ts +20 -16
- package/src/ai/conversation-manager.ts +37 -30
- package/src/cli.ts +42 -13
- package/src/commands/ai.ts +59 -57
- package/src/commands/alignment.ts +1212 -0
- package/src/commands/analyze-optimized.ts +70 -62
- package/src/commands/analyze.ts +22 -20
- package/src/commands/batch.ts +41 -38
- package/src/commands/chat.ts +37 -34
- package/src/commands/claude-init.ts +38 -30
- package/src/commands/claude-setup.ts +692 -97
- package/src/commands/computer-setup-commands.ts +203 -37
- package/src/commands/computer-setup.ts +474 -4
- package/src/commands/create-command.ts +7 -7
- package/src/commands/create.ts +36 -33
- package/src/commands/dashboard.ts +33 -28
- package/src/commands/govern.ts +34 -29
- package/src/commands/governance.ts +1005 -0
- package/src/commands/guardian.ts +887 -0
- package/src/commands/init.ts +112 -22
- package/src/commands/performance-optimizer.ts +48 -42
- package/src/commands/plugins.ts +35 -32
- package/src/commands/project-update.ts +1053 -0
- package/src/commands/rag.ts +904 -0
- package/src/commands/session.ts +631 -0
- package/src/commands/setup.ts +35 -31
- package/src/commands/test-init.ts +6 -5
- package/src/commands/test.ts +7 -6
- package/src/commands/vp.ts +762 -0
- package/src/commands/watch.ts +44 -33
- package/src/commands/worktree.ts +1057 -0
- package/src/context/context-manager.ts +15 -12
- package/src/context/session-manager.ts +51 -40
- package/src/index.ts +7 -6
- package/src/interactive/interactive-mode.ts +25 -18
- package/src/lib/conflict-resolution.ts +28 -0
- package/src/lib/merge-strategy.ts +28 -0
- package/src/lib/safety-mechanisms.ts +47 -0
- package/src/lib/state-detection.ts +28 -0
- package/src/nlp/command-mapper.ts +35 -30
- package/src/nlp/command-parser.ts +20 -17
- package/src/nlp/intent-classifier.ts +7 -7
- package/src/nlp/intent-parser.ts +61 -49
- package/src/plugins/plugin-manager.ts +27 -23
- package/src/tests/computer-setup-integration.test.ts +439 -0
- package/src/types/index.ts +1 -1
- package/src/types/modules.d.ts +1 -0
- package/src/utils/backup-rollback-manager.ts +363 -0
- package/src/utils/claude-config-installer.ts +734 -0
- package/src/utils/config-manager.ts +12 -9
- package/src/utils/error-handler.ts +5 -3
- package/src/utils/logger.ts +35 -12
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
import { EventEmitter } from 'events';
|
|
2
|
-
import fs from 'fs-extra';
|
|
3
2
|
import path from 'path';
|
|
4
|
-
|
|
5
|
-
import
|
|
3
|
+
|
|
4
|
+
import fs from 'fs-extra';
|
|
5
|
+
|
|
6
6
|
import { logger } from '../utils/logger';
|
|
7
7
|
|
|
8
|
+
import type { ClaudeClient, ClaudeMessage } from './claude-client';
|
|
9
|
+
import type { ChatSession, ChatMessage } from '../types';
|
|
10
|
+
|
|
8
11
|
/**
|
|
9
12
|
* Configuration for conversation management
|
|
10
13
|
*/
|
|
@@ -60,7 +63,7 @@ export class ConversationManager extends EventEmitter {
|
|
|
60
63
|
|
|
61
64
|
constructor(
|
|
62
65
|
claudeClient: ClaudeClient,
|
|
63
|
-
config: Partial<ConversationConfig> = {}
|
|
66
|
+
config: Partial<ConversationConfig> = {},
|
|
64
67
|
) {
|
|
65
68
|
super();
|
|
66
69
|
|
|
@@ -90,7 +93,7 @@ export class ConversationManager extends EventEmitter {
|
|
|
90
93
|
context?: string;
|
|
91
94
|
tags?: string[];
|
|
92
95
|
metadata?: Partial<SessionMetadata>;
|
|
93
|
-
} = {}
|
|
96
|
+
} = {},
|
|
94
97
|
): Promise<EnhancedChatSession> {
|
|
95
98
|
const sessionId =
|
|
96
99
|
options.id ||
|
|
@@ -176,7 +179,7 @@ export class ConversationManager extends EventEmitter {
|
|
|
176
179
|
systemPrompt?: string;
|
|
177
180
|
streaming?: boolean;
|
|
178
181
|
metadata?: Record<string, any>;
|
|
179
|
-
} = {}
|
|
182
|
+
} = {},
|
|
180
183
|
): Promise<string | AsyncGenerator<string, void, unknown>> {
|
|
181
184
|
const session = await this.loadSession(sessionId);
|
|
182
185
|
if (!session) {
|
|
@@ -211,12 +214,12 @@ export class ConversationManager extends EventEmitter {
|
|
|
211
214
|
if (options.streaming) {
|
|
212
215
|
response = this.claudeClient.streamConversation(
|
|
213
216
|
claudeMessages,
|
|
214
|
-
options.systemPrompt
|
|
217
|
+
options.systemPrompt,
|
|
215
218
|
);
|
|
216
219
|
} else {
|
|
217
220
|
response = await this.claudeClient.sendConversation(
|
|
218
221
|
claudeMessages,
|
|
219
|
-
options.systemPrompt
|
|
222
|
+
options.systemPrompt,
|
|
220
223
|
);
|
|
221
224
|
}
|
|
222
225
|
|
|
@@ -225,13 +228,13 @@ export class ConversationManager extends EventEmitter {
|
|
|
225
228
|
return this.handleStreamingResponse(
|
|
226
229
|
session,
|
|
227
230
|
response as AsyncGenerator<string, void, unknown>,
|
|
228
|
-
startTime
|
|
231
|
+
startTime,
|
|
229
232
|
);
|
|
230
233
|
} else {
|
|
231
234
|
return await this.handleSyncResponse(
|
|
232
235
|
session,
|
|
233
236
|
response as string,
|
|
234
|
-
startTime
|
|
237
|
+
startTime,
|
|
235
238
|
);
|
|
236
239
|
}
|
|
237
240
|
} catch (error) {
|
|
@@ -251,7 +254,7 @@ export class ConversationManager extends EventEmitter {
|
|
|
251
254
|
from?: Date;
|
|
252
255
|
to?: Date;
|
|
253
256
|
roles?: ('user' | 'assistant' | 'system')[];
|
|
254
|
-
} = {}
|
|
257
|
+
} = {},
|
|
255
258
|
): ChatMessage[] {
|
|
256
259
|
const session = this.activeSessions.get(sessionId);
|
|
257
260
|
if (!session) {
|
|
@@ -286,7 +289,7 @@ export class ConversationManager extends EventEmitter {
|
|
|
286
289
|
async addContext(
|
|
287
290
|
sessionId: string,
|
|
288
291
|
contextType: 'project' | 'command' | 'preference' | 'workflow',
|
|
289
|
-
contextData: any
|
|
292
|
+
contextData: any,
|
|
290
293
|
): Promise<void> {
|
|
291
294
|
const session = await this.loadSession(sessionId);
|
|
292
295
|
if (!session) {
|
|
@@ -328,7 +331,7 @@ export class ConversationManager extends EventEmitter {
|
|
|
328
331
|
olderThan?: number; // days
|
|
329
332
|
inactiveFor?: number; // days
|
|
330
333
|
maxSessions?: number;
|
|
331
|
-
} = {}
|
|
334
|
+
} = {},
|
|
332
335
|
): Promise<string[]> {
|
|
333
336
|
const archivedSessions: string[] = [];
|
|
334
337
|
const now = new Date();
|
|
@@ -367,7 +370,7 @@ export class ConversationManager extends EventEmitter {
|
|
|
367
370
|
this.activeSessions.size > criteria.maxSessions
|
|
368
371
|
) {
|
|
369
372
|
const sessionsByAccess = Array.from(this.activeSessions.entries()).sort(
|
|
370
|
-
([, a], [, b]) => a.lastAccessed.getTime() - b.lastAccessed.getTime()
|
|
373
|
+
([, a], [, b]) => a.lastAccessed.getTime() - b.lastAccessed.getTime(),
|
|
371
374
|
);
|
|
372
375
|
|
|
373
376
|
const excessCount = this.activeSessions.size - criteria.maxSessions;
|
|
@@ -439,7 +442,9 @@ export class ConversationManager extends EventEmitter {
|
|
|
439
442
|
getSessionStats(sessionId?: string): any {
|
|
440
443
|
if (sessionId) {
|
|
441
444
|
const session = this.activeSessions.get(sessionId);
|
|
442
|
-
if (!session)
|
|
445
|
+
if (!session) {
|
|
446
|
+
return null;
|
|
447
|
+
}
|
|
443
448
|
|
|
444
449
|
return {
|
|
445
450
|
messageCount: session.history.length,
|
|
@@ -455,12 +460,12 @@ export class ConversationManager extends EventEmitter {
|
|
|
455
460
|
const totalSessions = this.activeSessions.size;
|
|
456
461
|
const totalMessages = Array.from(this.activeSessions.values()).reduce(
|
|
457
462
|
(sum, session) => sum + session.history.length,
|
|
458
|
-
0
|
|
463
|
+
0,
|
|
459
464
|
);
|
|
460
465
|
|
|
461
466
|
const totalTokens = Array.from(this.activeSessions.values()).reduce(
|
|
462
467
|
(sum, session) => sum + session.metadata.tokenUsage.total,
|
|
463
|
-
0
|
|
468
|
+
0,
|
|
464
469
|
);
|
|
465
470
|
|
|
466
471
|
return {
|
|
@@ -510,7 +515,7 @@ export class ConversationManager extends EventEmitter {
|
|
|
510
515
|
*/
|
|
511
516
|
async exportSession(
|
|
512
517
|
sessionId: string,
|
|
513
|
-
format: 'json' | 'markdown' | 'csv'
|
|
518
|
+
format: 'json' | 'markdown' | 'csv',
|
|
514
519
|
): Promise<string> {
|
|
515
520
|
const session = await this.loadSession(sessionId);
|
|
516
521
|
if (!session) {
|
|
@@ -565,7 +570,7 @@ export class ConversationManager extends EventEmitter {
|
|
|
565
570
|
includeArchived?: boolean;
|
|
566
571
|
sortBy?: 'created' | 'updated' | 'lastAccessed';
|
|
567
572
|
sortOrder?: 'asc' | 'desc';
|
|
568
|
-
} = {}
|
|
573
|
+
} = {},
|
|
569
574
|
): Promise<{
|
|
570
575
|
sessions: Array<
|
|
571
576
|
Pick<
|
|
@@ -625,7 +630,7 @@ export class ConversationManager extends EventEmitter {
|
|
|
625
630
|
logger.error('Session cleanup failed:', error);
|
|
626
631
|
});
|
|
627
632
|
},
|
|
628
|
-
10 * 60 * 1000
|
|
633
|
+
10 * 60 * 1000,
|
|
629
634
|
); // Every 10 minutes
|
|
630
635
|
|
|
631
636
|
logger.debug('Conversation manager initialized');
|
|
@@ -641,7 +646,7 @@ export class ConversationManager extends EventEmitter {
|
|
|
641
646
|
// Keep system messages and recent messages
|
|
642
647
|
const systemMessages = session.history.filter(msg => msg.role === 'system');
|
|
643
648
|
const recentMessages = session.history.slice(
|
|
644
|
-
-contextWindowSize + systemMessages.length
|
|
649
|
+
-contextWindowSize + systemMessages.length,
|
|
645
650
|
);
|
|
646
651
|
|
|
647
652
|
// If we still have too many messages, apply compression
|
|
@@ -660,7 +665,9 @@ export class ConversationManager extends EventEmitter {
|
|
|
660
665
|
const recent = messages.slice(-recentCount);
|
|
661
666
|
const older = messages.slice(0, -recentCount);
|
|
662
667
|
|
|
663
|
-
if (older.length === 0)
|
|
668
|
+
if (older.length === 0) {
|
|
669
|
+
return recent;
|
|
670
|
+
}
|
|
664
671
|
|
|
665
672
|
const summary: ChatMessage = {
|
|
666
673
|
role: 'system',
|
|
@@ -674,7 +681,7 @@ export class ConversationManager extends EventEmitter {
|
|
|
674
681
|
private async handleSyncResponse(
|
|
675
682
|
session: EnhancedChatSession,
|
|
676
683
|
response: string,
|
|
677
|
-
startTime: number
|
|
684
|
+
startTime: number,
|
|
678
685
|
): Promise<string> {
|
|
679
686
|
const endTime = Date.now();
|
|
680
687
|
const responseTime = endTime - startTime;
|
|
@@ -709,7 +716,7 @@ export class ConversationManager extends EventEmitter {
|
|
|
709
716
|
private async *handleStreamingResponse(
|
|
710
717
|
session: EnhancedChatSession,
|
|
711
718
|
responseGenerator: AsyncGenerator<string, void, unknown>,
|
|
712
|
-
startTime: number
|
|
719
|
+
startTime: number,
|
|
713
720
|
): AsyncGenerator<string, void, unknown> {
|
|
714
721
|
let fullResponse = '';
|
|
715
722
|
let firstChunk = true;
|
|
@@ -753,7 +760,7 @@ export class ConversationManager extends EventEmitter {
|
|
|
753
760
|
|
|
754
761
|
private updatePerformanceMetrics(
|
|
755
762
|
session: EnhancedChatSession,
|
|
756
|
-
responseTime: number
|
|
763
|
+
responseTime: number,
|
|
757
764
|
): void {
|
|
758
765
|
const perf = session.metadata.performance;
|
|
759
766
|
perf.totalRequests++;
|
|
@@ -802,14 +809,14 @@ export class ConversationManager extends EventEmitter {
|
|
|
802
809
|
|
|
803
810
|
private searchSession(
|
|
804
811
|
session: EnhancedChatSession,
|
|
805
|
-
query: any
|
|
812
|
+
query: any,
|
|
806
813
|
): ChatMessage[] {
|
|
807
814
|
let matches = session.history;
|
|
808
815
|
|
|
809
816
|
if (query.text) {
|
|
810
817
|
const searchText = query.text.toLowerCase();
|
|
811
818
|
matches = matches.filter(msg =>
|
|
812
|
-
msg.content.toLowerCase().includes(searchText)
|
|
819
|
+
msg.content.toLowerCase().includes(searchText),
|
|
813
820
|
);
|
|
814
821
|
}
|
|
815
822
|
|
|
@@ -817,13 +824,13 @@ export class ConversationManager extends EventEmitter {
|
|
|
817
824
|
matches = matches.filter(
|
|
818
825
|
msg =>
|
|
819
826
|
msg.timestamp >= query.dateRange.from &&
|
|
820
|
-
msg.timestamp <= query.dateRange.to
|
|
827
|
+
msg.timestamp <= query.dateRange.to,
|
|
821
828
|
);
|
|
822
829
|
}
|
|
823
830
|
|
|
824
831
|
if (query.tags && query.tags.length > 0) {
|
|
825
832
|
const hasMatchingTag = query.tags.some((tag: string) =>
|
|
826
|
-
session.tags.includes(tag)
|
|
833
|
+
session.tags.includes(tag),
|
|
827
834
|
);
|
|
828
835
|
if (!hasMatchingTag) {
|
|
829
836
|
matches = [];
|
|
@@ -843,7 +850,7 @@ export class ConversationManager extends EventEmitter {
|
|
|
843
850
|
if (query.text) {
|
|
844
851
|
// Boost score based on exact matches
|
|
845
852
|
const exactMatches = matches.filter(msg =>
|
|
846
|
-
msg.content.toLowerCase().includes(query.text.toLowerCase())
|
|
853
|
+
msg.content.toLowerCase().includes(query.text.toLowerCase()),
|
|
847
854
|
).length;
|
|
848
855
|
score += exactMatches * 2;
|
|
849
856
|
}
|
package/src/cli.ts
CHANGED
|
@@ -1,26 +1,36 @@
|
|
|
1
1
|
import { Command } from 'commander';
|
|
2
|
+
|
|
2
3
|
import { version } from '../package.json';
|
|
3
|
-
import { InteractiveMode } from './interactive/interactive-mode';
|
|
4
|
-
import { PluginManager } from './plugins/plugin-manager';
|
|
5
|
-
import { ConfigManager } from './utils/config-manager';
|
|
6
|
-
import { logger } from './utils/logger';
|
|
7
4
|
|
|
8
5
|
// Import command modules
|
|
9
|
-
import { InitCommands } from './commands/init';
|
|
10
|
-
import { CreateCommands } from './commands/create';
|
|
11
|
-
import { AnalyzeCommands } from './commands/analyze';
|
|
12
|
-
import { GovernCommands } from './commands/govern';
|
|
13
6
|
import { AICommands } from './commands/ai';
|
|
14
|
-
import {
|
|
15
|
-
import { WatchCommands } from './commands/watch';
|
|
7
|
+
import { AnalyzeCommands } from './commands/analyze';
|
|
16
8
|
import { BatchCommands } from './commands/batch';
|
|
17
9
|
import { ChatCommands } from './commands/chat';
|
|
10
|
+
import claudeInitCommand from './commands/claude-init';
|
|
11
|
+
import claudeSetupCommand from './commands/claude-setup';
|
|
12
|
+
import { createComputerSetupCommand } from './commands/computer-setup';
|
|
13
|
+
import { CreateCommands } from './commands/create';
|
|
14
|
+
import { createGuardianCommand } from './commands/guardian';
|
|
15
|
+
import { createRAGCommand } from './commands/rag';
|
|
16
|
+
import { createSessionCommand } from './commands/session';
|
|
17
|
+
import { createVPCommand } from './commands/vp';
|
|
18
|
+
import { createWorktreeCommand } from './commands/worktree';
|
|
19
|
+
import { DashboardCommands } from './commands/dashboard';
|
|
20
|
+
import { GovernCommands } from './commands/govern';
|
|
21
|
+
import {
|
|
22
|
+
createGovernanceCommand,
|
|
23
|
+
createAlignmentCommand,
|
|
24
|
+
} from './commands/governance';
|
|
25
|
+
import { InitCommands } from './commands/init';
|
|
18
26
|
import { PluginCommands } from './commands/plugins';
|
|
19
27
|
import { SetupCommands } from './commands/setup';
|
|
20
|
-
import { createComputerSetupCommand } from './commands/computer-setup';
|
|
21
28
|
import { createTestCommand } from './commands/test';
|
|
22
|
-
import
|
|
23
|
-
import
|
|
29
|
+
import { WatchCommands } from './commands/watch';
|
|
30
|
+
import { InteractiveMode } from './interactive/interactive-mode';
|
|
31
|
+
import { PluginManager } from './plugins/plugin-manager';
|
|
32
|
+
import { ConfigManager } from './utils/config-manager';
|
|
33
|
+
import { logger } from './utils/logger';
|
|
24
34
|
|
|
25
35
|
/**
|
|
26
36
|
* Main CLI class that orchestrates all commands and modes
|
|
@@ -85,6 +95,10 @@ The Unified Developer Platform
|
|
|
85
95
|
new AnalyzeCommands(this.program, this.configManager, this.pluginManager);
|
|
86
96
|
new GovernCommands(this.program, this.configManager, this.pluginManager);
|
|
87
97
|
|
|
98
|
+
// IPRE Governance Commands (governance/gov, alignment)
|
|
99
|
+
this.program.addCommand(createGovernanceCommand());
|
|
100
|
+
this.program.addCommand(createAlignmentCommand());
|
|
101
|
+
|
|
88
102
|
// Project Management
|
|
89
103
|
new InitCommands(this.program, this.configManager, this.pluginManager);
|
|
90
104
|
new CreateCommands(this.program, this.configManager, this.pluginManager);
|
|
@@ -100,6 +114,21 @@ The Unified Developer Platform
|
|
|
100
114
|
// Testing
|
|
101
115
|
this.program.addCommand(createTestCommand());
|
|
102
116
|
|
|
117
|
+
// RAG (Retrieval-Augmented Generation)
|
|
118
|
+
this.program.addCommand(createRAGCommand());
|
|
119
|
+
|
|
120
|
+
// Session Management
|
|
121
|
+
this.program.addCommand(createSessionCommand());
|
|
122
|
+
|
|
123
|
+
// VP Daemon Management
|
|
124
|
+
this.program.addCommand(createVPCommand());
|
|
125
|
+
|
|
126
|
+
// Guardian Dashboard
|
|
127
|
+
this.program.addCommand(createGuardianCommand());
|
|
128
|
+
|
|
129
|
+
// Worktree Management
|
|
130
|
+
this.program.addCommand(createWorktreeCommand());
|
|
131
|
+
|
|
103
132
|
// Interactive Modes
|
|
104
133
|
new ChatCommands(this.program, this.configManager, this.pluginManager);
|
|
105
134
|
|