apple-notes-mcp 2.8.13 → 2.8.14
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 +16 -3
- package/build/index.js +9 -11
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -225,6 +225,14 @@ Creates a new note in Apple Notes.
|
|
|
225
225
|
|
|
226
226
|
> **Note:** The title is automatically prepended as `<h1>` in both plaintext and HTML formats. Do not include a `<h1>` title tag in the `content` parameter, or the title will appear twice.
|
|
227
227
|
|
|
228
|
+
> **Known limitation:** `create-note` sets the note body directly via AppleScript's
|
|
229
|
+
> `body` property, which does not apply real Notes paragraph styles for interior
|
|
230
|
+
> content — an `<h2>`/`<h3>` tag or a `<span style="font-size: …px">` heading span
|
|
231
|
+
> in `content` renders as plain bold, styled text, not an actual Heading or
|
|
232
|
+
> Subheading ([#172](https://github.com/sweetrb/apple-notes-mcp/issues/172)). Real
|
|
233
|
+
> Heading/Subheading styles can currently only be added to a note that already
|
|
234
|
+
> exists, with [`append-native`](#append-native)'s `format: "markdown"`.
|
|
235
|
+
|
|
228
236
|
**Returns:** Confirmation message with note title and ID. Save the ID for subsequent operations like `update-note`, `delete-note`, etc.
|
|
229
237
|
|
|
230
238
|
---
|
|
@@ -1066,9 +1074,14 @@ when `scopeText` is supplied. Use a distinctive phrase of plain words without
|
|
|
1066
1074
|
punctuation, hashtags, or paths because Notes search may not resolve them
|
|
1067
1075
|
literally. `format: "html"` accepts the fixed subset tabulated under
|
|
1068
1076
|
[`append-to-note`](#append-to-note); content outside it is refused by name, with
|
|
1069
|
-
the accepted subset in the error.
|
|
1070
|
-
|
|
1071
|
-
|
|
1077
|
+
the accepted subset in the error. `format: "markdown"` accepts the same bounded
|
|
1078
|
+
subset as `format: "html"`'s Markdown-shaped content (`#`/`##`/`###` headings,
|
|
1079
|
+
flat lists, emphasis, and inline links) but is sent through Notes' own native
|
|
1080
|
+
Markdown importer rather than converted to HTML first, so `#`/`##`/`###`
|
|
1081
|
+
produce real Title/Heading/Subheading — Notes' HTML importer only
|
|
1082
|
+
distinguishes two heading levels and renders `###` the same as `##`. A
|
|
1083
|
+
transport failure names the Shortcut it was waiting on, so a missing or
|
|
1084
|
+
unapproved bridge is identified rather than guessed at.
|
|
1072
1085
|
|
|
1073
1086
|
#### `create-checklist-item`
|
|
1074
1087
|
|
package/build/index.js
CHANGED
|
@@ -39800,10 +39800,12 @@ function htmlLinks(html) {
|
|
|
39800
39800
|
}
|
|
39801
39801
|
return links;
|
|
39802
39802
|
}
|
|
39803
|
+
var BARE_HTTP_ORIGIN = /^https?:\/\/[^/?#]+$/i;
|
|
39804
|
+
var normalizedUrl = (url) => BARE_HTTP_ORIGIN.test(url) ? `${url}/` : url;
|
|
39803
39805
|
function linkSignature(links) {
|
|
39804
39806
|
return JSON.stringify(
|
|
39805
39807
|
links.flatMap(
|
|
39806
|
-
(link) => normalized(link.text).split("").map((char) => [char, link.url])
|
|
39808
|
+
(link) => normalized(link.text).split("").map((char) => [char, normalizedUrl(link.url)])
|
|
39807
39809
|
)
|
|
39808
39810
|
);
|
|
39809
39811
|
}
|
|
@@ -43157,15 +43159,10 @@ function assertAppendedVisibleText(beforeHtml, afterHtml, expected) {
|
|
|
43157
43159
|
}
|
|
43158
43160
|
function appendNative(manager, request) {
|
|
43159
43161
|
validateAppendContent(request.content, request.format);
|
|
43160
|
-
if (request.format === "markdown")
|
|
43161
|
-
return appendNative(manager, {
|
|
43162
|
-
...request,
|
|
43163
|
-
content: appendMarkdownHtml(request.content),
|
|
43164
|
-
format: "html"
|
|
43165
|
-
});
|
|
43166
43162
|
if (request.format === "html" && /<table\b/i.test(request.content))
|
|
43167
43163
|
throw new Error("Use create-table for verified native table insertion");
|
|
43168
|
-
const
|
|
43164
|
+
const markdownHtml = request.format === "markdown" ? appendMarkdownHtml(request.content) : null;
|
|
43165
|
+
const op = request.format === "plaintext" ? "append-text" : request.format === "markdown" ? "append-markdown" : "append-html";
|
|
43169
43166
|
const text = request.format === "html" ? "<div><br></div>" + request.content : "\n\n" + request.content;
|
|
43170
43167
|
return mutateBackground(
|
|
43171
43168
|
request,
|
|
@@ -43173,10 +43170,11 @@ function appendNative(manager, request) {
|
|
|
43173
43170
|
{ text },
|
|
43174
43171
|
(before, after) => {
|
|
43175
43172
|
assertPreserved(before, after, { append: true });
|
|
43176
|
-
const
|
|
43173
|
+
const verifyHtml = markdownHtml ?? request.content;
|
|
43174
|
+
const expected = request.format === "plaintext" ? request.content : comparableVisibleText(verifyHtml);
|
|
43177
43175
|
if (expected) assertAppendedVisibleText(before.html, after.html, expected);
|
|
43178
|
-
if (request.format === "html")
|
|
43179
|
-
assertAppendedHtmlLinks(before.rich.links.length, after.rich.links,
|
|
43176
|
+
if (request.format === "html" || request.format === "markdown")
|
|
43177
|
+
assertAppendedHtmlLinks(before.rich.links.length, after.rich.links, verifyHtml);
|
|
43180
43178
|
},
|
|
43181
43179
|
backgroundDependencies(manager)
|
|
43182
43180
|
);
|
package/package.json
CHANGED