@squirrelnotes.app/mcp 2.8.0-test.397 → 2.8.0-test.399

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.
@@ -41683,8 +41683,9 @@ var init_note_text = __esm({
41683
41683
  "storage-full": "The account's storage is full, so nothing was written. Ask the user to free space: delete notes or files, or empty the Trash.",
41684
41684
  // #668: update_note writes long content first, then the title; the server
41685
41685
  // refused only the title. `status` is the HTTP status, `reason` the
41686
- // refusal it maps to when it is one of the above (ADR-0460: no server text).
41687
- "title-not-saved": "The content was saved, but the title was not: the server refused it (status, and reason when it is a known refusal such as storage-full). Fix the cause, then retry update_note with the title alone."
41686
+ // refusal it maps to when it is one of the above (ADR-0460: no server text);
41687
+ // `cause` the network error's code when the title got no answer (#699).
41688
+ "title-not-saved": "The content was saved, but the title was not: the server refused it (status, and reason when it is a known refusal such as storage-full) or did not answer (cause, a network error code). A 429 means too many writes: wait a minute first. Fix the cause, then retry update_note with the title alone."
41688
41689
  };
41689
41690
  refuse2 = (error62, details) => details === void 0 ? { kind: "refused", error: error62 } : { kind: "refused", error: error62, details };
41690
41691
  isRefusal = (x) => "kind" in x && x.kind === "refused";
@@ -42570,6 +42571,9 @@ function createMcpServer(creds, opts = {}) {
42570
42571
  try {
42571
42572
  await client.updateNote(id, dto);
42572
42573
  } catch (err) {
42574
+ if (err instanceof SquirrelNetworkError) {
42575
+ return refusalResult({ kind: "refused", error: "title-not-saved", details: err.code ? { cause: err.code } : {} });
42576
+ }
42573
42577
  if (!(err instanceof SquirrelApiError)) throw err;
42574
42578
  const reason = serverRefusal(err)?.error;
42575
42579
  return refusalResult({ kind: "refused", error: "title-not-saved", details: { ...reason ? { reason } : {}, status: err.status } });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@squirrelnotes.app/mcp",
3
- "version": "2.8.0-test.397",
3
+ "version": "2.8.0-test.399",
4
4
  "description": "MCP stdio CLI for Squirrel Notes — bridges AI agents to the encrypted note-taking API",
5
5
  "type": "module",
6
6
  "repository": {