@fabersep/memory 0.3.0 → 0.4.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/CHANGELOG.md +11 -0
- package/README.md +58 -32
- package/dist/src/cli.js +65 -2
- package/dist/src/index.d.ts +1 -0
- package/dist/src/index.js +1 -0
- package/dist/src/web-assets.d.ts +4 -0
- package/dist/src/web-assets.js +1357 -0
- package/dist/src/web.d.ts +41 -0
- package/dist/src/web.js +959 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,17 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to `@fabersep/memory`. Versions follow [Semantic Versioning](https://semver.org/).
|
|
4
4
|
|
|
5
|
+
## 0.4.0 (2026-12-02)
|
|
6
|
+
|
|
7
|
+
### Added
|
|
8
|
+
- **Local web UI (feature 04):** `faber-memory web` and `faber-memory review --web` open a zero-dependency UI in your browser, bound to `127.0.0.1` only. Review, edit, approve, reject or skip proposals and commit them in one batch; browse, search, edit or delete active memories across scopes; see a compact status, doctor and stats summary.
|
|
9
|
+
- Flags: `--port <n>`, `--no-open`, `--idle-timeout <min>` and `--read-only` (read-only hosts are always read-only).
|
|
10
|
+
- Security: a per-launch token exchanged for an `HttpOnly` `SameSite=Strict` cookie, CSRF and DNS-rebinding checks, a strict CSP, and shutdown on idle timeout or from the UI.
|
|
11
|
+
- Brand logo and favicon in the web UI.
|
|
12
|
+
|
|
13
|
+
### Changed
|
|
14
|
+
- The README installs the package globally and uses `faber-memory`, with a how-it-works animation and a web UI screenshot.
|
|
15
|
+
|
|
5
16
|
## 0.3.0 (2026-11-29)
|
|
6
17
|
|
|
7
18
|
### Added
|
package/README.md
CHANGED
|
@@ -1,11 +1,13 @@
|
|
|
1
|
-
|
|
1
|
+
<h1><img src="docs/assets/logo.svg" alt="" width="28" height="28" align="absmiddle"> FaberSEP Memory</h1>
|
|
2
2
|
|
|
3
3
|
[](https://www.npmjs.com/package/@fabersep/memory)
|
|
4
4
|
[](LICENSE)
|
|
5
5
|
|
|
6
|
-
**Your AI coding
|
|
6
|
+
**Your AI coding tools shouldn't each have their own siloed memory — and your team shouldn't repeat the same rules in every chat. FaberSEP Memory gives every tool and every teammate one shared memory you can read, approve and keep in Git.**
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
<p align="center">
|
|
9
|
+
<img src="docs/assets/solo-memory.svg" alt="In the morning using Claude Code, you say we use pnpm not npm and approve the proposed memory into your local Git folder ~/.faber/memory. In the afternoon you switch to Antigravity and in the evening to Codex on the same machine — both read use-pnpm automatically and run pnpm commands without being told again." width="920">
|
|
10
|
+
</p>
|
|
9
11
|
|
|
10
12
|
---
|
|
11
13
|
|
|
@@ -13,27 +15,43 @@
|
|
|
13
15
|
|
|
14
16
|
It's Monday. You tell your AI assistant: *"We use pnpm here, not npm."* It says "Got it!" and does a great job.
|
|
15
17
|
|
|
16
|
-
|
|
18
|
+
Later the same day you open a new chat — or switch from Claude Code to Antigravity, Codex or Cursor — and it runs `npm install`. Meanwhile, your teammate hits the exact same mistake in their editor because every assistant's built-in memory stays trapped inside one tool on one machine.
|
|
17
19
|
|
|
18
|
-
So
|
|
20
|
+
So teams copy rules into long instruction files that grow to 300 lines nobody maintains, or let tools "remember" things silently until a wrong rule sneaks in.
|
|
19
21
|
|
|
20
22
|
## What changes with FaberSEP Memory
|
|
21
23
|
|
|
22
24
|
The same Monday, with FaberSEP Memory:
|
|
23
25
|
|
|
24
|
-
1. **Your assistant notices a lesson** ("
|
|
25
|
-
2. **You approve it
|
|
26
|
-
3. **
|
|
26
|
+
1. **Your assistant notices a lesson** ("we use pnpm") and *proposes* saving it. Nothing is saved silently.
|
|
27
|
+
2. **You approve it with one click** in the local Web UI (`faber-memory web`) — or with one key press in the terminal (`faber-memory review`).
|
|
28
|
+
3. **Every tool on your machine knows it**: switch from Claude Code to Antigravity, Codex, Cursor or Claude Desktop — every assistant reads the same local Git-backed memory.
|
|
27
29
|
|
|
28
|
-
Your memory is a folder of short notes
|
|
30
|
+
Your memory is a folder of short Markdown notes kept in Git so every change has history and can be undone. Nothing goes to a third-party cloud service, and you don't need an account, a database or an API key.
|
|
29
31
|
|
|
30
|
-
##
|
|
32
|
+
## Review and browse in the local Web UI
|
|
31
33
|
|
|
32
|
-
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
-
|
|
36
|
-
|
|
34
|
+
Run `faber-memory web` to open a clean, zero-dependency local UI in your browser (`127.0.0.1` only). Approve, edit, reject or batch-commit proposals in one click, search and edit active memories in **Browse**, and check setup health — all without touching raw files.
|
|
35
|
+
|
|
36
|
+
<p align="center">
|
|
37
|
+
<img src="docs/assets/web-ui-review.png" alt="FaberSEP Memory local Web UI showing pending memory proposals with Approve, Edit, Reject, Skip and Commit Batch controls alongside Browse and Health tabs." width="920">
|
|
38
|
+
</p>
|
|
39
|
+
|
|
40
|
+
## Share one memory across your whole team
|
|
41
|
+
|
|
42
|
+
When you connect a private Git repository as a team memory, one approved rule syncs to every teammate — no matter which AI coding tool each person prefers.
|
|
43
|
+
|
|
44
|
+
<p align="center">
|
|
45
|
+
<img src="docs/assets/team-memory.svg" alt="Maya tells Claude Code that the team uses pnpm. The assistant proposes a memory instead of saving silently. Maya approves it with one click in the local FaberSEP Memory Web UI, committing it to the shared team Git memory. Instantly, Maya in Cursor, Alex in Antigravity, and Sam in Codex all read use-pnpm and run pnpm install." width="920">
|
|
46
|
+
</p>
|
|
47
|
+
|
|
48
|
+
## Why teams use it
|
|
49
|
+
|
|
50
|
+
- **Works across all your AI tools.** Claude Code, Antigravity, Codex, Cursor, Claude Desktop — switch tools anytime on the same machine without re-explaining your setup.
|
|
51
|
+
- **One memory for your whole team.** Share rules through a private Git repository so one approval keeps every teammate's assistant in sync.
|
|
52
|
+
- **Simple local Web UI.** Review proposals, browse and search active memories, edit or delete entries, and check health in your browser with `faber-memory web`.
|
|
53
|
+
- **Nothing gets in without your OK.** Assistants can only propose. You approve what stays, and secrets or machine-specific paths are blocked automatically.
|
|
54
|
+
- **Fast and cheap.** Assistants load a tiny startup index and look up details only when needed, keeping chats fast and prompt caches warm.
|
|
37
55
|
|
|
38
56
|
---
|
|
39
57
|
|
|
@@ -41,29 +59,37 @@ Your memory is a folder of short notes on your own computer, kept in Git so ever
|
|
|
41
59
|
|
|
42
60
|
You need **Node.js 20 or newer** and **Git**. To check, run `node -v` and `git --version` in a terminal.
|
|
43
61
|
|
|
44
|
-
**1.
|
|
62
|
+
**1. Install it once**
|
|
63
|
+
|
|
64
|
+
```bash
|
|
65
|
+
npm install -g @fabersep/memory
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
This gives you one short command, `faber-memory`, that you can run from any folder. Check it with `faber-memory --version`.
|
|
69
|
+
|
|
70
|
+
**2. Set it up**
|
|
45
71
|
|
|
46
72
|
```bash
|
|
47
|
-
|
|
73
|
+
faber-memory init
|
|
48
74
|
```
|
|
49
75
|
|
|
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 `
|
|
76
|
+
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 `faber-memory init --undo`.
|
|
51
77
|
|
|
52
78
|
Want your notes in another folder? Give its path:
|
|
53
79
|
|
|
54
80
|
```bash
|
|
55
|
-
|
|
81
|
+
faber-memory init ~/my-notes
|
|
56
82
|
```
|
|
57
83
|
|
|
58
|
-
**
|
|
84
|
+
**3. Check that everything is connected**
|
|
59
85
|
|
|
60
86
|
```bash
|
|
61
|
-
|
|
87
|
+
faber-memory doctor
|
|
62
88
|
```
|
|
63
89
|
|
|
64
90
|
You should see `PASS` lines. Each `WARN` or `FAIL` line comes with a one-line hint on how to fix it.
|
|
65
91
|
|
|
66
|
-
**
|
|
92
|
+
**4. Start a new chat in your assistant**
|
|
67
93
|
|
|
68
94
|
Tell it something about your project that it would otherwise get wrong, for example:
|
|
69
95
|
|
|
@@ -71,15 +97,15 @@ Tell it something about your project that it would otherwise get wrong, for exam
|
|
|
71
97
|
|
|
72
98
|
It should suggest saving this as a memory. (If it doesn't, ask it: *"Propose this as a memory."*)
|
|
73
99
|
|
|
74
|
-
**
|
|
100
|
+
**5. Approve what you want to keep**
|
|
75
101
|
|
|
76
102
|
```bash
|
|
77
|
-
|
|
103
|
+
faber-memory web
|
|
78
104
|
```
|
|
79
105
|
|
|
80
|
-
|
|
106
|
+
This opens a clean local Web UI in your browser (`127.0.0.1` only) where you can review, edit, approve, or reject proposals in one click — and browse or search your active memories. Prefer the terminal? Run `faber-memory review` instead (`a` to approve, `e` to edit, `r` to reject, `s` to skip, `q` to save and quit).
|
|
81
107
|
|
|
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.
|
|
108
|
+
Now open a **new** chat (in the same tool or a different one) and ask: *"How do I run the tests here?"* Your assistant answers `make test`, without you telling it again.
|
|
83
109
|
|
|
84
110
|
> **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).
|
|
85
111
|
|
|
@@ -87,10 +113,10 @@ Now open a **new** chat and ask: *"How do I run the tests here?"* Your assistant
|
|
|
87
113
|
|
|
88
114
|
## A normal day with it
|
|
89
115
|
|
|
90
|
-
- **While you work:** nothing to do.
|
|
91
|
-
- **When it learns something:** it
|
|
92
|
-
- **When you have a minute:** run `
|
|
93
|
-
- **Changed your mind?**
|
|
116
|
+
- **While you work:** nothing to do. Every connected assistant reads the same compact memory index at startup and searches details as needed.
|
|
117
|
+
- **When it learns something:** it proposes a memory. The proposal waits in a "to review" box (`pre-memory`) and changes nothing yet.
|
|
118
|
+
- **When you have a minute:** run `faber-memory web` (or `faber-memory review` in the terminal). All your approvals are saved together in one Git commit.
|
|
119
|
+
- **Changed your mind?** Edit or delete any memory right from the Web UI's Browse tab — or edit the Markdown file in `~/.faber/memory` and run `faber-memory compile`. Git keeps the full history.
|
|
94
120
|
|
|
95
121
|
A memory file looks like this:
|
|
96
122
|
|
|
@@ -118,10 +144,10 @@ No. It's free and open source (Apache-2.0), and it runs on your computer. Your n
|
|
|
118
144
|
Not directly yet. If you control a computer or server from your phone (for example with Claude Remote Control), memory works in that session.
|
|
119
145
|
|
|
120
146
|
**How do I update or remove it?**
|
|
121
|
-
`
|
|
147
|
+
`npm install -g @fabersep/memory@latest` installs the newest version; `faber-memory --version` shows which one you have. `faber-memory init --undo` disconnects your assistants and leaves your notes in place. `npm uninstall -g @fabersep/memory` removes the command. See [Updating and cleaning up](docs/guide.md#updating-and-cleaning-up).
|
|
122
148
|
|
|
123
149
|
**Something went wrong.**
|
|
124
|
-
Run `
|
|
150
|
+
Run `faber-memory doctor` first. Then check [Troubleshooting](docs/troubleshooting.md) or [open an issue](https://github.com/fabersep/memory/issues).
|
|
125
151
|
|
|
126
152
|
---
|
|
127
153
|
|
package/dist/src/cli.js
CHANGED
|
@@ -16,11 +16,12 @@ import { syncAllRoots } from './sync.js';
|
|
|
16
16
|
import { addPersonalRemote, DEFAULT_READ_ONLY_PATH, getAheadInfo, getPushMode, getUnpushedReminder, isReadOnlyRoot, pushPersonalRoot, READ_ONLY_MESSAGE, removePersonalRemote, } from './personal-remote.js';
|
|
17
17
|
import { getPackageVersion } from './version.js';
|
|
18
18
|
import { c, hr, inferErrorAnchor, normalizeTeamUrl, troubleshootingLink, } from './ui.js';
|
|
19
|
+
import { openBrowserBestEffort, startWebServer, validateIdleTimeoutArg, validatePortArg, } from './web.js';
|
|
19
20
|
// Flags that never take a value, so `init --preview ~/notes` keeps ~/notes as a positional.
|
|
20
21
|
const BOOLEAN_FLAGS = new Set([
|
|
21
22
|
'apply', 'undo', 'preview', 'dry-run', 'check', 'json', 'strict', 'cache', 'share', 'yes',
|
|
22
23
|
'all', 'approve', 'approve-all', 'split-headings', 'normalize-paths', 'project-hint',
|
|
23
|
-
'include-personal-repo', 'help', 'allow-public',
|
|
24
|
+
'include-personal-repo', 'help', 'allow-public', 'web', 'no-open',
|
|
24
25
|
]);
|
|
25
26
|
function parseFlags(args) {
|
|
26
27
|
const positional = [];
|
|
@@ -462,7 +463,68 @@ async function main() {
|
|
|
462
463
|
console.log(c.green('Reset complete.'));
|
|
463
464
|
return 0;
|
|
464
465
|
}
|
|
466
|
+
async function runWebCommand(initialView) {
|
|
467
|
+
const portCheck = validatePortArg(flags.port);
|
|
468
|
+
if (!portCheck.ok) {
|
|
469
|
+
printErrorWithHelp(portCheck.error);
|
|
470
|
+
return 1;
|
|
471
|
+
}
|
|
472
|
+
const idleCheck = validateIdleTimeoutArg(flags['idle-timeout']);
|
|
473
|
+
if (!idleCheck.ok) {
|
|
474
|
+
printErrorWithHelp(idleCheck.error);
|
|
475
|
+
return 1;
|
|
476
|
+
}
|
|
477
|
+
let srv;
|
|
478
|
+
try {
|
|
479
|
+
srv = await startWebServer({
|
|
480
|
+
homeDir,
|
|
481
|
+
cwd: process.cwd(),
|
|
482
|
+
port: portCheck.port,
|
|
483
|
+
idleTimeoutMinutes: idleCheck.minutes,
|
|
484
|
+
readOnly: Boolean(flags['read-only']),
|
|
485
|
+
initialView,
|
|
486
|
+
});
|
|
487
|
+
}
|
|
488
|
+
catch (err) {
|
|
489
|
+
const msg = err instanceof Error ? err.message : String(err);
|
|
490
|
+
printErrorWithHelp(`Failed to start local web UI: ${msg}`);
|
|
491
|
+
return 1;
|
|
492
|
+
}
|
|
493
|
+
const onSignal = () => {
|
|
494
|
+
void srv.close();
|
|
495
|
+
};
|
|
496
|
+
process.on('SIGINT', onSignal);
|
|
497
|
+
process.on('SIGTERM', onSignal);
|
|
498
|
+
try {
|
|
499
|
+
const modeLabel = srv.readOnly ? 'read-only' : 'writable';
|
|
500
|
+
const timeoutLabel = idleCheck.minutes > 0 ? `${idleCheck.minutes}m idle timeout` : 'idle timeout disabled';
|
|
501
|
+
console.log(c.bold('FaberSEP Memory Web UI'));
|
|
502
|
+
console.log(`URL: ${srv.authUrl}`);
|
|
503
|
+
console.log(c.dim(`Mode: ${modeLabel} | Loopback only (127.0.0.1) | ${timeoutLabel}`));
|
|
504
|
+
if (!flags['no-open'] && isInteractive()) {
|
|
505
|
+
const opened = openBrowserBestEffort(srv.authUrl);
|
|
506
|
+
if (!opened) {
|
|
507
|
+
console.log(c.dim('Could not launch browser automatically; open the URL above manually.'));
|
|
508
|
+
}
|
|
509
|
+
}
|
|
510
|
+
const reason = await srv.waitForClose;
|
|
511
|
+
if (reason === 'idle') {
|
|
512
|
+
console.log(c.dim('Local web UI shut down after idle timeout.'));
|
|
513
|
+
}
|
|
514
|
+
}
|
|
515
|
+
finally {
|
|
516
|
+
process.off('SIGINT', onSignal);
|
|
517
|
+
process.off('SIGTERM', onSignal);
|
|
518
|
+
}
|
|
519
|
+
return 0;
|
|
520
|
+
}
|
|
521
|
+
if (cmd === 'web') {
|
|
522
|
+
return runWebCommand('auto');
|
|
523
|
+
}
|
|
465
524
|
if (cmd === 'review') {
|
|
525
|
+
if (flags.web) {
|
|
526
|
+
return runWebCommand('review');
|
|
527
|
+
}
|
|
466
528
|
const config = loadConfig(homeDir);
|
|
467
529
|
if (isReadOnlyRoot(config.roots.personal)) {
|
|
468
530
|
printErrorWithHelp(READ_ONLY_MESSAGE);
|
|
@@ -899,7 +961,8 @@ Commands:
|
|
|
899
961
|
status
|
|
900
962
|
stats [--days 1..90] [--json] [--cache] [--engine claude-code|antigravity|all] [--log-dir <path>] [--share]
|
|
901
963
|
doctor [--json] [--strict]
|
|
902
|
-
review [--approve-all] [--yes]
|
|
964
|
+
review [--approve-all] [--yes] [--web [--port <n>] [--no-open] [--idle-timeout <min>] [--read-only]]
|
|
965
|
+
web [--port <n>] [--no-open] [--idle-timeout <min>] [--read-only]
|
|
903
966
|
approve <proposal-id> [...] [--mode auto|pr] [--yes]
|
|
904
967
|
reject <proposal-id> | reject --all [--yes]
|
|
905
968
|
reset [--include-personal-repo] [--yes]
|
package/dist/src/index.d.ts
CHANGED
package/dist/src/index.js
CHANGED