apple-tools-mcp 3.1.0 → 3.2.0

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 CHANGED
@@ -455,3 +455,23 @@ MIT License. See [LICENSE](LICENSE).
455
455
  - [Model Context Protocol SDK](https://github.com/modelcontextprotocol/sdk)
456
456
  - [LanceDB](https://lancedb.com/)
457
457
  - [Hugging Face Transformers.js](https://github.com/huggingface/transformers.js)
458
+
459
+ ### Privacy checks for contributors
460
+
461
+ Install Gitleaks, then enable the committed hook once in each clone:
462
+
463
+ ```sh
464
+ git config core.hooksPath .githooks
465
+ npm run scan:package
466
+ ```
467
+
468
+ The hook scans staged changes and fails closed if Gitleaks is unavailable. CI scans
469
+ all fetched Git history and the exact `npm pack --dry-run` file list. Release CI
470
+ repeats the package scan before npm Trusted Publishing. Credential rules are
471
+ extended with private home paths, relay email, private hostnames and phone shapes.
472
+ Use neutral example paths and fictional 555 numbers in fixtures. A narrow
473
+ exception covers the deliberately fake bearer token in authentication unit tests.
474
+
475
+ Host-specific settings remain in `~/.apple-tools-mcp/config.json`; upgrading the
476
+ global package preserves them. Permission examples derive from the current home
477
+ and runtime Node binary, so no personal paths belong in the package.
@@ -23,7 +23,7 @@ function looksLikePhone(value) {
23
23
  * Build a predicate that matches message rows to a caller-supplied contact.
24
24
  *
25
25
  * Keeps the old raw substring match on sender / chatIdentifier, and adds:
26
- * - phone input matched on normalized digits (605-360-2675 == +16053602675)
26
+ * - phone input matched on normalized digits 202-555-0101 == +12025550101)
27
27
  * - email input matched exactly (case-insensitive)
28
28
  * - a name matched exactly (full name, first name, or nickname) against
29
29
  * Contacts, then every phone and email on those contacts. No fuzzy name
@@ -90,7 +90,7 @@ export function createMessageContactMatcher(contact, { resolveExactName, normali
90
90
  * @param {(phone: string) => object|null} deps.resolvePhone
91
91
  * @param {(email: string) => object|null} deps.resolveEmail
92
92
  * @param {(contact: object) => string} deps.formatContact
93
- * @returns {string|null} e.g. "Dad (+16053602675)", "group chat \"Family\"", or null
93
+ * @returns {string|null} e.g. "Dad (+12025550101)", "group chat \"Family\"", or null
94
94
  */
95
95
  export function describeMessagePeer(row, { resolvePhone, resolveEmail, formatContact }) {
96
96
  const chatIdentifier = row.chatIdentifier || "";
@@ -15,6 +15,7 @@
15
15
  */
16
16
 
17
17
  import fs from "fs";
18
+ import os from "os";
18
19
  import path from "path";
19
20
  import { classifyAppleScriptError, SYSTEM_EVENTS_STICKY_DENY_GUIDANCE } from "./appleScript.js";
20
21
  import { probeMailAutomation, probeSystemEventsAutomation } from "./mailWrite.js";
@@ -26,10 +27,10 @@ import { detectLaunchAgentContext, hostAutomationAdvice } from "./writeRouting.j
26
27
  export const REQUIRED_SURFACES = ["Contacts", "Calendar", "Mail", "Messages", "System Events"];
27
28
 
28
29
  /** Mini ship-gate host example — not a universal path. */
29
- export const EXAMPLE_MINI_NODE = "/Users/petercoates/.local/node/bin/node";
30
+ export const EXAMPLE_MINI_NODE = path.join(os.homedir(), ".local", "node", "bin", "node");
30
31
 
31
- /** MacBook Claude nvm example — not Homebrew. */
32
- export const EXAMPLE_MACBOOK_NVM_NODE = "/Users/petercoates/.nvm/versions/node/v22.21.1/bin/node";
32
+ /** Current runtime binary; follows the selected Node installation on any host. */
33
+ export const EXAMPLE_MACBOOK_NVM_NODE = process.execPath;
33
34
 
34
35
  export const GRANT_GRANTED = "granted";
35
36
  export const GRANT_MISSING = "missing";
@@ -264,7 +265,7 @@ function bannerLines(binary, version) {
264
265
  `Probing node binary: ${binary.execPath}`,
265
266
  "This is process.execPath — the node that is running this command.",
266
267
  `Mini example: ${binary.miniExample}`,
267
- `MacBook example: ${binary.macbookExample} (Claude nvm; not Homebrew)`,
268
+ `Runtime example: ${binary.macbookExample} (current Node installation)`,
268
269
  "Invoke this command with the product node so Allow dialogs attach to it.",
269
270
  "",
270
271
  "Open System Settings → Privacy & Security → Automation on this Mac.",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "apple-tools-mcp",
3
- "version": "3.1.0",
3
+ "version": "3.2.0",
4
4
  "description": "MCP server for semantic search and write actions across Apple Mail, Messages, Calendar, and Contacts. Speaks stdio (local) or bearer-token-authenticated Streamable HTTP (LAN / Tailscale).",
5
5
  "type": "module",
6
6
  "main": "index.js",
@@ -87,7 +87,8 @@
87
87
  "perf:regression": "vitest run tests/perf/regression.perf.test.js",
88
88
  "perf:lancedb": "vitest run tests/perf/lancedb.perf.test.js",
89
89
  "perf:background": "vitest run tests/perf/background-indexing.perf.test.js",
90
- "perf:dates": "vitest run tests/perf/date-parsing.perf.test.js"
90
+ "perf:dates": "vitest run tests/perf/date-parsing.perf.test.js",
91
+ "scan:package": "node scripts/scan-package.js"
91
92
  },
92
93
  "dependencies": {
93
94
  "@huggingface/transformers": "^4.3.0",