@fabersep/memory 0.1.0 → 0.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/CHANGELOG.md +34 -0
- package/README.md +65 -198
- package/dist/src/cache-logs.d.ts +47 -0
- package/dist/src/cache-logs.js +433 -0
- package/dist/src/cli.js +417 -75
- package/dist/src/compiler.d.ts +4 -0
- package/dist/src/compiler.js +41 -1
- package/dist/src/doctor.d.ts +23 -0
- package/dist/src/doctor.js +447 -0
- package/dist/src/git.js +1 -1
- package/dist/src/hygiene.d.ts +4 -0
- package/dist/src/hygiene.js +8 -0
- package/dist/src/importer.d.ts +8 -0
- package/dist/src/importer.js +63 -8
- package/dist/src/index.d.ts +5 -0
- package/dist/src/index.js +5 -0
- package/dist/src/init.d.ts +2 -0
- package/dist/src/init.js +43 -4
- package/dist/src/mcp.d.ts +91 -1
- package/dist/src/mcp.js +61 -4
- package/dist/src/metrics.d.ts +72 -0
- package/dist/src/metrics.js +179 -0
- package/dist/src/proposals.js +39 -2
- package/dist/src/stats.d.ts +166 -0
- package/dist/src/stats.js +565 -0
- package/dist/src/sync.d.ts +2 -0
- package/dist/src/sync.js +1 -1
- package/dist/src/types.d.ts +1 -1
- package/dist/src/types.js +2 -1
- package/dist/src/ui.d.ts +19 -0
- package/dist/src/ui.js +74 -0
- package/dist/src/version.d.ts +2 -0
- package/dist/src/version.js +22 -0
- package/package.json +3 -2
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to `@fabersep/memory`. Versions follow [Semantic Versioning](https://semver.org/).
|
|
4
|
+
|
|
5
|
+
## 0.2.1 (unreleased)
|
|
6
|
+
|
|
7
|
+
### Fixed
|
|
8
|
+
- Docs pointed to `~/.faber/memory-state/` for config and state; the real location is `~/.config/faber-memory/`.
|
|
9
|
+
- The MCP server reported version `0.1.0` and the compiled L0 header said `v0.1.0`; both now use the package version.
|
|
10
|
+
- `import --split-headings` no longer creates an empty entry for a title heading that has only sub-headings under it.
|
|
11
|
+
|
|
12
|
+
### Added
|
|
13
|
+
- `--version` (also `-v`, `version`).
|
|
14
|
+
- The `init` instruction block for Claude Code and Antigravity now tells the agent when to call `memory_propose`; the `memory_propose` tool description says the same for MCP-only engines. Re-run `init` to pick it up.
|
|
15
|
+
- `import` ends with a `NOT imported: N item(s)` line when the hygiene check leaves items out.
|
|
16
|
+
- `docs/guide.md` (technical guide and full command reference), `CHANGELOG.md`, `CONTRIBUTING.md` and a CI test workflow.
|
|
17
|
+
|
|
18
|
+
### Changed
|
|
19
|
+
- **`setup` is optional for solo use:** `init` creates `~/.faber/memory` when no memory is configured, and `init <folder>` puts it in a folder you choose. `setup` still works, and team mode still starts with `setup --team`.
|
|
20
|
+
- Flags that take no value (`--preview`, `--apply`, `--json`, …) no longer swallow the next argument, so `init --preview ~/notes` works.
|
|
21
|
+
- **`init` now applies by default** (with `.bak` backups and `--undo`). Use `init --preview` (alias `--dry-run`) to see the diff only. `--apply` still works as an alias.
|
|
22
|
+
- The README is now a plain-language, story-first introduction; technical detail moved to `docs/guide.md`.
|
|
23
|
+
|
|
24
|
+
## 0.2.0 (2026-11-27)
|
|
25
|
+
|
|
26
|
+
- Local metrics ledger, `stats` (context size, retrieval, proposal funnel), `stats --cache` (prompt-cache hit rate from local engine logs), `stats --share` (anonymized benchmark card) and the read-only `doctor` checklist. Spec: `docs/features/02-metrics-and-stats`.
|
|
27
|
+
|
|
28
|
+
## 0.1.1 (2026-11-26)
|
|
29
|
+
|
|
30
|
+
- CLI UX: review progress line, back and view keys, quit-and-save, `reject --all`, `config unset`, `reset`, team URL shorthands, `--normalize-paths`, troubleshooting guide.
|
|
31
|
+
|
|
32
|
+
## 0.1.0 (2026-11-26)
|
|
33
|
+
|
|
34
|
+
- Core: Git-backed Markdown memory with `personal`, `team` and `project` scopes, deterministic L0 compiler, 3-tool BM25 MCP server, `pre-memory` review, hygiene scan, multi-engine `init` and zero-LLM `import`. Spec: `docs/features/01-core-memory`.
|
package/README.md
CHANGED
|
@@ -1,271 +1,138 @@
|
|
|
1
|
-
# FaberSEP Memory
|
|
1
|
+
# FaberSEP Memory
|
|
2
2
|
|
|
3
|
+
[](https://www.npmjs.com/package/@fabersep/memory)
|
|
3
4
|
[](LICENSE)
|
|
4
5
|
|
|
5
|
-
|
|
6
|
+
**Your AI coding assistant forgets everything when the chat ends. FaberSEP Memory gives it a memory you can read, trust and take with you.**
|
|
6
7
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
Zero databases. Zero native addons. Zero runtime dependencies. Just plain Markdown files in Git, a deterministic compiled index that keeps your prompt cache warm, a human-approved `pre-memory` inbox so agents never pollute your rules, and a 3-tool MCP server (`memory_search`, `memory_get`, `memory_propose`).
|
|
8
|
+
<!-- Video: a 60-second walkthrough will go here. -->
|
|
10
9
|
|
|
11
10
|
---
|
|
12
11
|
|
|
13
|
-
##
|
|
14
|
-
|
|
15
|
-
If you are new to agent memory systems, here is everything you need to know:
|
|
12
|
+
## The problem you already know
|
|
16
13
|
|
|
17
|
-
|
|
18
|
-
2. **Three progressive layers (L0 -> L1 -> L2) keep context small and prompt-cache friendly:**
|
|
19
|
-
- **L0 (`MEMORY.md`):** A short, deterministic table of contents compiled from your active `team` and `personal` entries (hard cap: 1,500 tokens). No timestamps, no pending counts, no machine paths — so your LLM prompt cache stays warm turn after turn.
|
|
20
|
-
- **L1 (`memory_search`):** When an agent needs details, it searches your memory with a built-in pure-JS BM25 search tool and gets compact summaries back.
|
|
21
|
-
- **L2 (`memory_get`):** The agent fetches the full Markdown body only for the exact entry it needs.
|
|
22
|
-
3. **Agents propose; humans approve (`pre-memory`).** Active memory is read-only for agents. When an agent learns a new rule or lesson, it calls `memory_propose`, which stages a proposal in `pre-memory`. You review and approve it in one batch — keeping your memory accurate and noise-free.
|
|
23
|
-
4. **Three scopes:**
|
|
24
|
-
- **`personal`** — Your own rules, lessons, and preferences (solo local Git repo, e.g. `~/.faber/memory`).
|
|
25
|
-
- **`team`** — Shared engineering rules in a private team Git repo.
|
|
26
|
-
- **`project`** — Optional repo-specific memory in `<repo>/.faber/memory/`.
|
|
14
|
+
It's Monday. You tell your AI assistant: *"We use pnpm here, not npm."* It says "Got it!" and does a great job.
|
|
27
15
|
|
|
28
|
-
|
|
16
|
+
On Tuesday you open a new chat. It runs `npm install`.
|
|
29
17
|
|
|
30
|
-
|
|
18
|
+
So you write the rule down in a long instructions file. A month later that file has 300 lines nobody reads, half of them out of date. You switch from Claude to Antigravity for a day, and the other tool knows none of it. Some tools try to "remember" by themselves, and one day you find a rule in there you never wrote.
|
|
31
19
|
|
|
32
|
-
|
|
33
|
-
- **Git** (`git --version` to check)
|
|
20
|
+
## What changes with FaberSEP Memory
|
|
34
21
|
|
|
35
|
-
|
|
36
|
-
*(If you prefer shorter commands, you can install it globally once with `npm install -g @fabersep/memory` and use `faber-memory` instead of `npx @fabersep/memory`.)*
|
|
22
|
+
The same Monday, with FaberSEP Memory:
|
|
37
23
|
|
|
38
|
-
|
|
24
|
+
1. **Your assistant notices a lesson** ("this team uses pnpm") and *suggests* saving it. It does not save it by itself.
|
|
25
|
+
2. **You approve it** with one key press when you have a minute, usually at the end of the day.
|
|
26
|
+
3. **From Tuesday on, every assistant you use knows it**: Claude Code, Antigravity, Claude Desktop, Cursor. They all read the same memory.
|
|
39
27
|
|
|
40
|
-
|
|
28
|
+
Your memory is a folder of short notes on your own computer, kept in Git so every change is saved and can be undone. Nothing goes to a cloud service, and you don't need an account, a database or an API key.
|
|
41
29
|
|
|
42
|
-
|
|
30
|
+
## Why you can trust it
|
|
43
31
|
|
|
44
|
-
|
|
32
|
+
- **Nothing gets in without your OK.** Assistants can only suggest. You decide what stays.
|
|
33
|
+
- **You can read all of it.** Each memory is a small text file. Open it, edit it, delete it.
|
|
34
|
+
- **It stays small.** Your assistant gets a short table of contents at the start of every chat and looks up details only when it needs them. That keeps chats fast and cheap.
|
|
35
|
+
- **It guards against mistakes.** Passwords, API keys and paths that only work on your computer are blocked before they get saved.
|
|
36
|
+
- **It works with your team, too.** Share a set of rules through a private Git repository, so every teammate's assistant follows them.
|
|
45
37
|
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
```bash
|
|
49
|
-
npx @fabersep/memory setup ~/.faber/memory
|
|
50
|
-
```
|
|
38
|
+
---
|
|
51
39
|
|
|
52
|
-
|
|
53
|
-
- Creates `~/.faber/memory` (you can pick any folder path you like) and initializes a local Git repository on branch `main`.
|
|
54
|
-
- Saves your configuration in `~/.faber/memory-state/config.json`.
|
|
40
|
+
## Get started (about 2 minutes)
|
|
55
41
|
|
|
56
|
-
|
|
42
|
+
You need **Node.js 20 or newer** and **Git**. To check, run `node -v` and `git --version` in a terminal.
|
|
57
43
|
|
|
58
|
-
|
|
44
|
+
**1. Set it up**
|
|
59
45
|
|
|
60
46
|
```bash
|
|
61
47
|
npx @fabersep/memory init
|
|
62
48
|
```
|
|
63
49
|
|
|
64
|
-
|
|
50
|
+
This creates your memory folder (`~/.faber/memory`, with its own Git history), finds the AI assistants on your computer and connects them. It keeps a backup of every file it touches, and you can undo it at any time with `npx @fabersep/memory init --undo`.
|
|
65
51
|
|
|
66
|
-
|
|
52
|
+
Want your notes in another folder? Give its path:
|
|
67
53
|
|
|
68
54
|
```bash
|
|
69
|
-
npx @fabersep/memory init
|
|
55
|
+
npx @fabersep/memory init ~/my-notes
|
|
70
56
|
```
|
|
71
57
|
|
|
72
|
-
**
|
|
73
|
-
- Compiles your L0 index first to `~/.faber/memory-state/MEMORY.md`.
|
|
74
|
-
- Creates a `.bak` backup of every file it touches.
|
|
75
|
-
- Adds a clearly marked `<!-- faber-memory:start --> ... <!-- faber-memory:end -->` block and registers the `faber-memory` MCP server (`npx -y @fabersep/memory serve`).
|
|
76
|
-
|
|
77
|
-
> **Tip:** Want to target only specific engines? Pass `--engine`:
|
|
78
|
-
> ```bash
|
|
79
|
-
> npx @fabersep/memory init --engine claude-code,antigravity --apply
|
|
80
|
-
> ```
|
|
81
|
-
> Want to revert the wiring cleanly at any time?
|
|
82
|
-
> ```bash
|
|
83
|
-
> npx @fabersep/memory init --undo
|
|
84
|
-
> ```
|
|
85
|
-
|
|
86
|
-
#### Supported Engines & What `init --apply` Wires
|
|
87
|
-
|
|
88
|
-
| Engine | Instruction File | MCP Config | Notes |
|
|
89
|
-
| :--- | :--- | :--- | :--- |
|
|
90
|
-
| **Claude Code** | `~/.claude/CLAUDE.md` (`@path` include) | `~/.claude.json` | Native `@path` L0 include + MCP tools |
|
|
91
|
-
| **Antigravity** | `~/.gemini/GEMINI.md` (read-at-start rule) | `~/.gemini/config/mcp_config.json` | Reads L0 at start + MCP tools |
|
|
92
|
-
| **Claude Desktop** | — | `claude_desktop_config.json` | MCP tools (`--engine claude-desktop`) |
|
|
93
|
-
| **Cursor** | — (GAP) | `~/.cursor/mcp.json` | MCP-only |
|
|
94
|
-
| **Codex** | — (GAP) | — | MCP-only (manual config) |
|
|
95
|
-
|
|
96
|
-
### Step 3: Import your existing memory files (optional, zero LLM)
|
|
97
|
-
|
|
98
|
-
Already have Markdown notes, Claude auto-memory files, an `AGENTS.md`, or Cursor rules? You can import them deterministically without spending any LLM tokens.
|
|
99
|
-
|
|
100
|
-
Pick the command that matches your source:
|
|
58
|
+
**2. Check that everything is connected**
|
|
101
59
|
|
|
102
60
|
```bash
|
|
103
|
-
|
|
104
|
-
npx @fabersep/memory import --from markdown-dir ./path/to/your/memory
|
|
105
|
-
|
|
106
|
-
# 2. Existing Claude Code auto-memory folder
|
|
107
|
-
npx @fabersep/memory import --from claude-memory ~/.claude/projects/<your-project>/memory
|
|
108
|
-
|
|
109
|
-
# 3. A single AGENTS.md or CLAUDE.md (split each # / ## heading into its own entry)
|
|
110
|
-
npx @fabersep/memory import --from agents-md ./AGENTS.md --split-headings
|
|
111
|
-
|
|
112
|
-
# 4. Existing Cursor rules
|
|
113
|
-
npx @fabersep/memory import --from cursor-rules ./.cursor/rules
|
|
61
|
+
npx @fabersep/memory doctor
|
|
114
62
|
```
|
|
115
63
|
|
|
116
|
-
|
|
117
|
-
- Scans your files, infers frontmatter (`id`, `type`, `summary`), checks for near-duplicates and hygiene issues (like hardcoded machine paths or secrets), and stages valid items into **`pre-memory`**.
|
|
118
|
-
- Nothing becomes active until you approve it in Step 4. *(In solo mode, if you trust the whole folder and want to skip manual review, you can add `--approve`.)*
|
|
119
|
-
- If you imported from `claude-memory`, the CLI also prints how to disable Claude's built-in auto-memory (`"autoMemoryEnabled": false` in `~/.claude/settings.json`) so future notes go through `pre-memory`.
|
|
64
|
+
You should see `PASS` lines. Each `WARN` or `FAIL` line comes with a one-line hint on how to fix it.
|
|
120
65
|
|
|
121
|
-
|
|
66
|
+
**3. Start a new chat in your assistant**
|
|
122
67
|
|
|
123
|
-
|
|
68
|
+
Tell it something about your project that it would otherwise get wrong, for example:
|
|
124
69
|
|
|
125
|
-
|
|
126
|
-
npx @fabersep/memory review
|
|
127
|
-
```
|
|
70
|
+
> *"In this project we run the tests with `make test`, never `npm test`. Please remember that."*
|
|
128
71
|
|
|
129
|
-
|
|
130
|
-
- `a` — **approve** (queued for a single batch commit at the end)
|
|
131
|
-
- `e` — **edit** the body before approving
|
|
132
|
-
- `r` — **reject** and delete the proposal
|
|
133
|
-
- `s` — **skip** for now
|
|
72
|
+
It should suggest saving this as a memory. (If it doesn't, ask it: *"Propose this as a memory."*)
|
|
134
73
|
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
*(Shortcuts: `npx @fabersep/memory review --approve-all`, `npx @fabersep/memory approve <id1> <id2>`, or `npx @fabersep/memory reject <id>`.)*
|
|
138
|
-
|
|
139
|
-
### Step 5: Verify everything is healthy
|
|
140
|
-
|
|
141
|
-
Check your current setup and pending queue:
|
|
74
|
+
**4. Approve what you want to keep**
|
|
142
75
|
|
|
143
76
|
```bash
|
|
144
|
-
npx @fabersep/memory
|
|
145
|
-
```
|
|
146
|
-
|
|
147
|
-
Run the strict validation check (schema, duplicates, 1,500-token L0 budget, and hygiene rules):
|
|
148
|
-
|
|
149
|
-
```bash
|
|
150
|
-
npx @fabersep/memory compile --check
|
|
77
|
+
npx @fabersep/memory review
|
|
151
78
|
```
|
|
152
79
|
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
---
|
|
80
|
+
You'll see each suggestion as a card. Press `a` to keep it, `e` to edit it first, `r` to throw it away, `s` to skip, or `q` to save and quit.
|
|
156
81
|
|
|
157
|
-
|
|
82
|
+
Now open a **new** chat and ask: *"How do I run the tests here?"* Your assistant answers `make test`, without you telling it again.
|
|
158
83
|
|
|
159
|
-
If you
|
|
160
|
-
|
|
161
|
-
```bash
|
|
162
|
-
# Clone and register your private team memory repo
|
|
163
|
-
npx @fabersep/memory setup --team git@github.com:your-org/team-memory.git
|
|
164
|
-
|
|
165
|
-
# Pull the latest team changes and recompile L0
|
|
166
|
-
npx @fabersep/memory sync
|
|
167
|
-
```
|
|
168
|
-
|
|
169
|
-
When you approve a `team` proposal via `review` or `approve`:
|
|
170
|
-
- **`--submit-mode auto` (default):** Pushes directly to the team repo's default branch via a clean temporary worktree. If branch protection rejects the push, it automatically falls back to creating a branch and opening a PR.
|
|
171
|
-
- **`--submit-mode pr`:** Always submits via a Pull Request (`npx @fabersep/memory config set-submit-mode pr`).
|
|
84
|
+
> **Already have notes?** If you keep rules in an `AGENTS.md`, a `CLAUDE.md`, Cursor rules or a folder of Markdown files, you can bring them in. They go to the same review step first. See [Importing existing notes](docs/guide.md#importing-existing-notes).
|
|
172
85
|
|
|
173
86
|
---
|
|
174
87
|
|
|
175
|
-
##
|
|
176
|
-
|
|
177
|
-
Once set up, daily use is simple:
|
|
88
|
+
## A normal day with it
|
|
178
89
|
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
90
|
+
- **While you work:** nothing to do. Your assistant reads its short memory list at the start and looks things up as it goes.
|
|
91
|
+
- **When it learns something:** it suggests a memory. The suggestion waits in a "to review" box (`pre-memory`) and changes nothing yet.
|
|
92
|
+
- **When you have a minute:** run `npx @fabersep/memory review`. All your approvals are saved together, in one step.
|
|
93
|
+
- **Changed your mind?** Every memory is a file in `~/.faber/memory`. Edit or delete it like any file, then run `npx @fabersep/memory compile`. Git keeps the history.
|
|
182
94
|
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
Memory files are standard Markdown with a small YAML frontmatter block:
|
|
95
|
+
A memory file looks like this:
|
|
186
96
|
|
|
187
97
|
```markdown
|
|
188
98
|
---
|
|
189
|
-
id:
|
|
99
|
+
id: use-pnpm
|
|
190
100
|
type: rule
|
|
191
|
-
|
|
192
|
-
summary: Never run pkill or killall by broad pattern; stop only your own PID or task.
|
|
193
|
-
tags: [safety, shell]
|
|
101
|
+
summary: Use pnpm, not npm, in this team's projects.
|
|
194
102
|
---
|
|
195
103
|
|
|
196
|
-
|
|
197
|
-
Always stop only the specific PID or background task you started.
|
|
104
|
+
Run `pnpm install` and `pnpm test`. Never commit a package-lock.json.
|
|
198
105
|
```
|
|
199
106
|
|
|
200
|
-
Valid `type` values: `rule`, `decision`, `lesson`, `preference`, `reference`.
|
|
201
|
-
After editing or adding a file manually in your memory repo, commit it with Git and run `npx @fabersep/memory compile`.
|
|
202
|
-
|
|
203
107
|
---
|
|
204
108
|
|
|
205
|
-
##
|
|
109
|
+
## Common questions
|
|
206
110
|
|
|
207
|
-
**
|
|
111
|
+
**Doesn't my AI tool already have memory?**
|
|
112
|
+
Some do, but it stays inside that one tool, and the tool can write to it without asking you. FaberSEP Memory works across tools, and only you can approve what goes in. More in [Why FaberSEP Memory?](docs/why-faber-memory.md)
|
|
208
113
|
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
faber-memory --help
|
|
212
|
-
```
|
|
213
|
-
|
|
214
|
-
**From GitHub source** (for contributing or local development):
|
|
215
|
-
|
|
216
|
-
```bash
|
|
217
|
-
git clone https://github.com/fabersep/memory.git
|
|
218
|
-
cd memory
|
|
219
|
-
npm install
|
|
220
|
-
npm test
|
|
221
|
-
npm link
|
|
222
|
-
```
|
|
223
|
-
|
|
224
|
-
---
|
|
225
|
-
|
|
226
|
-
## CLI Command Reference
|
|
227
|
-
|
|
228
|
-
| Command | Description |
|
|
229
|
-
| :--- | :--- |
|
|
230
|
-
| `setup [path]` | Initialize a local solo (personal) memory Git repo. |
|
|
231
|
-
| `setup --team <git-url> [--path <dir>] [--submit-mode auto\|pr]` | Clone and configure a shared team memory repo. |
|
|
232
|
-
| `config` | Print current `~/.faber/memory-state/config.json`. |
|
|
233
|
-
| `config set-path <personal\|team> <new-path>` | Move a configured memory root while keeping its UUID. |
|
|
234
|
-
| `config set-submit-mode <auto\|pr>` | Change team approval mode (`auto` push with PR fallback, or always `pr`). |
|
|
235
|
-
| `init [--apply \| --undo] [--engine ...] [--project-hint]` | Preview, apply (with `.bak` backups), or undo user-level agent wiring. |
|
|
236
|
-
| `compile [--check] [--repo <dir>]` | Compile L0 `MEMORY.md`, or validate schema/budget/hygiene in CI (`--check`). |
|
|
237
|
-
| `sync [--timeout <ms>]` | Fast-forward pull remote updates and recompile L0. |
|
|
238
|
-
| `status` | Show compiled L0 status, configured roots, warnings, and pending/stale proposals. |
|
|
239
|
-
| `review [--approve-all]` | Interactively approve, edit, reject, or skip pending `pre-memory` proposals. |
|
|
240
|
-
| `approve <id...> [--mode auto\|pr]` | Approve one or more proposals by ID in a single batch commit. |
|
|
241
|
-
| `reject <id>` | Reject and delete a pending proposal. |
|
|
242
|
-
| `import --from <type> <path> [--split-headings] [--approve]` | Deterministically import existing memory into `pre-memory`. |
|
|
243
|
-
| `serve` | Run the 3-tool stdio MCP server (used by your AI agent's MCP config). |
|
|
244
|
-
|
|
245
|
-
---
|
|
114
|
+
**Does it cost anything or send my data anywhere?**
|
|
115
|
+
No. It's free and open source (Apache-2.0), and it runs on your computer. Your notes go only where you push them yourself, for example to a private team repository.
|
|
246
116
|
|
|
247
|
-
|
|
117
|
+
**Can I use it on my phone?**
|
|
118
|
+
Not directly yet. If you control a computer or server from your phone (for example with Claude Remote Control), memory works in that session.
|
|
248
119
|
|
|
249
|
-
|
|
120
|
+
**How do I update or remove it?**
|
|
121
|
+
`npx @fabersep/memory@latest --version` fetches the newest version and prints its number. `npx @fabersep/memory init --undo` disconnects your assistants and leaves your notes in place. See [Updating and cleaning up](docs/guide.md#updating-and-cleaning-up).
|
|
250
122
|
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
| `memory_search` | Pure-JS BM25 full-text search across active `team`, `personal`, and `project` scopes (returns compact L1 summaries). Automatically reindexes on Git `HEAD` change. |
|
|
254
|
-
| `memory_get` | Fetch the full L2 Markdown body of a specific entry by ID. |
|
|
255
|
-
| `memory_propose` | Stage a new entry or update into `pre-memory` for human review (never writes directly to active memory). |
|
|
123
|
+
**Something went wrong.**
|
|
124
|
+
Run `npx @fabersep/memory doctor` first. Then check [Troubleshooting](docs/troubleshooting.md) or [open an issue](https://github.com/fabersep/memory/issues).
|
|
256
125
|
|
|
257
126
|
---
|
|
258
127
|
|
|
259
|
-
##
|
|
260
|
-
|
|
261
|
-
This repository follows the [FaberSEP Spec](https://github.com/fabersep/spec) standard:
|
|
128
|
+
## Going further
|
|
262
129
|
|
|
263
|
-
- [
|
|
264
|
-
- [
|
|
265
|
-
- [
|
|
266
|
-
- [
|
|
130
|
+
- **[User guide and reference](docs/guide.md):** how it works inside, team setup, importing, every command, the MCP tools and where files live.
|
|
131
|
+
- **[Why FaberSEP Memory?](docs/why-faber-memory.md):** comparisons with built-in memory and vector databases, and why the design keeps prompt caching cheap.
|
|
132
|
+
- **[Troubleshooting](docs/troubleshooting.md):** every warning, explained.
|
|
133
|
+
- **[Contributing](CONTRIBUTING.md)** and **[Changelog](CHANGELOG.md)**.
|
|
267
134
|
|
|
268
|
-
|
|
135
|
+
FaberSEP Memory is part of [FaberSEP](https://github.com/fabersep), open-source tools that help AI coding assistants work with more discipline.
|
|
269
136
|
|
|
270
137
|
## License
|
|
271
138
|
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { CompileMetricEvent } from './metrics.js';
|
|
2
|
+
export type CacheEngineOption = 'claude-code' | 'antigravity' | 'all' | 'cursor' | 'codex' | string;
|
|
3
|
+
export declare const CACHE_TTL_MS: number;
|
|
4
|
+
export interface ModelCacheSummary {
|
|
5
|
+
model: string;
|
|
6
|
+
sessions: number;
|
|
7
|
+
steps: number;
|
|
8
|
+
firstSteps: number;
|
|
9
|
+
warmSteps: number;
|
|
10
|
+
idleGapExcludedSteps: number;
|
|
11
|
+
firstStepHitPct: number;
|
|
12
|
+
warmStepHitPct: number;
|
|
13
|
+
}
|
|
14
|
+
export interface EngineCacheReport {
|
|
15
|
+
engine: 'claude-code' | 'antigravity';
|
|
16
|
+
foundDir: boolean;
|
|
17
|
+
unrecognizedFormat?: boolean;
|
|
18
|
+
sessions: number;
|
|
19
|
+
steps: number;
|
|
20
|
+
firstSteps: number;
|
|
21
|
+
warmSteps: number;
|
|
22
|
+
idleGapExcludedSteps: number;
|
|
23
|
+
firstStepHitPct: number;
|
|
24
|
+
warmStepHitPct: number;
|
|
25
|
+
skippedLines: number;
|
|
26
|
+
byModel: ModelCacheSummary[];
|
|
27
|
+
correlation?: {
|
|
28
|
+
applicable: boolean;
|
|
29
|
+
note?: string;
|
|
30
|
+
eligibleSessions: number;
|
|
31
|
+
correlatedBreaks: number;
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
export interface CacheAnalysisResult {
|
|
35
|
+
unsupportedEngine?: string;
|
|
36
|
+
unsupportedMessage?: string;
|
|
37
|
+
engines: EngineCacheReport[];
|
|
38
|
+
skippedLines: number;
|
|
39
|
+
}
|
|
40
|
+
export declare function analyzeCacheLogs(options: {
|
|
41
|
+
engine?: CacheEngineOption;
|
|
42
|
+
logDir?: string;
|
|
43
|
+
days: number;
|
|
44
|
+
nowMs?: number;
|
|
45
|
+
userHome?: string;
|
|
46
|
+
changedCompiles?: CompileMetricEvent[];
|
|
47
|
+
}): CacheAnalysisResult;
|