eminiar 0.9.1 → 0.10.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.
- package/.claude-plugin/plugin.json +1 -1
- package/README.md +15 -4
- package/dist/cli.js +3507 -317
- package/dist/hook.js +2189 -237
- package/dist/server.js +2938 -231
- package/dist/ui/app.global.js +60 -60
- package/dist/ui/styles.css +91 -0
- package/eminiar.config.schema.json +64 -0
- package/package.json +1 -1
- package/skills/em-purge/SKILL.md +2 -2
- package/skills/em-usage/SKILL.md +21 -0
package/dist/ui/styles.css
CHANGED
|
@@ -1685,3 +1685,94 @@ svg.glyph {
|
|
|
1685
1685
|
padding: 12px 16px;
|
|
1686
1686
|
}
|
|
1687
1687
|
}
|
|
1688
|
+
|
|
1689
|
+
/* --- usage tab ------------------------------------------------------------------------- */
|
|
1690
|
+
.usage-chart .line {
|
|
1691
|
+
fill: none;
|
|
1692
|
+
stroke: var(--accent);
|
|
1693
|
+
stroke-width: 1.5;
|
|
1694
|
+
}
|
|
1695
|
+
.usage-chart .compact {
|
|
1696
|
+
stroke: var(--warn);
|
|
1697
|
+
stroke-width: 1;
|
|
1698
|
+
stroke-dasharray: 3 3;
|
|
1699
|
+
}
|
|
1700
|
+
.usage-chart circle.dot {
|
|
1701
|
+
stroke: var(--card);
|
|
1702
|
+
stroke-width: 1;
|
|
1703
|
+
}
|
|
1704
|
+
.usage-legend {
|
|
1705
|
+
display: inline-flex;
|
|
1706
|
+
flex-wrap: wrap;
|
|
1707
|
+
gap: 8px;
|
|
1708
|
+
}
|
|
1709
|
+
.tag.sev-info {
|
|
1710
|
+
color: var(--accent);
|
|
1711
|
+
border-color: var(--accent);
|
|
1712
|
+
}
|
|
1713
|
+
.tag.sev-warn {
|
|
1714
|
+
color: var(--warn);
|
|
1715
|
+
border-color: var(--warn);
|
|
1716
|
+
}
|
|
1717
|
+
.tag.sev-high {
|
|
1718
|
+
color: var(--bad);
|
|
1719
|
+
border-color: var(--bad);
|
|
1720
|
+
}
|
|
1721
|
+
.insights {
|
|
1722
|
+
display: flex;
|
|
1723
|
+
flex-direction: column;
|
|
1724
|
+
gap: 8px;
|
|
1725
|
+
}
|
|
1726
|
+
.insight {
|
|
1727
|
+
padding: 8px 10px;
|
|
1728
|
+
border: 1px solid var(--line);
|
|
1729
|
+
border-left-width: 3px;
|
|
1730
|
+
border-radius: 6px;
|
|
1731
|
+
}
|
|
1732
|
+
.insight.info {
|
|
1733
|
+
border-left-color: var(--accent);
|
|
1734
|
+
}
|
|
1735
|
+
.insight.warn {
|
|
1736
|
+
border-left-color: var(--warn);
|
|
1737
|
+
}
|
|
1738
|
+
.insight.high {
|
|
1739
|
+
border-left-color: var(--bad);
|
|
1740
|
+
}
|
|
1741
|
+
.insight .p {
|
|
1742
|
+
font-size: 12px;
|
|
1743
|
+
margin-top: 3px;
|
|
1744
|
+
}
|
|
1745
|
+
.score {
|
|
1746
|
+
margin-bottom: 8px;
|
|
1747
|
+
}
|
|
1748
|
+
.scorebar {
|
|
1749
|
+
display: block;
|
|
1750
|
+
height: 6px;
|
|
1751
|
+
margin: 4px 0;
|
|
1752
|
+
background: var(--line);
|
|
1753
|
+
border-radius: 3px;
|
|
1754
|
+
overflow: hidden;
|
|
1755
|
+
}
|
|
1756
|
+
.scorebar i {
|
|
1757
|
+
display: block;
|
|
1758
|
+
height: 100%;
|
|
1759
|
+
background: var(--accent);
|
|
1760
|
+
}
|
|
1761
|
+
.scorebar i.ok {
|
|
1762
|
+
background: var(--ok);
|
|
1763
|
+
}
|
|
1764
|
+
.scorebar i.warn {
|
|
1765
|
+
background: var(--warn);
|
|
1766
|
+
}
|
|
1767
|
+
.scorebar i.bad {
|
|
1768
|
+
background: var(--bad);
|
|
1769
|
+
}
|
|
1770
|
+
.reasons {
|
|
1771
|
+
margin: 2px 0 0;
|
|
1772
|
+
padding-left: 16px;
|
|
1773
|
+
color: var(--muted);
|
|
1774
|
+
font-size: 12px;
|
|
1775
|
+
}
|
|
1776
|
+
.reasons li {
|
|
1777
|
+
margin: 1px 0;
|
|
1778
|
+
}
|
|
@@ -425,6 +425,70 @@
|
|
|
425
425
|
}
|
|
426
426
|
}
|
|
427
427
|
}
|
|
428
|
+
},
|
|
429
|
+
"usage": {
|
|
430
|
+
"default": {},
|
|
431
|
+
"type": "object",
|
|
432
|
+
"properties": {
|
|
433
|
+
"enabled": {
|
|
434
|
+
"default": true,
|
|
435
|
+
"type": "boolean"
|
|
436
|
+
},
|
|
437
|
+
"budgets": {
|
|
438
|
+
"default": {},
|
|
439
|
+
"type": "object",
|
|
440
|
+
"properties": {
|
|
441
|
+
"sessionUsd": {
|
|
442
|
+
"type": "number",
|
|
443
|
+
"exclusiveMinimum": 0
|
|
444
|
+
},
|
|
445
|
+
"dailyUsd": {
|
|
446
|
+
"type": "number",
|
|
447
|
+
"exclusiveMinimum": 0
|
|
448
|
+
},
|
|
449
|
+
"turnUsd": {
|
|
450
|
+
"type": "number",
|
|
451
|
+
"exclusiveMinimum": 0
|
|
452
|
+
}
|
|
453
|
+
}
|
|
454
|
+
},
|
|
455
|
+
"pricing": {
|
|
456
|
+
"default": {},
|
|
457
|
+
"type": "object",
|
|
458
|
+
"propertyNames": {
|
|
459
|
+
"type": "string"
|
|
460
|
+
},
|
|
461
|
+
"additionalProperties": {
|
|
462
|
+
"type": "object",
|
|
463
|
+
"properties": {
|
|
464
|
+
"input": {
|
|
465
|
+
"type": "number",
|
|
466
|
+
"minimum": 0
|
|
467
|
+
},
|
|
468
|
+
"output": {
|
|
469
|
+
"type": "number",
|
|
470
|
+
"minimum": 0
|
|
471
|
+
},
|
|
472
|
+
"cacheWrite5m": {
|
|
473
|
+
"type": "number",
|
|
474
|
+
"minimum": 0
|
|
475
|
+
},
|
|
476
|
+
"cacheWrite1h": {
|
|
477
|
+
"type": "number",
|
|
478
|
+
"minimum": 0
|
|
479
|
+
},
|
|
480
|
+
"cacheRead": {
|
|
481
|
+
"type": "number",
|
|
482
|
+
"minimum": 0
|
|
483
|
+
}
|
|
484
|
+
}
|
|
485
|
+
}
|
|
486
|
+
},
|
|
487
|
+
"statusline": {
|
|
488
|
+
"default": true,
|
|
489
|
+
"type": "boolean"
|
|
490
|
+
}
|
|
491
|
+
}
|
|
428
492
|
}
|
|
429
493
|
},
|
|
430
494
|
"title": "eminiar.config.json",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "eminiar",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.10.0",
|
|
4
4
|
"description": "Local-first context, memory and knowledge-graph plugin for Claude Code. Sandboxed execution, FTS5 + vector search, session continuity, and a code graph — nothing leaves your machine.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
package/skills/em-purge/SKILL.md
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: em-purge
|
|
3
|
-
description: Permanently delete eminiar data for this project (index, sessions, graph, memories or all).
|
|
3
|
+
description: Permanently delete eminiar data for this project (index, sessions, graph, memories, usage or all).
|
|
4
4
|
user-invocable: true
|
|
5
5
|
disable-model-invocation: true
|
|
6
|
-
argument-hint: <index|sessions|graph|memories|all>
|
|
6
|
+
argument-hint: <index|sessions|graph|memories|usage|all>
|
|
7
7
|
allowed-tools: mcp__plugin_eminiar_eminiar__em_purge
|
|
8
8
|
---
|
|
9
9
|
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: em-usage
|
|
3
|
+
description: Show token, cache and cost insights for Claude Code sessions (cost today / this week, cache hit rate, per-model and per-session breakdowns, 5-hour billing blocks and burn rate, the context timeline of a session, which tools fill the context, detected insights with scores, and what eminiar saved), from the transcripts on this machine.
|
|
4
|
+
user-invocable: true
|
|
5
|
+
allowed-tools: mcp__plugin_eminiar_eminiar__em_usage
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
Call `em_usage` and show the result verbatim. Map what the user asked for onto the view:
|
|
9
|
+
|
|
10
|
+
- nothing, "usage", "cost", "how much" → `view: "summary"` (project scope)
|
|
11
|
+
- "this session", "my session" → `scope: "session"`
|
|
12
|
+
- "per day" / "per week" / "per month" → `daily` / `weekly` / `monthly`
|
|
13
|
+
- "which model", "models" → `models`; "sessions" → `sessions`; "blocks", "5-hour", "burn" → `blocks`
|
|
14
|
+
- "context", "turns", "compactions" → `scope: "session", view: "turns"`
|
|
15
|
+
- "which tools", "what fills the context" → `tools`
|
|
16
|
+
- "insights", "what should I change", "why is it expensive" → `insights`
|
|
17
|
+
- "what did eminiar save" → `savings`
|
|
18
|
+
|
|
19
|
+
Pass `since` when the user names a period (`30d`, `12h`, an ISO date). Costs are estimates at
|
|
20
|
+
list price and everything stays local. Do not add commentary beyond one line; if an insight has a
|
|
21
|
+
recommendation, that line is the recommendation.
|