claudecto 0.1.0

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 (115) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +275 -0
  3. package/dist/__tests__/package.test.d.ts +2 -0
  4. package/dist/__tests__/package.test.d.ts.map +1 -0
  5. package/dist/__tests__/package.test.js +53 -0
  6. package/dist/__tests__/package.test.js.map +1 -0
  7. package/dist/cli.d.ts +6 -0
  8. package/dist/cli.d.ts.map +1 -0
  9. package/dist/cli.js +200 -0
  10. package/dist/cli.js.map +1 -0
  11. package/dist/index.d.ts +12 -0
  12. package/dist/index.d.ts.map +1 -0
  13. package/dist/index.js +12 -0
  14. package/dist/index.js.map +1 -0
  15. package/dist/server/index.d.ts +11 -0
  16. package/dist/server/index.d.ts.map +1 -0
  17. package/dist/server/index.js +1207 -0
  18. package/dist/server/index.js.map +1 -0
  19. package/dist/services/advisor.d.ts +117 -0
  20. package/dist/services/advisor.d.ts.map +1 -0
  21. package/dist/services/advisor.js +2636 -0
  22. package/dist/services/advisor.js.map +1 -0
  23. package/dist/services/agent-generator.d.ts +71 -0
  24. package/dist/services/agent-generator.d.ts.map +1 -0
  25. package/dist/services/agent-generator.js +295 -0
  26. package/dist/services/agent-generator.js.map +1 -0
  27. package/dist/services/agents.d.ts +67 -0
  28. package/dist/services/agents.d.ts.map +1 -0
  29. package/dist/services/agents.js +405 -0
  30. package/dist/services/agents.js.map +1 -0
  31. package/dist/services/analytics.d.ts +145 -0
  32. package/dist/services/analytics.d.ts.map +1 -0
  33. package/dist/services/analytics.js +609 -0
  34. package/dist/services/analytics.js.map +1 -0
  35. package/dist/services/blueprints.d.ts +31 -0
  36. package/dist/services/blueprints.d.ts.map +1 -0
  37. package/dist/services/blueprints.js +317 -0
  38. package/dist/services/blueprints.js.map +1 -0
  39. package/dist/services/claude-dir.d.ts +50 -0
  40. package/dist/services/claude-dir.d.ts.map +1 -0
  41. package/dist/services/claude-dir.js +193 -0
  42. package/dist/services/claude-dir.js.map +1 -0
  43. package/dist/services/hooks.d.ts +38 -0
  44. package/dist/services/hooks.d.ts.map +1 -0
  45. package/dist/services/hooks.js +165 -0
  46. package/dist/services/hooks.js.map +1 -0
  47. package/dist/services/insights.d.ts +52 -0
  48. package/dist/services/insights.d.ts.map +1 -0
  49. package/dist/services/insights.js +1035 -0
  50. package/dist/services/insights.js.map +1 -0
  51. package/dist/services/memory.d.ts +14 -0
  52. package/dist/services/memory.d.ts.map +1 -0
  53. package/dist/services/memory.js +25 -0
  54. package/dist/services/memory.js.map +1 -0
  55. package/dist/services/plans.d.ts +20 -0
  56. package/dist/services/plans.d.ts.map +1 -0
  57. package/dist/services/plans.js +149 -0
  58. package/dist/services/plans.js.map +1 -0
  59. package/dist/services/project-intelligence.d.ts +75 -0
  60. package/dist/services/project-intelligence.d.ts.map +1 -0
  61. package/dist/services/project-intelligence.js +731 -0
  62. package/dist/services/project-intelligence.js.map +1 -0
  63. package/dist/services/search.d.ts +32 -0
  64. package/dist/services/search.d.ts.map +1 -0
  65. package/dist/services/search.js +203 -0
  66. package/dist/services/search.js.map +1 -0
  67. package/dist/services/sessions.d.ts +25 -0
  68. package/dist/services/sessions.d.ts.map +1 -0
  69. package/dist/services/sessions.js +248 -0
  70. package/dist/services/sessions.js.map +1 -0
  71. package/dist/services/skills.d.ts +30 -0
  72. package/dist/services/skills.d.ts.map +1 -0
  73. package/dist/services/skills.js +197 -0
  74. package/dist/services/skills.js.map +1 -0
  75. package/dist/services/stats.d.ts +23 -0
  76. package/dist/services/stats.d.ts.map +1 -0
  77. package/dist/services/stats.js +88 -0
  78. package/dist/services/stats.js.map +1 -0
  79. package/dist/services/teams.d.ts +115 -0
  80. package/dist/services/teams.d.ts.map +1 -0
  81. package/dist/services/teams.js +421 -0
  82. package/dist/services/teams.js.map +1 -0
  83. package/dist/services/tech-stack.d.ts +98 -0
  84. package/dist/services/tech-stack.d.ts.map +1 -0
  85. package/dist/services/tech-stack.js +1088 -0
  86. package/dist/services/tech-stack.js.map +1 -0
  87. package/dist/services/terminal.d.ts +75 -0
  88. package/dist/services/terminal.d.ts.map +1 -0
  89. package/dist/services/terminal.js +224 -0
  90. package/dist/services/terminal.js.map +1 -0
  91. package/dist/types.d.ts +1095 -0
  92. package/dist/types.d.ts.map +1 -0
  93. package/dist/types.js +18 -0
  94. package/dist/types.js.map +1 -0
  95. package/dist/ui/assets/index-BiH4Nhdk.css +1 -0
  96. package/dist/ui/assets/index-Brv-K8bd.css +1 -0
  97. package/dist/ui/assets/index-BwMBEdQz.js +3108 -0
  98. package/dist/ui/assets/index-BwMBEdQz.js.map +1 -0
  99. package/dist/ui/assets/index-CEWz7ABD.js +3108 -0
  100. package/dist/ui/assets/index-CEWz7ABD.js.map +1 -0
  101. package/dist/ui/assets/index-CIZ3vvc-.css +1 -0
  102. package/dist/ui/assets/index-CsU3cI0n.js +3108 -0
  103. package/dist/ui/assets/index-CsU3cI0n.js.map +1 -0
  104. package/dist/ui/assets/index-D3AY6iCS.js +3133 -0
  105. package/dist/ui/assets/index-D3AY6iCS.js.map +1 -0
  106. package/dist/ui/assets/index-D8lNZ0Ye.css +1 -0
  107. package/dist/ui/assets/index-DmgeppSA.js +3108 -0
  108. package/dist/ui/assets/index-DmgeppSA.js.map +1 -0
  109. package/dist/ui/favicon.svg +43 -0
  110. package/dist/ui/index.html +23 -0
  111. package/dist/utils/jsonl.d.ts +16 -0
  112. package/dist/utils/jsonl.d.ts.map +1 -0
  113. package/dist/utils/jsonl.js +51 -0
  114. package/dist/utils/jsonl.js.map +1 -0
  115. package/package.json +106 -0
@@ -0,0 +1,1095 @@
1
+ /**
2
+ * Types for claudecto - Claude Code Dashboard
3
+ */
4
+ export type MessageType = 'user' | 'assistant' | 'file-history-snapshot';
5
+ export interface BaseMessage {
6
+ type: MessageType;
7
+ uuid: string;
8
+ timestamp: string;
9
+ sessionId: string;
10
+ parentUuid?: string | null;
11
+ }
12
+ export interface UserMessage extends BaseMessage {
13
+ type: 'user';
14
+ message: {
15
+ role: 'user';
16
+ content: string | ToolResultContent[];
17
+ };
18
+ cwd: string;
19
+ gitBranch?: string;
20
+ version?: string;
21
+ slug?: string;
22
+ permissionMode?: string;
23
+ thinkingMetadata?: {
24
+ level: string;
25
+ disabled: boolean;
26
+ triggers: string[];
27
+ };
28
+ todos?: unknown[];
29
+ }
30
+ export interface ToolResultContent {
31
+ type: 'tool_result';
32
+ tool_use_id: string;
33
+ content: string;
34
+ }
35
+ export interface AssistantMessageContent {
36
+ type: 'thinking' | 'text' | 'tool_use';
37
+ thinking?: string;
38
+ text?: string;
39
+ name?: string;
40
+ input?: Record<string, unknown>;
41
+ id?: string;
42
+ signature?: string;
43
+ }
44
+ export interface AssistantMessage extends BaseMessage {
45
+ type: 'assistant';
46
+ message: {
47
+ model: string;
48
+ id: string;
49
+ role: 'assistant';
50
+ content: AssistantMessageContent[];
51
+ stop_reason?: string | null;
52
+ usage?: {
53
+ input_tokens: number;
54
+ output_tokens: number;
55
+ cache_creation_input_tokens?: number;
56
+ cache_read_input_tokens?: number;
57
+ };
58
+ };
59
+ requestId?: string;
60
+ }
61
+ export interface FileHistorySnapshot extends BaseMessage {
62
+ type: 'file-history-snapshot';
63
+ messageId: string;
64
+ snapshot: {
65
+ messageId: string;
66
+ trackedFileBackups: Record<string, unknown>;
67
+ timestamp: string;
68
+ };
69
+ isSnapshotUpdate: boolean;
70
+ }
71
+ export type SessionMessage = UserMessage | AssistantMessage | FileHistorySnapshot;
72
+ export interface NormalizedMessage {
73
+ id: string;
74
+ type: 'user' | 'assistant' | 'tool-use' | 'tool-result' | 'thinking';
75
+ timestamp: string;
76
+ content: string;
77
+ metadata: {
78
+ model?: string;
79
+ tokens?: {
80
+ input: number;
81
+ output: number;
82
+ };
83
+ toolName?: string;
84
+ toolInput?: Record<string, unknown>;
85
+ thinkingLevel?: string;
86
+ };
87
+ }
88
+ export interface Session {
89
+ id: string;
90
+ projectPath: string;
91
+ projectName: string;
92
+ slug?: string;
93
+ branch?: string;
94
+ startedAt: string;
95
+ lastMessageAt: string;
96
+ messageCount: number;
97
+ userMessageCount: number;
98
+ filePath: string;
99
+ }
100
+ export interface SessionDetail extends Session {
101
+ messages: NormalizedMessage[];
102
+ }
103
+ export interface Project {
104
+ path: string;
105
+ name: string;
106
+ sessionCount: number;
107
+ lastActivity: string;
108
+ }
109
+ export interface HistoryEntry {
110
+ display: string;
111
+ timestamp: number;
112
+ project: string;
113
+ pastedContents?: Record<string, unknown>;
114
+ }
115
+ export interface DailyActivity {
116
+ date: string;
117
+ messageCount: number;
118
+ sessionCount: number;
119
+ toolCallCount: number;
120
+ }
121
+ export interface StatsCache {
122
+ version: number;
123
+ lastComputedDate: string;
124
+ dailyActivity: DailyActivity[];
125
+ }
126
+ export interface Plan {
127
+ name: string;
128
+ fileName: string;
129
+ filePath: string;
130
+ preview: string;
131
+ content?: string;
132
+ createdAt?: string;
133
+ modifiedAt: string;
134
+ size: number;
135
+ }
136
+ export interface SkillFrontmatter {
137
+ name?: string;
138
+ description?: string;
139
+ 'argument-hint'?: string;
140
+ 'disable-model-invocation'?: boolean;
141
+ 'user-invocable'?: boolean;
142
+ 'allowed-tools'?: string;
143
+ model?: string;
144
+ context?: 'fork';
145
+ agent?: string;
146
+ hooks?: Record<string, unknown>;
147
+ }
148
+ export interface Skill {
149
+ name: string;
150
+ path: string;
151
+ scope: 'user' | 'project';
152
+ frontmatter: SkillFrontmatter;
153
+ content: string;
154
+ description: string;
155
+ isValid: boolean;
156
+ errors: string[];
157
+ }
158
+ export type HookEvent = 'SessionStart' | 'UserPromptSubmit' | 'PreToolUse' | 'PermissionRequest' | 'PostToolUse' | 'PostToolUseFailure' | 'SubagentStart' | 'SubagentStop' | 'Stop' | 'PreCompact' | 'SessionEnd' | 'Notification' | 'Setup';
159
+ export interface HookCommand {
160
+ type: 'command' | 'prompt';
161
+ command?: string;
162
+ prompt?: string;
163
+ timeout?: number;
164
+ }
165
+ export interface HookMatcher {
166
+ matcher?: string;
167
+ hooks: HookCommand[];
168
+ }
169
+ export interface HooksConfig {
170
+ hooks?: Partial<Record<HookEvent, HookMatcher[]>>;
171
+ }
172
+ export interface Hook {
173
+ event: HookEvent;
174
+ matcher?: string;
175
+ commands: HookCommand[];
176
+ }
177
+ export interface Settings extends HooksConfig {
178
+ enabledPlugins?: Record<string, boolean>;
179
+ [key: string]: unknown;
180
+ }
181
+ export interface TodoItem {
182
+ id: string;
183
+ content: string;
184
+ status: 'pending' | 'completed';
185
+ priority: 'low' | 'medium' | 'high';
186
+ }
187
+ export interface SearchResult {
188
+ type: 'user' | 'assistant';
189
+ sessionId: string;
190
+ messageId: string;
191
+ projectPath: string;
192
+ projectName: string;
193
+ timestamp: string;
194
+ content: string;
195
+ snippet: string;
196
+ score: number;
197
+ }
198
+ export interface SearchQuery {
199
+ query: string;
200
+ filters?: {
201
+ project?: string;
202
+ dateRange?: [string, string];
203
+ type?: 'user' | 'assistant';
204
+ };
205
+ limit?: number;
206
+ offset?: number;
207
+ }
208
+ export interface ApiError {
209
+ error: string;
210
+ code?: string;
211
+ }
212
+ export interface PaginatedResponse<T> {
213
+ items: T[];
214
+ total: number;
215
+ page: number;
216
+ limit: number;
217
+ hasMore: boolean;
218
+ }
219
+ export interface StatusResponse {
220
+ claudeDir: string;
221
+ projectCount: number;
222
+ sessionCount: number;
223
+ planCount: number;
224
+ skillCount: number;
225
+ hasStats: boolean;
226
+ }
227
+ export interface DotClaudeConfig {
228
+ claudeDir: string;
229
+ port: number;
230
+ host: string;
231
+ oauth?: {
232
+ googleClientId: string;
233
+ googleClientSecret: string;
234
+ };
235
+ }
236
+ export interface CostSuggestion {
237
+ type: 'model' | 'caching' | 'context' | 'tool-usage';
238
+ title: string;
239
+ description: string;
240
+ impact: 'low' | 'medium' | 'high';
241
+ }
242
+ export interface FollowUpSuggestion {
243
+ type: 'incomplete' | 'test' | 'documentation' | 'refactor';
244
+ title: string;
245
+ description: string;
246
+ priority: 'low' | 'medium' | 'high';
247
+ }
248
+ export interface SentimentPoint {
249
+ messageIndex: number;
250
+ timestamp: string;
251
+ sentiment: 'positive' | 'neutral' | 'negative' | 'frustrated';
252
+ score: number;
253
+ reason?: string;
254
+ }
255
+ export interface SentimentAnalysis {
256
+ overall: 'positive' | 'neutral' | 'negative' | 'mixed';
257
+ averageScore: number;
258
+ timeline: SentimentPoint[];
259
+ frustrationSpikes: {
260
+ messageIndex: number;
261
+ reason: string;
262
+ }[];
263
+ moodShifts: {
264
+ fromIndex: number;
265
+ toIndex: number;
266
+ from: string;
267
+ to: string;
268
+ trigger?: string;
269
+ }[];
270
+ }
271
+ export interface TopicSegment {
272
+ id: string;
273
+ name: string;
274
+ description: string;
275
+ startIndex: number;
276
+ endIndex: number;
277
+ messageCount: number;
278
+ category: 'debugging' | 'feature' | 'explanation' | 'refactoring' | 'testing' | 'documentation' | 'setup' | 'other';
279
+ keywords: string[];
280
+ }
281
+ export interface ResponseQuality {
282
+ messageIndex: number;
283
+ score: number;
284
+ metrics: {
285
+ relevance: number;
286
+ completeness: number;
287
+ accuracy: number;
288
+ helpfulness: number;
289
+ };
290
+ issues?: string[];
291
+ }
292
+ export interface QualityAnalysis {
293
+ averageScore: number;
294
+ distribution: {
295
+ excellent: number;
296
+ good: number;
297
+ fair: number;
298
+ poor: number;
299
+ };
300
+ responses: ResponseQuality[];
301
+ bestResponses: {
302
+ index: number;
303
+ reason: string;
304
+ }[];
305
+ improvementAreas: string[];
306
+ }
307
+ export interface SessionMetadata {
308
+ duration: {
309
+ total: number;
310
+ thinking: number;
311
+ toolExecution: number;
312
+ userWaiting: number;
313
+ };
314
+ tokens: {
315
+ total: number;
316
+ input: number;
317
+ output: number;
318
+ cached: number;
319
+ bySection: {
320
+ topic: string;
321
+ tokens: number;
322
+ }[];
323
+ };
324
+ tools: {
325
+ total: number;
326
+ byName: {
327
+ name: string;
328
+ count: number;
329
+ successRate: number;
330
+ }[];
331
+ mostUsed: string[];
332
+ };
333
+ codeChanges: {
334
+ filesEdited: number;
335
+ filesCreated: number;
336
+ linesAdded: number;
337
+ linesRemoved: number;
338
+ files: {
339
+ path: string;
340
+ action: 'edit' | 'create' | 'delete';
341
+ changes: number;
342
+ }[];
343
+ };
344
+ errors: {
345
+ count: number;
346
+ types: {
347
+ type: string;
348
+ count: number;
349
+ }[];
350
+ details: {
351
+ message: string;
352
+ resolved: boolean;
353
+ messageIndex: number;
354
+ }[];
355
+ };
356
+ }
357
+ export interface ActionableSummary {
358
+ mainTasks: {
359
+ task: string;
360
+ status: 'completed' | 'partial' | 'failed';
361
+ }[];
362
+ errorsEncountered: {
363
+ error: string;
364
+ resolution?: string;
365
+ }[];
366
+ codeChanges: {
367
+ file: string;
368
+ description: string;
369
+ }[];
370
+ keyDecisions: {
371
+ decision: string;
372
+ rationale?: string;
373
+ }[];
374
+ learnings: string[];
375
+ }
376
+ export interface SessionInsight {
377
+ sessionId: string;
378
+ version: number;
379
+ generatedAt: string;
380
+ status: 'pending' | 'generating' | 'completed' | 'error';
381
+ error?: string;
382
+ errorDetails?: {
383
+ code: AIErrorCode;
384
+ message: string;
385
+ recoverable: boolean;
386
+ suggestion?: string;
387
+ };
388
+ title?: string;
389
+ summary?: string;
390
+ keyAccomplishments?: string[];
391
+ sentiment?: SentimentAnalysis;
392
+ topics?: TopicSegment[];
393
+ quality?: QualityAnalysis;
394
+ metadata?: SessionMetadata;
395
+ actionableSummary?: ActionableSummary;
396
+ costOptimization?: {
397
+ totalCost: number;
398
+ suggestions: CostSuggestion[];
399
+ potentialSavings?: number;
400
+ };
401
+ followUps?: FollowUpSuggestion[];
402
+ }
403
+ export interface CodingPattern {
404
+ name: string;
405
+ description: string;
406
+ frequency: number;
407
+ category: 'architecture' | 'design' | 'testing' | 'error-handling' | 'performance' | 'security' | 'other';
408
+ examples: string[];
409
+ recommendation?: string;
410
+ }
411
+ export interface TechStackItem {
412
+ name: string;
413
+ type: 'language' | 'framework' | 'library' | 'tool' | 'database' | 'infrastructure';
414
+ usage: number;
415
+ firstSeen: string;
416
+ lastUsed: string;
417
+ proficiency: 'beginner' | 'intermediate' | 'advanced' | 'expert';
418
+ relatedFiles: string[];
419
+ }
420
+ export interface DevelopmentPattern {
421
+ pattern: string;
422
+ description: string;
423
+ frequency: number;
424
+ impact: 'positive' | 'neutral' | 'negative';
425
+ suggestion?: string;
426
+ }
427
+ export interface ProductivityMetric {
428
+ name: string;
429
+ value: number;
430
+ unit: string;
431
+ trend: 'up' | 'down' | 'stable';
432
+ percentChange?: number;
433
+ benchmark?: number;
434
+ }
435
+ export interface ProjectHealthScore {
436
+ overall: number;
437
+ categories: {
438
+ codeQuality: number;
439
+ testCoverage: number;
440
+ documentation: number;
441
+ errorRate: number;
442
+ velocity: number;
443
+ };
444
+ trends: {
445
+ category: string;
446
+ direction: 'improving' | 'declining' | 'stable';
447
+ change: number;
448
+ }[];
449
+ }
450
+ export interface WorkflowInsight {
451
+ name: string;
452
+ description: string;
453
+ efficiency: number;
454
+ bottlenecks: string[];
455
+ suggestions: string[];
456
+ }
457
+ export interface LearningInsight {
458
+ topic: string;
459
+ proficiencyGain: number;
460
+ timeInvested: number;
461
+ resourcesUsed: string[];
462
+ nextSteps: string[];
463
+ }
464
+ export interface ProjectAIInsight {
465
+ projectPath: string;
466
+ projectName: string;
467
+ version: number;
468
+ generatedAt: string;
469
+ status: 'pending' | 'generating' | 'completed' | 'error';
470
+ error?: string;
471
+ summary?: string;
472
+ highlights?: string[];
473
+ concerns?: string[];
474
+ healthScore?: ProjectHealthScore;
475
+ techStack?: TechStackItem[];
476
+ techStackRecommendations?: string[];
477
+ codingPatterns?: CodingPattern[];
478
+ antiPatterns?: CodingPattern[];
479
+ developmentPatterns?: DevelopmentPattern[];
480
+ workflowInsights?: WorkflowInsight[];
481
+ productivityMetrics?: ProductivityMetric[];
482
+ velocityTrend?: {
483
+ date: string;
484
+ velocity: number;
485
+ }[];
486
+ learningInsights?: LearningInsight[];
487
+ skillGrowth?: {
488
+ skill: string;
489
+ level: number;
490
+ growth: number;
491
+ }[];
492
+ costAnalysis?: {
493
+ totalCost: number;
494
+ costPerSession: number;
495
+ costTrend: {
496
+ date: string;
497
+ cost: number;
498
+ }[];
499
+ optimizationOpportunities: CostSuggestion[];
500
+ projectedMonthlyCost: number;
501
+ };
502
+ collaborationPatterns?: {
503
+ peakHours: {
504
+ hour: number;
505
+ activity: number;
506
+ }[];
507
+ sessionFrequency: {
508
+ day: string;
509
+ count: number;
510
+ }[];
511
+ averageSessionDuration: number;
512
+ };
513
+ recommendations?: {
514
+ category: 'performance' | 'quality' | 'cost' | 'learning' | 'workflow';
515
+ priority: 'low' | 'medium' | 'high';
516
+ title: string;
517
+ description: string;
518
+ expectedImpact: string;
519
+ }[];
520
+ }
521
+ export declare const AI_ERROR_CODES: {
522
+ readonly CLAUDE_NOT_FOUND: "CLAUDE_NOT_FOUND";
523
+ readonly EXECUTION_TIMEOUT: "EXECUTION_TIMEOUT";
524
+ readonly PARSE_ERROR: "PARSE_ERROR";
525
+ readonly SESSION_NOT_FOUND: "SESSION_NOT_FOUND";
526
+ readonly EMPTY_RESPONSE: "EMPTY_RESPONSE";
527
+ readonly RATE_LIMITED: "RATE_LIMITED";
528
+ readonly CONTEXT_TOO_LARGE: "CONTEXT_TOO_LARGE";
529
+ readonly PERMISSION_DENIED: "PERMISSION_DENIED";
530
+ readonly UNKNOWN: "UNKNOWN";
531
+ };
532
+ export type AIErrorCode = keyof typeof AI_ERROR_CODES;
533
+ export interface AIError {
534
+ code: AIErrorCode;
535
+ message: string;
536
+ details?: string;
537
+ recoverable: boolean;
538
+ retryAfter?: number;
539
+ suggestion?: string;
540
+ }
541
+ export type InsightStage = 'starting' | 'loading_session' | 'loading_analytics' | 'building_context' | 'calling_claude' | 'parsing_response' | 'saving' | 'completed' | 'error';
542
+ export interface InsightProgress {
543
+ sessionId: string;
544
+ stage: InsightStage;
545
+ progress: number;
546
+ message: string;
547
+ startedAt: string;
548
+ error?: AIError;
549
+ }
550
+ export type TechType = 'language' | 'framework' | 'library' | 'tool' | 'database' | 'cloud' | 'devops' | 'testing';
551
+ export interface TechStackEntry {
552
+ name: string;
553
+ type: TechType;
554
+ icon?: string;
555
+ fileExtensions: string[];
556
+ usageCount: number;
557
+ filesModified: number;
558
+ projectsUsed: string[];
559
+ firstSeen: string;
560
+ lastUsed: string;
561
+ proficiency: 'learning' | 'familiar' | 'proficient' | 'expert';
562
+ claudeContributions: number;
563
+ patterns: string[];
564
+ }
565
+ export interface TechStackSummary {
566
+ generatedAt: string;
567
+ version: number;
568
+ totalProjects: number;
569
+ totalSessions: number;
570
+ totalFiles: number;
571
+ technologies: TechStackEntry[];
572
+ primaryLanguages: string[];
573
+ topFrameworks: string[];
574
+ cloudProviders: string[];
575
+ devOpsTools: string[];
576
+ databases: string[];
577
+ recommendations: string[];
578
+ insights: {
579
+ mostActiveProject: string;
580
+ mostUsedTech: string;
581
+ growthAreas: string[];
582
+ expertise: string[];
583
+ };
584
+ }
585
+ export interface ProjectTechStack {
586
+ projectPath: string;
587
+ projectName: string;
588
+ generatedAt: string;
589
+ technologies: TechStackEntry[];
590
+ fileBreakdown: {
591
+ extension: string;
592
+ count: number;
593
+ percentage: number;
594
+ }[];
595
+ claudeActivity: {
596
+ totalEdits: number;
597
+ totalReads: number;
598
+ totalWrites: number;
599
+ };
600
+ }
601
+ /** Common tech stack pattern detected across projects */
602
+ export interface StackPattern {
603
+ id: string;
604
+ name: string;
605
+ description: string;
606
+ technologies: string[];
607
+ projectCount: number;
608
+ projects: string[];
609
+ icon?: string;
610
+ }
611
+ /** Technology co-occurrence correlation */
612
+ export interface TechCorrelation {
613
+ tech1: string;
614
+ tech2: string;
615
+ correlation: number;
616
+ projectsShared: number;
617
+ strength: 'weak' | 'moderate' | 'strong';
618
+ }
619
+ /** Technology usage trend over time */
620
+ export interface TechEvolution {
621
+ tech: string;
622
+ trend: 'rising' | 'stable' | 'declining';
623
+ changePercent: number;
624
+ recentUsage: number;
625
+ totalUsage: number;
626
+ firstSeen: string;
627
+ monthlyTrend: {
628
+ month: string;
629
+ usage: number;
630
+ }[];
631
+ }
632
+ /** Project similarity based on shared technologies */
633
+ export interface ProjectSimilarity {
634
+ project1: string;
635
+ project2: string;
636
+ project1Name: string;
637
+ project2Name: string;
638
+ similarity: number;
639
+ sharedTechnologies: string[];
640
+ }
641
+ /** Extended tech stack summary with deep insights */
642
+ export interface TechStackDeepInsights {
643
+ summary: TechStackSummary;
644
+ stackPatterns: StackPattern[];
645
+ correlations: TechCorrelation[];
646
+ evolution: TechEvolution[];
647
+ projectSimilarity: ProjectSimilarity[];
648
+ highlights: {
649
+ sharedFoundations: string;
650
+ dominantPattern: string;
651
+ risingTech: string;
652
+ techDiversity: number;
653
+ };
654
+ }
655
+ export interface TechStackAIInsight {
656
+ id: string;
657
+ generatedAt: string;
658
+ status: 'pending' | 'generating' | 'completed' | 'error';
659
+ error?: AIError;
660
+ overview?: string;
661
+ developerProfile?: string;
662
+ stackHealth?: number;
663
+ stackPatterns?: Array<{
664
+ id: string;
665
+ name: string;
666
+ description: string;
667
+ technologies: string[];
668
+ icon?: string;
669
+ }>;
670
+ strengths?: Array<{
671
+ title: string;
672
+ description: string;
673
+ technologies: string[];
674
+ }>;
675
+ blindSpots?: Array<{
676
+ title: string;
677
+ description: string;
678
+ suggestion: string;
679
+ }>;
680
+ learningPath?: Array<{
681
+ skill: string;
682
+ reason: string;
683
+ resources?: string[];
684
+ priority: 'low' | 'medium' | 'high';
685
+ }>;
686
+ technicalDebt?: Array<{
687
+ issue: string;
688
+ impact: string;
689
+ fix: string;
690
+ }>;
691
+ architectureInsights?: Array<{
692
+ title: string;
693
+ observation: string;
694
+ recommendation?: string;
695
+ }>;
696
+ quickHighlights?: Array<{
697
+ title: string;
698
+ description: string;
699
+ type: 'positive' | 'warning' | 'info' | 'suggestion';
700
+ icon?: string;
701
+ }>;
702
+ }
703
+ export interface AgentFrontmatter {
704
+ name?: string;
705
+ description?: string;
706
+ 'argument-hint'?: string;
707
+ 'allowed-tools'?: string;
708
+ model?: string;
709
+ context?: 'fork';
710
+ 'user-invocable'?: boolean;
711
+ 'disable-model-invocation'?: boolean;
712
+ }
713
+ export interface Agent {
714
+ name: string;
715
+ path: string;
716
+ scope: 'user' | 'project';
717
+ frontmatter: AgentFrontmatter;
718
+ content: string;
719
+ description: string;
720
+ isValid: boolean;
721
+ errors: string[];
722
+ }
723
+ export interface TeamMember {
724
+ name: string;
725
+ role: string;
726
+ color?: string;
727
+ agentRef?: string;
728
+ }
729
+ export interface TeamConfig {
730
+ id: string;
731
+ name: string;
732
+ description: string;
733
+ leader: TeamMember;
734
+ teammates: TeamMember[];
735
+ planFile?: string;
736
+ createdAt: string;
737
+ modifiedAt: string;
738
+ }
739
+ export type BlueprintCategory = 'development' | 'review' | 'testing' | 'documentation' | 'security' | 'workflow';
740
+ export interface Blueprint {
741
+ id: string;
742
+ name: string;
743
+ type: 'agent' | 'team';
744
+ description: string;
745
+ category: BlueprintCategory;
746
+ content: string;
747
+ icon?: string;
748
+ isBuiltIn: boolean;
749
+ }
750
+ export type RecommendationType = 'skill' | 'agent' | 'hook' | 'claude-md' | 'mcp-server' | 'settings' | 'model';
751
+ export interface AdvisorRecommendation {
752
+ id: string;
753
+ type: RecommendationType;
754
+ title: string;
755
+ description: string;
756
+ confidence: number;
757
+ evidence: string[];
758
+ action: AdvisorAction;
759
+ examples?: string[];
760
+ createdAt: string;
761
+ status: 'pending' | 'applied' | 'dismissed';
762
+ appliedAt?: string;
763
+ dismissedAt?: string;
764
+ }
765
+ export type AdvisorAction = SkillAction | AgentAction | HookAction | ClaudeMdAction | MCPServerAction | SettingsAction | ModelAction;
766
+ export interface SkillAction {
767
+ type: 'skill';
768
+ skillName: string;
769
+ skillContent: string;
770
+ }
771
+ export interface AgentAction {
772
+ type: 'agent';
773
+ agentName: string;
774
+ agentContent: string;
775
+ template?: string;
776
+ }
777
+ export interface HookAction {
778
+ type: 'hook';
779
+ event: string;
780
+ matcher?: string;
781
+ command: string;
782
+ }
783
+ export interface ClaudeMdAction {
784
+ type: 'claude-md';
785
+ section: string;
786
+ addition: string;
787
+ }
788
+ export interface MCPServerAction {
789
+ type: 'mcp-server';
790
+ serverName: string;
791
+ description: string;
792
+ setupInstructions: string;
793
+ npmPackage?: string;
794
+ }
795
+ export interface SettingsAction {
796
+ type: 'settings';
797
+ setting: string;
798
+ value: unknown;
799
+ path: string;
800
+ }
801
+ export interface ModelAction {
802
+ type: 'model';
803
+ recommendedModel: string;
804
+ taskType: string;
805
+ }
806
+ export interface PromptPattern {
807
+ fingerprint: string;
808
+ normalizedText: string;
809
+ keywords: string[];
810
+ count: number;
811
+ examples: string[];
812
+ timestamps: string[];
813
+ sessions: Set<string>;
814
+ projectPaths: Set<string>;
815
+ }
816
+ export interface ErrorPattern {
817
+ toolName: string;
818
+ errorRate: number;
819
+ totalCalls: number;
820
+ errorCalls: number;
821
+ commonErrorMessages: string[];
822
+ commonSequences: string[];
823
+ affectedProjects: string[];
824
+ suggestedHook: {
825
+ event: string;
826
+ matcher?: string;
827
+ command: string;
828
+ } | null;
829
+ }
830
+ export interface ClarificationPattern {
831
+ type: 'claude-question' | 'repeated-context';
832
+ question: string;
833
+ contextStatement?: string;
834
+ occurrences: number;
835
+ sessions: Set<string>;
836
+ projects: Set<string>;
837
+ examples: string[];
838
+ suggestedAddition: string;
839
+ }
840
+ export interface AgentPattern {
841
+ agentName: string;
842
+ category: string;
843
+ count: number;
844
+ sessions: Set<string>;
845
+ examples: string[];
846
+ triggers: string[];
847
+ }
848
+ export interface HookPattern {
849
+ event: string;
850
+ matcher?: string;
851
+ command: string;
852
+ reason: string;
853
+ count: number;
854
+ examples: string[];
855
+ }
856
+ export interface MCPPattern {
857
+ serverName: string;
858
+ triggers: string[];
859
+ count: number;
860
+ examples: string[];
861
+ }
862
+ export interface ClaudeMdPattern {
863
+ key: string;
864
+ category: 'context' | 'conventions' | 'preferences' | 'tech-stack' | 'workflow';
865
+ count: number;
866
+ examples: string[];
867
+ suggestedSection: string;
868
+ suggestedContent: string;
869
+ }
870
+ export interface ModelPerformanceData {
871
+ model: string;
872
+ taskType: string;
873
+ sessionCount: number;
874
+ avgTokensPerSession: number;
875
+ avgTurnsPerSession: number;
876
+ errorRate: number;
877
+ successRate: number;
878
+ }
879
+ export interface AdvisorConfig {
880
+ minPromptOccurrences: number;
881
+ minErrorRate: number;
882
+ minClarificationOccurrences: number;
883
+ minSessionsForModelAnalysis: number;
884
+ lookbackDays: number;
885
+ confidenceThreshold: number;
886
+ }
887
+ export interface AdvisorState {
888
+ recommendations: AdvisorRecommendation[];
889
+ lastAnalyzedAt: string | null;
890
+ dismissedIds: string[];
891
+ appliedIds: string[];
892
+ }
893
+ export interface AdvisorStats {
894
+ pending: number;
895
+ applied: number;
896
+ dismissed: number;
897
+ lastAnalyzed: string | null;
898
+ byType: {
899
+ skill: number;
900
+ agent: number;
901
+ hook: number;
902
+ 'claude-md': number;
903
+ 'mcp-server': number;
904
+ settings: number;
905
+ model: number;
906
+ };
907
+ }
908
+ /** Code hotspot - file that's frequently modified */
909
+ export interface CodeHotspot {
910
+ filePath: string;
911
+ fileName: string;
912
+ editCount: number;
913
+ lastEdited: string;
914
+ churnScore: number;
915
+ sessions: number;
916
+ contributionType: 'feature' | 'bugfix' | 'refactor' | 'unknown';
917
+ }
918
+ /** Development milestone detected from session activity */
919
+ export interface DevelopmentMilestone {
920
+ id: string;
921
+ title: string;
922
+ description: string;
923
+ date: string;
924
+ sessionIds: string[];
925
+ category: 'feature' | 'launch' | 'refactor' | 'fix' | 'setup';
926
+ impact: 'major' | 'minor';
927
+ filesInvolved: string[];
928
+ }
929
+ /** Workflow pattern detected across sessions */
930
+ export interface WorkflowPattern {
931
+ id: string;
932
+ name: string;
933
+ description: string;
934
+ frequency: number;
935
+ avgDuration: number;
936
+ steps: string[];
937
+ automationPotential: 'high' | 'medium' | 'low';
938
+ suggestedSkill?: string;
939
+ }
940
+ /** Recurring challenge detected across sessions */
941
+ export interface RecurringChallenge {
942
+ id: string;
943
+ title: string;
944
+ description: string;
945
+ occurrences: number;
946
+ firstSeen: string;
947
+ lastSeen: string;
948
+ category: 'error' | 'complexity' | 'knowledge-gap' | 'tooling';
949
+ relatedFiles: string[];
950
+ suggestedResolution?: string;
951
+ resolved: boolean;
952
+ }
953
+ /** Claude effectiveness metrics for a project */
954
+ export interface ClaudeEffectiveness {
955
+ overallScore: number;
956
+ strengths: string[];
957
+ weaknesses: string[];
958
+ bestToolUsage: {
959
+ tool: string;
960
+ successRate: number;
961
+ }[];
962
+ worstToolUsage: {
963
+ tool: string;
964
+ errorRate: number;
965
+ }[];
966
+ averageTaskCompletion: number;
967
+ iterationEfficiency: number;
968
+ }
969
+ /** Project-specific recommendation */
970
+ export interface ProjectRecommendation {
971
+ id: string;
972
+ type: 'skill' | 'refactor' | 'process' | 'learning' | 'automation';
973
+ priority: 'high' | 'medium' | 'low';
974
+ title: string;
975
+ description: string;
976
+ rationale: string;
977
+ actionItems: string[];
978
+ estimatedImpact: string;
979
+ }
980
+ /** Activity pattern for time-based analysis */
981
+ export interface ActivityPattern {
982
+ peakDays: {
983
+ day: string;
984
+ sessions: number;
985
+ }[];
986
+ peakHours: {
987
+ hour: number;
988
+ sessions: number;
989
+ }[];
990
+ averageSessionsPerWeek: number;
991
+ longestStreak: number;
992
+ lastActiveStreak: number;
993
+ }
994
+ /** Project health dimensions */
995
+ export interface ProjectHealth {
996
+ overall: number;
997
+ velocity: number;
998
+ stability: number;
999
+ maintainability: number;
1000
+ completion: number;
1001
+ trend: 'improving' | 'stable' | 'declining';
1002
+ trendChange: number;
1003
+ }
1004
+ /** Full Project Intelligence report */
1005
+ export interface ProjectIntelligence {
1006
+ projectPath: string;
1007
+ projectName: string;
1008
+ generatedAt: string;
1009
+ status: 'pending' | 'generating' | 'completed' | 'error';
1010
+ error?: AIError;
1011
+ storyNarrative?: string;
1012
+ currentFocus?: string;
1013
+ health?: ProjectHealth;
1014
+ sessionCount: number;
1015
+ totalTokens: number;
1016
+ totalCost: number;
1017
+ dateRange: {
1018
+ first: string;
1019
+ last: string;
1020
+ };
1021
+ codeHotspots?: CodeHotspot[];
1022
+ primaryLanguages?: string[];
1023
+ filesCreated: number;
1024
+ filesEdited: number;
1025
+ milestones?: DevelopmentMilestone[];
1026
+ recentActivity?: {
1027
+ date: string;
1028
+ summary: string;
1029
+ }[];
1030
+ workflowPatterns?: WorkflowPattern[];
1031
+ activityPattern?: ActivityPattern;
1032
+ challenges?: RecurringChallenge[];
1033
+ errorPatterns?: {
1034
+ type: string;
1035
+ count: number;
1036
+ lastOccurred: string;
1037
+ }[];
1038
+ claudeEffectiveness?: ClaudeEffectiveness;
1039
+ topTools?: {
1040
+ name: string;
1041
+ count: number;
1042
+ }[];
1043
+ recommendations?: ProjectRecommendation[];
1044
+ quickStats?: {
1045
+ sessionsThisWeek: number;
1046
+ tokensThisWeek: number;
1047
+ filesChangedThisWeek: number;
1048
+ milestonesThisMonth: number;
1049
+ };
1050
+ }
1051
+ /** Summary view for project list */
1052
+ export interface ProjectIntelligenceSummary {
1053
+ projectPath: string;
1054
+ projectName: string;
1055
+ health: number;
1056
+ healthTrend: 'improving' | 'stable' | 'declining';
1057
+ sessionCount: number;
1058
+ lastActive: string;
1059
+ currentFocus?: string;
1060
+ topChallenges: string[];
1061
+ topRecommendations: string[];
1062
+ hasFullIntelligence: boolean;
1063
+ }
1064
+ /** Global intelligence across all projects */
1065
+ export interface GlobalIntelligence {
1066
+ generatedAt: string;
1067
+ status: 'pending' | 'generating' | 'completed' | 'error';
1068
+ error?: AIError;
1069
+ developerProfile?: string;
1070
+ overallNarrative?: string;
1071
+ mostActiveProjects: {
1072
+ path: string;
1073
+ name: string;
1074
+ sessions: number;
1075
+ }[];
1076
+ projectComparison?: {
1077
+ healthiest: string;
1078
+ mostActive: string;
1079
+ needsAttention: string;
1080
+ };
1081
+ workingPatterns?: {
1082
+ mostProductiveDay: string;
1083
+ mostProductiveHour: number;
1084
+ averageSessionDuration: number;
1085
+ };
1086
+ skillProgression?: {
1087
+ skill: string;
1088
+ level: number;
1089
+ projects: string[];
1090
+ }[];
1091
+ areasOfExpertise?: string[];
1092
+ learningOpportunities?: string[];
1093
+ recommendations?: ProjectRecommendation[];
1094
+ }
1095
+ //# sourceMappingURL=types.d.ts.map