@mgcrea/mcp-apple-reminders 1.16.0 → 1.17.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/dist/cli.js CHANGED
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { M as BUILD_INFO, O as REMINDERS_SURFACE, a as loadConfig, r as createServer } from "./server-Bh2cmilP.js";
2
+ import { M as BUILD_INFO, T as REMINDERS_SURFACE, a as loadConfig, r as createServer } from "./server-vInIf1hF.js";
3
3
  import { runStdioServer } from "@mgcrea/mcp-apple-core";
4
4
  //#region src/cli.ts
5
5
  const LOG_PREFIX = "apple-reminders-mcp";
package/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { AppBusyError as RemindersBusyError, AppNotRunningError as RemindersNotRunningError, AppleAutomationError, AppleAutomationError as AppleRemindersError, BuildInfo, Logger, OsascriptRunner, ReadOnlyMode, StoreFacts, SurfaceContext } from "@mgcrea/mcp-apple-core";
1
+ import { AppBusyError as RemindersBusyError, AppNotRunningError as RemindersNotRunningError, AppleAutomationError, AppleAutomationError as AppleRemindersError, BuildInfo, DateKind, InvalidDateError, Logger, OsascriptRunner, ParsedDate, ReadOnlyMode, StoreFacts, SurfaceContext, parseBound, parseDate, toLocalIso } from "@mgcrea/mcp-apple-core";
2
2
  import { z } from "zod";
3
3
  import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
4
4
  import { DatabaseSync } from "node:sqlite";
@@ -6,99 +6,8 @@ import { DatabaseSync } from "node:sqlite";
6
6
  declare const BUILD_INFO: BuildInfo;
7
7
  //#endregion
8
8
  //#region src/client/dates.d.ts
9
- /**
10
- * Date parsing for the Reminders tools.
11
- *
12
- * ## Why this module exists at all
13
- *
14
- * The scripting dictionary carries two separate due-date properties:
15
- *
16
- * due date "will set both date and time"
17
- * allday due date "will only set a date"
18
- *
19
- * So the *shape of the input* has to pick the property. A caller that writes
20
- * "2026-08-20" means a day; one that writes "2026-08-20T09:00" means an instant.
21
- * Collapsing those into one field is how a reminder ends up silently due at
22
- * midnight, which Reminders then renders as an all-day item anyway — the bug is
23
- * invisible until someone misses something.
24
- *
25
- * ## The rule
26
- *
27
- * | Input names a… | Examples | Result |
28
- * | ------------------- | ------------------------------------- | -------- |
29
- * | day | `2026-08-20`, `today`, `next monday` | all-day |
30
- * | instant | `2026-08-20T09:00`, `+3h`, `+2d` | timed |
31
- * | day *and* a time | `tomorrow 09:00` | timed |
32
- *
33
- * `+2d` is timed rather than all-day on purpose: it names a duration from now,
34
- * and the natural reading of "in two days" keeps the current time of day.
35
- *
36
- * ## Time zone
37
- *
38
- * Everything without an explicit offset resolves in **system local time**.
39
- * Reminders is a local-calendar app: a reminder due "09:00" is due at nine
40
- * o'clock where the person is, not at nine UTC. An input that *does* carry an
41
- * offset (`…T09:00Z`, `…T09:00+02:00`) is honoured as the absolute instant it
42
- * names.
43
- *
44
- * ## DST
45
- *
46
- * Day and week offsets are **calendar** arithmetic (`setDate`), so `+2d` across
47
- * a clock change lands at the same wall-clock time — which is what "in two
48
- * days" means to a person. Hour and minute offsets are **absolute** durations,
49
- * so `+3h` is always three hours of elapsed time. That split is deliberate and
50
- * pinned by tests; getting it backwards makes reminders drift by an hour twice
51
- * a year.
52
- *
53
- * ## Testability
54
- *
55
- * `now` is an injected parameter with a `new Date()` default, mirroring how
56
- * `loadConfig(env)` takes its environment — so tests are hermetic rather than
57
- * having to freeze a global clock.
58
- */
59
9
  /** What a parsed date turned out to be, which selects the Reminders property. */
60
- type DueKind = "allDay" | "timed";
61
- type ParsedDate = {
62
- kind: DueKind;
63
- /** The absolute instant, for comparisons and for handing to JXA. */
64
- at: Date;
65
- /**
66
- * ISO-8601 **with an explicit offset**, e.g. `2026-08-20T09:00:00+02:00`.
67
- *
68
- * Always carries the offset so the value is unambiguous once it leaves this
69
- * process — a bare local string reinterpreted in another zone is exactly the
70
- * silent failure this module exists to prevent.
71
- */
72
- iso: string;
73
- /** Echoed back in tool results so a caller can see how its input was read. */
74
- raw: string;
75
- };
76
- /**
77
- * Local wall-clock time rendered with its offset.
78
- *
79
- * Deliberately not `toISOString()`, which converts to UTC and would report a
80
- * 09:00 reminder as `07:00Z` — correct as an instant, but unreadable in a tool
81
- * result where the whole point is confirming what the caller asked for.
82
- */
83
- declare const toLocalIso: (d: Date) => string;
84
- /**
85
- * Parse one date argument.
86
- *
87
- * @param field Named in the error, so a failure says *which* argument was bad.
88
- * @param raw The caller's string.
89
- * @param now Injected for hermetic tests.
90
- */
91
- declare const parseDate: (field: string, raw: string, now?: Date) => ParsedDate;
92
- /**
93
- * Parse a bound for a range filter (`dueBefore` / `dueAfter`).
94
- *
95
- * A bare day means the whole day, so the edge it resolves to depends on which
96
- * side of the range it is: `dueBefore: "2026-08-20"` includes everything up to
97
- * that evening, and `dueAfter: "2026-08-20"` includes everything from that
98
- * morning. Resolving both to midnight would make `dueBefore` quietly exclude
99
- * the day the caller named.
100
- */
101
- declare const parseBound: (field: string, raw: string, edge: "start" | "end", now?: Date) => Date;
10
+ type DueKind = DateKind;
102
11
  //#endregion
103
12
  //#region src/client/errors.d.ts
104
13
  /** Named in every user-facing error and in the env vars they mention. */
@@ -113,16 +22,6 @@ declare class ListNotFoundError extends AppleAutomationError {
113
22
  readonly name = "ListNotFoundError";
114
23
  constructor(name: string, available?: readonly string[]);
115
24
  }
116
- /**
117
- * A date argument could not be understood.
118
- *
119
- * Carries the accepted grammar rather than just rejecting, because the caller is
120
- * usually a model that will retry once and needs to know what shape to retry in.
121
- */
122
- declare class InvalidDateError extends AppleAutomationError {
123
- readonly name = "InvalidDateError";
124
- constructor(field: string, raw: string, reason: string);
125
- }
126
25
  //#endregion
127
26
  //#region src/client/locate.d.ts
128
27
  /**
@@ -456,6 +355,23 @@ type ReminderSummary = {
456
355
  modified: string | null;
457
356
  source: "index" | "apple-events";
458
357
  };
358
+ /**
359
+ * A page of reminders, plus what a bare array could not say: which lane
360
+ * answered, and whether anything was left behind.
361
+ *
362
+ * Both lanes truncate, for different reasons, and neither had a way to admit
363
+ * it. Apple Events reads every reminder and then cuts to a cap independent of
364
+ * `limit`. The index lane over-fetches from SQL and applies the date and flag
365
+ * predicates afterwards in JS, so a query whose filters reject most rows can
366
+ * exhaust the over-fetch window before it fills the page — a short list that
367
+ * looks complete. `note` names whichever of the two happened.
368
+ */
369
+ type ReminderListing = {
370
+ reminders: ReminderSummary[];
371
+ source: "index" | "apple-events";
372
+ hasMore: boolean;
373
+ note?: string;
374
+ };
459
375
  type ReminderDetail = ReminderSummary & {
460
376
  body: string | null;
461
377
  completionDate: string | null;
@@ -539,7 +455,7 @@ declare class AppleRemindersClient {
539
455
  lists(): Promise<ReminderList[]>;
540
456
  /** Drop the cache after a write, so the next read reflects it. */
541
457
  invalidate(): void;
542
- listReminders(filters: ReminderFilters): Promise<ReminderSummary[]>;
458
+ listReminders(filters: ReminderFilters): Promise<ReminderListing>;
543
459
  /**
544
460
  * Text search over name and, optionally, body.
545
461
  *
@@ -549,7 +465,7 @@ declare class AppleRemindersClient {
549
465
  */
550
466
  searchReminders(query: string, opts: {
551
467
  scope?: "title" | "full";
552
- } & ReminderFilters): Promise<ReminderSummary[]>;
468
+ } & ReminderFilters): Promise<ReminderListing>;
553
469
  /**
554
470
  * One reminder in full.
555
471
  *
@@ -636,5 +552,5 @@ type ToolContext = {
636
552
  */
637
553
  declare const registerTools: (server: McpServer, client: AppleRemindersClient, ctx: ToolContext) => void;
638
554
  //#endregion
639
- export { AppleRemindersClient, AppleRemindersError, BUILD_INFO, type BuildInfo, type Config, type CreateServerOptions, type DueKind, GROUP_CONTAINER, type IndexAttachment, type IndexEnrichment, type IndexList, type IndexReminder, InvalidDateError, type LaneStatus, ListNotFoundError, type LocateResult, PRIORITY_NAMES, type ParsedDate, type PriorityName, REF_VERSION, REMINDERS_SURFACE, type ReminderAccount, type ReminderDetail, type ReminderFields, type ReminderFilters, type ReminderList, ReminderNotFoundError, type ReminderQuery, type ReminderRef, ReminderStore, type ReminderSummary, RemindersBusyError, RemindersNotRunningError, SERVER_NAME, SERVER_VERSION, type StoreCandidate, type StoreCapabilities, type ToolContext, createServer, decodeRef, defaultContainerPath, encodeRef, introspect, loadConfig, locateStore, openStore, parseBound, parseDate, rank, refFromUuid, registerTools, toLocalIso, toPriorityName, toPriorityValue, uuidOf };
555
+ export { AppleRemindersClient, AppleRemindersError, BUILD_INFO, type BuildInfo, type Config, type CreateServerOptions, type DueKind, GROUP_CONTAINER, type IndexAttachment, type IndexEnrichment, type IndexList, type IndexReminder, InvalidDateError, type LaneStatus, ListNotFoundError, type LocateResult, PRIORITY_NAMES, type ParsedDate, type PriorityName, REF_VERSION, REMINDERS_SURFACE, type ReminderAccount, type ReminderDetail, type ReminderFields, type ReminderFilters, type ReminderList, type ReminderListing, ReminderNotFoundError, type ReminderQuery, type ReminderRef, ReminderStore, type ReminderSummary, RemindersBusyError, RemindersNotRunningError, SERVER_NAME, SERVER_VERSION, type StoreCandidate, type StoreCapabilities, type ToolContext, createServer, decodeRef, defaultContainerPath, encodeRef, introspect, loadConfig, locateStore, openStore, parseBound, parseDate, rank, refFromUuid, registerTools, toLocalIso, toPriorityName, toPriorityValue, uuidOf };
640
556
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","names":[],"sources":["../src/build-info.ts","../src/client/dates.ts","../src/client/errors.ts","../src/client/locate.ts","../src/client/priority.ts","../src/client/ref.ts","../src/config.ts","../src/client/store.ts","../src/client/reminders.ts","../src/server.ts","../src/tools/index.ts"],"mappings":";;;;;cAkBa,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KCoCb;KAEA;EACV,MAAM;;EAEN,IAAI;;;;;;;;EAQJ;;EAEA;;;;;;;;;cAuCW,aAAU,GAAO;;;;;;;;cAoCjB,YAAS,eAAiB,aAAa,MAAO,SAAoB;;;;;;;;;;cA6FlE,aAAU,eACR,aACF,uBACU,MAChB,SACJ;;;;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;;cAQG,eAAY,MAAU,wBAAsB;;;KC9B7C;;;;;EAKV;;;;;;;;;;;;cAaW,gBAAa,QAChB,WAAS,QACT,sBAAoB,KACvB"}
1
+ {"version":3,"file":"index.d.ts","names":[],"sources":["../src/build-info.ts","../src/client/dates.ts","../src/client/errors.ts","../src/client/locate.ts","../src/client/priority.ts","../src/client/ref.ts","../src/config.ts","../src/client/store.ts","../src/client/reminders.ts","../src/server.ts","../src/tools/index.ts"],"mappings":";;;;;cAkBa,YAAY;;;;KC4Bb,UAAU;;;;cCrCT,mBAAmB;;cAoBnB,8BAA8B;WACvB;EAElB,YAAY;;;cAUD,0BAA0B;WACnB;EAElB,YAAY,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cCVf;KAQD,iBAAiB;EAAe;;KAEhC,eAAe;EACzB;;EAEA;;EAEA,YAAY;;EAEZ;EACA;;cAGW,uBAAoB;cAkCpB,cAAW;EACd;EAAgC;MACvC;;;;;;;;;;;;;;;;;;;;;;;;;;;;KClES;cAEC,yBAAyB;;cAMzB,kBAAe,MAAU;;;;;cAMzB,iBAAc,qCAAuC;;;;;;;cAiBrD,OAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;cC7BJ;KAKD;;EAEV;;;;;;;;EAQA;;cAGW,YAAS;cAET,YAAS,gBAAkB;;;;;;;;;cA0B3B,cAAW;;cAIX,SAAM;;;;;;;;;;cC1Db,cAAY,EAAA;;;;;;;;;;;;;;;;;;;;;;GAoCP,EAAA,KAAA;KAEC,SAAS,EAAE,aAAa;;;;;cAMvB,aAAU,MAAS,OAAO,eAA2B;;;KCpBtD;EACV;;EAEA,iBAAiB;EACjB,aAAa;EACb;EACA;EACA;;KAGU;EACV;;EAEA;EACA;EACA;EACA;;EAEA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;KAGU;EACV;EACA;EACA;EACA;EACA;EACA;;KAGU;EACV;EACA;EACA;EACA;EACA;EACA;;;KAIU;EACV;EACA;EACA;IA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B;IAAc;MACxC,QAAQ;EAgBL,eAAe,aAAa,QAAQ,iBAAiB,QAAQ;EAS7D,kBACJ,gBACA,sBACC;IAAU;IAAa;IAAgB;;;;;;;;;EAuBpC,cACJ,gBACA,eACC;IAAU;IAAoB;IAAqB;IAAgB;;EAuBhE,gBAAgB,iBAAiB;IAAU;IAAiB;;;;;cCxzBvD;cACA;KAED;EACV,QAAQ;EACR,SAAS;;EAET,YAAY;;EAEZ,YAAY;;KAGF;EACV,QAAQ;EACR,QAAQ;;;;;;;cAQG,eAAY,MAAU,wBAAsB;;;KC9B7C;;;;;EAKV;;;;;;;;;;;;cAaW,gBAAa,QAChB,WAAS,QACT,sBAAoB,KACvB"}
package/dist/index.js CHANGED
@@ -1,2 +1,2 @@
1
- import { A as RemindersBusyError, C as parseDate, D as ListNotFoundError, E as InvalidDateError, M as BUILD_INFO, O as REMINDERS_SURFACE, S as parseBound, T as AppleRemindersError, _ as toPriorityName, a as loadConfig, b as defaultContainerPath, c as introspect, d as decodeRef, f as encodeRef, g as rank, h as PRIORITY_NAMES, i as registerTools, j as RemindersNotRunningError, k as ReminderNotFoundError, l as openStore, m as uuidOf, n as SERVER_VERSION, o as AppleRemindersClient, p as refFromUuid, r as createServer, s as ReminderStore, t as SERVER_NAME, u as REF_VERSION, v as toPriorityValue, w as toLocalIso, x as locateStore, y as GROUP_CONTAINER } from "./server-Bh2cmilP.js";
1
+ import { A as parseDate, C as InvalidDateError, D as RemindersBusyError, E as ReminderNotFoundError, M as BUILD_INFO, O as RemindersNotRunningError, S as AppleRemindersError, T as REMINDERS_SURFACE, _ as toPriorityName, a as loadConfig, b as defaultContainerPath, c as introspect, d as decodeRef, f as encodeRef, g as rank, h as PRIORITY_NAMES, i as registerTools, j as toLocalIso, k as parseBound, l as openStore, m as uuidOf, n as SERVER_VERSION, o as AppleRemindersClient, p as refFromUuid, r as createServer, s as ReminderStore, t as SERVER_NAME, u as REF_VERSION, v as toPriorityValue, w as ListNotFoundError, x as locateStore, y as GROUP_CONTAINER } from "./server-vInIf1hF.js";
2
2
  export { AppleRemindersClient, AppleRemindersError, BUILD_INFO, GROUP_CONTAINER, InvalidDateError, ListNotFoundError, PRIORITY_NAMES, REF_VERSION, REMINDERS_SURFACE, ReminderNotFoundError, ReminderStore, RemindersBusyError, RemindersNotRunningError, SERVER_NAME, SERVER_VERSION, createServer, decodeRef, defaultContainerPath, encodeRef, introspect, loadConfig, locateStore, openStore, parseBound, parseDate, rank, refFromUuid, registerTools, toLocalIso, toPriorityName, toPriorityValue, uuidOf };
@@ -1,4 +1,4 @@
1
- import { AppBusyError as RemindersBusyError, AppNotRunningError as RemindersNotRunningError, AppleAutomationError, AppleAutomationError as AppleRemindersError, BaseConfigSchema, CORE_DATA_EPOCH_OFFSET, PreconditionError, SchemaDriftError, columnsOf, confirmArg, createOsascriptRunner, describeStore, escapeLike, fingerprintSchema, limitArg, ok, openReadOnly, parseBool, parseConfig, parseIntOpt, parseList, promptArg, readPackageIdentity, registerSurfaceResources, registerWorkflowPrompt, requiredPromptArg, resolveLimit, trimmed, withBusyRetry, withLazyTools, wrap } from "@mgcrea/mcp-apple-core";
1
+ import { AppBusyError as RemindersBusyError, AppNotRunningError as RemindersNotRunningError, AppleAutomationError, AppleAutomationError as AppleRemindersError, BaseConfigSchema, CORE_DATA_EPOCH_OFFSET, InvalidDateError, PreconditionError, SchemaDriftError, columnsOf, confirmArg, createOsascriptRunner, describeStore, escapeLike, fingerprintSchema, limitArg, ok, openReadOnly, parseBool, parseBound, parseConfig, parseDate, parseIntOpt, parseList, promptArg, readPackageIdentity, registerSurfaceResources, registerWorkflowPrompt, requiredPromptArg, resolveLimit, toLocalIso, trimmed, withBusyRetry, withLazyTools, wrap } from "@mgcrea/mcp-apple-core";
2
2
  import { readdirSync } from "node:fs";
3
3
  import { homedir } from "node:os";
4
4
  import { join } from "node:path";
@@ -12,8 +12,8 @@ const pkg = readPackageIdentity(new URL("../package.json", import.meta.url), {
12
12
  const BUILD_INFO = {
13
13
  name: pkg.name,
14
14
  version: pkg.version,
15
- gitCommit: "d70b8e4",
16
- gitCommitDate: "2026-09-06T12:13:21+02:00"
15
+ gitCommit: "d05a45c",
16
+ gitCommitDate: "2026-09-07T16:21:19+02:00"
17
17
  };
18
18
  //#endregion
19
19
  //#region src/client/errors.ts
@@ -41,192 +41,6 @@ var ListNotFoundError = class extends AppleAutomationError {
41
41
  super(`No Reminders list named "${name}".` + (available.length ? ` Available: ${available.slice(0, 20).join(", ")}${available.length > 20 ? ", …" : ""}.` : ` Use apple_reminders_list_lists to see what exists.`), { requested: name });
42
42
  }
43
43
  };
44
- /**
45
- * A date argument could not be understood.
46
- *
47
- * Carries the accepted grammar rather than just rejecting, because the caller is
48
- * usually a model that will retry once and needs to know what shape to retry in.
49
- */
50
- var InvalidDateError = class extends AppleAutomationError {
51
- name = "InvalidDateError";
52
- constructor(field, raw, reason) {
53
- super(`Could not read ${field} from ${JSON.stringify(raw)}: ${reason}. Accepted: an ISO-8601 date "2026-08-20" (all-day) or date-time "2026-08-20T09:00" (timed), or a relative offset like "+2d", "+3h", "+45m", "+1w", "today", "tomorrow", or "next monday".`, {
54
- field,
55
- raw
56
- });
57
- }
58
- };
59
- //#endregion
60
- //#region src/client/dates.ts
61
- /**
62
- * Date parsing for the Reminders tools.
63
- *
64
- * ## Why this module exists at all
65
- *
66
- * The scripting dictionary carries two separate due-date properties:
67
- *
68
- * due date "will set both date and time"
69
- * allday due date "will only set a date"
70
- *
71
- * So the *shape of the input* has to pick the property. A caller that writes
72
- * "2026-08-20" means a day; one that writes "2026-08-20T09:00" means an instant.
73
- * Collapsing those into one field is how a reminder ends up silently due at
74
- * midnight, which Reminders then renders as an all-day item anyway — the bug is
75
- * invisible until someone misses something.
76
- *
77
- * ## The rule
78
- *
79
- * | Input names a… | Examples | Result |
80
- * | ------------------- | ------------------------------------- | -------- |
81
- * | day | `2026-08-20`, `today`, `next monday` | all-day |
82
- * | instant | `2026-08-20T09:00`, `+3h`, `+2d` | timed |
83
- * | day *and* a time | `tomorrow 09:00` | timed |
84
- *
85
- * `+2d` is timed rather than all-day on purpose: it names a duration from now,
86
- * and the natural reading of "in two days" keeps the current time of day.
87
- *
88
- * ## Time zone
89
- *
90
- * Everything without an explicit offset resolves in **system local time**.
91
- * Reminders is a local-calendar app: a reminder due "09:00" is due at nine
92
- * o'clock where the person is, not at nine UTC. An input that *does* carry an
93
- * offset (`…T09:00Z`, `…T09:00+02:00`) is honoured as the absolute instant it
94
- * names.
95
- *
96
- * ## DST
97
- *
98
- * Day and week offsets are **calendar** arithmetic (`setDate`), so `+2d` across
99
- * a clock change lands at the same wall-clock time — which is what "in two
100
- * days" means to a person. Hour and minute offsets are **absolute** durations,
101
- * so `+3h` is always three hours of elapsed time. That split is deliberate and
102
- * pinned by tests; getting it backwards makes reminders drift by an hour twice
103
- * a year.
104
- *
105
- * ## Testability
106
- *
107
- * `now` is an injected parameter with a `new Date()` default, mirroring how
108
- * `loadConfig(env)` takes its environment — so tests are hermetic rather than
109
- * having to freeze a global clock.
110
- */
111
- const DAY_NAMES = [
112
- "sunday",
113
- "monday",
114
- "tuesday",
115
- "wednesday",
116
- "thursday",
117
- "friday",
118
- "saturday"
119
- ];
120
- const ISO_DATE = /^(\d{4})-(\d{2})-(\d{2})$/;
121
- const ISO_DATETIME = /^(\d{4})-(\d{2})-(\d{2})[T ](\d{2}):(\d{2})(?::(\d{2}))?(?:\.\d+)?(Z|[+-]\d{2}:?\d{2})?$/;
122
- const OFFSET = /^\+(\d+)\s*(m|min|mins|minute|minutes|h|hr|hrs|hour|hours|d|day|days|w|week|weeks)$/;
123
- const DAY_WORD = /^(today|tomorrow)(?:\s+(\d{1,2}):(\d{2}))?$/;
124
- const NEXT_DAY = /^next\s+([a-z]+)(?:\s+(\d{1,2}):(\d{2}))?$/;
125
- /** `+02:00` / `-05:00` / `Z` for a given instant, in the system zone. */
126
- const offsetOf = (d) => {
127
- const mins = -d.getTimezoneOffset();
128
- if (mins === 0) return "Z";
129
- const sign = mins < 0 ? "-" : "+";
130
- const abs = Math.abs(mins);
131
- return `${sign}${String(Math.floor(abs / 60)).padStart(2, "0")}:${String(abs % 60).padStart(2, "0")}`;
132
- };
133
- const pad = (n, w = 2) => String(n).padStart(w, "0");
134
- /**
135
- * Local wall-clock time rendered with its offset.
136
- *
137
- * Deliberately not `toISOString()`, which converts to UTC and would report a
138
- * 09:00 reminder as `07:00Z` — correct as an instant, but unreadable in a tool
139
- * result where the whole point is confirming what the caller asked for.
140
- */
141
- const toLocalIso = (d) => `${d.getFullYear()}-${pad(d.getMonth() + 1)}-${pad(d.getDate())}T${pad(d.getHours())}:${pad(d.getMinutes())}:${pad(d.getSeconds())}${offsetOf(d)}`;
142
- /** Local midnight on the given calendar day. */
143
- const startOfDay = (d) => new Date(d.getFullYear(), d.getMonth(), d.getDate(), 0, 0, 0, 0);
144
- /** The last representable instant of the given calendar day, local. */
145
- const endOfDay = (d) => new Date(d.getFullYear(), d.getMonth(), d.getDate(), 23, 59, 59, 999);
146
- /** Calendar-aware day arithmetic: same wall-clock time, n days later. */
147
- const addDays = (d, n) => {
148
- const out = new Date(d.getTime());
149
- out.setDate(out.getDate() + n);
150
- return out;
151
- };
152
- const at = (day, hours, minutes) => new Date(day.getFullYear(), day.getMonth(), day.getDate(), hours, minutes, 0, 0);
153
- const result = (kind, when, raw) => ({
154
- kind,
155
- at: when,
156
- iso: toLocalIso(when),
157
- raw
158
- });
159
- /**
160
- * Parse one date argument.
161
- *
162
- * @param field Named in the error, so a failure says *which* argument was bad.
163
- * @param raw The caller's string.
164
- * @param now Injected for hermetic tests.
165
- */
166
- const parseDate = (field, raw, now = /* @__PURE__ */ new Date()) => {
167
- const text = String(raw ?? "").trim();
168
- if (!text) throw new InvalidDateError(field, String(raw), "it is empty");
169
- const lower = text.toLowerCase();
170
- const dt = ISO_DATETIME.exec(text);
171
- if (dt) {
172
- const [, y, mo, d, hh, mm, ss, zone] = dt;
173
- const when = zone ? new Date(text.replace(" ", "T")) : new Date(Number(y), Number(mo) - 1, Number(d), Number(hh), Number(mm), Number(ss ?? "0"), 0);
174
- if (Number.isNaN(when.getTime())) throw new InvalidDateError(field, text, "it is not a real date");
175
- return result("timed", when, text);
176
- }
177
- const only = ISO_DATE.exec(text);
178
- if (only) {
179
- const [, y, mo, d] = only;
180
- const when = new Date(Number(y), Number(mo) - 1, Number(d), 0, 0, 0, 0);
181
- if (Number.isNaN(when.getTime())) throw new InvalidDateError(field, text, "it is not a real date");
182
- if (when.getMonth() !== Number(mo) - 1 || when.getDate() !== Number(d)) throw new InvalidDateError(field, text, `there is no day ${d} in month ${mo}`);
183
- return result("allDay", when, text);
184
- }
185
- const off = OFFSET.exec(lower);
186
- if (off) {
187
- const n = Number(off[1]);
188
- const unit = String(off[2]);
189
- if (!Number.isFinite(n)) throw new InvalidDateError(field, text, "the amount is not a number");
190
- if (unit.startsWith("d")) return result("timed", addDays(now, n), text);
191
- if (unit.startsWith("w")) return result("timed", addDays(now, n * 7), text);
192
- const ms = unit.startsWith("h") ? n * 36e5 : n * 6e4;
193
- return result("timed", new Date(now.getTime() + ms), text);
194
- }
195
- const word = DAY_WORD.exec(lower);
196
- if (word) {
197
- const day = word[1] === "tomorrow" ? addDays(now, 1) : now;
198
- if (word[2] === void 0) return result("allDay", startOfDay(day), text);
199
- const [hh, mm] = [Number(word[2]), Number(word[3])];
200
- if (hh > 23 || mm > 59) throw new InvalidDateError(field, text, `${hh}:${word[3]} is not a time`);
201
- return result("timed", at(day, hh, mm), text);
202
- }
203
- const next = NEXT_DAY.exec(lower);
204
- if (next) {
205
- const idx = DAY_NAMES.findIndex((n) => n === next[1] || n.slice(0, 3) === next[1]);
206
- if (idx === -1) throw new InvalidDateError(field, text, `"${next[1]}" is not a day of the week`);
207
- const ahead = (idx - now.getDay() + 7) % 7 || 7;
208
- const day = addDays(now, ahead);
209
- if (next[2] === void 0) return result("allDay", startOfDay(day), text);
210
- const [hh, mm] = [Number(next[2]), Number(next[3])];
211
- if (hh > 23 || mm > 59) throw new InvalidDateError(field, text, `${hh}:${next[3]} is not a time`);
212
- return result("timed", at(day, hh, mm), text);
213
- }
214
- throw new InvalidDateError(field, text, "it matches none of the accepted forms");
215
- };
216
- /**
217
- * Parse a bound for a range filter (`dueBefore` / `dueAfter`).
218
- *
219
- * A bare day means the whole day, so the edge it resolves to depends on which
220
- * side of the range it is: `dueBefore: "2026-08-20"` includes everything up to
221
- * that evening, and `dueAfter: "2026-08-20"` includes everything from that
222
- * morning. Resolving both to midnight would make `dueBefore` quietly exclude
223
- * the day the caller named.
224
- */
225
- const parseBound = (field, raw, edge, now = /* @__PURE__ */ new Date()) => {
226
- const parsed = parseDate(field, raw, now);
227
- if (parsed.kind !== "allDay") return parsed.at;
228
- return edge === "end" ? endOfDay(parsed.at) : startOfDay(parsed.at);
229
- };
230
44
  //#endregion
231
45
  //#region src/client/locate.ts
232
46
  /**
@@ -1426,7 +1240,35 @@ var AppleRemindersClient = class AppleRemindersClient {
1426
1240
  source
1427
1241
  };
1428
1242
  }
1429
- #matches(r, f, now) {
1243
+ /**
1244
+ * Both range bounds, resolved ONCE per request.
1245
+ *
1246
+ * They used to be parsed inside the per-row matcher, behind an early return
1247
+ * for reminders with no due date. Two consequences, both silent: an invalid
1248
+ * bound was only reported if some row happened to carry a date, so
1249
+ * `dueBefore: "sometime"` over an all-undated list answered `[]` instead of
1250
+ * refusing; and the same string was re-parsed once per reminder.
1251
+ */
1252
+ static #bounds(f, now) {
1253
+ const out = {};
1254
+ if (f.dueBefore) out.before = parseBound("dueBefore", f.dueBefore, "end", now).getTime();
1255
+ if (f.dueAfter) out.after = parseBound("dueAfter", f.dueAfter, "start", now).getTime();
1256
+ return out;
1257
+ }
1258
+ /**
1259
+ * A due date as an instant, reading a bare day as LOCAL midnight.
1260
+ *
1261
+ * The index renders an all-day reminder as `"2026-08-20"`, and
1262
+ * `new Date("2026-08-20")` is UTC midnight while every bound here is local.
1263
+ * West of Greenwich that put an all-day reminder before its own day's lower
1264
+ * bound, so it dropped out of a range that named it.
1265
+ */
1266
+ static #dueInstant(due) {
1267
+ const bare = /^(\d{4})-(\d{2})-(\d{2})$/.exec(due);
1268
+ if (bare) return new Date(Number(bare[1]), Number(bare[2]) - 1, Number(bare[3])).getTime();
1269
+ return new Date(due).getTime();
1270
+ }
1271
+ #matches(r, f, bounds) {
1430
1272
  if (!this.#allowedAccount(r.account) || !this.#allowedList(r.list)) return false;
1431
1273
  if (!(f.includeCompleted ?? this.config.includeCompleted) && r.completed) return false;
1432
1274
  if (f.list) {
@@ -1437,11 +1279,11 @@ var AppleRemindersClient = class AppleRemindersClient {
1437
1279
  if (f.priority && toPriorityName(r.priority) !== f.priority) return false;
1438
1280
  const due = r.alldayDueDate ?? r.dueDate;
1439
1281
  if (f.hasDueDate !== void 0 && Boolean(due) !== f.hasDueDate) return false;
1440
- if (f.dueBefore || f.dueAfter) {
1282
+ if (bounds.before !== void 0 || bounds.after !== void 0) {
1441
1283
  if (!due) return false;
1442
- const at = new Date(due).getTime();
1443
- if (f.dueBefore && at > parseBound("dueBefore", f.dueBefore, "end", now).getTime()) return false;
1444
- if (f.dueAfter && at < parseBound("dueAfter", f.dueAfter, "start", now).getTime()) return false;
1284
+ const at = AppleRemindersClient.#dueInstant(String(due));
1285
+ if (bounds.before !== void 0 && at >= bounds.before) return false;
1286
+ if (bounds.after !== void 0 && at < bounds.after) return false;
1445
1287
  }
1446
1288
  return true;
1447
1289
  }
@@ -1481,16 +1323,16 @@ var AppleRemindersClient = class AppleRemindersClient {
1481
1323
  * relative offsets, which have to be resolved against the same clock the rest
1482
1324
  * of the request uses.
1483
1325
  */
1484
- #matchesIndex(r, f, now) {
1326
+ #matchesIndex(r, f, bounds) {
1485
1327
  if (!this.#allowedList(r.list)) return false;
1486
1328
  if (f.flagged !== void 0 && r.flagged !== f.flagged) return false;
1487
1329
  if (f.priority && r.priority !== f.priority) return false;
1488
1330
  if (f.hasDueDate !== void 0 && Boolean(r.due) !== f.hasDueDate) return false;
1489
- if (f.dueBefore || f.dueAfter) {
1331
+ if (bounds.before !== void 0 || bounds.after !== void 0) {
1490
1332
  if (!r.due) return false;
1491
- const at = new Date(r.due).getTime();
1492
- if (f.dueBefore && at > parseBound("dueBefore", f.dueBefore, "end", now).getTime()) return false;
1493
- if (f.dueAfter && at < parseBound("dueAfter", f.dueAfter, "start", now).getTime()) return false;
1333
+ const at = AppleRemindersClient.#dueInstant(r.due);
1334
+ if (bounds.before !== void 0 && at >= bounds.before) return false;
1335
+ if (bounds.after !== void 0 && at < bounds.after) return false;
1494
1336
  }
1495
1337
  return true;
1496
1338
  }
@@ -1503,15 +1345,29 @@ var AppleRemindersClient = class AppleRemindersClient {
1503
1345
  * lane that knows whether a due date is all-day.
1504
1346
  */
1505
1347
  #fromStore(store, filters, query, scope, now) {
1348
+ const bounds = AppleRemindersClient.#bounds(filters, now);
1506
1349
  const listPk = filters.list ? this.#listPk(store, filters.list) : void 0;
1507
- if (filters.list && listPk === void 0) return [];
1508
- return store.search({
1350
+ if (filters.list && listPk === void 0) return {
1351
+ reminders: [],
1352
+ source: "index",
1353
+ hasMore: false
1354
+ };
1355
+ const sqlLimit = Math.min(filters.limit * 4 + 50, 2e3);
1356
+ const rows = store.search({
1509
1357
  ...query ? { query } : {},
1510
1358
  ...scope ? { scope } : {},
1511
1359
  ...listPk === void 0 ? {} : { listPk },
1512
1360
  includeCompleted: filters.includeCompleted ?? this.config.includeCompleted,
1513
- limit: Math.min(filters.limit * 4 + 50, 2e3)
1514
- }).map((r) => this.#fromIndex(r)).filter((r) => this.#matchesIndex(r, filters, now)).slice(0, filters.limit);
1361
+ limit: sqlLimit
1362
+ });
1363
+ const matched = rows.map((r) => this.#fromIndex(r)).filter((r) => this.#matchesIndex(r, filters, bounds));
1364
+ const windowFull = rows.length >= sqlLimit;
1365
+ return {
1366
+ reminders: matched.slice(0, filters.limit),
1367
+ source: "index",
1368
+ hasMore: matched.length > filters.limit || windowFull,
1369
+ ...windowFull && matched.length <= filters.limit ? { note: `The index query read ${rows.length} rows and the filters applied after SQL left ${matched.length}, short of the ${filters.limit} asked for. More may match beyond that window. Narrow with \`list\` or a search term, which filter inside the query rather than after it.` } : {}
1370
+ };
1515
1371
  }
1516
1372
  /**
1517
1373
  * Whether the index can answer this request faithfully.
@@ -1530,7 +1386,25 @@ var AppleRemindersClient = class AppleRemindersClient {
1530
1386
  const now = this.#now();
1531
1387
  const store = this.#indexCanAnswer() ? this.index() : null;
1532
1388
  if (store) return this.#fromStore(store, filters, void 0, void 0, now);
1533
- return (await this.#bulk()).reminders.filter((r) => this.#matches(r, filters, now)).map((r) => this.#summarise(r)).toSorted(AppleRemindersClient.#order).slice(0, Math.min(filters.limit, this.config.degradedMaxReminders));
1389
+ const bounds = AppleRemindersClient.#bounds(filters, now);
1390
+ const matched = (await this.#bulk()).reminders.filter((r) => this.#matches(r, filters, bounds)).map((r) => this.#summarise(r)).toSorted(AppleRemindersClient.#order);
1391
+ return this.#capped(matched, filters.limit);
1392
+ }
1393
+ /**
1394
+ * Cut an Apple Events result to the page, and say which bound did the cutting.
1395
+ *
1396
+ * The lane cap exists because a bulk read costs ~700ms per property whatever
1397
+ * the library size; it is not the caller's `limit` and can sit well below it.
1398
+ * Shared by list and search so the two cannot describe it differently.
1399
+ */
1400
+ #capped(matched, limit) {
1401
+ const cap = Math.min(limit, this.config.degradedMaxReminders);
1402
+ return {
1403
+ reminders: matched.slice(0, cap),
1404
+ source: "apple-events",
1405
+ hasMore: matched.length > cap,
1406
+ ...matched.length > cap && this.config.degradedMaxReminders < limit ? { note: `The Apple Events lane is capped at ${this.config.degradedMaxReminders} reminders and you asked for ${limit}, so this list stops short of what matched. Grant Full Disk Access to read the Reminders index instead, or raise APPLE_REMINDERS_DEGRADED_MAX_REMINDERS.` } : {}
1407
+ };
1534
1408
  }
1535
1409
  /**
1536
1410
  * Text search over name and, optionally, body.
@@ -1545,11 +1419,13 @@ var AppleRemindersClient = class AppleRemindersClient {
1545
1419
  const full = (opts.scope ?? "full") === "full";
1546
1420
  const store = this.#indexCanAnswer() ? this.index() : null;
1547
1421
  if (store) return this.#fromStore(store, opts, query.trim(), opts.scope ?? "full", now);
1548
- return (await this.#bulk()).reminders.filter((r) => this.#matches(r, opts, now)).filter((r) => {
1422
+ const bounds = AppleRemindersClient.#bounds(opts, now);
1423
+ const matched = (await this.#bulk()).reminders.filter((r) => this.#matches(r, opts, bounds)).filter((r) => {
1549
1424
  if (!needle) return true;
1550
1425
  if ((r.name ?? "").toLowerCase().includes(needle)) return true;
1551
1426
  return full && (r.body ?? "").toLowerCase().includes(needle);
1552
- }).map((r) => this.#summarise(r)).toSorted(AppleRemindersClient.#order).slice(0, Math.min(opts.limit, this.config.degradedMaxReminders));
1427
+ }).map((r) => this.#summarise(r)).toSorted(AppleRemindersClient.#order);
1428
+ return this.#capped(matched, opts.limit);
1553
1429
  }
1554
1430
  /**
1555
1431
  * One reminder in full.
@@ -1959,6 +1835,7 @@ const buildDiagnostics = async (client, ctx) => {
1959
1835
  includeCompleted: client.config.includeCompleted,
1960
1836
  indexMode: client.config.indexMode,
1961
1837
  maxResults: client.config.maxResults,
1838
+ degradedMaxReminders: client.config.degradedMaxReminders,
1962
1839
  searchCacheTtlMs: client.config.searchCacheTtlMs
1963
1840
  },
1964
1841
  caveats: [
@@ -1967,7 +1844,8 @@ const buildDiagnostics = async (client, ctx) => {
1967
1844
  "Subtasks need the index. The scripting dictionary types a reminder's container as \"list or reminder\", but calling container() on a reminder throws every time, so parentage is unreachable over Apple Events.",
1968
1845
  "Also index-only: attachments, alarms, recurrence and location alerts. There is no URL field in this store despite the folklore — it was looked for and is not there.",
1969
1846
  "Moving a reminder between lists is a copy-and-delete, because the scripting dictionary makes a reminder's list read-only. Moved reminders get a new ref.",
1970
- `Apple Events results are cached for ${client.config.searchCacheTtlMs}ms. Checking for changes costs about as much as re-reading everything, so there is no cheaper invalidation to be had.`
1847
+ `Apple Events results are cached for ${client.config.searchCacheTtlMs}ms. Checking for changes costs about as much as re-reading everything, so there is no cheaper invalidation to be had.`,
1848
+ `Listings over Apple Events stop at ${client.config.degradedMaxReminders} reminders whatever \`limit\` says. The index lane has its own bound: it over-fetches from SQL and applies the date, flag and priority filters afterwards, so a query those reject can come back short. Both cases are reported in a \`note\` field rather than returning a short list silently.`
1971
1849
  ]
1972
1850
  };
1973
1851
  };
@@ -1980,7 +1858,7 @@ const buildDiagnostics = async (client, ctx) => {
1980
1858
  */
1981
1859
  const registerDiagnosticsTools = (server, client, ctx) => {
1982
1860
  server.registerTool("apple_reminders_diagnostics", {
1983
- description: "Report which lanes are live, which macOS permissions are granted, and what each missing one is blocking. Start here when a tool returns degraded or fails — it names the exact System Settings pane to open.",
1861
+ description: "Report which lanes are live, which macOS permissions are granted, and what each missing one is blocking. Start here when a tool fails, or answers from the Apple Events lane when you expected the index — it names the exact System Settings pane to open.",
1984
1862
  inputSchema: {},
1985
1863
  annotations: { readOnlyHint: true }
1986
1864
  }, async () => wrap(() => buildDiagnostics(client, ctx)).then((r) => r ?? ok({})));
@@ -2075,7 +1953,7 @@ const filterSchema = {
2075
1953
  };
2076
1954
  const registerReminderTools = (server, client) => {
2077
1955
  server.registerTool("apple_reminders_list_reminders", {
2078
- description: "List reminders, soonest due first, with undated ones last. Returns a `ref` per reminder for the read and action tools. Completed reminders are excluded unless you ask for them. Every filter is optional; with none, this is the whole live list.",
1956
+ description: "List reminders, soonest due first, with undated ones last. Returns `reminders` with a `ref` each for the read and action tools, alongside `source` and `hasMore`. Completed reminders are excluded unless you ask for them. Every filter is optional; with none, this is the whole live list — but check `hasMore` before believing that, and read the `note` field if one is present: it means a lane bound, not your `limit`, ended the list.",
2079
1957
  inputSchema: filterSchema,
2080
1958
  annotations: { readOnlyHint: true }
2081
1959
  }, async (args) => wrap(() => client.listReminders({
@@ -2083,7 +1961,7 @@ const registerReminderTools = (server, client) => {
2083
1961
  limit: resolveLimit(args.limit, client.config.maxResults, 50)
2084
1962
  })));
2085
1963
  server.registerTool("apple_reminders_search_reminders", {
2086
- description: "Search reminders by text. `scope: \"full\"` (the default) matches the name and the notes body; `scope: \"title\"` matches only the name. Accepts the same filters as list_reminders, so you can search within one list or one date range.",
1964
+ description: "Search reminders by text. `scope: \"full\"` (the default) matches the name and the notes body; `scope: \"title\"` matches only the name. Accepts the same filters as list_reminders, so you can search within one list or one date range. Carries the same `hasMore` and `note` fields as list_reminders.",
2087
1965
  inputSchema: {
2088
1966
  query: z.string().min(1).describe("Text to look for. Case-insensitive substring match."),
2089
1967
  scope: z.enum(["full", "title"]).optional().describe("full = name and notes body (default). title = name only."),
@@ -2169,6 +2047,6 @@ const createServer = (opts) => {
2169
2047
  };
2170
2048
  };
2171
2049
  //#endregion
2172
- export { RemindersBusyError as A, parseDate as C, ListNotFoundError as D, InvalidDateError as E, BUILD_INFO as M, REMINDERS_SURFACE as O, parseBound as S, AppleRemindersError as T, toPriorityName as _, loadConfig as a, defaultContainerPath as b, introspect as c, decodeRef as d, encodeRef as f, rank as g, PRIORITY_NAMES as h, registerTools as i, RemindersNotRunningError as j, ReminderNotFoundError as k, openStore as l, uuidOf as m, SERVER_VERSION as n, AppleRemindersClient as o, refFromUuid as p, createServer as r, ReminderStore as s, SERVER_NAME as t, REF_VERSION as u, toPriorityValue as v, toLocalIso as w, locateStore as x, GROUP_CONTAINER as y };
2050
+ export { parseDate as A, InvalidDateError as C, RemindersBusyError as D, ReminderNotFoundError as E, BUILD_INFO as M, RemindersNotRunningError as O, AppleRemindersError as S, REMINDERS_SURFACE as T, toPriorityName as _, loadConfig as a, defaultContainerPath as b, introspect as c, decodeRef as d, encodeRef as f, rank as g, PRIORITY_NAMES as h, registerTools as i, toLocalIso as j, parseBound as k, openStore as l, uuidOf as m, SERVER_VERSION as n, AppleRemindersClient as o, refFromUuid as p, createServer as r, ReminderStore as s, SERVER_NAME as t, REF_VERSION as u, toPriorityValue as v, ListNotFoundError as w, locateStore as x, GROUP_CONTAINER as y };
2173
2051
 
2174
- //# sourceMappingURL=server-Bh2cmilP.js.map
2052
+ //# sourceMappingURL=server-vInIf1hF.js.map