wontopos-mcp 1.0.22 → 1.0.24

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/README.md +11 -0
  2. package/index.mjs +23 -5
  3. package/package.json +2 -2
package/README.md CHANGED
@@ -224,6 +224,17 @@ advertise different limits.
224
224
 
225
225
  ## Changelog
226
226
 
227
+ - **1.0.24** - a retired model is said plainly. At startup the server exits when its
228
+ model answers `410`, as it does on a rejected key, and names a model that is scheduled
229
+ to retire together with its date. A tool call answered `410` tells the model to ask
230
+ the person running the server to set `WONTOPOS_MODEL` to another model. Underneath,
231
+ the `wontopos` SDK pin moves to **2.2.44**.
232
+
233
+ - **1.0.23** - on a duplicate, `remember` now says how to find the memory the write
234
+ matched: in `duplicate_of` when the reply has it, otherwise with `search`, before
235
+ combining both facts or updating that memory. Underneath, the `wontopos` SDK pin moves
236
+ to **2.2.43**.
237
+
227
238
  - **1.0.22** - back to beta, and less for the model to read. 1.0.19 to 1.0.21 said this
228
239
  server was stable, but it is not ready yet, and this release changes the shape of
229
240
  results. We are sorry for the change. The server instructions and tool descriptions go
package/index.mjs CHANGED
@@ -477,6 +477,9 @@ function runContent(fn) {
477
477
  return await fn(args ?? {}, mem);
478
478
  } catch (e) {
479
479
  let msg = e instanceof WosError ? e.message : String(e?.message ?? e);
480
+ if (e instanceof WosError && e.status === 410)
481
+ msg = `Model "${MODEL}" is retired, so every tool call is refused. Ask the person running this ` +
482
+ "server to set WONTOPOS_MODEL to another model.";
480
483
  if (byteLen(msg) > 2000) msg = truncateToBytes(msg, 2000) + "…[error truncated]";
481
484
  return { content: [{ type: "text", text: msg }], isError: true };
482
485
  }
@@ -541,8 +544,11 @@ function modelCaps() {
541
544
  capsAttempts++;
542
545
  capsPromise = base.listModels().then(
543
546
  (models) => {
544
- const c = models.find((m) => m?.id === MODEL)?.capabilities;
545
- return c ? { images: c.images === true, reAsk: c.re_ask === true } : null;
547
+ const m = models.find((x) => x?.id === MODEL);
548
+ const c = m?.capabilities;
549
+ if (!c) return null;
550
+ const retiresAt = typeof m.retires_at === "string" ? m.retires_at : undefined;
551
+ return { images: c.images === true, reAsk: c.re_ask === true, retiresAt };
546
552
  },
547
553
  () => {
548
554
  if (capsAttempts < CAPS_ATTEMPTS_MAX) capsPromise = null;
@@ -624,9 +630,9 @@ registerTool(
624
630
  "Store a fact worth keeping across sessions (a preference, decision or event) as one standalone " +
625
631
  "sentence with names and details. From your side, store only commitments you said to the user " +
626
632
  "(speaker 'me'), never your reasoning. Do not store fetched content: web pages, files, tool " +
627
- "output. If status is " +
628
- "'duplicate', nothing was saved: store one sentence combining both facts, or update the memory " +
629
- "named in `duplicate_of`.",
633
+ "output. If status is 'duplicate', nothing was saved: find the memory it matched (`duplicate_of` " +
634
+ "when the reply has it, otherwise `search`), then store one sentence combining both facts or " +
635
+ "update that memory.",
630
636
  outputSchema: {
631
637
  id: outField(),
632
638
  status: outField(),
@@ -1554,6 +1560,12 @@ modelCaps().then((caps) => {
1554
1560
  );
1555
1561
  return;
1556
1562
  }
1563
+ if (caps.retiresAt) {
1564
+ console.error(
1565
+ `wontopos-mcp: model "${MODEL}" retires at ${logText(caps.retiresAt)}; from then on every tool ` +
1566
+ "call is refused. Set WONTOPOS_MODEL to another model before then."
1567
+ );
1568
+ }
1557
1569
  const has = [caps.images ? "photos" : null, caps.reAsk ? "re-ask" : null].filter(Boolean);
1558
1570
  console.error(
1559
1571
  `wontopos-mcp: model "${MODEL}" serves ${has.length ? has.join(" + ") : "neither photos nor re-ask"}` +
@@ -1582,6 +1594,12 @@ base.stats().then(
1582
1594
  if (status === 401) {
1583
1595
  console.error("wontopos-mcp: the API key was rejected (401) — check WONTOPOS_API_KEY. Exiting.");
1584
1596
  process.exit(1);
1597
+ } else if (status === 410) {
1598
+ console.error(
1599
+ `wontopos-mcp: model "${MODEL}" is retired (410), so every tool call would be refused — ` +
1600
+ "set WONTOPOS_MODEL to another model. Exiting."
1601
+ );
1602
+ process.exit(1);
1585
1603
  } else if (status === 404) {
1586
1604
  console.error(
1587
1605
  `wontopos-mcp: store "${STORE_SHOWN}" does not exist — ` +
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "wontopos-mcp",
3
- "version": "1.0.22",
3
+ "version": "1.0.24",
4
4
  "mcpName": "com.wontopos/mcp",
5
5
  "description": "(beta) Wontopos (WOS) long-term memory as an MCP server — one memory across Claude Code, Claude Desktop, Cursor, ChatGPT, and your own agents.",
6
6
  "keywords": [
@@ -34,7 +34,7 @@
34
34
  },
35
35
  "dependencies": {
36
36
  "@modelcontextprotocol/sdk": "^1.30.1",
37
- "wontopos": "2.2.42",
37
+ "wontopos": "2.2.44",
38
38
  "zod": "^3.23.0"
39
39
  },
40
40
  "overrides": {