@jbctechsolutions/mcp-office365 2.5.1 → 4.0.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 +66 -57
- package/dist/approval/hash.d.ts +8 -8
- package/dist/approval/token-manager.d.ts +37 -19
- package/dist/approval/token-manager.d.ts.map +1 -1
- package/dist/approval/token-manager.js +133 -37
- package/dist/approval/token-manager.js.map +1 -1
- package/dist/approval/types.d.ts +7 -3
- package/dist/approval/types.d.ts.map +1 -1
- package/dist/cli.d.ts +21 -0
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +100 -2
- package/dist/cli.js.map +1 -1
- package/dist/database/repository.d.ts +48 -48
- package/dist/database/repository.d.ts.map +1 -1
- package/dist/database/repository.js.map +1 -1
- package/dist/delta/mirror.d.ts +67 -0
- package/dist/delta/mirror.d.ts.map +1 -0
- package/dist/delta/mirror.js +183 -0
- package/dist/delta/mirror.js.map +1 -0
- package/dist/graph/auth/account-id.d.ts +19 -0
- package/dist/graph/auth/account-id.d.ts.map +1 -0
- package/dist/graph/auth/account-id.js +55 -0
- package/dist/graph/auth/account-id.js.map +1 -0
- package/dist/graph/auth/config.d.ts +1 -1
- package/dist/graph/auth/config.d.ts.map +1 -1
- package/dist/graph/auth/config.js +13 -1
- package/dist/graph/auth/config.js.map +1 -1
- package/dist/graph/auth/device-code-flow.d.ts +3 -1
- package/dist/graph/auth/device-code-flow.d.ts.map +1 -1
- package/dist/graph/auth/device-code-flow.js +42 -14
- package/dist/graph/auth/device-code-flow.js.map +1 -1
- package/dist/graph/auth/index.d.ts +1 -0
- package/dist/graph/auth/index.d.ts.map +1 -1
- package/dist/graph/auth/index.js +1 -0
- package/dist/graph/auth/index.js.map +1 -1
- package/dist/graph/auth/token-cache.js +2 -2
- package/dist/graph/auth/token-cache.js.map +1 -1
- package/dist/graph/client/graph-client.d.ts +141 -8
- package/dist/graph/client/graph-client.d.ts.map +1 -1
- package/dist/graph/client/graph-client.js +536 -48
- package/dist/graph/client/graph-client.js.map +1 -1
- package/dist/graph/client/immutable-id-middleware.d.ts +50 -0
- package/dist/graph/client/immutable-id-middleware.d.ts.map +1 -0
- package/dist/graph/client/immutable-id-middleware.js +137 -0
- package/dist/graph/client/immutable-id-middleware.js.map +1 -0
- package/dist/graph/content-readers.d.ts +0 -12
- package/dist/graph/content-readers.d.ts.map +1 -1
- package/dist/graph/content-readers.js +0 -21
- package/dist/graph/content-readers.js.map +1 -1
- package/dist/graph/index.d.ts +5 -6
- package/dist/graph/index.d.ts.map +1 -1
- package/dist/graph/index.js +5 -6
- package/dist/graph/index.js.map +1 -1
- package/dist/graph/mailbox-adapter.d.ts +15 -15
- package/dist/graph/mappers/contact-mapper.d.ts +4 -1
- package/dist/graph/mappers/contact-mapper.d.ts.map +1 -1
- package/dist/graph/mappers/contact-mapper.js +7 -3
- package/dist/graph/mappers/contact-mapper.js.map +1 -1
- package/dist/graph/mappers/email-mapper.d.ts.map +1 -1
- package/dist/graph/mappers/email-mapper.js +7 -4
- package/dist/graph/mappers/email-mapper.js.map +1 -1
- package/dist/graph/mappers/event-mapper.d.ts.map +1 -1
- package/dist/graph/mappers/event-mapper.js +6 -3
- package/dist/graph/mappers/event-mapper.js.map +1 -1
- package/dist/graph/mappers/folder-mapper.d.ts +0 -4
- package/dist/graph/mappers/folder-mapper.d.ts.map +1 -1
- package/dist/graph/mappers/folder-mapper.js +9 -19
- package/dist/graph/mappers/folder-mapper.js.map +1 -1
- package/dist/graph/mappers/index.d.ts +2 -2
- package/dist/graph/mappers/index.d.ts.map +1 -1
- package/dist/graph/mappers/index.js +2 -2
- package/dist/graph/mappers/index.js.map +1 -1
- package/dist/graph/mappers/task-mapper.d.ts +4 -2
- package/dist/graph/mappers/task-mapper.d.ts.map +1 -1
- package/dist/graph/mappers/task-mapper.js +7 -5
- package/dist/graph/mappers/task-mapper.js.map +1 -1
- package/dist/graph/mappers/utils.d.ts +0 -10
- package/dist/graph/mappers/utils.d.ts.map +1 -1
- package/dist/graph/mappers/utils.js +0 -19
- package/dist/graph/mappers/utils.js.map +1 -1
- package/dist/graph/repository.d.ts +409 -276
- package/dist/graph/repository.d.ts.map +1 -1
- package/dist/graph/repository.js +772 -1082
- package/dist/graph/repository.js.map +1 -1
- package/dist/ids/mint.d.ts +31 -0
- package/dist/ids/mint.d.ts.map +1 -0
- package/dist/ids/mint.js +36 -0
- package/dist/ids/mint.js.map +1 -0
- package/dist/ids/next-action.d.ts +29 -0
- package/dist/ids/next-action.d.ts.map +1 -0
- package/dist/ids/next-action.js +58 -0
- package/dist/ids/next-action.js.map +1 -0
- package/dist/ids/resolver.d.ts +31 -0
- package/dist/ids/resolver.d.ts.map +1 -0
- package/dist/ids/resolver.js +52 -0
- package/dist/ids/resolver.js.map +1 -0
- package/dist/ids/schema.d.ts +91 -0
- package/dist/ids/schema.d.ts.map +1 -0
- package/dist/ids/schema.js +131 -0
- package/dist/ids/schema.js.map +1 -0
- package/dist/ids/token.d.ts +62 -0
- package/dist/ids/token.d.ts.map +1 -0
- package/dist/ids/token.js +225 -0
- package/dist/ids/token.js.map +1 -0
- package/dist/index.d.ts +10 -6
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +255 -5925
- package/dist/index.js.map +1 -1
- package/dist/parsers/index.d.ts +0 -1
- package/dist/parsers/index.d.ts.map +1 -1
- package/dist/parsers/index.js +0 -1
- package/dist/parsers/index.js.map +1 -1
- package/dist/registry/all-tools.d.ts +14 -0
- package/dist/registry/all-tools.d.ts.map +1 -0
- package/dist/registry/all-tools.js +68 -0
- package/dist/registry/all-tools.js.map +1 -0
- package/dist/registry/context.d.ts +19 -0
- package/dist/registry/context.d.ts.map +1 -0
- package/dist/registry/context.js +20 -0
- package/dist/registry/context.js.map +1 -0
- package/dist/registry/define-tool.d.ts +15 -0
- package/dist/registry/define-tool.d.ts.map +1 -0
- package/dist/registry/define-tool.js +8 -0
- package/dist/registry/define-tool.js.map +1 -0
- package/dist/registry/elicit-links.d.ts +35 -0
- package/dist/registry/elicit-links.d.ts.map +1 -0
- package/dist/registry/elicit-links.js +102 -0
- package/dist/registry/elicit-links.js.map +1 -0
- package/dist/registry/elicitor.d.ts +24 -0
- package/dist/registry/elicitor.d.ts.map +1 -0
- package/dist/registry/elicitor.js +51 -0
- package/dist/registry/elicitor.js.map +1 -0
- package/dist/registry/index.d.ts +13 -0
- package/dist/registry/index.d.ts.map +1 -0
- package/dist/registry/index.js +8 -0
- package/dist/registry/index.js.map +1 -0
- package/dist/registry/registry.d.ts +73 -0
- package/dist/registry/registry.d.ts.map +1 -0
- package/dist/registry/registry.js +221 -0
- package/dist/registry/registry.js.map +1 -0
- package/dist/registry/types.d.ts +146 -0
- package/dist/registry/types.d.ts.map +1 -0
- package/dist/registry/types.js +6 -0
- package/dist/registry/types.js.map +1 -0
- package/dist/search/compiler.d.ts +49 -0
- package/dist/search/compiler.d.ts.map +1 -0
- package/dist/search/compiler.js +168 -0
- package/dist/search/compiler.js.map +1 -0
- package/dist/signature.js +2 -2
- package/dist/signature.js.map +1 -1
- package/dist/state/delta-store.d.ts +85 -0
- package/dist/state/delta-store.d.ts.map +1 -0
- package/dist/state/delta-store.js +124 -0
- package/dist/state/delta-store.js.map +1 -0
- package/dist/state/migrate.d.ts +23 -0
- package/dist/state/migrate.d.ts.map +1 -0
- package/dist/state/migrate.js +81 -0
- package/dist/state/migrate.js.map +1 -0
- package/dist/state/schema.d.ts +26 -0
- package/dist/state/schema.d.ts.map +1 -0
- package/dist/state/schema.js +77 -0
- package/dist/state/schema.js.map +1 -0
- package/dist/state/store.d.ts +155 -0
- package/dist/state/store.d.ts.map +1 -0
- package/dist/state/store.js +321 -0
- package/dist/state/store.js.map +1 -0
- package/dist/tools/calendar-graph.d.ts +41 -0
- package/dist/tools/calendar-graph.d.ts.map +1 -0
- package/dist/tools/calendar-graph.js +299 -0
- package/dist/tools/calendar-graph.js.map +1 -0
- package/dist/tools/calendar-permissions.d.ts +17 -7
- package/dist/tools/calendar-permissions.d.ts.map +1 -1
- package/dist/tools/calendar-permissions.js +60 -4
- package/dist/tools/calendar-permissions.js.map +1 -1
- package/dist/tools/calendar.d.ts +133 -82
- package/dist/tools/calendar.d.ts.map +1 -1
- package/dist/tools/calendar.js +249 -136
- package/dist/tools/calendar.js.map +1 -1
- package/dist/tools/categories.d.ts +14 -4
- package/dist/tools/categories.d.ts.map +1 -1
- package/dist/tools/categories.js +59 -2
- package/dist/tools/categories.js.map +1 -1
- package/dist/tools/checklist-items.d.ts +19 -9
- package/dist/tools/checklist-items.d.ts.map +1 -1
- package/dist/tools/checklist-items.js +71 -5
- package/dist/tools/checklist-items.js.map +1 -1
- package/dist/tools/contact-folders.d.ts +50 -0
- package/dist/tools/contact-folders.d.ts.map +1 -0
- package/dist/tools/contact-folders.js +136 -0
- package/dist/tools/contact-folders.js.map +1 -0
- package/dist/tools/contacts-graph.d.ts +45 -0
- package/dist/tools/contacts-graph.d.ts.map +1 -0
- package/dist/tools/contacts-graph.js +174 -0
- package/dist/tools/contacts-graph.js.map +1 -0
- package/dist/tools/contacts.d.ts +61 -30
- package/dist/tools/contacts.d.ts.map +1 -1
- package/dist/tools/contacts.js +150 -93
- package/dist/tools/contacts.js.map +1 -1
- package/dist/tools/excel.d.ts +20 -10
- package/dist/tools/excel.d.ts.map +1 -1
- package/dist/tools/excel.js +82 -6
- package/dist/tools/excel.js.map +1 -1
- package/dist/tools/focused-overrides.d.ts +14 -4
- package/dist/tools/focused-overrides.d.ts.map +1 -1
- package/dist/tools/focused-overrides.js +59 -2
- package/dist/tools/focused-overrides.js.map +1 -1
- package/dist/tools/index.d.ts +4 -5
- package/dist/tools/index.d.ts.map +1 -1
- package/dist/tools/index.js +4 -6
- package/dist/tools/index.js.map +1 -1
- package/dist/tools/linked-resources.d.ts +17 -7
- package/dist/tools/linked-resources.d.ts.map +1 -1
- package/dist/tools/linked-resources.js +60 -4
- package/dist/tools/linked-resources.js.map +1 -1
- package/dist/tools/mail-graph.d.ts +38 -0
- package/dist/tools/mail-graph.d.ts.map +1 -0
- package/dist/tools/mail-graph.js +187 -0
- package/dist/tools/mail-graph.js.map +1 -0
- package/dist/tools/mail-rules.d.ts +20 -8
- package/dist/tools/mail-rules.d.ts.map +1 -1
- package/dist/tools/mail-rules.js +63 -7
- package/dist/tools/mail-rules.js.map +1 -1
- package/dist/tools/mail-send.d.ts +39 -27
- package/dist/tools/mail-send.d.ts.map +1 -1
- package/dist/tools/mail-send.js +249 -24
- package/dist/tools/mail-send.js.map +1 -1
- package/dist/tools/mail.d.ts +91 -68
- package/dist/tools/mail.d.ts.map +1 -1
- package/dist/tools/mail.js +232 -243
- package/dist/tools/mail.js.map +1 -1
- package/dist/tools/mailbox-organization.d.ts +51 -34
- package/dist/tools/mailbox-organization.d.ts.map +1 -1
- package/dist/tools/mailbox-organization.js +318 -35
- package/dist/tools/mailbox-organization.js.map +1 -1
- package/dist/tools/mailbox-settings.d.ts +59 -0
- package/dist/tools/mailbox-settings.d.ts.map +1 -0
- package/dist/tools/mailbox-settings.js +136 -0
- package/dist/tools/mailbox-settings.js.map +1 -0
- package/dist/tools/meetings.d.ts +24 -14
- package/dist/tools/meetings.d.ts.map +1 -1
- package/dist/tools/meetings.js +82 -6
- package/dist/tools/meetings.js.map +1 -1
- package/dist/tools/onedrive.d.ts +26 -16
- package/dist/tools/onedrive.d.ts.map +1 -1
- package/dist/tools/onedrive.js +140 -11
- package/dist/tools/onedrive.js.map +1 -1
- package/dist/tools/onenote.d.ts +63 -0
- package/dist/tools/onenote.d.ts.map +1 -0
- package/dist/tools/onenote.js +221 -0
- package/dist/tools/onenote.js.map +1 -0
- package/dist/tools/people.d.ts +10 -0
- package/dist/tools/people.d.ts.map +1 -1
- package/dist/tools/people.js +94 -0
- package/dist/tools/people.js.map +1 -1
- package/dist/tools/planner-visualization.d.ts +15 -5
- package/dist/tools/planner-visualization.d.ts.map +1 -1
- package/dist/tools/planner-visualization.js +58 -4
- package/dist/tools/planner-visualization.js.map +1 -1
- package/dist/tools/planner.d.ts +69 -39
- package/dist/tools/planner.d.ts.map +1 -1
- package/dist/tools/planner.js +231 -23
- package/dist/tools/planner.js.map +1 -1
- package/dist/tools/scheduling.d.ts +12 -0
- package/dist/tools/scheduling.d.ts.map +1 -1
- package/dist/tools/scheduling.js +38 -0
- package/dist/tools/scheduling.js.map +1 -1
- package/dist/tools/shared-mailbox.d.ts +164 -0
- package/dist/tools/shared-mailbox.d.ts.map +1 -0
- package/dist/tools/shared-mailbox.js +318 -0
- package/dist/tools/shared-mailbox.js.map +1 -0
- package/dist/tools/sharepoint-lists.d.ts +131 -0
- package/dist/tools/sharepoint-lists.d.ts.map +1 -0
- package/dist/tools/sharepoint-lists.js +246 -0
- package/dist/tools/sharepoint-lists.js.map +1 -0
- package/dist/tools/sharepoint.d.ts +24 -14
- package/dist/tools/sharepoint.d.ts.map +1 -1
- package/dist/tools/sharepoint.js +85 -9
- package/dist/tools/sharepoint.js.map +1 -1
- package/dist/tools/task-attachments.d.ts +17 -7
- package/dist/tools/task-attachments.d.ts.map +1 -1
- package/dist/tools/task-attachments.js +60 -4
- package/dist/tools/task-attachments.js.map +1 -1
- package/dist/tools/task-lists.d.ts +56 -0
- package/dist/tools/task-lists.d.ts.map +1 -0
- package/dist/tools/task-lists.js +155 -0
- package/dist/tools/task-lists.js.map +1 -0
- package/dist/tools/tasks-graph.d.ts +49 -0
- package/dist/tools/tasks-graph.d.ts.map +1 -0
- package/dist/tools/tasks-graph.js +193 -0
- package/dist/tools/tasks-graph.js.map +1 -0
- package/dist/tools/tasks.d.ts +121 -29
- package/dist/tools/tasks.d.ts.map +1 -1
- package/dist/tools/tasks.js +136 -84
- package/dist/tools/tasks.js.map +1 -1
- package/dist/tools/teams.d.ts +57 -46
- package/dist/tools/teams.d.ts.map +1 -1
- package/dist/tools/teams.js +288 -26
- package/dist/tools/teams.js.map +1 -1
- package/dist/tools/what-changed.d.ts +48 -0
- package/dist/tools/what-changed.d.ts.map +1 -0
- package/dist/tools/what-changed.js +149 -0
- package/dist/tools/what-changed.js.map +1 -0
- package/dist/types/calendar.d.ts +1 -1
- package/dist/types/calendar.d.ts.map +1 -1
- package/dist/types/calendar.js.map +1 -1
- package/dist/types/contacts.d.ts +1 -1
- package/dist/types/contacts.d.ts.map +1 -1
- package/dist/types/contacts.js.map +1 -1
- package/dist/types/mail.d.ts +1 -1
- package/dist/types/mail.d.ts.map +1 -1
- package/dist/types/mail.js.map +1 -1
- package/dist/utils/errors.d.ts +110 -38
- package/dist/utils/errors.d.ts.map +1 -1
- package/dist/utils/errors.js +239 -56
- package/dist/utils/errors.js.map +1 -1
- package/dist/visualization/types.d.ts +4 -4
- package/package.json +2 -3
- package/dist/applescript/account-repository.d.ts +0 -30
- package/dist/applescript/account-repository.d.ts.map +0 -1
- package/dist/applescript/account-repository.js +0 -38
- package/dist/applescript/account-repository.js.map +0 -1
- package/dist/applescript/account-scripts.d.ts +0 -21
- package/dist/applescript/account-scripts.d.ts.map +0 -1
- package/dist/applescript/account-scripts.js +0 -180
- package/dist/applescript/account-scripts.js.map +0 -1
- package/dist/applescript/calendar-manager.d.ts +0 -44
- package/dist/applescript/calendar-manager.d.ts.map +0 -1
- package/dist/applescript/calendar-manager.js +0 -92
- package/dist/applescript/calendar-manager.js.map +0 -1
- package/dist/applescript/calendar-writer.d.ts +0 -36
- package/dist/applescript/calendar-writer.d.ts.map +0 -1
- package/dist/applescript/calendar-writer.js +0 -94
- package/dist/applescript/calendar-writer.js.map +0 -1
- package/dist/applescript/content-readers.d.ts +0 -114
- package/dist/applescript/content-readers.d.ts.map +0 -1
- package/dist/applescript/content-readers.js +0 -328
- package/dist/applescript/content-readers.js.map +0 -1
- package/dist/applescript/executor.d.ts +0 -60
- package/dist/applescript/executor.d.ts.map +0 -1
- package/dist/applescript/executor.js +0 -173
- package/dist/applescript/executor.js.map +0 -1
- package/dist/applescript/index.d.ts +0 -20
- package/dist/applescript/index.d.ts.map +0 -1
- package/dist/applescript/index.js +0 -29
- package/dist/applescript/index.js.map +0 -1
- package/dist/applescript/mail-sender.d.ts +0 -38
- package/dist/applescript/mail-sender.d.ts.map +0 -1
- package/dist/applescript/mail-sender.js +0 -67
- package/dist/applescript/mail-sender.js.map +0 -1
- package/dist/applescript/parser.d.ts +0 -235
- package/dist/applescript/parser.d.ts.map +0 -1
- package/dist/applescript/parser.js +0 -496
- package/dist/applescript/parser.js.map +0 -1
- package/dist/applescript/repository.d.ts +0 -64
- package/dist/applescript/repository.d.ts.map +0 -1
- package/dist/applescript/repository.js +0 -444
- package/dist/applescript/repository.js.map +0 -1
- package/dist/applescript/scripts.d.ts +0 -265
- package/dist/applescript/scripts.d.ts.map +0 -1
- package/dist/applescript/scripts.js +0 -1483
- package/dist/applescript/scripts.js.map +0 -1
- package/dist/parsers/olk15.d.ts +0 -87
- package/dist/parsers/olk15.d.ts.map +0 -1
- package/dist/parsers/olk15.js +0 -368
- package/dist/parsers/olk15.js.map +0 -1
- package/dist/tools/notes.d.ts +0 -74
- package/dist/tools/notes.d.ts.map +0 -1
- package/dist/tools/notes.js +0 -136
- package/dist/tools/notes.js.map +0 -1
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2026 JBC Tech Solutions, LLC
|
|
3
|
+
* Licensed under the MIT License. See LICENSE file in the project root.
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* Delta-sync "what changed" MCP tools (U12).
|
|
7
|
+
*
|
|
8
|
+
* `what_changed` runs Microsoft Graph delta queries against a local mirror and
|
|
9
|
+
* reports what was added / updated / deleted since the previous call. The first
|
|
10
|
+
* call per resource establishes a baseline (no per-item changes). Surfaced ids
|
|
11
|
+
* are durable self-encoding tokens (`em_` mail, `ev_` events).
|
|
12
|
+
*
|
|
13
|
+
* `reset_change_tracking` clears the local cursor + mirror so the next call
|
|
14
|
+
* re-baselines — a local-only operation that never touches the user's mailbox.
|
|
15
|
+
*/
|
|
16
|
+
import { z } from 'zod';
|
|
17
|
+
import { defineTool } from '../registry/define-tool.js';
|
|
18
|
+
import { requireGraphToolset } from '../registry/context.js';
|
|
19
|
+
import { DeltaMirror, ALL_RESOURCES, } from '../delta/mirror.js';
|
|
20
|
+
// =============================================================================
|
|
21
|
+
// Input Schemas
|
|
22
|
+
// =============================================================================
|
|
23
|
+
const ResourceEnum = z.enum(['mail', 'calendar']);
|
|
24
|
+
export const WhatChangedInput = z.strictObject({
|
|
25
|
+
resources: z
|
|
26
|
+
.array(ResourceEnum)
|
|
27
|
+
.nonempty()
|
|
28
|
+
.optional()
|
|
29
|
+
.describe('Which resources to check (default: all — mail and calendar).'),
|
|
30
|
+
max_items_per_resource: z
|
|
31
|
+
.number()
|
|
32
|
+
.int()
|
|
33
|
+
.min(1)
|
|
34
|
+
.max(200)
|
|
35
|
+
.optional()
|
|
36
|
+
.describe('Cap the created/updated/deleted lists per resource (default 50).'),
|
|
37
|
+
});
|
|
38
|
+
export const ResetChangeTrackingInput = z.strictObject({
|
|
39
|
+
resources: z
|
|
40
|
+
.array(ResourceEnum)
|
|
41
|
+
.nonempty()
|
|
42
|
+
.optional()
|
|
43
|
+
.describe('Which resources to reset (default: all). Local-only; no mailbox changes.'),
|
|
44
|
+
});
|
|
45
|
+
// =============================================================================
|
|
46
|
+
// Tools
|
|
47
|
+
// =============================================================================
|
|
48
|
+
/** Trims a change list to `max` entries, recording how many were dropped. */
|
|
49
|
+
function cap(entries, max) {
|
|
50
|
+
if (entries.length <= max)
|
|
51
|
+
return { items: entries, truncated: 0 };
|
|
52
|
+
return { items: entries.slice(0, max), truncated: entries.length - max };
|
|
53
|
+
}
|
|
54
|
+
export class DeltaTools {
|
|
55
|
+
mirror;
|
|
56
|
+
constructor(client, store, accountId) {
|
|
57
|
+
this.mirror = new DeltaMirror(client, store, accountId);
|
|
58
|
+
}
|
|
59
|
+
async whatChanged(params) {
|
|
60
|
+
const resources = params.resources ?? ALL_RESOURCES;
|
|
61
|
+
const max = params.max_items_per_resource ?? 50;
|
|
62
|
+
const report = await this.mirror.sync(resources);
|
|
63
|
+
let created = 0;
|
|
64
|
+
let updated = 0;
|
|
65
|
+
let deleted = 0;
|
|
66
|
+
let baselines = 0;
|
|
67
|
+
const resourceViews = report.resources.map((rc) => {
|
|
68
|
+
created += rc.created.length;
|
|
69
|
+
updated += rc.updated.length;
|
|
70
|
+
deleted += rc.deleted.length;
|
|
71
|
+
if (rc.baseline)
|
|
72
|
+
baselines += 1;
|
|
73
|
+
const c = cap(rc.created, max);
|
|
74
|
+
const u = cap(rc.updated, max);
|
|
75
|
+
const d = cap(rc.deleted, max);
|
|
76
|
+
const view = {
|
|
77
|
+
resource: rc.resource,
|
|
78
|
+
baseline: rc.baseline,
|
|
79
|
+
tracked_count: rc.trackedCount,
|
|
80
|
+
created: c.items,
|
|
81
|
+
updated: u.items,
|
|
82
|
+
deleted: d.items,
|
|
83
|
+
};
|
|
84
|
+
const truncated = c.truncated + u.truncated + d.truncated;
|
|
85
|
+
if (truncated > 0)
|
|
86
|
+
view.truncated = truncated;
|
|
87
|
+
if (rc.note != null)
|
|
88
|
+
view.note = rc.note;
|
|
89
|
+
return view;
|
|
90
|
+
});
|
|
91
|
+
const summary = baselines === report.resources.length && created + updated + deleted === 0
|
|
92
|
+
? `Baseline established for ${baselines} resource(s); call again to see changes.`
|
|
93
|
+
: `${created} created, ${updated} updated, ${deleted} deleted since last sync.`;
|
|
94
|
+
return {
|
|
95
|
+
content: [{
|
|
96
|
+
type: 'text',
|
|
97
|
+
text: JSON.stringify({
|
|
98
|
+
synced_at: new Date(report.syncedAt).toISOString(),
|
|
99
|
+
summary,
|
|
100
|
+
resources: resourceViews,
|
|
101
|
+
}, null, 2),
|
|
102
|
+
}],
|
|
103
|
+
};
|
|
104
|
+
}
|
|
105
|
+
resetChangeTracking(params) {
|
|
106
|
+
const resources = params.resources ?? ALL_RESOURCES;
|
|
107
|
+
this.mirror.reset(resources);
|
|
108
|
+
return {
|
|
109
|
+
content: [{
|
|
110
|
+
type: 'text',
|
|
111
|
+
text: JSON.stringify({
|
|
112
|
+
success: true,
|
|
113
|
+
reset: resources,
|
|
114
|
+
message: 'Change tracking reset; the next what_changed call will re-baseline.',
|
|
115
|
+
}, null, 2),
|
|
116
|
+
}],
|
|
117
|
+
};
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
// =============================================================================
|
|
121
|
+
// Registry Definitions
|
|
122
|
+
// =============================================================================
|
|
123
|
+
/** Registry tool definitions for the delta-sync domain. */
|
|
124
|
+
export function deltaToolDefinitions() {
|
|
125
|
+
const tools = (ctx) => requireGraphToolset(ctx, 'delta');
|
|
126
|
+
return [
|
|
127
|
+
defineTool({
|
|
128
|
+
name: 'what_changed',
|
|
129
|
+
description: 'Report mailbox/calendar items added, updated, or deleted since the last check, using Graph delta sync against a local mirror. First call per resource sets a baseline. (Graph API)',
|
|
130
|
+
input: WhatChangedInput,
|
|
131
|
+
annotations: { readOnlyHint: true, openWorldHint: true },
|
|
132
|
+
destructive: false,
|
|
133
|
+
presets: ['mail', 'calendar'],
|
|
134
|
+
backends: ['graph'],
|
|
135
|
+
handler: (ctx, params) => tools(ctx).whatChanged(params),
|
|
136
|
+
}),
|
|
137
|
+
defineTool({
|
|
138
|
+
name: 'reset_change_tracking',
|
|
139
|
+
description: 'Clear the local delta-sync cursor and mirror so the next what_changed call re-baselines. Local-only; does not modify the mailbox. (Graph API)',
|
|
140
|
+
input: ResetChangeTrackingInput,
|
|
141
|
+
annotations: { readOnlyHint: false, idempotentHint: true },
|
|
142
|
+
destructive: false,
|
|
143
|
+
presets: ['mail', 'calendar'],
|
|
144
|
+
backends: ['graph'],
|
|
145
|
+
handler: (ctx, params) => tools(ctx).resetChangeTracking(params),
|
|
146
|
+
}),
|
|
147
|
+
];
|
|
148
|
+
}
|
|
149
|
+
//# sourceMappingURL=what-changed.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"what-changed.js","sourceRoot":"","sources":["../../src/tools/what-changed.ts"],"names":[],"mappings":"AAAA;;;GAGG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CAAC,mBAAmB,CAAC,MAAM,CAAC;SACjE,CAAC;KACH,CAAC;AACJ,CAAC"}
|
package/dist/types/calendar.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"calendar.d.ts","sourceRoot":"","sources":["../../src/types/calendar.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;GAEG;AAEH;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;CAC5B;AAED;;GAEG;AACH,MAAM,WAAW,YAAY;
|
|
1
|
+
{"version":3,"file":"calendar.d.ts","sourceRoot":"","sources":["../../src/types/calendar.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;GAEG;AAEH;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;CAC5B;AAED;;GAEG;AACH,MAAM,WAAW,YAAY;IAE3B,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9B,QAAQ,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IAClC,QAAQ,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IAChC,QAAQ,CAAC,WAAW,EAAE,OAAO,CAAC;IAC9B,QAAQ,CAAC,WAAW,EAAE,OAAO,CAAC;IAC9B,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAC;IAC/B,QAAQ,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,CAAC;CAC7B;AAED;;GAEG;AACH,MAAM,WAAW,KAAM,SAAQ,YAAY;IACzC,QAAQ,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACjC,QAAQ,CAAC,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IACpC,QAAQ,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IAClC,QAAQ,CAAC,SAAS,EAAE,SAAS,QAAQ,EAAE,CAAC;IACxC,QAAQ,CAAC,cAAc,EAAE,MAAM,GAAG,IAAI,CAAC;IACvC,QAAQ,CAAC,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;CACtC;AAED;;GAEG;AACH,MAAM,WAAW,QAAQ;IACvB,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,QAAQ,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9B,QAAQ,CAAC,MAAM,EAAE,cAAc,CAAC;CACjC;AAED;;GAEG;AACH,eAAO,MAAM,cAAc;;;;;;CAMjB,CAAC;AAEX,MAAM,MAAM,cAAc,GACxB,CAAC,OAAO,cAAc,CAAC,CAAC,MAAM,OAAO,cAAc,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"calendar.js","sourceRoot":"","sources":["../../src/types/calendar.ts"],"names":[],"mappings":"AAAA;;;GAGG;
|
|
1
|
+
{"version":3,"file":"calendar.js","sourceRoot":"","sources":["../../src/types/calendar.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAoDH;;GAEG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG;IAC5B,OAAO,EAAE,SAAS;IAClB,QAAQ,EAAE,UAAU;IACpB,QAAQ,EAAE,UAAU;IACpB,SAAS,EAAE,WAAW;IACtB,IAAI,EAAE,MAAM;CACJ,CAAC"}
|
package/dist/types/contacts.d.ts
CHANGED
|
@@ -17,7 +17,7 @@ export type ContactTypeValue = (typeof ContactType)[keyof typeof ContactType];
|
|
|
17
17
|
* Contact summary for list views.
|
|
18
18
|
*/
|
|
19
19
|
export interface ContactSummary {
|
|
20
|
-
readonly id:
|
|
20
|
+
readonly id: string;
|
|
21
21
|
readonly folderId: number;
|
|
22
22
|
readonly displayName: string | null;
|
|
23
23
|
readonly sortName: string | null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"contacts.d.ts","sourceRoot":"","sources":["../../src/types/contacts.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;GAEG;AAEH;;GAEG;AACH,eAAO,MAAM,WAAW;;;CAGd,CAAC;AAEX,MAAM,MAAM,gBAAgB,GAAG,CAAC,OAAO,WAAW,CAAC,CAAC,MAAM,OAAO,WAAW,CAAC,CAAC;AAE9E;;GAEG;AACH,MAAM,WAAW,cAAc;
|
|
1
|
+
{"version":3,"file":"contacts.d.ts","sourceRoot":"","sources":["../../src/types/contacts.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;GAEG;AAEH;;GAEG;AACH,eAAO,MAAM,WAAW;;;CAGd,CAAC;AAEX,MAAM,MAAM,gBAAgB,GAAG,CAAC,OAAO,WAAW,CAAC,CAAC,MAAM,OAAO,WAAW,CAAC,CAAC;AAE9E;;GAEG;AACH,MAAM,WAAW,cAAc;IAE7B,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IACpC,QAAQ,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACjC,QAAQ,CAAC,WAAW,EAAE,gBAAgB,CAAC;CACxC;AAED;;GAEG;AACH,MAAM,WAAW,OAAQ,SAAQ,cAAc;IAC7C,QAAQ,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IAClC,QAAQ,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACjC,QAAQ,CAAC,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IACnC,QAAQ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I,CAAC;IAC9B,QAAQ,CAAC,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IACnC,QAAQ,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;CACjC;AAED;;GAEG;AACH,eAAO,MAAM,WAAW;;;;CAId,CAAC;AAEX,MAAM,MAAM,WAAW,GAAG,CAAC,OAAO,WAAW,CAAC,CAAC,MAAM,OAAO,WAAW,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"contacts.js","sourceRoot":"","sources":["../../src/types/contacts.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;GAEG;AAEH;;GAEG;AACH,MAAM,CAAC,MAAM,WAAW,GAAG;IACzB,MAAM,EAAE,CAAC;IACT,gBAAgB,EAAE,CAAC;CACX,CAAC;
|
|
1
|
+
{"version":3,"file":"contacts.js","sourceRoot":"","sources":["../../src/types/contacts.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;GAEG;AAEH;;GAEG;AACH,MAAM,CAAC,MAAM,WAAW,GAAG;IACzB,MAAM,EAAE,CAAC;IACT,gBAAgB,EAAE,CAAC;CACX,CAAC;AAyCX;;GAEG;AACH,MAAM,CAAC,MAAM,SAAS,GAAG;IACvB,IAAI,EAAE,MAAM;IACZ,IAAI,EAAE,MAAM;IACZ,KAAK,EAAE,OAAO;CACN,CAAC;AAYX;;GAEG;AACH,MAAM,CAAC,MAAM,SAAS,GAAG;IACvB,IAAI,EAAE,MAAM;IACZ,IAAI,EAAE,MAAM;IACZ,MAAM,EAAE,QAAQ;IAChB,GAAG,EAAE,KAAK;IACV,KAAK,EAAE,OAAO;CACN,CAAC;AAgBX;;GAEG;AACH,MAAM,CAAC,MAAM,WAAW,GAAG;IACzB,IAAI,EAAE,MAAM;IACZ,IAAI,EAAE,MAAM;IACZ,KAAK,EAAE,OAAO;CACN,CAAC"}
|
package/dist/types/mail.d.ts
CHANGED
package/dist/types/mail.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mail.d.ts","sourceRoot":"","sources":["../../src/types/mail.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;GAEG;AAEH;;GAEG;AACH,eAAO,MAAM,iBAAiB;;;;;;;;CAQpB,CAAC;AAEX,MAAM,MAAM,sBAAsB,GAChC,CAAC,OAAO,iBAAiB,CAAC,CAAC,MAAM,OAAO,iBAAiB,CAAC,CAAC;AAE7D;;GAEG;AACH,eAAO,MAAM,QAAQ;;;;CAIX,CAAC;AAEX,MAAM,MAAM,aAAa,GAAG,CAAC,OAAO,QAAQ,CAAC,CAAC,MAAM,OAAO,QAAQ,CAAC,CAAC;AAErE;;GAEG;AACH,eAAO,MAAM,UAAU;;;;CAIb,CAAC;AAEX,MAAM,MAAM,eAAe,GAAG,CAAC,OAAO,UAAU,CAAC,CAAC,MAAM,OAAO,UAAU,CAAC,CAAC;AAE3E;;GAEG;AACH,MAAM,WAAW,MAAM;IACrB,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACjC,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;IAC9B,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;CAC9B;AAED;;GAEG;AACH,MAAM,WAAW,YAAY;
|
|
1
|
+
{"version":3,"file":"mail.d.ts","sourceRoot":"","sources":["../../src/types/mail.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;GAEG;AAEH;;GAEG;AACH,eAAO,MAAM,iBAAiB;;;;;;;;CAQpB,CAAC;AAEX,MAAM,MAAM,sBAAsB,GAChC,CAAC,OAAO,iBAAiB,CAAC,CAA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CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CAC5C"}
|
package/dist/types/mail.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mail.js","sourceRoot":"","sources":["../../src/types/mail.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;GAEG;AAEH;;GAEG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG;IAC/B,KAAK,EAAE,CAAC;IACR,MAAM,EAAE,CAAC;IACT,QAAQ,EAAE,CAAC;IACX,IAAI,EAAE,CAAC;IACP,OAAO,EAAE,CAAC;IACV,MAAM,EAAE,EAAE;IACV,IAAI,EAAE,EAAE;CACA,CAAC;AAKX;;GAEG;AACH,MAAM,CAAC,MAAM,QAAQ,GAAG;IACtB,IAAI,EAAE,CAAC;IACP,MAAM,EAAE,CAAC;IACT,GAAG,EAAE,CAAC;CACE,CAAC;AAIX;;GAEG;AACH,MAAM,CAAC,MAAM,UAAU,GAAG;IACxB,IAAI,EAAE,CAAC;IACP,OAAO,EAAE,CAAC;IACV,SAAS,EAAE,CAAC;CACJ,CAAC;
|
|
1
|
+
{"version":3,"file":"mail.js","sourceRoot":"","sources":["../../src/types/mail.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;GAEG;AAEH;;GAEG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG;IAC/B,KAAK,EAAE,CAAC;IACR,MAAM,EAAE,CAAC;IACT,QAAQ,EAAE,CAAC;IACX,IAAI,EAAE,CAAC;IACP,OAAO,EAAE,CAAC;IACV,MAAM,EAAE,EAAE;IACV,IAAI,EAAE,EAAE;CACA,CAAC;AAKX;;GAEG;AACH,MAAM,CAAC,MAAM,QAAQ,GAAG;IACtB,IAAI,EAAE,CAAC;IACP,MAAM,EAAE,CAAC;IACT,GAAG,EAAE,CAAC;CACE,CAAC;AAIX;;GAEG;AACH,MAAM,CAAC,MAAM,UAAU,GAAG;IACxB,IAAI,EAAE,CAAC;IACP,OAAO,EAAE,CAAC;IACV,SAAS,EAAE,CAAC;CACJ,CAAC;AAoEX,mDAAmD;AACnD,MAAM,CAAC,MAAM,4BAA4B,GAAG,EAAE,GAAG,IAAI,GAAG,IAAI,CAAC;AAE7D,wDAAwD;AACxD,MAAM,CAAC,MAAM,yBAAyB,GAAG,EAAE,GAAG,IAAI,GAAG,IAAI,CAAC"}
|
package/dist/utils/errors.d.ts
CHANGED
|
@@ -16,14 +16,12 @@ export declare const ErrorCode: {
|
|
|
16
16
|
readonly CONTENT_PARSE_ERROR: "CONTENT_PARSE_ERROR";
|
|
17
17
|
readonly VALIDATION_ERROR: "VALIDATION_ERROR";
|
|
18
18
|
readonly NOT_FOUND: "NOT_FOUND";
|
|
19
|
-
readonly OUTLOOK_NOT_RUNNING: "OUTLOOK_NOT_RUNNING";
|
|
20
|
-
readonly APPLESCRIPT_PERMISSION_DENIED: "APPLESCRIPT_PERMISSION_DENIED";
|
|
21
|
-
readonly APPLESCRIPT_TIMEOUT: "APPLESCRIPT_TIMEOUT";
|
|
22
|
-
readonly APPLESCRIPT_ERROR: "APPLESCRIPT_ERROR";
|
|
23
|
-
readonly GRAPH_AUTH_REQUIRED: "GRAPH_AUTH_REQUIRED";
|
|
24
19
|
readonly GRAPH_RATE_LIMITED: "GRAPH_RATE_LIMITED";
|
|
25
20
|
readonly GRAPH_PERMISSION_DENIED: "GRAPH_PERMISSION_DENIED";
|
|
26
21
|
readonly GRAPH_ERROR: "GRAPH_ERROR";
|
|
22
|
+
readonly AUTH_EXPIRED: "AUTH_EXPIRED";
|
|
23
|
+
readonly THROTTLED: "THROTTLED";
|
|
24
|
+
readonly GRAPH_UNAVAILABLE: "GRAPH_UNAVAILABLE";
|
|
27
25
|
readonly ATTACHMENT_NOT_FOUND: "ATTACHMENT_NOT_FOUND";
|
|
28
26
|
readonly ATTACHMENT_TOO_LARGE: "ATTACHMENT_TOO_LARGE";
|
|
29
27
|
readonly ATTACHMENT_SAVE_ERROR: "ATTACHMENT_SAVE_ERROR";
|
|
@@ -32,14 +30,30 @@ export declare const ErrorCode: {
|
|
|
32
30
|
readonly APPROVAL_EXPIRED: "APPROVAL_EXPIRED";
|
|
33
31
|
readonly APPROVAL_INVALID: "APPROVAL_INVALID";
|
|
34
32
|
readonly TARGET_CHANGED: "TARGET_CHANGED";
|
|
33
|
+
readonly READ_ONLY_MODE: "READ_ONLY_MODE";
|
|
34
|
+
readonly ID_UNKNOWN: "ID_UNKNOWN";
|
|
35
|
+
readonly ID_STALE: "ID_STALE";
|
|
36
|
+
readonly ID_COLLISION: "ID_COLLISION";
|
|
37
|
+
readonly ID_FOREIGN_ACCOUNT: "ID_FOREIGN_ACCOUNT";
|
|
38
|
+
readonly ID_ENTITY_MISMATCH: "ID_ENTITY_MISMATCH";
|
|
39
|
+
readonly NUMERIC_ID_UNSUPPORTED: "NUMERIC_ID_UNSUPPORTED";
|
|
35
40
|
};
|
|
36
41
|
export type ErrorCode = (typeof ErrorCode)[keyof typeof ErrorCode];
|
|
42
|
+
/** Per-error hints carried into the D10 envelope. */
|
|
43
|
+
export interface ErrorMeta {
|
|
44
|
+
/** True when the caller can reasonably retry the same operation. */
|
|
45
|
+
retriable?: boolean;
|
|
46
|
+
/** Actionable next step for the caller (agent or human). */
|
|
47
|
+
suggestion?: string;
|
|
48
|
+
}
|
|
37
49
|
/**
|
|
38
50
|
* Base class for all Outlook MCP errors.
|
|
39
51
|
*/
|
|
40
52
|
export declare abstract class OutlookMcpError extends Error {
|
|
41
53
|
abstract readonly code: ErrorCode;
|
|
42
|
-
|
|
54
|
+
readonly retriable: boolean;
|
|
55
|
+
readonly suggestion: string | undefined;
|
|
56
|
+
constructor(message: string, meta?: ErrorMeta);
|
|
43
57
|
}
|
|
44
58
|
/**
|
|
45
59
|
* Thrown when the Outlook database file cannot be found.
|
|
@@ -101,40 +115,14 @@ export declare function isOutlookMcpError(error: unknown): error is OutlookMcpEr
|
|
|
101
115
|
*/
|
|
102
116
|
export declare function wrapError(error: unknown, defaultMessage: string): OutlookMcpError;
|
|
103
117
|
/**
|
|
104
|
-
* Thrown when
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
constructor();
|
|
109
|
-
}
|
|
110
|
-
/**
|
|
111
|
-
* Thrown when AppleScript automation permission is denied.
|
|
112
|
-
*/
|
|
113
|
-
export declare class AppleScriptPermissionError extends OutlookMcpError {
|
|
114
|
-
readonly code: "APPLESCRIPT_PERMISSION_DENIED";
|
|
115
|
-
constructor();
|
|
116
|
-
}
|
|
117
|
-
/**
|
|
118
|
-
* Thrown when AppleScript execution times out.
|
|
119
|
-
*/
|
|
120
|
-
export declare class AppleScriptTimeoutError extends OutlookMcpError {
|
|
121
|
-
readonly code: "APPLESCRIPT_TIMEOUT";
|
|
122
|
-
constructor(operation: string);
|
|
123
|
-
}
|
|
124
|
-
/**
|
|
125
|
-
* Thrown for general AppleScript errors.
|
|
126
|
-
*/
|
|
127
|
-
export declare class AppleScriptError extends OutlookMcpError {
|
|
128
|
-
readonly cause?: Error | undefined;
|
|
129
|
-
readonly code: "APPLESCRIPT_ERROR";
|
|
130
|
-
constructor(message: string, cause?: Error | undefined);
|
|
131
|
-
}
|
|
132
|
-
/**
|
|
133
|
-
* Thrown when Microsoft Graph authentication is required.
|
|
118
|
+
* Thrown when Microsoft Graph authentication is required or a cached session has
|
|
119
|
+
* expired mid-run. Uses the D10 `AUTH_EXPIRED` code (the older
|
|
120
|
+
* `GRAPH_AUTH_REQUIRED` was never thrown and has been removed) so raw-401
|
|
121
|
+
* mapping and this typed path agree on one code for "you need to (re-)authenticate".
|
|
134
122
|
*/
|
|
135
123
|
export declare class GraphAuthRequiredError extends OutlookMcpError {
|
|
136
|
-
readonly code: "
|
|
137
|
-
constructor();
|
|
124
|
+
readonly code: "AUTH_EXPIRED";
|
|
125
|
+
constructor(reason?: 'not_authenticated' | 'session_expired');
|
|
138
126
|
}
|
|
139
127
|
/**
|
|
140
128
|
* Thrown when the Graph API rate limit is exceeded.
|
|
@@ -215,4 +203,88 @@ export declare class TargetChangedError extends OutlookMcpError {
|
|
|
215
203
|
readonly code: "TARGET_CHANGED";
|
|
216
204
|
constructor();
|
|
217
205
|
}
|
|
206
|
+
/**
|
|
207
|
+
* Thrown when a destructive/write tool is invoked while the server runs in
|
|
208
|
+
* `--read-only` mode (D13). Read-only filters these tools out of the surface,
|
|
209
|
+
* but a client can still call one by name — this is the runtime guard.
|
|
210
|
+
*/
|
|
211
|
+
export declare class ReadOnlyModeError extends OutlookMcpError {
|
|
212
|
+
readonly code: "READ_ONLY_MODE";
|
|
213
|
+
constructor(toolName: string);
|
|
214
|
+
}
|
|
215
|
+
/** A durable-ID token could not be resolved (unknown / cold composite token). */
|
|
216
|
+
export declare class IdUnknownError extends OutlookMcpError {
|
|
217
|
+
readonly code: "ID_UNKNOWN";
|
|
218
|
+
constructor(token: string, hint?: string);
|
|
219
|
+
}
|
|
220
|
+
/** A resolved ID no longer points at a live object (mutable ID drifted). */
|
|
221
|
+
export declare class IdStaleError extends OutlookMcpError {
|
|
222
|
+
readonly code: "ID_STALE";
|
|
223
|
+
constructor(token: string);
|
|
224
|
+
}
|
|
225
|
+
/** Two distinct keys minted the same composite token (D1a) — never mis-resolve. */
|
|
226
|
+
export declare class IdCollisionError extends OutlookMcpError {
|
|
227
|
+
readonly code: "ID_COLLISION";
|
|
228
|
+
constructor(token: string);
|
|
229
|
+
}
|
|
230
|
+
/** A token minted under a different signed-in account (D7). */
|
|
231
|
+
export declare class IdForeignAccountError extends OutlookMcpError {
|
|
232
|
+
readonly code: "ID_FOREIGN_ACCOUNT";
|
|
233
|
+
constructor(token: string);
|
|
234
|
+
}
|
|
235
|
+
/** A durable token for one entity kind was passed where another was expected. */
|
|
236
|
+
export declare class IdEntityMismatchError extends OutlookMcpError {
|
|
237
|
+
readonly code: "ID_ENTITY_MISMATCH";
|
|
238
|
+
constructor(token: string, expected: string, actual: string);
|
|
239
|
+
}
|
|
240
|
+
/** A legacy numeric (v2 hash) ID was passed on the Graph backend (D4). */
|
|
241
|
+
export declare class NumericIdUnsupportedError extends OutlookMcpError {
|
|
242
|
+
readonly code: "NUMERIC_ID_UNSUPPORTED";
|
|
243
|
+
constructor(id: string);
|
|
244
|
+
}
|
|
245
|
+
/**
|
|
246
|
+
* The stable, machine-readable shape returned for every tool failure. Ends the
|
|
247
|
+
* ad-hoc `GRAPH_ERROR:`/`DATABASE_ERROR:` string-prefix inconsistency: callers
|
|
248
|
+
* get a stable `code`, a human `message`, whether a retry could help
|
|
249
|
+
* (`retriable`), and an actionable `suggestion` when one exists.
|
|
250
|
+
*/
|
|
251
|
+
export interface ErrorEnvelope {
|
|
252
|
+
code: ErrorCode;
|
|
253
|
+
message: string;
|
|
254
|
+
retriable: boolean;
|
|
255
|
+
suggestion?: string;
|
|
256
|
+
}
|
|
257
|
+
/** Shape of a Microsoft Graph SDK error (has a numeric HTTP `statusCode`). */
|
|
258
|
+
export interface GraphSdkErrorLike {
|
|
259
|
+
statusCode: number;
|
|
260
|
+
code?: string;
|
|
261
|
+
message?: string;
|
|
262
|
+
}
|
|
263
|
+
/** True when `error` has the shape of a raw Graph SDK error (numeric `statusCode`). */
|
|
264
|
+
export declare function isGraphSdkError(error: unknown): error is GraphSdkErrorLike;
|
|
265
|
+
/** True when `code` is a member of the stable {@link ErrorCode} vocabulary. */
|
|
266
|
+
export declare function isKnownErrorCode(code: string): code is ErrorCode;
|
|
267
|
+
/**
|
|
268
|
+
* True when `value` already has the {@link ErrorEnvelope} shape *with a known
|
|
269
|
+
* code*. Requiring a real {@link ErrorCode} (not just any string) means an
|
|
270
|
+
* unrelated JSON payload that happens to carry `code`/`message`/`retriable`
|
|
271
|
+
* fields is not mistaken for an envelope by {@link ensureErrorEnvelopeText}.
|
|
272
|
+
*/
|
|
273
|
+
export declare function isErrorEnvelope(value: unknown): value is ErrorEnvelope;
|
|
274
|
+
/**
|
|
275
|
+
* Normalizes the text of a tool's error result into a D10 envelope JSON string.
|
|
276
|
+
* Thrown failures already funnel through {@link toErrorEnvelope} at the dispatch
|
|
277
|
+
* chokepoint, but many handlers return `{ isError: true, text: '…' }` directly
|
|
278
|
+
* (not-found, approval-token mismatches, etc.). Passing those through here keeps
|
|
279
|
+
* a single stable error shape across *every* failure path. Text that is already
|
|
280
|
+
* a valid envelope is returned unchanged (idempotent — never double-wraps).
|
|
281
|
+
*/
|
|
282
|
+
export declare function ensureErrorEnvelopeText(text: string): string;
|
|
283
|
+
/**
|
|
284
|
+
* Single mapping point (D10): converts any thrown value into a stable
|
|
285
|
+
* {@link ErrorEnvelope}. Typed {@link OutlookMcpError}s carry their own
|
|
286
|
+
* code/retriable/suggestion; raw Graph SDK errors are mapped by HTTP status;
|
|
287
|
+
* everything else becomes a non-retriable `GRAPH_ERROR`.
|
|
288
|
+
*/
|
|
289
|
+
export declare function toErrorEnvelope(error: unknown): ErrorEnvelope;
|
|
218
290
|
//# sourceMappingURL=errors.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../src/utils/errors.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;GAEG;AAEH;;GAEG;AACH,eAAO,MAAM,SAAS
|
|
1
|
+
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../src/utils/errors.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;GAEG;AAEH;;GAEG;AACH,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA+BZ,CAAC;AAEX,MAAM,MAAM,SAAS,GAAG,CAAC,OAAO,SAAS,CAAC,CAAC,MAAM,OAAO,SAAS,CAAC,CAAC;AAEnE,qDAAqD;AACrD,MAAM,WAAW,SAAS;IACxB,oEAAoE;IACpE,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,4DAA4D;IAC5D,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED;;GAEG;AACH,8BAAsB,eAAgB,SAAQ,KAAK;IACjD,QAAQ,CAAC,Q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