@squirrelnotes.app/mcp 2.7.1-test.391 → 2.7.1-test.394

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.
@@ -41680,7 +41680,11 @@ var init_note_text = __esm({
41680
41680
  "write-conflict": "The note changed on the server since it was read, so nothing was written. Read it again and retry.",
41681
41681
  // ADR-0523 §7, §8: the account's storage (notes, files and the Trash
41682
41682
  // until it is emptied) is full. The server's answer carries no size.
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."
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
+ // #668: update_note writes long content first, then the title; the server
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."
41684
41688
  };
41685
41689
  refuse2 = (error62, details) => details === void 0 ? { kind: "refused", error: error62 } : { kind: "refused", error: error62, details };
41686
41690
  isRefusal = (x) => "kind" in x && x.kind === "refused";
@@ -42560,7 +42564,15 @@ function createMcpServer(creds, opts = {}) {
42560
42564
  const current = readNoteContent(await client.getNote(id), key);
42561
42565
  const written = await writeNoteContent(client, key, id, content, current);
42562
42566
  if (written.kind === "refused") return refusalResult(written);
42563
- if (title !== void 0) await client.updateNote(id, dto);
42567
+ if (title !== void 0) {
42568
+ try {
42569
+ await client.updateNote(id, dto);
42570
+ } catch (err) {
42571
+ if (!(err instanceof SquirrelApiError)) throw err;
42572
+ const reason = serverRefusal(err)?.error;
42573
+ return refusalResult({ kind: "refused", error: "title-not-saved", details: { ...reason ? { reason } : {}, status: err.status } });
42574
+ }
42575
+ }
42564
42576
  return { content: [{ type: "text", text: JSON.stringify({ id, updated: true }, null, 2) }] };
42565
42577
  }
42566
42578
  );
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@squirrelnotes.app/mcp",
3
- "version": "2.7.1-test.391",
3
+ "version": "2.7.1-test.394",
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": {