agentfit 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 (107) hide show
  1. package/.claude/settings.local.json +26 -0
  2. package/.prettierignore +7 -0
  3. package/.prettierrc +11 -0
  4. package/CONTRIBUTING.md +209 -0
  5. package/LICENSE +21 -0
  6. package/README.md +109 -0
  7. package/app/(dashboard)/coach/page.tsx +11 -0
  8. package/app/(dashboard)/commands/page.tsx +7 -0
  9. package/app/(dashboard)/community/[slug]/page.tsx +23 -0
  10. package/app/(dashboard)/community/page.tsx +71 -0
  11. package/app/(dashboard)/daily/page.tsx +19 -0
  12. package/app/(dashboard)/images/page.tsx +5 -0
  13. package/app/(dashboard)/layout.tsx +12 -0
  14. package/app/(dashboard)/page.tsx +23 -0
  15. package/app/(dashboard)/personality/page.tsx +11 -0
  16. package/app/(dashboard)/projects/page.tsx +11 -0
  17. package/app/(dashboard)/sessions/page.tsx +11 -0
  18. package/app/(dashboard)/tokens/page.tsx +11 -0
  19. package/app/(dashboard)/tools/page.tsx +11 -0
  20. package/app/api/check/route.ts +13 -0
  21. package/app/api/commands/route.ts +16 -0
  22. package/app/api/images/[...path]/route.ts +33 -0
  23. package/app/api/images-analysis/route.ts +177 -0
  24. package/app/api/sync/route.ts +14 -0
  25. package/app/api/usage/route.ts +117 -0
  26. package/app/favicon.ico +0 -0
  27. package/app/globals.css +144 -0
  28. package/app/icon.svg +3 -0
  29. package/app/layout.tsx +35 -0
  30. package/bin/agentfit.mjs +69 -0
  31. package/components/.gitkeep +0 -0
  32. package/components/agent-coach.tsx +248 -0
  33. package/components/app-sidebar.tsx +161 -0
  34. package/components/command-usage.tsx +294 -0
  35. package/components/daily-chart.tsx +118 -0
  36. package/components/daily-table.tsx +115 -0
  37. package/components/dashboard-shell.tsx +149 -0
  38. package/components/data-provider.tsx +213 -0
  39. package/components/fitness-score.tsx +95 -0
  40. package/components/overview-cards.tsx +198 -0
  41. package/components/pagination-controls.tsx +104 -0
  42. package/components/personality-fit.tsx +446 -0
  43. package/components/projects-table.tsx +70 -0
  44. package/components/screenshots-analysis.tsx +359 -0
  45. package/components/sessions-table.tsx +97 -0
  46. package/components/theme-provider.tsx +71 -0
  47. package/components/token-breakdown.tsx +179 -0
  48. package/components/tool-usage-chart.tsx +63 -0
  49. package/components/ui/badge.tsx +52 -0
  50. package/components/ui/button.tsx +60 -0
  51. package/components/ui/card.tsx +103 -0
  52. package/components/ui/chart.tsx +373 -0
  53. package/components/ui/dialog.tsx +160 -0
  54. package/components/ui/input.tsx +20 -0
  55. package/components/ui/scroll-area.tsx +55 -0
  56. package/components/ui/select.tsx +201 -0
  57. package/components/ui/separator.tsx +25 -0
  58. package/components/ui/sheet.tsx +138 -0
  59. package/components/ui/sidebar.tsx +723 -0
  60. package/components/ui/skeleton.tsx +13 -0
  61. package/components/ui/table.tsx +116 -0
  62. package/components/ui/tabs.tsx +82 -0
  63. package/components/ui/tooltip.tsx +66 -0
  64. package/components.json +25 -0
  65. package/generated/prisma/browser.ts +34 -0
  66. package/generated/prisma/client.ts +58 -0
  67. package/generated/prisma/commonInputTypes.ts +237 -0
  68. package/generated/prisma/enums.ts +15 -0
  69. package/generated/prisma/internal/class.ts +224 -0
  70. package/generated/prisma/internal/prismaNamespace.ts +920 -0
  71. package/generated/prisma/internal/prismaNamespaceBrowser.ts +130 -0
  72. package/generated/prisma/models/Image.ts +1310 -0
  73. package/generated/prisma/models/Session.ts +1695 -0
  74. package/generated/prisma/models/SyncLog.ts +1203 -0
  75. package/generated/prisma/models.ts +14 -0
  76. package/hooks/.gitkeep +0 -0
  77. package/hooks/use-mobile.ts +19 -0
  78. package/hooks/use-pagination.ts +60 -0
  79. package/lib/.gitkeep +0 -0
  80. package/lib/coach.ts +425 -0
  81. package/lib/commands.ts +239 -0
  82. package/lib/db.ts +15 -0
  83. package/lib/format.ts +26 -0
  84. package/lib/parse-codex.ts +201 -0
  85. package/lib/parse-logs.ts +369 -0
  86. package/lib/personality.ts +481 -0
  87. package/lib/plugins.ts +107 -0
  88. package/lib/pricing.ts +112 -0
  89. package/lib/queries-codex.ts +130 -0
  90. package/lib/queries.ts +154 -0
  91. package/lib/resolve-icon.ts +12 -0
  92. package/lib/sync.ts +335 -0
  93. package/lib/utils.ts +6 -0
  94. package/next.config.mjs +4 -0
  95. package/package.json +73 -0
  96. package/plugins/cost-heatmap/component.test.tsx +52 -0
  97. package/plugins/cost-heatmap/component.tsx +227 -0
  98. package/plugins/cost-heatmap/manifest.ts +13 -0
  99. package/plugins/index.ts +18 -0
  100. package/prisma/migrations/20260328152517_init/migration.sql +41 -0
  101. package/prisma/migrations/20260328153801_add_image_model/migration.sql +18 -0
  102. package/prisma/migrations/migration_lock.toml +3 -0
  103. package/prisma/schema.prisma +57 -0
  104. package/prisma.config.ts +14 -0
  105. package/public/.gitkeep +0 -0
  106. package/public/logo.svg +3 -0
  107. package/setup.sh +73 -0
@@ -0,0 +1,130 @@
1
+
2
+ /* !!! This is code generated by Prisma. Do not edit directly. !!! */
3
+ /* eslint-disable */
4
+ // biome-ignore-all lint: generated file
5
+ // @ts-nocheck
6
+ /*
7
+ * WARNING: This is an internal file that is subject to change!
8
+ *
9
+ * 🛑 Under no circumstances should you import this file directly! 🛑
10
+ *
11
+ * All exports from this file are wrapped under a `Prisma` namespace object in the browser.ts file.
12
+ * While this enables partial backward compatibility, it is not part of the stable public API.
13
+ *
14
+ * If you are looking for your Models, Enums, and Input Types, please import them from the respective
15
+ * model files in the `model` directory!
16
+ */
17
+
18
+ import * as runtime from "@prisma/client/runtime/index-browser"
19
+
20
+ export type * from '../models'
21
+ export type * from './prismaNamespace'
22
+
23
+ export const Decimal = runtime.Decimal
24
+
25
+
26
+ export const NullTypes = {
27
+ DbNull: runtime.NullTypes.DbNull as (new (secret: never) => typeof runtime.DbNull),
28
+ JsonNull: runtime.NullTypes.JsonNull as (new (secret: never) => typeof runtime.JsonNull),
29
+ AnyNull: runtime.NullTypes.AnyNull as (new (secret: never) => typeof runtime.AnyNull),
30
+ }
31
+ /**
32
+ * Helper for filtering JSON entries that have `null` on the database (empty on the db)
33
+ *
34
+ * @see https://www.prisma.io/docs/concepts/components/prisma-client/working-with-fields/working-with-json-fields#filtering-on-a-json-field
35
+ */
36
+ export const DbNull = runtime.DbNull
37
+
38
+ /**
39
+ * Helper for filtering JSON entries that have JSON `null` values (not empty on the db)
40
+ *
41
+ * @see https://www.prisma.io/docs/concepts/components/prisma-client/working-with-fields/working-with-json-fields#filtering-on-a-json-field
42
+ */
43
+ export const JsonNull = runtime.JsonNull
44
+
45
+ /**
46
+ * Helper for filtering JSON entries that are `Prisma.DbNull` or `Prisma.JsonNull`
47
+ *
48
+ * @see https://www.prisma.io/docs/concepts/components/prisma-client/working-with-fields/working-with-json-fields#filtering-on-a-json-field
49
+ */
50
+ export const AnyNull = runtime.AnyNull
51
+
52
+
53
+ export const ModelName = {
54
+ Session: 'Session',
55
+ Image: 'Image',
56
+ SyncLog: 'SyncLog'
57
+ } as const
58
+
59
+ export type ModelName = (typeof ModelName)[keyof typeof ModelName]
60
+
61
+ /*
62
+ * Enums
63
+ */
64
+
65
+ export const TransactionIsolationLevel = runtime.makeStrictEnum({
66
+ Serializable: 'Serializable'
67
+ } as const)
68
+
69
+ export type TransactionIsolationLevel = (typeof TransactionIsolationLevel)[keyof typeof TransactionIsolationLevel]
70
+
71
+
72
+ export const SessionScalarFieldEnum = {
73
+ id: 'id',
74
+ sessionId: 'sessionId',
75
+ project: 'project',
76
+ projectPath: 'projectPath',
77
+ startTime: 'startTime',
78
+ endTime: 'endTime',
79
+ durationMinutes: 'durationMinutes',
80
+ userMessages: 'userMessages',
81
+ assistantMessages: 'assistantMessages',
82
+ totalMessages: 'totalMessages',
83
+ inputTokens: 'inputTokens',
84
+ outputTokens: 'outputTokens',
85
+ cacheCreationTokens: 'cacheCreationTokens',
86
+ cacheReadTokens: 'cacheReadTokens',
87
+ totalTokens: 'totalTokens',
88
+ costUSD: 'costUSD',
89
+ model: 'model',
90
+ toolCallsTotal: 'toolCallsTotal',
91
+ toolCallsJson: 'toolCallsJson',
92
+ createdAt: 'createdAt'
93
+ } as const
94
+
95
+ export type SessionScalarFieldEnum = (typeof SessionScalarFieldEnum)[keyof typeof SessionScalarFieldEnum]
96
+
97
+
98
+ export const ImageScalarFieldEnum = {
99
+ id: 'id',
100
+ sessionId: 'sessionId',
101
+ messageId: 'messageId',
102
+ filename: 'filename',
103
+ mediaType: 'mediaType',
104
+ sizeBytes: 'sizeBytes',
105
+ timestamp: 'timestamp',
106
+ role: 'role',
107
+ createdAt: 'createdAt'
108
+ } as const
109
+
110
+ export type ImageScalarFieldEnum = (typeof ImageScalarFieldEnum)[keyof typeof ImageScalarFieldEnum]
111
+
112
+
113
+ export const SyncLogScalarFieldEnum = {
114
+ id: 'id',
115
+ syncedAt: 'syncedAt',
116
+ filesProcessed: 'filesProcessed',
117
+ sessionsAdded: 'sessionsAdded',
118
+ sessionsSkipped: 'sessionsSkipped'
119
+ } as const
120
+
121
+ export type SyncLogScalarFieldEnum = (typeof SyncLogScalarFieldEnum)[keyof typeof SyncLogScalarFieldEnum]
122
+
123
+
124
+ export const SortOrder = {
125
+ asc: 'asc',
126
+ desc: 'desc'
127
+ } as const
128
+
129
+ export type SortOrder = (typeof SortOrder)[keyof typeof SortOrder]
130
+