apple-numbers-mcp 1.1.11 → 1.1.13

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 +55 -11
  2. package/package.json +1 -1
package/build/index.js CHANGED
@@ -3104,9 +3104,9 @@ var require_data = __commonJS({
3104
3104
  }
3105
3105
  });
3106
3106
 
3107
- // node_modules/.pnpm/fast-uri@3.1.4/node_modules/fast-uri/lib/utils.js
3107
+ // node_modules/.pnpm/fast-uri@3.1.5/node_modules/fast-uri/lib/utils.js
3108
3108
  var require_utils = __commonJS({
3109
- "node_modules/.pnpm/fast-uri@3.1.4/node_modules/fast-uri/lib/utils.js"(exports, module) {
3109
+ "node_modules/.pnpm/fast-uri@3.1.5/node_modules/fast-uri/lib/utils.js"(exports, module) {
3110
3110
  "use strict";
3111
3111
  var isUUID = RegExp.prototype.test.bind(/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu);
3112
3112
  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);
@@ -3417,9 +3417,9 @@ var require_utils = __commonJS({
3417
3417
  }
3418
3418
  });
3419
3419
 
3420
- // node_modules/.pnpm/fast-uri@3.1.4/node_modules/fast-uri/lib/schemes.js
3420
+ // node_modules/.pnpm/fast-uri@3.1.5/node_modules/fast-uri/lib/schemes.js
3421
3421
  var require_schemes = __commonJS({
3422
- "node_modules/.pnpm/fast-uri@3.1.4/node_modules/fast-uri/lib/schemes.js"(exports, module) {
3422
+ "node_modules/.pnpm/fast-uri@3.1.5/node_modules/fast-uri/lib/schemes.js"(exports, module) {
3423
3423
  "use strict";
3424
3424
  var { isUUID } = require_utils();
3425
3425
  var URN_REG = /([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu;
@@ -3627,9 +3627,9 @@ var require_schemes = __commonJS({
3627
3627
  }
3628
3628
  });
3629
3629
 
3630
- // node_modules/.pnpm/fast-uri@3.1.4/node_modules/fast-uri/index.js
3630
+ // node_modules/.pnpm/fast-uri@3.1.5/node_modules/fast-uri/index.js
3631
3631
  var require_fast_uri = __commonJS({
3632
- "node_modules/.pnpm/fast-uri@3.1.4/node_modules/fast-uri/index.js"(exports, module) {
3632
+ "node_modules/.pnpm/fast-uri@3.1.5/node_modules/fast-uri/index.js"(exports, module) {
3633
3633
  "use strict";
3634
3634
  var { normalizeIPv6, removeDotSegments, recomposeAuthority, normalizePercentEncoding, normalizePathEncoding, escapePreservingEscapes, reescapeHostDelimiters, isIPv4, nonSimpleDomain } = require_utils();
3635
3635
  var { SCHEMES, getSchemeHandler } = require_schemes();
@@ -3645,7 +3645,12 @@ var require_fast_uri = __commonJS({
3645
3645
  }
3646
3646
  function resolve2(baseURI, relativeURI, options) {
3647
3647
  const schemelessOptions = options ? Object.assign({ scheme: "null" }, options) : { scheme: "null" };
3648
- const resolved = resolveComponent(parse4(baseURI, schemelessOptions), parse4(relativeURI, schemelessOptions), schemelessOptions, true);
3648
+ const { parsed: baseParsed, malformedAuthorityOrPort: baseMalformed } = parseWithStatus(baseURI, schemelessOptions);
3649
+ const { parsed: relativeParsed, malformedAuthorityOrPort: relativeMalformed } = parseWithStatus(relativeURI, schemelessOptions);
3650
+ if (baseMalformed || relativeMalformed) {
3651
+ throw new Error(baseParsed.error || relativeParsed.error || "URI is malformed.");
3652
+ }
3653
+ const resolved = resolveComponent(baseParsed, relativeParsed, schemelessOptions, true);
3649
3654
  schemelessOptions.skipEscape = true;
3650
3655
  return serialize(resolved, schemelessOptions);
3651
3656
  }
@@ -3771,6 +3776,7 @@ var require_fast_uri = __commonJS({
3771
3776
  }
3772
3777
  var URI_PARSE = /^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u;
3773
3778
  var AUTHORITY_PREFIX = /^(?:[^#/:?]+:)?\/\/([^/?#]*)/;
3779
+ var AUTHORITY_INTRODUCER_REGION = /^(?:[^#/:?]+:)?([/\\\t\n\r]*)/;
3774
3780
  function getParseError(parsed, matches) {
3775
3781
  if (matches[2] !== void 0 && parsed.path && parsed.path[0] !== "/") {
3776
3782
  return 'URI path must start with "/" when authority is present.';
@@ -3805,6 +3811,20 @@ var require_fast_uri = __commonJS({
3805
3811
  parsed.error = "URI authority must not contain a literal backslash.";
3806
3812
  malformedAuthorityOrPort = true;
3807
3813
  }
3814
+ const introducerMatch = uri.match(AUTHORITY_INTRODUCER_REGION);
3815
+ if (introducerMatch !== null) {
3816
+ const region = introducerMatch[1];
3817
+ const normalizedRegion = region.replace(/[\t\n\r]/g, "");
3818
+ if (normalizedRegion.length >= 2) {
3819
+ if (normalizedRegion.slice(0, 2) !== "//") {
3820
+ parsed.error = parsed.error || "URI authority must not contain a literal backslash.";
3821
+ malformedAuthorityOrPort = true;
3822
+ } else if (region.length !== normalizedRegion.length) {
3823
+ parsed.error = parsed.error || "URI authority introducer must not contain whitespace.";
3824
+ malformedAuthorityOrPort = true;
3825
+ }
3826
+ }
3827
+ }
3808
3828
  const matches = uri.match(URI_PARSE);
3809
3829
  if (matches) {
3810
3830
  parsed.scheme = matches[1];
@@ -22096,8 +22116,32 @@ function withErrorHandling(handler, prefix) {
22096
22116
  }
22097
22117
 
22098
22118
  // src/tools/doctor.ts
22119
+ import { execFileSync as execFileSync3 } from "node:child_process";
22099
22120
  import { existsSync as existsSync3 } from "node:fs";
22100
- var NUMBERS_APP_PATHS = ["/Applications/Numbers.app", "/System/Applications/Numbers.app"];
22121
+ var NUMBERS_APP_PATHS = [
22122
+ "/Applications/Numbers.app",
22123
+ "/System/Applications/Numbers.app",
22124
+ "/Applications/Numbers Creator Studio.app",
22125
+ "/System/Applications/Numbers Creator Studio.app"
22126
+ ];
22127
+ var NUMBERS_BUNDLE_IDS = ["com.apple.Numbers", "com.apple.iWork.Numbers"];
22128
+ function findNumbersApp() {
22129
+ const byPath = NUMBERS_APP_PATHS.find((p) => existsSync3(p));
22130
+ if (byPath) return byPath;
22131
+ for (const id of NUMBERS_BUNDLE_IDS) {
22132
+ try {
22133
+ const out = execFileSync3(
22134
+ "osascript",
22135
+ ["-e", `POSIX path of (path to application id "${id}")`],
22136
+ { encoding: "utf8", timeout: 5e3, stdio: ["ignore", "pipe", "ignore"] }
22137
+ ).trim();
22138
+ const path = out.endsWith("/") ? out.slice(0, -1) : out;
22139
+ if (path && existsSync3(path)) return path;
22140
+ } catch {
22141
+ }
22142
+ }
22143
+ return null;
22144
+ }
22101
22145
  function runDoctor(_manager) {
22102
22146
  const checks = [];
22103
22147
  try {
@@ -22139,18 +22183,18 @@ function runDoctor(_manager) {
22139
22183
  });
22140
22184
  }
22141
22185
  try {
22142
- const found = NUMBERS_APP_PATHS.find((p) => existsSync3(p));
22186
+ const found = findNumbersApp();
22143
22187
  if (found) {
22144
22188
  checks.push({
22145
22189
  name: "numbers_app",
22146
22190
  status: "ok",
22147
- detail: `Numbers.app present \u2014 formula and formatting tools available (${found})`
22191
+ detail: `Numbers present \u2014 formula and formatting tools available (${found})`
22148
22192
  });
22149
22193
  } else {
22150
22194
  checks.push({
22151
22195
  name: "numbers_app",
22152
22196
  status: "warn",
22153
- detail: "Numbers.app not found. Reads, exports and value/structure writes via numbers-parser still work; only the formula and formatting tools (set-formula(s), set-cell(s)-style, set-column-width/set-row-height, merge-cells/unmerge-cells) need Numbers.app installed."
22197
+ detail: "Numbers not found. Reads, exports and value/structure writes via numbers-parser still work; only the formula and formatting tools (set-formula(s), set-cell(s)-style, set-column-width/set-row-height, merge-cells/unmerge-cells) need Numbers installed."
22154
22198
  });
22155
22199
  }
22156
22200
  } catch (e) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "apple-numbers-mcp",
3
- "version": "1.1.11",
3
+ "version": "1.1.13",
4
4
  "description": "MCP server for Apple Numbers - read, write, search, and format .numbers spreadsheets via Claude and other AI assistants",
5
5
  "type": "module",
6
6
  "main": "build/index.js",