@ai-studio-3d/vyasa 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 (237) hide show
  1. package/README.md +69 -0
  2. package/data/common-kit.json +34 -0
  3. package/data/pricing.json +119 -0
  4. package/data/schema/AnalyticsData.json +214 -0
  5. package/data/schema/FoundationData.json +42 -0
  6. package/data/schema/KitData.json +321 -0
  7. package/data/schema/SearchData.json +173 -0
  8. package/data/schema/SessionDetailData.json +231 -0
  9. package/data/schema/SessionsListData.json +115 -0
  10. package/data/schema/WasteData.json +95 -0
  11. package/dist/cli.d.ts +3 -0
  12. package/dist/cli.d.ts.map +1 -0
  13. package/dist/cli.js +343 -0
  14. package/dist/cli.js.map +1 -0
  15. package/dist/core/billing/index.d.ts +4 -0
  16. package/dist/core/billing/index.d.ts.map +1 -0
  17. package/dist/core/billing/index.js +43 -0
  18. package/dist/core/billing/index.js.map +1 -0
  19. package/dist/core/budget/index.d.ts +30 -0
  20. package/dist/core/budget/index.d.ts.map +1 -0
  21. package/dist/core/budget/index.js +61 -0
  22. package/dist/core/budget/index.js.map +1 -0
  23. package/dist/core/codex/index.d.ts +3 -0
  24. package/dist/core/codex/index.d.ts.map +1 -0
  25. package/dist/core/codex/index.js +212 -0
  26. package/dist/core/codex/index.js.map +1 -0
  27. package/dist/core/cursor/index.d.ts +3 -0
  28. package/dist/core/cursor/index.d.ts.map +1 -0
  29. package/dist/core/cursor/index.js +304 -0
  30. package/dist/core/cursor/index.js.map +1 -0
  31. package/dist/core/cursor/scan.d.ts +28 -0
  32. package/dist/core/cursor/scan.d.ts.map +1 -0
  33. package/dist/core/cursor/scan.js +79 -0
  34. package/dist/core/cursor/scan.js.map +1 -0
  35. package/dist/core/decisions/index.d.ts +21 -0
  36. package/dist/core/decisions/index.d.ts.map +1 -0
  37. package/dist/core/decisions/index.js +133 -0
  38. package/dist/core/decisions/index.js.map +1 -0
  39. package/dist/core/dlp/index.d.ts +7 -0
  40. package/dist/core/dlp/index.d.ts.map +1 -0
  41. package/dist/core/dlp/index.js +115 -0
  42. package/dist/core/dlp/index.js.map +1 -0
  43. package/dist/core/health/index.d.ts +10 -0
  44. package/dist/core/health/index.d.ts.map +1 -0
  45. package/dist/core/health/index.js +21 -0
  46. package/dist/core/health/index.js.map +1 -0
  47. package/dist/core/index/index.d.ts +9 -0
  48. package/dist/core/index/index.d.ts.map +1 -0
  49. package/dist/core/index/index.js +103 -0
  50. package/dist/core/index/index.js.map +1 -0
  51. package/dist/core/index/ingest.d.ts +16 -0
  52. package/dist/core/index/ingest.d.ts.map +1 -0
  53. package/dist/core/index/ingest.js +184 -0
  54. package/dist/core/index/ingest.js.map +1 -0
  55. package/dist/core/index/platforms.d.ts +21 -0
  56. package/dist/core/index/platforms.d.ts.map +1 -0
  57. package/dist/core/index/platforms.js +44 -0
  58. package/dist/core/index/platforms.js.map +1 -0
  59. package/dist/core/index/pricing-map.d.ts +10 -0
  60. package/dist/core/index/pricing-map.d.ts.map +1 -0
  61. package/dist/core/index/pricing-map.js +16 -0
  62. package/dist/core/index/pricing-map.js.map +1 -0
  63. package/dist/core/index/progress.d.ts +26 -0
  64. package/dist/core/index/progress.d.ts.map +1 -0
  65. package/dist/core/index/progress.js +59 -0
  66. package/dist/core/index/progress.js.map +1 -0
  67. package/dist/core/index/scan.d.ts +9 -0
  68. package/dist/core/index/scan.d.ts.map +1 -0
  69. package/dist/core/index/scan.js +42 -0
  70. package/dist/core/index/scan.js.map +1 -0
  71. package/dist/core/index/statements.d.ts +18 -0
  72. package/dist/core/index/statements.d.ts.map +1 -0
  73. package/dist/core/index/statements.js +82 -0
  74. package/dist/core/index/statements.js.map +1 -0
  75. package/dist/core/index/tail.d.ts +42 -0
  76. package/dist/core/index/tail.d.ts.map +1 -0
  77. package/dist/core/index/tail.js +123 -0
  78. package/dist/core/index/tail.js.map +1 -0
  79. package/dist/core/jsonl/index.d.ts +3 -0
  80. package/dist/core/jsonl/index.d.ts.map +1 -0
  81. package/dist/core/jsonl/index.js +106 -0
  82. package/dist/core/jsonl/index.js.map +1 -0
  83. package/dist/core/jsonl-validate/index.d.ts +10 -0
  84. package/dist/core/jsonl-validate/index.d.ts.map +1 -0
  85. package/dist/core/jsonl-validate/index.js +40 -0
  86. package/dist/core/jsonl-validate/index.js.map +1 -0
  87. package/dist/core/kit/detection.d.ts +94 -0
  88. package/dist/core/kit/detection.d.ts.map +1 -0
  89. package/dist/core/kit/detection.js +312 -0
  90. package/dist/core/kit/detection.js.map +1 -0
  91. package/dist/core/kit/index.d.ts +12 -0
  92. package/dist/core/kit/index.d.ts.map +1 -0
  93. package/dist/core/kit/index.js +131 -0
  94. package/dist/core/kit/index.js.map +1 -0
  95. package/dist/core/kit/scan.d.ts +28 -0
  96. package/dist/core/kit/scan.d.ts.map +1 -0
  97. package/dist/core/kit/scan.js +432 -0
  98. package/dist/core/kit/scan.js.map +1 -0
  99. package/dist/core/recap/index.d.ts +18 -0
  100. package/dist/core/recap/index.d.ts.map +1 -0
  101. package/dist/core/recap/index.js +88 -0
  102. package/dist/core/recap/index.js.map +1 -0
  103. package/dist/core/repetition/index.d.ts +5 -0
  104. package/dist/core/repetition/index.d.ts.map +1 -0
  105. package/dist/core/repetition/index.js +0 -0
  106. package/dist/core/repetition/index.js.map +1 -0
  107. package/dist/core/schema/index.d.ts +514 -0
  108. package/dist/core/schema/index.d.ts.map +1 -0
  109. package/dist/core/schema/index.js +2 -0
  110. package/dist/core/schema/index.js.map +1 -0
  111. package/dist/core/schema-watch/index.d.ts +34 -0
  112. package/dist/core/schema-watch/index.d.ts.map +1 -0
  113. package/dist/core/schema-watch/index.js +87 -0
  114. package/dist/core/schema-watch/index.js.map +1 -0
  115. package/dist/core/search/index.d.ts +44 -0
  116. package/dist/core/search/index.d.ts.map +1 -0
  117. package/dist/core/search/index.js +641 -0
  118. package/dist/core/search/index.js.map +1 -0
  119. package/dist/core/settings/index.d.ts +24 -0
  120. package/dist/core/settings/index.d.ts.map +1 -0
  121. package/dist/core/settings/index.js +76 -0
  122. package/dist/core/settings/index.js.map +1 -0
  123. package/dist/core/share/bundle.d.ts +40 -0
  124. package/dist/core/share/bundle.d.ts.map +1 -0
  125. package/dist/core/share/bundle.js +158 -0
  126. package/dist/core/share/bundle.js.map +1 -0
  127. package/dist/core/share/canonical/from-claude.d.ts +13 -0
  128. package/dist/core/share/canonical/from-claude.d.ts.map +1 -0
  129. package/dist/core/share/canonical/from-claude.js +129 -0
  130. package/dist/core/share/canonical/from-claude.js.map +1 -0
  131. package/dist/core/share/canonical/from-codex.d.ts +18 -0
  132. package/dist/core/share/canonical/from-codex.d.ts.map +1 -0
  133. package/dist/core/share/canonical/from-codex.js +183 -0
  134. package/dist/core/share/canonical/from-codex.js.map +1 -0
  135. package/dist/core/share/canonical/to-claude.d.ts +15 -0
  136. package/dist/core/share/canonical/to-claude.d.ts.map +1 -0
  137. package/dist/core/share/canonical/to-claude.js +146 -0
  138. package/dist/core/share/canonical/to-claude.js.map +1 -0
  139. package/dist/core/share/canonical/to-codex.d.ts +21 -0
  140. package/dist/core/share/canonical/to-codex.d.ts.map +1 -0
  141. package/dist/core/share/canonical/to-codex.js +124 -0
  142. package/dist/core/share/canonical/to-codex.js.map +1 -0
  143. package/dist/core/share/canonical/tool-map.d.ts +61 -0
  144. package/dist/core/share/canonical/tool-map.d.ts.map +1 -0
  145. package/dist/core/share/canonical/tool-map.js +299 -0
  146. package/dist/core/share/canonical/tool-map.js.map +1 -0
  147. package/dist/core/share/canonical/types.d.ts +57 -0
  148. package/dist/core/share/canonical/types.d.ts.map +1 -0
  149. package/dist/core/share/canonical/types.js +9 -0
  150. package/dist/core/share/canonical/types.js.map +1 -0
  151. package/dist/core/share/import.d.ts +28 -0
  152. package/dist/core/share/import.d.ts.map +1 -0
  153. package/dist/core/share/import.js +174 -0
  154. package/dist/core/share/import.js.map +1 -0
  155. package/dist/core/share/manifest.d.ts +37 -0
  156. package/dist/core/share/manifest.d.ts.map +1 -0
  157. package/dist/core/share/manifest.js +31 -0
  158. package/dist/core/share/manifest.js.map +1 -0
  159. package/dist/core/share/preview.d.ts +4 -0
  160. package/dist/core/share/preview.d.ts.map +1 -0
  161. package/dist/core/share/preview.js +153 -0
  162. package/dist/core/share/preview.js.map +1 -0
  163. package/dist/core/share/primer.d.ts +19 -0
  164. package/dist/core/share/primer.d.ts.map +1 -0
  165. package/dist/core/share/primer.js +196 -0
  166. package/dist/core/share/primer.js.map +1 -0
  167. package/dist/core/share/resume.d.ts +10 -0
  168. package/dist/core/share/resume.d.ts.map +1 -0
  169. package/dist/core/share/resume.js +58 -0
  170. package/dist/core/share/resume.js.map +1 -0
  171. package/dist/core/share/scrub.d.ts +10 -0
  172. package/dist/core/share/scrub.d.ts.map +1 -0
  173. package/dist/core/share/scrub.js +198 -0
  174. package/dist/core/share/scrub.js.map +1 -0
  175. package/dist/core/share/tar.d.ts +12 -0
  176. package/dist/core/share/tar.d.ts.map +1 -0
  177. package/dist/core/share/tar.js +78 -0
  178. package/dist/core/share/tar.js.map +1 -0
  179. package/dist/core/tags/index.d.ts +48 -0
  180. package/dist/core/tags/index.d.ts.map +1 -0
  181. package/dist/core/tags/index.js +113 -0
  182. package/dist/core/tags/index.js.map +1 -0
  183. package/dist/core/today/index.d.ts +25 -0
  184. package/dist/core/today/index.d.ts.map +1 -0
  185. package/dist/core/today/index.js +42 -0
  186. package/dist/core/today/index.js.map +1 -0
  187. package/dist/core/waste/abandoned.d.ts +12 -0
  188. package/dist/core/waste/abandoned.d.ts.map +1 -0
  189. package/dist/core/waste/abandoned.js +127 -0
  190. package/dist/core/waste/abandoned.js.map +1 -0
  191. package/dist/core/waste/cache-miss.d.ts +9 -0
  192. package/dist/core/waste/cache-miss.d.ts.map +1 -0
  193. package/dist/core/waste/cache-miss.js +84 -0
  194. package/dist/core/waste/cache-miss.js.map +1 -0
  195. package/dist/core/waste/index.d.ts +12 -0
  196. package/dist/core/waste/index.d.ts.map +1 -0
  197. package/dist/core/waste/index.js +45 -0
  198. package/dist/core/waste/index.js.map +1 -0
  199. package/dist/core/waste/wrong-model.d.ts +11 -0
  200. package/dist/core/waste/wrong-model.d.ts.map +1 -0
  201. package/dist/core/waste/wrong-model.js +104 -0
  202. package/dist/core/waste/wrong-model.js.map +1 -0
  203. package/dist/db/index.d.ts +10 -0
  204. package/dist/db/index.d.ts.map +1 -0
  205. package/dist/db/index.js +29 -0
  206. package/dist/db/index.js.map +1 -0
  207. package/dist/db/migrate.d.ts +8 -0
  208. package/dist/db/migrate.d.ts.map +1 -0
  209. package/dist/db/migrate.js +282 -0
  210. package/dist/db/migrate.js.map +1 -0
  211. package/dist/server/events.d.ts +4 -0
  212. package/dist/server/events.d.ts.map +1 -0
  213. package/dist/server/events.js +54 -0
  214. package/dist/server/events.js.map +1 -0
  215. package/dist/server/index.d.ts +7 -0
  216. package/dist/server/index.d.ts.map +1 -0
  217. package/dist/server/index.js +238 -0
  218. package/dist/server/index.js.map +1 -0
  219. package/dist/server/routes/foundation.d.ts +2 -0
  220. package/dist/server/routes/foundation.d.ts.map +1 -0
  221. package/dist/server/routes/foundation.js +2 -0
  222. package/dist/server/routes/foundation.js.map +1 -0
  223. package/dist/server/routes/search.d.ts +2 -0
  224. package/dist/server/routes/search.d.ts.map +1 -0
  225. package/dist/server/routes/search.js +2 -0
  226. package/dist/server/routes/search.js.map +1 -0
  227. package/dist/server/routes/sessions.d.ts +2 -0
  228. package/dist/server/routes/sessions.d.ts.map +1 -0
  229. package/dist/server/routes/sessions.js +2 -0
  230. package/dist/server/routes/sessions.js.map +1 -0
  231. package/dist/server/routes/waste.d.ts +2 -0
  232. package/dist/server/routes/waste.d.ts.map +1 -0
  233. package/dist/server/routes/waste.js +2 -0
  234. package/dist/server/routes/waste.js.map +1 -0
  235. package/dist/web/assets/index-Ba1VvTj0.js +37 -0
  236. package/dist/web/index.html +12 -0
  237. package/package.json +76 -0
@@ -0,0 +1,514 @@
1
+ export type RecordType = 'user' | 'assistant' | 'system' | 'queue-operation' | 'attachment' | 'last-prompt';
2
+ export interface Usage {
3
+ input_tokens: number;
4
+ output_tokens: number;
5
+ cache_creation_input_tokens: number;
6
+ cache_read_input_tokens: number;
7
+ cache_creation?: {
8
+ ephemeral_1h_input_tokens?: number;
9
+ ephemeral_5m_input_tokens?: number;
10
+ };
11
+ server_tool_use?: {
12
+ web_search_requests: number;
13
+ web_fetch_requests: number;
14
+ };
15
+ }
16
+ export type ContentBlock = {
17
+ type: 'text';
18
+ text: string;
19
+ } | {
20
+ type: 'thinking';
21
+ thinking: string;
22
+ signature?: string;
23
+ } | {
24
+ type: 'tool_use';
25
+ id: string;
26
+ name: string;
27
+ input: Record<string, unknown>;
28
+ } | {
29
+ type: 'tool_result';
30
+ tool_use_id: string;
31
+ content: string | ContentBlock[];
32
+ is_error?: boolean;
33
+ };
34
+ export interface UserRecord {
35
+ type: 'user';
36
+ uuid: string;
37
+ parentUuid: string | null;
38
+ sessionId: string;
39
+ timestamp: string;
40
+ isSidechain: boolean;
41
+ message: {
42
+ role: 'user';
43
+ content: string | ContentBlock[];
44
+ };
45
+ cwd?: string;
46
+ gitBranch?: string;
47
+ version?: string;
48
+ /** Top-level tool-result metadata sibling to `message`. String for rejections/plain text,
49
+ * or an object (e.g. {durationMs, stdout, ...}) for richer results. Carries `durationMs`
50
+ * for some tool types (WebFetch). is_error lives on the tool_result content block, not here. */
51
+ toolUseResult?: string | Record<string, unknown>;
52
+ /** Per-record permission mode (auto | acceptEdits | default | plan) — drives F3 permission_change. */
53
+ permissionMode?: string;
54
+ }
55
+ export interface AssistantRecord {
56
+ type: 'assistant';
57
+ uuid: string;
58
+ parentUuid: string | null;
59
+ sessionId: string;
60
+ timestamp: string;
61
+ isSidechain: boolean;
62
+ message: {
63
+ role: 'assistant';
64
+ model: string;
65
+ id: string;
66
+ content: ContentBlock[];
67
+ usage?: Usage;
68
+ };
69
+ }
70
+ export interface SystemRecord {
71
+ type: 'system';
72
+ subtype: string;
73
+ uuid: string;
74
+ sessionId: string;
75
+ timestamp: string;
76
+ content: string;
77
+ isMeta: boolean;
78
+ compactMetadata?: {
79
+ trigger: string;
80
+ preTokens: number;
81
+ postTokens: number;
82
+ durationMs: number;
83
+ };
84
+ }
85
+ export type ParsedRecord = UserRecord | AssistantRecord | SystemRecord;
86
+ export type WasteCategory = 'cache-miss' | 'wrong-model' | 'abandoned';
87
+ export interface WasteAttribution {
88
+ sessionId: string;
89
+ category: WasteCategory;
90
+ amountCents: number;
91
+ anchorMsgIdx: number | null;
92
+ evidenceJson: string;
93
+ }
94
+ export interface FoundationData {
95
+ totalCostCentsThisWeek: number;
96
+ cacheHitRateLast30Days: number;
97
+ modelMix: Array<{
98
+ model: string;
99
+ pct: number;
100
+ }>;
101
+ }
102
+ export interface WasteSession {
103
+ sessionId: string;
104
+ project: string;
105
+ startedAt: string | null;
106
+ amountCents: number;
107
+ anchorMsgIdx: number | null;
108
+ evidenceJson: string;
109
+ }
110
+ export interface WasteCategoryData {
111
+ category: 'cache-miss' | 'wrong-model' | 'abandoned';
112
+ totalCents: number;
113
+ sessionCount: number;
114
+ sessions: WasteSession[];
115
+ }
116
+ export interface WasteData {
117
+ totalCents: number;
118
+ categories: WasteCategoryData[];
119
+ }
120
+ export interface SearchResult {
121
+ sessionId: string;
122
+ messageId: string;
123
+ msgIdx: number;
124
+ snippet: string;
125
+ session: {
126
+ project: string;
127
+ startedAt: string | null;
128
+ model: string | null;
129
+ };
130
+ }
131
+ export type SearchHitKind = 'text' | 'tool_input' | 'tool_output';
132
+ export interface SearchHit {
133
+ msgIdx: number;
134
+ /** server-built, escaped, with <mark> tags */
135
+ snippet: string;
136
+ kind: SearchHitKind;
137
+ }
138
+ export interface SearchSessionGroup {
139
+ sessionId: string;
140
+ project: string;
141
+ name: string;
142
+ platform: string;
143
+ startedAt: string | null;
144
+ model: string | null;
145
+ lastOutcome: string | null;
146
+ hitCount: number;
147
+ /** top few per session (cap 4) */
148
+ hits: SearchHit[];
149
+ }
150
+ export interface SearchData {
151
+ total: number;
152
+ results: SearchResult[];
153
+ sessionTotal: number;
154
+ groups: SearchSessionGroup[];
155
+ }
156
+ export interface MessageDetail {
157
+ id: string;
158
+ idx: number;
159
+ role: string;
160
+ ts: string;
161
+ model: string | null;
162
+ contentJson: string;
163
+ inputTokens?: number;
164
+ outputTokens?: number;
165
+ cacheCreationTokens?: number;
166
+ cacheReadTokens?: number;
167
+ }
168
+ export interface TimelinePoint {
169
+ msgIdx: number;
170
+ ts: string;
171
+ cumulativeCostCents: number;
172
+ }
173
+ export interface SessionDetailData {
174
+ session: {
175
+ id: string;
176
+ project: string;
177
+ platform: string;
178
+ startedAt: string | null;
179
+ endedAt: string | null;
180
+ messageCount: number;
181
+ totalInputTokens: number;
182
+ totalOutputTokens: number;
183
+ totalCacheCreation: number;
184
+ totalCacheRead: number;
185
+ totalCostCents: number;
186
+ lastOutcome: string | null;
187
+ /** Resolved display name (override → /rename → ai-title → project → short id). */
188
+ name: string;
189
+ /** Raw vyasa override (null if unset) — drives the edit field. */
190
+ customName: string | null;
191
+ tags: string[];
192
+ };
193
+ messages: MessageDetail[];
194
+ timeline: TimelinePoint[];
195
+ /** Plan/decision events derived at query time (F3). Empty for most sessions. */
196
+ decisions: PlanEvent[];
197
+ }
198
+ export interface SessionListRow {
199
+ id: string;
200
+ project: string;
201
+ platform: string;
202
+ startedAt: string | null;
203
+ endedAt: string | null;
204
+ messageCount: number;
205
+ totalCostCents: number;
206
+ totalInputTokens: number;
207
+ totalOutputTokens: number;
208
+ totalCacheRead: number;
209
+ lastOutcome: string | null;
210
+ durationMs: number | null;
211
+ /** Raw count of tool calls that errored (F4). Classification is health module's job. */
212
+ errorCount: number;
213
+ /** Resolved display name (precedence-applied). */
214
+ name: string;
215
+ tags: string[];
216
+ }
217
+ export type PlanEventKind = 'plan_finalized' | 'plan_reopened' | 'model_change' | 'permission_change';
218
+ export interface PlanEvent {
219
+ msgIdx: number;
220
+ ts: string;
221
+ kind: PlanEventKind;
222
+ /** e.g. "opus-4-7 → sonnet-4-6", "plan accepted" */
223
+ detail: string;
224
+ /** tokens consumed from this event until the next (or session end); null when unknown */
225
+ tokensInSpan: number | null;
226
+ }
227
+ export interface SessionHealth {
228
+ status: 'clean' | 'warn' | 'error';
229
+ errorCount: number;
230
+ reasons: string[];
231
+ }
232
+ export interface SetSessionNameRequest {
233
+ name: string | null;
234
+ }
235
+ export interface SetSessionTagsRequest {
236
+ tags: string[];
237
+ }
238
+ export interface SessionMetaResponse {
239
+ name: string;
240
+ customName: string | null;
241
+ tags: string[];
242
+ }
243
+ export interface TagListResponse {
244
+ tags: Array<{
245
+ tag: string;
246
+ count: number;
247
+ }>;
248
+ }
249
+ export interface SessionsListData {
250
+ total: number;
251
+ /** Count of zero-value "empty" sessions hidden by default (0 tokens, $0). */
252
+ hiddenEmptyCount: number;
253
+ sessions: SessionListRow[];
254
+ }
255
+ /** Sessions whose last message landed inside the live window — the "Live" view.
256
+ * `now` is the server clock so the client can render accurate "active Xs ago". */
257
+ export interface LiveData {
258
+ now: number;
259
+ windowMinutes: number;
260
+ sessions: SessionListRow[];
261
+ }
262
+ export type AnalyticsRange = '7d' | '30d' | '90d' | 'all';
263
+ export interface AnalyticsData {
264
+ range: AnalyticsRange;
265
+ dailyCost: {
266
+ date: string;
267
+ costCents: number;
268
+ sessionCount: number;
269
+ }[];
270
+ projectCost: {
271
+ project: string;
272
+ costCents: number;
273
+ sessionCount: number;
274
+ }[];
275
+ modelCost: {
276
+ model: string;
277
+ costCents: number;
278
+ outputTokens: number;
279
+ }[];
280
+ /** Per-day token totals, aligned to dailyCost dates (tokens read better than $ since most sessions show $0). */
281
+ dailyTokens: {
282
+ date: string;
283
+ tokens: number;
284
+ }[];
285
+ /** Headline stats for the selected range. */
286
+ summary: AnalyticsSummary;
287
+ /** Day-of-week × hour activity grid — the work-rhythm "flow map". */
288
+ activityClock: ActivityClock;
289
+ }
290
+ export interface AnalyticsSummary {
291
+ totalSessions: number;
292
+ totalTokens: number;
293
+ /** Distinct calendar days with at least one session. */
294
+ activeDays: number;
295
+ /** Local hour 0–23 with the most sessions, or null if no data. */
296
+ busiestHour: number | null;
297
+ }
298
+ export interface ActivityClock {
299
+ /**
300
+ * 7×24 grid of buckets (index = dayOfWeek*24 + hour). dayOfWeek: 0=Sun..6=Sat,
301
+ * hour: 0–23, both in the server's local timezone (where sessions were recorded).
302
+ */
303
+ cells: ActivityCell[];
304
+ /** Max sessionCount across all cells (for color-ramp normalization on the client). */
305
+ maxSessions: number;
306
+ /** Max tokens across all cells. */
307
+ maxTokens: number;
308
+ }
309
+ export interface ActivityCell {
310
+ dayOfWeek: number;
311
+ hour: number;
312
+ sessionCount: number;
313
+ tokens: number;
314
+ /** Error tool-calls in this bucket — drives "depth"/run-health tint. */
315
+ errorCount: number;
316
+ }
317
+ export interface ScrubReport {
318
+ /** Dropped meta/internal records, keyed by record type (plus 'isMeta' for isMeta-flagged drops). */
319
+ metaRecordsDropped: Record<string, number>;
320
+ /** <system-reminder> spans removed from kept records (sensitive markers only — plan echoes survive). */
321
+ systemReminderSpansStripped: number;
322
+ /** Records dropped because they were empty after stripping (pure injection). */
323
+ recordsEmptiedAndDropped: number;
324
+ /** Records whose content was redacted in place (preview-driven). */
325
+ redactedRecords: number;
326
+ bytesBefore: number;
327
+ bytesAfter: number;
328
+ }
329
+ export interface ResidualFlag {
330
+ /** Record uuid to redact. Empty for the plan-file flag (excluded via includePlanFile instead). */
331
+ uuid: string;
332
+ kind: 'tool_dump' | 'secret' | 'pii' | 'plan_file';
333
+ reason: string;
334
+ /** First ~200 chars of the flagged content, for the user to eyeball. */
335
+ snippet: string;
336
+ sizeBytes: number;
337
+ /** Pre-checked for exclusion in the UI (sensitive-path dumps + the plan file). */
338
+ defaultExclude: boolean;
339
+ }
340
+ export interface SharePreview {
341
+ platform: string;
342
+ /** null for Codex (scrubbing not yet supported — review manually). */
343
+ scrubReport: ScrubReport | null;
344
+ residualFlags: ResidualFlag[];
345
+ /** False for Codex/Cursor — caller should warn the user to review manually before sharing. */
346
+ canScrub: boolean;
347
+ }
348
+ export type KitPlatform = 'claude-code' | 'codex' | 'cursor';
349
+ export type KitItemKind = 'skill' | 'mcp';
350
+ export type KitScope = 'global' | 'project';
351
+ export interface SkillState {
352
+ /** Canonical id: '<plugin>:<name>' for plugin-installed skills, '<name>' for loose ones */
353
+ id: string;
354
+ /** Filesystem directory name */
355
+ name: string;
356
+ /** Source plugin slug (e.g. 'superpowers'), or null for loose skills */
357
+ plugin: string | null;
358
+ platform: KitPlatform;
359
+ scope: KitScope;
360
+ /** When scope='project', the absolute project path the skill lives under */
361
+ projectPath: string | null;
362
+ /** Absolute path to the SKILL.md file */
363
+ sourcePath: string;
364
+ description: string | null;
365
+ /** ms-epoch — when SKILL.md was last modified */
366
+ installedAtMs: number;
367
+ /** ms-epoch of the most recent tool_call matching this skill, or null if never invoked */
368
+ lastUsedMs: number | null;
369
+ /** Count of tool_calls in the lookback window */
370
+ usageCount: number;
371
+ }
372
+ export interface McpState {
373
+ /** Server name as it appears between the two `__` in `mcp__<server>__<method>` */
374
+ id: string;
375
+ platform: KitPlatform;
376
+ scope: KitScope;
377
+ /** When scope='project', the absolute project path whose config declares the server */
378
+ projectPath: string | null;
379
+ /** Absolute path to the config file (e.g. ~/.claude.json, ~/.cursor/mcp.json) */
380
+ sourcePath: string;
381
+ /** ms-epoch — config file's last modified time */
382
+ installedAtMs: number;
383
+ lastUsedMs: number | null;
384
+ usageCount: number;
385
+ }
386
+ export interface GapItem {
387
+ kind: KitItemKind;
388
+ id: string;
389
+ purpose: string;
390
+ installCommand: string;
391
+ /** Estimated cents saveable over the lookback window if the user adopts this. 0 when no heuristic fires. */
392
+ potentialSavingsCents: number;
393
+ /** Total tool_calls matched by `replaces` patterns over the lookback window */
394
+ matchingCallCount: number;
395
+ }
396
+ export interface ZombieItem {
397
+ kind: KitItemKind;
398
+ id: string;
399
+ /** SkillState.name for skills, McpState.id for MCP servers */
400
+ displayName: string;
401
+ platform: KitPlatform;
402
+ scope: KitScope;
403
+ projectPath: string | null;
404
+ installedAtMs: number;
405
+ lastUsedMs: number | null;
406
+ usageCount: number;
407
+ removeCommand: string;
408
+ }
409
+ export interface ProjectInventory {
410
+ project: string;
411
+ skills: SkillState[];
412
+ mcp: McpState[];
413
+ }
414
+ export interface KitData {
415
+ lookbackDays: number;
416
+ gaps: GapItem[];
417
+ zombies: ZombieItem[];
418
+ globalInstalled: {
419
+ skills: SkillState[];
420
+ mcp: McpState[];
421
+ };
422
+ projectInstalled: ProjectInventory[];
423
+ }
424
+ export interface DlpFinding {
425
+ sessionId: string;
426
+ name: string;
427
+ msgIdx: number;
428
+ kind: 'secret' | 'pii';
429
+ reason: string;
430
+ preview: string;
431
+ }
432
+ export interface RepetitionCluster {
433
+ representative: string;
434
+ count: number;
435
+ sessionCount: number;
436
+ examples: {
437
+ sessionId: string;
438
+ msgIdx: number;
439
+ text: string;
440
+ }[];
441
+ suggestion: string;
442
+ }
443
+ export interface RecapData {
444
+ weekStart: string;
445
+ sessionCount: number;
446
+ burn: {
447
+ used: number;
448
+ cap: number | null;
449
+ pct: number | null;
450
+ projectedWeekEnd: number;
451
+ daysToExhaust: number | null;
452
+ };
453
+ wasteCents: number;
454
+ thrash: {
455
+ sessionId: string;
456
+ name: string;
457
+ errorCount: number;
458
+ }[];
459
+ drift: {
460
+ sessionId: string;
461
+ name: string;
462
+ reopens: number;
463
+ tokensInReopens: number;
464
+ }[];
465
+ repetition: RepetitionCluster[];
466
+ secrets: DlpFinding[];
467
+ }
468
+ export interface BillingRow {
469
+ tag: string;
470
+ sessionCount: number;
471
+ tokens: number;
472
+ costCents: number;
473
+ }
474
+ export interface BillingData {
475
+ rangeLabel: string;
476
+ rows: BillingRow[];
477
+ untaggedSessions: number;
478
+ }
479
+ export interface ImportResultResponse {
480
+ ok: boolean;
481
+ sessionId?: string;
482
+ error?: string;
483
+ }
484
+ export interface ParseError {
485
+ lineNum: number;
486
+ recordType: string | null;
487
+ error: string;
488
+ /** First 200 chars of the raw JSON line */
489
+ sampleJson: string;
490
+ }
491
+ export interface ParsedSession {
492
+ sessionId: string | null;
493
+ filePath: string;
494
+ /** Project path — set by Codex parser from session_meta.payload.cwd; null for Claude (ingest derives it from file path) */
495
+ project: string | null;
496
+ records: ParsedRecord[];
497
+ /** All assistant records that have usage data */
498
+ usageRecords: AssistantRecord[];
499
+ /** Timestamp of the first user record */
500
+ startedAt: string | null;
501
+ /** Timestamp of the last non-skipped record of any type, including system records (e.g. compact_boundary) */
502
+ endedAt: string | null;
503
+ /** Latest `custom-title` record's customTitle (user's /rename), or null. Ingest-derived; recomputed each parse. */
504
+ claudeCustomTitle: string | null;
505
+ /** Latest `ai-title` record's aiTitle (auto-generated), or null. */
506
+ claudeAiTitle: string | null;
507
+ /** Records that failed validation; empty array means clean parse */
508
+ parseErrors: ParseError[];
509
+ /** Structural fingerprints observed in this file; key = fingerprint, value = first occurrence info */
510
+ fingerprints: Map<string, {
511
+ firstSeenLine: number;
512
+ }>;
513
+ }
514
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/core/schema/index.ts"],"names":[],"mappings":"AACA,MAAM,MAAM,UAAU,GAClB,MAAM,GACN,WAAW,GACX,QAAQ,GACR,iBAAiB,GACjB,YAAY,GACZ,aAAa,CAAA;AAEjB,MAAM,WAAW,KAAK;IACpB,YAAY,EAAE,MAAM,CAAA;IACpB,aAAa,EAAE,MAAM,CAAA;IACrB,2BAA2B,EAAE,MAAM,CAAA;IACnC,uBAAuB,EAAE,MAAM,CAAA;IAE/B,cAAc,CAAC,EAAE;QACf,yBAAyB,CAAC,EAAE,MAAM,CAAA;QAClC,yBAAyB,CAAC,EAAE,MAAM,CAAA;KACnC,CAAA;IACD,eAAe,CAAC,EAAE;QAChB,mBAAmB,EAAE,MAAM,CAAA;QAC3B,kBAAkB,EAAE,MAAM,CAAA;KAC3B,CAAA;CACF;AAED,MAAM,MAAM,YAAY,GACpB;IAAE,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appingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/core/schema/index.ts"],"names":[],"mappings":""}
@@ -0,0 +1,34 @@
1
+ import Database from 'better-sqlite3';
2
+ export interface FingerprintMeta {
3
+ firstSeenFile: string;
4
+ firstSeenLine: number;
5
+ count: number;
6
+ lastSeen: string;
7
+ }
8
+ /**
9
+ * Produce a deterministic structural fingerprint for one raw JSONL record.
10
+ * Shape: "type=<top-level type>|payload.type=<payload type>|payload.keys=<sorted comma list>"
11
+ * - top-level `type` comes from raw['type'] (string or '?')
12
+ * - payload.type from raw['payload']?.['type'] (string or '?')
13
+ * - payload.keys: sorted top-level keys of raw['payload'] object joined by ','
14
+ * (if payload is not an object, use empty string)
15
+ * Depth is intentionally shallow (1 level into payload) so the fingerprint
16
+ * stays stable as nested fields evolve.
17
+ */
18
+ export declare function recordFingerprint(rec: unknown): string;
19
+ /**
20
+ * Compare a map of observed fingerprints against the golden set on disk.
21
+ * goldenPath: absolute path to data/schema-fingerprints.json
22
+ * Returns lists of fingerprints that are unknown (in observed, not in golden)
23
+ * and missing (in golden, not in observed — informational only, not an error).
24
+ */
25
+ export declare function compareToGolden(observed: Map<string, FingerprintMeta>, goldenPath: string): {
26
+ unknown: string[];
27
+ missing: string[];
28
+ };
29
+ /**
30
+ * Read current _schema_observations from DB and rewrite goldenPath with them.
31
+ * Called by --schema-bless CLI flag.
32
+ */
33
+ export declare function blessGolden(db: Database.Database, goldenPath: string): void;
34
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/core/schema-watch/index.ts"],"names":[],"mappings":"AACA,OAAO,QAAQ,MAAM,gBAAgB,CAAA;AAErC,MAAM,WAAW,eAAe;IAC9B,aAAa,EAAE,MAAM,CAAA;IACrB,aAAa,EAAE,MAAM,CAAA;IACrB,KAAK,EAAE,MAAM,CAAA;IACb,QAAQ,EAAE,MAAM,CAAA;CACjB;AAED;;;;;;;;;GASG;AACH,wBAAgB,iBAAiB,CAAC,GAAG,EAAE,OAAO,GAAG,MAAM,CAmBtD;AAOD;;;;;GAKG;AACH,wBAAgB,eAAe,CAC7B,QAAQ,EAAE,GAAG,CAAC,MAAM,EAAE,eAAe,CAAC,EACtC,UAAU,EAAE,MAAM,GACjB;IAAE,OAAO,EAAE,MAAM,EAAE,CAAC;IAAC,OAAO,EAAE,MAAM,EAAE,CAAA;CAAE,CA8B1C;AAOD;;;GAGG;AACH,wBAAgB,WAAW,CAAC,EAAE,EAAE,QAAQ,CAAC,QAAQ,EAAE,UAAU,EAAE,MAAM,GAAG,IAAI,CAuB3E"}
@@ -0,0 +1,87 @@
1
+ import { readFileSync, writeFileSync } from 'node:fs';
2
+ /**
3
+ * Produce a deterministic structural fingerprint for one raw JSONL record.
4
+ * Shape: "type=<top-level type>|payload.type=<payload type>|payload.keys=<sorted comma list>"
5
+ * - top-level `type` comes from raw['type'] (string or '?')
6
+ * - payload.type from raw['payload']?.['type'] (string or '?')
7
+ * - payload.keys: sorted top-level keys of raw['payload'] object joined by ','
8
+ * (if payload is not an object, use empty string)
9
+ * Depth is intentionally shallow (1 level into payload) so the fingerprint
10
+ * stays stable as nested fields evolve.
11
+ */
12
+ export function recordFingerprint(rec) {
13
+ if (rec === null || typeof rec !== 'object' || Array.isArray(rec)) {
14
+ return 'type=?|payload.type=?|payload.keys=';
15
+ }
16
+ const obj = rec;
17
+ const topType = typeof obj['type'] === 'string' ? obj['type'] : '?';
18
+ const payload = obj['payload'];
19
+ let payloadType = '?';
20
+ let payloadKeys = '';
21
+ if (payload !== null && payload !== undefined && typeof payload === 'object' && !Array.isArray(payload)) {
22
+ const payloadObj = payload;
23
+ payloadType = typeof payloadObj['type'] === 'string' ? payloadObj['type'] : '?';
24
+ payloadKeys = Object.keys(payloadObj).sort().join(',');
25
+ }
26
+ return `type=${topType}|payload.type=${payloadType}|payload.keys=${payloadKeys}`;
27
+ }
28
+ /**
29
+ * Compare a map of observed fingerprints against the golden set on disk.
30
+ * goldenPath: absolute path to data/schema-fingerprints.json
31
+ * Returns lists of fingerprints that are unknown (in observed, not in golden)
32
+ * and missing (in golden, not in observed — informational only, not an error).
33
+ */
34
+ export function compareToGolden(observed, goldenPath) {
35
+ let golden;
36
+ try {
37
+ const raw = readFileSync(goldenPath, 'utf8');
38
+ golden = JSON.parse(raw);
39
+ }
40
+ catch {
41
+ // File doesn't exist — treat first run as clean
42
+ return { unknown: [], missing: [] };
43
+ }
44
+ const goldenSet = new Set([
45
+ ...(golden['claude-code'] ?? []),
46
+ ...(golden['codex'] ?? []),
47
+ ]);
48
+ const unknown = [];
49
+ for (const fp of observed.keys()) {
50
+ if (!goldenSet.has(fp)) {
51
+ unknown.push(fp);
52
+ }
53
+ }
54
+ const missing = [];
55
+ for (const fp of goldenSet) {
56
+ if (!observed.has(fp)) {
57
+ missing.push(fp);
58
+ }
59
+ }
60
+ return { unknown, missing };
61
+ }
62
+ /**
63
+ * Read current _schema_observations from DB and rewrite goldenPath with them.
64
+ * Called by --schema-bless CLI flag.
65
+ */
66
+ export function blessGolden(db, goldenPath) {
67
+ const rows = db
68
+ .prepare('SELECT DISTINCT platform, fingerprint FROM _schema_observations')
69
+ .all();
70
+ const grouped = {
71
+ 'claude-code': [],
72
+ 'codex': [],
73
+ };
74
+ for (const row of rows) {
75
+ if (row.platform === 'claude-code') {
76
+ grouped['claude-code'].push(row.fingerprint);
77
+ }
78
+ else if (row.platform === 'codex') {
79
+ grouped['codex'].push(row.fingerprint);
80
+ }
81
+ }
82
+ // Sort for deterministic output
83
+ grouped['claude-code'].sort();
84
+ grouped['codex'].sort();
85
+ writeFileSync(goldenPath, JSON.stringify(grouped, null, 2) + '\n', 'utf8');
86
+ }
87
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/core/schema-watch/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAA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