fastrmemory 0.3.1 → 0.5.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/marketplace.json +1 -1
- package/.claude-plugin/plugin.json +2 -2
- package/.cursor/mcp.json +1 -1
- package/.cursor/skills/fastr-setup/SKILL.md +4 -4
- package/.cursor/skills/skills.json +1 -1
- package/README.md +123 -167
- package/dist/bin/fastr.js +64 -1
- package/dist/bin/fastr.js.map +1 -1
- package/dist/src/installer/mcp-command.d.ts +19 -0
- package/dist/src/installer/mcp-command.d.ts.map +1 -0
- package/dist/src/installer/mcp-command.js +57 -0
- package/dist/src/installer/mcp-command.js.map +1 -0
- package/dist/src/installer/mcp-init.d.ts +81 -0
- package/dist/src/installer/mcp-init.d.ts.map +1 -0
- package/dist/src/installer/mcp-init.js +315 -0
- package/dist/src/installer/mcp-init.js.map +1 -0
- package/dist/src/installer/setup.d.ts +1 -12
- package/dist/src/installer/setup.d.ts.map +1 -1
- package/dist/src/installer/setup.js +2 -31
- package/dist/src/installer/setup.js.map +1 -1
- package/dist/src/ui/server.d.ts.map +1 -1
- package/dist/src/ui/server.js +10 -0
- package/dist/src/ui/server.js.map +1 -1
- package/dist-ui/assets/{ActionsPage-B3quzFNF.js → ActionsPage-CI-IRMeS.js} +1 -1
- package/dist-ui/assets/{GraphPage-DetiATmC.js → GraphPage-BdYMF7yz.js} +1 -1
- package/dist-ui/assets/{ObservatoryPage-QIGMwENf.js → ObservatoryPage-BG_vg8B9.js} +1 -1
- package/dist-ui/assets/{TreemapPage-C7uLZd37.js → TreemapPage-CZreyyLA.js} +1 -1
- package/dist-ui/assets/index-Ca9pma3Q.css +1 -0
- package/dist-ui/assets/{index-DWAH--Fu.js → index-MlNuiu0T.js} +17 -17
- package/dist-ui/assets/{maximize-2-BebkGbZA.js → maximize-2-_nvSvCC7.js} +1 -1
- package/dist-ui/build-manifest.json +11 -11
- package/dist-ui/index.html +2 -2
- package/llms-install.md +16 -8
- package/package.json +1 -1
- package/server.json +1 -1
- package/skills/fastr-setup/SKILL.md +4 -4
- package/skills/skills.json +1 -1
- package/dist-ui/assets/index-BJnPINTu.css +0 -1
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
"name": "fastrmemory",
|
|
9
9
|
"source": "./",
|
|
10
10
|
"description": "Local-first agent memory for Claude Code: MCP server plus Agent Skills for pre-edit trap checks, recall, trap logging, curation, and session handoffs.",
|
|
11
|
-
"version": "0.
|
|
11
|
+
"version": "0.5.0"
|
|
12
12
|
}
|
|
13
13
|
]
|
|
14
14
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "fastrmemory",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.5.0",
|
|
4
4
|
"description": "Local-first agent memory for Claude Code: MCP server plus Agent Skills for pre-edit trap checks, recall, trap logging, curation, and session handoffs.",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Fastrsoft"
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
"mcpServers": {
|
|
13
13
|
"fastrmemory": {
|
|
14
14
|
"command": "npx",
|
|
15
|
-
"args": ["-y", "fastrmemory@0.
|
|
15
|
+
"args": ["-y", "fastrmemory@0.5.0", "mcp"]
|
|
16
16
|
}
|
|
17
17
|
}
|
|
18
18
|
}
|
package/.cursor/mcp.json
CHANGED
|
@@ -14,7 +14,7 @@ allowed-tools: Bash(fastr *), Bash(fastrmemory *), Bash(npx -y fastrmemory*)
|
|
|
14
14
|
## 1. Project install (recommended)
|
|
15
15
|
Run from the project root:
|
|
16
16
|
```bash
|
|
17
|
-
npx -y fastrmemory@0.
|
|
17
|
+
npx -y fastrmemory@0.5.0 hook install
|
|
18
18
|
```
|
|
19
19
|
This is idempotent and backs up files it changes. It writes:
|
|
20
20
|
- `.mcp.json`: a project-scoped `fastrmemory` MCP server.
|
|
@@ -25,13 +25,13 @@ Commit `.mcp.json` and `.claude/settings.json` so the team shares the setup. Res
|
|
|
25
25
|
|
|
26
26
|
## 2. Manual MCP registration (alternative)
|
|
27
27
|
```bash
|
|
28
|
-
claude mcp add fastrmemory -- npx -y fastrmemory@0.
|
|
28
|
+
claude mcp add fastrmemory -- npx -y fastrmemory@0.5.0 mcp
|
|
29
29
|
```
|
|
30
|
-
On native Windows use `-- cmd /c npx -y fastrmemory@0.
|
|
30
|
+
On native Windows use `-- cmd /c npx -y fastrmemory@0.5.0 mcp`. Pass `--scope project` (before the name) to write `.mcp.json`. For a user-scoped registration (the default when `--scope project` is omitted), append `--project <absolute-project-path>` so the server does not use the client's launch directory; `fastr setup` writes that path automatically. This adds tools only, not hooks.
|
|
31
31
|
|
|
32
32
|
## 3. Verify
|
|
33
33
|
```bash
|
|
34
|
-
npx -y fastrmemory@0.
|
|
34
|
+
npx -y fastrmemory@0.5.0 status
|
|
35
35
|
claude mcp list
|
|
36
36
|
```
|
|
37
37
|
`status` prints the project ID, memory counts, and database path (`.fastr/` under the project). Inside a session, call:
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://skills.sh/schema/v1.json",
|
|
3
3
|
"name": "fastrmemory-skills",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.5.0",
|
|
5
5
|
"description": "Agent Skills that teach coding agents when to recall, log traps, curate, and commit FastrMemory.",
|
|
6
6
|
"author": "Fastrsoft",
|
|
7
7
|
"license": "Apache-2.0",
|
package/README.md
CHANGED
|
@@ -10,11 +10,11 @@
|
|
|
10
10
|
[](LICENSE)
|
|
11
11
|
[](https://nodejs.org)
|
|
12
12
|
[](https://modelcontextprotocol.io)
|
|
13
|
-
[](tests/)
|
|
14
|
+
[](#-one-click-agent-mcp-configuration)
|
|
15
15
|
[](#-architecture)
|
|
16
16
|
|
|
17
|
-
> **Status (2026-10-23):**
|
|
17
|
+
> **Status (2026-10-23):** **`fastrmemory@0.4.0` is published and is `latest`.** Evidence: `npm view fastrmemory version` -> `0.4.0`; `npm view fastrmemory dist-tags --json` -> `{"latest":"0.4.0"}`; tag `v0.4.0` (`bb365c2`); published 2026-10-23 07:32 UTC via GitHub Actions OIDC with npm provenance; release workflow run `39918288792` passed the full gate, clean tarball install, registry verification, and GitHub Release upload; GitHub Release tarball SHA-256 `b784e3e12b8a50deaee3b38dbc1f45c756bc37462f2d40433fdda5288cf554ad`; `npm install -g fastrmemory@0.4.0` + `fastr --version` -> `0.4.0`; `npm audit signatures` reports 5 verified registry signatures and 4 verified attestations. Caveat: Node.js >=22.16.0; `0.3.1` remains published historical and `0.3.0` remains historical. This release adds `fastr mcp init` and LF checkout enforcement, with no schema migration. The old scoped npm entries (`@atifjubaer/fastrmemory` and `fastrmemory@0.0.0-stage`) were removed on 2026-10-23; the GitHub `v0.2.1` tag and release remain as history. This README tracks current `main`. Current `main` is **`0.5.0`** and adds `fastr mcp init --source local`; it has **297 tests / 53 files**. `0.5.0` is prepared but not yet published, so `--source local` remains unavailable from npm `latest` until the `v0.5.0` release workflow completes. Until then, use the exact `0.4.0` version for reproducibility. CI run `39935705994` at `6c2a53a` passed all six matrix jobs on 2026-10-23, including Windows Node `22.x` and `24.x`; the `0.4.0` release commit `bb365c2` passed run `39879913968`. The release post for 0.2.1 remains at [docs/blog/2026-10-21-fastrmemory-0.2.1.md](docs/blog/2026-10-21-fastrmemory-0.2.1.md). The exact release surface is in [CHANGELOG.md](CHANGELOG.md). The headline benchmark uses **240 deterministic synthetic cases with a 20% holdout**, not SWE-bench or LongMemEval. Public LongMemEval, LoCoMo, and self-repository retrieval-only results plus pinned external baselines are in [BENCHMARKS.md](BENCHMARKS.md); no QA-leaderboard parity is claimed. Performance, packaging, and retrieval claims are tracked in [CLAIMS.md](CLAIMS.md); every README section is mapped to claim IDs in the README claim trace at the end of that ledger. Methodology, caveats, and raw JSON are in [BENCHMARKS.md](BENCHMARKS.md).
|
|
18
18
|
|
|
19
19
|
<p align="center">
|
|
20
20
|
<a href="#-overview">Overview</a> •
|
|
@@ -23,13 +23,12 @@
|
|
|
23
23
|
<a href="#-local-web-dashboard">Web UI</a> •
|
|
24
24
|
<a href="#-works-with-mcp--and-http-compatible-agents">Supported Agents</a> •
|
|
25
25
|
<a href="#-quick-start">Quick Start</a> •
|
|
26
|
+
<a href="#-one-click-agent-mcp-configuration">MCP Setup</a> •
|
|
26
27
|
<a href="#-mcp-server-tools--resources">MCP Tools</a> •
|
|
27
28
|
<a href="#-architecture">Architecture</a> •
|
|
28
|
-
<a href="ROADMAP.md">Roadmap</a> •
|
|
29
29
|
<a href="MIGRATION.md">Migration</a> •
|
|
30
30
|
<a href="SECURITY.md">Security</a> •
|
|
31
|
-
<a href="SCORECARD.md">Scorecard</a>
|
|
32
|
-
<a href="#-contributing">Contributing</a>
|
|
31
|
+
<a href="SCORECARD.md">Scorecard</a>
|
|
33
32
|
</p>
|
|
34
33
|
|
|
35
34
|
</div>
|
|
@@ -40,14 +39,15 @@
|
|
|
40
39
|
|
|
41
40
|
| Claim | Current result | Evidence |
|
|
42
41
|
|---|---|---|
|
|
43
|
-
| Install path |
|
|
44
|
-
| Synthetic retrieval | Holdout `95.8%` Hit@1, `100%` Hit@5, MRR `0.969` | `npx tsx scripts/eval-bench.ts --split all --embeddings minilm --out bench/results/minilm.json` |
|
|
45
|
-
| Test suite | `
|
|
42
|
+
| Install path | Published `fastrmemory@0.4.0` | `npm view fastrmemory version` -> `0.4.0`; `npm view fastrmemory dist-tags --json` -> `{"latest":"0.4.0"}`; `npm install -g fastrmemory@0.4.0`; `fastr --version` -> `0.4.0`; GitHub Release tarball SHA-256 `b784e3e1...`; old scoped npm entries removed |
|
|
43
|
+
| Synthetic retrieval (optional MiniLM) | Holdout `95.8%` Hit@1, `100%` Hit@5, MRR `0.969` | `npx tsx scripts/eval-bench.ts --split all --embeddings minilm --out bench/results/minilm.json` |
|
|
44
|
+
| Test suite | `297` tests across `53` files on current `main` (`0.5.0`); published `0.4.0` is `293` / `53`; `0.3.1` is `282` / `52`; v0.2.1 is `235` / `43` | `npm test`; `npm run check:ci` |
|
|
45
|
+
| MCP setup | `fastr mcp init` merges portable registry configs or active-CLI local configs for 9 JSON clients and prints a Codex TOML snippet; `--source local` ships in `0.5.0` (prepared; `0.4.0` remains published until `v0.5.0`) | `npm test -- tests/mcp-init.test.ts` -> `15 passed`; `fastr mcp init --client claude --source local --dry-run --json` -> `node .../dist/bin/fastr.js mcp --project ...` |
|
|
46
46
|
| Crash safety | 10/10 runs, 0 lost, 0 duplicate ids/titles | `npm run test:crash`; `bench/results/crash-test.json` |
|
|
47
47
|
| Public retrieval (0.3.0) | LongMemEval `+10.4pp` / `+11.0pp` Hit@5; LoCoMo `+4.4pp` / `+2.3pp` (target missed) | [docs/EXTERNAL_BASELINE.md](docs/EXTERNAL_BASELINE.md) |
|
|
48
48
|
| Release score | Provisional `9.4 / 10`; `9.2` target met; Retrieval remains Partial | [SCORECARD.md](SCORECARD.md) |
|
|
49
49
|
|
|
50
|
-
The synthetic table is not SWE-bench or LongMemEval. Public numbers are retrieval-only and are not QA-leaderboard results. Full provenance is in [CLAIMS.md](CLAIMS.md).
|
|
50
|
+
The synthetic table is not SWE-bench or LongMemEval. Public numbers are retrieval-only and are not QA-leaderboard results. The `95.8%` row uses optional MiniLM; the default offline hash path scores `77.1%` Hit@1 / `93.8%` Hit@5 on the same holdout. Full provenance is in [CLAIMS.md](CLAIMS.md).
|
|
51
51
|
|
|
52
52
|
---
|
|
53
53
|
|
|
@@ -110,60 +110,132 @@ Clients commonly used with FastrMemory include Codex CLI, Gemini CLI, OpenCode,
|
|
|
110
110
|
|
|
111
111
|
### ⚡ Run Without a Global Install
|
|
112
112
|
|
|
113
|
-
The canonical package target is unscoped `fastrmemory@0.3.1
|
|
113
|
+
The canonical package target is unscoped `fastrmemory@0.4.0`. `0.3.1` remains published historical. The old scoped npm entries were removed on 2026-10-23.
|
|
114
114
|
|
|
115
115
|
```bash
|
|
116
116
|
# Canonical one-shot (pins the exact release):
|
|
117
|
-
npx -y fastrmemory@0.
|
|
117
|
+
npx -y fastrmemory@0.4.0 setup
|
|
118
118
|
|
|
119
119
|
# Or launch the local Web UI:
|
|
120
|
-
npx -y fastrmemory@0.
|
|
120
|
+
npx -y fastrmemory@0.4.0 ui
|
|
121
121
|
```
|
|
122
122
|
|
|
123
|
-
The GitHub source path remains available for development only: `npx github:atifjubaer/fastrmemory setup`. For a reproducible source install, pin the tag: `npx github:atifjubaer/fastrmemory#v0.
|
|
123
|
+
The GitHub source path remains available for development only: `npx github:atifjubaer/fastrmemory setup`. For a reproducible source install, pin the tag: `npx github:atifjubaer/fastrmemory#v0.4.0 setup`. Do not use either GitHub form in generated MCP or hook configs; those must use the npm package. The default `latest` channel tracks new releases, and `--channel pinned` records the exact version for reproducibility.
|
|
124
124
|
|
|
125
125
|
---
|
|
126
126
|
|
|
127
127
|
### Install from npm
|
|
128
128
|
|
|
129
129
|
```bash
|
|
130
|
-
# Canonical install (latest is 0.
|
|
130
|
+
# Canonical install (latest is 0.4.0):
|
|
131
131
|
npm install -g fastrmemory
|
|
132
132
|
fastr --version
|
|
133
133
|
|
|
134
134
|
# Exact release:
|
|
135
|
-
npm install -g fastrmemory@0.
|
|
135
|
+
npm install -g fastrmemory@0.4.0
|
|
136
136
|
```
|
|
137
137
|
|
|
138
138
|
For a one-shot run without a global install:
|
|
139
139
|
|
|
140
140
|
```bash
|
|
141
|
-
npx -y fastrmemory@0.
|
|
141
|
+
npx -y fastrmemory@0.4.0 --version
|
|
142
142
|
```
|
|
143
143
|
|
|
144
|
-
`0.
|
|
144
|
+
`0.4.0` is built from tag `v0.4.0` by `.github/workflows/release.yml`, which runs the full gate, publishes with npm provenance, and attaches the same tarball to the GitHub Release. Verify the registry result with `npm view fastrmemory@0.4.0 version` and `npm view fastrmemory dist-tags --json`; a first E404 for a few minutes is registry propagation, not a failed publish. The old scoped npm entries remain removed. Do not republish `0.3.0`. `0.3.1` remains published historical.
|
|
145
|
+
|
|
146
|
+
### Update an Existing Install
|
|
147
|
+
|
|
148
|
+
Stop every agent, hook, `fastr ui`, and `fastr daemon` before changing versions. Run this from the project root:
|
|
149
|
+
|
|
150
|
+
```bash
|
|
151
|
+
# 1. Back up memory before changing versions
|
|
152
|
+
fastr backup fastr-backup.jsonl
|
|
153
|
+
fastr backup --verify fastr-backup.jsonl
|
|
154
|
+
|
|
155
|
+
# 2. Update the global CLI
|
|
156
|
+
npm install -g fastrmemory@latest
|
|
157
|
+
fastr --version
|
|
158
|
+
|
|
159
|
+
# 3. Refresh project integration (choose what you use)
|
|
160
|
+
fastr mcp init --client all --scope project # portable npx configs only
|
|
161
|
+
fastr mcp init --client all --scope user --source local --profile core # installed CLI
|
|
162
|
+
fastr setup # MCP configs, AGENTS.md, and skills
|
|
163
|
+
fastr hook install # lifecycle hooks plus MCP for hook clients
|
|
164
|
+
|
|
165
|
+
# 4. Verify
|
|
166
|
+
fastr status
|
|
167
|
+
fastr hygiene
|
|
168
|
+
```
|
|
169
|
+
|
|
170
|
+
`0.5.0` has no schema migration. If you use `--channel pinned`, rerun `fastr mcp init` after each update; with the default `latest` channel, restart the client to pick up the new release. If you use `--source local`, the config points at the installed CLI, so updating the global package updates the server without rewriting the config. `fastr setup` refreshes copied skills, overwrites same-named skill files, removes retired skills, and leaves user-owned directories. `fastr hook install` does not copy skills. See [MIGRATION.md](MIGRATION.md) for rollback.
|
|
171
|
+
|
|
172
|
+
### One-Command MCP Setup
|
|
173
|
+
|
|
174
|
+
`fastr mcp init` is the shadcn-style setup path. It is config-only: it merges the `fastrmemory` MCP entry into an existing client config, preserves unrelated keys, writes a one-time `.fastr.bak` backup, and is idempotent. It does not install lifecycle hooks, skills, or the OpenCode plugin; use `fastr hook install` for hooks and the OpenCode plugin, and `fastr setup` for skills.
|
|
175
|
+
|
|
176
|
+
```bash
|
|
177
|
+
# Claude Code (project-scoped .mcp.json)
|
|
178
|
+
npx -y fastrmemory@latest mcp init --client claude
|
|
179
|
+
|
|
180
|
+
# Cursor
|
|
181
|
+
npx -y fastrmemory@latest mcp init --client cursor
|
|
182
|
+
|
|
183
|
+
# VS Code (.vscode/mcp.json)
|
|
184
|
+
npx -y fastrmemory@latest mcp init --client vscode
|
|
185
|
+
|
|
186
|
+
# OpenCode (opencode.json)
|
|
187
|
+
npx -y fastrmemory@latest mcp init --client opencode
|
|
188
|
+
|
|
189
|
+
# Gemini CLI and GitHub Copilot CLI
|
|
190
|
+
npx -y fastrmemory@latest mcp init --client gemini,copilot
|
|
191
|
+
|
|
192
|
+
# Every project-scoped client at once
|
|
193
|
+
npx -y fastrmemory@latest mcp init --client all --scope project
|
|
194
|
+
```
|
|
195
|
+
|
|
196
|
+
The same command through the other package runners:
|
|
197
|
+
|
|
198
|
+
```bash
|
|
199
|
+
pnpm dlx fastrmemory@latest mcp init --client claude
|
|
200
|
+
yarn dlx fastrmemory@latest mcp init --client claude
|
|
201
|
+
bunx fastrmemory@latest mcp init --client claude
|
|
202
|
+
```
|
|
203
|
+
|
|
204
|
+
The default `--channel latest` writes `fastrmemory@latest`, so a client restart picks up the newest npm release. Use `--channel pinned` for a reproducible config containing the exact version that ran the command; on current `main` that writes `fastrmemory@0.5.0` (pending publication). `--runner pnpm|yarn|bunx` changes the generated runner, `--profile core` selects the 12-tool surface, `--dry-run` prints targets without writing, and `--scope user` writes user-level configs with an explicit `--project /absolute/path` so the server always opens the intended database. Codex prints a `[mcp_servers.fastrmemory]` TOML block for `~/.codex/config.toml` instead of rewriting a user-owned TOML file.
|
|
205
|
+
|
|
206
|
+
For a globally installed CLI, use `--source local` to write the active CLI path instead of an npx command. It always appends an absolute `--project`, so the config is machine-specific but starts without an npx cold start:
|
|
207
|
+
|
|
208
|
+
```bash
|
|
209
|
+
fastr mcp init --client all --scope user --source local --profile core
|
|
210
|
+
```
|
|
211
|
+
|
|
212
|
+
Updating the global package updates the server; rerun the command only if the CLI path changes. Use the default `--source registry` for portable project configs that are committed and shared across machines.
|
|
213
|
+
|
|
214
|
+
> `--source local` ships in `0.5.0`. Until the `v0.5.0` release workflow completes, published `0.4.0` remains the install target; use `fastr setup` on `0.4.0` for an installed-CLI config.
|
|
215
|
+
|
|
216
|
+
> `mcp init` ships in `0.4.0`; `npx fastrmemory@latest mcp init ...` now resolves to published `0.4.0`. If you need the previous release, use `fastr setup` or pin `fastrmemory@0.3.1`.
|
|
145
217
|
|
|
146
218
|
### Install from GitHub
|
|
147
219
|
|
|
148
220
|
For a one-shot source run, pin the release tag:
|
|
149
221
|
|
|
150
222
|
```bash
|
|
151
|
-
npx --yes github:atifjubaer/fastrmemory#v0.
|
|
152
|
-
npx --yes github:atifjubaer/fastrmemory#v0.
|
|
223
|
+
npx --yes github:atifjubaer/fastrmemory#v0.4.0 --version
|
|
224
|
+
npx --yes github:atifjubaer/fastrmemory#v0.4.0 setup
|
|
153
225
|
```
|
|
154
226
|
|
|
155
227
|
For a global CLI without npm's Git resolver, download the release tarball:
|
|
156
228
|
|
|
157
229
|
```bash
|
|
158
|
-
curl -L -o fastrmemory-0.
|
|
159
|
-
https://github.com/atifjubaer/fastrmemory/releases/download/v0.
|
|
160
|
-
npm install -g ./fastrmemory-0.
|
|
230
|
+
curl -L -o fastrmemory-0.4.0.tgz \
|
|
231
|
+
https://github.com/atifjubaer/fastrmemory/releases/download/v0.4.0/fastrmemory-0.4.0.tgz
|
|
232
|
+
npm install -g ./fastrmemory-0.4.0.tgz
|
|
161
233
|
fastr --version
|
|
162
234
|
```
|
|
163
235
|
|
|
164
|
-
On Windows, download the same URL with `Invoke-WebRequest` or a browser, then run `npm install -g .\fastrmemory-0.
|
|
236
|
+
On Windows, download the same URL with `Invoke-WebRequest` or a browser, then run `npm install -g .\fastrmemory-0.4.0.tgz`. For a local project install, use `npm install --no-save ./fastrmemory-0.4.0.tgz` instead of the global flag.
|
|
165
237
|
|
|
166
|
-
> Git installs build from source and are slower than the npm tarball; for a global CLI, prefer the npm package or the release tarball above. `npm install -g git+https://...` is not recommended with npm 11 because the `prepare` build does not receive dev dependencies. Both `fastrmemory` and `fastr` (short alias) are executable after installation. The canonical package is unscoped `fastrmemory@0.
|
|
238
|
+
> Git installs build from source and are slower than the npm tarball; for a global CLI, prefer the npm package or the release tarball above. `npm install -g git+https://...` is not recommended with npm 11 because the `prepare` build does not receive dev dependencies. Both `fastrmemory` and `fastr` (short alias) are executable after installation. The canonical package is unscoped `fastrmemory@0.4.0`; the old scoped npm entries are gone. Use npm for generated MCP and hook configs so installs stay reproducible.
|
|
167
239
|
|
|
168
240
|
### 2. Verify Database Health
|
|
169
241
|
|
|
@@ -263,9 +335,10 @@ fastrmemory daemon start
|
|
|
263
335
|
fastrmemory daemon status
|
|
264
336
|
fastrmemory daemon stop
|
|
265
337
|
|
|
266
|
-
# Auto-wire MCP
|
|
267
|
-
# Gemini CLI, GitHub Copilot CLI, and OpenCode; setup also wires Antigravity, Claude Desktop, and Windsurf:
|
|
338
|
+
# Auto-wire MCP + lifecycle hooks for Claude Code, Cursor, Gemini CLI, Copilot CLI, and OpenCode:
|
|
268
339
|
fastrmemory hook install
|
|
340
|
+
|
|
341
|
+
# Auto-wire MCP + AGENTS.md + Planetary Skills; setup also wires Antigravity, Claude Desktop, and Windsurf:
|
|
269
342
|
fastrmemory setup
|
|
270
343
|
|
|
271
344
|
# Mine past Git bug fixes directly into staging error traps:
|
|
@@ -308,84 +381,47 @@ fastrmemory guard --strict
|
|
|
308
381
|
|
|
309
382
|
## 🔌 One-Click Agent MCP Configuration
|
|
310
383
|
|
|
311
|
-
|
|
384
|
+
`fastr mcp init` is the one-command path for MCP-only wiring. By default it uses `--source registry` and writes the platform-correct portable runner (`npx`, `pnpm dlx`, `yarn dlx`, or `bunx`; `cmd /c ...` on native Windows). Pass `--source local` to write the active CLI path plus an absolute `--project`, which is useful for a globally installed CLI but makes the config machine-specific. It preserves unrelated config keys and is idempotent. `fastr setup` remains the full installer for `.fastr/`, `AGENTS.md`, MCP configs, and skills; `fastr hook install` adds lifecycle hooks plus MCP configs for Claude Code, Cursor, Gemini CLI, Copilot CLI, and OpenCode.
|
|
312
385
|
|
|
313
|
-
|
|
314
|
-
```json
|
|
315
|
-
{
|
|
316
|
-
"mcpServers": {
|
|
317
|
-
"fastrmemory": {
|
|
318
|
-
"command": "npx",
|
|
319
|
-
"args": ["-y", "fastrmemory@0.3.1", "mcp", "--project", "/absolute/path/to/your/repo"]
|
|
320
|
-
}
|
|
321
|
-
}
|
|
322
|
-
}
|
|
323
|
-
```
|
|
386
|
+
`fastr hook install` merges lifecycle hooks for Claude Code, Cursor, Gemini CLI, GitHub Copilot CLI, and OpenCode, and writes the OpenCode context/compaction plugin. Gemini CLI requires strict JSON on hook stdout; Copilot returns `permissionDecision: "ask"` for an active trap because it has no model-facing advisory field for `preToolUse`.
|
|
324
387
|
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
### Gemini CLI (`.gemini/settings.json`, project-scoped, 0.3.0)
|
|
338
|
-
```json
|
|
339
|
-
{
|
|
340
|
-
"mcpServers": {
|
|
341
|
-
"fastrmemory": {
|
|
342
|
-
"command": "npx",
|
|
343
|
-
"args": ["-y", "fastrmemory@0.3.1", "mcp"]
|
|
344
|
-
}
|
|
345
|
-
}
|
|
346
|
-
}
|
|
347
|
-
```
|
|
388
|
+
| Client | Project config | User config | JSON key |
|
|
389
|
+
| :--- | :--- | :--- | :--- |
|
|
390
|
+
| Claude Code | `.mcp.json` | `~/.claude.json` | `mcpServers` |
|
|
391
|
+
| Cursor | `.cursor/mcp.json` | `~/.cursor/mcp.json` | `mcpServers` |
|
|
392
|
+
| VS Code | `.vscode/mcp.json` | VS Code `User/mcp.json` | `servers` |
|
|
393
|
+
| OpenCode | `opencode.json` | project only | `mcp.servers` |
|
|
394
|
+
| Gemini CLI | `.gemini/settings.json` | `~/.gemini/settings.json` | `mcpServers` |
|
|
395
|
+
| GitHub Copilot CLI | `.github/mcp.json` | project only | `mcpServers` |
|
|
396
|
+
| Windsurf | user only | `~/.codeium/windsurf/mcp_config.json` | `mcpServers` |
|
|
397
|
+
| Antigravity | user only | `~/.gemini/antigravity/mcp_config.json` | `mcpServers` |
|
|
398
|
+
| Claude Desktop | user only | platform-specific | `mcpServers` |
|
|
399
|
+
| Codex | user only | `~/.codex/config.toml` | printed TOML |
|
|
348
400
|
|
|
349
|
-
|
|
401
|
+
Example POSIX project config generated by `fastr mcp init --client cursor` (Windows uses `cmd /c npx ...`):
|
|
350
402
|
|
|
351
|
-
### GitHub Copilot CLI (`.github/mcp.json`, project-scoped, 0.3.0)
|
|
352
403
|
```json
|
|
353
404
|
{
|
|
354
405
|
"mcpServers": {
|
|
355
406
|
"fastrmemory": {
|
|
356
|
-
"type": "local",
|
|
357
407
|
"command": "npx",
|
|
358
|
-
"args": ["-y", "fastrmemory@
|
|
408
|
+
"args": ["-y", "fastrmemory@latest", "mcp"]
|
|
359
409
|
}
|
|
360
410
|
}
|
|
361
411
|
}
|
|
362
412
|
```
|
|
363
413
|
|
|
364
|
-
`
|
|
414
|
+
VS Code uses `servers` instead of `mcpServers`; OpenCode uses `mcp.servers` with a command array and `"type": "local"`. Existing `opencode.json(c)` settings are preserved, but a JSONC config is reported for manual wiring rather than rewritten. Codex is always printed as a `[mcp_servers.fastrmemory]` TOML block because rewriting a user-owned TOML file safely requires a dedicated parser.
|
|
365
415
|
|
|
366
|
-
|
|
367
|
-
```json
|
|
368
|
-
{
|
|
369
|
-
"mcp": {
|
|
370
|
-
"servers": {
|
|
371
|
-
"fastrmemory": {
|
|
372
|
-
"type": "local",
|
|
373
|
-
"command": ["npx", "-y", "fastrmemory@0.3.1", "mcp"]
|
|
374
|
-
}
|
|
375
|
-
}
|
|
376
|
-
}
|
|
377
|
-
}
|
|
378
|
-
```
|
|
379
|
-
|
|
380
|
-
`fastrmemory hook install` also writes `.opencode/plugins/fastrmemory/index.ts`, which injects the session-start handoff and critical rules into model context and captures a snapshot before compaction. Existing `opencode.json(c)` settings are preserved; JSONC configs are left untouched and reported for manual wiring.
|
|
416
|
+
For user-scoped clients, the generated entry includes `--project /absolute/path/to/repo`; this prevents the client's launch directory from selecting the wrong database. `fastr setup` also writes the absolute `node` path and is the recommended path when the client cannot launch package-runner shims. `--source local` is the `mcp init` equivalent for an installed CLI: it writes the active CLI path and an absolute `--project`; use `--source registry` (the default) when the config will be committed or shared. `--source local` ships in `0.5.0`; on published `0.4.0`, use `fastr setup` for an installed-CLI config. On native Windows, `fastr mcp init` automatically emits `"command": "cmd"` with `"/c"` and the runner, so manual `npx.cmd` fixes are not needed.
|
|
381
417
|
|
|
382
|
-
|
|
418
|
+
`--client all --scope project` covers the six project-scoped clients in the table. `--client all --scope user` covers the eight user-scoped clients; OpenCode and Copilot CLI are project-only, while Codex prints a TOML block for manual insertion. User-scoped entries pin one `--project` database, so use project scope when each developer may open a different checkout.
|
|
383
419
|
|
|
384
420
|
---
|
|
385
421
|
|
|
386
422
|
## 🛠️ MCP Server: Tools & Resources
|
|
387
423
|
|
|
388
|
-
Built using the official **v2 `@modelcontextprotocol/server`** SDK. The tool list below describes **0.
|
|
424
|
+
Built using the official **v2 `@modelcontextprotocol/server`** SDK. The tool list below describes **0.5.0** (tool surface unchanged from 0.4.0); the v0.2.1 release has 4 resources.
|
|
389
425
|
|
|
390
426
|
### 41 MCP Tools
|
|
391
427
|
|
|
@@ -519,6 +555,8 @@ FastrMemory ships 10 Agent Skills (in `skills/`, mirrored to `.cursor/skills/`)
|
|
|
519
555
|
|
|
520
556
|
Run `npm run check:skills` to validate every tool call in the skills against `src/mcp/server.ts`.
|
|
521
557
|
|
|
558
|
+
After updating the CLI, re-run `fastr setup` to refresh the copied skills. The installer overwrites same-named skill files, removes retired skills, and leaves unrelated user-owned directories. `fastr hook install` does not copy skills. Restart the client after setup. If you install the Claude Code plugin instead, update the plugin rather than maintaining a second copied skill set.
|
|
559
|
+
|
|
522
560
|
---
|
|
523
561
|
|
|
524
562
|
## 🏗️ Architecture
|
|
@@ -563,7 +601,7 @@ Run the comprehensive unit test suite:
|
|
|
563
601
|
npm test
|
|
564
602
|
```
|
|
565
603
|
|
|
566
|
-
All **
|
|
604
|
+
All **297 tests pass** across **53 test files** on current `main` (`0.5.0`); published `0.4.0` has **293 tests / 53 files**, `0.3.1` has **282 / 52**, and v0.2.1 has **235 / 43**. Coverage includes database schema, WAL locking, offline spooling, bi-temporal supersession, secret scrubbing, two-zone rendering, automated benchmarks, snapshots/rollback, branch merge conflict reports, replay/diff, memory envelopes, confidence tiers and 3-bad dormancy, memory hygiene checks, Memory CI, conflict-aware recall, portable backup manifests and verified restore, local rule import, OpenCode V2, Gemini CLI, and Copilot CLI wiring, git-learner, cognitive blame, commit synthesis, hybrid background daemon, token compression, self-healing doctor, multimodal vision, web dashboard server, pre-merge trap guardian, UI loopback security boundaries, atomic installer configuration safety, and shadcn-style `mcp init` client config merges, including local-source entries.
|
|
567
605
|
|
|
568
606
|
**CI performance gates:** `check:query-plans`, `check:recall-latency`, and `check:install-size` run inside `check:ci`. CI executes them on the canonical Ubuntu/Node 24 job; other matrix jobs set `FASTR_PERF_GATE=0` because timing is runner-sensitive, while functional tests still run on every matrix entry.
|
|
569
607
|
|
|
@@ -640,88 +678,6 @@ cursor --install-extension fastrmemory-vscode-0.1.0.vsix
|
|
|
640
678
|
|
|
641
679
|
---
|
|
642
680
|
|
|
643
|
-
## 🤝 Contributing & Pull Request Roadmap
|
|
644
|
-
|
|
645
|
-
We warmly welcome contributions from the open-source community! Whether you are adding a new AI coding agent hook, integrating local embedding backends, or crafting 3D visualizations, your pull requests are valued and reviewed promptly.
|
|
646
|
-
|
|
647
|
-
### 🏆 Contributor Wall of Fame
|
|
648
|
-
|
|
649
|
-
Special thanks to **[@the-arizul](https://github.com/the-arizul)** for architecting PRs #1 through #11:
|
|
650
|
-
- **PR #1**: Loopback security boundaries, DNS rebinding lockdown, and `dist-ui` package resolution.
|
|
651
|
-
- **PR #2**: Safe atomic JSON config merges, nested Claude Code hook schemas, and sandboxed installer tests.
|
|
652
|
-
- **PR #3**: Hardened GitHub Actions fork PR comment safety.
|
|
653
|
-
- **PR #4**: Core SQLite B-tree heal, BUSY spool fallback, ATTACH injection prevention, and atomic claim/supersede.
|
|
654
|
-
- **PR #5**: Git security hardening (zero shell interpolation, confined paths, and high-entropy secret scrubbing).
|
|
655
|
-
- **PR #6**: Triple-stream RRF recall ranking calibration, zero irrelevant results, and Unicode query normalization.
|
|
656
|
-
- **PR #7**: MCP server hardening (`isError` handling, bounded inputs, parameter annotations, prompts, and new tools: `fastr_get`, `fastr_list`, `fastr_pin`, `fastr_forget`).
|
|
657
|
-
- **PR #8**: Skills suite consolidation, plugin manifest, and CI validation runner.
|
|
658
|
-
- **PR #9**: VS Code extension headless activation fallback and staging trap decorations.
|
|
659
|
-
- **PR #10**: Isolated benchmark database harnesses and calibrated baselines.
|
|
660
|
-
- **PR #11**: Planetary Dashboard v2 overhaul with shadcn/ui, Tailwind CSS v4, and live cross-process sync.
|
|
661
|
-
|
|
662
|
-
---
|
|
663
|
-
|
|
664
|
-
### 🗺️ Open Contribution Roadmap
|
|
665
|
-
|
|
666
|
-
| Domain / Focus Area | What Needs Building | Difficulty | Reference Location | Target PR Scope |
|
|
667
|
-
| :--- | :--- | :--- | :--- | :--- |
|
|
668
|
-
| **Agent Hook Installers** | Auto-wire hooks & skills for Windsurf, Roo Code, Continue, and Warp | `good first issue` | [src/installer/setup.ts](src/installer/setup.ts) | `feat(installer)` |
|
|
669
|
-
| **Local Embedding Providers** | Optional on-device backends (Ollama, llama.cpp, WebGPU) with air-gapped fallback | Intermediate | [src/search/embeddings.ts](src/search/embeddings.ts) | `feat(embeddings)` |
|
|
670
|
-
| **IDE Extensions** | JetBrains (IntelliJ / WebStorm) and Neovim Lua plugin with status bar pill & trap underlines | Advanced | [extensions/vscode/](extensions/vscode/) | `feat(ide)` |
|
|
671
|
-
| **Benchmark Runners** | SWE-bench and additional public QA scenario runners; LongMemEval and LoCoMo retrieval harnesses already exist | `good first issue` | [src/bench/benchmark.ts](src/bench/benchmark.ts) | `feat(bench)` |
|
|
672
|
-
| **UI Visualizations** | Custom Three.js shaders, Treemap color palettes, and SVG/PNG graph exports | Intermediate | [ui/src/components/](ui/src/components/) | `feat(ui)` |
|
|
673
|
-
|
|
674
|
-
---
|
|
675
|
-
|
|
676
|
-
### 🚀 Pull Request Workflow
|
|
677
|
-
|
|
678
|
-
1. **Fork & Clone Repository**:
|
|
679
|
-
```bash
|
|
680
|
-
git clone https://github.com/<your-username>/fastrmemory.git
|
|
681
|
-
cd fastrmemory
|
|
682
|
-
```
|
|
683
|
-
|
|
684
|
-
2. **Install Dependencies & Verify Test Suite (282 Tests Passing)**:
|
|
685
|
-
```bash
|
|
686
|
-
npm install
|
|
687
|
-
npm test
|
|
688
|
-
```
|
|
689
|
-
|
|
690
|
-
3. **Create a Feature Branch**:
|
|
691
|
-
```bash
|
|
692
|
-
git checkout -b feat/add-windsurf-hooks
|
|
693
|
-
# or for bug fixes:
|
|
694
|
-
git checkout -b fix/sqlite-busy-retry
|
|
695
|
-
```
|
|
696
|
-
|
|
697
|
-
4. **Implement Changes & Verify All Packages Compile**:
|
|
698
|
-
```bash
|
|
699
|
-
# Compiles backend, React UI, and VS Code extension
|
|
700
|
-
npm run build:all
|
|
701
|
-
npm test
|
|
702
|
-
```
|
|
703
|
-
|
|
704
|
-
5. **Commit with DCO Sign-off (`-s`) & Open Pull Request**:
|
|
705
|
-
```bash
|
|
706
|
-
git commit -s -m "feat(installer): add windsurf auto-hook integration"
|
|
707
|
-
git push origin feat/add-windsurf-hooks
|
|
708
|
-
```
|
|
709
|
-
|
|
710
|
-
---
|
|
711
|
-
|
|
712
|
-
### 📋 Pull Request Quality Checklist
|
|
713
|
-
|
|
714
|
-
Before submitting your PR, verify:
|
|
715
|
-
- [ ] **Strict TypeScript**: `npm run build:all` passes without type errors.
|
|
716
|
-
- [ ] **Zero External Daemons**: Engine runs in-process via Node.js WAL SQLite.
|
|
717
|
-
- [ ] **100% Test Green**: `npm test` passes all 282 unit tests across 52 files.
|
|
718
|
-
- [ ] **DCO Sign-off**: All commits signed off using `git commit -s` ([Developer Certificate of Origin](https://developercertificate.org/)).
|
|
719
|
-
- [ ] **Pre-Merge Trap Guardian**: Run `fastrmemory guard --strict` to verify no active error traps are violated.
|
|
720
|
-
|
|
721
|
-
See [CONTRIBUTING.md](CONTRIBUTING.md) for full architectural guidelines, secret scrubbing rules, and local development environment setup.
|
|
722
|
-
|
|
723
|
-
---
|
|
724
|
-
|
|
725
681
|
## 📄 License
|
|
726
682
|
|
|
727
683
|
Apache License 2.0. Built by **Fastrsoft**. Free for personal and commercial use.
|
package/dist/bin/fastr.js
CHANGED
|
@@ -10,6 +10,7 @@ import { runInteractiveSetup } from '../src/installer/setup.js';
|
|
|
10
10
|
import { formatBenchmarkMarkdown } from '../src/bench/benchmark.js';
|
|
11
11
|
import { startUiServer } from '../src/ui/server.js';
|
|
12
12
|
import { installAgentHooks } from '../src/installer/hooks.js';
|
|
13
|
+
import { formatMcpInitResult, initMcpClients, parseMcpChannel, parseMcpClients, parseMcpProfile, parseMcpRunner, parseMcpScope, parseMcpSource, } from '../src/installer/mcp-init.js';
|
|
13
14
|
import { learnFromGitHistory } from '../src/learn/git-learner.js';
|
|
14
15
|
import { exportToObsidianVault } from '../src/export/obsidian.js';
|
|
15
16
|
import { runLifecycleHook, toClaudeHookStdout, toGeminiHookStdout, toCopilotHookStdout } from '../src/hooks/runner.js';
|
|
@@ -40,6 +41,9 @@ const BANNER = `
|
|
|
40
41
|
\x1b[2m ⚡ Sovereign Cognitive Agent Memory • Zero Daemon • Native Node 24 WAL\x1b[0m
|
|
41
42
|
`;
|
|
42
43
|
const program = new Command();
|
|
44
|
+
// Let subcommands own options that also exist on their parent (for example `mcp --project`
|
|
45
|
+
// and `mcp init --project`) without the parent consuming the subcommand's value.
|
|
46
|
+
program.enablePositionalOptions();
|
|
43
47
|
program
|
|
44
48
|
.name('fastrmemory')
|
|
45
49
|
.alias('fastr')
|
|
@@ -61,7 +65,7 @@ program
|
|
|
61
65
|
runInteractiveSetup();
|
|
62
66
|
});
|
|
63
67
|
// 1. MCP stdio command (Primary integration for Claude Code, Cursor, Antigravity)
|
|
64
|
-
program
|
|
68
|
+
const mcpCmd = program
|
|
65
69
|
.command('mcp')
|
|
66
70
|
.description('Run FastrMemory as an MCP stdio server')
|
|
67
71
|
.option('--profile <profile>', 'Tool surface: full (default) or core (12 tools)')
|
|
@@ -75,6 +79,65 @@ program
|
|
|
75
79
|
process.exit(1);
|
|
76
80
|
}
|
|
77
81
|
});
|
|
82
|
+
mcpCmd
|
|
83
|
+
.command('init')
|
|
84
|
+
.description('Configure FastrMemory MCP in Claude Code, Cursor, VS Code, OpenCode, or another client')
|
|
85
|
+
.requiredOption('--client <clients>', 'Client id, comma-separated ids, or all')
|
|
86
|
+
.option('--scope <scope>', 'project or user', 'project')
|
|
87
|
+
.option('--channel <channel>', 'latest (auto-update) or pinned (exact version)', 'latest')
|
|
88
|
+
.option('--runner <runner>', 'npx, pnpm, yarn, or bunx', 'npx')
|
|
89
|
+
.option('--profile <profile>', 'Tool surface: full or core', 'full')
|
|
90
|
+
.option('--source <source>', 'registry (portable npx) or local (active CLI)', 'registry')
|
|
91
|
+
.option('--project <path>', 'Project root for user-scoped configs', process.cwd())
|
|
92
|
+
.option('--dry-run', 'Print the target files without writing', false)
|
|
93
|
+
.option('--json', 'Print a machine-readable result', false)
|
|
94
|
+
.addHelpText('after', `
|
|
95
|
+
Examples:
|
|
96
|
+
$ fastrmemory mcp init --client claude
|
|
97
|
+
$ fastrmemory mcp init --client cursor,vscode --channel pinned
|
|
98
|
+
$ fastrmemory mcp init --client opencode --runner pnpm
|
|
99
|
+
$ fastrmemory mcp init --client all --scope project
|
|
100
|
+
$ fastrmemory mcp init --client all --scope user --source local --profile core
|
|
101
|
+
$ fastrmemory mcp init --client codex --scope user
|
|
102
|
+
|
|
103
|
+
--source local writes the active CLI and an absolute --project; project configs are machine-specific.`)
|
|
104
|
+
.action((options) => {
|
|
105
|
+
try {
|
|
106
|
+
const scope = parseMcpScope(options.scope);
|
|
107
|
+
const clients = parseMcpClients(options.client, scope);
|
|
108
|
+
const channel = parseMcpChannel(options.channel);
|
|
109
|
+
const runner = parseMcpRunner(options.runner);
|
|
110
|
+
const profile = parseMcpProfile(options.profile);
|
|
111
|
+
const source = parseMcpSource(options.source);
|
|
112
|
+
const results = initMcpClients({
|
|
113
|
+
clients,
|
|
114
|
+
scope,
|
|
115
|
+
projectRoot: options.project,
|
|
116
|
+
channel,
|
|
117
|
+
runner,
|
|
118
|
+
profile,
|
|
119
|
+
source,
|
|
120
|
+
dryRun: options.dryRun,
|
|
121
|
+
});
|
|
122
|
+
if (options.json) {
|
|
123
|
+
console.log(JSON.stringify({ scope, channel, runner, profile, source, results }, null, 2));
|
|
124
|
+
return;
|
|
125
|
+
}
|
|
126
|
+
for (const result of results) {
|
|
127
|
+
console.log(formatMcpInitResult(result));
|
|
128
|
+
}
|
|
129
|
+
if (results.some((result) => result.manual)) {
|
|
130
|
+
console.log('\nRestart the client after adding the snippet above.');
|
|
131
|
+
}
|
|
132
|
+
else if (!options.dryRun) {
|
|
133
|
+
console.log('\nRestart the client so it picks up the FastrMemory MCP server.');
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
catch (err) {
|
|
137
|
+
console.error(`FastrMemory MCP init error: ${err.message}`);
|
|
138
|
+
process.exitCode = 1;
|
|
139
|
+
}
|
|
140
|
+
});
|
|
78
141
|
// 2. Init command
|
|
79
142
|
program
|
|
80
143
|
.command('init')
|