@l22-io/orchard-mcp 0.3.2 → 0.6.1
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 +11 -8
- package/build/bridge.d.ts +13 -2
- package/build/bridge.js +140 -23
- package/build/bridge.js.map +1 -1
- package/build/index.js +11 -1
- package/build/index.js.map +1 -1
- package/build/tools/contacts.d.ts +2 -0
- package/build/tools/contacts.js +37 -0
- package/build/tools/contacts.js.map +1 -0
- package/build/tools/files.js +4 -1
- package/build/tools/files.js.map +1 -1
- package/build/tools/keynote.d.ts +2 -0
- package/build/tools/keynote.js +198 -0
- package/build/tools/keynote.js.map +1 -0
- package/build/tools/mail.js +69 -13
- package/build/tools/mail.js.map +1 -1
- package/build/tools/notes.d.ts +2 -0
- package/build/tools/notes.js +83 -0
- package/build/tools/notes.js.map +1 -0
- package/build/tools/numbers.d.ts +2 -0
- package/build/tools/numbers.js +167 -0
- package/build/tools/numbers.js.map +1 -0
- package/build/tools/pages.d.ts +2 -0
- package/build/tools/pages.js +143 -0
- package/build/tools/pages.js.map +1 -0
- package/package.json +12 -9
- package/scripts/postinstall.sh +77 -8
- package/swift/.build/AppleBridge.app/Contents/MacOS/apple-bridge +0 -0
- package/swift/.build/AppleBridge.app.sha256 +1 -0
- package/swift/Package.resolved +14 -0
- package/swift/Package.swift +28 -0
- package/swift/Sources/AppleBridge/AppleBridge.swift +846 -0
- package/swift/Sources/AppleBridge/Calendar.swift +221 -0
- package/swift/Sources/AppleBridge/Contacts.swift +225 -0
- package/swift/Sources/AppleBridge/Doctor.swift +252 -0
- package/swift/Sources/AppleBridge/Files.swift +474 -0
- package/swift/Sources/AppleBridge/JSON.swift +57 -0
- package/swift/Sources/AppleBridge/Keynote.swift +599 -0
- package/swift/Sources/AppleBridge/Mail.swift +854 -0
- package/swift/Sources/AppleBridge/Notes.swift +263 -0
- package/swift/Sources/AppleBridge/Numbers.swift +601 -0
- package/swift/Sources/AppleBridge/Pages.swift +467 -0
- package/swift/Sources/AppleBridge/Reminders.swift +347 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@l22-io/orchard-mcp",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.6.1",
|
|
4
4
|
"description": "MCP server for Apple Calendar, Mail, Reminders, and Files on macOS using native EventKit",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"scripts": {
|
|
21
21
|
"build": "npm run build:swift && npm run build:ts",
|
|
22
22
|
"build:ts": "tsc && chmod 755 build/index.js",
|
|
23
|
-
"build:swift": "cd swift && swift build -c release -Xlinker -sectcreate -Xlinker __TEXT -Xlinker __info_plist -Xlinker Sources/AppleBridge/Info.plist",
|
|
23
|
+
"build:swift": "cd swift && swift build -c release -Xlinker -sectcreate -Xlinker __TEXT -Xlinker __info_plist -Xlinker Sources/AppleBridge/Info.plist && mkdir -p .build/AppleBridge.app/Contents/MacOS && cp .build/release/apple-bridge .build/AppleBridge.app/Contents/MacOS/apple-bridge && cp Sources/AppleBridge/Info.plist .build/AppleBridge.app/Contents/Info.plist && codesign --force --sign - .build/AppleBridge.app",
|
|
24
24
|
"postinstall": "bash scripts/postinstall.sh",
|
|
25
25
|
"prepublishOnly": "npm run build:ts && bash scripts/prepublish.sh",
|
|
26
26
|
"dev": "tsc --watch",
|
|
@@ -33,7 +33,10 @@
|
|
|
33
33
|
"build",
|
|
34
34
|
"scripts/postinstall.sh",
|
|
35
35
|
"swift/.build/AppleBridge.app",
|
|
36
|
-
"swift/
|
|
36
|
+
"swift/.build/AppleBridge.app.sha256",
|
|
37
|
+
"swift/Package.swift",
|
|
38
|
+
"swift/Package.resolved",
|
|
39
|
+
"swift/Sources"
|
|
37
40
|
],
|
|
38
41
|
"os": [
|
|
39
42
|
"darwin"
|
|
@@ -51,15 +54,15 @@
|
|
|
51
54
|
"author": "l22.io GmbH",
|
|
52
55
|
"license": "MIT",
|
|
53
56
|
"engines": {
|
|
54
|
-
"node": ">=
|
|
57
|
+
"node": ">=22.0.0"
|
|
55
58
|
},
|
|
56
59
|
"dependencies": {
|
|
57
|
-
"@modelcontextprotocol/sdk": "^1.
|
|
58
|
-
"zod": "^
|
|
60
|
+
"@modelcontextprotocol/sdk": "^1.29.0",
|
|
61
|
+
"zod": "^4.4.0"
|
|
59
62
|
},
|
|
60
63
|
"devDependencies": {
|
|
61
|
-
"@types/node": "^
|
|
62
|
-
"tsx": "^4.
|
|
63
|
-
"typescript": "^
|
|
64
|
+
"@types/node": "^25.0.0",
|
|
65
|
+
"tsx": "^4.21.0",
|
|
66
|
+
"typescript": "^6.0.0"
|
|
64
67
|
}
|
|
65
68
|
}
|
package/scripts/postinstall.sh
CHANGED
|
@@ -3,19 +3,88 @@ set -e
|
|
|
3
3
|
|
|
4
4
|
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
|
|
5
5
|
PROJECT_ROOT="$(cd "$SCRIPT_DIR/.." && pwd)"
|
|
6
|
-
|
|
6
|
+
SWIFT_DIR="$PROJECT_ROOT/swift"
|
|
7
|
+
APP_BUNDLE="$SWIFT_DIR/.build/AppleBridge.app"
|
|
8
|
+
BRIDGE_BIN="$SWIFT_DIR/.build/release/apple-bridge"
|
|
9
|
+
INFO_PLIST="$SWIFT_DIR/Sources/AppleBridge/Info.plist"
|
|
10
|
+
SHASUM_FILE="$SWIFT_DIR/.build/AppleBridge.app.sha256"
|
|
11
|
+
INNER_BIN="$APP_BUNDLE/Contents/MacOS/apple-bridge"
|
|
7
12
|
|
|
8
|
-
# Skip on non-macOS (shouldn't happen due to os field, but be safe)
|
|
9
13
|
if [ "$(uname)" != "Darwin" ]; then
|
|
10
14
|
echo "[orchard-mcp] macOS required. Skipping postinstall."
|
|
11
15
|
exit 0
|
|
12
16
|
fi
|
|
13
17
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
18
|
+
build_from_source() {
|
|
19
|
+
echo "[orchard-mcp] Swift detected -- building apple-bridge from source."
|
|
20
|
+
(
|
|
21
|
+
cd "$SWIFT_DIR"
|
|
22
|
+
swift build -c release \
|
|
23
|
+
-Xlinker -sectcreate \
|
|
24
|
+
-Xlinker __TEXT \
|
|
25
|
+
-Xlinker __info_plist \
|
|
26
|
+
-Xlinker "$INFO_PLIST"
|
|
27
|
+
)
|
|
28
|
+
mkdir -p "$APP_BUNDLE/Contents/MacOS"
|
|
29
|
+
cp "$BRIDGE_BIN" "$INNER_BIN"
|
|
30
|
+
cp "$INFO_PLIST" "$APP_BUNDLE/Contents/Info.plist"
|
|
17
31
|
codesign --force --sign - "$APP_BUNDLE" 2>/dev/null || true
|
|
18
|
-
echo "[orchard-mcp]
|
|
19
|
-
|
|
20
|
-
|
|
32
|
+
echo "[orchard-mcp] Built from source. Run 'orchard-mcp setup' to configure permissions."
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
verify_prebuilt() {
|
|
36
|
+
# Defence-in-depth for the prebuilt fallback: compare the binary's hash
|
|
37
|
+
# against the shipped manifest. This catches truncated/corrupted tarball
|
|
38
|
+
# extraction but does NOT defend against a coordinated tarball tamper
|
|
39
|
+
# (attacker would update both files). For a real chain of trust, install
|
|
40
|
+
# with `npm install --ignore-scripts` and build from source, or wait for
|
|
41
|
+
# a Developer ID signed release.
|
|
42
|
+
if [ ! -f "$SHASUM_FILE" ]; then
|
|
43
|
+
echo "[orchard-mcp] Warning: no checksum manifest shipped; skipping integrity check."
|
|
44
|
+
return 0
|
|
45
|
+
fi
|
|
46
|
+
if [ ! -f "$INNER_BIN" ]; then
|
|
47
|
+
return 1
|
|
48
|
+
fi
|
|
49
|
+
local expected actual
|
|
50
|
+
expected=$(awk '{print $1}' "$SHASUM_FILE")
|
|
51
|
+
actual=$(shasum -a 256 "$INNER_BIN" | awk '{print $1}')
|
|
52
|
+
if [ "$expected" != "$actual" ]; then
|
|
53
|
+
echo "[orchard-mcp] ERROR: Binary checksum mismatch."
|
|
54
|
+
echo " expected: $expected"
|
|
55
|
+
echo " actual: $actual"
|
|
56
|
+
echo " The prebuilt binary may be corrupted or tampered with."
|
|
57
|
+
echo " Install Xcode Command Line Tools (xcode-select --install)"
|
|
58
|
+
echo " and reinstall to build from source instead."
|
|
59
|
+
return 2
|
|
60
|
+
fi
|
|
61
|
+
echo "[orchard-mcp] Prebuilt binary checksum ok: $actual"
|
|
62
|
+
return 0
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
if command -v swift >/dev/null 2>&1; then
|
|
66
|
+
build_from_source
|
|
67
|
+
exit 0
|
|
21
68
|
fi
|
|
69
|
+
|
|
70
|
+
echo "[orchard-mcp] Swift not available -- using prebuilt binary."
|
|
71
|
+
echo " Install Xcode Command Line Tools for a higher-assurance"
|
|
72
|
+
echo " install that builds apple-bridge locally."
|
|
73
|
+
|
|
74
|
+
if [ ! -d "$APP_BUNDLE" ]; then
|
|
75
|
+
echo "[orchard-mcp] Warning: AppleBridge.app not found and Swift is unavailable."
|
|
76
|
+
echo " Install Xcode Command Line Tools and run 'orchard-mcp setup'."
|
|
77
|
+
exit 0
|
|
78
|
+
fi
|
|
79
|
+
|
|
80
|
+
set +e
|
|
81
|
+
verify_prebuilt
|
|
82
|
+
status=$?
|
|
83
|
+
set -e
|
|
84
|
+
if [ $status -eq 2 ]; then
|
|
85
|
+
exit 1
|
|
86
|
+
fi
|
|
87
|
+
|
|
88
|
+
echo "[orchard-mcp] Codesigning prebuilt AppleBridge.app..."
|
|
89
|
+
codesign --force --sign - "$APP_BUNDLE" 2>/dev/null || true
|
|
90
|
+
echo "[orchard-mcp] Ready. Run 'orchard-mcp setup' to configure permissions."
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
853d524532c723fcd5c9f0c00a5895e3b384653a6d0b3e39c85e655bb4034602 apple-bridge
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
{
|
|
2
|
+
"pins" : [
|
|
3
|
+
{
|
|
4
|
+
"identity" : "swift-argument-parser",
|
|
5
|
+
"kind" : "remoteSourceControl",
|
|
6
|
+
"location" : "https://github.com/apple/swift-argument-parser.git",
|
|
7
|
+
"state" : {
|
|
8
|
+
"revision" : "626b5b7b2f45e1b0b1c6f4a309296d1d21d7311b",
|
|
9
|
+
"version" : "1.7.1"
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
],
|
|
13
|
+
"version" : 2
|
|
14
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
// swift-tools-version: 5.9
|
|
2
|
+
import PackageDescription
|
|
3
|
+
|
|
4
|
+
let package = Package(
|
|
5
|
+
name: "apple-bridge",
|
|
6
|
+
platforms: [
|
|
7
|
+
.macOS(.v14)
|
|
8
|
+
],
|
|
9
|
+
dependencies: [
|
|
10
|
+
.package(url: "https://github.com/apple/swift-argument-parser.git", from: "1.7.1")
|
|
11
|
+
],
|
|
12
|
+
targets: [
|
|
13
|
+
.executableTarget(
|
|
14
|
+
name: "apple-bridge",
|
|
15
|
+
dependencies: [
|
|
16
|
+
.product(name: "ArgumentParser", package: "swift-argument-parser")
|
|
17
|
+
],
|
|
18
|
+
path: "Sources/AppleBridge",
|
|
19
|
+
exclude: ["Info.plist"],
|
|
20
|
+
linkerSettings: [
|
|
21
|
+
.linkedFramework("EventKit"),
|
|
22
|
+
.linkedFramework("Foundation"),
|
|
23
|
+
.linkedFramework("PDFKit"),
|
|
24
|
+
.linkedFramework("Vision")
|
|
25
|
+
]
|
|
26
|
+
)
|
|
27
|
+
]
|
|
28
|
+
)
|