@sleekdesign/ccw25 0.0.1

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.
@@ -0,0 +1,970 @@
1
+ /**
2
+ * Configuration for generating Claude Code Wrapped summary
3
+ */
4
+ type ClaudeCodeWrappedConfig = {
5
+ /** Base directory for Claude data (default: ~/.claude) */
6
+ baseDir?: string;
7
+ /** Year to analyze (default: current year) */
8
+ year?: number;
9
+ /** Date range filter (overrides year if provided) */
10
+ dateRange?: {
11
+ from: Date;
12
+ to: Date;
13
+ };
14
+ /** Projects to include (default: all) */
15
+ projectFilter?: Array<string>;
16
+ /** Whether to use stats-cache.json for faster loading */
17
+ useStatsCache?: boolean;
18
+ };
19
+ /**
20
+ * Resolved configuration with all defaults applied
21
+ */
22
+ type ResolvedConfig = {
23
+ baseDir: string;
24
+ year: number;
25
+ dateRange: {
26
+ from: Date;
27
+ to: Date;
28
+ };
29
+ projectFilter: Array<string> | null;
30
+ useStatsCache: boolean;
31
+ };
32
+ /**
33
+ * Result returned from wrapped summary generation
34
+ */
35
+ type WrappedResult<T> = {
36
+ summary: T;
37
+ warnings: Array<WrappedWarning>;
38
+ errors: Array<WrappedError>;
39
+ stats: ProcessingStats;
40
+ };
41
+ type WrappedWarning = {
42
+ code: string;
43
+ message: string;
44
+ context?: Record<string, unknown>;
45
+ };
46
+ type WrappedError = {
47
+ code: string;
48
+ message: string;
49
+ fatal: boolean;
50
+ };
51
+ type ProcessingStats = {
52
+ filesProcessed: number;
53
+ filesSkipped: number;
54
+ entriesProcessed: number;
55
+ entriesSkipped: number;
56
+ processingTimeMs: number;
57
+ };
58
+
59
+ /**
60
+ * Computed metrics types for Claude Code Wrapped
61
+ * Organized into 7 tiers of insights
62
+ */
63
+ /**
64
+ * Tier 1: Core Statistics
65
+ * Fundamental usage metrics
66
+ */
67
+ type CoreMetrics = {
68
+ totalTokens: {
69
+ input: number;
70
+ output: number;
71
+ cacheCreation: number;
72
+ cacheRead: number;
73
+ total: number;
74
+ };
75
+ estimatedCost: {
76
+ total: number;
77
+ byCategory: {
78
+ input: number;
79
+ output: number;
80
+ cacheCreation: number;
81
+ cacheRead: number;
82
+ };
83
+ };
84
+ sessions: {
85
+ total: number;
86
+ averageMessages: number;
87
+ longestSession: {
88
+ id: string;
89
+ messageCount: number;
90
+ project: string;
91
+ date: Date;
92
+ } | null;
93
+ };
94
+ messages: {
95
+ total: number;
96
+ userMessages: number;
97
+ assistantMessages: number;
98
+ averagePerSession: number;
99
+ };
100
+ activity: {
101
+ daysActive: number;
102
+ totalDaysInPeriod: number;
103
+ longestStreak: number;
104
+ currentStreak: number;
105
+ firstActiveDay: Date | null;
106
+ lastActiveDay: Date | null;
107
+ };
108
+ };
109
+ /**
110
+ * Tier 2: Usage Patterns
111
+ * When and how you use Claude Code
112
+ */
113
+ type PatternMetrics = {
114
+ peakHour: {
115
+ hour: number;
116
+ messageCount: number;
117
+ };
118
+ peakDayOfWeek: {
119
+ day: number;
120
+ dayName: string;
121
+ messageCount: number;
122
+ };
123
+ busiestMonth: {
124
+ month: number;
125
+ monthName: string;
126
+ messageCount: number;
127
+ };
128
+ hourlyDistribution: Array<{
129
+ hour: number;
130
+ count: number;
131
+ }>;
132
+ weeklyDistribution: Array<{
133
+ day: number;
134
+ dayName: string;
135
+ count: number;
136
+ }>;
137
+ monthlyDistribution: Array<{
138
+ month: number;
139
+ monthName: string;
140
+ count: number;
141
+ }>;
142
+ };
143
+ /**
144
+ * Tier 3: Model Usage
145
+ * Which AI models you prefer
146
+ */
147
+ type ModelMetrics = {
148
+ modelsUsed: Array<{
149
+ model: string;
150
+ displayName: string;
151
+ messageCount: number;
152
+ tokenCount: number;
153
+ cost: number;
154
+ percentage: number;
155
+ }>;
156
+ favoriteModel: {
157
+ model: string;
158
+ displayName: string;
159
+ messageCount: number;
160
+ percentage: number;
161
+ } | null;
162
+ costByModel: Array<{
163
+ model: string;
164
+ displayName: string;
165
+ cost: number;
166
+ percentage: number;
167
+ }>;
168
+ };
169
+ /** Known Claude Code tool names */
170
+ type ClaudeCodeTool = "Read" | "Edit" | "Write" | "Bash" | "Glob" | "Grep" | "Task" | "TodoRead" | "TodoWrite" | "WebFetch" | "WebSearch" | "AskUserQuestion" | "ExitPlanMode" | "EnterPlanMode" | "NotebookEdit" | "Skill" | "KillShell" | "TaskOutput" | string;
171
+ /** Developer coding style profile */
172
+ type DeveloperStyle = "reader" | "writer" | "executor" | "researcher" | "planner" | "balanced";
173
+ /**
174
+ * Tier 4: Tool Usage (Developer DNA)
175
+ * Your coding assistant preferences
176
+ */
177
+ type ToolMetrics = {
178
+ toolCallsTotal: number;
179
+ toolDistribution: Array<{
180
+ tool: ClaudeCodeTool;
181
+ count: number;
182
+ percentage: number;
183
+ }>;
184
+ topTools: Array<{
185
+ tool: ClaudeCodeTool;
186
+ count: number;
187
+ rank: number;
188
+ }>;
189
+ subagentUsage: {
190
+ taskToolCalls: number;
191
+ subagentTypes: Array<{
192
+ type: string;
193
+ count: number;
194
+ }>;
195
+ };
196
+ mcpTools: Array<{
197
+ server: string;
198
+ tool: string;
199
+ count: number;
200
+ }>;
201
+ developerProfile: {
202
+ primaryStyle: DeveloperStyle;
203
+ styleBreakdown: {
204
+ reading: number;
205
+ writing: number;
206
+ executing: number;
207
+ researching: number;
208
+ planning: number;
209
+ };
210
+ description: string;
211
+ };
212
+ };
213
+ /**
214
+ * Tier 5: Project Insights
215
+ * Where you've been coding
216
+ */
217
+ type ProjectMetrics = {
218
+ projectsWorkedOn: number;
219
+ projects: Array<{
220
+ path: string;
221
+ displayName: string;
222
+ sessionCount: number;
223
+ messageCount: number;
224
+ tokenCount: number;
225
+ lastActive: Date;
226
+ }>;
227
+ topProject: {
228
+ path: string;
229
+ displayName: string;
230
+ sessionCount: number;
231
+ messageCount: number;
232
+ percentageOfTotal: number;
233
+ } | null;
234
+ gitBranches: {
235
+ total: number;
236
+ branches: Array<{
237
+ name: string;
238
+ projectPath: string;
239
+ messageCount: number;
240
+ }>;
241
+ };
242
+ };
243
+ /**
244
+ * Tier 6: AI Collaboration Style
245
+ * How you work with Claude
246
+ */
247
+ type CollaborationMetrics = {
248
+ cacheEfficiency: {
249
+ cacheHitRate: number;
250
+ cacheCreationRate: number;
251
+ estimatedSavings: number;
252
+ };
253
+ extendedThinking: {
254
+ messagesWithThinking: number;
255
+ percentageOfTotal: number;
256
+ };
257
+ interactivity: {
258
+ questionsAsked: number;
259
+ plansCreated: number;
260
+ todoItemsCreated: number;
261
+ };
262
+ serviceTier: {
263
+ standardRequests: number;
264
+ priorityRequests: number;
265
+ priorityPercentage: number;
266
+ };
267
+ };
268
+ /**
269
+ * Tier 7: Fun Statistics
270
+ * Interesting tidbits about your usage
271
+ */
272
+ type FunMetrics = {
273
+ charactersGenerated: number;
274
+ wordsGenerated: number;
275
+ equivalentPages: number;
276
+ summaryWordCloud: Array<{
277
+ word: string;
278
+ count: number;
279
+ }>;
280
+ longestResponse: {
281
+ characterCount: number;
282
+ date: Date;
283
+ sessionId: string;
284
+ } | null;
285
+ mostActiveDay: {
286
+ date: Date;
287
+ messageCount: number;
288
+ tokensUsed: number;
289
+ } | null;
290
+ milestones: Array<{
291
+ type: string;
292
+ date: Date;
293
+ description: string;
294
+ }>;
295
+ versions: Array<{
296
+ version: string;
297
+ messageCount: number;
298
+ firstSeen: Date;
299
+ }>;
300
+ };
301
+ /**
302
+ * Complete Claude Code Wrapped Summary
303
+ * Contains all 7 tiers of metrics
304
+ */
305
+ type ClaudeCodeWrappedSummary = {
306
+ generatedAt: Date;
307
+ period: {
308
+ from: Date;
309
+ to: Date;
310
+ year: number;
311
+ };
312
+ core: CoreMetrics;
313
+ patterns: PatternMetrics;
314
+ models: ModelMetrics;
315
+ tools: ToolMetrics;
316
+ projects: ProjectMetrics;
317
+ collaboration: CollaborationMetrics;
318
+ fun: FunMetrics;
319
+ };
320
+
321
+ /**
322
+ * Types for Claude Code JSONL log entries
323
+ */
324
+ /** Base fields present on all JSONL entries */
325
+ type BaseJSONLEntry = {
326
+ timestamp: string;
327
+ sessionId: string;
328
+ uuid?: string;
329
+ };
330
+ /** Token usage structure from assistant messages */
331
+ type TokenUsage = {
332
+ input_tokens: number;
333
+ output_tokens: number;
334
+ cache_creation_input_tokens?: number;
335
+ cache_read_input_tokens?: number;
336
+ cache_creation?: {
337
+ ephemeral_5m_input_tokens?: number;
338
+ ephemeral_1h_input_tokens?: number;
339
+ };
340
+ service_tier?: "standard" | "priority";
341
+ };
342
+ /** Tool use content block */
343
+ type ToolUseContent = {
344
+ type: "tool_use";
345
+ id: string;
346
+ name: string;
347
+ input: Record<string, unknown>;
348
+ };
349
+ /** Text content block */
350
+ type TextContent = {
351
+ type: "text";
352
+ text: string;
353
+ };
354
+ /** Thinking content block */
355
+ type ThinkingContent = {
356
+ type: "thinking";
357
+ thinking: string;
358
+ signature?: string;
359
+ };
360
+ /** Content block union */
361
+ type ContentBlock = ToolUseContent | TextContent | ThinkingContent;
362
+ /** User message entry */
363
+ type UserMessageEntry = BaseJSONLEntry & {
364
+ type: "user";
365
+ message: {
366
+ role: "user";
367
+ content: string;
368
+ };
369
+ version?: string;
370
+ gitBranch?: string;
371
+ cwd?: string;
372
+ parentUuid?: string | null;
373
+ isSidechain?: boolean;
374
+ userType?: string;
375
+ };
376
+ /** Assistant message entry */
377
+ type AssistantMessageEntry = BaseJSONLEntry & {
378
+ type: "assistant";
379
+ message: {
380
+ model: string;
381
+ id?: string;
382
+ type?: "message";
383
+ role: "assistant";
384
+ content: Array<ContentBlock>;
385
+ stop_reason?: string | null;
386
+ stop_sequence?: string | null;
387
+ usage: TokenUsage;
388
+ };
389
+ requestId?: string;
390
+ parentUuid?: string;
391
+ version?: string;
392
+ gitBranch?: string;
393
+ cwd?: string;
394
+ slug?: string;
395
+ };
396
+ /** Session summary entry */
397
+ type SummaryEntry = BaseJSONLEntry & {
398
+ type: "summary";
399
+ summary: string;
400
+ leafUuid?: string;
401
+ };
402
+ /** File history snapshot entry */
403
+ type FileHistoryEntry = BaseJSONLEntry & {
404
+ type: "file-history-snapshot";
405
+ messageId?: string;
406
+ snapshot?: {
407
+ messageId: string;
408
+ trackedFileBackups: Record<string, unknown>;
409
+ timestamp: string;
410
+ };
411
+ isSnapshotUpdate?: boolean;
412
+ };
413
+ /** Union of all JSONL entry types */
414
+ type JSONLEntry = UserMessageEntry | AssistantMessageEntry | SummaryEntry | FileHistoryEntry;
415
+ /** Stats cache daily activity entry */
416
+ type StatsCacheDailyActivity = {
417
+ date: string;
418
+ messageCount: number;
419
+ sessionCount: number;
420
+ toolCallCount: number;
421
+ };
422
+ /** Stats cache structure */
423
+ type StatsCache = {
424
+ version: number;
425
+ lastComputedDate: string;
426
+ dailyActivity: Array<StatsCacheDailyActivity>;
427
+ };
428
+ /** Session data with parsed entries */
429
+ type SessionData = {
430
+ sessionId: string;
431
+ projectPath: string;
432
+ filePath: string;
433
+ entries: Array<JSONLEntry>;
434
+ };
435
+
436
+ /**
437
+ * Async iterator for Claude Code sessions
438
+ */
439
+
440
+ /**
441
+ * Options for session iteration
442
+ */
443
+ type SessionIteratorOptions = {
444
+ baseDir?: string;
445
+ dateRange?: {
446
+ from: Date;
447
+ to: Date;
448
+ };
449
+ projectFilter?: Array<string> | null;
450
+ };
451
+ /**
452
+ * Session metadata without entries (for lightweight enumeration)
453
+ */
454
+ type SessionMetadata = {
455
+ sessionId: string;
456
+ projectPath: string;
457
+ projectDisplayName: string;
458
+ filePath: string;
459
+ };
460
+ /**
461
+ * Enumerate all sessions without loading content
462
+ */
463
+ declare function enumerateSessions(options?: SessionIteratorOptions): Array<SessionMetadata>;
464
+ /**
465
+ * Load a single session's entries
466
+ */
467
+ declare function loadSession(metadata: SessionMetadata): Promise<SessionData>;
468
+ /**
469
+ * Async generator that yields sessions with their entries
470
+ */
471
+ declare function iterateSessions(options?: SessionIteratorOptions): AsyncGenerator<SessionData>;
472
+ /**
473
+ * Load all sessions at once (convenience function)
474
+ */
475
+ declare function loadAllSessions(options?: SessionIteratorOptions): Promise<Array<SessionData>>;
476
+ /**
477
+ * Collect all entries from all sessions
478
+ */
479
+ declare function collectAllEntries(options?: SessionIteratorOptions): Promise<{
480
+ entries: Array<JSONLEntry & {
481
+ sessionId: string;
482
+ projectPath: string;
483
+ }>;
484
+ sessionCount: number;
485
+ }>;
486
+
487
+ /**
488
+ * JSONL stream parser for Claude Code session files
489
+ */
490
+
491
+ /**
492
+ * Parse result for a single line
493
+ */
494
+ type ParseResult = {
495
+ success: true;
496
+ entry: JSONLEntry;
497
+ } | {
498
+ success: false;
499
+ error: string;
500
+ line: number;
501
+ };
502
+ /**
503
+ * Parse a single JSONL line
504
+ */
505
+ declare function parseLine(line: string, lineNumber: number): ParseResult;
506
+ /**
507
+ * Parsing statistics
508
+ */
509
+ type ParseStats = {
510
+ totalLines: number;
511
+ successfulLines: number;
512
+ failedLines: number;
513
+ errors: Array<{
514
+ line: number;
515
+ error: string;
516
+ }>;
517
+ };
518
+ /**
519
+ * Parse a JSONL file and yield entries
520
+ */
521
+ declare function parseJSONLFile(filePath: string): AsyncGenerator<JSONLEntry, ParseStats>;
522
+ /**
523
+ * Parse a JSONL file and return all entries at once
524
+ */
525
+ declare function parseJSONLFileAll(filePath: string): Promise<{
526
+ entries: Array<JSONLEntry>;
527
+ stats: ParseStats;
528
+ }>;
529
+
530
+ /**
531
+ * Claude data directory detection and path utilities
532
+ */
533
+ /**
534
+ * Detected Claude paths
535
+ */
536
+ type ClaudePaths = {
537
+ baseDir: string;
538
+ projectsDir: string;
539
+ historyFile: string;
540
+ statsCacheFile: string;
541
+ exists: boolean;
542
+ };
543
+ /**
544
+ * Detect Claude data directory
545
+ * Checks CLAUDE_CONFIG_DIR env var first, then falls back to ~/.claude
546
+ */
547
+ declare function detectClaudeDir(): string;
548
+ /**
549
+ * Get all Claude paths
550
+ */
551
+ declare function getClaudePaths(baseDir?: string): ClaudePaths;
552
+ /**
553
+ * Project directory info
554
+ */
555
+ type ProjectInfo = {
556
+ path: string;
557
+ displayName: string;
558
+ dirName: string;
559
+ sessionFiles: Array<string>;
560
+ };
561
+ /**
562
+ * Parse project name from directory path
563
+ * Converts encoded path like "-Users-stefanofa-Projects-reweb-sleek" to "sleek"
564
+ */
565
+ declare function parseProjectName(dirName: string): string;
566
+ /**
567
+ * Discover all project directories
568
+ */
569
+ declare function discoverProjects(projectsDir: string): Array<ProjectInfo>;
570
+ /**
571
+ * Discover all JSONL session files in a project directory
572
+ */
573
+ declare function discoverSessionFiles(projectPath: string): Array<string>;
574
+ /**
575
+ * Extract session ID from file path
576
+ */
577
+ declare function extractSessionId(filePath: string): string;
578
+ /**
579
+ * Extract project path from session file path
580
+ */
581
+ declare function extractProjectPath(filePath: string): string;
582
+ /**
583
+ * Get file modification time
584
+ */
585
+ declare function getFileModTime(filePath: string): Date | null;
586
+ /**
587
+ * Filter files by date range based on modification time
588
+ */
589
+ declare function filterFilesByDate(files: Array<string>, from: Date, to: Date): Array<string>;
590
+
591
+ /**
592
+ * Data loading for Claude Code Wrapped
593
+ */
594
+
595
+ /**
596
+ * Loaded Claude data ready for analysis
597
+ */
598
+ type LoadedData = {
599
+ sessions: Array<SessionData>;
600
+ entries: Array<JSONLEntry & {
601
+ sessionId: string;
602
+ projectPath: string;
603
+ }>;
604
+ statsCache: StatsCache | null;
605
+ config: ResolvedConfig;
606
+ };
607
+ /**
608
+ * Load all Claude data based on configuration
609
+ */
610
+ declare function loadClaudeData(config: ResolvedConfig): Promise<LoadedData>;
611
+ /**
612
+ * Resolve configuration with defaults
613
+ */
614
+ declare function resolveConfig(config?: Partial<ResolvedConfig>): ResolvedConfig;
615
+
616
+ type index$3_ClaudePaths = ClaudePaths;
617
+ type index$3_LoadedData = LoadedData;
618
+ type index$3_ParseResult = ParseResult;
619
+ type index$3_ParseStats = ParseStats;
620
+ type index$3_ProjectInfo = ProjectInfo;
621
+ type index$3_SessionIteratorOptions = SessionIteratorOptions;
622
+ type index$3_SessionMetadata = SessionMetadata;
623
+ declare const index$3_collectAllEntries: typeof collectAllEntries;
624
+ declare const index$3_detectClaudeDir: typeof detectClaudeDir;
625
+ declare const index$3_discoverProjects: typeof discoverProjects;
626
+ declare const index$3_discoverSessionFiles: typeof discoverSessionFiles;
627
+ declare const index$3_enumerateSessions: typeof enumerateSessions;
628
+ declare const index$3_extractProjectPath: typeof extractProjectPath;
629
+ declare const index$3_extractSessionId: typeof extractSessionId;
630
+ declare const index$3_filterFilesByDate: typeof filterFilesByDate;
631
+ declare const index$3_getClaudePaths: typeof getClaudePaths;
632
+ declare const index$3_getFileModTime: typeof getFileModTime;
633
+ declare const index$3_iterateSessions: typeof iterateSessions;
634
+ declare const index$3_loadAllSessions: typeof loadAllSessions;
635
+ declare const index$3_loadClaudeData: typeof loadClaudeData;
636
+ declare const index$3_loadSession: typeof loadSession;
637
+ declare const index$3_parseJSONLFile: typeof parseJSONLFile;
638
+ declare const index$3_parseJSONLFileAll: typeof parseJSONLFileAll;
639
+ declare const index$3_parseLine: typeof parseLine;
640
+ declare const index$3_parseProjectName: typeof parseProjectName;
641
+ declare const index$3_resolveConfig: typeof resolveConfig;
642
+ declare namespace index$3 {
643
+ export { type index$3_ClaudePaths as ClaudePaths, type index$3_LoadedData as LoadedData, type index$3_ParseResult as ParseResult, type index$3_ParseStats as ParseStats, type index$3_ProjectInfo as ProjectInfo, type index$3_SessionIteratorOptions as SessionIteratorOptions, type index$3_SessionMetadata as SessionMetadata, index$3_collectAllEntries as collectAllEntries, index$3_detectClaudeDir as detectClaudeDir, index$3_discoverProjects as discoverProjects, index$3_discoverSessionFiles as discoverSessionFiles, index$3_enumerateSessions as enumerateSessions, index$3_extractProjectPath as extractProjectPath, index$3_extractSessionId as extractSessionId, index$3_filterFilesByDate as filterFilesByDate, index$3_getClaudePaths as getClaudePaths, index$3_getFileModTime as getFileModTime, index$3_iterateSessions as iterateSessions, index$3_loadAllSessions as loadAllSessions, index$3_loadClaudeData as loadClaudeData, index$3_loadSession as loadSession, index$3_parseJSONLFile as parseJSONLFile, index$3_parseJSONLFileAll as parseJSONLFileAll, index$3_parseLine as parseLine, index$3_parseProjectName as parseProjectName, index$3_resolveConfig as resolveConfig };
644
+ }
645
+
646
+ /**
647
+ * Tier 6: AI Collaboration Style
648
+ * How you work with Claude
649
+ */
650
+
651
+ /**
652
+ * Calculate collaboration metrics from entries
653
+ */
654
+ declare function calculateCollaborationMetrics(entries: Array<JSONLEntry>): CollaborationMetrics;
655
+
656
+ /**
657
+ * Claude model pricing data
658
+ * Prices are per 1 million tokens
659
+ */
660
+ type ModelPricing = {
661
+ input: number;
662
+ output: number;
663
+ cacheWrite: number;
664
+ cacheRead: number;
665
+ };
666
+ /**
667
+ * Pricing data for known Claude models
668
+ * Updated as of December 2025
669
+ */
670
+ declare const MODEL_PRICING: Record<string, ModelPricing>;
671
+ /**
672
+ * Default pricing for unknown models (uses Sonnet pricing as reasonable middle)
673
+ */
674
+ declare const DEFAULT_PRICING: ModelPricing;
675
+ /**
676
+ * Get pricing for a model
677
+ */
678
+ declare function getModelPricing(model: string): ModelPricing;
679
+ /**
680
+ * Get display name for a model
681
+ */
682
+ declare function getModelDisplayName(model: string): string;
683
+
684
+ /**
685
+ * Cost calculation for Claude Code usage
686
+ */
687
+
688
+ /**
689
+ * Cost breakdown by token type
690
+ */
691
+ type CostBreakdown = {
692
+ input: number;
693
+ output: number;
694
+ cacheCreation: number;
695
+ cacheRead: number;
696
+ total: number;
697
+ };
698
+ /**
699
+ * Calculate cost for token usage
700
+ */
701
+ declare function calculateCost(model: string, usage: TokenUsage): CostBreakdown;
702
+ /**
703
+ * Calculate total tokens from usage
704
+ */
705
+ declare function calculateTotalTokens(usage: TokenUsage): number;
706
+ /**
707
+ * Aggregate costs from multiple usages
708
+ */
709
+ declare function aggregateCosts(costs: Array<CostBreakdown>): CostBreakdown;
710
+ /**
711
+ * Estimate cache savings (what you would have paid without cache)
712
+ */
713
+ declare function estimateCacheSavings(model: string, cacheReadTokens: number): number;
714
+
715
+ type index$2_CostBreakdown = CostBreakdown;
716
+ declare const index$2_DEFAULT_PRICING: typeof DEFAULT_PRICING;
717
+ declare const index$2_MODEL_PRICING: typeof MODEL_PRICING;
718
+ type index$2_ModelPricing = ModelPricing;
719
+ declare const index$2_aggregateCosts: typeof aggregateCosts;
720
+ declare const index$2_calculateCost: typeof calculateCost;
721
+ declare const index$2_calculateTotalTokens: typeof calculateTotalTokens;
722
+ declare const index$2_estimateCacheSavings: typeof estimateCacheSavings;
723
+ declare const index$2_getModelDisplayName: typeof getModelDisplayName;
724
+ declare const index$2_getModelPricing: typeof getModelPricing;
725
+ declare namespace index$2 {
726
+ export { type index$2_CostBreakdown as CostBreakdown, index$2_DEFAULT_PRICING as DEFAULT_PRICING, index$2_MODEL_PRICING as MODEL_PRICING, type index$2_ModelPricing as ModelPricing, index$2_aggregateCosts as aggregateCosts, index$2_calculateCost as calculateCost, index$2_calculateTotalTokens as calculateTotalTokens, index$2_estimateCacheSavings as estimateCacheSavings, index$2_getModelDisplayName as getModelDisplayName, index$2_getModelPricing as getModelPricing };
727
+ }
728
+
729
+ /**
730
+ * Tier 1: Core Statistics
731
+ * Fundamental usage metrics
732
+ */
733
+
734
+ /**
735
+ * Calculate core metrics from entries
736
+ */
737
+ declare function calculateCoreMetrics(entries: Array<JSONLEntry & {
738
+ sessionId: string;
739
+ projectPath: string;
740
+ }>, dateRange: {
741
+ from: Date;
742
+ to: Date;
743
+ }): CoreMetrics;
744
+
745
+ /**
746
+ * Tier 7: Fun Statistics
747
+ * Interesting tidbits about your usage
748
+ */
749
+
750
+ /**
751
+ * Calculate fun metrics from entries
752
+ */
753
+ declare function calculateFunMetrics(entries: Array<JSONLEntry & {
754
+ sessionId: string;
755
+ }>): FunMetrics;
756
+
757
+ /**
758
+ * Tier 3: Model Usage
759
+ * Which AI models you prefer
760
+ */
761
+
762
+ /**
763
+ * Calculate model metrics from entries
764
+ */
765
+ declare function calculateModelMetrics(entries: Array<JSONLEntry>): ModelMetrics;
766
+
767
+ /**
768
+ * Tier 2: Usage Patterns
769
+ * When and how you use Claude Code
770
+ */
771
+
772
+ /**
773
+ * Calculate pattern metrics from entries
774
+ */
775
+ declare function calculatePatternMetrics(entries: Array<JSONLEntry>): PatternMetrics;
776
+
777
+ /**
778
+ * Tier 5: Project Insights
779
+ * Where you've been coding
780
+ */
781
+
782
+ /**
783
+ * Calculate project metrics from entries
784
+ */
785
+ declare function calculateProjectMetrics(entries: Array<JSONLEntry & {
786
+ sessionId: string;
787
+ projectPath: string;
788
+ }>): ProjectMetrics;
789
+
790
+ /**
791
+ * Tier 4: Tool Usage (Developer DNA)
792
+ * Your coding assistant preferences
793
+ */
794
+
795
+ /**
796
+ * Calculate tool metrics from entries
797
+ */
798
+ declare function calculateToolMetrics(entries: Array<JSONLEntry>): ToolMetrics;
799
+
800
+ /**
801
+ * Metrics calculation for Claude Code Wrapped
802
+ */
803
+
804
+ /**
805
+ * Calculate all metrics from entries
806
+ */
807
+ declare function calculateAllMetrics(entries: Array<JSONLEntry & {
808
+ sessionId: string;
809
+ projectPath: string;
810
+ }>, dateRange: {
811
+ from: Date;
812
+ to: Date;
813
+ }): ClaudeCodeWrappedSummary;
814
+
815
+ declare const index$1_calculateAllMetrics: typeof calculateAllMetrics;
816
+ declare const index$1_calculateCollaborationMetrics: typeof calculateCollaborationMetrics;
817
+ declare const index$1_calculateCoreMetrics: typeof calculateCoreMetrics;
818
+ declare const index$1_calculateFunMetrics: typeof calculateFunMetrics;
819
+ declare const index$1_calculateModelMetrics: typeof calculateModelMetrics;
820
+ declare const index$1_calculatePatternMetrics: typeof calculatePatternMetrics;
821
+ declare const index$1_calculateProjectMetrics: typeof calculateProjectMetrics;
822
+ declare const index$1_calculateToolMetrics: typeof calculateToolMetrics;
823
+ declare namespace index$1 {
824
+ export { index$1_calculateAllMetrics as calculateAllMetrics, index$1_calculateCollaborationMetrics as calculateCollaborationMetrics, index$1_calculateCoreMetrics as calculateCoreMetrics, index$1_calculateFunMetrics as calculateFunMetrics, index$1_calculateModelMetrics as calculateModelMetrics, index$1_calculatePatternMetrics as calculatePatternMetrics, index$1_calculateProjectMetrics as calculateProjectMetrics, index$1_calculateToolMetrics as calculateToolMetrics };
825
+ }
826
+
827
+ /**
828
+ * JSON export for Claude Code Wrapped
829
+ */
830
+
831
+ /**
832
+ * Export metadata
833
+ */
834
+ type ExportMetadata = {
835
+ version: string;
836
+ generatedAt: string;
837
+ generator: string;
838
+ };
839
+ /**
840
+ * Full export structure
841
+ */
842
+ type WrappedExport = {
843
+ metadata: ExportMetadata;
844
+ summary: ClaudeCodeWrappedSummary;
845
+ };
846
+ /**
847
+ * Export summary as JSON
848
+ */
849
+ declare function exportAsJSON(summary: ClaudeCodeWrappedSummary): string;
850
+ /**
851
+ * Export summary as compact JSON (no formatting)
852
+ */
853
+ declare function exportAsCompactJSON(summary: ClaudeCodeWrappedSummary): string;
854
+ /**
855
+ * Export a single tier as JSON
856
+ */
857
+ declare function exportTierAsJSON<K extends keyof ClaudeCodeWrappedSummary>(summary: ClaudeCodeWrappedSummary, tier: K): string;
858
+
859
+ /**
860
+ * Wrapped-style text templates for display
861
+ */
862
+
863
+ /**
864
+ * Wrapped text templates
865
+ */
866
+ declare const templates: {
867
+ /**
868
+ * Main headline
869
+ */
870
+ headline: (summary: ClaudeCodeWrappedSummary) => string;
871
+ /**
872
+ * Token statistics
873
+ */
874
+ tokenStats: (summary: ClaudeCodeWrappedSummary) => string;
875
+ /**
876
+ * Cost summary
877
+ */
878
+ costSummary: (summary: ClaudeCodeWrappedSummary) => string;
879
+ /**
880
+ * Favorite model
881
+ */
882
+ favoriteModel: (summary: ClaudeCodeWrappedSummary) => string;
883
+ /**
884
+ * Developer profile
885
+ */
886
+ developerProfile: (summary: ClaudeCodeWrappedSummary) => string;
887
+ /**
888
+ * Top tool
889
+ */
890
+ topTool: (summary: ClaudeCodeWrappedSummary) => string;
891
+ /**
892
+ * Activity streak
893
+ */
894
+ activityStreak: (summary: ClaudeCodeWrappedSummary) => string;
895
+ /**
896
+ * Peak hour
897
+ */
898
+ peakHour: (summary: ClaudeCodeWrappedSummary) => string;
899
+ /**
900
+ * Busiest day
901
+ */
902
+ busiestDay: (summary: ClaudeCodeWrappedSummary) => string;
903
+ /**
904
+ * Top project
905
+ */
906
+ topProject: (summary: ClaudeCodeWrappedSummary) => string;
907
+ /**
908
+ * Cache efficiency
909
+ */
910
+ cacheEfficiency: (summary: ClaudeCodeWrappedSummary) => string;
911
+ /**
912
+ * Words generated
913
+ */
914
+ wordsGenerated: (summary: ClaudeCodeWrappedSummary) => string;
915
+ /**
916
+ * Most active day
917
+ */
918
+ mostActiveDay: (summary: ClaudeCodeWrappedSummary) => string;
919
+ };
920
+ /**
921
+ * Generate a full wrapped summary text
922
+ */
923
+ declare function generateWrappedText(summary: ClaudeCodeWrappedSummary): string;
924
+ /**
925
+ * Generate a short summary (for sharing)
926
+ */
927
+ declare function generateShortSummary(summary: ClaudeCodeWrappedSummary): string;
928
+
929
+ /**
930
+ * Output formatting for Claude Code Wrapped
931
+ */
932
+
933
+ type index_ExportMetadata = ExportMetadata;
934
+ type index_WrappedExport = WrappedExport;
935
+ declare const index_exportAsCompactJSON: typeof exportAsCompactJSON;
936
+ declare const index_exportAsJSON: typeof exportAsJSON;
937
+ declare const index_exportTierAsJSON: typeof exportTierAsJSON;
938
+ declare const index_generateShortSummary: typeof generateShortSummary;
939
+ declare const index_generateWrappedText: typeof generateWrappedText;
940
+ declare const index_templates: typeof templates;
941
+ declare namespace index {
942
+ export { type index_ExportMetadata as ExportMetadata, type index_WrappedExport as WrappedExport, index_exportAsCompactJSON as exportAsCompactJSON, index_exportAsJSON as exportAsJSON, index_exportTierAsJSON as exportTierAsJSON, index_generateShortSummary as generateShortSummary, index_generateWrappedText as generateWrappedText, index_templates as templates };
943
+ }
944
+
945
+ /**
946
+ * Claude Code Wrapped
947
+ *
948
+ * Generate Spotify Wrapped-style annual summaries of your Claude Code usage.
949
+ *
950
+ * @example
951
+ * ```typescript
952
+ * import { generateWrappedSummary } from "claude-code-wrapped";
953
+ *
954
+ * const result = await generateWrappedSummary({ year: 2025 });
955
+ *
956
+ * console.log(`Sessions: ${result.summary.core.sessions.total}`);
957
+ * console.log(`Cost: $${result.summary.core.estimatedCost.total.toFixed(2)}`);
958
+ * console.log(`Style: ${result.summary.tools.developerProfile.primaryStyle}`);
959
+ * ```
960
+ */
961
+
962
+ /**
963
+ * Generate a complete Claude Code Wrapped summary
964
+ *
965
+ * @param config - Configuration options
966
+ * @returns Wrapped result containing summary, warnings, and stats
967
+ */
968
+ declare function generateWrappedSummary(config?: ClaudeCodeWrappedConfig): Promise<WrappedResult<ClaudeCodeWrappedSummary>>;
969
+
970
+ export { type ClaudeCodeWrappedConfig, type ClaudeCodeWrappedSummary, type ProcessingStats, type ResolvedConfig, type WrappedError, type WrappedResult, type WrappedWarning, exportAsCompactJSON, exportAsJSON, generateShortSummary, generateWrappedSummary, generateWrappedText, index$3 as loader, index$1 as metrics, index as output, index$2 as pricing, templates };