somtum 1.2.0 → 1.2.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/README.md +315 -92
- package/dist/cli/doctor.d.ts.map +1 -1
- package/dist/cli/doctor.js +10 -1
- package/dist/cli/doctor.js.map +1 -1
- package/dist/cli/hook.d.ts.map +1 -1
- package/dist/cli/hook.js +23 -11
- package/dist/cli/hook.js.map +1 -1
- package/dist/cli/index.js +10 -5
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/serve.d.ts +4 -7
- package/dist/cli/serve.d.ts.map +1 -1
- package/dist/cli/serve.js +8 -6
- package/dist/cli/serve.js.map +1 -1
- package/dist/cli/stats.d.ts.map +1 -1
- package/dist/cli/stats.js +14 -0
- package/dist/cli/stats.js.map +1 -1
- package/dist/dashboard/index.html +1323 -1011
- package/dist/hooks/post_session.d.ts.map +1 -1
- package/dist/hooks/post_session.js +18 -1
- package/dist/hooks/post_session.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -20,9 +20,10 @@ Zero-config: one `somtum init` in an existing Claude Code project and every sess
|
|
|
20
20
|
- [Requirements](#requirements)
|
|
21
21
|
- [Install](#install)
|
|
22
22
|
- [Quickstart](#quickstart)
|
|
23
|
+
- [Verifying the setup](#verifying-the-setup)
|
|
24
|
+
- [Dashboard](#dashboard)
|
|
23
25
|
- [CLI Reference](#cli-reference)
|
|
24
26
|
- [MCP Server](#mcp-server)
|
|
25
|
-
- [Dashboard](#dashboard)
|
|
26
27
|
- [Storage Layout](#storage-layout)
|
|
27
28
|
- [Configuration](#configuration)
|
|
28
29
|
- [Privacy](#privacy)
|
|
@@ -102,17 +103,17 @@ LLM agents like Claude Code typically start every session with a "blank slate."
|
|
|
102
103
|
## Requirements
|
|
103
104
|
|
|
104
105
|
- **Node 20+**
|
|
105
|
-
- **
|
|
106
|
-
- **`ANTHROPIC_API_KEY`** — used by the capture hook to summarise session transcripts via Claude Haiku, and optionally by the `index` and `hybrid` retrieval strategies
|
|
106
|
+
- **Claude Code** — Somtum hooks into Claude Code's `SessionEnd`, `UserPromptSubmit`, and `PreToolUse` events
|
|
107
|
+
- **`ANTHROPIC_API_KEY`** — used by the capture hook to summarise session transcripts via Claude Haiku, and optionally by the `index` and `hybrid` retrieval strategies. **Must be exported in your shell profile** (see [Quickstart](#quickstart) — step 1 explains why)
|
|
108
|
+
|
|
109
|
+
> `pnpm` is only required if building from source. Global npm/yarn installs have no pnpm dependency.
|
|
107
110
|
|
|
108
111
|
---
|
|
109
112
|
|
|
110
113
|
## Install
|
|
111
114
|
|
|
112
|
-
### From npm / yarn / pnpm
|
|
113
|
-
|
|
114
115
|
```bash
|
|
115
|
-
# npm
|
|
116
|
+
# npm (recommended for global install)
|
|
116
117
|
npm install -g somtum
|
|
117
118
|
|
|
118
119
|
# yarn
|
|
@@ -126,8 +127,6 @@ Or as a project dependency:
|
|
|
126
127
|
|
|
127
128
|
```bash
|
|
128
129
|
npm install somtum
|
|
129
|
-
yarn add somtum
|
|
130
|
-
pnpm add somtum
|
|
131
130
|
```
|
|
132
131
|
|
|
133
132
|
### From source
|
|
@@ -137,67 +136,173 @@ git clone https://github.com/riz007/somtum
|
|
|
137
136
|
cd somtum
|
|
138
137
|
pnpm install
|
|
139
138
|
pnpm build
|
|
140
|
-
# Optional: link globally
|
|
141
139
|
pnpm link --global
|
|
142
140
|
```
|
|
143
141
|
|
|
144
142
|
### Native module note
|
|
145
143
|
|
|
146
|
-
Somtum uses [`better-sqlite3`](https://github.com/WiseLibs/better-sqlite3), which contains a native C++ addon. On most platforms (macOS, Linux x64/arm64, Windows x64) a prebuilt binary is downloaded automatically. On Alpine Linux / musl or unusual architectures the addon compiles from source
|
|
144
|
+
Somtum uses [`better-sqlite3`](https://github.com/WiseLibs/better-sqlite3), which contains a native C++ addon. On most platforms (macOS, Linux x64/arm64, Windows x64) a prebuilt binary is downloaded automatically. On Alpine Linux / musl or unusual architectures the addon compiles from source — `python`, `make`, and `gcc` must be available. If the install fails with a node-gyp error, install those build tools and retry.
|
|
147
145
|
|
|
148
146
|
---
|
|
149
147
|
|
|
150
148
|
## Quickstart
|
|
151
149
|
|
|
150
|
+
### Step 1 — Set your Anthropic API key in your shell profile
|
|
151
|
+
|
|
152
|
+
> **This is the most important step.** When a Claude Code session ends, the `SessionEnd` hook runs as a subprocess launched by Claude Code. That subprocess inherits its environment from the shell that _started_ Claude Code — not from the current terminal window. If the key is only `export`-ed in an interactive session, the hook will not see it and extraction will silently fail.
|
|
153
|
+
|
|
154
|
+
Add to `~/.zshrc` (or `~/.bashrc`, `~/.bash_profile`):
|
|
155
|
+
|
|
156
|
+
```bash
|
|
157
|
+
export ANTHROPIC_API_KEY="sk-ant-..."
|
|
158
|
+
```
|
|
159
|
+
|
|
160
|
+
Then reload your shell:
|
|
161
|
+
|
|
162
|
+
```bash
|
|
163
|
+
source ~/.zshrc # or open a new terminal
|
|
164
|
+
```
|
|
165
|
+
|
|
166
|
+
Confirm it's available:
|
|
167
|
+
|
|
168
|
+
```bash
|
|
169
|
+
echo $ANTHROPIC_API_KEY # should print your key
|
|
170
|
+
```
|
|
171
|
+
|
|
172
|
+
### Step 2 — Install inside a Claude Code project
|
|
173
|
+
|
|
174
|
+
Run this from the **root of the project you work in with Claude Code**:
|
|
175
|
+
|
|
152
176
|
```bash
|
|
153
|
-
# 1. Inside an existing Claude Code project:
|
|
154
177
|
somtum init
|
|
178
|
+
```
|
|
179
|
+
|
|
180
|
+
This writes a `SessionEnd` hook into `.claude/settings.json` in the current directory. Claude Code reads that file automatically when you open a session from the same directory.
|
|
181
|
+
|
|
182
|
+
To enable all features at once:
|
|
183
|
+
|
|
184
|
+
```bash
|
|
185
|
+
somtum init --all
|
|
186
|
+
# Installs:
|
|
187
|
+
# - SessionEnd capture hook (memory extraction)
|
|
188
|
+
# - UserPromptSubmit cache hook (prompt cache lookup)
|
|
189
|
+
# - PreToolUse file-gating hook (file read summaries)
|
|
190
|
+
# - MCP server in .mcp.json (Claude can call recall/remember tools)
|
|
191
|
+
```
|
|
192
|
+
|
|
193
|
+
### Step 3 — Use Claude Code normally
|
|
194
|
+
|
|
195
|
+
Open a Claude Code session **from the same directory** where you ran `somtum init`. Work as you normally would. When the session ends, the hook extracts observations automatically in the background (capped at 90 seconds so it never blocks you).
|
|
155
196
|
|
|
156
|
-
|
|
157
|
-
# Use Claude Code as normal — observations are captured at session end.
|
|
197
|
+
### Step 4 — Check your memory
|
|
158
198
|
|
|
159
|
-
|
|
199
|
+
```bash
|
|
200
|
+
# How many observations were captured?
|
|
201
|
+
somtum stats
|
|
202
|
+
|
|
203
|
+
# Search memory
|
|
160
204
|
somtum search "auth jwt rotation"
|
|
161
205
|
somtum search "why we use pnpm" --strategy hybrid
|
|
162
206
|
|
|
163
|
-
#
|
|
164
|
-
somtum
|
|
207
|
+
# Open the visual dashboard
|
|
208
|
+
somtum serve
|
|
209
|
+
```
|
|
210
|
+
|
|
211
|
+
If `somtum stats` shows `memories 0` after a session, see [Troubleshooting](#troubleshooting).
|
|
212
|
+
|
|
213
|
+
### Step 5 — Diagnose any issues
|
|
214
|
+
|
|
215
|
+
```bash
|
|
216
|
+
somtum doctor
|
|
217
|
+
```
|
|
218
|
+
|
|
219
|
+
This checks your API key, DB health, hook installation, migrations, cache, and breakeven ratio. It will tell you exactly what is misconfigured and how to fix it.
|
|
220
|
+
|
|
221
|
+
---
|
|
222
|
+
|
|
223
|
+
## Verifying the setup
|
|
224
|
+
|
|
225
|
+
After your **first** Claude Code session ends:
|
|
226
|
+
|
|
227
|
+
**1. Check the hook log**
|
|
228
|
+
|
|
229
|
+
Every hook run appends a timestamped line to `~/.somtum/hook.log`:
|
|
230
|
+
|
|
231
|
+
```bash
|
|
232
|
+
cat ~/.somtum/hook.log
|
|
233
|
+
```
|
|
234
|
+
|
|
235
|
+
A successful run looks like:
|
|
236
|
+
|
|
237
|
+
```
|
|
238
|
+
2026-04-30T10:15:42.123Z [post_session] starting
|
|
239
|
+
2026-04-30T10:15:44.891Z [post_session] ok — inserted=4 cache=2 summaries=1
|
|
240
|
+
```
|
|
241
|
+
|
|
242
|
+
A failed run with a missing API key looks like:
|
|
243
|
+
|
|
244
|
+
```
|
|
245
|
+
2026-04-30T10:15:42.123Z [post_session] WARN: ANTHROPIC_API_KEY not set — extraction will fail
|
|
246
|
+
2026-04-30T10:15:42.131Z [post_session] ERROR: 401 authentication_error
|
|
247
|
+
```
|
|
165
248
|
|
|
166
|
-
|
|
249
|
+
**2. Check stats**
|
|
250
|
+
|
|
251
|
+
```bash
|
|
167
252
|
somtum stats
|
|
253
|
+
```
|
|
168
254
|
|
|
169
|
-
|
|
170
|
-
|
|
255
|
+
You should see `memories` > 0 after a substantive session. Short test sessions may yield 0 observations if there is nothing worth extracting (Claude Code did not make decisions, fix bugs, or learn anything the extractor considers durable).
|
|
256
|
+
|
|
257
|
+
**3. Run doctor**
|
|
171
258
|
|
|
172
|
-
|
|
259
|
+
```bash
|
|
173
260
|
somtum doctor
|
|
174
261
|
```
|
|
175
262
|
|
|
176
|
-
|
|
263
|
+
All checks should show `✓`. The `api_key` and `hooks_installed` checks are the two most commonly failing.
|
|
264
|
+
|
|
265
|
+
---
|
|
266
|
+
|
|
267
|
+
## Dashboard
|
|
268
|
+
|
|
269
|
+
Somtum includes a visual memory browser you can open at any time:
|
|
177
270
|
|
|
178
271
|
```bash
|
|
179
|
-
somtum
|
|
180
|
-
#
|
|
181
|
-
# - SessionEnd capture hook
|
|
182
|
-
# - UserPromptSubmit prompt-cache hook
|
|
183
|
-
# - PreToolUse file-gating hook
|
|
184
|
-
# - MCP server registration in .mcp.json
|
|
272
|
+
somtum serve
|
|
273
|
+
# Opens http://localhost:3000 in your browser
|
|
185
274
|
```
|
|
186
275
|
|
|
276
|
+
The dashboard provides:
|
|
277
|
+
|
|
278
|
+
- **Memory browser** — searchable, filterable list of all captured observations. Supports BM25, hybrid, and embeddings strategies live. Click any memory to see its full body, files touched, and tags.
|
|
279
|
+
- **Knowledge graph** — vis-network graph where nodes are memories and edges connect memories that share files or tags. Clicking a node opens the detail panel.
|
|
280
|
+
- **Analytics** — kind breakdown, cache hit rate, retrieval strategy usage, and top-referenced files.
|
|
281
|
+
- **Forget button** — soft-delete any memory directly from the browser.
|
|
282
|
+
|
|
283
|
+
Options:
|
|
284
|
+
|
|
285
|
+
| Flag | Description |
|
|
286
|
+
| ------------ | -------------------------------------- |
|
|
287
|
+
| `--port <n>` | Listen on a custom port (default 3000) |
|
|
288
|
+
| `--no-open` | Don't auto-open the browser |
|
|
289
|
+
|
|
290
|
+
Press `Ctrl-C` to stop the server.
|
|
291
|
+
|
|
187
292
|
---
|
|
188
293
|
|
|
189
|
-
## CLI
|
|
294
|
+
## CLI Reference
|
|
190
295
|
|
|
191
296
|
### Setup
|
|
192
297
|
|
|
193
|
-
| Command | Description
|
|
194
|
-
| --------------------------- |
|
|
195
|
-
| `somtum init` | Install the SessionEnd capture hook
|
|
196
|
-
| `somtum init --cache` | Also install the UserPromptSubmit cache hook
|
|
197
|
-
| `somtum init --file-gating` | Also install the PreToolUse file-gating hook
|
|
198
|
-
| `somtum init --all` | Install all hooks + MCP server
|
|
199
|
-
| `somtum init --force` | Reinstall even if hooks already present
|
|
200
|
-
| `somtum doctor` | Check DB health, migrations, hooks, breakeven ratio |
|
|
298
|
+
| Command | Description |
|
|
299
|
+
| --------------------------- | ------------------------------------------------------------ |
|
|
300
|
+
| `somtum init` | Install the SessionEnd capture hook |
|
|
301
|
+
| `somtum init --cache` | Also install the UserPromptSubmit cache hook |
|
|
302
|
+
| `somtum init --file-gating` | Also install the PreToolUse file-gating hook |
|
|
303
|
+
| `somtum init --all` | Install all hooks + MCP server |
|
|
304
|
+
| `somtum init --force` | Reinstall even if hooks already present |
|
|
305
|
+
| `somtum doctor` | Check DB health, migrations, hooks, API key, breakeven ratio |
|
|
201
306
|
|
|
202
307
|
### Memory
|
|
203
308
|
|
|
@@ -212,6 +317,16 @@ somtum init --all
|
|
|
212
317
|
| `somtum rebuild` | Regenerate `index.md` from all observations |
|
|
213
318
|
| `somtum reindex` | Recompute embeddings (after a model change) |
|
|
214
319
|
|
|
320
|
+
### Stats & Visibility
|
|
321
|
+
|
|
322
|
+
| Command | Description |
|
|
323
|
+
| ------------------------- | ------------------------------------------------- |
|
|
324
|
+
| `somtum stats` | Tokens saved, cache hit rate, retrieval breakdown |
|
|
325
|
+
| `somtum stats --json` | Machine-readable JSON output |
|
|
326
|
+
| `somtum serve` | Open the visual dashboard in the browser |
|
|
327
|
+
| `somtum serve --port <n>` | Use a custom port (default 3000) |
|
|
328
|
+
| `somtum serve --no-open` | Start server without opening the browser |
|
|
329
|
+
|
|
215
330
|
### Data management
|
|
216
331
|
|
|
217
332
|
| Command | Description |
|
|
@@ -226,13 +341,9 @@ somtum init --all
|
|
|
226
341
|
|
|
227
342
|
### Stats & visibility
|
|
228
343
|
|
|
229
|
-
| Command
|
|
230
|
-
|
|
|
231
|
-
| `somtum
|
|
232
|
-
| `somtum stats --json` | Machine-readable JSON output |
|
|
233
|
-
| `somtum serve` | Open local web dashboard — memory browser, graph, analytics |
|
|
234
|
-
| `somtum serve --port 4000` | Specify a custom port (default: 3000) |
|
|
235
|
-
| `somtum serve --no-open` | Start the server without opening the browser |
|
|
344
|
+
| Command | Description |
|
|
345
|
+
| ---------------- | ------------------------------------------- |
|
|
346
|
+
| `somtum reindex` | Embed observations that are missing vectors |
|
|
236
347
|
|
|
237
348
|
### Configuration
|
|
238
349
|
|
|
@@ -251,7 +362,8 @@ somtum init --all
|
|
|
251
362
|
| `somtum sync push` | Export and scp observations to remote |
|
|
252
363
|
| `somtum sync pull` | scp from remote and merge into local DB |
|
|
253
364
|
|
|
254
|
-
Remote configured in config: `somtum config set sync.remote "user@host:/path/.somtum/projects/<id>"`
|
|
365
|
+
Remote configured in config: `somtum config set sync.remote "user@host:/path/.somtum/projects/<id>"`
|
|
366
|
+
Somtum uses hostname-aware syncing to prevent data loss when using multiple devices.
|
|
255
367
|
|
|
256
368
|
---
|
|
257
369
|
|
|
@@ -294,6 +406,7 @@ somtum serve --no-open # don't auto-open the browser
|
|
|
294
406
|
```
|
|
295
407
|
~/.somtum/
|
|
296
408
|
├── config.json ← global config (overridden by project config)
|
|
409
|
+
├── hook.log ← timestamped log of every hook execution
|
|
297
410
|
└── projects/
|
|
298
411
|
└── <project_id>/
|
|
299
412
|
├── db.sqlite ← source of truth (SQLite WAL)
|
|
@@ -303,6 +416,8 @@ somtum serve --no-open # don't auto-open the browser
|
|
|
303
416
|
└── <ulid>.md ← per-observation markdown files
|
|
304
417
|
```
|
|
305
418
|
|
|
419
|
+
The project ID is derived from the git remote URL (if present) or the directory path — the same project always maps to the same ID regardless of which machine you're on, as long as the remote URL matches.
|
|
420
|
+
|
|
306
421
|
SQLite is the source of truth. `index.md` and `memories/*.md` are derived mirrors regenerated on each capture. Edit observations with `somtum edit <id>`, not by hand.
|
|
307
422
|
|
|
308
423
|
---
|
|
@@ -391,12 +506,12 @@ The breakeven ratio (`tokens_saved / tokens_spent`) measures whether extraction
|
|
|
391
506
|
|
|
392
507
|
## Performance
|
|
393
508
|
|
|
394
|
-
| Scenario | p95 budget
|
|
395
|
-
| --------------------------------------- |
|
|
396
|
-
| `UserPromptSubmit` hook at 1k memories | 150 ms
|
|
397
|
-
| `UserPromptSubmit` hook at 10k memories | 300 ms
|
|
398
|
-
| Exact cache hash lookup | —
|
|
399
|
-
| `SessionEnd` hook (
|
|
509
|
+
| Scenario | p95 budget | Actual (benchmark) |
|
|
510
|
+
| --------------------------------------- | ------------- | ------------------------ |
|
|
511
|
+
| `UserPromptSubmit` hook at 1k memories | 150 ms | < 2 ms (BM25 k=8) |
|
|
512
|
+
| `UserPromptSubmit` hook at 10k memories | 300 ms | < 30 ms (BM25 k=8) |
|
|
513
|
+
| Exact cache hash lookup | — | < 0.1 ms |
|
|
514
|
+
| `SessionEnd` hook (extract + embed) | 90 s hard cap | Exits cleanly on timeout |
|
|
400
515
|
|
|
401
516
|
Run benchmarks yourself:
|
|
402
517
|
|
|
@@ -423,34 +538,42 @@ pnpm build # tsc + copy migrations + copy dashboard → dist/
|
|
|
423
538
|
|
|
424
539
|
```
|
|
425
540
|
src/
|
|
426
|
-
cli/
|
|
427
|
-
|
|
541
|
+
cli/
|
|
542
|
+
index.ts # commander CLI entry point
|
|
543
|
+
init.ts # somtum init — installs hooks + MCP config
|
|
544
|
+
serve.ts # somtum serve — local dashboard server
|
|
545
|
+
stats.ts # somtum stats
|
|
546
|
+
doctor.ts # somtum doctor — health checks
|
|
547
|
+
hook.ts # internal: dispatches hook events by name
|
|
548
|
+
search.ts / show.ts / forget.ts / edit.ts
|
|
549
|
+
export.ts / import.ts / purge.ts / sync.ts / rebuild.ts / reindex.ts
|
|
550
|
+
config_cmd.ts
|
|
428
551
|
core/
|
|
429
|
-
db.ts
|
|
430
|
-
store.ts
|
|
431
|
-
cache.ts
|
|
432
|
-
retriever/
|
|
433
|
-
extractor.ts
|
|
434
|
-
index_gen.ts
|
|
435
|
-
memory_files.ts
|
|
436
|
-
retrieval_stats.ts
|
|
437
|
-
embeddings.ts
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
tokens.ts # gpt-tokenizer wrapper
|
|
552
|
+
db.ts # SQLite setup, migration runner
|
|
553
|
+
store.ts # MemoryStore — CRUD for observations
|
|
554
|
+
cache.ts # PromptCache — exact + fuzzy lookup
|
|
555
|
+
retriever/ # bm25, embeddings, hybrid, index, factory
|
|
556
|
+
extractor.ts # session transcript → observations (Claude Haiku)
|
|
557
|
+
index_gen.ts # renders index.md (incremental past 1k obs)
|
|
558
|
+
memory_files.ts # writes memories/<YYYY-MM>/<ulid>.md
|
|
559
|
+
retrieval_stats.ts
|
|
560
|
+
embeddings.ts # Embedder interface + encode/decode utils
|
|
561
|
+
privacy.ts # redact() — runs on every capture
|
|
562
|
+
tokens.ts # gpt-tokenizer wrapper
|
|
441
563
|
hooks/
|
|
442
|
-
post_session.ts
|
|
443
|
-
pre_prompt.ts
|
|
444
|
-
pre_read.ts
|
|
445
|
-
mcp/
|
|
446
|
-
dashboard/
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
564
|
+
post_session.ts # SessionEnd: extract → store → index → log
|
|
565
|
+
pre_prompt.ts # UserPromptSubmit: cache lookup
|
|
566
|
+
pre_read.ts # PreToolUse: file gating
|
|
567
|
+
mcp/ # MCP server + tool implementations
|
|
568
|
+
dashboard/
|
|
569
|
+
index.html # single-page dashboard (served by somtum serve)
|
|
570
|
+
config.ts # global + project config merge
|
|
571
|
+
index.ts # public API for embedding Somtum
|
|
572
|
+
src/db/migrations/ # NNN_name.sql migration files
|
|
450
573
|
test/
|
|
451
|
-
golden/
|
|
452
|
-
bench/
|
|
453
|
-
fixtures/
|
|
574
|
+
golden/ # per-strategy retrieval golden sets
|
|
575
|
+
bench/ # hot-path latency benchmarks
|
|
576
|
+
fixtures/ # synthetic session transcripts
|
|
454
577
|
```
|
|
455
578
|
|
|
456
579
|
### Adding a new observation kind
|
|
@@ -471,50 +594,150 @@ test/
|
|
|
471
594
|
|
|
472
595
|
## Troubleshooting
|
|
473
596
|
|
|
474
|
-
###
|
|
597
|
+
### `somtum stats` shows `memories 0` after a session
|
|
598
|
+
|
|
599
|
+
This almost always means the hook ran but extraction failed. Check the log first:
|
|
600
|
+
|
|
601
|
+
```bash
|
|
602
|
+
cat ~/.somtum/hook.log
|
|
603
|
+
```
|
|
604
|
+
|
|
605
|
+
Common causes:
|
|
475
606
|
|
|
476
|
-
|
|
607
|
+
**`ANTHROPIC_API_KEY` not set in shell profile**
|
|
477
608
|
|
|
478
|
-
|
|
609
|
+
The most common cause. The hook runs as a subprocess of Claude Code and inherits the environment from the shell that launched Claude Code. If you only `export`-ed the key in the current terminal session (not in `.zshrc` / `.bashrc`), the hook won't see it.
|
|
610
|
+
|
|
611
|
+
Fix:
|
|
479
612
|
|
|
480
613
|
```bash
|
|
481
|
-
|
|
482
|
-
|
|
614
|
+
# Add to ~/.zshrc or ~/.bashrc
|
|
615
|
+
echo 'export ANTHROPIC_API_KEY="sk-ant-..."' >> ~/.zshrc
|
|
616
|
+
source ~/.zshrc
|
|
617
|
+
|
|
618
|
+
# Confirm it's set
|
|
619
|
+
echo $ANTHROPIC_API_KEY
|
|
620
|
+
|
|
621
|
+
# Then open a new Claude session
|
|
622
|
+
```
|
|
623
|
+
|
|
624
|
+
**Hook not installed in the right directory**
|
|
625
|
+
|
|
626
|
+
`somtum init` writes the hook to `.claude/settings.json` in the directory where you ran it. If you run Claude Code from a _different_ directory, it reads a different (or absent) settings file.
|
|
627
|
+
|
|
628
|
+
Fix: run `somtum init` from the same directory you use to launch Claude Code.
|
|
629
|
+
|
|
630
|
+
```bash
|
|
631
|
+
cd ~/my-project
|
|
632
|
+
somtum init
|
|
633
|
+
claude # must be launched from ~/my-project
|
|
483
634
|
```
|
|
484
635
|
|
|
636
|
+
**Short or trivial session**
|
|
637
|
+
|
|
638
|
+
If the session didn't contain any decisions, bug fixes, or learnings (e.g. you just asked Claude to say hello), the extractor correctly returns 0 observations.
|
|
639
|
+
|
|
640
|
+
Try a real working session, then re-check.
|
|
641
|
+
|
|
642
|
+
**Run `somtum doctor`** for a full diagnostic:
|
|
643
|
+
|
|
644
|
+
```bash
|
|
645
|
+
somtum doctor
|
|
646
|
+
```
|
|
647
|
+
|
|
648
|
+
It checks the API key, hook installation, DB health, embeddings, breakeven ratio, and more, with specific fix instructions for each failing check.
|
|
649
|
+
|
|
650
|
+
---
|
|
651
|
+
|
|
652
|
+
### `somtum serve` opens the browser but shows "Connection refused"
|
|
653
|
+
|
|
654
|
+
This was a bug fixed in v1.1.0. Upgrade:
|
|
655
|
+
|
|
656
|
+
```bash
|
|
657
|
+
npm install -g somtum@latest
|
|
658
|
+
```
|
|
659
|
+
|
|
660
|
+
If you installed from source, rebuild:
|
|
661
|
+
|
|
662
|
+
```bash
|
|
663
|
+
pnpm build
|
|
664
|
+
```
|
|
665
|
+
|
|
666
|
+
---
|
|
667
|
+
|
|
668
|
+
### `somtum serve` — port already in use
|
|
669
|
+
|
|
670
|
+
If port 3000 is busy, use `--port`:
|
|
671
|
+
|
|
672
|
+
```bash
|
|
673
|
+
somtum serve --port 3001
|
|
674
|
+
```
|
|
675
|
+
|
|
676
|
+
---
|
|
677
|
+
|
|
678
|
+
### Agent appears to keep running after session ends
|
|
679
|
+
|
|
680
|
+
The `SessionEnd` hook has a hard 90-second timeout — it cannot block Claude Code indefinitely. If sessions appear stuck immediately after installing Somtum, verify you are on v1.1.0+:
|
|
681
|
+
|
|
682
|
+
```bash
|
|
683
|
+
somtum --version
|
|
684
|
+
```
|
|
685
|
+
|
|
686
|
+
And check the log for any long-running operations:
|
|
687
|
+
|
|
688
|
+
```bash
|
|
689
|
+
tail -20 ~/.somtum/hook.log
|
|
690
|
+
```
|
|
691
|
+
|
|
692
|
+
---
|
|
693
|
+
|
|
694
|
+
|
|
485
695
|
### Installation fails (node-gyp / better-sqlite3)
|
|
486
696
|
|
|
487
|
-
If you see errors related to building `better-sqlite3`, ensure
|
|
697
|
+
If you see errors related to building `better-sqlite3`, ensure build tools are installed:
|
|
488
698
|
|
|
489
699
|
- **macOS:** `xcode-select --install`
|
|
490
700
|
- **Ubuntu/Debian:** `sudo apt-get install build-essential python3`
|
|
491
701
|
- **Windows:** `npm install --global --production windows-build-tools`
|
|
492
702
|
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
The capture hook requires `ANTHROPIC_API_KEY` to be set in your environment. Add it to your shell profile (`.zshrc`, `.bashrc`) or a `.env` file loaded by your shell.
|
|
496
|
-
|
|
497
|
-
### Claude isn't using the memories
|
|
498
|
-
|
|
499
|
-
Run `somtum doctor` to verify that hooks are correctly installed in `.claude/settings.json` and that the MCP server is registered in `.mcp.json`.
|
|
703
|
+
---
|
|
500
704
|
|
|
501
705
|
### Embeddings are slow or the model won't download
|
|
502
706
|
|
|
503
|
-
The `bge-small-en-v1.5`
|
|
707
|
+
The first `somtum reindex` downloads a ~30 MB ONNX model (`bge-small-en-v1.5`) from Hugging Face. This requires internet access and may be slow on first run. Subsequent runs use the cached model.
|
|
708
|
+
|
|
709
|
+
If you are on an air-gapped machine or prefer not to use embeddings, disable them:
|
|
504
710
|
|
|
505
711
|
```bash
|
|
506
712
|
somtum config set retrieval.embeddings.enabled false
|
|
713
|
+
somtum config set retrieval.strategy bm25
|
|
507
714
|
```
|
|
508
715
|
|
|
509
|
-
BM25 retrieval
|
|
716
|
+
BM25 retrieval works fully offline and is fast at any reasonable corpus size.
|
|
717
|
+
|
|
718
|
+
---
|
|
719
|
+
|
|
720
|
+
### Claude isn't using the memories
|
|
721
|
+
|
|
722
|
+
If you are using the MCP server (`somtum init --all`), Claude will automatically call `recall` when it's uncertain about project details. If it's not happening:
|
|
723
|
+
|
|
724
|
+
1. Confirm `.mcp.json` exists in your project root: `cat .mcp.json`
|
|
725
|
+
2. Restart Claude Code so it picks up the new MCP config
|
|
726
|
+
3. Try prompting Claude explicitly: _"Check your Somtum memory for anything related to our auth setup"_
|
|
727
|
+
|
|
728
|
+
If you are not using the MCP server, memories are injected via the `index.md` file — add it to your CLAUDE.md or Claude Code context with:
|
|
729
|
+
|
|
730
|
+
```
|
|
731
|
+
See ~/.somtum/projects/<project_id>/index.md for prior session learnings.
|
|
732
|
+
```
|
|
510
733
|
|
|
511
734
|
---
|
|
512
735
|
|
|
513
736
|
## Contributing
|
|
514
737
|
|
|
515
|
-
Contributions are welcome!
|
|
738
|
+
Contributions are welcome! Please see [CONTRIBUTING.md](CONTRIBUTING.md) for the guide.
|
|
516
739
|
|
|
517
|
-
**Important
|
|
740
|
+
**Important:** This project uses `changesets` for versioning. Every PR must include a changeset file generated by running `pnpm changeset`.
|
|
518
741
|
|
|
519
742
|
---
|
|
520
743
|
|
package/dist/cli/doctor.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"doctor.d.ts","sourceRoot":"","sources":["../../src/cli/doctor.ts"],"names":[],"mappings":"AAQA,MAAM,WAAW,YAAY;IAC3B,EAAE,EAAE,OAAO,CAAC;IACZ,MAAM,EAAE,WAAW,EAAE,CAAC;CACvB;AAED,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,EAAE,EAAE,OAAO,CAAC;IACZ,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,wBAAgB,SAAS,CAAC,IAAI,GAAE;IAAE,GAAG,CAAC,EAAE,MAAM,CAAA;CAAO,GAAG,YAAY,
|
|
1
|
+
{"version":3,"file":"doctor.d.ts","sourceRoot":"","sources":["../../src/cli/doctor.ts"],"names":[],"mappings":"AAQA,MAAM,WAAW,YAAY;IAC3B,EAAE,EAAE,OAAO,CAAC;IACZ,MAAM,EAAE,WAAW,EAAE,CAAC;CACvB;AAED,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,EAAE,EAAE,OAAO,CAAC;IACZ,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,wBAAgB,SAAS,CAAC,IAAI,GAAE;IAAE,GAAG,CAAC,EAAE,MAAM,CAAA;CAAO,GAAG,YAAY,CAoKnE;AAED,wBAAsB,aAAa,CACjC,OAAO,GAAE;IAAE,IAAI,CAAC,EAAE,OAAO,CAAC;IAAC,GAAG,CAAC,EAAE,MAAM,CAAA;CAAO,GAC7C,OAAO,CAAC,MAAM,CAAC,CAiBjB"}
|
package/dist/cli/doctor.js
CHANGED
|
@@ -113,7 +113,16 @@ export function runDoctor(opts = {}) {
|
|
|
113
113
|
? `enabled (model: ${config.retrieval.embeddings.model}) — run \`somtum reindex\` to embed missing`
|
|
114
114
|
: 'disabled (set retrieval.embeddings.enabled=true to enable)',
|
|
115
115
|
});
|
|
116
|
-
// 11.
|
|
116
|
+
// 11. ANTHROPIC_API_KEY present
|
|
117
|
+
const apiKey = process.env['ANTHROPIC_API_KEY'];
|
|
118
|
+
checks.push({
|
|
119
|
+
name: 'api_key',
|
|
120
|
+
ok: Boolean(apiKey && apiKey.trim().length > 0),
|
|
121
|
+
detail: apiKey && apiKey.trim().length > 0
|
|
122
|
+
? 'ANTHROPIC_API_KEY is set'
|
|
123
|
+
: 'ANTHROPIC_API_KEY is not set — the SessionEnd hook needs it to extract observations. Set it in your shell profile (e.g. export ANTHROPIC_API_KEY=sk-ant-...).',
|
|
124
|
+
});
|
|
125
|
+
// 12. Hook files in .claude/settings.json
|
|
117
126
|
const settingsPath = join(cwd, '.claude', 'settings.json');
|
|
118
127
|
if (existsSync(settingsPath)) {
|
|
119
128
|
try {
|
package/dist/cli/doctor.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"doctor.js","sourceRoot":"","sources":["../../src/cli/doctor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACnD,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AACjE,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,UAAU,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AAatF,MAAM,UAAU,SAAS,CAAC,OAAyB,EAAE;IACnD,MAAM,GAAG,GAAG,IAAI,CAAC,GAAG,IAAI,OAAO,CAAC,GAAG,EAAE,CAAC;IACtC,MAAM,MAAM,GAAkB,EAAE,CAAC;IAEjC,gCAAgC;IAChC,IAAI,MAAM,CAAC;IACX,IAAI,CAAC;QACH,MAAM,GAAG,UAAU,CAAC,EAAE,GAAG,EAAE,CAAC,CAAC;QAC7B,MAAM,CAAC,IAAI,CAAC;YACV,IAAI,EAAE,QAAQ;YACd,EAAE,EAAE,IAAI;YACR,MAAM,EAAE,YAAY,MAAM,CAAC,S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AAC,CAAC;IAC3E,CAAC;IACD,OAAO,MAAM,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AAC3B,CAAC"}
|
package/dist/cli/hook.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hook.d.ts","sourceRoot":"","sources":["../../src/cli/hook.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"hook.d.ts","sourceRoot":"","sources":["../../src/cli/hook.ts"],"names":[],"mappings":"AAqCA,wBAAsB,WAAW,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CA8D/D"}
|