agent-profiler 1.0.0 → 1.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,389 @@
1
+ :root {
2
+ color-scheme: dark;
3
+ --bg: #0f1117;
4
+ --surface: #181b24;
5
+ --border: #2a2f3d;
6
+ --text: #e8eaef;
7
+ --muted: #8b93a7;
8
+ --accent: #6c9fff;
9
+ --user: #3dd68c;
10
+ --assistant: #6c9fff;
11
+ --tool: #e8a23a;
12
+ --shell: #c678f0;
13
+ --other: #5c6370;
14
+ --danger: #f87171;
15
+ font-family:
16
+ ui-sans-serif,
17
+ system-ui,
18
+ -apple-system,
19
+ "Segoe UI",
20
+ Roboto,
21
+ sans-serif;
22
+ }
23
+
24
+ * {
25
+ box-sizing: border-box;
26
+ }
27
+
28
+ body {
29
+ margin: 0;
30
+ background: var(--bg);
31
+ color: var(--text);
32
+ line-height: 1.5;
33
+ }
34
+
35
+ .layout {
36
+ max-width: 1200px;
37
+ margin: 0 auto;
38
+ padding: 1.5rem;
39
+ }
40
+
41
+ .header {
42
+ display: flex;
43
+ flex-wrap: wrap;
44
+ align-items: flex-end;
45
+ justify-content: space-between;
46
+ gap: 1rem;
47
+ margin-bottom: 1.5rem;
48
+ }
49
+
50
+ h1 {
51
+ font-size: 1.35rem;
52
+ font-weight: 600;
53
+ margin: 0 0 0.25rem;
54
+ }
55
+
56
+ h2 {
57
+ font-size: 0.95rem;
58
+ font-weight: 600;
59
+ margin: 0 0 0.75rem;
60
+ color: var(--muted);
61
+ text-transform: uppercase;
62
+ letter-spacing: 0.04em;
63
+ }
64
+
65
+ .muted {
66
+ color: var(--muted);
67
+ }
68
+
69
+ .small {
70
+ font-size: 0.8rem;
71
+ }
72
+
73
+ .header-actions {
74
+ display: flex;
75
+ align-items: center;
76
+ gap: 0.75rem;
77
+ }
78
+
79
+ .session-label {
80
+ display: flex;
81
+ flex-direction: column;
82
+ gap: 0.25rem;
83
+ font-size: 0.75rem;
84
+ color: var(--muted);
85
+ }
86
+
87
+ select {
88
+ background: var(--surface);
89
+ color: var(--text);
90
+ border: 1px solid var(--border);
91
+ border-radius: 6px;
92
+ padding: 0.35rem 0.5rem;
93
+ min-width: 220px;
94
+ }
95
+
96
+ button {
97
+ background: var(--accent);
98
+ color: #0f1117;
99
+ border: none;
100
+ border-radius: 6px;
101
+ padding: 0.45rem 1rem;
102
+ font-weight: 600;
103
+ cursor: pointer;
104
+ }
105
+
106
+ button:hover {
107
+ filter: brightness(1.08);
108
+ }
109
+
110
+ .grid {
111
+ display: grid;
112
+ grid-template-columns: repeat(3, 1fr);
113
+ gap: 1rem;
114
+ }
115
+
116
+ @media (max-width: 900px) {
117
+ .grid {
118
+ grid-template-columns: 1fr;
119
+ }
120
+
121
+ .span-2,
122
+ .span-3 {
123
+ grid-column: span 1;
124
+ }
125
+ }
126
+
127
+ .card {
128
+ background: var(--surface);
129
+ border: 1px solid var(--border);
130
+ border-radius: 10px;
131
+ padding: 1rem 1.1rem;
132
+ }
133
+
134
+ .span-2 {
135
+ grid-column: span 2;
136
+ }
137
+
138
+ .span-3 {
139
+ grid-column: span 3;
140
+ }
141
+
142
+ .gauge-row {
143
+ display: flex;
144
+ flex-wrap: wrap;
145
+ gap: 1.25rem;
146
+ align-items: stretch;
147
+ }
148
+
149
+ .gauge {
150
+ display: flex;
151
+ flex-direction: column;
152
+ gap: 0.25rem;
153
+ min-width: 140px;
154
+ }
155
+
156
+ .gauge-value {
157
+ font-size: 1.5rem;
158
+ font-weight: 700;
159
+ font-variant-numeric: tabular-nums;
160
+ }
161
+
162
+ .bars {
163
+ flex: 1;
164
+ display: flex;
165
+ flex-direction: column;
166
+ gap: 0.45rem;
167
+ min-width: 200px;
168
+ }
169
+
170
+ .bars.vertical {
171
+ flex-direction: row;
172
+ align-items: flex-end;
173
+ gap: 0.5rem;
174
+ min-height: 120px;
175
+ }
176
+
177
+ .bars.vertical.tall {
178
+ min-height: 180px;
179
+ flex-wrap: wrap;
180
+ }
181
+
182
+ .bar-row {
183
+ display: flex;
184
+ align-items: center;
185
+ gap: 0.5rem;
186
+ font-size: 0.8rem;
187
+ }
188
+
189
+ .bar-row span:first-child {
190
+ width: 5.5rem;
191
+ color: var(--muted);
192
+ flex-shrink: 0;
193
+ }
194
+
195
+ .bar-track {
196
+ flex: 1;
197
+ height: 10px;
198
+ background: #252936;
199
+ border-radius: 5px;
200
+ overflow: hidden;
201
+ }
202
+
203
+ .bar-fill {
204
+ height: 100%;
205
+ border-radius: 5px;
206
+ transition: width 0.2s ease;
207
+ }
208
+
209
+ .bar-fill.input {
210
+ background: var(--assistant);
211
+ }
212
+
213
+ .bar-fill.output {
214
+ background: #8ab4ff;
215
+ }
216
+
217
+ .bar-fill.tool {
218
+ background: var(--tool);
219
+ }
220
+
221
+ .bar-fill.shell {
222
+ background: var(--shell);
223
+ }
224
+
225
+ .vbar-col {
226
+ display: flex;
227
+ flex-direction: column;
228
+ align-items: center;
229
+ gap: 0.35rem;
230
+ font-size: 0.65rem;
231
+ color: var(--muted);
232
+ max-width: 72px;
233
+ }
234
+
235
+ .vbar-track {
236
+ width: 14px;
237
+ height: 100px;
238
+ background: #252936;
239
+ border-radius: 4px;
240
+ display: flex;
241
+ flex-direction: column;
242
+ justify-content: flex-end;
243
+ overflow: hidden;
244
+ }
245
+
246
+ .vbar-fill {
247
+ width: 100%;
248
+ background: var(--accent);
249
+ border-radius: 4px;
250
+ transition: height 0.2s ease;
251
+ }
252
+
253
+ .vbar-label {
254
+ writing-mode: horizontal-tb;
255
+ text-align: center;
256
+ word-break: break-all;
257
+ line-height: 1.15;
258
+ max-height: 2.8em;
259
+ overflow: hidden;
260
+ }
261
+
262
+ .score-block {
263
+ display: flex;
264
+ align-items: baseline;
265
+ gap: 0.35rem;
266
+ }
267
+
268
+ .score {
269
+ font-size: 2.25rem;
270
+ font-weight: 700;
271
+ font-variant-numeric: tabular-nums;
272
+ }
273
+
274
+ .sparkline-wrap {
275
+ margin-top: 0.75rem;
276
+ }
277
+
278
+ #score-sparkline {
279
+ width: 100%;
280
+ max-width: 240px;
281
+ height: 48px;
282
+ }
283
+
284
+ #score-sparkline polyline {
285
+ fill: none;
286
+ stroke: var(--accent);
287
+ stroke-width: 2;
288
+ stroke-linecap: round;
289
+ stroke-linejoin: round;
290
+ }
291
+
292
+ .timeline-meta {
293
+ margin-bottom: 0.5rem;
294
+ }
295
+
296
+ .timeline-track {
297
+ display: flex;
298
+ height: 28px;
299
+ border-radius: 6px;
300
+ overflow: hidden;
301
+ background: #252936;
302
+ }
303
+
304
+ .timeline-seg {
305
+ height: 100%;
306
+ min-width: 2px;
307
+ flex-shrink: 0;
308
+ }
309
+
310
+ .timeline-seg.user {
311
+ background: var(--user);
312
+ }
313
+
314
+ .timeline-seg.assistant {
315
+ background: var(--assistant);
316
+ }
317
+
318
+ .timeline-seg.tool {
319
+ background: var(--tool);
320
+ }
321
+
322
+ .timeline-seg.shell {
323
+ background: var(--shell);
324
+ }
325
+
326
+ .timeline-seg.other {
327
+ background: var(--other);
328
+ }
329
+
330
+ .timeline-legend {
331
+ display: flex;
332
+ flex-wrap: wrap;
333
+ gap: 0.75rem;
334
+ margin-top: 0.5rem;
335
+ font-size: 0.75rem;
336
+ color: var(--muted);
337
+ }
338
+
339
+ .timeline-legend .dot {
340
+ display: inline-block;
341
+ width: 8px;
342
+ height: 8px;
343
+ border-radius: 50%;
344
+ margin-right: 0.25rem;
345
+ vertical-align: middle;
346
+ }
347
+
348
+ .dot.user {
349
+ background: var(--user);
350
+ }
351
+
352
+ .dot.assistant {
353
+ background: var(--assistant);
354
+ }
355
+
356
+ .dot.tool {
357
+ background: var(--tool);
358
+ }
359
+
360
+ .dot.shell {
361
+ background: var(--shell);
362
+ }
363
+
364
+ .dot.other {
365
+ background: var(--other);
366
+ }
367
+
368
+ .flag-list,
369
+ .rec-list {
370
+ margin: 0;
371
+ padding-left: 1.1rem;
372
+ font-size: 0.9rem;
373
+ }
374
+
375
+ .flag-list li {
376
+ margin-bottom: 0.5rem;
377
+ }
378
+
379
+ .flag-list .sev {
380
+ font-size: 0.65rem;
381
+ font-weight: 700;
382
+ text-transform: uppercase;
383
+ color: var(--danger);
384
+ margin-right: 0.35rem;
385
+ }
386
+
387
+ .flag-list .sev.medium {
388
+ color: var(--tool);
389
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agent-profiler",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
4
  "description": "Local-first profiling for AI coding agents.",
5
5
  "keywords": [
6
6
  "agent",
@@ -27,11 +27,12 @@
27
27
  "files": [
28
28
  "dist/**/*",
29
29
  "README.md",
30
- "LICENSE"
30
+ "LICENSE",
31
+ "assets/dashboard.png"
31
32
  ],
32
33
  "scripts": {
33
34
  "dev": "tsx src/cli.ts",
34
- "build": "tsc && node --input-type=module -e \"import fs from 'node:fs'; fs.copyFileSync('src/core/schema.sql','dist/core/schema.sql'); try { fs.chmodSync('dist/cli.js', 0o755); } catch { /* non-Unix or read-only */ }\"",
35
+ "build": "tsc && node scripts/copy-build-assets.mjs",
35
36
  "start": "node dist/cli.js",
36
37
  "typecheck": "tsc --noEmit",
37
38
  "format": "prettier --check . --ignore-unknown --ignore-path .gitignore",
@@ -39,6 +40,7 @@
39
40
  "lint": "npm run typecheck",
40
41
  "lint-staged": "lint-staged",
41
42
  "smoke:cli": "node scripts/smoke-cli.js",
43
+ "smoke:dashboard": "node scripts/smoke-dashboard.mjs",
42
44
  "pack:dry-run": "npm run build && npm pack --dry-run --ignore-scripts",
43
45
  "prepare": "husky",
44
46
  "prepublishOnly": "npm run build && node scripts/prepublish-checks.js",