@ai-matrx/meet 0.11.45 → 0.11.46

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;
@@ -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() {
@@ -12809,6 +12821,17 @@ function ChatPanel({
12809
12821
  const snapshot = useMeetSnapshot();
12810
12822
  const room = useRoom();
12811
12823
  const live = useLivePolicy();
12824
+ const host = useMeetHost();
12825
+ const [rulesChecked, setRulesChecked] = (0, import_react10.useState)(false);
12826
+ (0, import_react10.useEffect)(() => {
12827
+ let alive = true;
12828
+ const done = () => alive && setRulesChecked(true);
12829
+ if (host === null) done();
12830
+ else void host.meetings.readLivePolicy().then(done, done);
12831
+ return () => {
12832
+ alive = false;
12833
+ };
12834
+ }, [host]);
12812
12835
  const [draft, setDraft] = (0, import_react10.useState)("");
12813
12836
  const [recipient, setRecipient] = (0, import_react10.useState)(to);
12814
12837
  const listRef = (0, import_react10.useRef)(null);
@@ -12833,7 +12856,7 @@ function ChatPanel({
12833
12856
  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
12857
  messages.map((message) => /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(ChatLine, { message, local, people }, message.id))
12835
12858
  ] }),
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)(
12859
+ !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
12860
  "form",
12838
12861
  {
12839
12862
  className: "mx-meet__composer mx-meet__composer--chat",