apple-tools-mcp 2.0.2 → 2.0.3
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 +1 -1
- package/bin/apple-tools-indexer.js +15 -0
- package/bin/apple-tools-mcp.js +7 -0
- package/index.js +0 -0
- package/lib/processMode.js +3 -2
- package/package.json +4 -3
package/README.md
CHANGED
|
@@ -317,7 +317,7 @@ The indexer does **not** post product Notification Center / `display notificatio
|
|
|
317
317
|
The bridge is created before the daemon touches the vector index, so writes stay available even when the index is missing, locked, or mid-rebuild. Confirm it after an upgrade with `ls -l ~/.apple-tools-mcp/writer.sock` (it should be a `srw-------` socket); the daemon removes it on shutdown.
|
|
318
318
|
|
|
319
319
|
**Entrypoint:** `node index.js --mode=indexer`
|
|
320
|
-
**Convenience bin:** `apple-tools-indexer` (
|
|
320
|
+
**Convenience bin:** `apple-tools-indexer` (`bin/apple-tools-indexer.js`; npm global install provides it)
|
|
321
321
|
**npm script (clone only):** `npm run indexer`
|
|
322
322
|
**One-shot rebuild:** `npm run build-index` (stop the indexer daemon first)
|
|
323
323
|
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* npm bin for the indexer daemon.
|
|
4
|
+
* Dedicated wrapper so npm 12 pack/publish keeps the CLI — `index.js` as a
|
|
5
|
+
* bin target is rewritten with "script name index.js was invalid and removed".
|
|
6
|
+
* Injects `--mode=indexer` so a realpath to this file still starts the daemon.
|
|
7
|
+
* `permissions` still wins (same contract as the apple-tools-indexer bin name).
|
|
8
|
+
*/
|
|
9
|
+
if (!process.argv.includes('--mode=indexer')) {
|
|
10
|
+
const modeIdx = process.argv.indexOf('--mode');
|
|
11
|
+
if (modeIdx === -1 || process.argv[modeIdx + 1] !== 'indexer') {
|
|
12
|
+
process.argv.splice(2, 0, '--mode=indexer');
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
await import('../index.js');
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* npm bin for the MCP stdio server (and `permissions` subcommand).
|
|
4
|
+
* Dedicated wrapper so npm 12 pack/publish keeps the CLI — `index.js` as a
|
|
5
|
+
* bin target is rewritten with "script name index.js was invalid and removed".
|
|
6
|
+
*/
|
|
7
|
+
import '../index.js';
|
package/index.js
CHANGED
|
File without changes
|
package/lib/processMode.js
CHANGED
|
@@ -2,7 +2,8 @@
|
|
|
2
2
|
* Process mode detection for apple-tools-mcp.
|
|
3
3
|
*
|
|
4
4
|
* Canonical indexer entrypoint: `node index.js --mode=indexer`
|
|
5
|
-
* Convenience bin: `apple-tools-indexer` (
|
|
5
|
+
* Convenience bin: `apple-tools-indexer` (`bin/apple-tools-indexer.js`;
|
|
6
|
+
* detected via argv[1] or `--mode=indexer`).
|
|
6
7
|
* Permissions CLI: `apple-tools-mcp permissions` / `--mode=permissions`.
|
|
7
8
|
* MCP stdio remains the default when neither is present.
|
|
8
9
|
*/
|
|
@@ -71,5 +72,5 @@ export function isIndexerMode(argv = process.argv) {
|
|
|
71
72
|
return true;
|
|
72
73
|
}
|
|
73
74
|
const entry = argv[1] ? path.basename(argv[1]) : "";
|
|
74
|
-
return entry === "apple-tools-indexer";
|
|
75
|
+
return entry === "apple-tools-indexer" || entry === "apple-tools-indexer.js";
|
|
75
76
|
}
|
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "apple-tools-mcp",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.3",
|
|
4
4
|
"description": "MCP server for semantic search and write actions across Apple Mail, Messages, Calendar, and Contacts",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "index.js",
|
|
7
7
|
"bin": {
|
|
8
|
-
"apple-tools-mcp": "
|
|
9
|
-
"apple-tools-indexer": "
|
|
8
|
+
"apple-tools-mcp": "bin/apple-tools-mcp.js",
|
|
9
|
+
"apple-tools-indexer": "bin/apple-tools-indexer.js"
|
|
10
10
|
},
|
|
11
11
|
"author": "Peter Coates",
|
|
12
12
|
"license": "MIT",
|
|
@@ -45,6 +45,7 @@
|
|
|
45
45
|
"search.js",
|
|
46
46
|
"contacts.js",
|
|
47
47
|
"lib/",
|
|
48
|
+
"bin/",
|
|
48
49
|
"scripts/audit-index.js",
|
|
49
50
|
"scripts/smoke-writes.js",
|
|
50
51
|
"scripts/postinstall.js",
|