@ai-matrx/meet 0.10.7 → 0.11.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/core.d.cts CHANGED
@@ -1,5 +1,5 @@
1
- import { P as ParticipantIdentity, a1 as NoteTakerState, a as MeetParticipant, M as MeetingRecord, ab as RoomPhase, k as AdmissionState, e as ParticipantRole, a6 as ParticipantStanding, a3 as ObserversVisibleTo, S as StageLayout, L as LobbyEntry, aa as RecordingState, U as UserId, aF as RecordingSource, af as TranscriptSegment, g as MeetingNote, W as WrapUpAnnouncement, j as CollabSnapshot, p as ConnectionQuality, h as MeetingId, R as RoomName, b as MeetApi, d as CallInvite, 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, ag as UpcomingOccurrence, Y as MeetingInvitee, I as InviteeInput, q as InviteeRole, ac as RsvpAnswer, ad as RsvpInvitation, c as MeetIdentity, C as CollabPanel } from './collab-ytIzjceh.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, ae as RsvpState, T as TranscriptSource, ah as appPanelOf, ai as applyCollabPacket, aj as asCallId, ak as asMeetingId, al as asOrganizationId, am as asParticipantIdentity, an as asRoomName, ao as asUserId, ap as assignedRoom, aq as autoAssign, ar as breakoutRemainingMs, as as captureHeldOf, at as collabFromState, au as createMeetApi, av as defaultCaptionLanguage, aw as fileDownloadPath, ax as focusFromRow, ay as isGuest, az as isHostRole, aA as isLinkFollower, aB as isObserverRole, aC as loadMeetingActivities, aD as scheduleSettingsPatch, aE as withItem } from './collab-ytIzjceh.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-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';
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';
@@ -194,6 +194,175 @@ declare function isListenOnly(media: LocalMediaState): boolean;
194
194
  */
195
195
  declare function listenOnlyNotice(media: LocalMediaState): string | null;
196
196
 
197
+ /**
198
+ * THE JOIN GATE'S REASON CODES — ONE VOCABULARY (CORE-DESIGN §2.5).
199
+ *
200
+ * aidream's `services/meet/errors.py` (`JOIN_REFUSAL_REASONS`) emits exactly these codes and a
201
+ * server test fails if the two lists differ; the consuming app decides every refusal screen by
202
+ * one of them — never by the HTTP status and never by matching message text. Skins own the
203
+ * words; the phase renders `refused:<reason>`, except `ended`, which renders the `ended` phase.
204
+ */
205
+ declare const JOIN_REFUSAL_REASONS: readonly ["not_found", "cancelled", "ended", "expired", "too_early", "sign_in_required", "wrong_account", "not_invited", "locked", "removed", "lobby_rejects", "meeting_full", "platform_capacity", "verification_required", "registration_required"];
206
+ type JoinRefusalReason = (typeof JOIN_REFUSAL_REASONS)[number];
207
+ /** Is `value` one of the codes the join gate speaks? */
208
+ declare function isJoinRefusalReason(value: unknown): value is JoinRefusalReason;
209
+
210
+ /**
211
+ * THE PHASE MACHINE — the one place a meeting tab's top-level phase changes (CORE-DESIGN §3.1,
212
+ * step S6a).
213
+ *
214
+ * The values ARE the observation contract's `data-meet-phase` column (HARNESS-CONTRACT §2), so
215
+ * the core renders its own state with no translation layer. Every change goes through
216
+ * `nextPhase(from, event)`: an explicit table of which event may move which phase where. An
217
+ * event the table does not allow from the current phase is REFUSED (the store keeps the phase
218
+ * and reports it) — never applied.
219
+ *
220
+ * 🚨 THE INVARIANT (guard: `phase.test.ts`, `in-call-phase-guard.test.ts`): nothing enters
221
+ * `prejoin` except `resolving` (the link resolved) or the person's own click. In-call outcomes —
222
+ * share, devices, recording, captions, chat, collab, moderation — live in REGIONS and have no
223
+ * event here at all, so the MD-01 class ("a cancelled share picker threw a live meeting back to
224
+ * Ready to join?") cannot recur: from `in_call` the only ways out are the exit-reason
225
+ * resolution (§3.4), the person's own Leave, and the meeting ending.
226
+ *
227
+ * 1:1 calls run on this same machine (§3.6): ringing is a pre-room phase set, and an answered
228
+ * call goes `joining` → `in_call` exactly like a meeting.
229
+ */
230
+
231
+ /** Every gate reason except `ended`, which renders the `ended` phase (contract §2). */
232
+ type RefusedReason = Exclude<JoinRefusalReason, "ended">;
233
+ /** Where the person is (HARNESS-CONTRACT §2, verbatim). */
234
+ type MeetPhase = "resolving" | "unsupported" | `refused:${RefusedReason}` | "guest_name" | "prejoin" | "joining" | "waiting:host_not_started" | "waiting:knocking" | "denied" | "knock_expired" | "in_call" | "disconnected" | "left" | "removed" | "superseded" | "inactive" | "ended" | "record" | "ringing_out" | "ringing_in" | "call_declined" | "call_missed" | "call_busy" | "answered_elsewhere";
235
+ /** The phases a §3.4 exit-reason resolution can land on. */
236
+ type ExitPhase = "removed" | "superseded" | "inactive" | "ended" | "disconnected" | "waiting:knocking";
237
+ /** How a 1:1 call ended before it connected (§3.6). */
238
+ type CallOutcomePhase = "call_declined" | "call_missed" | "call_busy" | "answered_elsewhere";
239
+ /**
240
+ * Every event that can move the phase. `click: true` marks the ones only the person's own
241
+ * press may send — the guard test reads it.
242
+ */
243
+ type PhaseEvent =
244
+ /** The link resolved on page load / mount: `resolving` → `prejoin` (first entry). */
245
+ {
246
+ readonly type: "resolved";
247
+ }
248
+ /** Capability gate failed: this browser cannot join. */
249
+ | {
250
+ readonly type: "unsupported";
251
+ }
252
+ /** The person pressed Join / Rejoin / Ask again. */
253
+ | {
254
+ readonly type: "join";
255
+ readonly click: true;
256
+ }
257
+ /** The person chose to go back to the device check from `left` / `disconnected`. */
258
+ | {
259
+ readonly type: "back_to_prejoin";
260
+ readonly click: true;
261
+ }
262
+ /** The person pressed Try again on a refusal: look the link up again. */
263
+ | {
264
+ readonly type: "retry";
265
+ readonly click: true;
266
+ }
267
+ /** The server said wait (or decided a wait): the admission row's own word. */
268
+ | {
269
+ readonly type: "admission";
270
+ readonly admission: AdmissionState;
271
+ }
272
+ /** Admitted from the waiting room: the core mints the real pass and joins. */
273
+ | {
274
+ readonly type: "admitted";
275
+ }
276
+ /** LiveKit said connected. */
277
+ | {
278
+ readonly type: "connected";
279
+ }
280
+ /** The join itself failed: a gate reason (→ `refused:*` / `ended`) or none (→ `disconnected`). */
281
+ | {
282
+ readonly type: "join_failed";
283
+ readonly reason: string | null;
284
+ }
285
+ /** §3.4: the exit-reason resolution decided where an in-call person went. */
286
+ | {
287
+ readonly type: "exit";
288
+ readonly to: ExitPhase;
289
+ }
290
+ /** My Leave (in the room, joining, or withdrawing from the waiting room). */
291
+ | {
292
+ readonly type: "leave";
293
+ }
294
+ /** The meeting (or this run of it) is over, by any carrier. */
295
+ | {
296
+ readonly type: "ended";
297
+ }
298
+ /** §3.6: I placed a call / a call rings me while nothing else is on screen. */
299
+ | {
300
+ readonly type: "ring_out";
301
+ } | {
302
+ readonly type: "ring_in";
303
+ }
304
+ /** §3.6: an answered call (by me, or my callee) — join its room. */
305
+ | {
306
+ readonly type: "call_answered";
307
+ }
308
+ /** §3.6: the call ended before it connected. */
309
+ | {
310
+ readonly type: "call_outcome";
311
+ readonly outcome: CallOutcomePhase;
312
+ }
313
+ /** Back to the start: a different meeting mounted, the call surface was dismissed, or dispose. */
314
+ | {
315
+ readonly type: "reset";
316
+ };
317
+ type PhaseEventType = PhaseEvent["type"];
318
+ /** Phases in which this tab holds (or is getting) a live media connection. */
319
+ declare const LIVE_PHASES: ReadonlySet<MeetPhase>;
320
+ /** The waiting-room phase set (the core reads the server's state while in one of these). */
321
+ declare const WAITING_PHASES: ReadonlySet<MeetPhase>;
322
+ /** Nothing live, nothing pending: a call may take the screen from here. */
323
+ declare const IDLE_PHASES: ReadonlySet<MeetPhase>;
324
+ declare function isLivePhase(phase: MeetPhase): boolean;
325
+ declare function isWaitingPhase(phase: MeetPhase): boolean;
326
+ declare function isRefusedPhase(phase: MeetPhase): phase is `refused:${RefusedReason}`;
327
+ /** The reason a refused / terminal phase carries (`data-meet-reason`). */
328
+ declare function reasonOf(phase: MeetPhase): string | null;
329
+ /** A gate reason → the phase it renders. `ended` is the ended phase, never `refused:ended`. */
330
+ declare function refusalPhase(reason: string | null): MeetPhase;
331
+ /** The server's admission word → the waiting phase it renders (§3.1, S4). */
332
+ declare function admissionPhase(admission: AdmissionState): MeetPhase | null;
333
+ /**
334
+ * THE TABLE. Returns the next phase, or null when `event` may not move `from` (refused).
335
+ * Pure — the store applies it, and the guard tests enumerate it.
336
+ */
337
+ declare function nextPhase(from: MeetPhase, event: PhaseEvent): MeetPhase | null;
338
+ /** What the server's state read (`GET /v1/meet/state?connection=`) says about this exit. */
339
+ interface ExitServerWord {
340
+ /** `meet_connections.exit_reason` of THIS connection, if the server recorded one. */
341
+ readonly exitReason: string | null;
342
+ /** The run's phase: `ended` means the meeting (this run) is over. */
343
+ readonly sessionPhase: string | null;
344
+ readonly meetingPhase?: string | null;
345
+ }
346
+ interface ExitInput {
347
+ /** The server's word; `null` = the state read failed (offline / unreachable); undefined = no ST for this room (a call). */
348
+ readonly server: ExitServerWord | null | undefined;
349
+ /** LiveKit's `DisconnectReason` name (`PARTICIPANT_REMOVED`, `DUPLICATE_IDENTITY`, …), or null. */
350
+ readonly hint: string | null;
351
+ /** The page was frozen (Page Lifecycle) when the connection dropped. */
352
+ readonly frozen?: boolean;
353
+ }
354
+ interface ExitResolution {
355
+ readonly to: ExitPhase;
356
+ /** `data-meet-reason` for the exit (null when the phase says it all). */
357
+ readonly reason: string | null;
358
+ /** `data-meet-connection` to show beside `disconnected`. */
359
+ readonly connection: "stable" | "offline" | "server_unreachable";
360
+ /** A notice code the skin renders with it (`sent-to-waiting`), when one applies. */
361
+ readonly notice: string | null;
362
+ }
363
+ /** §3.4, row by row. Pure: the engine gathers the inputs, this decides. */
364
+ declare function resolveExit(input: ExitInput): ExitResolution;
365
+
197
366
  /**
198
367
  * THE NOTE-TAKER, AS A SURFACE MUST RENDER IT.
199
368
  *
@@ -364,8 +533,46 @@ interface MeetWaiting {
364
533
  /** The run's `live_version` at the last read. */
365
534
  readonly liveVersion: number;
366
535
  }
536
+ /** The core's `connection` region (CORE-DESIGN §3.2) — never a phase. */
537
+ type ConnectionRegion = "stable" | "signal_reconnecting" | "reconnecting" | "offline" | "server_unreachable";
538
+ /**
539
+ * The core's `share` region (CORE-DESIGN §3.2/§3.3 SA). A refused share is a situation the person
540
+ * is in — a notice (`share-unavailable`), never a phase.
541
+ */
542
+ interface ShareRegion {
543
+ readonly state: "none" | "picking" | "presenting" | "refused";
544
+ /** Why a share was refused: this browser cannot share, the system blocks it, or it failed. */
545
+ readonly reason: "unsupported" | "blocked" | "failed" | null;
546
+ /** The fix, in the core's words (system setting, administrator policy, …), or null. */
547
+ readonly remedy: string | null;
548
+ readonly at: number;
549
+ }
550
+ declare const NO_SHARE: ShareRegion;
367
551
  interface MeetSnapshot {
368
- readonly phase: RoomPhase;
552
+ /**
553
+ * WHERE THIS TAB IS — the contract's `data-meet-phase` value, verbatim (CORE-DESIGN §3.1).
554
+ * Written ONLY by `store.dispatch(event)` through the phase machine (`core/phase.ts`);
555
+ * `patch` cannot touch it.
556
+ */
557
+ readonly phase: MeetPhase;
558
+ /** `data-meet-reason` for a refused / terminal phase; null otherwise. */
559
+ readonly reason: string | null;
560
+ /** A notice that came WITH the phase (`sent-to-waiting`), or null. */
561
+ readonly phaseNotice: string | null;
562
+ /** The room this tab last joined (or is joining) — a different meeting mounting resets. */
563
+ readonly roomName: RoomName | null;
564
+ /** The `connection` region: reconnecting is here, never a phase. */
565
+ readonly connection: ConnectionRegion;
566
+ /** The `share` region. */
567
+ readonly share: ShareRegion;
568
+ /**
569
+ * The 1:1 call this tab is placing or answering (CORE-DESIGN §3.6) — the core `calls` slice.
570
+ * The ringing phases (`ringing_out` / `ringing_in` / `call_*`) describe it; null = no call.
571
+ */
572
+ readonly call: {
573
+ readonly invite: CallInvite;
574
+ readonly direction: "outgoing" | "incoming";
575
+ } | null;
369
576
  /** S4: this person's wait (see `MeetWaiting`); null outside the waiting room. */
370
577
  readonly waiting: MeetWaiting | null;
371
578
  readonly meeting: MeetingRecord | null;
@@ -485,10 +692,22 @@ interface MeetSnapshot {
485
692
  }
486
693
  /** Reactions live this long. A dropped end event cannot outlive it. */
487
694
  declare const REACTION_TTL_MS = 5000;
695
+ /** What `patch` accepts: the snapshot minus the machine-owned fields. */
696
+ type MeetPatch = Partial<Omit<MeetSnapshot, "phase" | "reason" | "phaseNotice">>;
488
697
  interface MeetStore {
489
698
  snapshot(): MeetSnapshot;
490
699
  subscribe(listener: () => void): () => void;
491
- patch(next: Partial<MeetSnapshot>): void;
700
+ /** Everything EXCEPT the phase. The phase moves only through `dispatch`. */
701
+ patch(next: MeetPatch): void;
702
+ /**
703
+ * THE ONE WRITER OF THE PHASE (CORE-DESIGN §3.1). Applies `event` through the machine's table;
704
+ * returns false — and changes nothing — when the table does not allow it from the current
705
+ * phase. `reason` overrides the phase's own reason (an exit's `removed`, `displaced`, …).
706
+ */
707
+ dispatch(event: PhaseEvent, detail?: {
708
+ readonly reason?: string | null;
709
+ readonly notice?: string | null;
710
+ }): boolean;
492
711
  setParticipants(participants: readonly MeetParticipant[]): void;
493
712
  setSpeaking(identities: readonly ParticipantIdentity[]): void;
494
713
  setQuality(identity: ParticipantIdentity, quality: ConnectionQuality): void;
@@ -753,6 +972,8 @@ declare const TABLES: {
753
972
  readonly invitees: "meet_invitees";
754
973
  /** Wave 1 (0.8): one occurrence of a series cancelled or moved. */
755
974
  readonly occurrenceOverrides: "meet_occurrence_overrides";
975
+ /** S5: one row per RUN of a meeting; carries that run's note-taker state. */
976
+ readonly sessions: "meet_sessions";
756
977
  };
757
978
  declare const RPCS: {
758
979
  /** Atomic: create the invite row and stamp its expiry in one statement. */
@@ -1087,6 +1308,11 @@ interface CallCenterOptions {
1087
1308
  ringTimeoutMs?: number | undefined;
1088
1309
  onIncoming?: ((invite: CallInvite) => void) | undefined;
1089
1310
  onSettled?: ((invite: CallInvite) => void) | undefined;
1311
+ /**
1312
+ * §3.6: MY outgoing call was answered — join its room on the same engine and machine
1313
+ * (`ringing_out` → `joining` → `in_call`). The provider wires this to `engine.join`.
1314
+ */
1315
+ onAnswered?: ((invite: CallInvite) => void) | undefined;
1090
1316
  onDiagnostic?: ((event: {
1091
1317
  level: "info" | "warn" | "error";
1092
1318
  message: string;
@@ -1834,6 +2060,11 @@ interface MeetingSession {
1834
2060
  stopWaiting(): void;
1835
2061
  /** One state read now (idempotent while one is in flight). */
1836
2062
  readState(): Promise<void>;
2063
+ /**
2064
+ * §3.4 ER: what the server recorded for THIS connection's exit, and the run's phase. null =
2065
+ * the read failed (offline / unreachable); undefined = no meeting or no pass to ask with.
2066
+ */
2067
+ readExit(connection: string): Promise<ExitServerWord | null | undefined>;
1837
2068
  /** Stop waiting: the row becomes `withdrawn` (`POST /v1/meet/leave {intent: "withdraw"}`). */
1838
2069
  withdraw(): Promise<void>;
1839
2070
  /** Ask again after a denial or an expired knock (only offered when allowed). */
@@ -2721,6 +2952,14 @@ interface RoomEngineOptions {
2721
2952
  * default whatever the screen said.
2722
2953
  */
2723
2954
  resolveDevice?: ((kind: "audioinput" | "videoinput" | "audiooutput") => string | null) | undefined;
2955
+ /**
2956
+ * §3.4 EXIT-REASON RESOLUTION: on every LiveKit disconnect the engine asks the server's state
2957
+ * read what happened to THIS connection (`GET /v1/meet/state?connection=`). Resolves null when
2958
+ * the read failed (offline / unreachable), undefined when this room has no state read (a call).
2959
+ */
2960
+ readExit?: ((connection: string) => Promise<ExitServerWord | null | undefined>) | undefined;
2961
+ /** Was the page frozen when the connection dropped (Page Lifecycle)? → `inactive`. */
2962
+ wasFrozen?: (() => boolean) | undefined;
2724
2963
  }
2725
2964
  interface RoomEngine {
2726
2965
  join(request: JoinRequest): Promise<void>;
@@ -2742,6 +2981,10 @@ interface RoomEngine {
2742
2981
  */
2743
2982
  moveToBreakout(roomId: string | null): Promise<void>;
2744
2983
  leave(): Promise<void>;
2984
+ /** The person's own "back to the device check" press from `left` / `disconnected`. */
2985
+ backToPrejoin(): void;
2986
+ /** Clear a refused-share notice (the `share` region) the person dismissed. */
2987
+ dismissShareNotice(): void;
2745
2988
  setMicrophoneEnabled(enabled: boolean): Promise<void>;
2746
2989
  setCameraEnabled(enabled: boolean): Promise<void>;
2747
2990
  setScreenShareEnabled(enabled: boolean): Promise<void>;
@@ -3020,19 +3263,6 @@ declare function createMeetingRecordCache(options?: {
3020
3263
  graceMs?: number;
3021
3264
  }): MeetingRecordCache;
3022
3265
 
3023
- /**
3024
- * THE JOIN GATE'S REASON CODES — ONE VOCABULARY (CORE-DESIGN §2.5).
3025
- *
3026
- * aidream's `services/meet/errors.py` (`JOIN_REFUSAL_REASONS`) emits exactly these codes and a
3027
- * server test fails if the two lists differ; the consuming app decides every refusal screen by
3028
- * one of them — never by the HTTP status and never by matching message text. Skins own the
3029
- * words; the phase renders `refused:<reason>`, except `ended`, which renders the `ended` phase.
3030
- */
3031
- declare const JOIN_REFUSAL_REASONS: readonly ["not_found", "cancelled", "ended", "expired", "too_early", "sign_in_required", "wrong_account", "not_invited", "locked", "removed", "lobby_rejects", "meeting_full", "platform_capacity", "verification_required", "registration_required"];
3032
- type JoinRefusalReason = (typeof JOIN_REFUSAL_REASONS)[number];
3033
- /** Is `value` one of the codes the join gate speaks? */
3034
- declare function isJoinRefusalReason(value: unknown): value is JoinRefusalReason;
3035
-
3036
3266
  /**
3037
3267
  * The reaction ids every skin offers (CORE-DESIGN §5.3). The id IS the emoji
3038
3268
  * the wire carries; a skin may draw its own art for each, never a different set.
@@ -3126,9 +3356,9 @@ declare function takeMoveRequest(store: CollabStoreLike): {
3126
3356
  * `viewer` render `participant` until the contract adopts them (§3.7 C3).
3127
3357
  */
3128
3358
  type ObservedRole = "host" | "cohost" | "participant" | "guest";
3129
- /** `data-meet-phase` values this release renders (a subset of the contract's §2). */
3130
- type ObservedPhase = "resolving" | `refused:${string}` | "prejoin" | "joining" | "waiting:knocking" | "waiting:host_not_started" | "denied" | "knock_expired" | "left" | "in_call" | "disconnected" | "ended";
3131
- type ObservedConnection = "stable" | "reconnecting" | "server_unreachable";
3359
+ /** `data-meet-phase` — the core's phase IS the contract value (S6a: no translation layer). */
3360
+ type ObservedPhase = MeetPhase;
3361
+ type ObservedConnection = ConnectionRegion;
3132
3362
  interface MeetObservation {
3133
3363
  readonly phase: ObservedPhase;
3134
3364
  readonly reason: string | null;
@@ -3152,9 +3382,9 @@ interface ObserveInput {
3152
3382
  /** The store's device state → the contract's `camera` / `microphone` value. */
3153
3383
  declare function observedDevice(track: LocalTrackState): string;
3154
3384
  /**
3155
- * The phase the person is looking at, by the same branches `<MeetingRoom>`
3156
- * renders on: record → pre-join (idle/failed/left) → waiting room (lobby) →
3157
- * the room (everything else).
3385
+ * The phase the person is looking at: the store's phase, verbatim (CORE-DESIGN §3.1). The one
3386
+ * derivation left is the ended meeting: a row that says it is over renders `ended` for anyone not
3387
+ * in a live connection, whichever carrier delivered the ending first.
3158
3388
  */
3159
3389
  declare function observedPhase(input: ObserveInput): ObservedPhase;
3160
3390
  declare function observe(input: ObserveInput): MeetObservation;
@@ -3169,4 +3399,4 @@ declare function participantAttributes(p: MeetParticipant): Record<string, strin
3169
3399
  /** The listen-only notice's contract code, from why the microphone is off. */
3170
3400
  declare function microphoneNoticeCode(track: LocalTrackState): "mic-blocked" | "device-lost" | null;
3171
3401
 
3172
- export { ATTENDANCE_CSV_HEADER, AdmissionState, type AnnounceResult, type ApplyRoomEventArgs, type AskArgs, type AttendanceKind, type AttendanceRow, type AudioProcessing, CALL_INVITE_KIND, CALL_INVITE_VERSION, CONSENT_NOTICE_ATTRIBUTE, type CallCenter, type CallCenterOptions, CallId, CallInvite, type CallInviteHandlerOptions, type CallInvitePayload, CallMode, CallState, type CollabAction, CollabPanel, type CollabRequest, type CollabResult, type CollabRuntime, CollabSnapshot, type CollabStoreLike, ConnectionQuality, type CreateCallInviteInput, type CreateMeetingInput, DATA_TOPICS, DEFAULT_EFFECTS, DEFAULT_PAGE_SIZE, type DataTopic, type DeviceKind, type DeviceManager, type DeviceManagerOptions, type DeviceSnapshot, type DeviceStorage, type DriverConnectionState, type DriverParticipant, type DriverTrackKind, type DriverTranscription, END_MEETING_NOT_SERVED, type EffectsStorage, type EndMeetingResult, type FollowUpDraft, type FollowUpRecipient, type FollowUpSendResult, GUEST_RECORD_ACCESS_CHOICES, GUEST_RECORD_ACCESS_LEVELS, GUEST_RECORD_ACCESS_METADATA_KEY, GUEST_RECORD_NOT_SHARED, type GuestRecordAccess, type GuestRecordAccessResolution, type GuestRecordAccessSetting, IDLE_MEDIA, IDLE_TRACK, type InRoomClient, type InRoomClientOptions, InviteeInput, InviteeRole, JOIN_REFUSAL_REASONS, type JoinRefusalReason, type JoinRequest, LISTEN_ONLY_NOTICE, type LibraryRecording, type LiveKitDriverOptions, LobbyEntry, type LocalMediaState, type LocalTrackState, MEETING_INVITE_KIND, MEETING_INVITE_VERSION, MEETING_PASS_HEADER, MEETING_RECORD_GRACE_MS, MEET_ANSWER_CONTEXT_EVENT, MEET_ANSWER_EVENTS, MEET_EVENTS, MEET_REACTIONS, MEET_ROUTES, MEET_SCHEMA, MODERATION_ACTIONS, type MediaDevicesLike, type MediaEffects, type MediaUnavailable, type MeetAi, type MeetAiAnswer, type MeetAiOptions, type MeetAnswerCoverage, MeetApi, type MeetDevice, MeetError, type MeetErrorCode, type MeetEvent, type MeetGrants, MeetIdentity, type MeetObservation, MeetParticipant, type MeetRepository, type MeetRoomDriver, type MeetSnapshot, type MeetStore, MeetingAttendee, MeetingChanges, type MeetingChatHistory, MeetingId, type MeetingInviteHandlerOptions, type MeetingInvitePayload, MeetingInvitee, MeetingKind, MeetingNote, MeetingOccurrence, MeetingRecord, type MeetingRecordAnswer, type MeetingRecordBundle, type MeetingRecordCache, type MeetingRecordChange, type MeetingRecordFailure, type MeetingRecordParts, type MeetingRecordRestriction, type MeetingRecordRestrictionNotice, type MeetingRecordState, type MeetingSearchHit, type MeetingSearchSource, type MeetingSession, type MeetingSessionOptions, MeetingSettings, type ModerationAction, type ModerationNotice, type ModerationRequest, type ModerationResult, NOTE_TAKER_IDENTITY_PREFIX, NOTE_TAKER_METADATA_KEY, NO_GRANTS, type NameBook, type NoteTakerDispatch, type NoteTakerRefusal, NoteTakerState, type NoteTakerStatus, type ObserveInput, type ObservedConnection, type ObservedPhase, ObserversVisibleTo, OccurrenceOverride, OrganizationId, PARTICIPANT_CAN_RECORD_ATTRIBUTE, PARTICIPANT_ROLE_ATTRIBUTE, PARTICIPANT_STANDING_ATTRIBUTE, ParticipantIdentity, ParticipantRole, ParticipantStanding, REACTION_TTL_MS, REFUSED_ABSENCE, ROOM_EVENTS, ROOM_EVENT_PREFIX, RPCS, type RecordingController, type RecordingControllerOptions, RecordingPolicy, RecordingRecord, RecordingState, type RepositoryOptions, type RoomChatMessage, type RoomDriverFactory, type RoomDriverHandlers, type RoomEngine, type RoomEngineOptions, type RoomEventOutcome, type RoomEventTopic, RoomName, RoomPhase, type RoomReaction, type RoomToken, type RoomTokenStorage, RsvpAnswer, RsvpInvitation, type ScheduleMeetingInput, type Stage, type StageArgs, StageLayout, TABLES, TRANSCRIPTION_ATTRIBUTES, TRANSCRIPTION_TOPIC, type TokenClient, type TokenClientOptions, type TokenRequest, type TranscriptBlock, type TranscriptFormat, type TranscriptMatch, TranscriptSegment, UpcomingOccurrence, UserId, type VideoEffect, WrapUpAnnouncement, type WrapUpStatus, absenceSentence, activeWrapUpSummary, activityAttention, announceMeeting, applyRoomEvent, assembleMeetingRecord, attendanceCsv, attendanceReport, attendanceTotals, attendeeKey, availableActivities, callInviteAction, callInviteText, callStateLabel, canModerate, canModerateParticipant, canTransition, captionSegment, changesPatch, clockPosition, computeStage, countLabel, createCallCenter, createCallInviteHandler, createDeviceManager, createInRoomClient, createLiveKitDriver, createMeetAi, createMeetRepository, createMeetStore, createMeetingInviteHandler, createMeetingRecordCache, createMeetingSession, createMemoryDeviceStorage, createRecordingController, createRoomEngine, createTokenClient, createWebDeviceStorage, createWebEffectsStorage, createWebRoomTokenStorage, displayNameFor, gridColumns, groupTranscript, guestRecordAccessExplanation, guestRecordAccessLabel, guestRecordAccessSetting, hasEnded, hostUserIds, invalidResponse, isGuestIdentity, isJoinRefusalReason, isListenOnly, isNoteTaker, isRealName, isRoomEventTopic, learnName, learnNames, listenOnlyNotice, loadFollowUpDraft, loadGuestMeetingRecord, loadMeetingChat, loadMeetingRecord, loadMeetingRecordParts, mapConnectionState, mapQuality, meetingInviteAction, meetingLength, meetingLink, meetingPassHeaders, meetingPath, meetingSlug, meetingTopic, meetingWhen, mergeCaption, mergeRecord, microphoneNoticeCode, moveToRoom, nextTranslationBatch, normalizeDeviceError, normalizeMeetError, normalizeSpoken, noteTakerIdentity, noteTakerLabel, noteTakerParticipant, noteTakerStatus, notesDocument, observe as observeMeeting, observedDevice, observedPhase, observedQuality, orderParticipants, parseRoomToken, participantAttributes, participantSummary, performCollab, playableRecordingFileId, projectInvitee, projectLibraryRecording, projectNote, projectOccurrence, projectOverride, projectParticipant, projectRsvpInvitation, projectSearchHit, projectSegment, projectUpcoming, pushMeetingToGoogleCalendar, readServerRefusal, readableTranscript, recordingLabel, recordingNotice, recordingOffsetMs, rememberedMeetingPass, roleOf, roomTopic, rootAttributes, searchTranscript, sendFollowUp, setCaptionLanguage, setGuestRecordAccess, settingsPatch, snapshotParticipant, snippetRuns, staticObservation, summarizeMeetingRecordRestrictions, takeMoveRequest, takePanelRequest, transcriptDocument, unavailableFrom, uniqueAttendees, untranslatedLines, userTopic, wasRefused, wrapUpStatus };
3402
+ export { ATTENDANCE_CSV_HEADER, AdmissionState, type AnnounceResult, type ApplyRoomEventArgs, type AskArgs, type AttendanceKind, type AttendanceRow, type AudioProcessing, CALL_INVITE_KIND, CALL_INVITE_VERSION, CONSENT_NOTICE_ATTRIBUTE, type CallCenter, type CallCenterOptions, CallId, CallInvite, type CallInviteHandlerOptions, type CallInvitePayload, CallMode, type CallOutcomePhase, CallState, type CollabAction, CollabPanel, type CollabRequest, type CollabResult, type CollabRuntime, CollabSnapshot, type CollabStoreLike, ConnectionQuality, type ConnectionRegion, type CreateCallInviteInput, type CreateMeetingInput, DATA_TOPICS, DEFAULT_EFFECTS, DEFAULT_PAGE_SIZE, type DataTopic, type DeviceKind, type DeviceManager, type DeviceManagerOptions, type DeviceSnapshot, type DeviceStorage, type DriverConnectionState, type DriverParticipant, type DriverTrackKind, type DriverTranscription, END_MEETING_NOT_SERVED, type EffectsStorage, type EndMeetingResult, type ExitInput, type ExitPhase, type ExitResolution, type ExitServerWord, type FollowUpDraft, type FollowUpRecipient, type FollowUpSendResult, GUEST_RECORD_ACCESS_CHOICES, GUEST_RECORD_ACCESS_LEVELS, GUEST_RECORD_ACCESS_METADATA_KEY, GUEST_RECORD_NOT_SHARED, type GuestRecordAccess, type GuestRecordAccessResolution, type GuestRecordAccessSetting, IDLE_MEDIA, IDLE_PHASES, IDLE_TRACK, type InRoomClient, type InRoomClientOptions, InviteeInput, InviteeRole, JOIN_REFUSAL_REASONS, type JoinRefusalReason, type JoinRequest, LISTEN_ONLY_NOTICE, LIVE_PHASES, type LibraryRecording, type LiveKitDriverOptions, LobbyEntry, type LocalMediaState, type LocalTrackState, MEETING_INVITE_KIND, MEETING_INVITE_VERSION, MEETING_PASS_HEADER, MEETING_RECORD_GRACE_MS, MEET_ANSWER_CONTEXT_EVENT, MEET_ANSWER_EVENTS, MEET_EVENTS, MEET_REACTIONS, MEET_ROUTES, MEET_SCHEMA, MODERATION_ACTIONS, type MediaDevicesLike, type MediaEffects, type MediaUnavailable, type MeetAi, type MeetAiAnswer, type MeetAiOptions, type MeetAnswerCoverage, MeetApi, type MeetDevice, MeetError, type MeetErrorCode, type MeetEvent, type MeetGrants, MeetIdentity, type MeetObservation, MeetParticipant, type MeetPatch, type MeetPhase, type MeetRepository, type MeetRoomDriver, type MeetSnapshot, type MeetStore, MeetingAttendee, MeetingChanges, type MeetingChatHistory, MeetingId, type MeetingInviteHandlerOptions, type MeetingInvitePayload, MeetingInvitee, MeetingKind, MeetingNote, MeetingOccurrence, MeetingRecord, type MeetingRecordAnswer, type MeetingRecordBundle, type MeetingRecordCache, type MeetingRecordChange, type MeetingRecordFailure, type MeetingRecordParts, type MeetingRecordRestriction, type MeetingRecordRestrictionNotice, type MeetingRecordState, type MeetingSearchHit, type MeetingSearchSource, type MeetingSession, type MeetingSessionOptions, MeetingSettings, type ModerationAction, type ModerationNotice, type ModerationRequest, type ModerationResult, NOTE_TAKER_IDENTITY_PREFIX, NOTE_TAKER_METADATA_KEY, NO_GRANTS, NO_SHARE, type NameBook, type NoteTakerDispatch, type NoteTakerRefusal, NoteTakerState, type NoteTakerStatus, type ObserveInput, type ObservedConnection, type ObservedPhase, ObserversVisibleTo, OccurrenceOverride, OrganizationId, PARTICIPANT_CAN_RECORD_ATTRIBUTE, PARTICIPANT_ROLE_ATTRIBUTE, PARTICIPANT_STANDING_ATTRIBUTE, ParticipantIdentity, ParticipantRole, ParticipantStanding, type PhaseEvent, type PhaseEventType, REACTION_TTL_MS, REFUSED_ABSENCE, ROOM_EVENTS, ROOM_EVENT_PREFIX, RPCS, type RecordingController, type RecordingControllerOptions, RecordingPolicy, RecordingRecord, RecordingState, type RepositoryOptions, type RoomChatMessage, type RoomDriverFactory, type RoomDriverHandlers, type RoomEngine, type RoomEngineOptions, type RoomEventOutcome, type RoomEventTopic, RoomName, type RoomReaction, type RoomToken, type RoomTokenStorage, RsvpAnswer, RsvpInvitation, type ScheduleMeetingInput, type ShareRegion, type Stage, type StageArgs, StageLayout, TABLES, TRANSCRIPTION_ATTRIBUTES, TRANSCRIPTION_TOPIC, type TokenClient, type TokenClientOptions, type TokenRequest, type TranscriptBlock, type TranscriptFormat, type TranscriptMatch, TranscriptSegment, UpcomingOccurrence, UserId, type VideoEffect, WAITING_PHASES, WrapUpAnnouncement, type WrapUpStatus, absenceSentence, activeWrapUpSummary, activityAttention, admissionPhase, announceMeeting, applyRoomEvent, assembleMeetingRecord, attendanceCsv, attendanceReport, attendanceTotals, attendeeKey, availableActivities, callInviteAction, callInviteText, callStateLabel, canModerate, canModerateParticipant, canTransition, captionSegment, changesPatch, clockPosition, computeStage, countLabel, createCallCenter, createCallInviteHandler, createDeviceManager, createInRoomClient, createLiveKitDriver, createMeetAi, createMeetRepository, createMeetStore, createMeetingInviteHandler, createMeetingRecordCache, createMeetingSession, createMemoryDeviceStorage, createRecordingController, createRoomEngine, createTokenClient, createWebDeviceStorage, createWebEffectsStorage, createWebRoomTokenStorage, displayNameFor, gridColumns, groupTranscript, guestRecordAccessExplanation, guestRecordAccessLabel, guestRecordAccessSetting, hasEnded, hostUserIds, invalidResponse, isGuestIdentity, isJoinRefusalReason, isListenOnly, isLivePhase, isNoteTaker, isRealName, isRefusedPhase, isRoomEventTopic, isWaitingPhase, learnName, learnNames, listenOnlyNotice, loadFollowUpDraft, loadGuestMeetingRecord, loadMeetingChat, loadMeetingRecord, loadMeetingRecordParts, mapConnectionState, mapQuality, meetingInviteAction, meetingLength, meetingLink, meetingPassHeaders, meetingPath, meetingSlug, meetingTopic, meetingWhen, mergeCaption, mergeRecord, microphoneNoticeCode, moveToRoom, nextPhase, nextTranslationBatch, normalizeDeviceError, normalizeMeetError, normalizeSpoken, noteTakerIdentity, noteTakerLabel, noteTakerParticipant, noteTakerStatus, notesDocument, observe as observeMeeting, observedDevice, observedPhase, observedQuality, orderParticipants, parseRoomToken, participantAttributes, participantSummary, performCollab, playableRecordingFileId, projectInvitee, projectLibraryRecording, projectNote, projectOccurrence, projectOverride, projectParticipant, projectRsvpInvitation, projectSearchHit, projectSegment, projectUpcoming, pushMeetingToGoogleCalendar, readServerRefusal, readableTranscript, reasonOf, recordingLabel, recordingNotice, recordingOffsetMs, refusalPhase, rememberedMeetingPass, resolveExit, roleOf, roomTopic, rootAttributes, searchTranscript, sendFollowUp, setCaptionLanguage, setGuestRecordAccess, settingsPatch, snapshotParticipant, snippetRuns, staticObservation, summarizeMeetingRecordRestrictions, takeMoveRequest, takePanelRequest, transcriptDocument, unavailableFrom, uniqueAttendees, untranslatedLines, userTopic, wasRefused, wrapUpStatus };