@laylzj777/my-apple-apple-eventkit 1.1.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/CHANGELOG.md +575 -0
- package/LICENSE +21 -0
- package/README.md +304 -0
- package/README.zh-CN.md +270 -0
- package/bin/event +0 -0
- package/bin/event-disclaim +0 -0
- package/dist/bin/apple-calendar.d.ts +6 -0
- package/dist/bin/apple-calendar.js +8 -0
- package/dist/bin/apple-calendar.js.map +1 -0
- package/dist/bin/apple-reminders.d.ts +7 -0
- package/dist/bin/apple-reminders.js +9 -0
- package/dist/bin/apple-reminders.js.map +1 -0
- package/dist/bootstrap.d.ts +11 -0
- package/dist/bootstrap.js +44 -0
- package/dist/bootstrap.js.map +1 -0
- package/dist/index.d.ts +10 -0
- package/dist/index.js +12 -0
- package/dist/index.js.map +1 -0
- package/dist/server/handlers.d.ts +12 -0
- package/dist/server/handlers.js +58 -0
- package/dist/server/handlers.js.map +1 -0
- package/dist/server/mode.d.ts +19 -0
- package/dist/server/mode.js +47 -0
- package/dist/server/mode.js.map +1 -0
- package/dist/server/promptAbstractions.d.ts +61 -0
- package/dist/server/promptAbstractions.js +140 -0
- package/dist/server/promptAbstractions.js.map +1 -0
- package/dist/server/prompts.d.ts +13 -0
- package/dist/server/prompts.js +461 -0
- package/dist/server/prompts.js.map +1 -0
- package/dist/server/server.d.ts +61 -0
- package/dist/server/server.js +112 -0
- package/dist/server/server.js.map +1 -0
- package/dist/tools/definitions.d.ts +9 -0
- package/dist/tools/definitions.js +272 -0
- package/dist/tools/definitions.js.map +1 -0
- package/dist/tools/handlers/calendarHandlers.d.ts +11 -0
- package/dist/tools/handlers/calendarHandlers.js +151 -0
- package/dist/tools/handlers/calendarHandlers.js.map +1 -0
- package/dist/tools/handlers/formatters.d.ts +24 -0
- package/dist/tools/handlers/formatters.js +105 -0
- package/dist/tools/handlers/formatters.js.map +1 -0
- package/dist/tools/handlers/index.d.ts +8 -0
- package/dist/tools/handlers/index.js +9 -0
- package/dist/tools/handlers/index.js.map +1 -0
- package/dist/tools/handlers/listHandlers.d.ts +10 -0
- package/dist/tools/handlers/listHandlers.js +47 -0
- package/dist/tools/handlers/listHandlers.js.map +1 -0
- package/dist/tools/handlers/reminderHandlers.d.ts +10 -0
- package/dist/tools/handlers/reminderHandlers.js +219 -0
- package/dist/tools/handlers/reminderHandlers.js.map +1 -0
- package/dist/tools/handlers/shared.d.ts +28 -0
- package/dist/tools/handlers/shared.js +57 -0
- package/dist/tools/handlers/shared.js.map +1 -0
- package/dist/tools/handlers/subtaskHandlers.d.ts +12 -0
- package/dist/tools/handlers/subtaskHandlers.js +113 -0
- package/dist/tools/handlers/subtaskHandlers.js.map +1 -0
- package/dist/tools/index.d.ts +10 -0
- package/dist/tools/index.js +74 -0
- package/dist/tools/index.js.map +1 -0
- package/dist/types/index.d.ts +263 -0
- package/dist/types/index.js +42 -0
- package/dist/types/index.js.map +1 -0
- package/dist/types/prompts.d.ts +88 -0
- package/dist/types/prompts.js +6 -0
- package/dist/types/prompts.js.map +1 -0
- package/dist/types/repository.d.ts +197 -0
- package/dist/types/repository.js +14 -0
- package/dist/types/repository.js.map +1 -0
- package/dist/utils/binaryValidator.d.ts +52 -0
- package/dist/utils/binaryValidator.js +185 -0
- package/dist/utils/binaryValidator.js.map +1 -0
- package/dist/utils/calendarRepository.d.ts +49 -0
- package/dist/utils/calendarRepository.js +226 -0
- package/dist/utils/calendarRepository.js.map +1 -0
- package/dist/utils/constants.d.ts +79 -0
- package/dist/utils/constants.js +80 -0
- package/dist/utils/constants.js.map +1 -0
- package/dist/utils/dateFiltering.d.ts +41 -0
- package/dist/utils/dateFiltering.js +129 -0
- package/dist/utils/dateFiltering.js.map +1 -0
- package/dist/utils/dateUtils.d.ts +27 -0
- package/dist/utils/dateUtils.js +71 -0
- package/dist/utils/dateUtils.js.map +1 -0
- package/dist/utils/errorHandling.d.ts +27 -0
- package/dist/utils/errorHandling.js +88 -0
- package/dist/utils/errorHandling.js.map +1 -0
- package/dist/utils/eventCli.d.ts +40 -0
- package/dist/utils/eventCli.js +294 -0
- package/dist/utils/eventCli.js.map +1 -0
- package/dist/utils/helpers.d.ts +35 -0
- package/dist/utils/helpers.js +61 -0
- package/dist/utils/helpers.js.map +1 -0
- package/dist/utils/looseDateParser.d.ts +19 -0
- package/dist/utils/looseDateParser.js +149 -0
- package/dist/utils/looseDateParser.js.map +1 -0
- package/dist/utils/projectUtils.d.ts +13 -0
- package/dist/utils/projectUtils.js +92 -0
- package/dist/utils/projectUtils.js.map +1 -0
- package/dist/utils/reminderDateParser.d.ts +8 -0
- package/dist/utils/reminderDateParser.js +89 -0
- package/dist/utils/reminderDateParser.js.map +1 -0
- package/dist/utils/reminderRepository.d.ts +33 -0
- package/dist/utils/reminderRepository.js +262 -0
- package/dist/utils/reminderRepository.js.map +1 -0
- package/dist/utils/subtaskUtils.d.ts +103 -0
- package/dist/utils/subtaskUtils.js +253 -0
- package/dist/utils/subtaskUtils.js.map +1 -0
- package/dist/utils/tagUtils.d.ts +58 -0
- package/dist/utils/tagUtils.js +177 -0
- package/dist/utils/tagUtils.js.map +1 -0
- package/dist/utils/timeHelpers.d.ts +40 -0
- package/dist/utils/timeHelpers.js +136 -0
- package/dist/utils/timeHelpers.js.map +1 -0
- package/dist/validation/schemas.d.ts +385 -0
- package/dist/validation/schemas.js +579 -0
- package/dist/validation/schemas.js.map +1 -0
- package/package.json +96 -0
- package/scripts/build-event.mjs +513 -0
- package/scripts/disclaim.c +69 -0
- package/scripts/event-Info.plist +29 -0
- package/scripts/event.entitlements +10 -0
- package/scripts/postinstall.mjs +91 -0
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
|
3
|
+
<plist version="1.0">
|
|
4
|
+
<dict>
|
|
5
|
+
<key>CFBundleIdentifier</key>
|
|
6
|
+
<string>io.github.lay777.calendar-event-cli</string>
|
|
7
|
+
<!-- TCC prompt display name ("... would like to access Calendar"). Overridable at build time via APP_EVENT_DISPLAY_NAME, see build-event.mjs. -->
|
|
8
|
+
<key>CFBundleName</key>
|
|
9
|
+
<string>Apple EventKit MCP</string>
|
|
10
|
+
<key>CFBundleDisplayName</key>
|
|
11
|
+
<string>Apple EventKit MCP</string>
|
|
12
|
+
<key>CFBundleInfoDictionaryVersion</key>
|
|
13
|
+
<string>6.0</string>
|
|
14
|
+
<key>CFBundleVersion</key>
|
|
15
|
+
<string>1</string>
|
|
16
|
+
<key>NSRemindersUsageDescription</key>
|
|
17
|
+
<string>This tool needs access to Reminders so it can query and manage your reminders.</string>
|
|
18
|
+
<key>NSRemindersFullAccessUsageDescription</key>
|
|
19
|
+
<string>This tool needs access to Reminders so it can query and manage your reminders.</string>
|
|
20
|
+
<key>NSRemindersWriteOnlyAccessUsageDescription</key>
|
|
21
|
+
<string>This tool needs access to Reminders so it can create reminders for you.</string>
|
|
22
|
+
<key>NSCalendarsUsageDescription</key>
|
|
23
|
+
<string>This tool needs access to Calendar so it can query and manage your events.</string>
|
|
24
|
+
<key>NSCalendarsFullAccessUsageDescription</key>
|
|
25
|
+
<string>This tool needs access to Calendar so it can query and manage your events.</string>
|
|
26
|
+
<key>NSCalendarsWriteOnlyAccessUsageDescription</key>
|
|
27
|
+
<string>This tool needs access to Calendar so it can create events for you.</string>
|
|
28
|
+
</dict>
|
|
29
|
+
</plist>
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
|
3
|
+
<plist version="1.0">
|
|
4
|
+
<dict>
|
|
5
|
+
<key>com.apple.security.personal-information.calendars</key>
|
|
6
|
+
<true/>
|
|
7
|
+
<key>com.apple.security.personal-information.reminders</key>
|
|
8
|
+
<true/>
|
|
9
|
+
</dict>
|
|
10
|
+
</plist>
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Postinstall script for mcp-server-apple-events
|
|
5
|
+
*
|
|
6
|
+
* When the package is installed via npm, the pre-built `event` binary is
|
|
7
|
+
* included in the package and this script exits immediately. No Xcode required.
|
|
8
|
+
*
|
|
9
|
+
* When the repository is cloned locally (no pre-built binary), this script
|
|
10
|
+
* attempts to build the vendored `event` CLI from source. It gracefully skips
|
|
11
|
+
* on non-macOS platforms or if Swift is not available.
|
|
12
|
+
*/
|
|
13
|
+
|
|
14
|
+
import { execFile } from 'node:child_process';
|
|
15
|
+
import { promises as fs } from 'node:fs';
|
|
16
|
+
import path from 'node:path';
|
|
17
|
+
import { fileURLToPath } from 'node:url';
|
|
18
|
+
import { promisify } from 'node:util';
|
|
19
|
+
|
|
20
|
+
const execFileAsync = promisify(execFile);
|
|
21
|
+
|
|
22
|
+
const __dirname = path.dirname(fileURLToPath(import.meta.url));
|
|
23
|
+
const projectRoot = path.resolve(__dirname, '..');
|
|
24
|
+
|
|
25
|
+
async function main() {
|
|
26
|
+
if (process.platform !== 'darwin') {
|
|
27
|
+
console.log('Skipping `event` CLI build on non-macOS platform');
|
|
28
|
+
process.exit(0);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
// If the pre-built binaries are already present (npm install from published
|
|
32
|
+
// package), skip the source build entirely — the npm tarball does not
|
|
33
|
+
// include the vendor/event submodule sources, so there is nothing to
|
|
34
|
+
// build against anyway. Both `event` and the `event-disclaim` TCC shim
|
|
35
|
+
// must exist; a clone with a stale pre-shim build rebuilds to pick up the
|
|
36
|
+
// shim (issue #93).
|
|
37
|
+
const binPath = path.join(projectRoot, 'bin', 'event');
|
|
38
|
+
const disclaimPath = path.join(projectRoot, 'bin', 'event-disclaim');
|
|
39
|
+
try {
|
|
40
|
+
await fs.access(binPath, fs.constants.X_OK);
|
|
41
|
+
await fs.access(disclaimPath, fs.constants.X_OK);
|
|
42
|
+
console.log('Pre-built `event` binaries found, skipping source build.');
|
|
43
|
+
process.exit(0);
|
|
44
|
+
} catch {
|
|
45
|
+
// Binaries not present or not executable — proceed to build from source
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
await buildEvent();
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
// `execFile` (not `exec`) so the install path is passed as a discrete argv
|
|
52
|
+
// entry instead of being interpolated into a shell command. This keeps the
|
|
53
|
+
// build deterministic even when the project lives under a directory that
|
|
54
|
+
// contains spaces, `$`, backticks, or other shell-significant characters.
|
|
55
|
+
async function buildEvent() {
|
|
56
|
+
const buildScript = path.join(projectRoot, 'scripts', 'build-event.mjs');
|
|
57
|
+
const { stdout } = await execFileAsync(process.execPath, [buildScript], {
|
|
58
|
+
cwd: projectRoot,
|
|
59
|
+
});
|
|
60
|
+
if (stdout) {
|
|
61
|
+
console.log(stdout);
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
main()
|
|
66
|
+
.then(() => {
|
|
67
|
+
console.log('`event` CLI built successfully');
|
|
68
|
+
process.exit(0);
|
|
69
|
+
})
|
|
70
|
+
.catch((error) => {
|
|
71
|
+
console.error(`\n${'='.repeat(70)}`);
|
|
72
|
+
console.error('WARNING: `event` CLI build failed');
|
|
73
|
+
console.error('='.repeat(70));
|
|
74
|
+
console.error('\nError details:', error.message);
|
|
75
|
+
console.error(
|
|
76
|
+
'\nThe MCP server requires the bundled `event` binary to function.',
|
|
77
|
+
);
|
|
78
|
+
console.error('\nTo build manually:');
|
|
79
|
+
console.error(' 1. Navigate to the package directory');
|
|
80
|
+
console.error(
|
|
81
|
+
' 2. Initialize the submodule: git submodule update --init --recursive',
|
|
82
|
+
);
|
|
83
|
+
console.error(' 3. Run: pnpm install && pnpm run build');
|
|
84
|
+
console.error('\nOr use a local clone instead of npx:');
|
|
85
|
+
console.error(
|
|
86
|
+
' git clone --recurse-submodules https://github.com/fradser/mcp-server-apple-events.git',
|
|
87
|
+
);
|
|
88
|
+
console.error(' cd mcp-server-apple-events && pnpm install && pnpm build');
|
|
89
|
+
console.error(`${'='.repeat(70)}\n`);
|
|
90
|
+
process.exit(0); // Exit gracefully to not block installation
|
|
91
|
+
});
|