@memberjunction/ai-bridge-server 6.2.0-edge.4 → 6.2.0-edge.6

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.
@@ -1,353 +1,152 @@
1
1
  /**
2
- * The error thrown by the production-binding stubs ({@link GraphCalendarSource},
3
- * {@link GoogleCalendarSource}) until a real calendar API is wired. Distinct type so a host can
4
- * detect "not yet bound" vs. a genuine transport failure.
2
+ * The error a {@link CommunicationCalendarSource} throws when it was built with no provider. Distinct
3
+ * type so a host can detect "not yet bound" vs. a genuine transport failure.
5
4
  */
6
5
  export class CalendarSourceNotBoundError extends Error {
7
6
  constructor(providerLabel) {
8
7
  super(`Calendar source for '${providerLabel}' is not bound. ` +
9
- `Bind the real ${providerLabel} calendar API (see TODO in the adapter) before use.`);
8
+ `Construct it with the ${providerLabel} communication provider before use.`);
10
9
  this.name = 'CalendarSourceNotBoundError';
11
10
  }
12
11
  }
13
12
  /**
14
- * **Pure** parse of a Graph {@link GraphDateTimeTimeZone} to a UTC {@link Date}. Treats a missing or
15
- * `UTC`/`Z` time zone as UTC (the common case for Graph delta queries, which can be requested in UTC);
16
- * for a non-UTC named zone it parses the wall-clock string and appends `Z` (best-effort — production
17
- * SHOULD request UTC via the `Prefer: outlook.timezone="UTC"` header). Returns `null` on absent/invalid.
18
- */
19
- export function ParseGraphDateTime(value) {
20
- const raw = value?.dateTime?.trim();
21
- if (!raw) {
22
- return null;
23
- }
24
- const zone = (value?.timeZone ?? '').trim().toLowerCase();
25
- const hasZoneSuffix = /[zZ]$|[+-]\d{2}:?\d{2}$/.test(raw);
26
- const iso = hasZoneSuffix || zone === 'utc' || zone === '' ? ensureUtcSuffix(raw) : `${raw}Z`;
27
- const parsed = new Date(iso);
28
- return Number.isNaN(parsed.getTime()) ? null : parsed;
29
- }
30
- /** @deprecated Use {@link ParseGraphDateTime}. */
31
- export function parseGraphDateTime(value) {
32
- return ParseGraphDateTime(value);
33
- }
34
- /** Appends `Z` to a bare wall-clock string that lacks any zone suffix, leaving zoned strings untouched. */
35
- function ensureUtcSuffix(raw) {
36
- return /[zZ]$|[+-]\d{2}:?\d{2}$/.test(raw) ? raw : `${raw}Z`;
37
- }
38
- /** Maps a Graph attendee `status.response` to the normalized {@link CalendarInviteAttendee.ResponseStatus}. */
39
- export function MapGraphResponseStatus(response) {
40
- switch ((response ?? '').trim().toLowerCase()) {
41
- case 'accepted':
42
- case 'organizer':
43
- return 'Accepted';
44
- case 'declined':
45
- return 'Declined';
46
- case 'tentativelyaccepted':
47
- return 'Tentative';
48
- case 'notresponded':
49
- case 'none':
50
- return 'NeedsAction';
51
- default:
52
- return undefined;
53
- }
54
- }
55
- /** @deprecated Use {@link MapGraphResponseStatus}. */
56
- export function mapGraphResponseStatus(response) {
57
- return MapGraphResponseStatus(response);
58
- }
59
- /**
60
- * **Pure** extraction of an online-meeting join URL from a Graph event. Prefers the structured
61
- * `onlineMeeting.joinUrl`, then the legacy flat `onlineMeetingUrl`, then the first Teams `meetup-join`
62
- * URL found in the event body (HTML or text). Returns `undefined` when no join URL is present.
63
- */
64
- export function ExtractGraphJoinUrl(event) {
65
- const structured = event.onlineMeeting?.joinUrl?.trim() || event.onlineMeetingUrl?.trim();
66
- if (structured) {
67
- return structured;
68
- }
69
- return extractJoinUrlFromText(event.body?.content);
70
- }
71
- /** @deprecated Use {@link ExtractGraphJoinUrl}. */
72
- export function extractGraphJoinUrl(event) {
73
- return ExtractGraphJoinUrl(event);
74
- }
75
- /** Best-effort first online-meeting join URL embedded in a free-text/HTML body. Never throws. */
76
- function extractJoinUrlFromText(content) {
77
- if (!content) {
78
- return undefined;
79
- }
80
- const match = content.match(/https?:\/\/[^\s"'<>]*(?:teams\.microsoft\.com\/l\/meetup-join|meet\.google\.com|zoom\.us\/j)[^\s"'<>]*/i);
81
- return match ? match[0] : undefined;
82
- }
83
- /**
84
- * **Pure** normalization of one Graph calendar event to a {@link NormalizedCalendarInvite}. Skips
85
- * (returns `null`) an event with no id or no resolvable start time, so the caller can drop it cleanly.
86
- */
87
- export function NormalizeGraphEvent(event) {
88
- const start = ParseGraphDateTime(event.start);
89
- if (!event.id || !start) {
90
- return null;
91
- }
92
- const attendees = (event.attendees ?? [])
93
- .map(toNormalizedAttendee)
94
- .filter((a) => a !== null);
95
- const organizerEmail = event.organizer?.emailAddress?.address?.trim();
96
- const end = ParseGraphDateTime(event.end);
97
- return {
98
- ExternalEventID: event.id,
99
- ...(event.subject ? { Subject: event.subject } : {}),
100
- ...(ExtractGraphJoinUrl(event) ? { JoinUrl: ExtractGraphJoinUrl(event) } : {}),
101
- StartTime: start,
102
- ...(end ? { EndTime: end } : {}),
103
- Attendees: attendees,
104
- ...(organizerEmail
105
- ? {
106
- Organizer: {
107
- Email: organizerEmail,
108
- ...(event.organizer?.emailAddress?.name
109
- ? { DisplayName: event.organizer.emailAddress.name }
110
- : {}),
111
- },
112
- }
113
- : {}),
114
- };
115
- }
116
- /** @deprecated Use {@link NormalizeGraphEvent}. */
117
- export function normalizeGraphEvent(event) {
118
- return NormalizeGraphEvent(event);
119
- }
120
- /** Maps one Graph attendee to a normalized attendee, or `null` when it carries no email address. */
121
- function toNormalizedAttendee(attendee) {
122
- const email = attendee.emailAddress?.address?.trim();
123
- if (!email) {
124
- return null;
125
- }
126
- const responseStatus = MapGraphResponseStatus(attendee.status?.response);
127
- return {
128
- Email: email,
129
- ...(attendee.emailAddress?.name ? { DisplayName: attendee.emailAddress.name } : {}),
130
- ...(responseStatus ? { ResponseStatus: responseStatus } : {}),
131
- };
132
- }
133
- /**
134
- * **Production binding** for Microsoft Graph calendars over an injected {@link IGraphCalendarLike}
135
- * surface, so it builds + unit-tests with no Graph SDK install and no network.
13
+ * An {@link ICalendarSource} over a Communication provider's `SyncEvents`.
136
14
  *
137
- * Pages a Graph delta poll: starting from `sinceCursor` (a prior `@odata.deltaLink`), it follows
138
- * `@odata.nextLink` page-to-page, normalizing every event via {@link normalizeGraphEvent}, until the
139
- * surface returns a `@odata.deltaLink` — which becomes the {@link CalendarPollResult.NextCursor} for the
140
- * next poll. Credentials are resolved upstream (the host binds {@link IGraphCalendarLike} with a Graph
141
- * client authenticated from the provider `Configuration` via MJ's credential system — never inline).
142
- *
143
- * When no surface is supplied it preserves the original not-bound behavior, throwing
144
- * {@link CalendarSourceNotBoundError} so a misconfigured deployment fails loudly.
145
- *
146
- * @remarks **TODO (production):** bind `@microsoft/microsoft-graph-client` (an optionalDependency,
147
- * loaded only when a Graph-backed identity is configured), request UTC via
148
- * `Prefer: outlook.timezone="UTC"`, and inject it as {@link IGraphCalendarLike}.
15
+ * The first poll reads `[now, now + LookaheadDays]`; later polls pass the provider's token back as
16
+ * the cursor. A token the provider refuses (expired) is dropped and the window is read again, which
17
+ * the watcher's dedupe makes harmless. Removed and cancelled events are not invites and are skipped.
149
18
  */
150
- export class GraphCalendarSource {
19
+ export class CommunicationCalendarSource {
151
20
  /**
152
- * @param graph The injected Graph calendar surface. Omit to preserve the not-bound seam behavior
153
- * (every poll throws {@link CalendarSourceNotBoundError}).
21
+ * @param provider The communication provider to read through. Omit to keep the not-bound
22
+ * behaviour (every poll throws {@link CalendarSourceNotBoundError}).
23
+ * @param credentials Passed to every call (for Graph, `{ accessToken }` with a bot token).
24
+ * @param options Window and clock settings.
25
+ * @param providerLabel Names the provider in errors.
154
26
  */
155
- constructor(graph) {
156
- this.graph = graph;
27
+ constructor(provider, credentials, options = {}, providerLabel = 'calendar') {
28
+ this.provider = provider;
29
+ this.credentials = credentials;
30
+ this.options = options;
31
+ this.providerLabel = providerLabel;
157
32
  }
158
33
  /** @inheritdoc */
159
34
  async ListUpcomingInvites(identityValue, sinceCursor) {
160
- if (!this.graph) {
161
- throw new CalendarSourceNotBoundError('Microsoft Graph');
35
+ if (!this.provider) {
36
+ throw new CalendarSourceNotBoundError(this.providerLabel);
37
+ }
38
+ let result = await this.sync(this.provider, identityValue, sinceCursor);
39
+ if (sinceCursor && result.ResyncRequired) {
40
+ result = await this.sync(this.provider, identityValue, undefined);
162
41
  }
163
- const invites = [];
164
- let cursor = sinceCursor;
165
- let nextCursor;
166
- // Follow @odata.nextLink within the poll; stop once a @odata.deltaLink (the next poll's cursor)
167
- // is returned. A defensive page cap guards a misbehaving surface from an unbounded loop.
168
- for (let page = 0; page < MAX_GRAPH_PAGES; page++) {
169
- const result = await this.graph.listEvents(identityValue, cursor);
170
- for (const event of result.value ?? []) {
171
- const invite = NormalizeGraphEvent(event);
172
- if (invite) {
173
- invites.push(invite);
174
- }
175
- }
176
- if (result.deltaLink) {
177
- nextCursor = result.deltaLink;
178
- break;
179
- }
180
- if (!result.nextLink) {
181
- break; // no further pages and no delta link — leave the stored cursor unchanged.
182
- }
183
- cursor = result.nextLink;
42
+ if (!result.Success) {
43
+ throw new Error(result.ErrorMessage ?? `${this.providerLabel} calendar sync failed for ${identityValue}`);
184
44
  }
185
- return { Invites: invites, ...(nextCursor ? { NextCursor: nextCursor } : {}) };
45
+ const invites = result.Changes.map((change) => (change.Kind === 'Upserted' && change.Event ? NormalizeCalendarEvent(change.Event) : null)).filter((invite) => invite !== null);
46
+ return { Invites: invites, ...(result.NextSyncToken ? { NextCursor: result.NextSyncToken } : {}) };
186
47
  }
187
- }
188
- /** Defensive cap on Graph delta pages followed in a single poll (guards a misbehaving surface). */
189
- const MAX_GRAPH_PAGES = 1000;
190
- /**
191
- * **Pure** parse of a Google {@link GoogleEventDateTime} to a UTC {@link Date}. Uses the RFC3339
192
- * `dateTime` (which carries its own offset) when present, else an all-day `date` as UTC midnight.
193
- * Returns `null` on absent/invalid.
194
- */
195
- export function ParseGoogleDateTime(value) {
196
- const timed = value?.dateTime?.trim();
197
- if (timed) {
198
- const parsed = new Date(timed);
199
- return Number.isNaN(parsed.getTime()) ? null : parsed;
48
+ /** Whose calendar a poll reads. The identity's address, in the account's default calendar. */
49
+ BuildTarget(identityValue) {
50
+ return { Identifier: identityValue };
200
51
  }
201
- const allDay = value?.date?.trim();
202
- if (allDay) {
203
- const parsed = new Date(`${allDay}T00:00:00Z`);
204
- return Number.isNaN(parsed.getTime()) ? null : parsed;
52
+ sync(provider, identityValue, cursor) {
53
+ const now = (this.options.Now ?? Date.now)();
54
+ const lookaheadDays = this.options.LookaheadDays ?? DEFAULT_LOOKAHEAD_DAYS;
55
+ return provider.SyncEvents({
56
+ Target: this.BuildTarget(identityValue),
57
+ SyncToken: cursor,
58
+ WindowStart: new Date(now),
59
+ WindowEnd: new Date(now + lookaheadDays * MS_PER_DAY),
60
+ }, this.credentials);
205
61
  }
206
- return null;
207
- }
208
- /** @deprecated Use {@link ParseGoogleDateTime}. */
209
- export function parseGoogleDateTime(value) {
210
- return ParseGoogleDateTime(value);
211
62
  }
212
- /** Maps a Google `responseStatus` to the normalized {@link CalendarInviteAttendee.ResponseStatus}. */
213
- export function MapGoogleResponseStatus(response) {
214
- switch ((response ?? '').trim().toLowerCase()) {
215
- case 'accepted':
216
- return 'Accepted';
217
- case 'declined':
218
- return 'Declined';
219
- case 'tentative':
220
- return 'Tentative';
221
- case 'needsaction':
222
- return 'NeedsAction';
223
- default:
224
- return undefined;
63
+ /** Microsoft Graph calendars, read through `@memberjunction/communication-ms-graph`'s `MSGraphProvider`. */
64
+ export class GraphCalendarSource extends CommunicationCalendarSource {
65
+ constructor(provider, credentials, options = {}) {
66
+ super(provider, credentials, options, 'Microsoft Graph');
225
67
  }
226
68
  }
227
- /** @deprecated Use {@link MapGoogleResponseStatus}. */
228
- export function mapGoogleResponseStatus(response) {
229
- return MapGoogleResponseStatus(response);
230
- }
231
69
  /**
232
- * **Pure** extraction of the Meet/online-meeting join URL from a Google event. Prefers the first
233
- * `video` entry-point in `conferenceData`, then the legacy `hangoutLink`. Returns `undefined` when no
234
- * video conferencing is attached.
70
+ * Google calendars, read through `@memberjunction/communication-gmail`'s `GmailProvider`. Reads the
71
+ * calendar whose ID is the identity's address, as the bridge always has: that is the account's
72
+ * primary calendar when the credentials are the agent's own, and a shared one otherwise.
235
73
  */
236
- export function ExtractGoogleJoinUrl(event) {
237
- const video = (event.conferenceData?.entryPoints ?? []).find((e) => (e.entryPointType ?? '').trim().toLowerCase() === 'video' && !!e.uri?.trim());
238
- return video?.uri?.trim() || event.hangoutLink?.trim() || undefined;
239
- }
240
- /** @deprecated Use {@link ExtractGoogleJoinUrl}. */
241
- export function extractGoogleJoinUrl(event) {
242
- return ExtractGoogleJoinUrl(event);
74
+ export class GoogleCalendarSource extends CommunicationCalendarSource {
75
+ constructor(provider, credentials, options = {}) {
76
+ super(provider, credentials, options, 'Google Calendar');
77
+ }
78
+ /** @inheritdoc */
79
+ BuildTarget(identityValue) {
80
+ return { Identifier: identityValue, CalendarID: identityValue };
81
+ }
243
82
  }
244
83
  /**
245
- * **Pure** normalization of one Google calendar event to a {@link NormalizedCalendarInvite}. Skips
246
- * (returns `null`) a cancelled event or one with no id or no resolvable start time.
84
+ * **Pure** normalization of a Communication calendar event to a {@link NormalizedCalendarInvite}.
85
+ * Returns `null` for a cancelled event or one with no id or no start. The join URL is the provider's
86
+ * online-meeting URL, else the first Teams/Meet/Zoom link in the body.
247
87
  */
248
- export function NormalizeGoogleEvent(event) {
249
- if ((event.status ?? '').trim().toLowerCase() === 'cancelled') {
250
- return null;
251
- }
252
- const start = ParseGoogleDateTime(event.start);
253
- if (!event.id || !start) {
88
+ export function NormalizeCalendarEvent(event) {
89
+ if (event.IsCancelled || !event.ExternalEventID || !event.Start) {
254
90
  return null;
255
91
  }
256
- const attendees = (event.attendees ?? [])
257
- .map(toNormalizedGoogleAttendee)
258
- .filter((a) => a !== null);
259
- const organizerEmail = event.organizer?.email?.trim();
260
- const joinUrl = ExtractGoogleJoinUrl(event);
261
- const end = ParseGoogleDateTime(event.end);
92
+ const joinUrl = event.OnlineMeetingUrl?.trim() || extractJoinUrlFromText(event.Body);
262
93
  return {
263
- ExternalEventID: event.id,
264
- ...(event.summary ? { Subject: event.summary } : {}),
94
+ ExternalEventID: event.ExternalEventID,
95
+ ...(event.Subject ? { Subject: event.Subject } : {}),
265
96
  ...(joinUrl ? { JoinUrl: joinUrl } : {}),
266
- StartTime: start,
267
- ...(end ? { EndTime: end } : {}),
268
- Attendees: attendees,
269
- ...(organizerEmail
270
- ? {
271
- Organizer: {
272
- Email: organizerEmail,
273
- ...(event.organizer?.displayName ? { DisplayName: event.organizer.displayName } : {}),
274
- },
275
- }
97
+ StartTime: event.Start,
98
+ ...(event.End ? { EndTime: event.End } : {}),
99
+ Attendees: event.Attendees.map((a) => ({
100
+ Email: a.Email,
101
+ ...(a.Name ? { DisplayName: a.Name } : {}),
102
+ ResponseStatus: a.Response === 'None' ? 'NeedsAction' : a.Response,
103
+ })),
104
+ ...(event.Organizer
105
+ ? { Organizer: { Email: event.Organizer.Email, ...(event.Organizer.Name ? { DisplayName: event.Organizer.Name } : {}) } }
276
106
  : {}),
277
107
  };
278
108
  }
279
- /** @deprecated Use {@link NormalizeGoogleEvent}. */
280
- export function normalizeGoogleEvent(event) {
281
- return NormalizeGoogleEvent(event);
282
- }
283
- /** Maps one Google attendee to a normalized attendee, or `null` when it carries no email address. */
284
- function toNormalizedGoogleAttendee(attendee) {
285
- const email = attendee.email?.trim();
286
- if (!email) {
287
- return null;
109
+ /** Best-effort first online-meeting join URL embedded in a free-text/HTML body. Never throws. */
110
+ function extractJoinUrlFromText(content) {
111
+ if (!content) {
112
+ return undefined;
288
113
  }
289
- const responseStatus = MapGoogleResponseStatus(attendee.responseStatus);
290
- return {
291
- Email: email,
292
- ...(attendee.displayName ? { DisplayName: attendee.displayName } : {}),
293
- ...(responseStatus ? { ResponseStatus: responseStatus } : {}),
294
- };
114
+ for (const rawToken of content.split(/[\s"'<>]+/)) {
115
+ const token = trimCandidateUrl(rawToken);
116
+ if (token &&
117
+ /^https?:\/\/(?:teams\.microsoft\.com\/l\/meetup-join|meet\.google\.com|zoom\.us\/j|[a-z0-9.-]+\.(?:teams\.microsoft\.com\/l\/meetup-join|zoom\.us\/j))/i.test(token)) {
118
+ return token;
119
+ }
120
+ }
121
+ return undefined;
295
122
  }
296
- /**
297
- * **Production binding** for Google Calendar over an injected {@link IGoogleCalendarLike} surface, so
298
- * it builds + unit-tests with no `googleapis` install and no network.
299
- *
300
- * Pages an incremental sync: starting from `sinceCursor` (a prior `nextSyncToken`), it follows
301
- * `nextPageToken` page-to-page, normalizing every event via {@link normalizeGoogleEvent}, until the
302
- * surface returns a `nextSyncToken` — which becomes the {@link CalendarPollResult.NextCursor}.
303
- * Credentials are resolved upstream (the host binds {@link IGoogleCalendarLike} with a Calendar client
304
- * authenticated from the provider `Configuration` via MJ's credential system — never inline).
305
- *
306
- * When no surface is supplied it preserves the original not-bound behavior, throwing
307
- * {@link CalendarSourceNotBoundError}.
308
- *
309
- * @remarks **TODO (production):** bind `googleapis` (an optionalDependency, loaded only when a
310
- * Google-backed identity is configured) and inject it as {@link IGoogleCalendarLike}.
311
- */
312
- export class GoogleCalendarSource {
313
- /**
314
- * @param calendar The injected Google calendar surface. Omit to preserve the not-bound seam
315
- * behavior (every poll throws {@link CalendarSourceNotBoundError}).
316
- */
317
- constructor(calendar) {
318
- this.calendar = calendar;
123
+ const TRAILING_URL_PUNCTUATION = ')]}.,;:!?';
124
+ function trimCandidateUrl(rawToken) {
125
+ const httpIdx = rawToken.search(/https?:\/\//i);
126
+ if (httpIdx < 0) {
127
+ return undefined;
319
128
  }
320
- /** @inheritdoc */
321
- async ListUpcomingInvites(identityValue, sinceCursor) {
322
- if (!this.calendar) {
323
- throw new CalendarSourceNotBoundError('Google Calendar');
129
+ let candidate = rawToken.slice(httpIdx);
130
+ let changed = true;
131
+ while (changed && candidate.length > 0) {
132
+ changed = false;
133
+ const lower = candidate.toLowerCase();
134
+ if (lower.endsWith('&quot;')) {
135
+ candidate = candidate.slice(0, -6);
136
+ changed = true;
137
+ }
138
+ else if (lower.endsWith('&#34;')) {
139
+ candidate = candidate.slice(0, -5);
140
+ changed = true;
324
141
  }
325
- const invites = [];
326
- let pageToken;
327
- let nextCursor;
328
- for (let page = 0; page < MAX_GOOGLE_PAGES; page++) {
329
- // syncToken and pageToken are mutually exclusive: use the sync token only on the first
330
- // request of a poll, then switch to page tokens for in-poll continuation.
331
- const args = pageToken !== undefined
332
- ? { calendarId: identityValue, pageToken }
333
- : { calendarId: identityValue, ...(sinceCursor ? { syncToken: sinceCursor } : {}) };
334
- const result = await this.calendar.listEvents(args);
335
- for (const event of result.items ?? []) {
336
- const invite = NormalizeGoogleEvent(event);
337
- if (invite) {
338
- invites.push(invite);
339
- }
340
- }
341
- if (result.nextPageToken) {
342
- pageToken = result.nextPageToken;
343
- continue;
344
- }
345
- nextCursor = result.nextSyncToken; // final page carries the sync token for the next poll.
346
- break;
142
+ else if (TRAILING_URL_PUNCTUATION.includes(candidate[candidate.length - 1])) {
143
+ candidate = candidate.slice(0, -1);
144
+ changed = true;
347
145
  }
348
- return { Invites: invites, ...(nextCursor ? { NextCursor: nextCursor } : {}) };
349
146
  }
147
+ return candidate;
350
148
  }
351
- /** Defensive cap on Google page-token follows in a single poll (guards a misbehaving surface). */
352
- const MAX_GOOGLE_PAGES = 1000;
149
+ /** First-poll window default (days). */
150
+ const DEFAULT_LOOKAHEAD_DAYS = 30;
151
+ const MS_PER_DAY = 24 * 60 * 60 * 1000;
353
152
  //# sourceMappingURL=calendar-source.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"calendar-source.js","sourceRoot":"","sources":["../src/calendar-source.ts"],"names":[],"mappings":"AA0GA;;;;GAIG;AACH,MAAM,OAAO,2BAA4B,SAAQ,KAAK;IAClD,YAAY,aAAqB;QAC7B,KAAK,CACD,wBAAwB,aAAa,kBAAkB;YACnD,iBAAiB,aAAa,qDAAqD,CAC1F,CAAC;QACF,IAAI,CAAC,IAAI,GAAG,6BAA6B,CAAC;IAC9C,CAAC;CACJ;AAgGD;;;;;GAKG;AACH,MAAM,UAAU,kBAAkB,CAAC,KAA6B;IAC5D,MAAM,GAAG,GAAG,KAAK,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;IACpC,IAAI,CAAC,GAAG,E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;IACD,IAAI,SAAS,GAAG,QAAQ,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;IACxC,IAAI,OAAO,GAAG,IAAI,CAAC;IACnB,OAAO,OAAO,IAAI,SAAS,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QACrC,OAAO,GAAG,KAAK,CAAC;QAChB,MAAM,KAAK,GAAG,SAAS,CAAC,WAAW,EAAE,CAAC;QACtC,IAAI,KAAK,CAAC,QAAQ,CAAC,QAAQ,CAAC,EAAE,CAAC;YAC3B,SAAS,GAAG,SAAS,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;YACnC,OAAO,GAAG,IAAI,CAAC;QACnB,CAAC;aAAM,IAAI,KAAK,CAAC,QAAQ,CAAC,OAAO,CAAC,EAAE,CAAC;YACjC,SAAS,GAAG,SAAS,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;YACnC,OAAO,GAAG,IAAI,CAAC;QACnB,CAAC;aAAM,IAAI,wBAAwB,CAAC,QAAQ,CAAC,SAAS,CAAC,SAAS,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC;YAC5E,SAAS,GAAG,SAAS,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;YACnC,OAAO,GAAG,IAAI,CAAC;QACnB,CAAC;IACL,CAAC;IACD,OAAO,SAAS,CAAC;AACrB,CAAC;AAED,wCAAwC;AACxC,MAAM,sBAAsB,GAAG,EAAE,CAAC;AAClC,MAAM,UAAU,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,IAAI,CAAC"}
package/dist/index.d.ts CHANGED
@@ -5,7 +5,6 @@ export * from './loopback-bridge.js';
5
5
  export * from './openai-sip-bridge.js';
6
6
  export * from './join-url-resolver.js';
7
7
  export * from './calendar-source.js';
8
- export * from './calendar-clients.js';
9
8
  export * from './calendar-watcher.js';
10
9
  export * from './scheduled-bridge-runner.js';
11
10
  export * from './identity-provisioner.js';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC;AACnC,cAAc,gCAAgC,CAAC;AAC/C,cAAc,yBAAyB,CAAC;AACxC,cAAc,mBAAmB,CAAC;AAClC,cAAc,qBAAqB,CAAC;AACpC,cAAc,qBAAqB,CAAC;AACpC,cAAc,mBAAmB,CAAC;AAClC,cAAc,oBAAoB,CAAC;AACnC,cAAc,oBAAoB,CAAC;AACnC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,wBAAwB,CAAC;AACvC,cAAc,kBAAkB,CAAC;AACjC,cAAc,2BAA2B,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC;AACnC,cAAc,gCAAgC,CAAC;AAC/C,cAAc,yBAAyB,CAAC;AACxC,cAAc,mBAAmB,CAAC;AAClC,cAAc,qBAAqB,CAAC;AACpC,cAAc,qBAAqB,CAAC;AACpC,cAAc,mBAAmB,CAAC;AAClC,cAAc,oBAAoB,CAAC;AACnC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,wBAAwB,CAAC;AACvC,cAAc,kBAAkB,CAAC;AACjC,cAAc,2BAA2B,CAAC"}
package/dist/index.js CHANGED
@@ -5,7 +5,6 @@ export * from './loopback-bridge.js';
5
5
  export * from './openai-sip-bridge.js';
6
6
  export * from './join-url-resolver.js';
7
7
  export * from './calendar-source.js';
8
- export * from './calendar-clients.js';
9
8
  export * from './calendar-watcher.js';
10
9
  export * from './scheduled-bridge-runner.js';
11
10
  export * from './identity-provisioner.js';
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC;AACnC,cAAc,gCAAgC,CAAC;AAC/C,cAAc,yBAAyB,CAAC;AACxC,cAAc,mBAAmB,CAAC;AAClC,cAAc,qBAAqB,CAAC;AACpC,cAAc,qBAAqB,CAAC;AACpC,cAAc,mBAAmB,CAAC;AAClC,cAAc,oBAAoB,CAAC;AACnC,cAAc,oBAAoB,CAAC;AACnC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,wBAAwB,CAAC;AACvC,cAAc,kBAAkB,CAAC;AACjC,cAAc,2BAA2B,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC;AACnC,cAAc,gCAAgC,CAAC;AAC/C,cAAc,yBAAyB,CAAC;AACxC,cAAc,mBAAmB,CAAC;AAClC,cAAc,qBAAqB,CAAC;AACpC,cAAc,qBAAqB,CAAC;AACpC,cAAc,mBAAmB,CAAC;AAClC,cAAc,oBAAoB,CAAC;AACnC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,wBAAwB,CAAC;AACvC,cAAc,kBAAkB,CAAC;AACjC,cAAc,2BAA2B,CAAC"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@memberjunction/ai-bridge-server",
3
3
  "type": "module",
4
- "version": "6.2.0-edge.4",
4
+ "version": "6.2.0-edge.6",
5
5
  "description": "MemberJunction: Server-tier coordination + execution for Realtime Bridges — completes the unified media-transport seam (the bridge ↔ IRealtimeSession pipe), bot-session lifecycle, host affinity + janitor, participant tracking, and turn-taking integration. Mirrors the AIEngineBase/AIEngine pair.",
6
6
  "main": "dist/index.js",
7
7
  "types": "dist/index.d.ts",
@@ -11,18 +11,14 @@
11
11
  "author": "MemberJunction.com",
12
12
  "license": "BUSL-1.1",
13
13
  "dependencies": {
14
- "@memberjunction/core": "6.2.0-edge.4",
15
- "@memberjunction/global": "6.2.0-edge.4",
16
- "@memberjunction/core-entities": "6.2.0-edge.4",
17
- "@memberjunction/ai": "6.2.0-edge.4",
18
- "@memberjunction/ai-bridge-base": "6.2.0-edge.4",
14
+ "@memberjunction/core": "6.2.0-edge.6",
15
+ "@memberjunction/global": "6.2.0-edge.6",
16
+ "@memberjunction/core-entities": "6.2.0-edge.6",
17
+ "@memberjunction/ai": "6.2.0-edge.6",
18
+ "@memberjunction/ai-bridge-base": "6.2.0-edge.6",
19
+ "@memberjunction/communication-types": "6.2.0-edge.6",
19
20
  "rxjs": "^7.8.2"
20
21
  },
21
- "//optionalDependencies": "@microsoft/microsoft-graph-client and googleapis are OPTIONAL PEER SDKs (CLAUDE rule 8, category 2): this package never statically imports either. They back the calendar + identity-provisioner seams only. GraphCalendarSource/GraphAdmin provisioning wire IGraphCalendarLike/IGraphAdminLike over @microsoft/microsoft-graph-client (calendarView delta + POST /users); GoogleCalendarSource/Google Workspace provisioning wire IGoogleCalendarLike/IGoogleWorkspaceAdminLike over googleapis (calendar.events.list syncToken + admin.users.insert). The telephony-carrier number-order path is injected via ITelephonyCarrierLike (the carrier SDK is declared by each telephony provider package, not here). All surfaces are injected behind structural interfaces so the package builds + unit-tests with no install and no network, and are loaded only when a Graph/Google-backed identity is configured at deployment.",
22
- "optionalDependencies": {
23
- "@microsoft/microsoft-graph-client": "^3.0.7",
24
- "googleapis": "^144.0.0"
25
- },
26
22
  "devDependencies": {
27
23
  "@types/node": "24.10.11",
28
24
  "ts-node-dev": "^2.0.0",