@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.cjs CHANGED
@@ -1127,10 +1127,10 @@ var MEET_ROUTES = {
1127
1127
  recordingStop: "/api/v1/meet/recording/stop",
1128
1128
  noteTakerStart: "/api/v1/meet/agent/start",
1129
1129
  noteTakerStop: "/api/v1/meet/agent/stop",
1130
- /** In-meeting Q&A. Streams NDJSON; body is `{meeting_id, question}` only. */
1131
- intelligenceAsk: "/api/v1/meet/intelligence/ask",
1132
1130
  /** Anyone in the meeting (guests with the room pass included) asks for captions for themselves. */
1133
1131
  noteTakerCaptions: "/api/v1/meet/agent/captions",
1132
+ /** In-meeting Q&A. Streams NDJSON; body is `{meeting_id, question}` only. */
1133
+ intelligenceAsk: "/api/v1/meet/intelligence/ask",
1134
1134
  /** A host ends the meeting for everyone. Served by MRI-A6. */
1135
1135
  meetingEnd: "/api/v1/meet/end",
1136
1136
  /**
@@ -4743,11 +4743,15 @@ function createMeetingSession(options) {
4743
4743
  }
4744
4744
  let policyTimer = null;
4745
4745
  let policyReading = false;
4746
+ let policyInFlight = null;
4746
4747
  async function readLivePolicy() {
4747
4748
  const meeting = store.snapshot().meeting;
4748
4749
  const pass = options.resolvePass?.() ?? null;
4749
- if (meeting === null || pass === null || policyReading) return;
4750
+ if (meeting === null || pass === null) return;
4751
+ if (policyReading) return policyInFlight ?? void 0;
4750
4752
  policyReading = true;
4753
+ let done = () => void 0;
4754
+ policyInFlight = new Promise((resolve) => done = resolve);
4751
4755
  try {
4752
4756
  const response = await options.api.request({
4753
4757
  path: `${MEET_ROUTES.state}?meeting_id=${encodeURIComponent(meeting.id)}`,
@@ -4768,6 +4772,8 @@ function createMeetingSession(options) {
4768
4772
  } catch {
4769
4773
  } finally {
4770
4774
  policyReading = false;
4775
+ policyInFlight = null;
4776
+ done();
4771
4777
  }
4772
4778
  }
4773
4779
  function syncLivePolicyTimer() {
@@ -5066,6 +5072,7 @@ function createMeetingSession(options) {
5066
5072
  },
5067
5073
  stopWaiting,
5068
5074
  readState: readState2,
5075
+ readLivePolicy,
5069
5076
  async readExit(connection, held) {
5070
5077
  const meeting = store.snapshot().meeting;
5071
5078
  const pass = held ?? options.resolvePass?.() ?? null;
@@ -5255,7 +5262,7 @@ function unsupportedWords(capabilities) {
5255
5262
  body: "Open this link in Chrome, Safari, Edge or Firefox"
5256
5263
  };
5257
5264
  }
5258
- return { title: "This browser can't join calls", body: "Open this link in Chrome, Safari, Edge or Firefox" };
5265
+ return { title: "Meet is not compatible with your browser yet", body: "Open this link in Chrome, Safari, Edge or Firefox" };
5259
5266
  }
5260
5267
 
5261
5268
  // src/core/media-supervisor.ts
@@ -5891,6 +5898,7 @@ var STATES = [
5891
5898
  "ended"
5892
5899
  ];
5893
5900
  function readState(value) {
5901
+ if (value === "dispatching") return "joining";
5894
5902
  return typeof value === "string" && STATES.includes(value) ? value : null;
5895
5903
  }
5896
5904
  function isNoteTaker(participant) {
@@ -6952,6 +6960,7 @@ function createInRoomClient(options) {
6952
6960
  action: request.action,
6953
6961
  ...request.identity != null ? { identity: request.identity } : {},
6954
6962
  ...request.name !== void 0 ? { name: request.name } : {},
6963
+ ...request.value !== void 0 ? { value: request.value } : {},
6955
6964
  ...request.reason !== void 0 ? { reason: request.reason } : {}
6956
6965
  },
6957
6966
  ...hdrs !== void 0 ? { headers: hdrs } : {}
@@ -9327,7 +9336,10 @@ function useEndMeeting() {
9327
9336
  function useConsentNotice() {
9328
9337
  const snapshot = useMeetSnapshot();
9329
9338
  const agent = noteTakerParticipant(snapshot?.participants ?? []);
9330
- if (agent === null) return null;
9339
+ if (agent === null) {
9340
+ const state = noteTakerStatus({ meeting: snapshot?.meeting ?? null, participants: [] }).state;
9341
+ return state === "joining" ? "AI notes started. The note-taker is joining this meeting." : null;
9342
+ }
9331
9343
  return `AI notes are on. ${agent.displayName} is in this meeting, transcribing what is said and writing notes everyone here can read.`;
9332
9344
  }
9333
9345
  function useMediaSupervisor() {
@@ -10308,6 +10320,7 @@ async function moveToRoom(runtime, roomId) {
10308
10320
  if (runtime === null) return { ok: false, message: "This meeting is not connected." };
10309
10321
  try {
10310
10322
  await runtime.engine.moveToBreakout(roomId);
10323
+ await runtime.inRoom.loadCollab?.().catch(() => void 0);
10311
10324
  return { ok: true, message: roomId === null ? "Back in the main room." : "Joined the breakout room." };
10312
10325
  } catch (error) {
10313
10326
  return { ok: false, message: error.message ?? "That room could not be joined." };
@@ -12809,6 +12822,17 @@ function ChatPanel({
12809
12822
  const snapshot = useMeetSnapshot();
12810
12823
  const room = useRoom();
12811
12824
  const live = useLivePolicy();
12825
+ const host = useMeetHost();
12826
+ const [rulesChecked, setRulesChecked] = (0, import_react10.useState)(false);
12827
+ (0, import_react10.useEffect)(() => {
12828
+ let alive = true;
12829
+ const done = () => alive && setRulesChecked(true);
12830
+ if (host === null) done();
12831
+ else void host.meetings.readLivePolicy().then(done, done);
12832
+ return () => {
12833
+ alive = false;
12834
+ };
12835
+ }, [host]);
12812
12836
  const [draft, setDraft] = (0, import_react10.useState)("");
12813
12837
  const [recipient, setRecipient] = (0, import_react10.useState)(to);
12814
12838
  const listRef = (0, import_react10.useRef)(null);
@@ -12833,7 +12857,7 @@ function ChatPanel({
12833
12857
  snapshot?.chatLoaded !== true && messages.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("li", { className: "mx-meet__panel-note", children: "Reading earlier messages\u2026" }) : messages.length === 0 && snapshot?.chatHistoryError == null ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("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,
12834
12858
  messages.map((message) => /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(ChatLine, { message, local, people }, message.id))
12835
12859
  ] }),
12836
- !live.canChat ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("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__ */ (0, import_jsx_runtime6.jsxs)(
12860
+ !rulesChecked ? null : !live.canChat ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("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__ */ (0, import_jsx_runtime6.jsxs)(
12837
12861
  "form",
12838
12862
  {
12839
12863
  className: "mx-meet__composer mx-meet__composer--chat",
@@ -14364,8 +14388,8 @@ function ExitScreen({ onLeave }) {
14364
14388
  ] });
14365
14389
  break;
14366
14390
  case "unsupported":
14367
- title = "This browser can't join meetings";
14368
- line = "Open the link in Chrome, Edge, Firefox or Safari.";
14391
+ title = "Meet is not compatible with your browser yet";
14392
+ line = "Open this link in Chrome, Edge, Firefox or Safari.";
14369
14393
  break;
14370
14394
  case "ended":
14371
14395
  case "record":
@@ -14392,6 +14416,9 @@ function ExitScreen({ onLeave }) {
14392
14416
  function WaitingRoom({ host, onLeave }) {
14393
14417
  const { waiting, withdraw, askAgain } = useWaiting();
14394
14418
  const { phaseNotice } = useMeetCore();
14419
+ const localMedia = useLocalMedia();
14420
+ const { region: mediaRegion } = useMediaSupervisor();
14421
+ const noMicrophone = localMedia.microphone.unavailable !== null || mediaRegion.preview.microphone.state === "unavailable";
14395
14422
  const [busy, setBusy] = (0, import_react10.useState)(false);
14396
14423
  const admission = waiting?.admission ?? "knocking";
14397
14424
  const reknockLeft = useCountdown(admission === "denied" ? waiting?.reknockAt ?? null : null);
@@ -14456,6 +14483,7 @@ function WaitingRoom({ host, onLeave }) {
14456
14483
  children: line
14457
14484
  }
14458
14485
  ) : null,
14486
+ noMicrophone && (admission === "knocking" || admission === "waiting_host") ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("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,
14459
14487
  /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { className: "mx-meet__waiting-actions", children: actions })
14460
14488
  ] });
14461
14489
  }