eminiar 0.13.0 → 0.13.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.
- package/.claude-plugin/plugin.json +1 -1
- package/.cursor-plugin/plugin.json +1 -1
- package/README.md +43 -15
- package/bin/_resolve.sh +7 -4
- package/bin/em-hook +2 -1
- package/bin/em-server +2 -1
- package/bin/eminiar +2 -1
- package/dist/cli.js +1502 -224
- package/dist/{hook-async-4MIP3VHX.js → hook-async-J3UKDO62.js} +3 -3
- package/dist/{hook-chunk-IYHVLMJ4.js → hook-chunk-BECSRJFD.js} +26 -11
- package/dist/{hook-chunk-MVOBVFQL.js → hook-chunk-DSLVDGOB.js} +57 -12
- package/dist/{hook-chunk-77I6QQ43.js → hook-chunk-RYZAFUTT.js} +2 -2
- package/dist/{hook-hooks-U6GDOQSY.js → hook-hooks-IDTGXCFD.js} +8 -6
- package/dist/hook.js +234 -57
- package/dist/server.js +80 -43
- package/dist/ui/app.global.js +78 -72
- package/dist/ui/styles.css +4724 -1508
- package/package.json +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "eminiar",
|
|
3
3
|
"displayName": "Eminiar",
|
|
4
|
-
"version": "0.13.
|
|
4
|
+
"version": "0.13.1",
|
|
5
5
|
"description": "Local-first context, memory and knowledge graph for Claude Code: sandboxed execution, FTS5 + vector search, session continuity, code graph.",
|
|
6
6
|
"author": {
|
|
7
7
|
"name": "Ryan Dick"
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "eminiar",
|
|
3
3
|
"displayName": "Eminiar",
|
|
4
|
-
"version": "0.13.
|
|
4
|
+
"version": "0.13.1",
|
|
5
5
|
"description": "Local-first context, memory and knowledge graph for coding agents: sandboxed execution, FTS5 + vector search, session continuity, code graph.",
|
|
6
6
|
"author": {
|
|
7
7
|
"name": "Ryan Dick"
|
package/README.md
CHANGED
|
@@ -17,11 +17,11 @@
|
|
|
17
17
|
<br/>
|
|
18
18
|
|
|
19
19
|
<picture>
|
|
20
|
-
<source media="(prefers-color-scheme: dark)" srcset="docs/images/dashboard-
|
|
21
|
-
<img alt="The eminiar dashboard:
|
|
20
|
+
<source media="(prefers-color-scheme: dark)" srcset="docs/images/dashboard-swarm-dark.webp">
|
|
21
|
+
<img alt="The eminiar Swarms dashboard: progress rings, run stats and the live topology of a swarm run" src="docs/images/dashboard-swarm-light.webp" width="900">
|
|
22
22
|
</picture>
|
|
23
23
|
|
|
24
|
-
<sub>The
|
|
24
|
+
<sub>The Swarms dashboard: progress rings, run stats and the live topology of a run.</sub>
|
|
25
25
|
|
|
26
26
|
</div>
|
|
27
27
|
|
|
@@ -88,6 +88,11 @@ Recall matches a memory when the prompt names it, one of its tags, a file it men
|
|
|
88
88
|
symbol from that file. A memory can come back later in a long session. To see why a memory did
|
|
89
89
|
or did not appear, run `eminiar recall --explain "<prompt>"`.
|
|
90
90
|
|
|
91
|
+
| | |
|
|
92
|
+
|:---:|:---:|
|
|
93
|
+
| [<img alt="Memory: the list of memories by kind, and one decision with its tags, linked files and text" src="docs/images/dashboard-memory-dark.webp" width="430">](docs/dashboard.md#memory) | [<img alt="Memory graph: memories linked to the files, tags and topics they are about" src="docs/images/dashboard-memory-graph-dark.webp" width="430">](docs/dashboard.md#memory) |
|
|
94
|
+
| **Memory:** read and edit every memory | **Memory graph:** what each memory is about |
|
|
95
|
+
|
|
91
96
|
### 🕸️ Code knowledge graph — a map before an edit
|
|
92
97
|
|
|
93
98
|
tree-sitter parses TypeScript, JavaScript, Python, Go and PHP into files, symbols, imports, calls,
|
|
@@ -100,6 +105,11 @@ Memories and documentation share the same graph. Each memory links to the files
|
|
|
100
105
|
mentions, and each doc source links to the code that uses it. One graph answers *"what do we
|
|
101
106
|
know about this file?"*
|
|
102
107
|
|
|
108
|
+
| | |
|
|
109
|
+
|:---:|:---:|
|
|
110
|
+
| [<img alt="Galaxy: the knowledge graph of files and symbols around a file, by imports, calls and references" src="docs/images/dashboard-galaxy-dark.webp" width="430">](docs/dashboard.md#galaxy) | [<img alt="Explore: the source of a file with its impact, dependents and linked memories" src="docs/images/dashboard-explore-dark.webp" width="430">](docs/dashboard.md#explore) |
|
|
111
|
+
| **Galaxy:** the knowledge graph | **Explore:** source, impact and linked memories |
|
|
112
|
+
|
|
103
113
|
### 📜 Git history, read for Claude
|
|
104
114
|
|
|
105
115
|
`em_history` classifies every commit (feat, fix, refactor, perf …). It traces each fix back to
|
|
@@ -110,12 +120,19 @@ The history graph connects branches to their commits, commits to the files they
|
|
|
110
120
|
those files to the memories and docs about them. Merged and deleted branches keep their commits.
|
|
111
121
|
A fix points at the commit it repairs.
|
|
112
122
|
|
|
123
|
+
| | |
|
|
124
|
+
|:---:|:---:|
|
|
125
|
+
| [<img alt="History: commits classified by kind, with the branch graph" src="docs/images/dashboard-history-dark.webp" width="430">](docs/dashboard.md#history) | [<img alt="History graph: branches, their commits, and the files, memories and docs they touched" src="docs/images/dashboard-history-graph-dark.webp" width="430">](docs/dashboard.md#history) |
|
|
126
|
+
| **History:** classified commits and fix tracing | **History graph:** branches to files and memories |
|
|
127
|
+
|
|
113
128
|
### 📚 Documentation knowledge base
|
|
114
129
|
|
|
115
130
|
`em_docs` finds your local docs (READMEs, ADRs, OpenAPI, Postman) and the libraries, services
|
|
116
131
|
and third-party APIs your code calls. It indexes their documentation locally. OpenAPI specs are
|
|
117
132
|
split into one section per endpoint, so a lookup returns the exact operation.
|
|
118
133
|
|
|
134
|
+
[<img alt="Docs: discovered local docs, catalog libraries and registry packages, ready to index" src="docs/images/dashboard-docs-dark.webp" width="640">](docs/dashboard.md#docs)
|
|
135
|
+
|
|
119
136
|
### 💸 Usage insights — what each session really costs
|
|
120
137
|
|
|
121
138
|
`em_usage` reads the transcripts Claude Code keeps on your machine and records tokens, cache
|
|
@@ -125,14 +142,25 @@ session with its compactions, which tools fill the context, insights with recomm
|
|
|
125
142
|
what eminiar's own tools saved in dollars. Everything stays local; cost is an estimate at list
|
|
126
143
|
price ([details](docs/usage.md)).
|
|
127
144
|
|
|
145
|
+
[<img alt="Usage: cost per day by model, cache hit rate, burn rate and session scores" src="docs/images/dashboard-usage-dark.webp" width="640">](docs/dashboard.md#usage)
|
|
146
|
+
|
|
128
147
|
### 🐝 Agent swarms (opt-in)
|
|
129
148
|
|
|
130
149
|
Declare worker roles in `.eminiar/swarm.yaml`, with their prompts, models, tools, skills and
|
|
131
150
|
hooks. eminiar generates a Claude Code agent file per role. `/eminiar:em-swarm <swarm> <goal>`
|
|
132
151
|
makes the main session the coordinator: it plans small tasks, fans workers out in parallel and
|
|
133
152
|
reviews what comes back. Every worker starts with the memories, history risk and hot files for
|
|
134
|
-
its task. Capacity limits, a shared blackboard and a
|
|
135
|
-
it. Nothing changes until you run `eminiar swarm init` ([details](docs/swarms.md)).
|
|
153
|
+
its task. Capacity limits, a shared blackboard and a Swarms tab in the dashboard (a live run
|
|
154
|
+
monitor, plus a visual editor for the swarm file) come with it. Nothing changes until you run `eminiar swarm init` ([details](docs/swarms.md)).
|
|
155
|
+
|
|
156
|
+
The run monitor shows progress, workers and the topology as a run happens. The configuration
|
|
157
|
+
studio edits roles, models and topology without hand-written YAML
|
|
158
|
+
([monitor](docs/dashboard.md#swarms), [studio](docs/swarms.md#edit-in-the-dashboard)).
|
|
159
|
+
|
|
160
|
+
| | |
|
|
161
|
+
|:---:|:---:|
|
|
162
|
+
| [<img alt="Swarm run: progress rings, task and worker counts, and the live topology of a run" src="docs/images/dashboard-swarm-dark.webp" width="430">](docs/dashboard.md#swarms) | [<img alt="Swarm configuration studio: swarms, topology picker and the swarm file" src="docs/images/dashboard-swarm-config-dark.webp" width="430">](docs/dashboard.md#configure) |
|
|
163
|
+
| **Run monitor:** progress, workers, topology | **Configuration studio:** edit the swarm file visually |
|
|
136
164
|
|
|
137
165
|
### ⚖️ Adjudicator (opt-in)
|
|
138
166
|
|
|
@@ -146,17 +174,10 @@ off: `eminiar adjudicator enable` ([details](docs/adjudicator.md)).
|
|
|
146
174
|
### 📊 Local dashboard
|
|
147
175
|
|
|
148
176
|
`eminiar ui` opens a local web app with token savings, usage and cost, a source explorer with
|
|
149
|
-
impact analysis, a graph "galaxy",
|
|
150
|
-
graph, a
|
|
177
|
+
impact analysis, a graph "galaxy", a history explorer with a history graph, a memory editor with a
|
|
178
|
+
memory graph, a docs manager, and a swarm monitor with a configuration studio.
|
|
151
179
|
|
|
152
|
-
|
|
153
|
-
|:---:|:---:|
|
|
154
|
-
| [<img alt="Galaxy: the knowledge graph around a file" src="docs/images/dashboard-galaxy-dark.webp" width="430">](docs/dashboard.md#galaxy) | [<img alt="Usage: cost per day by model, cache hit rate, burn rate and session scores" src="docs/images/dashboard-usage-dark.webp" width="430">](docs/dashboard.md#usage) |
|
|
155
|
-
| **Galaxy:** the knowledge graph | **Usage:** cost, cache and burn rate |
|
|
156
|
-
| [<img alt="History graph: branches, their commits, and the files, memories and docs they touched" src="docs/images/dashboard-history-graph-dark.webp" width="430">](docs/dashboard.md#history) | [<img alt="Memory graph: memories linked to the files, tags and topics they are about" src="docs/images/dashboard-memory-graph-dark.webp" width="430">](docs/dashboard.md#memory) |
|
|
157
|
-
| **History graph:** branches to files and memories | **Memory graph:** what each memory is about |
|
|
158
|
-
| [<img alt="History: commits classified by kind, with the branch graph" src="docs/images/dashboard-history-dark.webp" width="430">](docs/dashboard.md#history) | [<img alt="Hotspots: fan-in, churn and complexity per file" src="docs/images/dashboard-hotspots-dark.webp" width="430">](docs/dashboard.md#architecture) |
|
|
159
|
-
| **History:** classified commits and fix tracing | **Hotspots:** where change is risky |
|
|
180
|
+
[<img alt="Overview: tokens kept out of context, savings per session, project and lifetime, the active swarm run and savings by tool" src="docs/images/dashboard-overview-dark.webp" width="640">](docs/dashboard.md#overview)
|
|
160
181
|
|
|
161
182
|
## What Claude sees
|
|
162
183
|
|
|
@@ -272,6 +293,13 @@ Your code, tool output and memories stay on your machine. eminiar uses the netwo
|
|
|
272
293
|
|
|
273
294
|
The dashboard listens on `127.0.0.1` only.
|
|
274
295
|
|
|
296
|
+
## About
|
|
297
|
+
|
|
298
|
+
eminiar is for people who use Claude Code or Cursor on a real codebase and want it to remember
|
|
299
|
+
decisions, see the structure of the code and stop filling its context with raw output. It is
|
|
300
|
+
local-first: one SQLite database per project, no cloud service, and the dashboard listens on
|
|
301
|
+
`127.0.0.1` only. It is open source under the MIT license, written by Ryan Dick.
|
|
302
|
+
|
|
275
303
|
## License
|
|
276
304
|
|
|
277
305
|
MIT © Ryan Dick
|
package/bin/_resolve.sh
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
# but no node_modules/, so dist/*.js cannot import better-sqlite3 and friends. The
|
|
8
8
|
# installer pins the stable copy (~/.eminiar/plugin/node_modules/eminiar, with its
|
|
9
9
|
# dependencies beside it) in $EMINIAR_HOME/root-path; when the directory this shim
|
|
10
|
-
# lives in cannot
|
|
10
|
+
# lives in cannot run (see em_runnable), we run the pinned copy's dist/ instead.
|
|
11
11
|
EM_HOME="${EMINIAR_HOME:-$HOME/.eminiar}"
|
|
12
12
|
# EM_SELF: the shim's real path when it was reached through a symlink (bin/eminiar).
|
|
13
13
|
DIR="$(cd "$(dirname "${EM_SELF:-$0}")/.." && pwd)"
|
|
@@ -28,9 +28,12 @@ if [ ! -x "$NODE" ]; then
|
|
|
28
28
|
NODE="$(command -v node 2>/dev/null)"
|
|
29
29
|
fi
|
|
30
30
|
|
|
31
|
-
# A package root is runnable when
|
|
32
|
-
# (dev checkout, npm -g) or beside it (stable copy
|
|
31
|
+
# A package root is runnable when the dist/ entry this shim runs (EM_ENTRY) is built and its
|
|
32
|
+
# dependencies resolve: node_modules/ inside it (dev checkout, npm -g) or beside it (stable copy
|
|
33
|
+
# inside ~/.eminiar/plugin/node_modules). A copy Claude Code makes from a git marketplace has
|
|
34
|
+
# node_modules/ (Claude Code installs the dependencies) but no dist/, which is gitignored.
|
|
33
35
|
em_runnable() {
|
|
36
|
+
[ -f "$1/dist/${EM_ENTRY:-server}.js" ] || return 1
|
|
34
37
|
[ -e "$1/node_modules/better-sqlite3/package.json" ] || [ -e "$1/../better-sqlite3/package.json" ]
|
|
35
38
|
}
|
|
36
39
|
|
|
@@ -39,7 +42,7 @@ if ! em_runnable "$DIR"; then
|
|
|
39
42
|
RUN=""
|
|
40
43
|
if [ -f "$EM_HOME/root-path" ]; then
|
|
41
44
|
ALT="$(cat "$EM_HOME/root-path" 2>/dev/null)"
|
|
42
|
-
if [ -n "$ALT" ] &&
|
|
45
|
+
if [ -n "$ALT" ] && em_runnable "$ALT"; then
|
|
43
46
|
RUN="$ALT"
|
|
44
47
|
# Point version/grammar lookups at the code that actually runs; keep the
|
|
45
48
|
# launch directory for diagnostics (em_doctor shows "launched from").
|
package/bin/em-hook
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
#!/bin/sh
|
|
2
2
|
# Hook entry shim. Node and package-root resolution live in _resolve.sh.
|
|
3
3
|
# A hook must never block Claude: if nothing can run, print an empty JSON object.
|
|
4
|
+
EM_ENTRY=hook
|
|
4
5
|
. "$(dirname "$0")/_resolve.sh"
|
|
5
6
|
# Swarm enforcement fails closed: when nothing can run, an Agent/Task call in a project whose
|
|
6
7
|
# .eminiar/swarm.yaml says `enforce: true` is denied. Reads stdin only here; every other call
|
|
@@ -80,7 +81,7 @@ if [ ! -x "$NODE" ]; then
|
|
|
80
81
|
exit 0
|
|
81
82
|
fi
|
|
82
83
|
if [ -z "$RUN" ]; then
|
|
83
|
-
echo "eminiar hook: $DIR
|
|
84
|
+
echo "eminiar hook: $DIR cannot run (no dist/hook.js or node_modules) and no stable copy is pinned (run: npx eminiar install)" >&2
|
|
84
85
|
[ -n "$EM_GATE" ] && exit 1
|
|
85
86
|
swarm_gate "$@" && echo '{}'
|
|
86
87
|
exit 0
|
package/bin/em-server
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
#!/bin/sh
|
|
2
2
|
# MCP server shim (stdio). Node and package-root resolution live in _resolve.sh.
|
|
3
|
+
EM_ENTRY=server
|
|
3
4
|
. "$(dirname "$0")/_resolve.sh"
|
|
4
5
|
if [ ! -x "$NODE" ]; then
|
|
5
6
|
echo "eminiar: no node binary found (run: npx eminiar install)" >&2
|
|
6
7
|
exit 1
|
|
7
8
|
fi
|
|
8
9
|
if [ -z "$RUN" ]; then
|
|
9
|
-
echo "eminiar: $DIR
|
|
10
|
+
echo "eminiar: $DIR cannot run (no dist/server.js or node_modules) and no stable copy is pinned in $EM_HOME/root-path (run: npx eminiar install)" >&2
|
|
10
11
|
exit 1
|
|
11
12
|
fi
|
|
12
13
|
exec "$NODE" "$RUN/dist/server.js" "$@"
|
package/bin/eminiar
CHANGED
|
@@ -10,13 +10,14 @@ while [ -L "$EM_SELF" ]; do
|
|
|
10
10
|
*) EM_SELF="$(dirname "$EM_SELF")/$EM_LINK" ;;
|
|
11
11
|
esac
|
|
12
12
|
done
|
|
13
|
+
EM_ENTRY=cli
|
|
13
14
|
. "$(dirname "$EM_SELF")/_resolve.sh"
|
|
14
15
|
if [ ! -x "$NODE" ]; then
|
|
15
16
|
echo "eminiar: node >= 22.12 is required" >&2
|
|
16
17
|
exit 1
|
|
17
18
|
fi
|
|
18
19
|
if [ -z "$RUN" ]; then
|
|
19
|
-
echo "eminiar: $DIR
|
|
20
|
+
echo "eminiar: $DIR cannot run (no dist/cli.js or node_modules) and no stable copy is pinned in $EM_HOME/root-path (run: npx eminiar install)" >&2
|
|
20
21
|
exit 1
|
|
21
22
|
fi
|
|
22
23
|
exec "$NODE" "$RUN/dist/cli.js" "$@"
|