@strvmarv/total-recall 0.6.8-beta.5 → 0.7.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/CONTRIBUTING.md +6 -6
- package/README.md +33 -29
- package/dist/eval/ci-smoke.js +3 -2
- package/dist/index.js +221 -139
- package/hooks/hooks-cursor.json +1 -1
- package/hooks/session-end/run.sh +30 -3
- package/hooks/session-start/run.sh +1 -1
- package/package.json +3 -2
- package/scripts/mcp-smoke-test.mjs +388 -0
- package/scripts/postinstall.js +25 -0
- package/skills/{total-recall → commands}/SKILL.md +6 -13
- package/skills/commands/session-end.md +11 -0
- package/skills/using-total-recall/SKILL.md +2 -2
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "total-recall",
|
|
3
3
|
"description": "Multi-tiered memory and knowledge base with semantic search, auto-compaction, and built-in evaluation. Works across Claude Code, Copilot CLI, OpenCode, Cline, and Cursor.",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.7.1",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "strvmarv"
|
|
7
7
|
},
|
package/CONTRIBUTING.md
CHANGED
|
@@ -271,11 +271,11 @@ npx vitest run src/importers/my-tool.test.ts
|
|
|
271
271
|
Once the MCP server is running and connected to your coding assistant, use the eval commands:
|
|
272
272
|
|
|
273
273
|
```
|
|
274
|
-
/total-recall eval # Live retrieval metrics for current session
|
|
275
|
-
/total-recall eval --benchmark # Run synthetic benchmark suite
|
|
276
|
-
/total-recall eval --snapshot baseline # Save current config as a named baseline
|
|
277
|
-
/total-recall eval --compare baseline # Compare current config against saved baseline
|
|
278
|
-
/total-recall eval --grow # Add real query misses to benchmark suite
|
|
274
|
+
/total-recall:commands eval # Live retrieval metrics for current session
|
|
275
|
+
/total-recall:commands eval --benchmark # Run synthetic benchmark suite
|
|
276
|
+
/total-recall:commands eval --snapshot baseline # Save current config as a named baseline
|
|
277
|
+
/total-recall:commands eval --compare baseline # Compare current config against saved baseline
|
|
278
|
+
/total-recall:commands eval --grow # Add real query misses to benchmark suite
|
|
279
279
|
```
|
|
280
280
|
|
|
281
281
|
A PR that changes retrieval logic, scoring, or compaction thresholds must include a `--benchmark` run showing no regression against the `baseline` snapshot.
|
|
@@ -289,7 +289,7 @@ Before opening a pull request:
|
|
|
289
289
|
1. **Tests pass** — `npm test` exits 0 with no failures
|
|
290
290
|
2. **Type checker clean** — `npm run typecheck` exits 0
|
|
291
291
|
3. **Build succeeds** — `npm run build` exits 0
|
|
292
|
-
4. **Benchmark does not regress** — run `/total-recall eval --compare baseline` and include the output in your PR description if you changed retrieval, scoring, or compaction logic
|
|
292
|
+
4. **Benchmark does not regress** — run `/total-recall:commands eval --compare baseline` and include the output in your PR description if you changed retrieval, scoring, or compaction logic
|
|
293
293
|
5. **New behavior is tested** — new importers, parsers, and content types all require corresponding test files
|
|
294
294
|
|
|
295
295
|
If you're adding a new host tool importer, include the `detect()` logic rationale in your PR description — false positives will silently corrupt imports for users who don't have the tool installed.
|
package/README.md
CHANGED
|
@@ -165,44 +165,46 @@ All state lives in `~/.total-recall/total-recall.db`. The embedding model is bun
|
|
|
165
165
|
|
|
166
166
|
## Commands
|
|
167
167
|
|
|
168
|
-
All commands
|
|
168
|
+
All commands are routed through the `/total-recall:commands` skill:
|
|
169
169
|
|
|
170
170
|
| Command | MCP Tool | Description |
|
|
171
171
|
|---|---|---|
|
|
172
|
-
| `/total-recall help` | — | Show command reference table |
|
|
173
|
-
| `/total-recall status` | `status` | Dashboard overview |
|
|
174
|
-
| `/total-recall search <query>` | `memory_search` | Semantic search across all tiers |
|
|
175
|
-
| `/total-recall store <content>` | `memory_store` | Manually store a memory |
|
|
172
|
+
| `/total-recall:commands help` | — | Show command reference table |
|
|
173
|
+
| `/total-recall:commands status` | `status` | Dashboard overview |
|
|
174
|
+
| `/total-recall:commands search <query>` | `memory_search` | Semantic search across all tiers |
|
|
175
|
+
| `/total-recall:commands store <content>` | `memory_store` | Manually store a memory |
|
|
176
176
|
| — | `memory_get` | Retrieve a specific entry by ID |
|
|
177
177
|
| — | `memory_update` | Update an existing entry's content, tags, or project |
|
|
178
|
-
| `/total-recall forget <query>` | `memory_search` + `memory_delete` | Find and delete entries |
|
|
179
|
-
| `/total-recall inspect <id>` | `memory_inspect` | Deep dive on single entry with compaction history |
|
|
180
|
-
| `/total-recall promote <id>` | `memory_promote` | Move entry to higher tier |
|
|
181
|
-
| `/total-recall demote <id>` | `memory_demote` | Move entry to lower tier |
|
|
182
|
-
| `/total-recall history` | `memory_history` | Show recent tier movements |
|
|
183
|
-
| `/total-recall lineage <id>` | `memory_lineage` | Show compaction ancestry |
|
|
184
|
-
| `/total-recall export` | `memory_export` | Export to portable JSON format |
|
|
185
|
-
| `/total-recall import <file>` | `memory_import` | Import from export file |
|
|
186
|
-
| `/total-recall ingest <path>` | `kb_ingest_file` / `kb_ingest_dir` | Add files/dirs to knowledge base |
|
|
187
|
-
| `/total-recall kb search <query>` | `kb_search` | Search knowledge base |
|
|
188
|
-
| `/total-recall kb list` | `kb_list_collections` | List KB collections |
|
|
189
|
-
| `/total-recall kb refresh <id>` | `kb_refresh` | Re-ingest a collection |
|
|
190
|
-
| `/total-recall kb remove <id>` | `kb_remove` | Remove KB entry |
|
|
178
|
+
| `/total-recall:commands forget <query>` | `memory_search` + `memory_delete` | Find and delete entries |
|
|
179
|
+
| `/total-recall:commands inspect <id>` | `memory_inspect` | Deep dive on single entry with compaction history |
|
|
180
|
+
| `/total-recall:commands promote <id>` | `memory_promote` | Move entry to higher tier |
|
|
181
|
+
| `/total-recall:commands demote <id>` | `memory_demote` | Move entry to lower tier |
|
|
182
|
+
| `/total-recall:commands history` | `memory_history` | Show recent tier movements |
|
|
183
|
+
| `/total-recall:commands lineage <id>` | `memory_lineage` | Show compaction ancestry |
|
|
184
|
+
| `/total-recall:commands export` | `memory_export` | Export to portable JSON format |
|
|
185
|
+
| `/total-recall:commands import <file>` | `memory_import` | Import from export file |
|
|
186
|
+
| `/total-recall:commands ingest <path>` | `kb_ingest_file` / `kb_ingest_dir` | Add files/dirs to knowledge base |
|
|
187
|
+
| `/total-recall:commands kb search <query>` | `kb_search` | Search knowledge base |
|
|
188
|
+
| `/total-recall:commands kb list` | `kb_list_collections` | List KB collections |
|
|
189
|
+
| `/total-recall:commands kb refresh <id>` | `kb_refresh` | Re-ingest a collection |
|
|
190
|
+
| `/total-recall:commands kb remove <id>` | `kb_remove` | Remove KB entry |
|
|
191
191
|
| — | `kb_summarize` | Generate summary for a KB collection |
|
|
192
|
-
| `/total-recall compact` | `compact_now` | Force compaction |
|
|
192
|
+
| `/total-recall:commands compact` | `compact_now` | Force compaction |
|
|
193
193
|
| — | `session_start` | Initialize session: sync imports, assemble hot tier |
|
|
194
194
|
| — | `session_end` | End session: run compaction |
|
|
195
195
|
| — | `session_context` | Get current hot tier entries as context |
|
|
196
|
-
| `/total-recall eval` | `eval_report` | Retrieval quality metrics (filterable by config snapshot) |
|
|
197
|
-
| `/total-recall eval --benchmark` | `eval_benchmark` | Run synthetic benchmark |
|
|
198
|
-
| `/total-recall eval --compare <name>` | `eval_compare` | Compare metrics between two config snapshots |
|
|
199
|
-
| `/total-recall eval --snapshot <name>` | `eval_snapshot` | Manually create a named config snapshot |
|
|
200
|
-
| `/total-recall eval --grow` | `eval_grow` | Review and accept/reject benchmark candidates from retrieval misses |
|
|
201
|
-
| `/total-recall config get <key>` | `config_get` | Read config value |
|
|
202
|
-
| `/total-recall config set <key> <val>` | `config_set` | Update config |
|
|
203
|
-
| `/total-recall import-host` | `import_host` | Import from host tools |
|
|
196
|
+
| `/total-recall:commands eval` | `eval_report` | Retrieval quality metrics (filterable by config snapshot) |
|
|
197
|
+
| `/total-recall:commands eval --benchmark` | `eval_benchmark` | Run synthetic benchmark |
|
|
198
|
+
| `/total-recall:commands eval --compare <name>` | `eval_compare` | Compare metrics between two config snapshots |
|
|
199
|
+
| `/total-recall:commands eval --snapshot <name>` | `eval_snapshot` | Manually create a named config snapshot |
|
|
200
|
+
| `/total-recall:commands eval --grow` | `eval_grow` | Review and accept/reject benchmark candidates from retrieval misses |
|
|
201
|
+
| `/total-recall:commands config get <key>` | `config_get` | Read config value |
|
|
202
|
+
| `/total-recall:commands config set <key> <val>` | `config_set` | Update config |
|
|
203
|
+
| `/total-recall:commands import-host` | `import_host` | Import from host tools |
|
|
204
204
|
|
|
205
|
-
Memory capture, retrieval, and compaction run automatically in the background — see the "Automatic Behavior" section of the `/total-recall` skill.
|
|
205
|
+
Memory capture, retrieval, and compaction run automatically in the background — see the "Automatic Behavior" section of the `/total-recall:commands` skill.
|
|
206
|
+
|
|
207
|
+
> **Note:** `/total-recall:commands` is implemented as a Claude Code skill (at `skills/commands/SKILL.md`), not as a slash-command file under `commands/`. The skill handles all `<subcommand>` arguments internally.
|
|
206
208
|
|
|
207
209
|
---
|
|
208
210
|
|
|
@@ -214,7 +216,7 @@ Memory capture, retrieval, and compaction run automatically in the background
|
|
|
214
216
|
| Copilot CLI | Full | Auto-import from existing Copilot memory files |
|
|
215
217
|
| OpenCode | MCP | Configure MCP server in opencode config |
|
|
216
218
|
| Cline | MCP | Configure MCP server in Cline settings |
|
|
217
|
-
| Cursor | Full | MCP server + `.cursor-plugin/` wrapper |
|
|
219
|
+
| Cursor | Full | MCP server + `.cursor-plugin/` wrapper (SessionStart only; run `/total-recall:commands compact` manually — Cursor has no SessionEnd hook) |
|
|
218
220
|
| Hermes | Full | Auto-import from Hermes memory files |
|
|
219
221
|
|
|
220
222
|
---
|
|
@@ -253,6 +255,8 @@ model = "all-MiniLM-L6-v2" # Embedding model name
|
|
|
253
255
|
dimensions = 384 # Embedding dimensions
|
|
254
256
|
```
|
|
255
257
|
|
|
258
|
+
**Relocating the database:** set `TOTAL_RECALL_DB_PATH` to an absolute path or `~/`-prefixed path. See [INSTALL.md](INSTALL.md#relocating-the-database) for cloud-sync and shared-workspace guidance.
|
|
259
|
+
|
|
256
260
|
---
|
|
257
261
|
|
|
258
262
|
## Extending
|
package/dist/eval/ci-smoke.js
CHANGED
|
@@ -255,7 +255,8 @@ function initSchema(db) {
|
|
|
255
255
|
|
|
256
256
|
// src/config.ts
|
|
257
257
|
import { readFileSync, writeFileSync, existsSync, mkdirSync } from "fs";
|
|
258
|
-
import { join } from "path";
|
|
258
|
+
import { join, isAbsolute } from "path";
|
|
259
|
+
import { homedir } from "os";
|
|
259
260
|
import { createHash, randomUUID } from "crypto";
|
|
260
261
|
|
|
261
262
|
// node_modules/smol-toml/dist/error.js
|
|
@@ -951,7 +952,7 @@ function parse(toml, { maxDepth = 1e3, integersAsBigInt } = {}) {
|
|
|
951
952
|
// src/config.ts
|
|
952
953
|
var DEFAULTS_PATH = new URL("./defaults.toml", import.meta.url);
|
|
953
954
|
function getDataDir() {
|
|
954
|
-
return process.env.TOTAL_RECALL_HOME ?? join(
|
|
955
|
+
return process.env.TOTAL_RECALL_HOME ?? join(homedir(), ".total-recall");
|
|
955
956
|
}
|
|
956
957
|
function loadConfig() {
|
|
957
958
|
const defaultsText = readFileSync(DEFAULTS_PATH, "utf-8");
|