@ai-matrx/meet 0.11.26 → 0.11.28

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/core.d.cts CHANGED
@@ -1,5 +1,5 @@
1
- import { P as ParticipantIdentity, k as AdmissionState, a1 as NoteTakerState, a as MeetParticipant, M as MeetingRecord, R as RoomName, d as CallInvite, e as ParticipantRole, a6 as ParticipantStanding, a3 as ObserversVisibleTo, S as StageLayout, L as LobbyEntry, aa as RecordingState, U as UserId, aE as RecordingSource, ae as TranscriptSegment, g as MeetingNote, W as WrapUpAnnouncement, j as CollabSnapshot, p as ConnectionQuality, h as MeetingId, b as MeetApi, f as CallMode, O as OrganizationId, m as CallId, n as CallState, Z as MeetingKind, a8 as RecordingPolicy, V as MeetingAttendee, a9 as RecordingRecord, a0 as MeetingSettings, X as MeetingChanges, a4 as OccurrenceOverride, $ as MeetingOccurrence, af as UpcomingOccurrence, Y as MeetingInvitee, I as InviteeInput, q as InviteeRole, ab as RsvpAnswer, ac as RsvpInvitation, c as MeetIdentity, C as CollabPanel } from './collab-CIyXdQ5l.cjs';
2
- export { A as AccessTokenSource, l as CAPTION_LANGUAGES, o as CallablePerson, E as EMPTY_COLLAB, F as FILE_SESSION_PATH, J as JsonObject, r as JsonValue, s as MeetApiOptions, t as MeetApiRequest, u as MeetAppFocus, v as MeetBreakoutBroadcast, w as MeetBreakoutPlan, x as MeetBreakoutRoom, y as MeetCollabSettings, z as MeetFileMedia, B as MeetPoll, D as MeetPollOption, G as MeetPollState, H as MeetQuestion, K as MeetQuestionState, N as MeetStroke, Q as MeetingActivities, i as MeetingAppPanel, _ as MeetingNoteKind, a2 as ORGANIZATION_HEADER, a5 as OccurrenceState, a7 as ROLE_RANK, ad as RsvpState, T as TranscriptSource, ag as appPanelOf, ah as applyCollabPacket, ai as asCallId, aj as asMeetingId, ak as asOrganizationId, al as asParticipantIdentity, am as asRoomName, an as asUserId, ao as assignedRoom, ap as autoAssign, aq as breakoutRemainingMs, ar as captureHeldOf, as as collabFromState, at as createMeetApi, au as defaultCaptionLanguage, av as fileDownloadPath, aw as focusFromRow, ax as isGuest, ay as isHostRole, az as isLinkFollower, aA as isObserverRole, aB as loadMeetingActivities, aC as scheduleSettingsPatch, aD as withItem } from './collab-CIyXdQ5l.cjs';
1
+ import { P as ParticipantIdentity, k as AdmissionState, a1 as NoteTakerState, a as MeetParticipant, M as MeetingRecord, R as RoomName, d as CallInvite, e as ParticipantRole, a6 as ParticipantStanding, a3 as ObserversVisibleTo, S as StageLayout, L as LobbyEntry, aa as RecordingState, U as UserId, aE as RecordingSource, ae as TranscriptSegment, g as MeetingNote, W as WrapUpAnnouncement, j as CollabSnapshot, p as ConnectionQuality, h as MeetingId, b as MeetApi, f as CallMode, O as OrganizationId, m as CallId, n as CallState, Z as MeetingKind, a8 as RecordingPolicy, V as MeetingAttendee, a9 as RecordingRecord, a0 as MeetingSettings, X as MeetingChanges, a4 as OccurrenceOverride, $ as MeetingOccurrence, af as UpcomingOccurrence, Y as MeetingInvitee, I as InviteeInput, q as InviteeRole, ab as RsvpAnswer, ac as RsvpInvitation, c as MeetIdentity, C as CollabPanel } from './collab-CUxjUtrb.cjs';
2
+ export { A as AccessTokenSource, l as CAPTION_LANGUAGES, o as CallablePerson, E as EMPTY_COLLAB, F as FILE_SESSION_PATH, J as JsonObject, r as JsonValue, s as MeetApiOptions, t as MeetApiRequest, u as MeetAppFocus, v as MeetBreakoutBroadcast, w as MeetBreakoutPlan, x as MeetBreakoutRoom, y as MeetCollabSettings, z as MeetFileMedia, B as MeetPoll, D as MeetPollOption, G as MeetPollState, H as MeetQuestion, K as MeetQuestionState, N as MeetStroke, Q as MeetingActivities, i as MeetingAppPanel, _ as MeetingNoteKind, a2 as ORGANIZATION_HEADER, a5 as OccurrenceState, a7 as ROLE_RANK, ad as RsvpState, T as TranscriptSource, ag as appPanelOf, ah as applyCollabPacket, ai as asCallId, aj as asMeetingId, ak as asOrganizationId, al as asParticipantIdentity, am as asRoomName, an as asUserId, ao as assignedRoom, ap as autoAssign, aq as breakoutRemainingMs, ar as captureHeldOf, as as collabFromState, at as createMeetApi, au as defaultCaptionLanguage, av as fileDownloadPath, aw as focusFromRow, ax as isGuest, ay as isHostRole, az as isLinkFollower, aA as isObserverRole, aB as loadMeetingActivities, aC as scheduleSettingsPatch, aD as withItem } from './collab-CUxjUtrb.cjs';
3
3
  import { RealtimeManager } from '@ai-matrx/realtime';
4
4
  import { MessagingSupabaseClient, ActionHandler } from '@ai-matrx/messaging';
5
5
  import { RoomOptions, ConnectionQuality as ConnectionQuality$1, Participant } from 'livekit-client';
@@ -249,6 +249,14 @@ type PhaseEvent =
249
249
  | {
250
250
  readonly type: "unsupported";
251
251
  }
252
+ /**
253
+ * The link's door said, BEFORE any Join, that this run cannot be joined (`ended`, `cancelled`):
254
+ * `resolving` → that screen, never the pre-join with a Join button that will be refused.
255
+ */
256
+ | {
257
+ readonly type: "link_state";
258
+ readonly reason: string | null;
259
+ }
252
260
  /** The person pressed Join / Rejoin / Ask again. */
253
261
  | {
254
262
  readonly type: "join";
@@ -986,6 +994,8 @@ declare const RPCS: {
986
994
  readonly getOrCreateMeeting: "meet_get_or_create_meeting";
987
995
  /** Resolve a durable public link, before/during/after its scheduled time. */
988
996
  readonly meetingBySlug: "meet_meeting_by_slug";
997
+ /** The current run of a durable link (open / not started / ended + next start), no pass needed. */
998
+ readonly linkState: "meet_link_state";
989
999
  readonly admit: "meet_admit";
990
1000
  readonly deny: "meet_deny";
991
1001
  readonly undeny: "meet_undeny";
package/dist/core.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { P as ParticipantIdentity, k as AdmissionState, a1 as NoteTakerState, a as MeetParticipant, M as MeetingRecord, R as RoomName, d as CallInvite, e as ParticipantRole, a6 as ParticipantStanding, a3 as ObserversVisibleTo, S as StageLayout, L as LobbyEntry, aa as RecordingState, U as UserId, aE as RecordingSource, ae as TranscriptSegment, g as MeetingNote, W as WrapUpAnnouncement, j as CollabSnapshot, p as ConnectionQuality, h as MeetingId, b as MeetApi, f as CallMode, O as OrganizationId, m as CallId, n as CallState, Z as MeetingKind, a8 as RecordingPolicy, V as MeetingAttendee, a9 as RecordingRecord, a0 as MeetingSettings, X as MeetingChanges, a4 as OccurrenceOverride, $ as MeetingOccurrence, af as UpcomingOccurrence, Y as MeetingInvitee, I as InviteeInput, q as InviteeRole, ab as RsvpAnswer, ac as RsvpInvitation, c as MeetIdentity, C as CollabPanel } from './collab-CIyXdQ5l.js';
2
- export { A as AccessTokenSource, l as CAPTION_LANGUAGES, o as CallablePerson, E as EMPTY_COLLAB, F as FILE_SESSION_PATH, J as JsonObject, r as JsonValue, s as MeetApiOptions, t as MeetApiRequest, u as MeetAppFocus, v as MeetBreakoutBroadcast, w as MeetBreakoutPlan, x as MeetBreakoutRoom, y as MeetCollabSettings, z as MeetFileMedia, B as MeetPoll, D as MeetPollOption, G as MeetPollState, H as MeetQuestion, K as MeetQuestionState, N as MeetStroke, Q as MeetingActivities, i as MeetingAppPanel, _ as MeetingNoteKind, a2 as ORGANIZATION_HEADER, a5 as OccurrenceState, a7 as ROLE_RANK, ad as RsvpState, T as TranscriptSource, ag as appPanelOf, ah as applyCollabPacket, ai as asCallId, aj as asMeetingId, ak as asOrganizationId, al as asParticipantIdentity, am as asRoomName, an as asUserId, ao as assignedRoom, ap as autoAssign, aq as breakoutRemainingMs, ar as captureHeldOf, as as collabFromState, at as createMeetApi, au as defaultCaptionLanguage, av as fileDownloadPath, aw as focusFromRow, ax as isGuest, ay as isHostRole, az as isLinkFollower, aA as isObserverRole, aB as loadMeetingActivities, aC as scheduleSettingsPatch, aD as withItem } from './collab-CIyXdQ5l.js';
1
+ import { P as ParticipantIdentity, k as AdmissionState, a1 as NoteTakerState, a as MeetParticipant, M as MeetingRecord, R as RoomName, d as CallInvite, e as ParticipantRole, a6 as ParticipantStanding, a3 as ObserversVisibleTo, S as StageLayout, L as LobbyEntry, aa as RecordingState, U as UserId, aE as RecordingSource, ae as TranscriptSegment, g as MeetingNote, W as WrapUpAnnouncement, j as CollabSnapshot, p as ConnectionQuality, h as MeetingId, b as MeetApi, f as CallMode, O as OrganizationId, m as CallId, n as CallState, Z as MeetingKind, a8 as RecordingPolicy, V as MeetingAttendee, a9 as RecordingRecord, a0 as MeetingSettings, X as MeetingChanges, a4 as OccurrenceOverride, $ as MeetingOccurrence, af as UpcomingOccurrence, Y as MeetingInvitee, I as InviteeInput, q as InviteeRole, ab as RsvpAnswer, ac as RsvpInvitation, c as MeetIdentity, C as CollabPanel } from './collab-CUxjUtrb.js';
2
+ export { A as AccessTokenSource, l as CAPTION_LANGUAGES, o as CallablePerson, E as EMPTY_COLLAB, F as FILE_SESSION_PATH, J as JsonObject, r as JsonValue, s as MeetApiOptions, t as MeetApiRequest, u as MeetAppFocus, v as MeetBreakoutBroadcast, w as MeetBreakoutPlan, x as MeetBreakoutRoom, y as MeetCollabSettings, z as MeetFileMedia, B as MeetPoll, D as MeetPollOption, G as MeetPollState, H as MeetQuestion, K as MeetQuestionState, N as MeetStroke, Q as MeetingActivities, i as MeetingAppPanel, _ as MeetingNoteKind, a2 as ORGANIZATION_HEADER, a5 as OccurrenceState, a7 as ROLE_RANK, ad as RsvpState, T as TranscriptSource, ag as appPanelOf, ah as applyCollabPacket, ai as asCallId, aj as asMeetingId, ak as asOrganizationId, al as asParticipantIdentity, am as asRoomName, an as asUserId, ao as assignedRoom, ap as autoAssign, aq as breakoutRemainingMs, ar as captureHeldOf, as as collabFromState, at as createMeetApi, au as defaultCaptionLanguage, av as fileDownloadPath, aw as focusFromRow, ax as isGuest, ay as isHostRole, az as isLinkFollower, aA as isObserverRole, aB as loadMeetingActivities, aC as scheduleSettingsPatch, aD as withItem } from './collab-CUxjUtrb.js';
3
3
  import { RealtimeManager } from '@ai-matrx/realtime';
4
4
  import { MessagingSupabaseClient, ActionHandler } from '@ai-matrx/messaging';
5
5
  import { RoomOptions, ConnectionQuality as ConnectionQuality$1, Participant } from 'livekit-client';
@@ -249,6 +249,14 @@ type PhaseEvent =
249
249
  | {
250
250
  readonly type: "unsupported";
251
251
  }
252
+ /**
253
+ * The link's door said, BEFORE any Join, that this run cannot be joined (`ended`, `cancelled`):
254
+ * `resolving` → that screen, never the pre-join with a Join button that will be refused.
255
+ */
256
+ | {
257
+ readonly type: "link_state";
258
+ readonly reason: string | null;
259
+ }
252
260
  /** The person pressed Join / Rejoin / Ask again. */
253
261
  | {
254
262
  readonly type: "join";
@@ -986,6 +994,8 @@ declare const RPCS: {
986
994
  readonly getOrCreateMeeting: "meet_get_or_create_meeting";
987
995
  /** Resolve a durable public link, before/during/after its scheduled time. */
988
996
  readonly meetingBySlug: "meet_meeting_by_slug";
997
+ /** The current run of a durable link (open / not started / ended + next start), no pass needed. */
998
+ readonly linkState: "meet_link_state";
989
999
  readonly admit: "meet_admit";
990
1000
  readonly deny: "meet_deny";
991
1001
  readonly undeny: "meet_undeny";
package/dist/core.js CHANGED
@@ -1115,6 +1115,8 @@ function nextPhase(from, event) {
1115
1115
  return from === "resolving" ? "prejoin" : null;
1116
1116
  case "unsupported":
1117
1117
  return from === "resolving" ? "unsupported" : null;
1118
+ case "link_state":
1119
+ return from === "resolving" && event.reason !== null && isJoinRefusalReason(event.reason) ? refusalPhase(event.reason) : null;
1118
1120
  case "join":
1119
1121
  return JOINABLE_FROM.has(from) ? "joining" : null;
1120
1122
  case "back_to_prejoin":
@@ -1523,6 +1525,8 @@ var RPCS = {
1523
1525
  getOrCreateMeeting: "meet_get_or_create_meeting",
1524
1526
  /** Resolve a durable public link, before/during/after its scheduled time. */
1525
1527
  meetingBySlug: "meet_meeting_by_slug",
1528
+ /** The current run of a durable link (open / not started / ended + next start), no pass needed. */
1529
+ linkState: "meet_link_state",
1526
1530
  /*
1527
1531
  * ── S4 ADMISSION (CORE-DESIGN §2.4). Each returns the decided row; the caller then
1528
1532
  * sends the payload-free `mx.state.changed` hint. Authorized by `who_may_admit`.
@@ -1831,6 +1835,14 @@ function createMeetRepository(options) {
1831
1835
  if (response.error !== null) throw normalizeMeetError(response.error, operation);
1832
1836
  }
1833
1837
  }
1838
+ async function readLinkRun(slug) {
1839
+ try {
1840
+ const response = await db.rpc(RPCS.linkState, { p_slug: slug });
1841
+ return projectLinkRun(response.error === null ? response.data : null);
1842
+ } catch {
1843
+ return void 0;
1844
+ }
1845
+ }
1834
1846
  async function guard(operation, run) {
1835
1847
  let response = await run();
1836
1848
  if (response.error !== null) {
@@ -2232,11 +2244,12 @@ function createMeetRepository(options) {
2232
2244
  return projectMeeting(row);
2233
2245
  },
2234
2246
  async meetingBySlug(slug) {
2235
- const row = await guard(
2236
- "meet.meetingBySlug",
2237
- () => db.rpc(RPCS.meetingBySlug, { p_slug: slug })
2238
- );
2239
- return withRunNoteTaker(projectMeeting(row));
2247
+ const [row, linkRun] = await Promise.all([
2248
+ guard("meet.meetingBySlug", () => db.rpc(RPCS.meetingBySlug, { p_slug: slug })),
2249
+ readLinkRun(slug)
2250
+ ]);
2251
+ const record = withRunNoteTaker(projectMeeting(row));
2252
+ return linkRun === void 0 ? record : { ...record, linkRun };
2240
2253
  },
2241
2254
  async meeting(id) {
2242
2255
  const response = await db.from(TABLES.meetings).select(MEETING_COLUMNS).eq("id", id).single();
@@ -2425,6 +2438,15 @@ function snippetRuns(snippet) {
2425
2438
  if (last < snippet.length) runs.push({ text: snippet.slice(last), hit: false });
2426
2439
  return runs;
2427
2440
  }
2441
+ function projectLinkRun(value) {
2442
+ if (typeof value !== "object" || value === null) return void 0;
2443
+ const row = value;
2444
+ const state = row["state"];
2445
+ if (state !== "open" && state !== "not_started" && state !== "ended" && state !== "cancelled") return void 0;
2446
+ const reason = row["reason"] === "ended" || row["reason"] === "cancelled" ? row["reason"] : null;
2447
+ const nextStart = typeof row["next_start"] === "string" ? row["next_start"] : null;
2448
+ return { state, reason, nextStart };
2449
+ }
2428
2450
 
2429
2451
  // src/core/app-panel.ts
2430
2452
  function appPanelOf(meeting) {