@squirrelnotes.app/mcp 1.31.3 → 1.31.5

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/dist/stdio-handler.js +155 -62
  2. package/package.json +2 -2
@@ -5,11 +5,20 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
5
  var __getOwnPropNames = Object.getOwnPropertyNames;
6
6
  var __getProtoOf = Object.getPrototypeOf;
7
7
  var __hasOwnProp = Object.prototype.hasOwnProperty;
8
- var __esm = (fn, res) => function __init() {
9
- return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
8
+ var __esm = (fn, res, err) => function __init() {
9
+ if (err) throw err[0];
10
+ try {
11
+ return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
12
+ } catch (e) {
13
+ throw err = [e], e;
14
+ }
10
15
  };
11
16
  var __commonJS = (cb, mod) => function __require() {
12
- return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
17
+ try {
18
+ return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
19
+ } catch (e) {
20
+ throw mod = 0, e;
21
+ }
13
22
  };
14
23
  var __export = (target, all) => {
15
24
  for (var name in all)
@@ -81,13 +90,12 @@ function config(newConfig) {
81
90
  Object.assign(globalConfig, newConfig);
82
91
  return globalConfig;
83
92
  }
84
- var NEVER, $brand, $ZodAsyncError, globalConfig;
93
+ var NEVER, $ZodAsyncError, globalConfig;
85
94
  var init_core = __esm({
86
95
  "node_modules/zod/v4/core/core.js"() {
87
96
  NEVER = Object.freeze({
88
97
  status: "aborted"
89
98
  });
90
- $brand = Symbol("zod_brand");
91
99
  $ZodAsyncError = class extends Error {
92
100
  constructor() {
93
101
  super(`Encountered Promise during synchronous parse. Use .parseAsync() instead.`);
@@ -2659,11 +2667,9 @@ var init_locales = __esm({
2659
2667
  function registry() {
2660
2668
  return new $ZodRegistry();
2661
2669
  }
2662
- var $output, $input, $ZodRegistry, globalRegistry;
2670
+ var $ZodRegistry, globalRegistry;
2663
2671
  var init_registries = __esm({
2664
2672
  "node_modules/zod/v4/core/registries.js"() {
2665
- $output = Symbol("ZodOutput");
2666
- $input = Symbol("ZodInput");
2667
2673
  $ZodRegistry = class {
2668
2674
  constructor() {
2669
2675
  this._map = /* @__PURE__ */ new Map();
@@ -4290,10 +4296,10 @@ var init_schemas2 = __esm({
4290
4296
  };
4291
4297
  inst.clone = (def2, params) => clone(inst, def2, params);
4292
4298
  inst.brand = () => inst;
4293
- inst.register = (reg, meta) => {
4299
+ inst.register = ((reg, meta) => {
4294
4300
  reg.add(inst, meta);
4295
4301
  return inst;
4296
- };
4302
+ });
4297
4303
  inst.parse = (data, params) => parse2(inst, data, params, { callee: inst.parse });
4298
4304
  inst.safeParse = (data, params) => safeParse2(inst, data, params);
4299
4305
  inst.parseAsync = async (data, params) => parseAsync2(inst, data, params, { callee: inst.parseAsync });
@@ -10156,7 +10162,7 @@ var init_types2 = __esm({
10156
10162
  ...processCreateParams(params)
10157
10163
  });
10158
10164
  };
10159
- BRAND = Symbol("zod_brand");
10165
+ BRAND = /* @__PURE__ */ Symbol("zod_brand");
10160
10166
  ZodBranded = class extends ZodType2 {
10161
10167
  _parse(input) {
10162
10168
  const { ctx } = this._processInputParams(input);
@@ -10330,14 +10336,14 @@ var init_types2 = __esm({
10330
10336
  onumber = () => numberType().optional();
10331
10337
  oboolean = () => booleanType().optional();
10332
10338
  coerce = {
10333
- string: (arg) => ZodString2.create({ ...arg, coerce: true }),
10334
- number: (arg) => ZodNumber2.create({ ...arg, coerce: true }),
10335
- boolean: (arg) => ZodBoolean2.create({
10339
+ string: ((arg) => ZodString2.create({ ...arg, coerce: true })),
10340
+ number: ((arg) => ZodNumber2.create({ ...arg, coerce: true })),
10341
+ boolean: ((arg) => ZodBoolean2.create({
10336
10342
  ...arg,
10337
10343
  coerce: true
10338
- }),
10339
- bigint: (arg) => ZodBigInt.create({ ...arg, coerce: true }),
10340
- date: (arg) => ZodDate.create({ ...arg, coerce: true })
10344
+ })),
10345
+ bigint: ((arg) => ZodBigInt.create({ ...arg, coerce: true })),
10346
+ date: ((arg) => ZodDate.create({ ...arg, coerce: true }))
10341
10347
  };
10342
10348
  NEVER2 = INVALID;
10343
10349
  }
@@ -10520,10 +10526,10 @@ var init_schemas3 = __esm({
10520
10526
  };
10521
10527
  inst.clone = (_def, params) => clone(inst, _def, params);
10522
10528
  inst.brand = () => inst;
10523
- inst.register = (reg, meta) => {
10529
+ inst.register = ((reg, meta) => {
10524
10530
  reg.add(inst, meta);
10525
10531
  return inst;
10526
- };
10532
+ });
10527
10533
  });
10528
10534
  ZodMiniObject = /* @__PURE__ */ $constructor("ZodMiniObject", (inst, def) => {
10529
10535
  $ZodObject.init(inst, def);
@@ -10742,7 +10748,7 @@ var init_interfaces = __esm({
10742
10748
  var ignoreOverride, defaultOptions, getDefaultOptions;
10743
10749
  var init_Options = __esm({
10744
10750
  "node_modules/zod-to-json-schema/dist/esm/Options.js"() {
10745
- ignoreOverride = Symbol("Let zodToJsonSchema decide on which parser to use");
10751
+ ignoreOverride = /* @__PURE__ */ Symbol("Let zodToJsonSchema decide on which parser to use");
10746
10752
  defaultOptions = {
10747
10753
  name: void 0,
10748
10754
  $refStrategy: "root",
@@ -16393,6 +16399,9 @@ var require_utils = __commonJS({
16393
16399
  "use strict";
16394
16400
  var isUUID = RegExp.prototype.test.bind(/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu);
16395
16401
  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);
16402
+ var isHexPair = RegExp.prototype.test.bind(/^[\da-f]{2}$/iu);
16403
+ var isUnreserved = RegExp.prototype.test.bind(/^[\da-z\-._~]$/iu);
16404
+ var isPathCharacter = RegExp.prototype.test.bind(/^[\da-z\-._~!$&'()*+,;=:@/]$/iu);
16396
16405
  function stringArrayToHexStripped(input) {
16397
16406
  let acc = "";
16398
16407
  let code = 0;
@@ -16585,27 +16594,77 @@ var require_utils = __commonJS({
16585
16594
  }
16586
16595
  return output.join("");
16587
16596
  }
16588
- function normalizeComponentEncoding(component, esc2) {
16589
- const func = esc2 !== true ? escape : unescape;
16590
- if (component.scheme !== void 0) {
16591
- component.scheme = func(component.scheme);
16592
- }
16593
- if (component.userinfo !== void 0) {
16594
- component.userinfo = func(component.userinfo);
16595
- }
16596
- if (component.host !== void 0) {
16597
- component.host = func(component.host);
16597
+ var HOST_DELIMS = { "@": "%40", "/": "%2F", "?": "%3F", "#": "%23", ":": "%3A" };
16598
+ var HOST_DELIM_RE = /[@/?#:]/g;
16599
+ var HOST_DELIM_NO_COLON_RE = /[@/?#]/g;
16600
+ function reescapeHostDelimiters(host, isIP) {
16601
+ const re = isIP ? HOST_DELIM_NO_COLON_RE : HOST_DELIM_RE;
16602
+ re.lastIndex = 0;
16603
+ return host.replace(re, (ch) => HOST_DELIMS[ch]);
16604
+ }
16605
+ function normalizePercentEncoding(input, decodeUnreserved = false) {
16606
+ if (input.indexOf("%") === -1) {
16607
+ return input;
16598
16608
  }
16599
- if (component.path !== void 0) {
16600
- component.path = func(component.path);
16609
+ let output = "";
16610
+ for (let i = 0; i < input.length; i++) {
16611
+ if (input[i] === "%" && i + 2 < input.length) {
16612
+ const hex = input.slice(i + 1, i + 3);
16613
+ if (isHexPair(hex)) {
16614
+ const normalizedHex = hex.toUpperCase();
16615
+ const decoded = String.fromCharCode(parseInt(normalizedHex, 16));
16616
+ if (decodeUnreserved && isUnreserved(decoded)) {
16617
+ output += decoded;
16618
+ } else {
16619
+ output += "%" + normalizedHex;
16620
+ }
16621
+ i += 2;
16622
+ continue;
16623
+ }
16624
+ }
16625
+ output += input[i];
16601
16626
  }
16602
- if (component.query !== void 0) {
16603
- component.query = func(component.query);
16627
+ return output;
16628
+ }
16629
+ function normalizePathEncoding(input) {
16630
+ let output = "";
16631
+ for (let i = 0; i < input.length; i++) {
16632
+ if (input[i] === "%" && i + 2 < input.length) {
16633
+ const hex = input.slice(i + 1, i + 3);
16634
+ if (isHexPair(hex)) {
16635
+ const normalizedHex = hex.toUpperCase();
16636
+ const decoded = String.fromCharCode(parseInt(normalizedHex, 16));
16637
+ if (decoded !== "." && isUnreserved(decoded)) {
16638
+ output += decoded;
16639
+ } else {
16640
+ output += "%" + normalizedHex;
16641
+ }
16642
+ i += 2;
16643
+ continue;
16644
+ }
16645
+ }
16646
+ if (isPathCharacter(input[i])) {
16647
+ output += input[i];
16648
+ } else {
16649
+ output += escape(input[i]);
16650
+ }
16604
16651
  }
16605
- if (component.fragment !== void 0) {
16606
- component.fragment = func(component.fragment);
16652
+ return output;
16653
+ }
16654
+ function escapePreservingEscapes(input) {
16655
+ let output = "";
16656
+ for (let i = 0; i < input.length; i++) {
16657
+ if (input[i] === "%" && i + 2 < input.length) {
16658
+ const hex = input.slice(i + 1, i + 3);
16659
+ if (isHexPair(hex)) {
16660
+ output += "%" + hex.toUpperCase();
16661
+ i += 2;
16662
+ continue;
16663
+ }
16664
+ }
16665
+ output += escape(input[i]);
16607
16666
  }
16608
- return component;
16667
+ return output;
16609
16668
  }
16610
16669
  function recomposeAuthority(component) {
16611
16670
  const uriTokens = [];
@@ -16620,7 +16679,7 @@ var require_utils = __commonJS({
16620
16679
  if (ipV6res.isIPV6 === true) {
16621
16680
  host = `[${ipV6res.escapedHost}]`;
16622
16681
  } else {
16623
- host = component.host;
16682
+ host = reescapeHostDelimiters(host, false);
16624
16683
  }
16625
16684
  }
16626
16685
  uriTokens.push(host);
@@ -16634,7 +16693,10 @@ var require_utils = __commonJS({
16634
16693
  module.exports = {
16635
16694
  nonSimpleDomain,
16636
16695
  recomposeAuthority,
16637
- normalizeComponentEncoding,
16696
+ reescapeHostDelimiters,
16697
+ normalizePercentEncoding,
16698
+ normalizePathEncoding,
16699
+ escapePreservingEscapes,
16638
16700
  removeDotSegments,
16639
16701
  isIPv4,
16640
16702
  isUUID,
@@ -16858,12 +16920,12 @@ var require_schemes = __commonJS({
16858
16920
  var require_fast_uri = __commonJS({
16859
16921
  "node_modules/fast-uri/index.js"(exports, module) {
16860
16922
  "use strict";
16861
- var { normalizeIPv6, removeDotSegments, recomposeAuthority, normalizeComponentEncoding, isIPv4, nonSimpleDomain } = require_utils();
16923
+ var { normalizeIPv6, removeDotSegments, recomposeAuthority, normalizePercentEncoding, normalizePathEncoding, escapePreservingEscapes, reescapeHostDelimiters, isIPv4, nonSimpleDomain } = require_utils();
16862
16924
  var { SCHEMES, getSchemeHandler } = require_schemes();
16863
16925
  function normalize(uri, options) {
16864
16926
  if (typeof uri === "string") {
16865
16927
  uri = /** @type {T} */
16866
- serialize(parse3(uri, options), options);
16928
+ normalizeString(uri, options);
16867
16929
  } else if (typeof uri === "object") {
16868
16930
  uri = /** @type {T} */
16869
16931
  parse3(serialize(uri, options), options);
@@ -16930,19 +16992,9 @@ var require_fast_uri = __commonJS({
16930
16992
  return target;
16931
16993
  }
16932
16994
  function equal(uriA, uriB, options) {
16933
- if (typeof uriA === "string") {
16934
- uriA = unescape(uriA);
16935
- uriA = serialize(normalizeComponentEncoding(parse3(uriA, options), true), { ...options, skipEscape: true });
16936
- } else if (typeof uriA === "object") {
16937
- uriA = serialize(normalizeComponentEncoding(uriA, true), { ...options, skipEscape: true });
16938
- }
16939
- if (typeof uriB === "string") {
16940
- uriB = unescape(uriB);
16941
- uriB = serialize(normalizeComponentEncoding(parse3(uriB, options), true), { ...options, skipEscape: true });
16942
- } else if (typeof uriB === "object") {
16943
- uriB = serialize(normalizeComponentEncoding(uriB, true), { ...options, skipEscape: true });
16944
- }
16945
- return uriA.toLowerCase() === uriB.toLowerCase();
16995
+ const normalizedA = normalizeComparableURI(uriA, options);
16996
+ const normalizedB = normalizeComparableURI(uriB, options);
16997
+ return normalizedA !== void 0 && normalizedB !== void 0 && normalizedA.toLowerCase() === normalizedB.toLowerCase();
16946
16998
  }
16947
16999
  function serialize(cmpts, opts) {
16948
17000
  const component = {
@@ -16967,12 +17019,12 @@ var require_fast_uri = __commonJS({
16967
17019
  if (schemeHandler && schemeHandler.serialize) schemeHandler.serialize(component, options);
16968
17020
  if (component.path !== void 0) {
16969
17021
  if (!options.skipEscape) {
16970
- component.path = escape(component.path);
17022
+ component.path = escapePreservingEscapes(component.path);
16971
17023
  if (component.scheme !== void 0) {
16972
17024
  component.path = component.path.split("%3A").join(":");
16973
17025
  }
16974
17026
  } else {
16975
- component.path = unescape(component.path);
17027
+ component.path = normalizePercentEncoding(component.path);
16976
17028
  }
16977
17029
  }
16978
17030
  if (options.reference !== "suffix" && component.scheme) {
@@ -17007,7 +17059,16 @@ var require_fast_uri = __commonJS({
17007
17059
  return uriTokens.join("");
17008
17060
  }
17009
17061
  var URI_PARSE = /^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u;
17010
- function parse3(uri, opts) {
17062
+ function getParseError(parsed, matches) {
17063
+ if (matches[2] !== void 0 && parsed.path && parsed.path[0] !== "/") {
17064
+ return 'URI path must start with "/" when authority is present.';
17065
+ }
17066
+ if (typeof parsed.port === "number" && (parsed.port < 0 || parsed.port > 65535)) {
17067
+ return "URI port is malformed.";
17068
+ }
17069
+ return void 0;
17070
+ }
17071
+ function parseWithStatus(uri, opts) {
17011
17072
  const options = Object.assign({}, opts);
17012
17073
  const parsed = {
17013
17074
  scheme: void 0,
@@ -17018,6 +17079,7 @@ var require_fast_uri = __commonJS({
17018
17079
  query: void 0,
17019
17080
  fragment: void 0
17020
17081
  };
17082
+ let malformedAuthorityOrPort = false;
17021
17083
  let isIP = false;
17022
17084
  if (options.reference === "suffix") {
17023
17085
  if (options.scheme) {
@@ -17038,6 +17100,11 @@ var require_fast_uri = __commonJS({
17038
17100
  if (isNaN(parsed.port)) {
17039
17101
  parsed.port = matches[5];
17040
17102
  }
17103
+ const parseError = getParseError(parsed, matches);
17104
+ if (parseError !== void 0) {
17105
+ parsed.error = parsed.error || parseError;
17106
+ malformedAuthorityOrPort = true;
17107
+ }
17041
17108
  if (parsed.host) {
17042
17109
  const ipv4result = isIPv4(parsed.host);
17043
17110
  if (ipv4result === false) {
@@ -17076,14 +17143,18 @@ var require_fast_uri = __commonJS({
17076
17143
  parsed.scheme = unescape(parsed.scheme);
17077
17144
  }
17078
17145
  if (parsed.host !== void 0) {
17079
- parsed.host = unescape(parsed.host);
17146
+ parsed.host = reescapeHostDelimiters(unescape(parsed.host), isIP);
17080
17147
  }
17081
17148
  }
17082
17149
  if (parsed.path) {
17083
- parsed.path = escape(unescape(parsed.path));
17150
+ parsed.path = normalizePathEncoding(parsed.path);
17084
17151
  }
17085
17152
  if (parsed.fragment) {
17086
- parsed.fragment = encodeURI(decodeURIComponent(parsed.fragment));
17153
+ try {
17154
+ parsed.fragment = encodeURI(decodeURIComponent(parsed.fragment));
17155
+ } catch {
17156
+ parsed.error = parsed.error || "URI malformed";
17157
+ }
17087
17158
  }
17088
17159
  }
17089
17160
  if (schemeHandler && schemeHandler.parse) {
@@ -17092,7 +17163,29 @@ var require_fast_uri = __commonJS({
17092
17163
  } else {
17093
17164
  parsed.error = parsed.error || "URI can not be parsed.";
17094
17165
  }
17095
- return parsed;
17166
+ return { parsed, malformedAuthorityOrPort };
17167
+ }
17168
+ function parse3(uri, opts) {
17169
+ return parseWithStatus(uri, opts).parsed;
17170
+ }
17171
+ function normalizeString(uri, opts) {
17172
+ return normalizeStringWithStatus(uri, opts).normalized;
17173
+ }
17174
+ function normalizeStringWithStatus(uri, opts) {
17175
+ const { parsed, malformedAuthorityOrPort } = parseWithStatus(uri, opts);
17176
+ return {
17177
+ normalized: malformedAuthorityOrPort ? uri : serialize(parsed, opts),
17178
+ malformedAuthorityOrPort
17179
+ };
17180
+ }
17181
+ function normalizeComparableURI(uri, opts) {
17182
+ if (typeof uri === "string") {
17183
+ const { normalized, malformedAuthorityOrPort } = normalizeStringWithStatus(uri, opts);
17184
+ return malformedAuthorityOrPort ? void 0 : normalized;
17185
+ }
17186
+ if (typeof uri === "object") {
17187
+ return serialize(uri, opts);
17188
+ }
17096
17189
  }
17097
17190
  var fastUri = {
17098
17191
  SCHEMES,
@@ -20819,7 +20912,7 @@ function getCompleter(schema) {
20819
20912
  var COMPLETABLE_SYMBOL, McpZodTypeKind;
20820
20913
  var init_completable = __esm({
20821
20914
  "node_modules/@modelcontextprotocol/sdk/dist/esm/server/completable.js"() {
20822
- COMPLETABLE_SYMBOL = Symbol.for("mcp.completable");
20915
+ COMPLETABLE_SYMBOL = /* @__PURE__ */ Symbol.for("mcp.completable");
20823
20916
  (function(McpZodTypeKind2) {
20824
20917
  McpZodTypeKind2["Completable"] = "McpCompletable";
20825
20918
  })(McpZodTypeKind || (McpZodTypeKind = {}));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@squirrelnotes.app/mcp",
3
- "version": "1.31.3",
3
+ "version": "1.31.5",
4
4
  "description": "MCP stdio CLI for Squirrel Notes — bridges AI agents to the encrypted note-taking API",
5
5
  "type": "module",
6
6
  "bin": {
@@ -29,7 +29,7 @@
29
29
  "@types/aws-lambda": "^8.10.145",
30
30
  "@types/jest": "^30.0.0",
31
31
  "@types/node": "^20.0.0",
32
- "esbuild": "^0.25.0",
32
+ "esbuild": "^0.28.1",
33
33
  "jest": "^29.7.0",
34
34
  "ts-jest": "^29.1.5",
35
35
  "tsx": "^4.21.0",