apple-notes-mcp 2.6.13 → 2.6.15

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 (2) hide show
  1. package/build/index.js +86 -44
  2. package/package.json +1 -1
package/build/index.js CHANGED
@@ -3110,9 +3110,9 @@ var require_data = __commonJS({
3110
3110
  }
3111
3111
  });
3112
3112
 
3113
- // node_modules/.pnpm/fast-uri@3.1.4/node_modules/fast-uri/lib/utils.js
3113
+ // node_modules/.pnpm/fast-uri@3.1.5/node_modules/fast-uri/lib/utils.js
3114
3114
  var require_utils = __commonJS({
3115
- "node_modules/.pnpm/fast-uri@3.1.4/node_modules/fast-uri/lib/utils.js"(exports, module) {
3115
+ "node_modules/.pnpm/fast-uri@3.1.5/node_modules/fast-uri/lib/utils.js"(exports, module) {
3116
3116
  "use strict";
3117
3117
  var isUUID = RegExp.prototype.test.bind(/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu);
3118
3118
  var isIPv4 = RegExp.prototype.test.bind(/^(?:(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)$/u);
@@ -3423,9 +3423,9 @@ var require_utils = __commonJS({
3423
3423
  }
3424
3424
  });
3425
3425
 
3426
- // node_modules/.pnpm/fast-uri@3.1.4/node_modules/fast-uri/lib/schemes.js
3426
+ // node_modules/.pnpm/fast-uri@3.1.5/node_modules/fast-uri/lib/schemes.js
3427
3427
  var require_schemes = __commonJS({
3428
- "node_modules/.pnpm/fast-uri@3.1.4/node_modules/fast-uri/lib/schemes.js"(exports, module) {
3428
+ "node_modules/.pnpm/fast-uri@3.1.5/node_modules/fast-uri/lib/schemes.js"(exports, module) {
3429
3429
  "use strict";
3430
3430
  var { isUUID } = require_utils();
3431
3431
  var URN_REG = /([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu;
@@ -3633,9 +3633,9 @@ var require_schemes = __commonJS({
3633
3633
  }
3634
3634
  });
3635
3635
 
3636
- // node_modules/.pnpm/fast-uri@3.1.4/node_modules/fast-uri/index.js
3636
+ // node_modules/.pnpm/fast-uri@3.1.5/node_modules/fast-uri/index.js
3637
3637
  var require_fast_uri = __commonJS({
3638
- "node_modules/.pnpm/fast-uri@3.1.4/node_modules/fast-uri/index.js"(exports, module) {
3638
+ "node_modules/.pnpm/fast-uri@3.1.5/node_modules/fast-uri/index.js"(exports, module) {
3639
3639
  "use strict";
3640
3640
  var { normalizeIPv6, removeDotSegments, recomposeAuthority, normalizePercentEncoding, normalizePathEncoding, escapePreservingEscapes, reescapeHostDelimiters, isIPv4, nonSimpleDomain } = require_utils();
3641
3641
  var { SCHEMES, getSchemeHandler } = require_schemes();
@@ -3651,7 +3651,12 @@ var require_fast_uri = __commonJS({
3651
3651
  }
3652
3652
  function resolve2(baseURI, relativeURI, options) {
3653
3653
  const schemelessOptions = options ? Object.assign({ scheme: "null" }, options) : { scheme: "null" };
3654
- const resolved = resolveComponent(parse3(baseURI, schemelessOptions), parse3(relativeURI, schemelessOptions), schemelessOptions, true);
3654
+ const { parsed: baseParsed, malformedAuthorityOrPort: baseMalformed } = parseWithStatus(baseURI, schemelessOptions);
3655
+ const { parsed: relativeParsed, malformedAuthorityOrPort: relativeMalformed } = parseWithStatus(relativeURI, schemelessOptions);
3656
+ if (baseMalformed || relativeMalformed) {
3657
+ throw new Error(baseParsed.error || relativeParsed.error || "URI is malformed.");
3658
+ }
3659
+ const resolved = resolveComponent(baseParsed, relativeParsed, schemelessOptions, true);
3655
3660
  schemelessOptions.skipEscape = true;
3656
3661
  return serialize(resolved, schemelessOptions);
3657
3662
  }
@@ -3777,6 +3782,7 @@ var require_fast_uri = __commonJS({
3777
3782
  }
3778
3783
  var URI_PARSE = /^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u;
3779
3784
  var AUTHORITY_PREFIX = /^(?:[^#/:?]+:)?\/\/([^/?#]*)/;
3785
+ var AUTHORITY_INTRODUCER_REGION = /^(?:[^#/:?]+:)?([/\\\t\n\r]*)/;
3780
3786
  function getParseError(parsed, matches) {
3781
3787
  if (matches[2] !== void 0 && parsed.path && parsed.path[0] !== "/") {
3782
3788
  return 'URI path must start with "/" when authority is present.';
@@ -3811,6 +3817,20 @@ var require_fast_uri = __commonJS({
3811
3817
  parsed.error = "URI authority must not contain a literal backslash.";
3812
3818
  malformedAuthorityOrPort = true;
3813
3819
  }
3820
+ const introducerMatch = uri.match(AUTHORITY_INTRODUCER_REGION);
3821
+ if (introducerMatch !== null) {
3822
+ const region = introducerMatch[1];
3823
+ const normalizedRegion = region.replace(/[\t\n\r]/g, "");
3824
+ if (normalizedRegion.length >= 2) {
3825
+ if (normalizedRegion.slice(0, 2) !== "//") {
3826
+ parsed.error = parsed.error || "URI authority must not contain a literal backslash.";
3827
+ malformedAuthorityOrPort = true;
3828
+ } else if (region.length !== normalizedRegion.length) {
3829
+ parsed.error = parsed.error || "URI authority introducer must not contain whitespace.";
3830
+ malformedAuthorityOrPort = true;
3831
+ }
3832
+ }
3833
+ }
3814
3834
  const matches = uri.match(URI_PARSE);
3815
3835
  if (matches) {
3816
3836
  parsed.scheme = matches[1];
@@ -32099,7 +32119,7 @@ function object(shape, params) {
32099
32119
  return new ZodMiniObject(def);
32100
32120
  }
32101
32121
 
32102
- // node_modules/.pnpm/@modelcontextprotocol+sdk@1.29.0_zod@3.25.76/node_modules/@modelcontextprotocol/sdk/dist/esm/server/zod-compat.js
32122
+ // node_modules/.pnpm/@modelcontextprotocol+sdk@1.30.0_zod@3.25.76/node_modules/@modelcontextprotocol/sdk/dist/esm/server/zod-compat.js
32103
32123
  function isZ4Schema(s) {
32104
32124
  const schema = s;
32105
32125
  return !!schema._zod;
@@ -32183,17 +32203,33 @@ function normalizeObjectSchema(schema) {
32183
32203
  }
32184
32204
  return void 0;
32185
32205
  }
32206
+ function getDotPath(path4) {
32207
+ if (path4.length === 0) {
32208
+ return "object root";
32209
+ }
32210
+ return path4.reduce((acc, seg, index) => {
32211
+ if (index === 0) {
32212
+ return String(seg);
32213
+ }
32214
+ if (typeof seg === "number") {
32215
+ return `${acc}[${seg}]`;
32216
+ }
32217
+ return `${acc}.${seg}`;
32218
+ }, "");
32219
+ }
32186
32220
  function getParseErrorMessage(error2) {
32187
32221
  if (error2 && typeof error2 === "object") {
32222
+ if ("issues" in error2 && Array.isArray(error2.issues) && error2.issues.length > 0) {
32223
+ return error2.issues.map((i) => {
32224
+ if (!i.path?.length) {
32225
+ return i.message;
32226
+ }
32227
+ return `${i.message} at ${getDotPath(i.path)}`;
32228
+ }).join("\n");
32229
+ }
32188
32230
  if ("message" in error2 && typeof error2.message === "string") {
32189
32231
  return error2.message;
32190
32232
  }
32191
- if ("issues" in error2 && Array.isArray(error2.issues) && error2.issues.length > 0) {
32192
- const firstIssue = error2.issues[0];
32193
- if (firstIssue && typeof firstIssue === "object" && "message" in firstIssue) {
32194
- return String(firstIssue.message);
32195
- }
32196
- }
32197
32233
  try {
32198
32234
  return JSON.stringify(error2);
32199
32235
  } catch {
@@ -32938,7 +32974,7 @@ function preprocess(fn, schema) {
32938
32974
  // node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/classic/external.js
32939
32975
  config(en_default2());
32940
32976
 
32941
- // node_modules/.pnpm/@modelcontextprotocol+sdk@1.29.0_zod@3.25.76/node_modules/@modelcontextprotocol/sdk/dist/esm/types.js
32977
+ // node_modules/.pnpm/@modelcontextprotocol+sdk@1.30.0_zod@3.25.76/node_modules/@modelcontextprotocol/sdk/dist/esm/types.js
32942
32978
  var LATEST_PROTOCOL_VERSION = "2025-11-25";
32943
32979
  var SUPPORTED_PROTOCOL_VERSIONS = [LATEST_PROTOCOL_VERSION, "2025-06-18", "2025-03-26", "2024-11-05", "2024-10-07"];
32944
32980
  var RELATED_TASK_META_KEY = "io.modelcontextprotocol/related-task";
@@ -34469,7 +34505,7 @@ var UrlElicitationRequiredError = class extends McpError {
34469
34505
  }
34470
34506
  };
34471
34507
 
34472
- // node_modules/.pnpm/@modelcontextprotocol+sdk@1.29.0_zod@3.25.76/node_modules/@modelcontextprotocol/sdk/dist/esm/experimental/tasks/interfaces.js
34508
+ // node_modules/.pnpm/@modelcontextprotocol+sdk@1.30.0_zod@3.25.76/node_modules/@modelcontextprotocol/sdk/dist/esm/experimental/tasks/interfaces.js
34473
34509
  function isTerminal(status) {
34474
34510
  return status === "completed" || status === "failed" || status === "cancelled";
34475
34511
  }
@@ -35758,7 +35794,7 @@ var zodToJsonSchema = (schema, options) => {
35758
35794
  return combined;
35759
35795
  };
35760
35796
 
35761
- // node_modules/.pnpm/@modelcontextprotocol+sdk@1.29.0_zod@3.25.76/node_modules/@modelcontextprotocol/sdk/dist/esm/server/zod-json-schema-compat.js
35797
+ // node_modules/.pnpm/@modelcontextprotocol+sdk@1.30.0_zod@3.25.76/node_modules/@modelcontextprotocol/sdk/dist/esm/server/zod-json-schema-compat.js
35762
35798
  function mapMiniTarget(t) {
35763
35799
  if (!t)
35764
35800
  return "draft-7";
@@ -35800,7 +35836,7 @@ function parseWithCompat(schema, data) {
35800
35836
  return result.data;
35801
35837
  }
35802
35838
 
35803
- // node_modules/.pnpm/@modelcontextprotocol+sdk@1.29.0_zod@3.25.76/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/protocol.js
35839
+ // node_modules/.pnpm/@modelcontextprotocol+sdk@1.30.0_zod@3.25.76/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/protocol.js
35804
35840
  var DEFAULT_REQUEST_TIMEOUT_MSEC = 6e4;
35805
35841
  var Protocol = class {
35806
35842
  constructor(_options) {
@@ -36754,7 +36790,7 @@ function mergeCapabilities(base, additional) {
36754
36790
  return result;
36755
36791
  }
36756
36792
 
36757
- // node_modules/.pnpm/@modelcontextprotocol+sdk@1.29.0_zod@3.25.76/node_modules/@modelcontextprotocol/sdk/dist/esm/validation/ajv-provider.js
36793
+ // node_modules/.pnpm/@modelcontextprotocol+sdk@1.30.0_zod@3.25.76/node_modules/@modelcontextprotocol/sdk/dist/esm/validation/ajv-provider.js
36758
36794
  var import_ajv = __toESM(require_ajv(), 1);
36759
36795
  var import_ajv_formats = __toESM(require_dist(), 1);
36760
36796
  function createDefaultAjvInstance() {
@@ -36822,7 +36858,7 @@ var AjvJsonSchemaValidator = class {
36822
36858
  }
36823
36859
  };
36824
36860
 
36825
- // node_modules/.pnpm/@modelcontextprotocol+sdk@1.29.0_zod@3.25.76/node_modules/@modelcontextprotocol/sdk/dist/esm/experimental/tasks/server.js
36861
+ // node_modules/.pnpm/@modelcontextprotocol+sdk@1.30.0_zod@3.25.76/node_modules/@modelcontextprotocol/sdk/dist/esm/experimental/tasks/server.js
36826
36862
  var ExperimentalServerTasks = class {
36827
36863
  constructor(_server) {
36828
36864
  this._server = _server;
@@ -37035,7 +37071,7 @@ var ExperimentalServerTasks = class {
37035
37071
  }
37036
37072
  };
37037
37073
 
37038
- // node_modules/.pnpm/@modelcontextprotocol+sdk@1.29.0_zod@3.25.76/node_modules/@modelcontextprotocol/sdk/dist/esm/experimental/tasks/helpers.js
37074
+ // node_modules/.pnpm/@modelcontextprotocol+sdk@1.30.0_zod@3.25.76/node_modules/@modelcontextprotocol/sdk/dist/esm/experimental/tasks/helpers.js
37039
37075
  function assertToolsCallTaskCapability(requests, method, entityName) {
37040
37076
  if (!requests) {
37041
37077
  throw new Error(`${entityName} does not support task creation (required for ${method})`);
@@ -37070,7 +37106,7 @@ function assertClientRequestTaskCapability(requests, method, entityName) {
37070
37106
  }
37071
37107
  }
37072
37108
 
37073
- // node_modules/.pnpm/@modelcontextprotocol+sdk@1.29.0_zod@3.25.76/node_modules/@modelcontextprotocol/sdk/dist/esm/server/index.js
37109
+ // node_modules/.pnpm/@modelcontextprotocol+sdk@1.30.0_zod@3.25.76/node_modules/@modelcontextprotocol/sdk/dist/esm/server/index.js
37074
37110
  var Server = class extends Protocol {
37075
37111
  /**
37076
37112
  * Initializes this server with the given name and version information.
@@ -37136,16 +37172,7 @@ var Server = class extends Protocol {
37136
37172
  if (!methodSchema) {
37137
37173
  throw new Error("Schema is missing a method literal");
37138
37174
  }
37139
- let methodValue;
37140
- if (isZ4Schema(methodSchema)) {
37141
- const v4Schema = methodSchema;
37142
- const v4Def = v4Schema._zod?.def;
37143
- methodValue = v4Def?.value ?? v4Schema.value;
37144
- } else {
37145
- const v3Schema = methodSchema;
37146
- const legacyDef = v3Schema._def;
37147
- methodValue = legacyDef?.value ?? v3Schema.value;
37148
- }
37175
+ const methodValue = getLiteralValue(methodSchema);
37149
37176
  if (typeof methodValue !== "string") {
37150
37177
  throw new Error("Schema method literal must be a string");
37151
37178
  }
@@ -37450,7 +37477,7 @@ var Server = class extends Protocol {
37450
37477
  }
37451
37478
  };
37452
37479
 
37453
- // node_modules/.pnpm/@modelcontextprotocol+sdk@1.29.0_zod@3.25.76/node_modules/@modelcontextprotocol/sdk/dist/esm/server/completable.js
37480
+ // node_modules/.pnpm/@modelcontextprotocol+sdk@1.30.0_zod@3.25.76/node_modules/@modelcontextprotocol/sdk/dist/esm/server/completable.js
37454
37481
  var COMPLETABLE_SYMBOL = /* @__PURE__ */ Symbol.for("mcp.completable");
37455
37482
  function isCompletable(schema) {
37456
37483
  return !!schema && typeof schema === "object" && COMPLETABLE_SYMBOL in schema;
@@ -37464,7 +37491,7 @@ var McpZodTypeKind;
37464
37491
  McpZodTypeKind2["Completable"] = "McpCompletable";
37465
37492
  })(McpZodTypeKind || (McpZodTypeKind = {}));
37466
37493
 
37467
- // node_modules/.pnpm/@modelcontextprotocol+sdk@1.29.0_zod@3.25.76/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/uriTemplate.js
37494
+ // node_modules/.pnpm/@modelcontextprotocol+sdk@1.30.0_zod@3.25.76/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/uriTemplate.js
37468
37495
  var MAX_TEMPLATE_LENGTH = 1e6;
37469
37496
  var MAX_VARIABLE_LENGTH = 1e6;
37470
37497
  var MAX_TEMPLATE_EXPRESSIONS = 1e4;
@@ -37686,7 +37713,7 @@ var UriTemplate = class _UriTemplate {
37686
37713
  }
37687
37714
  };
37688
37715
 
37689
- // node_modules/.pnpm/@modelcontextprotocol+sdk@1.29.0_zod@3.25.76/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/toolNameValidation.js
37716
+ // node_modules/.pnpm/@modelcontextprotocol+sdk@1.30.0_zod@3.25.76/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/toolNameValidation.js
37690
37717
  var TOOL_NAME_REGEX = /^[A-Za-z0-9._-]{1,128}$/;
37691
37718
  function validateToolName(name) {
37692
37719
  const warnings = [];
@@ -37744,7 +37771,7 @@ function validateAndWarnToolName(name) {
37744
37771
  return result.isValid;
37745
37772
  }
37746
37773
 
37747
- // node_modules/.pnpm/@modelcontextprotocol+sdk@1.29.0_zod@3.25.76/node_modules/@modelcontextprotocol/sdk/dist/esm/experimental/tasks/mcp-server.js
37774
+ // node_modules/.pnpm/@modelcontextprotocol+sdk@1.30.0_zod@3.25.76/node_modules/@modelcontextprotocol/sdk/dist/esm/experimental/tasks/mcp-server.js
37748
37775
  var ExperimentalMcpServerTasks = class {
37749
37776
  constructor(_mcpServer) {
37750
37777
  this._mcpServer = _mcpServer;
@@ -37759,7 +37786,7 @@ var ExperimentalMcpServerTasks = class {
37759
37786
  }
37760
37787
  };
37761
37788
 
37762
- // node_modules/.pnpm/@modelcontextprotocol+sdk@1.29.0_zod@3.25.76/node_modules/@modelcontextprotocol/sdk/dist/esm/server/mcp.js
37789
+ // node_modules/.pnpm/@modelcontextprotocol+sdk@1.30.0_zod@3.25.76/node_modules/@modelcontextprotocol/sdk/dist/esm/server/mcp.js
37763
37790
  var McpServer = class {
37764
37791
  constructor(serverInfo, options) {
37765
37792
  this._registeredResources = {};
@@ -38575,12 +38602,21 @@ var EMPTY_COMPLETION_RESULT = {
38575
38602
  }
38576
38603
  };
38577
38604
 
38578
- // node_modules/.pnpm/@modelcontextprotocol+sdk@1.29.0_zod@3.25.76/node_modules/@modelcontextprotocol/sdk/dist/esm/server/stdio.js
38605
+ // node_modules/.pnpm/@modelcontextprotocol+sdk@1.30.0_zod@3.25.76/node_modules/@modelcontextprotocol/sdk/dist/esm/server/stdio.js
38579
38606
  import process2 from "node:process";
38580
38607
 
38581
- // node_modules/.pnpm/@modelcontextprotocol+sdk@1.29.0_zod@3.25.76/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/stdio.js
38608
+ // node_modules/.pnpm/@modelcontextprotocol+sdk@1.30.0_zod@3.25.76/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/stdio.js
38609
+ var STDIO_DEFAULT_MAX_BUFFER_SIZE = 10 * 1024 * 1024;
38582
38610
  var ReadBuffer = class {
38611
+ constructor(options) {
38612
+ this._maxBufferSize = options?.maxBufferSize ?? STDIO_DEFAULT_MAX_BUFFER_SIZE;
38613
+ }
38583
38614
  append(chunk) {
38615
+ const newSize = (this._buffer?.length ?? 0) + chunk.length;
38616
+ if (newSize > this._maxBufferSize) {
38617
+ this.clear();
38618
+ throw new Error(`ReadBuffer exceeded maximum size of ${this._maxBufferSize} bytes`);
38619
+ }
38584
38620
  this._buffer = this._buffer ? Buffer.concat([this._buffer, chunk]) : chunk;
38585
38621
  }
38586
38622
  readMessage() {
@@ -38606,20 +38642,26 @@ function serializeMessage(message) {
38606
38642
  return JSON.stringify(message) + "\n";
38607
38643
  }
38608
38644
 
38609
- // node_modules/.pnpm/@modelcontextprotocol+sdk@1.29.0_zod@3.25.76/node_modules/@modelcontextprotocol/sdk/dist/esm/server/stdio.js
38645
+ // node_modules/.pnpm/@modelcontextprotocol+sdk@1.30.0_zod@3.25.76/node_modules/@modelcontextprotocol/sdk/dist/esm/server/stdio.js
38610
38646
  var StdioServerTransport = class {
38611
- constructor(_stdin = process2.stdin, _stdout = process2.stdout) {
38647
+ constructor(_stdin = process2.stdin, _stdout = process2.stdout, options) {
38612
38648
  this._stdin = _stdin;
38613
38649
  this._stdout = _stdout;
38614
- this._readBuffer = new ReadBuffer();
38615
38650
  this._started = false;
38616
38651
  this._ondata = (chunk) => {
38617
- this._readBuffer.append(chunk);
38618
- this.processReadBuffer();
38652
+ try {
38653
+ this._readBuffer.append(chunk);
38654
+ this.processReadBuffer();
38655
+ } catch (error2) {
38656
+ this.onerror?.(error2);
38657
+ this.close().catch(() => {
38658
+ });
38659
+ }
38619
38660
  };
38620
38661
  this._onerror = (error2) => {
38621
38662
  this.onerror?.(error2);
38622
38663
  };
38664
+ this._readBuffer = new ReadBuffer({ maxBufferSize: options?.maxBufferSize });
38623
38665
  }
38624
38666
  /**
38625
38667
  * Starts listening for messages on stdin.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "apple-notes-mcp",
3
- "version": "2.6.13",
3
+ "version": "2.6.15",
4
4
  "description": "MCP server for Apple Notes - create, search, update, and manage notes via Claude and other AI assistants",
5
5
  "type": "module",
6
6
  "main": "build/index.js",