@daywatch/mcp 0.1.2 → 0.5.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 +67 -0
- package/README.md +39 -0
- package/dist/_version.d.ts +2 -0
- package/dist/_version.d.ts.map +1 -0
- package/dist/_version.js +2 -0
- package/dist/_version.js.map +1 -0
- package/dist/adapters/gcal.d.ts +5 -0
- package/dist/adapters/gcal.d.ts.map +1 -1
- package/dist/adapters/gcal.js +89 -15
- package/dist/adapters/gcal.js.map +1 -1
- package/dist/adapters/msft.d.ts +6 -0
- package/dist/adapters/msft.d.ts.map +1 -1
- package/dist/adapters/msft.js +20 -3
- package/dist/adapters/msft.js.map +1 -1
- package/dist/adapters/types.d.ts +19 -3
- package/dist/adapters/types.d.ts.map +1 -1
- package/dist/server.d.ts.map +1 -1
- package/dist/server.js +529 -12
- package/dist/server.js.map +1 -1
- package/dist/state.d.ts +16 -1
- package/dist/state.d.ts.map +1 -1
- package/dist/state.js +4 -1
- package/dist/state.js.map +1 -1
- package/package.json +5 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,72 @@
|
|
|
1
1
|
# @daywatch/mcp
|
|
2
2
|
|
|
3
|
+
## 0.5.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 83838a8: Conflict detection is now free/busy-aware. Ranges, occurrences and conflict participants carry an optional `transparency` signal (`'opaque'` | `'transparent'`, absent = busy): busy all-day spans occupy the full day and conflict with anything on that day, transparent ranges never occupy time or conflict, and emitted `Conflict` participants carry `allDay`/`eventType` metadata so callers can grade severity. The gcal and msft adapters now load transparent/free events with the flag carried through instead of dropping them (`includeTransparent`/`includeFree` are deprecated no-ops), the ics parser sets `transparency: 'transparent'` from `TRANSP:TRANSPARENT`, and cal-rules admits `transparency` as a known range key.
|
|
8
|
+
- Version bump across all published packages
|
|
9
|
+
|
|
10
|
+
### Patch Changes
|
|
11
|
+
|
|
12
|
+
- 832c856: gcal adapter: accept the raw Google Calendar API format. Declined events (response on the `self` attendee) and uppercase `WORKING_LOCATION`/`BIRTHDAY` event types were loaded as busy time, and the UTC offset in `dateTime` was dropped, so events organized in another zone landed at the wrong time. Offset-bearing dateTimes are now re-expressed in the range's zone, or pinned to UTC when `timeZone` is absent, so no offset-bearing time stays floating.
|
|
13
|
+
- Updated dependencies [83838a8]
|
|
14
|
+
- Updated dependencies [832c856]
|
|
15
|
+
- Updated dependencies
|
|
16
|
+
- @daywatch/cal@0.3.0
|
|
17
|
+
- @daywatch/ical@0.2.0
|
|
18
|
+
|
|
19
|
+
## 0.4.1
|
|
20
|
+
|
|
21
|
+
### Patch Changes
|
|
22
|
+
|
|
23
|
+
- Republish. `0.1.3` through `0.4.0` were tagged in git but never reached npm: the `Publish` workflow's `workflow_run` trigger matched the display name `CI`, which was renamed to `CI (JS)`, so publishing stopped on 2026-05-16. This release carries all of them.
|
|
24
|
+
|
|
25
|
+
## 0.4.0
|
|
26
|
+
|
|
27
|
+
### Minor Changes
|
|
28
|
+
|
|
29
|
+
- 7220b5d: Add `load_calendar_url` tool: fetch an .ics feed by URL (incident.io schedule feeds, published calendar links) and load it directly into the session, removing the harness-side fetch step that behaved inconsistently across clients. Accepts https and webcal URLs; plain http is allowed for localhost only, and redirects are followed manually (max 5 hops) with every hop re-validated against the same scheme/host policy. The fetch uses the built-in Node fetch with a 30s timeout, a 20 MB streamed size cap, and body sniffing (`BEGIN:VCALENDAR`) instead of trusting Content-Type. Auth tokens embedded in feed URLs are redacted from all results and error messages, and failure classes (timeout, network, non-2xx, empty body, HTML body) each surface a distinct actionable error.
|
|
30
|
+
|
|
31
|
+
## 0.3.0
|
|
32
|
+
|
|
33
|
+
### Minor Changes
|
|
34
|
+
|
|
35
|
+
- 51a4e91: `load_calendar_file` now accepts a `source` of `"ics"` (default), `"gcal"`, or `"msft"`, so Google Calendar / Microsoft Graph JSON can be loaded **by path** — not just `.ics`. This is the clean answer when a `list_events` result is too large to pass through the conversation: the harness saves it to a temp file, and `load_calendar_file({ path, source: "gcal" })` reads it straight off disk through the same adapters `load_calendar` uses (transparency/declined filtering, timezone reconciliation, the multi-day `duration` fix) — no trimming, flattening, or context round-trip. gcal/msft files may be a bare event array or a raw result object with an `events` array. Server instructions updated to point at this instead of slicing oversized payloads.
|
|
36
|
+
|
|
37
|
+
### Patch Changes
|
|
38
|
+
|
|
39
|
+
- 417137e: Auto-align MCP `serverInfo.version` with `package.json` via build-time version constant instead of hardcoded string
|
|
40
|
+
|
|
41
|
+
## 0.2.0
|
|
42
|
+
|
|
43
|
+
### Minor Changes
|
|
44
|
+
|
|
45
|
+
- 832c77d: Add a `list_ranges` MCP tool that enumerates the stored DateRanges across loaded calendars with summary metadata (ids, labels, date bounds, recurrence summaries, compact event metadata). gcal/msft recurring-event instances are grouped into one row per series by default (`group_by: "none"` to disable), labels can be filtered with a `label_match` regex (capped at 256 chars), and an opt-in `count_within` window computes occurrence counts and first/last occurrence dates — with `occurrence_unit` selecting between counting individual events (default) or distinct days. Loaded calendars now also persist their effective ics parse window, reported by both `list_ranges` and `list_calendars` so callers can tell whether a listing is clipped.
|
|
46
|
+
|
|
47
|
+
## 0.1.4
|
|
48
|
+
|
|
49
|
+
### Patch Changes
|
|
50
|
+
|
|
51
|
+
- 584c9fc: Fix conflict/occupancy detection for continuous multi-day timed events (e.g. a week-long on-call shift, or a multi-day OOO) — including those loaded from Google Calendar / Outlook, which is the common case.
|
|
52
|
+
|
|
53
|
+
Such an event is one block from `fromDate@startTime` to `toDate@endTime`, but `getTimeSlots` was applying the boundary times to every day, collapsing the span to a zero-width point (`12:00→12:00`). Interior days registered no occupancy, so `findConflicts` (and free-slot / day-detail) missed every overlap. `getTimeSlots` now expands a continuous span correctly: first day `startTime→24:00`, interior days `00:00→24:00`, last day `00:00→endTime`.
|
|
54
|
+
|
|
55
|
+
A continuous span shares the same `fromDate/toDate/startTime/endTime` shape as a _daily window repeated over a date range_; they're told apart by `duration` (a span's duration overflows its first day). The `.ics` parser already set `duration`, but the **gcal and msft adapters did not** — so multi-day events loaded from those sources were indistinguishable from daily windows and hit the bug. Both adapters now set `duration` (total elapsed minutes), matching the `.ics` parser.
|
|
56
|
+
|
|
57
|
+
Ported to the Rust evaluator; shared conformance fixture `conflicts/multi_day_span.json` plus adapter and evaluator unit tests keep the engines in lockstep.
|
|
58
|
+
|
|
59
|
+
## 0.1.3
|
|
60
|
+
|
|
61
|
+
### Patch Changes
|
|
62
|
+
|
|
63
|
+
- e7608ad: Clarify in the server instructions and `load_calendar` docs that gcal/msft events should be fed through their native `source`, not hand-converted to `ranges`. Flattening drops the transparency/declined filtering and per-event timezone reconciliation the native parsers do, which silently corrupts scoring. Also note that an oversized upstream `list_events` result is a reason to slice it by date window, not to downgrade it to ranges.
|
|
64
|
+
- b694eb1: Implement `fixedBetween` semantics in both evaluators
|
|
65
|
+
|
|
66
|
+
`fixedBetween: true` on a `DateRange` now correctly matches every day between `fromDate` and `toDate`, bypassing recurrence filters (`everyWeekday`, `everyDate`, `everyMonth`) while still respecting exclusions (`exceptDates`, `exceptBetween`). Previously this property was only used by the iCal RRULE mapper and was silently ignored at evaluation time.
|
|
67
|
+
|
|
68
|
+
Fixes #16.
|
|
69
|
+
|
|
3
70
|
## 0.1.2
|
|
4
71
|
|
|
5
72
|
### Patch Changes
|
package/README.md
CHANGED
|
@@ -24,6 +24,45 @@ npx @daywatch/mcp
|
|
|
24
24
|
|
|
25
25
|
Your MCP client will start the process and communicate over stdin/stdout.
|
|
26
26
|
|
|
27
|
+
## Standalone binary (no Node required)
|
|
28
|
+
|
|
29
|
+
If you don't have Node.js — or just want a single self-contained executable — download a prebuilt binary instead of using `npx`. Each [GitHub Release](https://github.com/sdougbrown/daywatch-cal/releases) ships one binary per platform plus a `sha256sums.txt` to verify against:
|
|
30
|
+
|
|
31
|
+
| Platform | Asset |
|
|
32
|
+
| --- | --- |
|
|
33
|
+
| macOS (Apple Silicon) | `daywatch-mcp-darwin-arm64` |
|
|
34
|
+
| macOS (Intel) | `daywatch-mcp-darwin-x64` |
|
|
35
|
+
| Linux (x64) | `daywatch-mcp-linux-x64` |
|
|
36
|
+
| Linux (arm64) | `daywatch-mcp-linux-arm64` |
|
|
37
|
+
| Windows (x64) | `daywatch-mcp-windows-x64.exe` |
|
|
38
|
+
|
|
39
|
+
These embed the Bun runtime and all dependencies — no Node, no `npx`, no global install.
|
|
40
|
+
|
|
41
|
+
**macOS / Linux:**
|
|
42
|
+
|
|
43
|
+
```bash
|
|
44
|
+
chmod +x ./daywatch-mcp-darwin-arm64
|
|
45
|
+
# macOS only: clear the download quarantine so Gatekeeper allows it
|
|
46
|
+
xattr -d com.apple.quarantine ./daywatch-mcp-darwin-arm64 2>/dev/null || true
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
Then point your client's `command` at the binary path with no `args`:
|
|
50
|
+
|
|
51
|
+
```json
|
|
52
|
+
{
|
|
53
|
+
"mcpServers": {
|
|
54
|
+
"daywatch-cal": {
|
|
55
|
+
"command": "/absolute/path/to/daywatch-mcp-darwin-arm64",
|
|
56
|
+
"args": []
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
**Windows:** use the full path to `daywatch-mcp-windows-x64.exe`. SmartScreen may warn once ("unknown publisher") — choose **More info → Run anyway**.
|
|
63
|
+
|
|
64
|
+
> Enterprise-managed machines with locked Gatekeeper / SmartScreen policy may block unsigned binaries outright. On those, use the `npx` configuration below — it inherits Node's trust. The same binaries are what the daywatch Claude Code plugin downloads on first launch, so the plugin and a direct Claude Desktop config consume identical release assets.
|
|
65
|
+
|
|
27
66
|
## Configuration
|
|
28
67
|
|
|
29
68
|
### Claude Desktop
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"_version.d.ts","sourceRoot":"","sources":["../src/_version.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,OAAO,UAAU,CAAC"}
|
package/dist/_version.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"_version.js","sourceRoot":"","sources":["../src/_version.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,OAAO,GAAG,OAAO,CAAC"}
|
package/dist/adapters/gcal.d.ts
CHANGED
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
import type { DateRange } from '@daywatch/cal';
|
|
2
2
|
import type { GCalAdapterOptions, GCalEvent } from './types.js';
|
|
3
|
+
/**
|
|
4
|
+
* Whether an event loads as a range. Cancelled, declined, working-location
|
|
5
|
+
* and birthday events are excluded; transparent events now load too, with
|
|
6
|
+
* their transparency carried so conflict detection can treat them as free.
|
|
7
|
+
*/
|
|
3
8
|
export declare function isBlockingEvent(event: GCalEvent, options?: GCalAdapterOptions): boolean;
|
|
4
9
|
export declare function subtractOneDay(dateStr: string): string;
|
|
5
10
|
export declare function gcalEventToDateRange(event: GCalEvent, options?: GCalAdapterOptions): DateRange;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gcal.d.ts","sourceRoot":"","sources":["../../src/adapters/gcal.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"gcal.d.ts","sourceRoot":"","sources":["../../src/adapters/gcal.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAE/C,OAAO,KAAK,EAAE,kBAAkB,EAAE,SAAS,EAAqB,MAAM,YAAY,CAAC;AAiCnF;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,SAAS,EAAE,OAAO,GAAE,kBAAuB,GAAG,OAAO,CAQ3F;AAED,wBAAgB,cAAc,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAKtD;AAkBD,wBAAgB,oBAAoB,CAClC,KAAK,EAAE,SAAS,EAChB,OAAO,GAAE,kBAAuB,GAC/B,SAAS,CA6EX;AAED,wBAAgB,sBAAsB,CACpC,MAAM,EAAE,SAAS,EAAE,EACnB,OAAO,GAAE,kBAAuB,GAC/B,SAAS,EAAE,CAIb"}
|
package/dist/adapters/gcal.js
CHANGED
|
@@ -1,14 +1,44 @@
|
|
|
1
|
-
import { formatDate, parseDate } from '@daywatch/cal';
|
|
1
|
+
import { formatDate, formatDateInTimezone, formatTime, getTimeInTimezone, parseDate, } from '@daywatch/cal';
|
|
2
|
+
function hasExplicitOffset(dateTime) {
|
|
3
|
+
return /(?:Z|z|[+-]\d{2}:\d{2})$/.test(dateTime);
|
|
4
|
+
}
|
|
5
|
+
/**
|
|
6
|
+
* The raw API format puts the current user's response on their self attendee;
|
|
7
|
+
* the condensed format folds it into myResponseStatus. Prefer the self
|
|
8
|
+
* attendee when present.
|
|
9
|
+
*/
|
|
10
|
+
function getMyResponseStatus(event) {
|
|
11
|
+
const selfAttendee = event.attendees?.find((attendee) => attendee.self);
|
|
12
|
+
return selfAttendee?.responseStatus ?? event.myResponseStatus;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* The raw API sends eventType in uppercase (WORKING_LOCATION, BIRTHDAY);
|
|
16
|
+
* map those to the condensed camelCase form. Condensed-format values pass
|
|
17
|
+
* through verbatim — lowercasing them would mangle camelCase names like
|
|
18
|
+
* 'workingLocation' into 'workinglocation'.
|
|
19
|
+
*/
|
|
20
|
+
function normalizeEventType(eventType) {
|
|
21
|
+
if (!eventType)
|
|
22
|
+
return eventType;
|
|
23
|
+
if (eventType !== eventType.toUpperCase())
|
|
24
|
+
return eventType;
|
|
25
|
+
return eventType.toLowerCase().replace(/_([a-z])/g, (_, letter) => letter.toUpperCase());
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Whether an event loads as a range. Cancelled, declined, working-location
|
|
29
|
+
* and birthday events are excluded; transparent events now load too, with
|
|
30
|
+
* their transparency carried so conflict detection can treat them as free.
|
|
31
|
+
*/
|
|
2
32
|
export function isBlockingEvent(event, options = {}) {
|
|
3
33
|
if (event.status === 'cancelled')
|
|
4
34
|
return false;
|
|
5
|
-
|
|
35
|
+
const eventType = normalizeEventType(event.eventType);
|
|
36
|
+
if (eventType === 'workingLocation' || eventType === 'birthday')
|
|
6
37
|
return false;
|
|
7
|
-
|
|
38
|
+
const myResponseStatus = getMyResponseStatus(event);
|
|
39
|
+
if (myResponseStatus === 'declined')
|
|
8
40
|
return false;
|
|
9
|
-
if (
|
|
10
|
-
return false;
|
|
11
|
-
if (event.myResponseStatus === 'tentative' && options.includeTentative === false)
|
|
41
|
+
if (myResponseStatus === 'tentative' && options.includeTentative === false)
|
|
12
42
|
return false;
|
|
13
43
|
return true;
|
|
14
44
|
}
|
|
@@ -18,14 +48,31 @@ export function subtractOneDay(dateStr) {
|
|
|
18
48
|
date.setDate(date.getDate() - 1);
|
|
19
49
|
return formatDate(date);
|
|
20
50
|
}
|
|
51
|
+
/**
|
|
52
|
+
* Date (and time, when present) fields for a dateTime string, expressed in
|
|
53
|
+
* `timeZone`. Offset-bearing dateTimes are parsed to an instant and formatted
|
|
54
|
+
* in the zone; offset-free dateTimes keep their wall clock untouched.
|
|
55
|
+
*/
|
|
56
|
+
function resolveZonedFields(dateTime, timeZone) {
|
|
57
|
+
const time = dateTime.length > 10 ? dateTime.slice(11, 16) : undefined;
|
|
58
|
+
const ms = Date.parse(dateTime);
|
|
59
|
+
if (!time || !hasExplicitOffset(dateTime) || !timeZone || Number.isNaN(ms)) {
|
|
60
|
+
return { date: dateTime.slice(0, 10), time };
|
|
61
|
+
}
|
|
62
|
+
const date = new Date(ms);
|
|
63
|
+
const { hour, minute } = getTimeInTimezone(date, timeZone);
|
|
64
|
+
return { date: formatDateInTimezone(date, timeZone), time: formatTime(hour, minute) };
|
|
65
|
+
}
|
|
21
66
|
export function gcalEventToDateRange(event, options = {}) {
|
|
22
67
|
const metadata = {
|
|
23
68
|
gcalId: event.id,
|
|
24
69
|
};
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
70
|
+
const eventType = normalizeEventType(event.eventType);
|
|
71
|
+
if (eventType)
|
|
72
|
+
metadata.eventType = eventType;
|
|
73
|
+
const myResponseStatus = getMyResponseStatus(event);
|
|
74
|
+
if (myResponseStatus)
|
|
75
|
+
metadata.responseStatus = myResponseStatus;
|
|
29
76
|
if (event.transparency)
|
|
30
77
|
metadata.transparency = event.transparency;
|
|
31
78
|
if (event.numAttendees)
|
|
@@ -35,6 +82,11 @@ export function gcalEventToDateRange(event, options = {}) {
|
|
|
35
82
|
if (event.htmlLink)
|
|
36
83
|
metadata.htmlLink = event.htmlLink;
|
|
37
84
|
const label = event.summary ?? options.fallbackLabel ?? '(busy)';
|
|
85
|
+
const transparency = event.transparency === 'transparent'
|
|
86
|
+
? 'transparent'
|
|
87
|
+
: event.transparency === 'opaque'
|
|
88
|
+
? 'opaque'
|
|
89
|
+
: undefined;
|
|
38
90
|
const isAllDay = event.allDay || (event.start.date != null && event.start.dateTime == null);
|
|
39
91
|
if (isAllDay) {
|
|
40
92
|
const fromDate = event.start.date ?? event.start.dateTime?.slice(0, 10);
|
|
@@ -44,6 +96,8 @@ export function gcalEventToDateRange(event, options = {}) {
|
|
|
44
96
|
label,
|
|
45
97
|
fromDate,
|
|
46
98
|
toDate: endDate ? subtractOneDay(endDate) : fromDate,
|
|
99
|
+
...(transparency !== undefined ? { transparency } : {}),
|
|
100
|
+
...(eventType !== undefined ? { eventType } : {}),
|
|
47
101
|
metadata,
|
|
48
102
|
};
|
|
49
103
|
}
|
|
@@ -53,14 +107,34 @@ export function gcalEventToDateRange(event, options = {}) {
|
|
|
53
107
|
// Defensive fallback — event has no usable time data
|
|
54
108
|
return { id: event.id, label, metadata };
|
|
55
109
|
}
|
|
110
|
+
// Set duration (total elapsed minutes) so the evaluator can tell a
|
|
111
|
+
// continuous multi-day block (e.g. a week-long shift) apart from a daily
|
|
112
|
+
// time window repeated over a date range — they share the same
|
|
113
|
+
// fromDate/toDate/startTime/endTime shape and differ only by duration.
|
|
114
|
+
const startMs = Date.parse(startDateTime);
|
|
115
|
+
const endMs = Date.parse(endDateTime);
|
|
116
|
+
const hasDuration = Number.isFinite(startMs) && Number.isFinite(endMs) && endMs > startMs;
|
|
117
|
+
// The dateTime offset is the source of truth for the instant. fromDate,
|
|
118
|
+
// toDate, startTime and endTime are re-expressed in the zone the range
|
|
119
|
+
// carries. A dateTime written in one zone and tagged with another then
|
|
120
|
+
// lands at the right time. An event that crosses midnight after conversion
|
|
121
|
+
// gets the right dates. Offset-free dateTimes keep their wall clock as-is.
|
|
122
|
+
// With no timeZone field, an offset-bearing dateTime is pinned to UTC so
|
|
123
|
+
// it is never compared as floating time; offset-free ones stay floating.
|
|
124
|
+
const timeZone = event.start.timeZone ?? (hasExplicitOffset(startDateTime) ? 'UTC' : undefined);
|
|
125
|
+
const startFields = resolveZonedFields(startDateTime, timeZone);
|
|
126
|
+
const endFields = resolveZonedFields(endDateTime, timeZone);
|
|
56
127
|
return {
|
|
57
128
|
id: event.id,
|
|
58
129
|
label,
|
|
59
|
-
fromDate:
|
|
60
|
-
toDate:
|
|
61
|
-
startTime:
|
|
62
|
-
endTime:
|
|
63
|
-
|
|
130
|
+
fromDate: startFields.date,
|
|
131
|
+
toDate: endFields.date,
|
|
132
|
+
startTime: startFields.time,
|
|
133
|
+
endTime: endFields.time,
|
|
134
|
+
duration: hasDuration ? Math.round((endMs - startMs) / 60000) : undefined,
|
|
135
|
+
timezone: timeZone,
|
|
136
|
+
...(transparency !== undefined ? { transparency } : {}),
|
|
137
|
+
...(eventType !== undefined ? { eventType } : {}),
|
|
64
138
|
metadata,
|
|
65
139
|
};
|
|
66
140
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gcal.js","sourceRoot":"","sources":["../../src/adapters/gcal.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"gcal.js","sourceRoot":"","sources":["../../src/adapters/gcal.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,UAAU,EACV,oBAAoB,EACpB,UAAU,EACV,iBAAiB,EAC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AAE,OAAO,CAAC,CAAC;SAClD,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,oBAAoB,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC,CAAC;AAC1D,CAAC"}
|
package/dist/adapters/msft.d.ts
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
import type { DateRange } from '@daywatch/cal';
|
|
2
2
|
import type { MsftAdapterOptions, MsftGraphEvent } from './types.js';
|
|
3
|
+
/**
|
|
4
|
+
* Whether an event loads as a range. Cancelled, declined and seriesMaster
|
|
5
|
+
* events are excluded; free/workingElsewhere events now load too, with
|
|
6
|
+
* their busy/free signal carried so conflict detection can treat them as
|
|
7
|
+
* free.
|
|
8
|
+
*/
|
|
3
9
|
export declare function isBlockingMsftEvent(event: MsftGraphEvent, options?: MsftAdapterOptions): boolean;
|
|
4
10
|
export declare function msftEventToDateRange(event: MsftGraphEvent, options?: MsftAdapterOptions): DateRange;
|
|
5
11
|
export declare function msftEventsToDateRanges(events: MsftGraphEvent[], options?: MsftAdapterOptions): DateRange[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"msft.d.ts","sourceRoot":"","sources":["../../src/adapters/msft.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAG/C,OAAO,KAAK,EAAE,kBAAkB,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAGrE,wBAAgB,mBAAmB,CACjC,KAAK,EAAE,cAAc,EACrB,OAAO,GAAE,kBAAuB,GAC/B,OAAO,
|
|
1
|
+
{"version":3,"file":"msft.d.ts","sourceRoot":"","sources":["../../src/adapters/msft.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAG/C,OAAO,KAAK,EAAE,kBAAkB,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAGrE;;;;;GAKG;AACH,wBAAgB,mBAAmB,CACjC,KAAK,EAAE,cAAc,EACrB,OAAO,GAAE,kBAAuB,GAC/B,OAAO,CAMT;AAED,wBAAgB,oBAAoB,CAClC,KAAK,EAAE,cAAc,EACrB,OAAO,GAAE,kBAAuB,GAC/B,SAAS,CAuDX;AAED,wBAAgB,sBAAsB,CACpC,MAAM,EAAE,cAAc,EAAE,EACxB,OAAO,GAAE,kBAAuB,GAC/B,SAAS,EAAE,CAIb"}
|
package/dist/adapters/msft.js
CHANGED
|
@@ -1,13 +1,16 @@
|
|
|
1
1
|
import { subtractOneDay } from './gcal.js';
|
|
2
2
|
import { toIanaTimezone } from './windows-timezones.js';
|
|
3
|
+
/**
|
|
4
|
+
* Whether an event loads as a range. Cancelled, declined and seriesMaster
|
|
5
|
+
* events are excluded; free/workingElsewhere events now load too, with
|
|
6
|
+
* their busy/free signal carried so conflict detection can treat them as
|
|
7
|
+
* free.
|
|
8
|
+
*/
|
|
3
9
|
export function isBlockingMsftEvent(event, options = {}) {
|
|
4
10
|
if (event.isCancelled)
|
|
5
11
|
return false;
|
|
6
12
|
if (event.type === 'seriesMaster')
|
|
7
13
|
return false;
|
|
8
|
-
if ((event.showAs === 'free' || event.showAs === 'workingElsewhere') &&
|
|
9
|
-
options.includeFree !== true)
|
|
10
|
-
return false;
|
|
11
14
|
if (event.responseStatus?.response === 'declined')
|
|
12
15
|
return false;
|
|
13
16
|
if (event.showAs === 'tentative' && options.includeTentative === false)
|
|
@@ -29,6 +32,11 @@ export function msftEventToDateRange(event, options = {}) {
|
|
|
29
32
|
if (event.webLink)
|
|
30
33
|
metadata.webLink = event.webLink;
|
|
31
34
|
const label = event.subject ?? options.fallbackLabel ?? '(busy)';
|
|
35
|
+
const transparency = event.showAs === 'free' || event.showAs === 'workingElsewhere'
|
|
36
|
+
? 'transparent'
|
|
37
|
+
: event.showAs !== undefined
|
|
38
|
+
? 'opaque'
|
|
39
|
+
: undefined;
|
|
32
40
|
const startDt = event.start?.dateTime;
|
|
33
41
|
const endDt = event.end?.dateTime;
|
|
34
42
|
if (!startDt || !endDt) {
|
|
@@ -40,9 +48,16 @@ export function msftEventToDateRange(event, options = {}) {
|
|
|
40
48
|
label,
|
|
41
49
|
fromDate: startDt.slice(0, 10),
|
|
42
50
|
toDate: subtractOneDay(endDt.slice(0, 10)),
|
|
51
|
+
...(transparency !== undefined ? { transparency } : {}),
|
|
43
52
|
metadata,
|
|
44
53
|
};
|
|
45
54
|
}
|
|
55
|
+
// Set duration (total elapsed minutes) so the evaluator can distinguish a
|
|
56
|
+
// continuous multi-day block from a daily window repeated over a date range
|
|
57
|
+
// — same fromDate/toDate/startTime/endTime shape, told apart by duration.
|
|
58
|
+
const startMs = Date.parse(startDt);
|
|
59
|
+
const endMs = Date.parse(endDt);
|
|
60
|
+
const hasDuration = Number.isFinite(startMs) && Number.isFinite(endMs) && endMs > startMs;
|
|
46
61
|
return {
|
|
47
62
|
id: event.id,
|
|
48
63
|
label,
|
|
@@ -50,7 +65,9 @@ export function msftEventToDateRange(event, options = {}) {
|
|
|
50
65
|
toDate: endDt.slice(0, 10),
|
|
51
66
|
startTime: startDt.length > 10 ? startDt.slice(11, 16) : undefined,
|
|
52
67
|
endTime: endDt.length > 10 ? endDt.slice(11, 16) : undefined,
|
|
68
|
+
duration: hasDuration ? Math.round((endMs - startMs) / 60000) : undefined,
|
|
53
69
|
timezone: toIanaTimezone(event.start.timeZone),
|
|
70
|
+
...(transparency !== undefined ? { transparency } : {}),
|
|
54
71
|
metadata,
|
|
55
72
|
};
|
|
56
73
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"msft.js","sourceRoot":"","sources":["../../src/adapters/msft.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAE3C,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAExD,MAAM,UAAU,mBAAmB,CACjC,KAAqB,EACrB,UAA8B,EAAE;IAEhC,IAAI,KAAK,CAAC,WAAW;QAAE,OAAO,KAAK,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+1,10 @@
|
|
|
1
1
|
import type { DateRange } from '@daywatch/cal';
|
|
2
|
+
/** An attendee entry from the raw Google Calendar API format. */
|
|
3
|
+
export interface GCalEventAttendee {
|
|
4
|
+
email?: string;
|
|
5
|
+
responseStatus?: string;
|
|
6
|
+
self?: boolean;
|
|
7
|
+
}
|
|
2
8
|
/** Google Calendar event as returned by gcal_list_events (condensed format). */
|
|
3
9
|
export interface GCalEvent {
|
|
4
10
|
id: string;
|
|
@@ -15,11 +21,13 @@ export interface GCalEvent {
|
|
|
15
21
|
dateTime?: string;
|
|
16
22
|
timeZone?: string;
|
|
17
23
|
};
|
|
18
|
-
allDay
|
|
24
|
+
allDay?: boolean;
|
|
19
25
|
status: string;
|
|
20
26
|
eventType?: string;
|
|
21
27
|
transparency?: string;
|
|
22
28
|
myResponseStatus?: string;
|
|
29
|
+
/** Raw API format only — the condensed format folds the self attendee into myResponseStatus. */
|
|
30
|
+
attendees?: GCalEventAttendee[];
|
|
23
31
|
numAttendees?: number;
|
|
24
32
|
recurringEventId?: string;
|
|
25
33
|
htmlLink?: string;
|
|
@@ -40,7 +48,11 @@ export interface GCalEvent {
|
|
|
40
48
|
export interface GCalAdapterOptions {
|
|
41
49
|
/** Include tentative events as blocking (default: true) */
|
|
42
50
|
includeTentative?: boolean;
|
|
43
|
-
/**
|
|
51
|
+
/**
|
|
52
|
+
* Deprecated no-op. Transparent/FYI events now always load, with their
|
|
53
|
+
* transparency carried on the range so conflict detection treats them
|
|
54
|
+
* as free.
|
|
55
|
+
*/
|
|
44
56
|
includeTransparent?: boolean;
|
|
45
57
|
/** Fallback label for events with no summary (default: "(busy)") */
|
|
46
58
|
fallbackLabel?: string;
|
|
@@ -87,7 +99,11 @@ export interface MsftGraphEvent {
|
|
|
87
99
|
export interface MsftAdapterOptions {
|
|
88
100
|
/** Include tentative events as blocking (default: true) */
|
|
89
101
|
includeTentative?: boolean;
|
|
90
|
-
/**
|
|
102
|
+
/**
|
|
103
|
+
* Deprecated no-op. Free/workingElsewhere events now always load, with
|
|
104
|
+
* their busy/free signal carried on the range so conflict detection
|
|
105
|
+
* treats them as free.
|
|
106
|
+
*/
|
|
91
107
|
includeFree?: boolean;
|
|
92
108
|
/** Fallback label for events with no subject (default: "(busy)") */
|
|
93
109
|
fallbackLabel?: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/adapters/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAE/C,gFAAgF;AAChF,MAAM,WAAW,SAAS;IACxB,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE;QAAE,IAAI,CAAC,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IAC/D,GAAG,EAAE;QAAE,IAAI,CAAC,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IAC7D,MAAM,EAAE,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/adapters/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAE/C,iEAAiE;AACjE,MAAM,WAAW,iBAAiB;IAChC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,IAAI,CAAC,EAAE,OAAO,CAAC;CAChB;AAED,gFAAgF;AAChF,MAAM,WAAW,SAAS;IACxB,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,WAAW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CAAC,EAAE,MAAM,CAAC;IACxB,UAAU,CAAC,EAAE,MAAM,EAAE,CAAC;CACvB;AAED,MAAM,WAAW,kBAAkB;IACjC,2DAA2D;IAC3D,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B;;;;OAIG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,oEAAoE;IACpE,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,YAAY,EAAE,SAAS,EAAE,CAAC"}
|
package/dist/server.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":"AAWA,OAAO,EAAE,MAAM,EAAE,MAAM,2CAA2C,CAAC;AACnE,OAAO,EAGL,KAAK,cAAc,EACnB,KAAK,IAAI,EACV,MAAM,oCAAoC,CAAC;AAM5C,OAAO,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AA2G7C,eAAO,MAAM,KAAK,EAAE,IAAI,EAudvB,CAAC;AAs0CF,wBAAsB,cAAc,CAClC,OAAO,EAAE,eAAe,EACxB,IAAI,EAAE,MAAM,EACZ,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAChC,OAAO,CAAC,cAAc,CAAC,CAgbzB;AAED,wBAAgB,YAAY,CAAC,OAAO,kBAAwB,GAAG,MAAM,CAoBpE"}
|