@ai-matrx/meet 0.11.45 → 0.11.47

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/react.js CHANGED
@@ -800,10 +800,10 @@ var MEET_ROUTES = {
800
800
  recordingStop: "/api/v1/meet/recording/stop",
801
801
  noteTakerStart: "/api/v1/meet/agent/start",
802
802
  noteTakerStop: "/api/v1/meet/agent/stop",
803
- /** In-meeting Q&A. Streams NDJSON; body is `{meeting_id, question}` only. */
804
- intelligenceAsk: "/api/v1/meet/intelligence/ask",
805
803
  /** Anyone in the meeting (guests with the room pass included) asks for captions for themselves. */
806
804
  noteTakerCaptions: "/api/v1/meet/agent/captions",
805
+ /** In-meeting Q&A. Streams NDJSON; body is `{meeting_id, question}` only. */
806
+ intelligenceAsk: "/api/v1/meet/intelligence/ask",
807
807
  /** A host ends the meeting for everyone. Served by MRI-A6. */
808
808
  meetingEnd: "/api/v1/meet/end",
809
809
  /**
@@ -4416,11 +4416,15 @@ function createMeetingSession(options) {
4416
4416
  }
4417
4417
  let policyTimer = null;
4418
4418
  let policyReading = false;
4419
+ let policyInFlight = null;
4419
4420
  async function readLivePolicy() {
4420
4421
  const meeting = store.snapshot().meeting;
4421
4422
  const pass = options.resolvePass?.() ?? null;
4422
- if (meeting === null || pass === null || policyReading) return;
4423
+ if (meeting === null || pass === null) return;
4424
+ if (policyReading) return policyInFlight ?? void 0;
4423
4425
  policyReading = true;
4426
+ let done = () => void 0;
4427
+ policyInFlight = new Promise((resolve) => done = resolve);
4424
4428
  try {
4425
4429
  const response = await options.api.request({
4426
4430
  path: `${MEET_ROUTES.state}?meeting_id=${encodeURIComponent(meeting.id)}`,
@@ -4441,6 +4445,8 @@ function createMeetingSession(options) {
4441
4445
  } catch {
4442
4446
  } finally {
4443
4447
  policyReading = false;
4448
+ policyInFlight = null;
4449
+ done();
4444
4450
  }
4445
4451
  }
4446
4452
  function syncLivePolicyTimer() {
@@ -4739,6 +4745,7 @@ function createMeetingSession(options) {
4739
4745
  },
4740
4746
  stopWaiting,
4741
4747
  readState: readState2,
4748
+ readLivePolicy,
4742
4749
  async readExit(connection, held) {
4743
4750
  const meeting = store.snapshot().meeting;
4744
4751
  const pass = held ?? options.resolvePass?.() ?? null;
@@ -4930,7 +4937,7 @@ function unsupportedWords(capabilities) {
4930
4937
  body: "Open this link in Chrome, Safari, Edge or Firefox"
4931
4938
  };
4932
4939
  }
4933
- return { title: "This browser can't join calls", body: "Open this link in Chrome, Safari, Edge or Firefox" };
4940
+ return { title: "Meet is not compatible with your browser yet", body: "Open this link in Chrome, Safari, Edge or Firefox" };
4934
4941
  }
4935
4942
 
4936
4943
  // src/core/media-supervisor.ts
@@ -5566,6 +5573,7 @@ var STATES = [
5566
5573
  "ended"
5567
5574
  ];
5568
5575
  function readState(value) {
5576
+ if (value === "dispatching") return "joining";
5569
5577
  return typeof value === "string" && STATES.includes(value) ? value : null;
5570
5578
  }
5571
5579
  function isNoteTaker(participant) {
@@ -6627,6 +6635,7 @@ function createInRoomClient(options) {
6627
6635
  action: request.action,
6628
6636
  ...request.identity != null ? { identity: request.identity } : {},
6629
6637
  ...request.name !== void 0 ? { name: request.name } : {},
6638
+ ...request.value !== void 0 ? { value: request.value } : {},
6630
6639
  ...request.reason !== void 0 ? { reason: request.reason } : {}
6631
6640
  },
6632
6641
  ...hdrs !== void 0 ? { headers: hdrs } : {}
@@ -9002,7 +9011,10 @@ function useEndMeeting() {
9002
9011
  function useConsentNotice() {
9003
9012
  const snapshot = useMeetSnapshot();
9004
9013
  const agent = noteTakerParticipant(snapshot?.participants ?? []);
9005
- if (agent === null) return null;
9014
+ if (agent === null) {
9015
+ const state = noteTakerStatus({ meeting: snapshot?.meeting ?? null, participants: [] }).state;
9016
+ return state === "joining" ? "AI notes started. The note-taker is joining this meeting." : null;
9017
+ }
9006
9018
  return `AI notes are on. ${agent.displayName} is in this meeting, transcribing what is said and writing notes everyone here can read.`;
9007
9019
  }
9008
9020
  function useMediaSupervisor() {
@@ -9983,6 +9995,7 @@ async function moveToRoom(runtime, roomId) {
9983
9995
  if (runtime === null) return { ok: false, message: "This meeting is not connected." };
9984
9996
  try {
9985
9997
  await runtime.engine.moveToBreakout(roomId);
9998
+ await runtime.inRoom.loadCollab?.().catch(() => void 0);
9986
9999
  return { ok: true, message: roomId === null ? "Back in the main room." : "Joined the breakout room." };
9987
10000
  } catch (error) {
9988
10001
  return { ok: false, message: error.message ?? "That room could not be joined." };
@@ -12484,6 +12497,17 @@ function ChatPanel({
12484
12497
  const snapshot = useMeetSnapshot();
12485
12498
  const room = useRoom();
12486
12499
  const live = useLivePolicy();
12500
+ const host = useMeetHost();
12501
+ const [rulesChecked, setRulesChecked] = useState5(false);
12502
+ useEffect6(() => {
12503
+ let alive = true;
12504
+ const done = () => alive && setRulesChecked(true);
12505
+ if (host === null) done();
12506
+ else void host.meetings.readLivePolicy().then(done, done);
12507
+ return () => {
12508
+ alive = false;
12509
+ };
12510
+ }, [host]);
12487
12511
  const [draft, setDraft] = useState5("");
12488
12512
  const [recipient, setRecipient] = useState5(to);
12489
12513
  const listRef = useRef6(null);
@@ -12508,7 +12532,7 @@ function ChatPanel({
12508
12532
  snapshot?.chatLoaded !== true && messages.length === 0 ? /* @__PURE__ */ jsx6("li", { className: "mx-meet__panel-note", children: "Reading earlier messages\u2026" }) : messages.length === 0 && snapshot?.chatHistoryError == null ? /* @__PURE__ */ jsx6("li", { className: "mx-meet__panel-note", children: "No messages yet. Messages to everyone stay with the meeting, so people who join later see them." }) : null,
12509
12533
  messages.map((message) => /* @__PURE__ */ jsx6(ChatLine, { message, local, people }, message.id))
12510
12534
  ] }),
12511
- !live.canChat ? /* @__PURE__ */ jsx6("p", { className: "mx-meet__panel-note", role: "status", "data-meet-notice": "chat-restricted", children: live.chatMode === "off" ? "Chat is turned off for this meeting." : "Chat is limited to the host and co-hosts in this meeting." }) : /* @__PURE__ */ jsxs4(
12535
+ !rulesChecked ? null : !live.canChat ? /* @__PURE__ */ jsx6("p", { className: "mx-meet__panel-note", role: "status", "data-meet-notice": "chat-restricted", children: live.chatMode === "off" ? "Chat is turned off for this meeting." : "Chat is limited to the host and co-hosts in this meeting." }) : /* @__PURE__ */ jsxs4(
12512
12536
  "form",
12513
12537
  {
12514
12538
  className: "mx-meet__composer mx-meet__composer--chat",
@@ -14039,8 +14063,8 @@ function ExitScreen({ onLeave }) {
14039
14063
  ] });
14040
14064
  break;
14041
14065
  case "unsupported":
14042
- title = "This browser can't join meetings";
14043
- line = "Open the link in Chrome, Edge, Firefox or Safari.";
14066
+ title = "Meet is not compatible with your browser yet";
14067
+ line = "Open this link in Chrome, Edge, Firefox or Safari.";
14044
14068
  break;
14045
14069
  case "ended":
14046
14070
  case "record":
@@ -14067,6 +14091,9 @@ function ExitScreen({ onLeave }) {
14067
14091
  function WaitingRoom({ host, onLeave }) {
14068
14092
  const { waiting, withdraw, askAgain } = useWaiting();
14069
14093
  const { phaseNotice } = useMeetCore();
14094
+ const localMedia = useLocalMedia();
14095
+ const { region: mediaRegion } = useMediaSupervisor();
14096
+ const noMicrophone = localMedia.microphone.unavailable !== null || mediaRegion.preview.microphone.state === "unavailable";
14070
14097
  const [busy, setBusy] = useState5(false);
14071
14098
  const admission = waiting?.admission ?? "knocking";
14072
14099
  const reknockLeft = useCountdown(admission === "denied" ? waiting?.reknockAt ?? null : null);
@@ -14131,6 +14158,7 @@ function WaitingRoom({ host, onLeave }) {
14131
14158
  children: line
14132
14159
  }
14133
14160
  ) : null,
14161
+ noMicrophone && (admission === "knocking" || admission === "waiting_host") ? /* @__PURE__ */ jsx6("p", { className: "mx-meet__empty-body", role: "status", "data-meet-notice": "joining-without-microphone", children: "You're joining without a microphone. You'll be able to listen, but others won't hear you." }) : null,
14134
14162
  /* @__PURE__ */ jsx6("div", { className: "mx-meet__waiting-actions", children: actions })
14135
14163
  ] });
14136
14164
  }