@saihm/shm 0.38.0 → 0.38.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/LICENSE +1 -1
  2. package/README.md +86 -41
  3. package/package.json +23 -2
package/LICENSE CHANGED
@@ -3,7 +3,7 @@ Business Source License 1.1
3
3
  Parameters
4
4
 
5
5
  Licensor: SAIHM Project
6
- Licensed Work: SHM (Super-Human Memory) 0.38.0
6
+ Licensed Work: SHM (Super-Human Memory) 0.38.1
7
7
  The Licensed Work is (c) 2026 SAIHM Project.
8
8
  Additional Use Grant: You may make production use of the Licensed Work if
9
9
  you hold a paid SAIHM subscription (a PRO, PRO_FAST,
package/README.md CHANGED
@@ -1,27 +1,83 @@
1
1
  # SHM — Super-Human Memory
2
2
 
3
- **Ranked recall of the memories that live outside an AI agent's context window — a local-first add-on to [SAIHM](https://github.com/SAIHM-Admin).**
3
+ **The right memory, at the right moment.** SHM brings your AI agent the memories that
4
+ matter for the task in front of it — ranked, on time, and encrypted on your machine. It
5
+ is the layer on top of [SAIHM](https://github.com/SAIHM-Admin/saihm-mcp-server-pro)
6
+ that puts that memory to work.
7
+
8
+ [![npm version](https://img.shields.io/npm/v/@saihm/shm.svg)](https://www.npmjs.com/package/@saihm/shm)
9
+ [![license](https://img.shields.io/npm/l/@saihm/shm.svg)](./LICENSE)
10
+ [![Star on GitHub](https://img.shields.io/badge/GitHub-Star-181717?logo=github&logoColor=white)](https://github.com/SAIHM-Admin/saihm-shm)
11
+ [![Sponsor SAIHM](https://img.shields.io/badge/Sponsor-SAIHM-ea4aaa?logo=githubsponsors&logoColor=white)](https://github.com/sponsors/SAIHM-Admin)
12
+ [![Subscribe on YouTube](https://img.shields.io/badge/YouTube-Subscribe-FF0000?logo=youtube&logoColor=white)](https://www.youtube.com/@SAIHM-Memory?sub_confirmation=1)
13
+ [![Follow on X](https://img.shields.io/badge/X-Follow-000000?logo=x&logoColor=white)](https://x.com/SAIHMemory)
14
+
15
+ <table>
16
+ <tr>
17
+ <td width="50%"><a href="https://www.youtube.com/watch?v=yCWfsGnp0rE"><img src="https://img.youtube.com/vi/yCWfsGnp0rE/maxresdefault.jpg" alt="Watch on YouTube: SAIHM Short Overview, 6 minutes" width="100%"></a></td>
18
+ <td width="50%"><a href="https://www.youtube.com/watch?v=t3rXudDKank"><img src="https://img.youtube.com/vi/t3rXudDKank/maxresdefault.jpg" alt="Watch on YouTube: SAIHM Detailed Overview, 30 minutes" width="100%"></a></td>
19
+ </tr>
20
+ <tr>
21
+ <td align="center"><b>▶ SAIHM Short Overview</b><br>6 minutes</td>
22
+ <td align="center"><b>▶ SAIHM Detailed Overview</b><br>30 minutes</td>
23
+ </tr>
24
+ </table>
25
+
26
+ **Enjoyed them?** Like the videos, [subscribe to the SAIHM channel](https://www.youtube.com/@SAIHM-Memory?sub_confirmation=1),
27
+ and turn on notifications with the bell 🔔 to hear about new videos and updates.
28
+
29
+ **Prefer to read?** [The SAIHM manual](https://saihm.net/manual) (PDF) is a
30
+ decision-maker's guide to SAIHM and SHM.
31
+
32
+ ## What SHM gives you
33
+
34
+ SAIHM keeps your agent's memory safe. SHM makes it work efficiently: it organises that
35
+ memory and brings the right part of it forward, by meaning, before the agent asks.
36
+
37
+ - **The right memories, not all of them.** SHM ranks what your agent remembers and
38
+ brings forward only what the current task needs, within a budget you set. The context
39
+ window stays clean and tasks stay apart.
40
+ - **Ready before the question.** SHM puts the relevant memories in front of your agent
41
+ as the work begins, and records why each one was chosen.
42
+ - **Private by design.** SHM runs on your side, next to your agent. Everything it stores
43
+ is encrypted under a key you hold, and its models run on your own machine.
44
+ - **Erasure that reaches every copy SHM holds.** When a memory is erased in SAIHM, SHM removes it
45
+ from its index, its caches and everything it derived from it.
46
+ - **Picks up where you left off.** SHM can save an encrypted snapshot of its state and
47
+ resume in a new session or on another device.
48
+
49
+ ## Who it's for
50
+
51
+ SHM is for teams and builders whose agents hold a paid SAIHM subscription and want their
52
+ memory to do more of the work. It runs beside any agent that reaches SAIHM, through the
53
+ SAIHM client or an MCP client.
54
+
55
+ ## Get started
4
56
 
5
- SHM brings an agent the handful of its stored memories that matter for the task at hand. It ranks them with hybrid retrieval and an optional local reranker, keeps what it stores encrypted on your machine, and makes sure that a memory erased in SAIHM is erased from everything SHM derived from it.
6
-
7
- ## Who can use SHM
57
+ ```bash
58
+ npm install @saihm/shm
59
+ ```
8
60
 
9
- SHM is for paid SAIHM subscribers. Before a session opens, SHM confirms with SAIHM that your account holds a paid tier: `PRO`, `PRO_FAST`, `ENTERPRISE` or `ENTERPRISE_FAST`. The session opens as soon as the check passes; any other answer, an error or a timeout keeps it closed, and nothing is locked, written or read until then. The check waits up to 15 seconds by default (`entitlementTimeoutMs`). The first start of the SAIHM MCP server after an install or upgrade can take longer while it downloads, so start it once beforehand or raise the timeout.
61
+ You need Node.js 20.20 or later, a paid SAIHM subscription, and
62
+ [`@saihm/mcp-server-pro`](https://github.com/SAIHM-Admin/saihm-mcp-server-pro) version
63
+ 0.13.0 or later. The [developer guide](#developer-guide) below takes you from install to
64
+ your first ranked answer.
10
65
 
11
- SHM takes the tier straight from your account status as SAIHM reports it, never from an environment variable or configuration file. The check keeps default use to accounts with a paid tier; the [licence](#licence) sets the terms of use.
66
+ ## Support SHM
12
67
 
13
- ## Requirements
68
+ If SHM is useful to you, here is how to help it reach more people:
14
69
 
15
- - Node.js 20.20 or later
16
- - A paid SAIHM subscription, and a way for SHM to ask SAIHM for your account status: your SAIHM client ([saihm-client-pro](https://github.com/SAIHM-Admin/saihm-client-pro)), or an MCP client connected to the SAIHM MCP server ([saihm-mcp-server-pro](https://github.com/SAIHM-Admin/saihm-mcp-server-pro))
70
+ - **Star it on [GitHub](https://github.com/SAIHM-Admin/saihm-shm).** Stars help other developers find SHM.
71
+ - **Share it** with a colleague, your team, or anyone whose assistant keeps forgetting.
72
+ - **Follow [@SAIHMemory on X](https://x.com/SAIHMemory)** for news and updates.
73
+ - **Sponsor it** through [GitHub Sponsors](https://github.com/sponsors/SAIHM-Admin), monthly or one-time.
74
+ - **Follow along on YouTube:** like the videos, [subscribe to the channel](https://www.youtube.com/@SAIHM-Memory?sub_confirmation=1), and turn on notifications with the bell 🔔 for new videos and updates.
17
75
 
18
- ## Install
76
+ ---
19
77
 
20
- ```bash
21
- npm install @saihm/shm
22
- ```
78
+ ## Developer guide
23
79
 
24
- ## Quickstart
80
+ ### Quickstart
25
81
 
26
82
  Point SHM at a folder of Markdown notes and ask it for the most relevant ones:
27
83
 
@@ -63,18 +119,23 @@ const saihm = new McpSaihmClient({ endpoint: "saihm", tenantId: "my-agent", call
63
119
  // saihm.status() runs the saihm_status tool; pass `saihm` as `entitlement`.
64
120
  ```
65
121
 
66
- ## What SHM does
122
+ ### How access works
123
+
124
+ Before a session opens, SHM confirms with SAIHM that your account holds a paid tier: `PRO`, `PRO_FAST`, `ENTERPRISE` or `ENTERPRISE_FAST`. The session opens as soon as the check passes; any other answer, an error or a timeout keeps it closed, and nothing is locked, written or read until then. The check waits up to 15 seconds by default (`entitlementTimeoutMs`). The first start of the SAIHM MCP server after an install or upgrade can take longer while it downloads, so start it once beforehand or raise the timeout.
67
125
 
68
- - **Ranks, not dumps.** Semantic and lexical retrieval fused with Reciprocal Rank Fusion, with an optional local cross-encoder reranker (`CrossEncoderReranker`). If the reranker's model cannot load, SHM keeps answering with the base ranking.
69
- - **Pushes context proactively.** `session.proactiveInjector()` assembles the memories relevant to the current task within a budget you set, and records why each one was chosen.
70
- - **Keeps what it stores encrypted.** The index and any persisted memory bodies are encrypted at rest with AES-256-GCM under a key you hold.
71
- - **Honours erasure.** When a memory is erased in SAIHM, SHM removes it from its index, caches and everything it derived from it.
72
- - **Works with your sources.** SHM ranks whatever its read port supplies: a folder of Markdown (`MarkdownDirPort`), your own adapter over another store, or several sources federated together (`FederatedReadPort`). Through `McpSaihmClient` it reads and writes SAIHM cells: recall by query, cells shared with you, and the knowledge SHM derives.
73
- - **Runs beside your agent.** A resident service (`ResidentSession`, `serveHttp`) keeps the index warm, and host hooks (`HostHookAdapter`) bring relevant memories into a coding session.
126
+ SHM takes the tier straight from your account status as SAIHM reports it, never from an environment variable or configuration file. The [licence](#licence) sets the terms of use.
127
+
128
+ ### What's inside
129
+
130
+ - **Hybrid ranking.** Semantic and lexical retrieval fused with Reciprocal Rank Fusion, with an optional local cross-encoder reranker (`CrossEncoderReranker`). If the reranker's model cannot load, SHM keeps answering with the base ranking.
131
+ - **Proactive context.** `session.proactiveInjector()` assembles the memories relevant to the current task within a budget you set, and records why each one was chosen.
132
+ - **Encryption at rest.** The index and any persisted memory bodies are encrypted with AES-256-GCM under a key you hold.
133
+ - **Your sources.** SHM ranks whatever its read port supplies: a folder of Markdown (`MarkdownDirPort`), your own adapter over another store, or several sources federated together (`FederatedReadPort`). Through `McpSaihmClient` it reads and writes SAIHM cells: recall by query, cells shared with you, and the knowledge SHM derives.
134
+ - **Resident service.** A resident service (`ResidentSession`, `serveHttp`) keeps the index warm, and host hooks (`HostHookAdapter`) bring relevant memories into a coding session.
74
135
 
75
136
  The embedder and the reranker run on your machine. On first use they download their pretrained models from the Hugging Face Hub and cache them.
76
137
 
77
- ## SHM and the SAIHM MCP server
138
+ ### SHM and the SAIHM MCP server
78
139
 
79
140
  SHM builds on [`@saihm/mcp-server-pro`](https://github.com/SAIHM-Admin/saihm-mcp-server-pro), version 0.13.0 or later. The MCP server keeps SHM in step with your SAIHM memory:
80
141
 
@@ -82,31 +143,15 @@ SHM builds on [`@saihm/mcp-server-pro`](https://github.com/SAIHM-Admin/saihm-mcp
82
143
  - **The erasure feed** tells SHM which memories were erased, so SHM removes them and everything it derived from them.
83
144
  - **Share states** tell SHM which memories other agents have shared with you, and which of those shares have ended.
84
145
  - **Structured tool results** give SHM each answer in a form it checks before acting on it.
146
+ - **Warm start** lets SHM save an encrypted snapshot of its state and pick up where it left off in a new session or on another device.
85
147
 
86
- ## Learn more
87
-
88
- [![SAIHM Short Overview (video)](https://img.youtube.com/vi/yCWfsGnp0rE/hqdefault.jpg)](https://youtu.be/yCWfsGnp0rE) [![SAIHM Detailed Overview (video)](https://img.youtube.com/vi/t3rXudDKank/hqdefault.jpg)](https://youtu.be/t3rXudDKank)
89
-
90
- - **Videos:** [SAIHM Short Overview](https://youtu.be/yCWfsGnp0rE) for a quick start, and [SAIHM Detailed Overview](https://youtu.be/t3rXudDKank) for SAIHM and SHM in depth.
91
- - **Manual:** [A decision-maker's guide to SAIHM and SHM](https://saihm.net/manual) (PDF): what SHM adds, its levers and recipes, and why to choose SAIHM with SHM.
92
-
93
- ## Support SHM
94
-
95
- If SHM is useful to you, here is how to help it reach more people:
96
-
97
- - **Star it on [GitHub](https://github.com/SAIHM-Admin/saihm-shm).** Stars help other developers find SHM.
98
- - **Share it** with a colleague, your team, or anyone whose assistant keeps forgetting.
99
- - **Follow [@SAIHMemory on X](https://x.com/SAIHMemory)** for news and updates.
100
- - **Sponsor it** through [GitHub Sponsors](https://github.com/sponsors/SAIHM-Admin), monthly or one-time.
101
- - **Follow along on YouTube:** like the videos, [subscribe to the channel](https://www.youtube.com/@SAIHM-Memory?sub_confirmation=1), and turn on notifications with the bell 🔔 for new videos and updates.
102
-
103
- ## Your own endpoint
148
+ ### Your own endpoint
104
149
 
105
150
  You can run SHM against your own SAIHM endpoint. SAIHM is not responsible for, and has no comment regarding, endpoints developed and run by others.
106
151
 
107
152
  ## Licence
108
153
 
109
- SHM is licensed under the [Business Source License 1.1](LICENSE). Production use is granted to holders of a paid SAIHM subscription who use SHM with the SAIHM account that holds it. For any other production use, a commercial licence is available through [GitHub Sponsors](https://github.com/sponsors/SAIHM-Admin). Each version converts to the Apache License, Version 2.0 on its Change Date (for this version, 2030-10-03).
154
+ SHM is licensed under the [Business Source License 1.1](LICENSE). Production use is granted to holders of a paid SAIHM subscription who use SHM with the SAIHM account that holds it. For any other production use, a commercial licence is available through [GitHub Sponsors](https://github.com/sponsors/SAIHM-Admin). Each version converts to the Apache License, Version 2.0 on its Change Date, stated in LICENSE.
110
155
 
111
156
  See [NOTICE](NOTICE) for third-party notices and [CONTRIBUTING.md](CONTRIBUTING.md) for contributions and security reports.
112
157
 
package/package.json CHANGED
@@ -1,7 +1,28 @@
1
1
  {
2
2
  "name": "@saihm/shm",
3
- "version": "0.38.0",
4
- "description": "Super-Human Memory — portable, local-first ranked recall as a read-only add-on to SAIHM.",
3
+ "version": "0.38.1",
4
+ "description": "Super-Human Memory for AI agents: the right memories at the right moment, ranked and encrypted on your machine. The layer that puts SAIHM memory to work.",
5
+ "keywords": [
6
+ "ai",
7
+ "ai-agents",
8
+ "agent-memory",
9
+ "enterprise",
10
+ "memory",
11
+ "long-term-memory",
12
+ "llm",
13
+ "mcp",
14
+ "model-context-protocol",
15
+ "context-window",
16
+ "retrieval",
17
+ "semantic-search",
18
+ "hybrid-search",
19
+ "reranker",
20
+ "embeddings",
21
+ "local-first",
22
+ "encryption",
23
+ "privacy",
24
+ "saihm"
25
+ ],
5
26
  "type": "module",
6
27
  "license": "BUSL-1.1",
7
28
  "author": "SAIHM Project",