@mnemoverse/mcp-memory-server 0.11.0 → 0.12.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/dist/errors.js CHANGED
@@ -89,6 +89,19 @@ const USAGE_URL = "https://console.mnemoverse.com/dashboard/usage";
89
89
  * module is imported BY index.ts, so reading the value from there would be a
90
90
  * cycle. Change one, grep for the other. */
91
91
  const DEFAULT_API_URL = "https://core.mnemoverse.com/api/v1";
92
+ /** Defaults applied field-by-field, with a `typeof`/literal guard on each:
93
+ * `wording` crosses a public package boundary a caller controls only at
94
+ * compile time, so a malformed value at runtime degrades to the default
95
+ * instead of propagating (e.g. into a template literal, or a `Wording`
96
+ * field silently taking a fifth value no branch here checks for). */
97
+ function resolveWording(w) {
98
+ return {
99
+ serverNoun: w?.serverNoun === "this connector" ? "this connector" : "this server",
100
+ auth: w?.auth === "oauth" ? "oauth" : "api-key",
101
+ keysUrl: typeof w?.keysUrl === "string" && w.keysUrl !== "" ? w.keysUrl : KEYS_URL,
102
+ rawDetail: typeof w?.rawDetail === "boolean" ? w.rawDetail : true,
103
+ };
104
+ }
92
105
  /**
93
106
  * Is `details.keys_url` safe to put in front of a user?
94
107
  *
@@ -232,16 +245,42 @@ function has(message, needle) {
232
245
  * "caller org not identified" for the same reason that clause runs first at
233
246
  * all (a valid key must never be told to replace itself), and still before
234
247
  * the substring guess, since a named reason needs no guessing.
248
+ *
249
+ * UNDER `wording.auth === "oauth"` (STEP4-2, owner, 2026-09-24) none of the
250
+ * above applies: the caller never held an API key at all, so `reason` (a
251
+ * diagnosis of WHICH key problem this is) and every key-flavoured branch
252
+ * below would be a wrong cause stated confidently. "Caller org not
253
+ * identified" is the one exception: it is about tenant identification, not
254
+ * about a key, and can fire under either credential type, so it is checked
255
+ * first regardless of `auth`, worded for whichever credential the caller
256
+ * actually holds. Every other 401 collapses to one OAuth-flavoured sentence:
257
+ * reconnect or sign in again, because that is the one thing an OAuth user
258
+ * can actually do about a 401, and naming a wrong one of five key reasons
259
+ * would be worse than naming none.
235
260
  */
236
- function explain401(env) {
261
+ function explain401(env, wording) {
237
262
  const m = env.message;
238
263
  if (has(m, "caller org not identified")) {
239
- return ("Mnemoverse: this deployment could not identify a tenant account for " +
240
- "this request (401). The API key itself was not rejected — do NOT " +
241
- "tell the user to replace it. Room and shared-memory operations need " +
242
- "the multi-tenant backend, which a self-hosted or static-auth " +
243
- "deployment does not have. Quote the detail below, and do not retry " +
244
- "the same call against this deployment.");
264
+ return wording.auth === "oauth"
265
+ ? "Mnemoverse: this deployment could not identify a tenant account for " +
266
+ "this request (401). The caller's sign-in itself was not rejected " +
267
+ "— do NOT tell the user to reconnect over this. Room and " +
268
+ "shared-memory operations need the multi-tenant backend, which a " +
269
+ "self-hosted or static-auth deployment does not have. Quote the " +
270
+ "detail below, and do not retry the same call against this " +
271
+ "deployment."
272
+ : "Mnemoverse: this deployment could not identify a tenant account for " +
273
+ "this request (401). The API key itself was not rejected — do NOT " +
274
+ "tell the user to replace it. Room and shared-memory operations need " +
275
+ "the multi-tenant backend, which a self-hosted or static-auth " +
276
+ "deployment does not have. Quote the detail below, and do not retry " +
277
+ "the same call against this deployment.";
278
+ }
279
+ if (wording.auth === "oauth") {
280
+ return ("Mnemoverse: the user's sign-in was rejected (401). There is no " +
281
+ "credential for them to edit — tell them to disconnect and " +
282
+ "reconnect the app, or sign in again, to refresh their session. Do " +
283
+ "not retry until they do.");
245
284
  }
246
285
  // `details.reason` (an engine change not yet released as of this
247
286
  // one): the engine's own diagnosis of WHICH key problem this is, five
@@ -254,7 +293,7 @@ function explain401(env) {
254
293
  // for byte: `reason` is additive, never a replacement for a message this
255
294
  // parser cannot yet interpret.
256
295
  if (env.reason !== undefined) {
257
- const keysUrl = env.keysUrl ?? KEYS_URL;
296
+ const keysUrl = env.keysUrl ?? wording.keysUrl;
258
297
  switch (env.reason) {
259
298
  case "placeholder_key":
260
299
  return ("Mnemoverse: your API key was rejected (401). The engine itself " +
@@ -309,7 +348,7 @@ function explain401(env) {
309
348
  "MNEMOVERSE_API_KEY is not valid — if it still reads a docs " +
310
349
  'placeholder such as "mk_live_YOUR_KEY" or "mk_live_USER_KEY" (any ' +
311
350
  "value they did not create at the console themselves) it must be " +
312
- `replaced with a real key from ${KEYS_URL}. Do not retry until they ` +
351
+ `replaced with a real key from ${wording.keysUrl}. Do not retry until they ` +
313
352
  "replace it.");
314
353
  }
315
354
  if (m !== undefined || env.code !== undefined) {
@@ -326,33 +365,163 @@ function explain401(env) {
326
365
  "client cannot tell WHO refused. Quote the detail below and check the " +
327
366
  "path to the API first.");
328
367
  }
329
- /** 403: when the ENGINE refused, the key was accepted and then the request
330
- * was refused — name WHICH refusal, from the engine's own message, and never
331
- * blame the key. But that first clause is only known when the engine actually
332
- * spoke: a proxy, a WAF or a tunnel also answers 403, in HTML, and asserting
333
- * "the key identified the account fine" about a response the engine may never
334
- * have seen is exactly the confident wrong cause this module exists to avoid. */
335
- function explain403(env) {
368
+ /** 403: when the ENGINE refused, the credential was accepted and then the
369
+ * request was refused — name WHICH refusal, from the engine's own message,
370
+ * and never blame the credential. But that first clause is only known when
371
+ * the engine actually spoke: a proxy, a WAF or a tunnel also answers 403, in
372
+ * HTML, and asserting "the credential identified the account fine" about a
373
+ * response the engine may never have seen is exactly the confident wrong
374
+ * cause this module exists to avoid.
375
+ *
376
+ * Under `wording.auth === "oauth"` every noun for the credential changes
377
+ * and nothing else does: the clause naming it as innocent ("The API key" /
378
+ * "Your sign-in"), the holder the room-permission causes speak about ("This
379
+ * key" / "This account", since an OAuth user holds no key and membership is
380
+ * the account's), and the one word the opaque-403 branch declines to blame
381
+ * ("the key" / "the sign-in"). Review round 2 on the wording slice: the
382
+ * first cut changed only the innocent clause and left "This key is not an
383
+ * active member" in the same sentence that had just told an OAuth user
384
+ * their sign-in was fine. */
385
+ function explain403(env, wording) {
386
+ const oauth = wording.auth === "oauth";
336
387
  if (saidNothing(env)) {
388
+ const blamed = oauth ? "the sign-in" : "the key";
337
389
  return ("Mnemoverse: this request was refused (403) by something that did not " +
338
390
  "speak this API's error language — the body carries neither of the two " +
339
391
  "shapes the engine produces. That points at a proxy, a gateway, or a " +
340
392
  "MNEMOVERSE_API_URL aimed somewhere unexpected, and the engine may never " +
341
- "have seen the request — so do not blame the key and do not blame room " +
393
+ `have seen the request — so do not blame ${blamed} and do not blame room ` +
342
394
  "permissions: this client cannot tell WHO refused it. Quote the detail " +
343
395
  "below to the user, and do not retry until the path to the API is explained.");
344
396
  }
397
+ const holder = oauth ? "This account" : "This key";
398
+ const holderLc = oauth ? "this account" : "this key";
345
399
  const m = env.message;
400
+ // A SCOPE refusal: the credential identified the account and lacks a
401
+ // permission the call needs (a write with a read-only token). Two producers
402
+ // today, both name the scope: core's middleware ("Token lacks memory:write
403
+ // scope") and the hosted connector's own gate ("the token lacks the
404
+ // memory:write scope"). It is not about a room, so it must not fall
405
+ // through to the generic sentence that guesses "most often the room it
406
+ // addressed" (the connector's refusal did exactly that, step 4 review).
407
+ // The check is keyed on that vocabulary (a scope NAME, or one of the lack
408
+ // verbs lacks, lacking, missing, without, requires, required, needs
409
+ // followed by the word "scope" in the same sentence), not on the bare word
410
+ // "scope" ("outside the scope of this plan and needs a review" is not a
411
+ // scope refusal), and it is tried AFTER the room causes: room
412
+ // membership is itself called a scope elsewhere on this surface, so a room
413
+ // refusal that happens to say "scope" keeps its room diagnosis (Sigma on
414
+ // #175).
415
+ const LACK_THEN_SCOPE = /\b(?:lacks?|lacking|missing|without|requires?|required|needs?)\b[^.;]*\bscope\b/i;
416
+ const scopeRefusal = has(m, "scope") && (has(m, "memory:") || LACK_THEN_SCOPE.test(m ?? ""));
417
+ // Core's other scope sentence, "Route has no scope policy; denied by
418
+ // default", is NOT about the credential: the route itself has no policy
419
+ // registered, and the middleware denies it by default. No re-authorization
420
+ // and no other credential changes that, so it gets its own diagnosis
421
+ // (CodeRabbit and Copilot on #175). Keyed on core's exact clause ("no
422
+ // scope policy"), so a message that names a lacking scope and merely
423
+ // mentions a scope policy stays a scope refusal; core's sentence itself
424
+ // names no scope and does not say "lacks", so it never matches
425
+ // `scopeRefusal` either.
426
+ const routePolicy = has(m, "no scope policy");
427
+ // Under oauth the remedy is real: the connector's consent flow grants
428
+ // scopes. Under api-key it is credential-neutral: an API key carries no
429
+ // scope selection this package knows of (the scope rules are OIDC-only, and
430
+ // no producer sends a scope refusal to an API-key caller today), so the
431
+ // reply names no fix a key swap cannot deliver; the user is told which
432
+ // scope was refused and grants it on their side (Copilot and the internal
433
+ // refuter on #175).
434
+ // The scope NAMES come from the engine's message itself, matched as
435
+ // `memory:<word>` and nothing else, so the api-key advice can name what to
436
+ // grant even when `rawDetail: false` withholds the message (Copilot on
437
+ // #175). Only the clause that states the lack is read: from "lacks",
438
+ // "missing", "without", "requires" or "needs" up to the end of the
439
+ // sentence, a comma, a dash (en, em, or a spaced hyphen), an opening
440
+ // parenthesis, a conjunction (but, while, whereas, although, though, yet,
441
+ // however, except), or a word that introduces what IS held ("granted",
442
+ // "has", "holds", "carries"), so a scope the message lists as held in any
443
+ // of those positions is not presented as refused (CodeRabbit on #175).
444
+ // The trade-off is deliberate: a comma-separated list of LACKING scopes is
445
+ // cut to its first item, and a held scope after a colon or after a
446
+ // connective not in that list ("with memory:read retained") would still
447
+ // be named; no producer writes either today (core names exactly one
448
+ // scope). A message that names scopes with the name
449
+ // BEFORE the verb ("memory:write scope is required") keeps them all,
450
+ // unless it also speaks of held scopes; a refusal that names none gets
451
+ // the generic sentence.
452
+ const text = m ?? "";
453
+ const scopesIn = (t) => [...new Set((t.match(/\bmemory:[a-z_]+/gi) ?? []).map((x) => x.toLowerCase()))];
454
+ const lackClause = text.match(/\b(?:lacks?|lacking|missing|without|requires?|required|needs?)\b((?:(?!\b(?:granted|held|has|holds|carries|but|while|whereas|although|though|yet|however|except)\b|\s-\s)[^.;(,\u2013\u2014])*)/i)?.[1] ?? "";
455
+ const speaksOfHeld = /\b(?:granted|held|has|holds|carries)\b/i.test(text);
456
+ // Names the message says are HELD are never refused, wherever they sit: a
457
+ // name followed by "is/are (already) held|granted|available|present", or
458
+ // any name after a held-word up to the end of that fragment (Sigma on
459
+ // #175: "lacks memory:write scope but memory:read is already held").
460
+ const heldNames = new Set([
461
+ // The window between the name and "is held" may not contain another
462
+ // scope name, or "memory:write scope but memory:read is held" would
463
+ // count memory:write as held.
464
+ ...[...text.matchAll(/\b(memory:[a-z_]+)\b(?:(?!memory:)[^.;,]){0,40}?\b(?:is|are)\s+(?:already\s+|still\s+)?(?:held|granted|available|present)\b/gi)].map((x) => x[1].toLowerCase()),
465
+ // The held fragment ends where a lack verb or a conjunction starts, so
466
+ // "has memory:read scope but lacks memory:write scope" holds only read.
467
+ ...[
468
+ ...text.matchAll(/\b(?:granted|held|has|holds|carries)\b((?:(?!\b(?:lacks?|lacking|missing|without|requires?|required|needs?|but|while|whereas|although|though|yet|however|except)\b)[^.;])*)/gi),
469
+ // A name the lack clause itself refuses is not held by this fragment
470
+ // ("has memory:write scope for room A but lacks memory:write scope
471
+ // for room B" refuses memory:write).
472
+ ].flatMap((x) => scopesIn(x[1])).filter((x) => !scopesIn(lackClause).includes(x)),
473
+ ]);
474
+ const candidates = scopesIn(lackClause).length > 0 || speaksOfHeld ? scopesIn(lackClause) : scopesIn(text);
475
+ const named = candidates.filter((x) => !heldNames.has(x));
476
+ // Reads are said to be unaffected only when the REFUSED scope is the write
477
+ // scope and the read scope is not among the refused (Copilot and Sigma on
478
+ // #175; the flag reads the refused names, not the whole message, so
479
+ // "lacks memory:admin scope; has memory:write scope" does not count as a
480
+ // write refusal); a refusal that names no scope falls back to the words
481
+ // "write scope"/"read scope". "Unaffected by this refusal" is all the
482
+ // refusal supports: whether reads work depends on the read scope, which it
483
+ // says nothing about.
484
+ // And never when the message states the read scope lacking anywhere, even
485
+ // past the cut of the lack clause ("lacks memory:write scope, memory:read
486
+ // scope"): a read name that is not held, or the words "read scope".
487
+ const readStatedLacking = (scopesIn(text).includes("memory:read") && !heldNames.has("memory:read")) || has(m, "read scope");
488
+ const writeScope = named.length > 0
489
+ ? named.includes("memory:write") && !named.includes("memory:read") && !readStatedLacking
490
+ : has(m, "write scope") && !has(m, "read scope");
491
+ const list = named.length <= 2 ? named.join(" and ") : `${named.slice(0, -1).join(", ")} and ${named[named.length - 1]}`;
492
+ const refused = named.length === 0
493
+ ? "this call was refused for a missing scope so they can grant it on their side"
494
+ : named.length === 1
495
+ ? `the ${named[0]} scope was refused so they can grant it on their side`
496
+ : `the ${list} scopes were refused so they can grant them on their side`;
497
+ const remedy = oauth
498
+ ? `tell the user to re-authorize this connector with ${writeScope ? "write access" : "the access it needs"}`
499
+ : `tell the user ${refused}`;
500
+ // The remedy either follows the reads clause mid-sentence or opens its own
501
+ // sentence, capitalised.
502
+ const advice = writeScope ? `Reads are not affected by this refusal, since they need only the read scope; ${remedy}.` : `${remedy[0].toUpperCase()}${remedy.slice(1)}.`;
503
+ // The opening clause of the reply (below) already says what is missing, so
504
+ // the cause carries the pointer to the engine's words, the advice, and the
505
+ // one prohibition. The pointer exists only when the raw-detail paragraph
506
+ // will be there: under `rawDetail: false` the consumer withholds the body,
507
+ // and a pointer to withheld content is a lie (Copilot on #175).
508
+ const pointer = wording.rawDetail ? "The engine's own words are in the detail below. " : "";
509
+ const scopeCause = `${pointer}${advice} ` + "Do not work around it by trying another tool.";
510
+ const routePolicyCause = "The engine denies this route by default because no scope policy is " +
511
+ "registered for it: a gap in the server's own configuration, not anything " +
512
+ `about ${holderLc}, so no re-authorization and no other credential changes ` +
513
+ "it. Tell the user exactly what was refused so it can be reported, and do " +
514
+ "not work around it by trying another tool.";
346
515
  const cause = has(m, "archiv")
347
516
  ? "The room you addressed is archived. An archived room refuses every read " +
348
517
  "and every write, for its owner as much as for a member, and this client " +
349
518
  "has no operation that reopens one."
350
519
  : has(m, "not an active member") || has(m, "member of this room")
351
- ? "This key is not an active member of the room you addressed. Ask the " +
520
+ ? `${holder} is not an active member of the room you addressed. Ask the ` +
352
521
  "room's owner for an invite; memory_list_rooms shows the rooms it can " +
353
522
  "already reach."
354
- : has(m, "read-only")
355
- ? "This key's membership in that room is read-only — it can read the " +
523
+ : has(m, "read-only") && (has(m, "membership") || has(m, "room"))
524
+ ? `${holder}'s membership in that room is read-only — it can read the ` +
356
525
  "room but not write to it. Ask the room's owner for write access."
357
526
  : has(m, "invalid room address")
358
527
  ? 'The room address was not in the form the engine accepts ' +
@@ -360,14 +529,26 @@ function explain403(env) {
360
529
  "rather than composing one."
361
530
  : has(m, "own this room")
362
531
  ? "That room belongs to another account, and only its owner can do " +
363
- "this. memory_list_rooms shows which rooms this key owns."
364
- : "Something about this request is not permitted for this key — " +
365
- "most often the room it addressed. Check memory_list_rooms, and " +
366
- "if nothing there explains it, tell the user exactly what was " +
367
- "refused instead of guessing.";
368
- return ("Mnemoverse: this request was refused (403). The API key is NOT the problem " +
369
- "— it identified the account fine, and this was a permission decision. " +
370
- `${cause} Do not retry the same call: it will be refused again.`);
532
+ `this. memory_list_rooms shows which rooms ${holderLc} owns.`
533
+ : routePolicy
534
+ ? routePolicyCause
535
+ : scopeRefusal
536
+ ? scopeCause
537
+ : `Something about this request is not permitted for ${holderLc} — ` +
538
+ "most often the room it addressed. Check memory_list_rooms, and " +
539
+ "if nothing there explains it, tell the user exactly what was " +
540
+ "refused instead of guessing.";
541
+ const subject = oauth ? "Your sign-in" : "The API key";
542
+ // The innocent clause ("NOT the problem") would contradict the scope cause
543
+ // that follows it: for that one refusal the credential did identify the
544
+ // account, and the decision was about a scope it does not carry, so the
545
+ // clause says exactly that (CodeRabbit on #175). Every other 403, the room
546
+ // causes and the route-policy denial included, keeps the clause byte for
547
+ // byte.
548
+ const opening = cause === scopeCause
549
+ ? `${subject} identified the account fine, but it does not carry a scope this call needs. `
550
+ : `${subject} is NOT the problem — it identified the account fine, and this was a permission decision. `;
551
+ return `Mnemoverse: this request was refused (403). ${opening}${cause} Do not retry the same call: it will be refused again.`;
371
552
  }
372
553
  /**
373
554
  * Did this response say ANYTHING an engine would have said?
@@ -444,15 +625,20 @@ function explain404(f, env) {
444
625
  }
445
626
  /** 429: three causes, opposite advice. The envelope's `retryable` is the
446
627
  * discriminator, because it is the only thing the engine states outright. */
447
- function explain429(f, env) {
628
+ function explain429(f, env, wording) {
448
629
  const secs = retryAfterSeconds(f.retryAfter);
449
630
  const wait = secs === undefined ? "about a minute" : `${secs} seconds`;
450
631
  if (env.retryable === true) {
632
+ // The one 429 sentence that names the credential holder (Sigma, review
633
+ // round 2 on the wording slice): "this key" for an API-key caller, "this
634
+ // account" for an OAuth user who holds no key. The other two branches
635
+ // speak about the account and the plan already.
636
+ const holder = wording.auth === "oauth" ? "this account" : "this key";
451
637
  return ("Mnemoverse: rate-limited (429). This is the per-minute request limit and " +
452
638
  `it clears by itself. Wait ${wait}, then make AT MOST ONE more attempt — ` +
453
639
  "do not retry in a loop and do not fan out into more calls, which is what " +
454
640
  "turns a one-minute limit into a sustained one. If the retry also fails, " +
455
- "stop and tell the user this key is hitting its rate limit.");
641
+ `stop and tell the user ${holder} is hitting its rate limit.`);
456
642
  }
457
643
  if (env.retryable === false) {
458
644
  return ("Mnemoverse: refused for quota, not for speed (429). Waiting will NOT " +
@@ -467,25 +653,30 @@ function explain429(f, env) {
467
653
  }
468
654
  /**
469
655
  * The agent-facing explanation for one failed call, with the raw body kept
470
- * after it.
656
+ * after it (unless `wording.rawDetail === false`, STEP4-3).
471
657
  *
472
658
  * Total by construction: every status reaches a sentence, and the fallback says
473
659
  * that it has no specific guidance instead of inventing some.
660
+ *
661
+ * `wording` (STEP4-2/3, owner 2026-09-24) is optional and, absent, resolves
662
+ * to exactly today's behaviour: every call site before this release passes
663
+ * none, so every existing pin stays byte-identical.
474
664
  */
475
- export function explainApiFailure(f) {
665
+ export function explainApiFailure(f, wording) {
666
+ const resolved = resolveWording(wording);
476
667
  const env = parseErrorEnvelope(f.body);
477
668
  let guidance;
478
669
  if (f.status === 401) {
479
- guidance = explain401(env);
670
+ guidance = explain401(env, resolved);
480
671
  }
481
672
  else if (f.status === 403) {
482
- guidance = explain403(env);
673
+ guidance = explain403(env, resolved);
483
674
  }
484
675
  else if (f.status === 404) {
485
676
  guidance = explain404(f, env);
486
677
  }
487
678
  else if (f.status === 429) {
488
- guidance = explain429(f, env);
679
+ guidance = explain429(f, env, resolved);
489
680
  }
490
681
  else if (f.status === 400 || f.status === 422) {
491
682
  guidance =
@@ -511,7 +702,7 @@ export function explainApiFailure(f) {
511
702
  "specific guidance for that status. Do not invent a cause for the user — " +
512
703
  "quote the detail below. One retry is acceptable; a loop is not.";
513
704
  }
514
- return `${guidance}\n\n${rawDetail(f)}`;
705
+ return resolved.rawDetail ? `${guidance}\n\n${rawDetail(f)}` : guidance;
515
706
  }
516
707
  /**
517
708
  * A server-controlled string, made safe to quote inside model-facing text.
@@ -594,12 +785,13 @@ function refusedRedirect(cause) {
594
785
  * that case now. Every sentence below asserts that nothing answered, so it may
595
786
  * only be reached when nothing did.
596
787
  */
597
- export function explainNetworkFailure(method, path, cause) {
788
+ export function explainNetworkFailure(method, path, cause, wording) {
789
+ const resolved = resolveWording(wording);
598
790
  const name = cause instanceof Error ? cause.name : "";
599
791
  const timedOut = name === "TimeoutError" || name === "AbortError";
600
792
  const detail = cause instanceof Error ? `${cause.name}: ${cause.message}` : String(cause);
601
793
  if (refusedRedirect(cause)) {
602
- return (`Mnemoverse: ${method} ${path} was answered with a REDIRECT, and this ` +
794
+ const head = `Mnemoverse: ${method} ${path} was answered with a REDIRECT, and this ` +
603
795
  "client refused to follow it — so the API key was never sent to whatever " +
604
796
  "the redirect pointed at. That refusal is the whole point: following a " +
605
797
  "redirect re-sends the request headers to the new host, which hands a " +
@@ -610,7 +802,10 @@ export function explainNetworkFailure(method, path, cause) {
610
802
  "network: the request arrived somewhere and was answered. Tell the user " +
611
803
  "to check MNEMOVERSE_API_URL and point it straight at the API (the " +
612
804
  `default is ${DEFAULT_API_URL}). Do not retry: the same address will ` +
613
- `redirect again.\n\n${rawTransportDetail(method, path, detail)}`);
805
+ "redirect again.";
806
+ return resolved.rawDetail
807
+ ? `${head}\n\n${rawTransportDetail(method, path, detail)}`
808
+ : head;
614
809
  }
615
810
  const head = timedOut
616
811
  ? `Mnemoverse: the memory service did not answer ${method} ${path} in time.`
@@ -620,11 +815,11 @@ export function explainNetworkFailure(method, path, cause) {
620
815
  ? "The service may just be slow right now."
621
816
  : "That is a connectivity or DNS problem, or MNEMOVERSE_API_URL pointing at " +
622
817
  "a host that does not answer.";
623
- return (`${head} ${cause_} This is NOT a rejected API key and NOT a quota — no ` +
818
+ const body = `${head} ${cause_} This is NOT a rejected API key and NOT a quota — no ` +
624
819
  "reply arrived to say anything about either, so do not send the user to " +
625
820
  "check their key. One retry is reasonable. If that also fails, tell the " +
626
- "user memory is unreachable and carry on without it rather than retrying.\n\n" +
627
- rawTransportDetail(method, path, detail));
821
+ "user memory is unreachable and carry on without it rather than retrying.";
822
+ return resolved.rawDetail ? `${body}\n\n${rawTransportDetail(method, path, detail)}` : body;
628
823
  }
629
824
  /** The debugging half of a transport failure, in one place so the redirect
630
825
  * branch and the generic one cannot drift into two spellings of it. */
@@ -657,7 +852,8 @@ const MAX_PREVIEW_CHARS = 200;
657
852
  * say whether the operation ran, because a body it cannot read is no evidence
658
853
  * either way. That last clause matters most for a write.
659
854
  */
660
- export function explainUnreadableBody(f) {
855
+ export function explainUnreadableBody(f, wording) {
856
+ const resolved = resolveWording(wording);
661
857
  // TWO ARMS, because the two failures have different causes and the wrong one
662
858
  // is a wrong instruction. A body that PARSED WRONG is a foreign answer — a
663
859
  // portal, a proxy, a base URL aimed elsewhere. A body that stopped ARRIVING
@@ -680,10 +876,11 @@ export function explainUnreadableBody(f) {
680
876
  `nothing about the user's key. One retry is reasonable; if it ` +
681
877
  `repeats, tell the user the reply is arriving incomplete and quote ` +
682
878
  `the detail below, status included.`;
683
- return (`Mnemoverse: something answered HTTP ${f.status} for ${f.method} ` +
879
+ const head = `Mnemoverse: something answered HTTP ${f.status} for ${f.method} ` +
684
880
  `${f.path}, but ${body} Whether the operation itself ran is unknown ` +
685
881
  `either way — if this was a write, treat it as neither saved nor ` +
686
- `refused.\n\n${rawUnreadableDetail(f)}`);
882
+ "refused.";
883
+ return resolved.rawDetail ? `${head}\n\n${rawUnreadableDetail(f)}` : head;
687
884
  }
688
885
  /** The debugging half for an unreadable body: what stopped the read, and the
689
886
  * first bytes of what arrived — through the same inert filter as
@@ -708,12 +905,25 @@ export class UnreadableBodyError extends Error {
708
905
  status;
709
906
  method;
710
907
  path;
711
- constructor(f) {
712
- super(explainUnreadableBody(f), { cause: f.cause });
908
+ /** The bytes that failed to parse, when they were read at all. Kept so
909
+ * {@link withWording} re-renders the same arm of the explanation. */
910
+ bodyPreview;
911
+ /** `wording` (STEP4-2/3): optional, and absent (every call site before this
912
+ * release) reproduces today's message exactly: see {@link explainUnreadableBody}. */
913
+ constructor(f, wording) {
914
+ super(explainUnreadableBody(f, wording), { cause: f.cause });
713
915
  this.name = "UnreadableBodyError";
714
916
  this.status = f.status;
715
917
  this.method = f.method;
716
918
  this.path = f.path;
919
+ this.bodyPreview = f.bodyPreview;
920
+ }
921
+ /** The same failure, explained under `wording`: see {@link ApiError.withWording}. */
922
+ withWording(wording) {
923
+ const f = { status: this.status, method: this.method, path: this.path, cause: this.cause };
924
+ if (this.bodyPreview !== undefined)
925
+ f.bodyPreview = this.bodyPreview;
926
+ return new UnreadableBodyError(f, wording);
717
927
  }
718
928
  }
719
929
  /**
@@ -744,12 +954,18 @@ function explain409(f) {
744
954
  export class NetworkError extends Error {
745
955
  method;
746
956
  path;
747
- constructor(method, path, cause) {
748
- super(explainNetworkFailure(method, path, cause), { cause });
957
+ /** `wording` (STEP4-2/3): optional, and absent (every call site before this
958
+ * release) reproduces today's message exactly: see {@link explainNetworkFailure}. */
959
+ constructor(method, path, cause, wording) {
960
+ super(explainNetworkFailure(method, path, cause, wording), { cause });
749
961
  this.name = "NetworkError";
750
962
  this.method = method;
751
963
  this.path = path;
752
964
  }
965
+ /** The same failure, explained under `wording`: see {@link ApiError.withWording}. */
966
+ withWording(wording) {
967
+ return new NetworkError(this.method, this.path, this.cause, wording);
968
+ }
753
969
  }
754
970
  /**
755
971
  * A failed API call, as an ERROR OBJECT rather than a parsed string.
@@ -769,15 +985,36 @@ export class ApiError extends Error {
769
985
  path;
770
986
  /** The engine's envelope, already parsed — so a caller never re-parses. */
771
987
  envelope;
772
- constructor(f) {
773
- super(explainApiFailure(f));
988
+ /** The `Retry-After` header as it arrived, when the response carried one.
989
+ * Kept so {@link withWording} re-renders a 429 with its retry sentence. */
990
+ retryAfter;
991
+ /** `wording` (STEP4-2/3): optional, and absent (every call site before this
992
+ * release) reproduces today's message exactly: see {@link explainApiFailure}. */
993
+ constructor(f, wording) {
994
+ super(explainApiFailure(f, wording));
774
995
  this.name = "ApiError";
775
996
  this.status = f.status;
776
997
  this.body = f.body;
777
998
  this.method = f.method;
778
999
  this.path = f.path;
1000
+ this.retryAfter = f.retryAfter;
779
1001
  this.envelope = parseErrorEnvelope(f.body);
780
1002
  }
1003
+ /**
1004
+ * The same failure, explained under `wording`: a new instance of this
1005
+ * class whose message is what the constructor would have produced with
1006
+ * that `wording`, every field and {@link isBare404} unchanged. The message
1007
+ * is a pure function of the failure and the wording, so re-rendering an
1008
+ * instance under the wording it was built with gives the same text back.
1009
+ * This is how `MemoryToolDeps.wording` reaches an error the consumer's
1010
+ * `apiFetch` built without it: see {@link rewordFailure}.
1011
+ */
1012
+ withWording(wording) {
1013
+ const f = { status: this.status, body: this.body, method: this.method, path: this.path };
1014
+ if (this.retryAfter !== undefined)
1015
+ f.retryAfter = this.retryAfter;
1016
+ return new ApiError(f, wording);
1017
+ }
781
1018
  /**
782
1019
  * A 404 the ENGINE did not answer: silence, or the router's literal
783
1020
  * defaults. This is what a path the deployment does not serve looks like
@@ -799,4 +1036,27 @@ export class ApiError extends Error {
799
1036
  return this.status === 404 && engineSilentOn404(this.envelope);
800
1037
  }
801
1038
  }
1039
+ /**
1040
+ * Re-explain one of this module's three errors under `wording`; hand
1041
+ * anything else back untouched.
1042
+ *
1043
+ * This is how `MemoryToolDeps.wording` reaches the error text (STEP4-2): a
1044
+ * consumer's `apiFetch` constructs `ApiError`, `NetworkError` and
1045
+ * `UnreadableBodyError` however it likes, and `registerMemoryTools` passes
1046
+ * every rejection through here with the `wording` it was given, so the
1047
+ * consumer states its wording once, on `deps`, and the constructors need no
1048
+ * second copy. Re-rendering is idempotent (see {@link ApiError.withWording}),
1049
+ * so an `apiFetch` that does pass the same `wording` to the constructors
1050
+ * gets the same text either way; one that passed a different wording gets
1051
+ * `deps.wording`, the one source of truth for this registration. A
1052
+ * rejection that is none of the three classes (a plain `Error`, an
1053
+ * `McpError`) is returned as is: it carries no wording to apply, and its
1054
+ * identity may matter to whoever threw it.
1055
+ */
1056
+ export function rewordFailure(e, wording) {
1057
+ if (e instanceof ApiError || e instanceof NetworkError || e instanceof UnreadableBodyError) {
1058
+ return e.withWording(wording);
1059
+ }
1060
+ return e;
1061
+ }
802
1062
  //# sourceMappingURL=errors.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"errors.js","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqEG;AAEH;;;yDAGyD;AACzD,MAAM,cAAc,GAAG,GAAG,CAAC;AAE3B;;;;;;0BAM0B;AAC1B,MAAM,CAAC,MAAM,QAAQ,GAAG,+CAA+C,CAAC;AAExE;8EAC8E;AAC9E,MAAM,SAAS,GAAG,gDAAgD,CAAC;AAEnE;;;6CAG6C;AAC7C,MAAM,eAAe,GAAG,oCAAoC,CAAC;AAmD7D;;;;;;;;;;;;GAYG;AACH,SAAS,gBAAgB,CAAC,GAAY;IACpC,IAAI,OAAO,GAAG,KAAK,QAAQ;QAAE,OAAO,SAAS,CAAC;IAC9C,IAAI,GAAQ,CAAC;IACb,IAAI,CAA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