@mnemoverse/mcp-memory-server 0.9.1 → 0.10.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,4 +1,6 @@
1
- # @mnemoverse/mcp-memory-server
1
+ # Mnemoverse Memory
2
+
3
+ `@mnemoverse/mcp-memory-server` — the MCP server for the Mnemoverse memory engine.
2
4
 
3
5
  [![npm version](https://img.shields.io/npm/v/@mnemoverse/mcp-memory-server.svg?color=cb3837&label=npm)](https://www.npmjs.com/package/@mnemoverse/mcp-memory-server)
4
6
  [![npm downloads](https://img.shields.io/npm/dm/@mnemoverse/mcp-memory-server.svg?color=blue&label=downloads)](https://www.npmjs.com/package/@mnemoverse/mcp-memory-server)
@@ -7,9 +9,15 @@
7
9
  [![Research: SLoD arXiv](https://img.shields.io/badge/Research-arXiv%3A2603.08965-b31b1b)](https://arxiv.org/abs/2603.08965)
8
10
  [![Glama quality](https://glama.ai/mcp/servers/mnemoverse/mcp-memory-server/badges/score.svg)](https://glama.ai/mcp/servers/mnemoverse/mcp-memory-server)
9
11
 
10
- Hosted memory for AI agents that learns which facts matter. Feedback re-ranks recall — a Rescorla-Wagner update on the prediction error, not a similarity score — so what helped rises and what misled sinks, with a bounded recency tie-breaker for fresh memories. The engine also ships consolidation (HDBSCAN clustering, with Von Restorff protection so distinctive memories survive compression). One API key works across Claude, Cursor, VS Code, ChatGPT, and any MCP client.
12
+ ## What is Mnemoverse Memory?
13
+
14
+ Mnemoverse is a hosted memory engine for AI agents, reached over the Model Context Protocol. Mnemoverse stores what your agents learn — decisions, preferences, lessons — and returns it in any connected tool, so one memory follows you across Claude Code, Cursor, VS Code and ChatGPT with a single API key. Mnemoverse re-ranks recall from outcomes: report that a recalled memory helped and a Rescorla-Wagner update on the prediction error raises it, report that it misled and it sinks — a different mechanism from similarity scoring, usable alongside it.
15
+
16
+ ## How it compares
17
+
18
+ Most agent memory today lives in one of three places. Per-tool instruction files — `CLAUDE.md`, `.cursorrules`, `AGENTS.md` — are versioned and readable, but each copy belongs to one repo and one tool, and nothing follows you to the next window. A vector store behind RAG retrieves by similarity, and similarity never changes because advice helped or misled. Local-first memory servers win on privacy and latency, and ask you to run and update the infrastructure yourself. Mnemoverse is the managed, cross-tool option in that landscape: nothing to deploy, one key everywhere, and ranking that moves with reported outcomes. If you need memory inside your own perimeter, a local-first server is the better choice — this one is hosted by design.
11
19
 
12
- Memory that persists across sessions, projects, and tools — and improves with use. Hosted, so there's no infrastructure to run, and not locked to a single cloud.
20
+ The consolidation stage of the engine — HDBSCAN clustering with Von Restorff protection, so distinctive memories are not absorbed into the average — is designed in and currently switched off on the hosted service; our docs say so rather than hide it.
13
21
 
14
22
  > ⭐ If Mnemoverse saves you from re-explaining context to your agents, [star the repo](https://github.com/mnemoverse/mcp-memory-server). It helps other builders find it.
15
23
 
@@ -21,6 +29,8 @@ Sign up at [console.mnemoverse.com](https://console.mnemoverse.com?utm_source=np
21
29
 
22
30
  ### 2. Connect to your AI tool
23
31
 
32
+ The two canonical setups, Claude Code and Cursor. Each writes the key **once, at user scope, covering every project**. Avoid a per-project config file for this: it lives inside the repository and can be committed with it, and a key belongs outside:
33
+
24
34
  <!-- INSTALL_SNIPPETS_START — generated from src/configs/source.json. Run `npm run generate:configs` to refresh. Do not edit by hand. -->
25
35
 
26
36
  **Claude Code** — add via CLI:
@@ -32,10 +42,18 @@ claude mcp add mnemoverse -s user \
32
42
  -- npx -y @mnemoverse/mcp-memory-server@latest
33
43
  ```
34
44
 
35
- **Cursor** — click to install, or add to `.cursor/mcp.json`:
45
+ On Windows (PowerShell), paste the same command as one line — PowerShell does not read the `\` line continuations:
46
+
47
+ ```powershell
48
+ claude mcp add mnemoverse -s user -e MNEMOVERSE_API_KEY=mk_live_YOUR_KEY -e MNEMOVERSE_API_URL=https://core.mnemoverse.com/api/v1 -- npx -y @mnemoverse/mcp-memory-server@latest
49
+ ```
50
+
51
+ **Cursor** — click to install, or add the JSON below to `~/.cursor/mcp.json`, the global config that covers every project. Do not put it in a project-level `.cursor/mcp.json`: that file lives inside the repository and is committed with it unless you exclude it, and this config holds your key.
36
52
 
37
53
  [![Add to Cursor](https://cursor.com/deeplink/mcp-install-dark.svg)](https://cursor.com/en/install-mcp?name=mnemoverse&config=eyJjb21tYW5kIjoibnB4IiwiYXJncyI6WyIteSIsIkBtbmVtb3ZlcnNlL21jcC1tZW1vcnktc2VydmVyQGxhdGVzdCJdLCJlbnYiOnsiTU5FTU9WRVJTRV9BUElfS0VZIjoibWtfbGl2ZV9ZT1VSX0tFWSIsIk1ORU1PVkVSU0VfQVBJX1VSTCI6Imh0dHBzOi8vY29yZS5tbmVtb3ZlcnNlLmNvbS9hcGkvdjEifX0%3D)
38
54
 
55
+ The install button carries the placeholder key `mk_live_YOUR_KEY`, not yours, so the shortest path is to skip the button: add the JSON below to `~/.cursor/mcp.json`, merging it with any servers already there, and put your own key in place. Get one at [console.mnemoverse.com](https://console.mnemoverse.com?utm_source=npm&utm_medium=readme&utm_campaign=mcp-memory-server). If you did click the button, edit the same key in the `mcp.json` it wrote; Cursor keeps MCP environment values in that file, not in a settings form. Until the key is real the server starts and lists its tools, but every tool call is refused.
56
+
39
57
  ```json
40
58
  {
41
59
  "mcpServers": {
@@ -54,10 +72,26 @@ claude mcp add mnemoverse -s user \
54
72
  }
55
73
  ```
56
74
 
57
- **VS Code** — add to `.vscode/mcp.json` (note: VS Code uses `servers`, not `mcpServers`):
75
+
76
+ <!-- INSTALL_SNIPPETS_END -->
77
+
78
+ <details>
79
+ <summary><b>All other clients</b> — VS Code, Windsurf, Zed, JetBrains, Cline, Continue</summary>
80
+
81
+ <!-- MORE_CLIENTS_START — generated from src/configs/source.json. Run `npm run generate:configs` to refresh. Do not edit by hand. -->
82
+
83
+ **VS Code** — the [VS Code extension](https://github.com/mnemoverse/mnemoverse-vscode) signs in through the browser and needs no key; that's the default path. In VS Code's non-interactive Agent Host mode, servers that prompt for inputs like this one are not started; for unattended use there, put the key in the environment of the process that launches VS Code instead. To wire the MCP server directly instead, add this to `.vscode/mcp.json` (note: VS Code uses `servers`, not `mcpServers`). Never put a literal `mk_live_` key in that file — it's committed with the repo. The `inputs` entry below prompts for the key instead: VS Code masks what you type and stores it in its own secret storage, not in the file:
58
84
 
59
85
  ```json
60
86
  {
87
+ "inputs": [
88
+ {
89
+ "type": "promptString",
90
+ "id": "mnemoverse-api-key",
91
+ "description": "Mnemoverse API key (starts with mk_live_). Optional to install and inspect — the server starts and lists its tools without a key; every actual tool call requires one. Get one free in ~30s at https://console.mnemoverse.com",
92
+ "password": true
93
+ }
94
+ ],
61
95
  "servers": {
62
96
  "mnemoverse": {
63
97
  "type": "stdio",
@@ -67,7 +101,7 @@ claude mcp add mnemoverse -s user \
67
101
  "@mnemoverse/mcp-memory-server@latest"
68
102
  ],
69
103
  "env": {
70
- "MNEMOVERSE_API_KEY": "mk_live_YOUR_KEY",
104
+ "MNEMOVERSE_API_KEY": "${input:mnemoverse-api-key}",
71
105
  "MNEMOVERSE_API_URL": "https://core.mnemoverse.com/api/v1"
72
106
  }
73
107
  }
@@ -174,7 +208,9 @@ mcpServers:
174
208
 
175
209
  > Why `@latest`? Bare `npx @mnemoverse/mcp-memory-server` is cached indefinitely by npm and stops re-checking the registry. The `@latest` suffix forces a metadata lookup on every Claude Code / Cursor / VS Code session start (~100-300ms), so you always pick up new releases.
176
210
 
177
- <!-- INSTALL_SNIPPETS_END -->
211
+ <!-- MORE_CLIENTS_END -->
212
+
213
+ </details>
178
214
 
179
215
  > ⚠️ **Restart your AI client** after editing the config. MCP servers are only picked up on client startup.
180
216
 
@@ -209,7 +245,37 @@ If it doesn't remember: check that the client was fully restarted and the config
209
245
  | `memory_list_rooms` | List rooms you own or joined, with each room's address to use as `domain` |
210
246
  | `vault_list` | List Vault secrets by alias and purpose — the secret value is never returned |
211
247
 
212
- ## Ideas: What to Remember
248
+ ### Tool surface stability
249
+
250
+ `tools/list` is frozen per released version, so a client can save the list it
251
+ saw and diff it against what the server serves today, by version.
252
+
253
+ - **Within a PATCH** (x.y.Z): tool names, argument schemas and the `annotations`
254
+ object of every tool (`title`, `readOnlyHint`, `destructiveHint`,
255
+ `idempotentHint`, `openWorldHint`) do not change. Only text may: descriptions
256
+ and what a tool returns, as the CHANGELOG rules state.
257
+ - **Within a MINOR** (x.Y.0): tools and annotation fields may be added, never
258
+ removed or renamed, and no declared annotation field disappears or flips
259
+ silently. Every addition has a line in the CHANGELOG under that version.
260
+ - **Removing or renaming a tool, or dropping or renaming a declared annotation
261
+ field,** is announced one MINOR ahead: the tool stays, its description says
262
+ `deprecated since x.y, removed in x.z`, and the change lands only in the
263
+ announced version, with its CHANGELOG line. A rename is announced by naming
264
+ both the old and the new name; the version pair alone does not say what a
265
+ client should look for. Because a MINOR may add a field but not remove one, a
266
+ renamed annotation field is declared under both names until the announced
267
+ version.
268
+ - Any difference between two servers of the same version is a bug. Report it
269
+ with both `tools/list` outputs.
270
+
271
+ The list above is the 0.10 surface: ten tools, each declaring all four hints.
272
+ The hosted connector at `mcp.mnemoverse.com/mcp` serves the same ten.
273
+
274
+ ## Use cases
275
+
276
+ The pattern that pays off first is cross-tool continuity: a decision made while pairing in Claude Code is there when you open Cursor an hour later, and the preference you stated in VS Code holds in a ChatGPT session that evening. Teams use shared rooms the same way — one place where an agent's lessons about a codebase accumulate instead of being re-taught per seat. And because recall re-ranks from feedback, the memories that keep proving useful surface first, which matters once a store grows past what anyone curates by hand.
277
+
278
+ Concrete things worth writing:
213
279
 
214
280
  - **User preferences**: "I use dark mode", "I prefer Tailwind over CSS modules"
215
281
  - **Project context**: "This project uses PostgreSQL + Prisma", "Deploy to Railway"
@@ -238,6 +304,10 @@ The same API key works across all tools. Write a memory in Claude Code — read
238
304
  | `MNEMOVERSE_API_KEY` | For every tool call — the server starts and lists its tools without one | — |
239
305
  | `MNEMOVERSE_API_URL` | No | `https://core.mnemoverse.com/api/v1` |
240
306
 
307
+ ## Research behind it
308
+
309
+ The retrieval model is published: [arXiv:2603.08965](https://arxiv.org/abs/2603.08965), accepted at the GRAAI workshop at IEEE WCCI 2026 — it establishes the abstraction-discovery method the memory model builds on. No benchmark figures appear in this README, ours or anyone's: numbers will come with a reproducible run to stand behind, not before.
310
+
241
311
  ## Links
242
312
 
243
313
  **Setup and reference**
@@ -256,6 +326,25 @@ The same API key works across all tools. Write a memory in Claude Code — read
256
326
  - [Is this a vector database?](https://mnemoverse.com/docs/library/not-a-vector-database) — what makes a memory layer different
257
327
  - [Shared memory for multi-agent systems](https://mnemoverse.com/docs/library/shared-memory-for-multi-agent-systems) — how Rooms work and when to use them
258
328
 
329
+ **Other ways to install it**
330
+
331
+ The same memory, packaged for hosts that prefer a plugin or an extension over an MCP config block. How each one connects and authenticates differs, so the line below says which is which rather than claiming one flow for all of them.
332
+
333
+ - [Claude Code plugin](https://github.com/mnemoverse/claude-plugin) — remote endpoint over MCP with an OAuth sign-in, no key to paste. Bundles the `agent-memory-discipline` skill
334
+ ```
335
+ claude plugin marketplace add mnemoverse/claude-plugin
336
+ claude plugin install mnemoverse@mnemoverse
337
+ ```
338
+ - [Cursor plugin](https://github.com/mnemoverse/cursor-plugin) — same remote endpoint, same sign-in
339
+ - [Gemini CLI extension](https://github.com/mnemoverse/gemini-extension) — same remote endpoint. `gemini extensions install https://github.com/mnemoverse/gemini-extension`
340
+ - [VS Code extension](https://github.com/mnemoverse/mnemoverse-vscode) — signs in through the browser, with pasting a key kept as a fallback command
341
+ - Desktop extension: `manifest.json` in this repository is an MCPB manifest. This one is different from the four above: it runs the server as a local `node` process and reads `MNEMOVERSE_API_KEY` from the extension settings rather than calling the hosted endpoint. The packaged `.mcpb` ships with each release
342
+
343
+ **Standing rules, separate from this server**
344
+
345
+ - [agent-memory-discipline](https://github.com/mnemoverse/agent-memory-discipline) — when an agent should recall before acting and save afterward. CC0, backend-neutral, works against any memory store rather than this one. It carries its own [marketplace manifest](https://github.com/mnemoverse/agent-memory-discipline/blob/main/.claude-plugin/marketplace.json) under `.claude-plugin/`.
346
+ - [awesome-agent-memory](https://github.com/mnemoverse/awesome-agent-memory) — a curated index of the category, CC0, including the servers this one competes with
347
+
259
348
  **Project**
260
349
 
261
350
  - [GitHub](https://github.com/mnemoverse/mcp-memory-server)
package/dist/errors.d.ts CHANGED
@@ -49,6 +49,13 @@
49
49
  * 5xx auth.py returns 503 `retryable: true` when its DB pool is gone. Ours,
50
50
  * not theirs.
51
51
  *
52
+ * A 2xx CAN FAIL TOO, and gets the same treatment for the same reason. A reply
53
+ * whose body this client cannot parse is not a status at all, so none of the
54
+ * sentences above fit it — and it used to borrow the TRANSPORT sentence, which
55
+ * asserts that nothing answered. `explainUnreadableBody` at the bottom of this
56
+ * file owns that case now; the distinction it protects is "a reply arrived and
57
+ * was unreadable" versus "no reply arrived", which have opposite fixes.
58
+ *
52
59
  * RELATION TO THE STARTUP PROBE (src/index.ts, `probeApiKeyInBackground`, added
53
60
  * in 0.8.4). That probe treats 401 and 403 alike, and is right to: it calls
54
61
  * `GET /memory/stats`, which addresses no room, so a 403 there can only come
@@ -122,8 +129,65 @@ export declare function explainApiFailure(f: ApiFailure): string;
122
129
  * A timeout is named separately because the advice differs in one word: an
123
130
  * unreachable host is unlikely to become reachable in three seconds, whereas a
124
131
  * request that ran out of time may well succeed on a second try.
132
+ *
133
+ * NARROWED to `fetch()` itself rejecting. Reading the BODY of a response that
134
+ * did arrive used to land here too, so a 200 carrying a sign-in page printed
135
+ * "no HTTP response came back" — see {@link explainUnreadableBody}, which owns
136
+ * that case now. Every sentence below asserts that nothing answered, so it may
137
+ * only be reached when nothing did.
125
138
  */
126
139
  export declare function explainNetworkFailure(method: string, path: string, cause: unknown): string;
140
+ /** A 2xx-or-not response whose BODY this client could not turn into the JSON
141
+ * this API speaks. The status is known — a reply arrived — which is the whole
142
+ * difference between this and {@link ApiFailure} or a transport failure. */
143
+ export interface UnreadableBody {
144
+ /** HTTP status, as it actually arrived. */
145
+ status: number;
146
+ /** Uppercase HTTP verb. */
147
+ method: string;
148
+ /** Path below the API base. Never the full URL — the base can carry
149
+ * credentials, and the path alone identifies the operation. */
150
+ path: string;
151
+ /** The bytes that failed to parse, when they were read at all. Absent when
152
+ * the body READ itself failed, which is a different sentence below. */
153
+ bodyPreview?: string;
154
+ /** The SyntaxError, TypeError or abort that stopped the read. */
155
+ cause: unknown;
156
+ }
157
+ /**
158
+ * A reply ARRIVED and could not be read — which is not a dead network.
159
+ *
160
+ * WHY THIS IS SEPARATE FROM {@link explainNetworkFailure}. Both failures used
161
+ * to throw the same NetworkError, so `JSON.parse` choking on a 200 printed
162
+ * "the memory service could not be reached at all — POST /memory/read failed
163
+ * before any HTTP response came back… That is a connectivity or DNS problem".
164
+ * Against a captive portal, a MITM proxy, an SPA that serves its shell with a
165
+ * 200, or a body that stops mid-stream, every clause of that is false: a reply
166
+ * came, with a status, and the Raw detail underneath it quoted a SyntaxError
167
+ * out of the body it had just called nonexistent.
168
+ *
169
+ * The cost is the same one this module exists to remove — a confident wrong
170
+ * cause. "Connectivity or DNS" sends the user to debug working wifi while a
171
+ * portal or a mis-set MNEMOVERSE_API_URL answers every request with a page.
172
+ *
173
+ * WHAT THIS MESSAGE MAY CLAIM. Only what the status proves: something answered,
174
+ * and its answer is not this API's JSON. It does NOT name who answered — this
175
+ * client cannot tell the engine from a gateway in front of it — and it does NOT
176
+ * say whether the operation ran, because a body it cannot read is no evidence
177
+ * either way. That last clause matters most for a write.
178
+ */
179
+ export declare function explainUnreadableBody(f: UnreadableBody): string;
180
+ /**
181
+ * {@link explainUnreadableBody} as an error, so a caller can tell "a reply
182
+ * arrived and was unreadable" from "no reply arrived" by TYPE rather than by
183
+ * matching a sentence — the same reason {@link ApiError} carries fields.
184
+ */
185
+ export declare class UnreadableBodyError extends Error {
186
+ readonly status: number;
187
+ readonly method: string;
188
+ readonly path: string;
189
+ constructor(f: UnreadableBody);
190
+ }
127
191
  /** {@link explainNetworkFailure} as an error, so `instanceof` can tell a
128
192
  * transport failure from an HTTP one without reading either message. */
129
193
  export declare class NetworkError extends Error {
package/dist/errors.js CHANGED
@@ -49,6 +49,13 @@
49
49
  * 5xx auth.py returns 503 `retryable: true` when its DB pool is gone. Ours,
50
50
  * not theirs.
51
51
  *
52
+ * A 2xx CAN FAIL TOO, and gets the same treatment for the same reason. A reply
53
+ * whose body this client cannot parse is not a status at all, so none of the
54
+ * sentences above fit it — and it used to borrow the TRANSPORT sentence, which
55
+ * asserts that nothing answered. `explainUnreadableBody` at the bottom of this
56
+ * file owns that case now; the distinction it protects is "a reply arrived and
57
+ * was unreadable" versus "no reply arrived", which have opposite fixes.
58
+ *
52
59
  * RELATION TO THE STARTUP PROBE (src/index.ts, `probeApiKeyInBackground`, added
53
60
  * in 0.8.4). That probe treats 401 and 403 alike, and is right to: it calls
54
61
  * `GET /memory/stats`, which addresses no room, so a 403 there can only come
@@ -67,6 +74,11 @@ const KEYS_URL = "https://console.mnemoverse.com/dashboard/keys";
67
74
  /** The console page that shows quota and upgrades — where a 429 that waiting
68
75
  * cannot fix is resolved. Same URL the engine puts in its own 429 bodies. */
69
76
  const USAGE_URL = "https://console.mnemoverse.com/dashboard/usage";
77
+ /** The base URL a user is sent back to when theirs is aimed somewhere wrong.
78
+ * Mirrors `DEFAULT_API_URL` in src/index.ts and is duplicated on purpose: this
79
+ * module is imported BY index.ts, so reading the value from there would be a
80
+ * cycle. Change one, grep for the other. */
81
+ const DEFAULT_API_URL = "https://core.mnemoverse.com/api/v1";
70
82
  /**
71
83
  * Read the engine's envelope out of a response body.
72
84
  *
@@ -367,20 +379,66 @@ export function explainApiFailure(f) {
367
379
  }
368
380
  return `${guidance}\n\n${rawDetail(f)}`;
369
381
  }
382
+ /**
383
+ * A server-controlled string, made safe to quote inside model-facing text.
384
+ *
385
+ * The body is server-controlled — or, on the misconfigured-URL and proxy paths
386
+ * this module itself names, controlled by whoever answered instead. Spliced raw
387
+ * into model-facing text, a body with newlines could open its own paragraph and
388
+ * speak in this module's instruction voice (panel, #93). Strip control,
389
+ * format/bidi and line/paragraph separators so the quoted body stays one inert
390
+ * line; the guidance above it is the only voice here.
391
+ *
392
+ * Shared with {@link explainUnreadableBody}, whose preview is quoted from
393
+ * exactly the same kind of source — a body written by whoever answered.
394
+ */
395
+ function inertOneLine(s) {
396
+ return s.replace(/[\p{Cc}\p{Cf}\p{Zl}\p{Zp}]+/gu, " ");
397
+ }
370
398
  /** The debugging half: what the wire actually said, still carrying the literal
371
399
  * `Mnemoverse API error <status>` that predates this module. */
372
400
  function rawDetail(f) {
373
401
  const body = f.body.length > MAX_BODY_CHARS
374
402
  ? `${f.body.slice(0, MAX_BODY_CHARS)}… [body truncated at ${MAX_BODY_CHARS} chars]`
375
403
  : f.body;
376
- // The body is server-controlled — or, on the misconfigured-URL and proxy
377
- // paths this module itself names, controlled by whoever answered instead.
378
- // Spliced raw into model-facing text, a body with newlines could open its
379
- // own paragraph and speak in this module's instruction voice (panel, #93).
380
- // Strip control, format/bidi and line/paragraph separators so the quoted
381
- // body stays one inert line; the guidance above it is the only voice here.
382
- const inert = body.replace(/[\p{Cc}\p{Cf}\p{Zl}\p{Zp}]+/gu, " ");
383
- return `Raw detail — Mnemoverse API error ${f.status} on ${f.method} ${f.path}: ${inert}`;
404
+ return `Raw detail — Mnemoverse API error ${f.status} on ${f.method} ${f.path}: ${inertOneLine(body)}`;
405
+ }
406
+ /**
407
+ * Was this transport failure a REDIRECT this client refused to follow?
408
+ *
409
+ * `redirect: "error"` (src/index.ts, apiFetch) makes undici reject with
410
+ * `TypeError: fetch failed` whose `cause` is `Error: unexpected redirect` —
411
+ * verified by executing the case against a real local 302
412
+ * (test/redirect-refusal.test.ts, which uses a real server precisely because a
413
+ * stubbed fetch has no redirect handling to exercise). The literal string is
414
+ * `makeNetworkError('unexpected redirect')` and is identical in undici 5
415
+ * (Node 18), 6 (Node 20 / 22) and 7 (Node 24) — read in all three, because the
416
+ * CI matrix and this package's `engines` span them.
417
+ *
418
+ * WITHOUT THIS BRANCH the failure is indistinguishable from a dead host: same
419
+ * `TypeError: fetch failed`, and the message below would tell the user to debug
420
+ * a "connectivity or DNS problem" on a network that is working perfectly, while
421
+ * the actual cause — a base URL aimed at something that bounces — sat in their
422
+ * config. That is the confident wrong cause this whole module exists against.
423
+ *
424
+ * The cause chain is WALKED rather than read at one depth, since the nesting is
425
+ * undici's to change; the match is the exact sentinel rather than the word
426
+ * "redirect", because a DNS failure against a host whose NAME contains
427
+ * "redirect" would otherwise be diagnosed as one. If a future runtime renames
428
+ * the sentinel this stops firing and the honest generic sentence takes over —
429
+ * a degradation, not a lie — and the real-server test goes red, which is where
430
+ * the rename gets noticed.
431
+ */
432
+ function refusedRedirect(cause) {
433
+ let e = cause;
434
+ for (let depth = 0; depth < 5; depth++) {
435
+ if (!(e instanceof Error))
436
+ return false;
437
+ if (e.message.toLowerCase().includes("unexpected redirect"))
438
+ return true;
439
+ e = e.cause;
440
+ }
441
+ return false;
384
442
  }
385
443
  /**
386
444
  * The request never got an answer at all: DNS, connectivity, a host that does
@@ -395,11 +453,31 @@ function rawDetail(f) {
395
453
  * A timeout is named separately because the advice differs in one word: an
396
454
  * unreachable host is unlikely to become reachable in three seconds, whereas a
397
455
  * request that ran out of time may well succeed on a second try.
456
+ *
457
+ * NARROWED to `fetch()` itself rejecting. Reading the BODY of a response that
458
+ * did arrive used to land here too, so a 200 carrying a sign-in page printed
459
+ * "no HTTP response came back" — see {@link explainUnreadableBody}, which owns
460
+ * that case now. Every sentence below asserts that nothing answered, so it may
461
+ * only be reached when nothing did.
398
462
  */
399
463
  export function explainNetworkFailure(method, path, cause) {
400
464
  const name = cause instanceof Error ? cause.name : "";
401
465
  const timedOut = name === "TimeoutError" || name === "AbortError";
402
466
  const detail = cause instanceof Error ? `${cause.name}: ${cause.message}` : String(cause);
467
+ if (refusedRedirect(cause)) {
468
+ return (`Mnemoverse: ${method} ${path} was answered with a REDIRECT, and this ` +
469
+ "client refused to follow it — so the API key was never sent to whatever " +
470
+ "the redirect pointed at. That refusal is the whole point: following a " +
471
+ "redirect re-sends the request headers to the new host, which hands a " +
472
+ "live key to whoever answered. This API serves one stable base path and " +
473
+ "never redirects legitimately, so this means MNEMOVERSE_API_URL is aimed " +
474
+ "at something else — a proxy, a tunnel, a captive portal, or an address " +
475
+ "that has been tampered with. It is NOT a rejected key and NOT a broken " +
476
+ "network: the request arrived somewhere and was answered. Tell the user " +
477
+ "to check MNEMOVERSE_API_URL and point it straight at the API (the " +
478
+ `default is ${DEFAULT_API_URL}). Do not retry: the same address will ` +
479
+ `redirect again.\n\n${rawTransportDetail(method, path, detail)}`);
480
+ }
403
481
  const head = timedOut
404
482
  ? `Mnemoverse: the memory service did not answer ${method} ${path} in time.`
405
483
  : `Mnemoverse: the memory service could not be reached at all — ${method} ` +
@@ -412,7 +490,97 @@ export function explainNetworkFailure(method, path, cause) {
412
490
  "reply arrived to say anything about either, so do not send the user to " +
413
491
  "check their key. One retry is reasonable. If that also fails, tell the " +
414
492
  "user memory is unreachable and carry on without it rather than retrying.\n\n" +
415
- `Raw detail — request to ${method} ${path} failed: ${detail}`);
493
+ rawTransportDetail(method, path, detail));
494
+ }
495
+ /** The debugging half of a transport failure, in one place so the redirect
496
+ * branch and the generic one cannot drift into two spellings of it. */
497
+ function rawTransportDetail(method, path, detail) {
498
+ return `Raw detail — request to ${method} ${path} failed: ${detail}`;
499
+ }
500
+ /** How much of an unreadable body is worth quoting. A sign-in page, an SPA
501
+ * shell or a proxy notice announces itself in its first line; the rest is
502
+ * markup, and an error message is not a place to spend a model's context. */
503
+ const MAX_PREVIEW_CHARS = 200;
504
+ /**
505
+ * A reply ARRIVED and could not be read — which is not a dead network.
506
+ *
507
+ * WHY THIS IS SEPARATE FROM {@link explainNetworkFailure}. Both failures used
508
+ * to throw the same NetworkError, so `JSON.parse` choking on a 200 printed
509
+ * "the memory service could not be reached at all — POST /memory/read failed
510
+ * before any HTTP response came back… That is a connectivity or DNS problem".
511
+ * Against a captive portal, a MITM proxy, an SPA that serves its shell with a
512
+ * 200, or a body that stops mid-stream, every clause of that is false: a reply
513
+ * came, with a status, and the Raw detail underneath it quoted a SyntaxError
514
+ * out of the body it had just called nonexistent.
515
+ *
516
+ * The cost is the same one this module exists to remove — a confident wrong
517
+ * cause. "Connectivity or DNS" sends the user to debug working wifi while a
518
+ * portal or a mis-set MNEMOVERSE_API_URL answers every request with a page.
519
+ *
520
+ * WHAT THIS MESSAGE MAY CLAIM. Only what the status proves: something answered,
521
+ * and its answer is not this API's JSON. It does NOT name who answered — this
522
+ * client cannot tell the engine from a gateway in front of it — and it does NOT
523
+ * say whether the operation ran, because a body it cannot read is no evidence
524
+ * either way. That last clause matters most for a write.
525
+ */
526
+ export function explainUnreadableBody(f) {
527
+ // TWO ARMS, because the two failures have different causes and the wrong one
528
+ // is a wrong instruction. A body that PARSED WRONG is a foreign answer — a
529
+ // portal, a proxy, a base URL aimed elsewhere. A body that stopped ARRIVING
530
+ // is a dropped connection, where "check MNEMOVERSE_API_URL" would be the
531
+ // same kind of confident wrong cause this module removes everywhere else.
532
+ const body = typeof f.bodyPreview === "string"
533
+ ? `the body is not JSON this API produces — this client could not read ` +
534
+ `the result. A reply DID arrive, so this is neither a dead network ` +
535
+ `nor a rejected key: nothing here failed to connect, and nothing here ` +
536
+ `refused anything. Do not send the user to debug their connection, ` +
537
+ `and do not tell them their key is the problem. A 2xx in a foreign ` +
538
+ `shape comes from something in FRONT of the API — a captive portal or ` +
539
+ `sign-in page, a proxy or gateway, or MNEMOVERSE_API_URL aimed at ` +
540
+ `something that is not the Mnemoverse API. One retry is reasonable; ` +
541
+ `if it repeats, quote the detail below and have the user check ` +
542
+ `MNEMOVERSE_API_URL and whatever sits between them and the API.`
543
+ : `the body could not be read to the end — it stopped part-way, after ` +
544
+ `that status had already arrived. That is a dropped connection ` +
545
+ `or a deadline firing mid-body; it is NOT a refusal and it says ` +
546
+ `nothing about the user's key. One retry is reasonable; if it ` +
547
+ `repeats, tell the user the reply is arriving incomplete and quote ` +
548
+ `the detail below, status included.`;
549
+ return (`Mnemoverse: something answered HTTP ${f.status} for ${f.method} ` +
550
+ `${f.path}, but ${body} Whether the operation itself ran is unknown ` +
551
+ `either way — if this was a write, treat it as neither saved nor ` +
552
+ `refused.\n\n${rawUnreadableDetail(f)}`);
553
+ }
554
+ /** The debugging half for an unreadable body: what stopped the read, and the
555
+ * first bytes of what arrived — through the same inert filter as
556
+ * {@link rawDetail}, because the preview has exactly the same provenance. */
557
+ function rawUnreadableDetail(f) {
558
+ const detail = f.cause instanceof Error ? `${f.cause.name}: ${f.cause.message}` : String(f.cause);
559
+ const head = `Raw detail — HTTP ${f.status} on ${f.method} ${f.path}, body this client ` +
560
+ `could not read: ${inertOneLine(detail)}`;
561
+ if (typeof f.bodyPreview !== "string" || f.bodyPreview === "")
562
+ return head;
563
+ const note = f.bodyPreview.length > MAX_PREVIEW_CHARS
564
+ ? ` … [preview truncated at ${MAX_PREVIEW_CHARS} chars]`
565
+ : "";
566
+ return `${head} First bytes: ${inertOneLine(f.bodyPreview.slice(0, MAX_PREVIEW_CHARS))}${note}`;
567
+ }
568
+ /**
569
+ * {@link explainUnreadableBody} as an error, so a caller can tell "a reply
570
+ * arrived and was unreadable" from "no reply arrived" by TYPE rather than by
571
+ * matching a sentence — the same reason {@link ApiError} carries fields.
572
+ */
573
+ export class UnreadableBodyError extends Error {
574
+ status;
575
+ method;
576
+ path;
577
+ constructor(f) {
578
+ super(explainUnreadableBody(f), { cause: f.cause });
579
+ this.name = "UnreadableBodyError";
580
+ this.status = f.status;
581
+ this.method = f.method;
582
+ this.path = f.path;
583
+ }
416
584
  }
417
585
  /**
418
586
  * 409: name the conflict this tool actually produced (panel, #93). The two
@@ -1 +1 @@
1
- {"version":3,"file":"errors.js","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0DG;AAEH;;;yDAGyD;AACzD,MAAM,cAAc,GAAG,GAAG,CAAC;A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