nlm-memory 0.5.2 → 0.5.4

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/LICENSE CHANGED
@@ -1,151 +1,202 @@
1
- Apache License
2
- Version 2.0, January 2004
3
- http://www.apache.org/licenses/
4
-
5
- TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
-
7
- 1. Definitions.
8
-
9
- "License" shall mean the terms and conditions for use, reproduction,
10
- and distribution as defined by Sections 1 through 9 of this document.
11
-
12
- "Licensor" shall mean the copyright owner or entity authorized by
13
- the copyright owner that is granting the License.
14
-
15
- "Legal Entity" shall mean the union of the acting entity and all
16
- other entities that control, are controlled by, or are under common
17
- control with that entity. For the purposes of this definition,
18
- "control" means (i) the power, direct or indirect, to cause the
19
- direction or management of such entity, whether by contract or
20
- otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
- outstanding shares, or (iii) beneficial ownership of such entity.
22
-
23
- "You" (or "Your") shall mean an individual or Legal Entity
24
- exercising permissions granted by this License.
25
-
26
- "Source" form shall mean the preferred form for making modifications,
27
- including but not limited to software source code, documentation
28
- source, and configuration files.
29
-
30
- "Object" form shall mean any form resulting from mechanical
31
- transformation or translation of a Source form, including but
32
- not limited to compiled object code, generated documentation,
33
- and conversions to other media types.
34
-
35
- "Work" shall mean the work of authorship made available under
36
- the License, as indicated by a copyright notice that is included in
37
- or attached to the work (an example is provided in the Appendix below).
38
-
39
- "Derivative Works" shall mean any work, whether in Source or Object
40
- form, that is based on (or derived from) the Work and for which the
41
- editorial revisions, annotations, elaborations, or other transformations
42
- represent, as a whole, an original work of authorship. For the purposes
43
- of this License, Derivative Works shall not include works that remain
44
- separable from, or merely link (or bind by name) to the interfaces of,
45
- the Work and Derivative Works thereof.
46
-
47
- "Contribution" shall mean, as submitted to the Licensor for inclusion
48
- in the Work by the copyright owner or by an individual or Legal Entity
49
- authorized to submit on behalf of the copyright owner. For the purposes
50
- of this definition, "submitted" means any form of electronic, verbal,
51
- or written communication sent to the Licensor or its representatives,
52
- including but not limited to communication on electronic mailing lists,
53
- source code control systems, and issue tracking systems that are managed
54
- by, or on behalf of, the Licensor for the purpose of developing the Work,
55
- but excluding communication that is conspicuously marked or designated
56
- in writing by the copyright owner as "Not a Contribution."
57
-
58
- "Contributor" shall mean Licensor and any Legal Entity on behalf of
59
- whom a Contribution has been received by the Licensor and included
60
- within the Work.
61
-
62
- 2. Grant of Copyright License. Subject to the terms and conditions of
63
- this License, each Contributor hereby grants to You a perpetual,
64
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
65
- copyright license to reproduce, prepare Derivative Works of,
66
- publicly display, publicly perform, sublicense, and distribute the
67
- Work and such Derivative Works in Source or Object form.
68
-
69
- 3. Grant of Patent License. Subject to the terms and conditions of
70
- this License, each Contributor hereby grants to You a perpetual,
71
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
72
- (except as stated in this section) patent license to make, have made,
73
- use, offer to sell, sell, import, and otherwise transfer the Work,
74
- where such license applies only to those patent claims licensable
75
- by such Contributor that are necessarily infringed by their
76
- Contribution(s) alone or by the combination of their Contribution(s)
77
- with the Work to which such Contribution(s) was submitted. If You
78
- institute patent litigation against any entity (including a cross-claim
79
- or counterclaim in a lawsuit) alleging that the Work or any
80
- Contribution embodied within the Work constitutes direct or
81
- contributory patent infringement, then any patent licenses granted
82
- to You under this License for that Work shall terminate as of the
83
- date such litigation is filed.
84
-
85
- 4. Redistribution. You may reproduce and distribute copies of the
86
- Work or Derivative Works thereof in any medium, with or without
87
- modifications, and in Source or Object form, provided that You
88
- meet the following conditions:
89
-
90
- (a) You must give any other recipients of the Work or Derivative Works
91
- a copy of this License; and
92
-
93
- (b) You must cause any modified files to carry prominent notices
94
- stating that You changed the files; and
95
-
96
- (c) You must retain, in the Source form of any Derivative Works
97
- that You distribute, all copyright, patent, trademark, and
98
- attribution notices from the Source form of the Work,
99
- excluding those notices that do not pertain to any part of
100
- the Derivative Works; and
101
-
102
- (d) If the Work includes a "NOTICE" text file as part of its
103
- distribution, You must include a readable copy of the attribution
104
- notices contained within such NOTICE file, in at least one of the
105
- following places: within a NOTICE text provided as part of the
106
- Derivative Works; within the Source form or documentation, if
107
- provided along with the Derivative Works; or, within a display
108
- generated by the Derivative Works, if and wherever such third-party
109
- notices normally appear. The contents of the NOTICE file are for
110
- informational purposes only and do not modify the License.
111
-
112
- 5. Submission of Contributions. Unless You explicitly state otherwise,
113
- any Contribution intentionally submitted for inclusion in the Work
114
- by You to the Licensor shall be under the terms and conditions of
115
- this License, without any additional terms or conditions.
116
-
117
- 6. Trademarks. This License does not grant permission to use the trade
118
- names, trademarks, service marks, or product names of the Licensor,
119
- except as required for reasonable and customary use in describing the
120
- origin of the Work and reproducing the content of the NOTICE file.
121
-
122
- 7. Disclaimer of Warranty. Unless required by applicable law or agreed
123
- to in writing, Licensor provides the Work (and each Contributor
124
- provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES
125
- OR CONDITIONS OF ANY KIND, either express or implied, including,
126
- without limitation, any warranties or conditions of TITLE,
127
- NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR
128
- PURPOSE. You are solely responsible for determining the appropriateness
129
- of using or reproducing the Work and assume any risks associated with
130
- Your exercise of permissions under this License.
131
-
132
- 8. Limitation of Liability. In no event and under no legal theory,
133
- whether in tort (including negligence), contract, or otherwise,
134
- unless required by applicable law (such as deliberate and grossly
135
- negligent acts) or agreed to in writing, shall any Contributor be
136
- liable to You for damages, including any direct, indirect, special,
137
- incidental, or exemplary damages of any character arising as a result
138
- of this License or out of the use or inability to use the Work.
139
-
140
- 9. Accepting Warranty or Additional Liability. While redistributing
141
- the Work or Derivative Works thereof, You may offer, and charge a fee
142
- for, acceptance of support, warranty, indemnity, or other liability
143
- obligations and/or rights consistent with this License. However, in
144
- accepting such obligations, You may offer such obligations only on
145
- Your own behalf and on a sole responsibility basis, not on behalf of
146
- any other Contributor, and only if You agree to indemnify, defend,
147
- and hold each Contributor harmless for any liability incurred by such
148
- Contributor as a result of your accepting any warranty or additional
149
- liability.
150
-
151
- Copyright 2026 Edward Chalupa
1
+
2
+ Apache License
3
+ Version 2.0, January 2004
4
+ http://www.apache.org/licenses/
5
+
6
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
7
+
8
+ 1. Definitions.
9
+
10
+ "License" shall mean the terms and conditions for use, reproduction,
11
+ and distribution as defined by Sections 1 through 9 of this document.
12
+
13
+ "Licensor" shall mean the copyright owner or entity authorized by
14
+ the copyright owner that is granting the License.
15
+
16
+ "Legal Entity" shall mean the union of the acting entity and all
17
+ other entities that control, are controlled by, or are under common
18
+ control with that entity. For the purposes of this definition,
19
+ "control" means (i) the power, direct or indirect, to cause the
20
+ direction or management of such entity, whether by contract or
21
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
22
+ outstanding shares, or (iii) beneficial ownership of such entity.
23
+
24
+ "You" (or "Your") shall mean an individual or Legal Entity
25
+ exercising permissions granted by this License.
26
+
27
+ "Source" form shall mean the preferred form for making modifications,
28
+ including but not limited to software source code, documentation
29
+ source, and configuration files.
30
+
31
+ "Object" form shall mean any form resulting from mechanical
32
+ transformation or translation of a Source form, including but
33
+ not limited to compiled object code, generated documentation,
34
+ and conversions to other media types.
35
+
36
+ "Work" shall mean the work of authorship, whether in Source or
37
+ Object form, made available under the License, as indicated by a
38
+ copyright notice that is included in or attached to the work
39
+ (an example is provided in the Appendix below).
40
+
41
+ "Derivative Works" shall mean any work, whether in Source or Object
42
+ form, that is based on (or derived from) the Work and for which the
43
+ editorial revisions, annotations, elaborations, or other modifications
44
+ represent, as a whole, an original work of authorship. For the purposes
45
+ of this License, Derivative Works shall not include works that remain
46
+ separable from, or merely link (or bind by name) to the interfaces of,
47
+ the Work and Derivative Works thereof.
48
+
49
+ "Contribution" shall mean any work of authorship, including
50
+ the original version of the Work and any modifications or additions
51
+ to that Work or Derivative Works thereof, that is intentionally
52
+ submitted to Licensor for inclusion in the Work by the copyright owner
53
+ or by an individual or Legal Entity authorized to submit on behalf of
54
+ the copyright owner. For the purposes of this definition, "submitted"
55
+ means any form of electronic, verbal, or written communication sent
56
+ to the Licensor or its representatives, including but not limited to
57
+ communication on electronic mailing lists, source code control systems,
58
+ and issue tracking systems that are managed by, or on behalf of, the
59
+ Licensor for the purpose of discussing and improving the Work, but
60
+ excluding communication that is conspicuously marked or otherwise
61
+ designated in writing by the copyright owner as "Not a Contribution."
62
+
63
+ "Contributor" shall mean Licensor and any individual or Legal Entity
64
+ on behalf of whom a Contribution has been received by Licensor and
65
+ subsequently incorporated within the Work.
66
+
67
+ 2. Grant of Copyright License. Subject to the terms and conditions of
68
+ this License, each Contributor hereby grants to You a perpetual,
69
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
70
+ copyright license to reproduce, prepare Derivative Works of,
71
+ publicly display, publicly perform, sublicense, and distribute the
72
+ Work and such Derivative Works in Source or Object form.
73
+
74
+ 3. Grant of Patent License. Subject to the terms and conditions of
75
+ this License, each Contributor hereby grants to You a perpetual,
76
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
77
+ (except as stated in this section) patent license to make, have made,
78
+ use, offer to sell, sell, import, and otherwise transfer the Work,
79
+ where such license applies only to those patent claims licensable
80
+ by such Contributor that are necessarily infringed by their
81
+ Contribution(s) alone or by combination of their Contribution(s)
82
+ with the Work to which such Contribution(s) was submitted. If You
83
+ institute patent litigation against any entity (including a
84
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
85
+ or a Contribution incorporated within the Work constitutes direct
86
+ or contributory patent infringement, then any patent licenses
87
+ granted to You under this License for that Work shall terminate
88
+ as of the date such litigation is filed.
89
+
90
+ 4. Redistribution. You may reproduce and distribute copies of the
91
+ Work or Derivative Works thereof in any medium, with or without
92
+ modifications, and in Source or Object form, provided that You
93
+ meet the following conditions:
94
+
95
+ (a) You must give any other recipients of the Work or
96
+ Derivative Works a copy of this License; and
97
+
98
+ (b) You must cause any modified files to carry prominent notices
99
+ stating that You changed the files; and
100
+
101
+ (c) You must retain, in the Source form of any Derivative Works
102
+ that You distribute, all copyright, patent, trademark, and
103
+ attribution notices from the Source form of the Work,
104
+ excluding those notices that do not pertain to any part of
105
+ the Derivative Works; and
106
+
107
+ (d) If the Work includes a "NOTICE" text file as part of its
108
+ distribution, then any Derivative Works that You distribute must
109
+ include a readable copy of the attribution notices contained
110
+ within such NOTICE file, excluding those notices that do not
111
+ pertain to any part of the Derivative Works, in at least one
112
+ of the following places: within a NOTICE text file distributed
113
+ as part of the Derivative Works; within the Source form or
114
+ documentation, if provided along with the Derivative Works; or,
115
+ within a display generated by the Derivative Works, if and
116
+ wherever such third-party notices normally appear. The contents
117
+ of the NOTICE file are for informational purposes only and
118
+ do not modify the License. You may add Your own attribution
119
+ notices within Derivative Works that You distribute, alongside
120
+ or as an addendum to the NOTICE text from the Work, provided
121
+ that such additional attribution notices cannot be construed
122
+ as modifying the License.
123
+
124
+ You may add Your own copyright statement to Your modifications and
125
+ may provide additional or different license terms and conditions
126
+ for use, reproduction, or distribution of Your modifications, or
127
+ for any such Derivative Works as a whole, provided Your use,
128
+ reproduction, and distribution of the Work otherwise complies with
129
+ the conditions stated in this License.
130
+
131
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
132
+ any Contribution intentionally submitted for inclusion in the Work
133
+ by You to the Licensor shall be under the terms and conditions of
134
+ this License, without any additional terms or conditions.
135
+ Notwithstanding the above, nothing herein shall supersede or modify
136
+ the terms of any separate license agreement you may have executed
137
+ with Licensor regarding such Contributions.
138
+
139
+ 6. Trademarks. This License does not grant permission to use the trade
140
+ names, trademarks, service marks, or product names of the Licensor,
141
+ except as required for reasonable and customary use in describing the
142
+ origin of the Work and reproducing the content of the NOTICE file.
143
+
144
+ 7. Disclaimer of Warranty. Unless required by applicable law or
145
+ agreed to in writing, Licensor provides the Work (and each
146
+ Contributor provides its Contributions) on an "AS IS" BASIS,
147
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
148
+ implied, including, without limitation, any warranties or conditions
149
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
150
+ PARTICULAR PURPOSE. You are solely responsible for determining the
151
+ appropriateness of using or redistributing the Work and assume any
152
+ risks associated with Your exercise of permissions under this License.
153
+
154
+ 8. Limitation of Liability. In no event and under no legal theory,
155
+ whether in tort (including negligence), contract, or otherwise,
156
+ unless required by applicable law (such as deliberate and grossly
157
+ negligent acts) or agreed to in writing, shall any Contributor be
158
+ liable to You for damages, including any direct, indirect, special,
159
+ incidental, or consequential damages of any character arising as a
160
+ result of this License or out of the use or inability to use the
161
+ Work (including but not limited to damages for loss of goodwill,
162
+ work stoppage, computer failure or malfunction, or any and all
163
+ other commercial damages or losses), even if such Contributor
164
+ has been advised of the possibility of such damages.
165
+
166
+ 9. Accepting Warranty or Additional Liability. While redistributing
167
+ the Work or Derivative Works thereof, You may choose to offer,
168
+ and charge a fee for, acceptance of support, warranty, indemnity,
169
+ or other liability obligations and/or rights consistent with this
170
+ License. However, in accepting such obligations, You may act only
171
+ on Your own behalf and on Your sole responsibility, not on behalf
172
+ of any other Contributor, and only if You agree to indemnify,
173
+ defend, and hold each Contributor harmless for any liability
174
+ incurred by, or claims asserted against, such Contributor by reason
175
+ of your accepting any such warranty or additional liability.
176
+
177
+ END OF TERMS AND CONDITIONS
178
+
179
+ APPENDIX: How to apply the Apache License to your work.
180
+
181
+ To apply the Apache License to your work, attach the following
182
+ boilerplate notice, with the fields enclosed by brackets "[]"
183
+ replaced with your own identifying information. (Don't include
184
+ the brackets!) The text should be enclosed in the appropriate
185
+ comment syntax for the file format. We also recommend that a
186
+ file or class name and description of purpose be included on the
187
+ same "printed page" as the copyright notice for easier
188
+ identification within third-party archives.
189
+
190
+ Copyright [yyyy] [name of copyright owner]
191
+
192
+ Licensed under the Apache License, Version 2.0 (the "License");
193
+ you may not use this file except in compliance with the License.
194
+ You may obtain a copy of the License at
195
+
196
+ http://www.apache.org/licenses/LICENSE-2.0
197
+
198
+ Unless required by applicable law or agreed to in writing, software
199
+ distributed under the License is distributed on an "AS IS" BASIS,
200
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
201
+ See the License for the specific language governing permissions and
202
+ limitations under the License.
package/README.md CHANGED
@@ -1,27 +1,42 @@
1
- # nlm-memory
2
-
3
- > Local-first memory OS for AI operators — one corpus across every runtime you use.
4
-
5
- `nlm-memory` indexes every session from Claude Code, Codex, OpenCode, Cursor, Windsurf, Hermes, Aider, and pi into a single searchable store on your machine. Three properties no competitor ships together:
6
-
7
- 1. **Cross-runtime reach.** One index spans every adapter — not one per runtime.
8
- 2. **Editable timeline.** Sessions can be superseded, retired, or marked aborted. Memory is non-linear: patch history retroactively. No other memory layer lets you do this.
9
- 3. **97.2% R@5 baseline.** On a 14-month corpus, keyword recall surfaces the right session in the top 5 on 97.2% of evaluator queries. No fine-tuning, no cloud, no account.
10
-
11
- Everything stays on your machine. No telemetry, no account required beyond your classifier of choice.
1
+ <p align="center">
2
+ <picture>
3
+ <source media="(prefers-color-scheme: dark)" srcset="assets/banner-dark.svg" />
4
+ <source media="(prefers-color-scheme: light)" srcset="assets/banner-light.svg" />
5
+ <img alt="nlm-memory Local-first non-linear memory OS" src="assets/banner-light.svg" width="720" />
6
+ </picture>
7
+ </p>
8
+
9
+ <p align="center">
10
+ <a href="https://www.npmjs.com/package/nlm-memory"><img src="https://img.shields.io/npm/v/nlm-memory?color=CB3837&label=npm&logo=npm" alt="npm version" /></a>
11
+ <a href="https://github.com/pbmagnet4/nlm-memory-ts/blob/main/LICENSE"><img src="https://img.shields.io/github/license/pbmagnet4/nlm-memory-ts?color=blue" alt="License: Apache 2.0" /></a>
12
+ <a href="https://nodejs.org"><img src="https://img.shields.io/node/v/nlm-memory?color=brightgreen" alt="Node 20+" /></a>
13
+ <img src="https://img.shields.io/badge/tests-612%20passing-success" alt="612 tests passing" />
14
+ <img src="https://img.shields.io/badge/runtimes-9-8A2BE2" alt="9 runtimes supported" />
15
+ <img src="https://img.shields.io/badge/telemetry-none-informational" alt="Zero telemetry" />
16
+ </p>
17
+
18
+ <p align="center">
19
+ <a href="#install">Install</a> &middot;
20
+ <a href="#quick-start">Quick Start</a> &middot;
21
+ <a href="#runtimes">Runtimes</a> &middot;
22
+ <a href="#how-recall-works">How recall works</a> &middot;
23
+ <a href="#mcp-tools">MCP</a> &middot;
24
+ <a href="#rest-api">REST API</a> &middot;
25
+ <a href="#daily-digest">Digest</a> &middot;
26
+ <a href="#configuration">Config</a> &middot;
27
+ <a href="#security">Security</a> &middot;
28
+ <a href="#vs-alternatives">vs Alternatives</a>
29
+ </p>
12
30
 
13
31
  ---
14
32
 
15
- ## Requirements
33
+ `nlm-memory` indexes every session from Claude Code, Codex, OpenCode, Cursor, Windsurf, Hermes, Aider, and pi into a single searchable store on your machine. Three properties no other memory layer ships together:
16
34
 
17
- - **Node 20+**
18
- - **[Ollama](https://ollama.com)** running locally with `nomic-embed-text` pulled for semantic search:
19
- ```sh
20
- ollama pull nomic-embed-text
21
- ```
22
- - **A classifier** — pick during setup:
23
- - **DeepSeek cloud** (recommended for speed) — fast, cheap (~$0.002/session). Sends up to 30K chars of each session transcript to `api.deepseek.com`.
24
- - **Ollama local** — fully offline. Slower; uses whichever chat model you select from your local pull list.
35
+ 1. **Cross-runtime reach.** One index, every adapter.
36
+ 2. **Editable timeline.** Sessions can be superseded by newer ones; entities can be retired. Patch history retroactively no other tool lets you do this. See [docs/supersedence.md](docs/supersedence.md).
37
+ 3. **97.2% R@5 baseline.** On a 14-month corpus, keyword recall surfaces the right session in the top 5 on 97.2% of evaluator queries. No fine-tuning, no cloud, no account. See [docs/methodology-recall-baseline.md](docs/methodology-recall-baseline.md).
38
+
39
+ Everything stays on your machine. No telemetry, no account beyond your classifier of choice.
25
40
 
26
41
  ---
27
42
 
@@ -32,49 +47,129 @@ npm install -g nlm-memory
32
47
  nlm setup
33
48
  ```
34
49
 
35
- `nlm setup` is the interactive first-run wizard. It asks you to pick your classifier, model, and which runtimes to connect (Claude Code, Codex, Hermes), then installs the daemon. After it finishes, open **http://localhost:3940/ui** — done.
36
-
37
- ### Platform support
50
+ `nlm setup` is the interactive first-run wizard. It picks your classifier + model, wires the runtimes you actually use, generates an `NLM_MCP_TOKEN`, hardens permissions on `~/.nlm/`, and installs the daemon supervisor for your platform.
38
51
 
39
52
  | Platform | Daemon | Notes |
40
53
  |---|---|---|
41
54
  | **macOS** | LaunchAgent at `~/Library/LaunchAgents/com.github.pbmagnet4.nlm-memory.plist` | Auto-starts on login |
42
- | **Linux** | systemd user unit at `~/.config/systemd/user/nlm.service` | Run `loginctl enable-linger $USER` on headless servers so the daemon survives logout |
43
- | **Windows** | Manual `nlm start` for now | Hook + MCP install paths are platform-aware; daemon supervisor lands in the next release |
55
+ | **Linux** | systemd user unit at `~/.config/systemd/user/nlm.service` | Headless servers: `loginctl enable-linger $USER` so the daemon survives logout |
56
+ | **Windows** | Manual `nlm start` for now | Hook + MCP install paths are platform-aware; supervisor lands next release |
57
+
58
+ Stop or remove: `nlm uninstall`.
59
+
60
+ ---
61
+
62
+ ## Quick Start
63
+
64
+ After `nlm setup` finishes, open **http://localhost:3940/ui** — the daemon is running. A 30-second sanity check:
44
65
 
45
- To stop or remove:
46
66
  ```sh
47
- nlm uninstall # remove the daemon supervisor on your platform
67
+ nlm recall "what was that pgvector decision" # one-shot search from the shell
68
+ nlm digest # yesterday's activity at a glance
69
+ nlm --version
48
70
  ```
49
71
 
50
72
  ---
51
73
 
74
+ ## Runtimes
75
+
76
+ One corpus across every adapter. `nlm connect` wires hooks + MCP for each runtime:
77
+
78
+ | Runtime | Connect | Sessions read from | Hooks |
79
+ |---|---|---|---|
80
+ | **Claude Code** | `nlm connect claude-code` | `~/.claude/projects/**/*.jsonl` | 5 (UserPromptSubmit, SessionStart, Stop, PreCompact, SubagentStart) |
81
+ | **Codex CLI** | `nlm connect codex` | `~/.codex/sessions/` | Marketplace plugin |
82
+ | **Hermes** | `nlm connect hermes` | Hermes session DB | MCP only |
83
+ | **Hermes Agent** | `nlm connect hermes-agent` | Hermes plugin path | pre-turn, post-turn, lifecycle |
84
+ | **Cursor** | `nlm connect cursor` | Cursor IDE chat DB | MCP only |
85
+ | **Windsurf** | `nlm connect windsurf` | Windsurf user dir | MCP only |
86
+ | **OpenCode** | adapter active | `~/.local/share/opencode/` | MCP only |
87
+ | **Aider** | adapter active | `AIDER_CHAT_HISTORY_FILE` | MCP only |
88
+ | **pi.dev** | adapter active | `~/.pi/sessions/` | MCP only |
89
+
90
+ `nlm disconnect <runtime>` reverses any of the above.
91
+
92
+ ---
93
+
52
94
  ## How recall works
53
95
 
54
- Once installed, NLM runs as a quiet background daemon. Two ways your AI agents get to it:
96
+ Two delivery paths. They share the same index.
55
97
 
56
98
  ### 1. Hooks (Claude Code) — automatic context injection
57
99
 
58
- `nlm connect claude-code` installs five hooks into `~/.claude/settings.json`:
100
+ Five hooks installed into `~/.claude/settings.json`. Full lifecycle, modes, logging surface, and the load-bearing daily liveness canary documented in [docs/hooks.md](docs/hooks.md).
59
101
 
60
- - **UserPromptSubmit / SessionStart** — before each turn, NLM scores the prompt against your past sessions and silently prepends a pointer block listing the 0–3 most likely-relevant prior sessions. The model sees them as conversational context.
61
- - **Stop** — after the model responds, NLM scans the response for citations of surfaced session IDs to measure useful-hit rate.
62
- - **PreCompact / SubagentStart** link conversations across compactions and subagent dispatches so threads stay coherent.
102
+ | Event | What NLM does | Mode |
103
+ |---|---|---|
104
+ | **UserPromptSubmit** | Score the prompt, silently prepend pointer block listing 0–3 most likely-relevant prior sessions | live by default |
105
+ | **SessionStart** | Cold-start agents (cron, background) hit this; same pointer-block delivery without a user prompt | live by default |
106
+ | **Stop** | Scan the model's response for citations of surfaced session IDs → updates `useful_hit_rate` and builds the reranker training substrate | always on |
107
+ | **PreCompact** | Flush the per-conversation surfaced-IDs memo so post-compaction recalls aren't gated | always on |
108
+ | **SubagentStart** | Record parent→subagent links so threads stay coherent across dispatches | always on |
63
109
 
64
- Default mode is **live** (recall injected into prompts). Switch to **shadow** (log-only, no injection) by setting `NLM_HOOK_MODE=shadow` in your hook commands.
110
+ Switch to **shadow** mode (log-only, no injection) anytime with `NLM_HOOK_MODE=shadow` on the hook command. Toggle for an existing install: re-run `nlm hook install` after changing the env var. The hook fails open — any error yields a clean exit and never blocks the model.
65
111
 
66
112
  ### 2. MCP — explicit tools any agent can call
67
113
 
114
+ Container-hosted agents (Hermes WebUI, Codex CLI, etc.) hit the Streamable-HTTP `POST /mcp` endpoint with `Authorization: Bearer ${NLM_MCP_TOKEN}`. Stdio MCP is also supported for Claude Code via `~/.mcp.json`.
115
+
116
+ ---
117
+
118
+ ## MCP Tools
119
+
120
+ | Tool | What it does |
121
+ |---|---|
122
+ | `recall_sessions` | Hybrid keyword+semantic search across the full session corpus. Returns label, started_at, snippet, match score. |
123
+ | `get_session` | Full body of one session by ID. Includes enriched `supersedes` / `supersededBy` links (id + label + summary) so chasing corrected facts doesn't need a second round-trip. |
124
+ | `recall_facts` | Search structured facts: decisions, open questions, project state. Filterable by entity and kind. |
125
+ | `get_fact_history` | Full version history of one fact — how a decision evolved over time. |
126
+ | `cite_session` | Mark a session as explicitly referenced. Drives the `useful_hit_rate` metric and the future learned reranker. |
127
+
128
+ ---
129
+
130
+ ## REST API
131
+
132
+ Daemon binds `127.0.0.1:3940` (override with `NLM_PORT`). Selected endpoints:
133
+
134
+ | Method | Path | Auth | Purpose |
135
+ |---|---|---|---|
136
+ | GET | `/api/health` | Host-only | Liveness probe; returns `{version, status, service}` |
137
+ | GET | `/api/recall` | Bearer/Origin | Hybrid recall — `?q=`, `?mode=keyword\|semantic\|hybrid`, `?limit=` |
138
+ | GET | `/api/recall/stats` | Bearer/Origin | 7-day stats: total, hit_rate, useful_hit_rate, top queries |
139
+ | GET | `/api/recall/recent` | Bearer/Origin | Last N recall events for live tail/telemetry |
140
+ | GET | `/api/recall/cite-stats` | Bearer/Origin | Citation rate over `?days=` |
141
+ | GET | `/api/session/:id` | Bearer/Origin | Full session body + supersedence links |
142
+ | GET | `/api/recall/facts` | Bearer/Origin | Structured fact search |
143
+ | GET | `/api/facts/history` | Bearer/Origin | Version chain for one fact |
144
+ | GET | `/api/dataset` | Bearer/Origin | Full session list for the UI dataset view |
145
+ | GET | `/api/live/recent-writes` | Bearer/Origin | Live tail of ingested sessions |
146
+ | GET | `/api/data/backup` | Bearer/Origin | Streaming SQLite snapshot download |
147
+ | POST | `/api/data/restore` | Bearer/Origin | Stage a snapshot for apply-on-restart |
148
+ | POST | `/api/hook/pre-compact` | Bearer/Origin | Hook endpoint; flushes the surfaced-IDs memo |
149
+ | ALL | `/mcp` | Bearer required | Streamable-HTTP MCP transport for container agents |
150
+
151
+ `/api/*` is gated by three layers: 127.0.0.1 Host check (defeats DNS rebinding), Origin check when the browser sends one (defeats cross-origin drive-by), Bearer fallback when Origin is absent (server-to-server clients).
152
+
153
+ ---
154
+
155
+ ## Daily digest
156
+
157
+ Once-a-day summary of yesterday's activity:
158
+
68
159
  ```sh
69
- nlm connect claude-code # writes ~/.mcp.json + installs hooks
70
- nlm connect codex # installs as a Codex marketplace plugin
71
- nlm connect hermes # writes ~/.hermes/config.yaml (MCP)
72
- nlm connect hermes-agent # installs as a NousResearch Hermes plugin (hooks + MCP)
160
+ nlm digest # print to stdout
161
+ nlm digest --telegram # post to Telegram (TELEGRAM_BOT_TOKEN + TELEGRAM_CHAT_ID)
73
162
  ```
74
163
 
75
- Once wired, agents can call `recall_sessions` (search past conversations), `recall_facts` (decisions/open questions/project state), `get_session` (pull a full session), `get_fact_history` (how a decision evolved), and `cite_session` (explicitly mark a session as referenced).
164
+ Reports 24h real-traffic (probes filtered), 7d hit_rate + useful_hit_rate, top 5 queries, and a **`WARN hook silent`** alert when Claude Code ran yesterday but no live hook fires were logged. That alert is the canary for post-install drift — node upgrades, `settings.json` hand-edits, and `dist/` moves silently break the hook while Claude Code keeps working. Setup-time smoke tests can't catch this; only the daily correlation can.
76
165
 
77
- For container-hosted agents that can't use stdio MCP, the daemon also exposes Streamable-HTTP MCP at `POST /mcp`. Use the auto-generated `NLM_MCP_TOKEN` from `~/.nlm/.env` as a bearer.
166
+ Wire to cron for a morning push:
167
+
168
+ ```cron
169
+ 0 7 * * * nlm digest --telegram >> ~/.nlm/logs/digest.log 2>&1
170
+ ```
171
+
172
+ When the daemon is unreachable, `--telegram` still fires — posts a "daemon unreachable" alert instead of failing silently.
78
173
 
79
174
  ---
80
175
 
@@ -84,30 +179,70 @@ Open `http://localhost:3940/ui` after the daemon starts.
84
179
 
85
180
  | Page | What it shows |
86
181
  |---|---|
87
- | **Live** | Sessions being written in real time, recent reads and decisions |
182
+ | **Live** | Sessions being written in real time, recent reads, recent decisions |
88
183
  | **Pulse** | System health — coherence, runtimes, stale entities, recent sessions |
89
- | **River** | Full session timeline with density controls and supersedence visualization |
90
- | **Thread** | Per-entity conversation history with runtime filters |
91
- | **Search** | Keyword, semantic, or hybrid recall with match snippets |
92
- | **Recall** | Adoption telemetry — is the memory system actually being used? |
184
+ | **River** | Full session timeline with density controls + superseded-lane visualization |
185
+ | **Thread** | Per-entity conversation history with runtime filters and ←/→ navigation |
186
+ | **Search** | Keyword, semantic, or hybrid recall with match snippets and field-origin tags |
187
+ | **Recall** | Adoption telemetry — useful_hit_rate, source breakdown, query log |
93
188
  | **Settings** | Sources, providers, classifier, data backup/restore |
94
189
 
95
190
  ---
96
191
 
97
- ## Daily digest
192
+ ## Pipeline
98
193
 
99
- Get a once-a-day summary of yesterday's recall activity:
194
+ What happens when an AI runtime writes a session and you later recall it:
100
195
 
101
- ```sh
102
- nlm digest # print to stdout
103
- nlm digest --telegram # post to Telegram (set TELEGRAM_BOT_TOKEN + TELEGRAM_CHAT_ID)
196
+ ```
197
+ ingest: runtime transcript (jsonl/sqlite)
198
+ -> adapter parses runtime-specific format
199
+ -> classifier (DeepSeek cloud or Ollama local) extracts label + entities + decisions + open questions
200
+ -> embedder (nomic-embed-text via Ollama) computes 768-dim vector
201
+ -> SQLite canonical store + FTS5 keyword index + sqlite-vec ANN index
202
+
203
+ recall: prompt / query
204
+ -> tokenize + match scoring (label x3, entity-exact x4, decision x2, summary x1, phrase-bonus +5)
205
+ -> hybrid: BM25-style keyword + vector cosine, fused by score
206
+ -> select-top-N gate (per-fire cap 3, per-conversation cap 10)
207
+ -> pointer block prepended to model context (hooks) or returned as tool result (MCP)
104
208
  ```
105
209
 
106
- The digest reports 24-hour real-traffic volume (probes filtered), 7-day hit rate, top queries, and a hook-liveness alert if Claude Code ran but the recall hook didn't fire. Wire it to cron for a morning push:
210
+ ---
107
211
 
108
- ```cron
109
- 0 7 * * * TELEGRAM_BOT_TOKEN=… TELEGRAM_CHAT_ID=… nlm digest --telegram
110
- ```
212
+ ## Configuration
213
+
214
+ ### Environment variables
215
+
216
+ | Var | Default | What |
217
+ |---|---|---|
218
+ | `NLM_PORT` | `3940` | Daemon bind port (loopback only) |
219
+ | `NLM_DB_PATH` | `~/.nlm/canonical.sqlite` | SQLite canonical store location |
220
+ | `NLM_HOOK_MODE` | `live` | `live` injects pointer block; `shadow` logs without injecting |
221
+ | `NLM_HOOK_LOG` | `~/.nlm/hook-log.jsonl` | Hook fire log; powers digest's liveness alert |
222
+ | `NLM_USEFUL_HIT_LOG` | `~/.nlm/useful-hit-log.jsonl` | Citation/useful-hit ledger |
223
+ | `NLM_QUERY_LOG` | `~/.nlm/query-log.jsonl` | Recall query telemetry |
224
+ | `NLM_CITATION_LOG` | `~/.nlm/citation-log.jsonl` | Stop-hook citation events |
225
+ | `NLM_MCP_TOKEN` | auto-generated | 256-bit bearer for `/api/*` (non-browser) and `/mcp` |
226
+ | `NLM_MCP_CONFIG` | `~/.mcp.json` | Path the `connect`/`disconnect` commands modify |
227
+ | `NLM_CLASSIFIER` | `deepseek` | `deepseek` (cloud) or `ollama` (local) |
228
+ | `NLM_CLASSIFIER_MODEL` | `deepseek-v4-flash` | Model id for the chosen provider |
229
+ | `NLM_OLLAMA_URL` | `http://localhost:11434` | Override Ollama endpoint |
230
+ | `NLM_ADAPTERS` | all | Comma-separated allowlist of adapters to enable |
231
+ | `DEEPSEEK_API_KEY` | — | Required when classifier=deepseek |
232
+ | `TELEGRAM_BOT_TOKEN` / `TELEGRAM_CHAT_ID` | — | Required for `nlm digest --telegram` |
233
+
234
+ Adapter source paths can be overridden individually: `NLM_CLAUDE_PROJECTS_PATH`, `NLM_CODEX_CONFIG`, `NLM_CURSOR_DB_PATH`, `NLM_HERMES_SESSIONS_PATH`, `NLM_HERMES_AGENT_DB_PATH`, `NLM_WINDSURF_USER_DIR`, `OPENCODE_DB_PATH`, `PI_SESSIONS_PATH`, `AIDER_CHAT_HISTORY_FILE`.
235
+
236
+ ### Config file
237
+
238
+ `~/.nlm/.env` — autoloaded by every CLI command. Mode `0600`, owned by you, never readable by other users. The setup wizard writes the initial keys; you can edit it directly.
239
+
240
+ ### Ports
241
+
242
+ | Port | Process | Bind | Override |
243
+ |---|---|---|---|
244
+ | `3940` | Daemon HTTP API + MCP | `127.0.0.1` only | `NLM_PORT` |
245
+ | `11434` | Ollama (embedding + local classifier) | localhost | `NLM_OLLAMA_URL` |
111
246
 
112
247
  ---
113
248
 
@@ -115,16 +250,17 @@ The digest reports 24-hour real-traffic volume (probes filtered), 7-day hit rate
115
250
 
116
251
  NLM is local-first by design. The daemon:
117
252
 
118
- - Binds to `127.0.0.1` only — never `0.0.0.0`.
119
- - Enforces Host + Origin checks on `/api/*` to block DNS rebinding and cross-origin drive-by.
120
- - Generates a 256-bit `NLM_MCP_TOKEN` on first run and persists to `~/.nlm/.env` (mode `0600`). All non-browser API requests (hooks, MCP container clients) authenticate with `Authorization: Bearer ${NLM_MCP_TOKEN}`.
121
- - Recursively enforces `0700` on `~/.nlm/` and `0600` on its contents on every start.
253
+ - Binds to `127.0.0.1` only — never `0.0.0.0`
254
+ - Enforces Host + Origin checks on `/api/*` to defeat DNS rebinding and cross-origin drive-by
255
+ - Generates a 256-bit `NLM_MCP_TOKEN` on first run, persists to `~/.nlm/.env` (mode `0600`); non-browser clients authenticate with `Authorization: Bearer ${NLM_MCP_TOKEN}` compared with `timingSafeEqual`
256
+ - Recursively enforces `0700` on `~/.nlm/` and `0600` on its contents on every start
122
257
  - Sends nothing outbound except:
123
- - Ollama (`localhost:11434`) for embeddings + local classifier
124
- - DeepSeek API (`api.deepseek.com`) — only when classifier is set to DeepSeek
258
+ - Ollama (`localhost:11434`) for embeddings and the local classifier path
259
+ - DeepSeek API (`api.deepseek.com`) when classifier is set to DeepSeek
260
+ - Telegram API (`api.telegram.org`) when `nlm digest --telegram` is invoked
125
261
  - Your AI runtime transcript files (read-only)
126
262
 
127
- No telemetry. No vendor calls. No account.
263
+ No telemetry. No vendor pings. No account.
128
264
 
129
265
  Report vulnerabilities via [SECURITY.md](SECURITY.md).
130
266
 
@@ -140,13 +276,30 @@ Old installs have `NLM_HOOK_MODE=shadow` hardcoded in `~/.claude/settings.json`
140
276
 
141
277
  ---
142
278
 
143
- ## How it differs from mem0 and graphiti
279
+ ## vs Alternatives
280
+
281
+ | | **nlm-memory** | mem0 | Letta / MemGPT | Built-in (`CLAUDE.md`) |
282
+ |---|---|---|---|---|
283
+ | **Unit of memory** | Whole session + extracted markers | Atomic facts | Graph nodes + edges | Static file |
284
+ | **Cross-runtime** | 9 adapters, one corpus | Per-app SDK integration | Per-app SDK integration | Per-runtime config |
285
+ | **Editable timeline** | Sessions can be superseded, retired, aborted | Append-only fact log | Graph edits | Manual file edits |
286
+ | **R@5 baseline** | 97.2% on 14mo corpus | published varies | published varies | n/a |
287
+ | **External deps** | SQLite + Ollama (local) | Postgres or Qdrant | Postgres | none |
288
+ | **Hosted offering** | none — local only | yes | yes | n/a |
289
+ | **Account required** | none | yes (cloud tier) | yes | none |
290
+ | **Telemetry** | none | yes | yes | none |
291
+ | **License** | Apache 2.0 | Apache 2.0 | Apache 2.0 | — |
292
+
293
+ The defining property is the editable timeline. mem0 and Letta append; NLM lets you reach back and mark a session as superseded by a newer one, retire one as no-longer-relevant, or flag one as aborted-mid-flight. The next recall surfaces the corrected version, not the stale one. A claim from 6 months ago can be patched today.
294
+
295
+ ---
296
+
297
+ ## Docs
144
298
 
145
- - **Unit of memory:** whole sessions with extracted markers (decisions, open questions, entities), not individual facts or graph edges.
146
- - **Audience:** you querying your own past work, not an embedded SDK for app developers.
147
- - **Cross-runtime:** one corpus across Claude Code, Codex, OpenCode, Cursor, Windsurf, Hermes, and more. Competitors target one runtime.
148
- - **Editable timeline:** sessions can be superseded, retired, aborted. No other tool lets you retrofit memory a record from 6 months ago can be corrected today.
149
- - **Local-only:** no hosted offering, no telemetry, no vendor dependency.
299
+ - [docs/supersedence.md](docs/supersedence.md) the editable timeline: statuses, what gets recorded when, how supersedence flows through recall
300
+ - [docs/hooks.md](docs/hooks.md) full hook lifecycle, modes, selection logic, pointer-block format, logging surface, daily liveness canary
301
+ - [docs/methodology-recall-baseline.md](docs/methodology-recall-baseline.md) how R@5 = 97.2% is measured + how to run LongMemEval-S on your own machine
302
+ - [SECURITY.md](SECURITY.md)threat model + responsible disclosure
150
303
 
151
304
  ---
152
305
 
@@ -155,17 +308,17 @@ Old installs have `NLM_HOOK_MODE=shadow` hardcoded in `~/.claude/settings.json`
155
308
  ```sh
156
309
  git clone https://github.com/pbmagnet4/nlm-memory-ts
157
310
  cd nlm-memory-ts
158
- npm install # install dependencies
159
- npm run build # compile dist/ — commit the result, it ships in the repo
160
- npm run dev # hot-reload daemon
161
- npm run ui:dev # hot-reload UI at localhost:5173 (proxies /api to :3940)
162
- npm test # 601 tests across 62 files
311
+ npm install
312
+ npm run build # compile dist/ — commit the result, it ships in the repo
313
+ npm run dev # hot-reload daemon
314
+ npm run ui:dev # hot-reload UI at localhost:5173 (proxies /api to :3940)
315
+ npm test # 612 tests across 64 files
163
316
  npm run typecheck
164
317
  ```
165
318
 
166
- `dist/` is committed to the repo so the global install works without a build step on the user's machine. Rebuild and commit `dist/` whenever you change `src/`.
319
+ Architecture: hexagonal. `src/core/` knows about ports (interfaces), not adapters. `src/cli/nlm.ts` is the composition root the only file that wires concrete implementations (`SqliteSessionStore`, `OllamaClient`, `Hono`, `StdioServerTransport`). Adapters in `src/core/adapters/` are one-way: they parse runtime-specific session formats into NLM's canonical shape; nothing in the runtime sees NLM.
167
320
 
168
- Database lives at `~/.nlm/canonical.sqlite`. Override with `NLM_DB_PATH`.
321
+ `dist/` is committed so `npm install -g` works without a build step. Rebuild + commit when you change `src/`.
169
322
 
170
323
  ---
171
324
 
@@ -0,0 +1,60 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 360" role="img" aria-label="nlm-memory — Local-first non-linear memory OS">
2
+ <defs>
3
+ <style>
4
+ .bg { fill: #0d1117; }
5
+ .grid { stroke: #21262d; stroke-width: 1; }
6
+ .rail { stroke: #30363d; stroke-width: 2; }
7
+ .session { fill: #5ecbb4; }
8
+ .session-faded { fill: #5ecbb4; opacity: 0.45; }
9
+ .session-recent { fill: #5ecbb4; opacity: 0.85; }
10
+ .session-superseded { fill: #0d1117; stroke: #5ecbb4; stroke-width: 2; stroke-dasharray: 3 2; }
11
+ .arrow { fill: none; stroke: #f0b56b; stroke-width: 2.5; }
12
+ .arrowhead { fill: #f0b56b; }
13
+ .wordmark { font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, monospace; font-size: 88px; font-weight: 700; letter-spacing: -2px; fill: #e6edf3; }
14
+ .accent { fill: #5ecbb4; }
15
+ .tagline { font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, monospace; font-size: 22px; font-weight: 500; fill: #8b949e; }
16
+ .meta { font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, monospace; font-size: 16px; font-weight: 400; fill: #6e7681; letter-spacing: 0.5px; }
17
+ .label { font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, monospace; font-size: 13px; font-weight: 400; fill: #6e7681; }
18
+ </style>
19
+ </defs>
20
+
21
+ <rect class="bg" width="1200" height="360" />
22
+
23
+ <!-- Session timeline (the editable timeline visual) -->
24
+ <g transform="translate(150, 70)">
25
+ <line x1="0" y1="20" x2="900" y2="20" class="rail" />
26
+
27
+ <!-- 14 session dots representing a non-linear timeline -->
28
+ <circle cx="0" cy="20" r="9" class="session-faded" />
29
+ <circle cx="69" cy="20" r="9" class="session-faded" />
30
+ <circle cx="138" cy="20" r="9" class="session-faded" />
31
+ <circle cx="207" cy="20" r="9" class="session-faded" />
32
+ <circle cx="276" cy="20" r="11" class="session-superseded" /> <!-- the patched one -->
33
+ <circle cx="345" cy="20" r="9" class="session-faded" />
34
+ <circle cx="414" cy="20" r="9" class="session-faded" />
35
+ <circle cx="483" cy="20" r="11" class="session-recent" /> <!-- the patcher -->
36
+ <circle cx="552" cy="20" r="9" class="session-recent" />
37
+ <circle cx="621" cy="20" r="9" class="session-recent" />
38
+ <circle cx="690" cy="20" r="9" class="session-recent" />
39
+ <circle cx="759" cy="20" r="9" class="session" />
40
+ <circle cx="828" cy="20" r="9" class="session" />
41
+ <circle cx="900" cy="20" r="9" class="session" />
42
+
43
+ <!-- Supersedence arrow: from the patcher (483) back to the patched (276) -->
44
+ <path d="M 483 32 Q 380 90 285 32" class="arrow" />
45
+ <polygon points="278,25 290,28 285,38" class="arrowhead" />
46
+
47
+ <!-- Labels -->
48
+ <text x="276" y="-12" text-anchor="middle" class="label">superseded</text>
49
+ <text x="483" y="-12" text-anchor="middle" class="label">supersedes</text>
50
+ </g>
51
+
52
+ <!-- Wordmark + tagline block -->
53
+ <g transform="translate(600, 245)">
54
+ <text x="0" y="0" text-anchor="middle" class="wordmark">
55
+ <tspan>nlm</tspan><tspan class="accent">-</tspan><tspan>memory</tspan>
56
+ </text>
57
+ <text x="0" y="40" text-anchor="middle" class="tagline">Local-first non-linear memory OS</text>
58
+ <text x="0" y="75" text-anchor="middle" class="meta">session-grained recall &#xb7; editable timeline &#xb7; cross-runtime</text>
59
+ </g>
60
+ </svg>
@@ -0,0 +1,55 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 360" role="img" aria-label="nlm-memory — Local-first non-linear memory OS">
2
+ <defs>
3
+ <style>
4
+ .bg { fill: #ffffff; }
5
+ .grid { stroke: #eaeef2; stroke-width: 1; }
6
+ .rail { stroke: #d0d7de; stroke-width: 2; }
7
+ .session { fill: #1f8a73; }
8
+ .session-faded { fill: #1f8a73; opacity: 0.4; }
9
+ .session-recent { fill: #1f8a73; opacity: 0.8; }
10
+ .session-superseded { fill: #ffffff; stroke: #1f8a73; stroke-width: 2; stroke-dasharray: 3 2; }
11
+ .arrow { fill: none; stroke: #b8741a; stroke-width: 2.5; }
12
+ .arrowhead { fill: #b8741a; }
13
+ .wordmark { font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, monospace; font-size: 88px; font-weight: 700; letter-spacing: -2px; fill: #1f2328; }
14
+ .accent { fill: #1f8a73; }
15
+ .tagline { font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, monospace; font-size: 22px; font-weight: 500; fill: #59636e; }
16
+ .meta { font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, monospace; font-size: 16px; font-weight: 400; fill: #818b98; letter-spacing: 0.5px; }
17
+ .label { font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, monospace; font-size: 13px; font-weight: 400; fill: #818b98; }
18
+ </style>
19
+ </defs>
20
+
21
+ <rect class="bg" width="1200" height="360" />
22
+
23
+ <g transform="translate(150, 70)">
24
+ <line x1="0" y1="20" x2="900" y2="20" class="rail" />
25
+
26
+ <circle cx="0" cy="20" r="9" class="session-faded" />
27
+ <circle cx="69" cy="20" r="9" class="session-faded" />
28
+ <circle cx="138" cy="20" r="9" class="session-faded" />
29
+ <circle cx="207" cy="20" r="9" class="session-faded" />
30
+ <circle cx="276" cy="20" r="11" class="session-superseded" />
31
+ <circle cx="345" cy="20" r="9" class="session-faded" />
32
+ <circle cx="414" cy="20" r="9" class="session-faded" />
33
+ <circle cx="483" cy="20" r="11" class="session-recent" />
34
+ <circle cx="552" cy="20" r="9" class="session-recent" />
35
+ <circle cx="621" cy="20" r="9" class="session-recent" />
36
+ <circle cx="690" cy="20" r="9" class="session-recent" />
37
+ <circle cx="759" cy="20" r="9" class="session" />
38
+ <circle cx="828" cy="20" r="9" class="session" />
39
+ <circle cx="900" cy="20" r="9" class="session" />
40
+
41
+ <path d="M 483 32 Q 380 90 285 32" class="arrow" />
42
+ <polygon points="278,25 290,28 285,38" class="arrowhead" />
43
+
44
+ <text x="276" y="-12" text-anchor="middle" class="label">superseded</text>
45
+ <text x="483" y="-12" text-anchor="middle" class="label">supersedes</text>
46
+ </g>
47
+
48
+ <g transform="translate(600, 245)">
49
+ <text x="0" y="0" text-anchor="middle" class="wordmark">
50
+ <tspan>nlm</tspan><tspan class="accent">-</tspan><tspan>memory</tspan>
51
+ </text>
52
+ <text x="0" y="40" text-anchor="middle" class="tagline">Local-first non-linear memory OS</text>
53
+ <text x="0" y="75" text-anchor="middle" class="meta">session-grained recall &#xb7; editable timeline &#xb7; cross-runtime</text>
54
+ </g>
55
+ </svg>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nlm-memory",
3
- "version": "0.5.2",
3
+ "version": "0.5.4",
4
4
  "description": "Local-first non-linear memory operating system for AI operators.",
5
5
  "type": "module",
6
6
  "license": "Apache-2.0",
@@ -29,6 +29,7 @@
29
29
  "files": [
30
30
  "dist",
31
31
  "plugin",
32
+ "assets",
32
33
  "LICENSE",
33
34
  "README.md"
34
35
  ],