@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.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;
@@ -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() {
@@ -12484,6 +12496,17 @@ function ChatPanel({
12484
12496
  const snapshot = useMeetSnapshot();
12485
12497
  const room = useRoom();
12486
12498
  const live = useLivePolicy();
12499
+ const host = useMeetHost();
12500
+ const [rulesChecked, setRulesChecked] = useState5(false);
12501
+ useEffect6(() => {
12502
+ let alive = true;
12503
+ const done = () => alive && setRulesChecked(true);
12504
+ if (host === null) done();
12505
+ else void host.meetings.readLivePolicy().then(done, done);
12506
+ return () => {
12507
+ alive = false;
12508
+ };
12509
+ }, [host]);
12487
12510
  const [draft, setDraft] = useState5("");
12488
12511
  const [recipient, setRecipient] = useState5(to);
12489
12512
  const listRef = useRef6(null);
@@ -12508,7 +12531,7 @@ function ChatPanel({
12508
12531
  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
12532
  messages.map((message) => /* @__PURE__ */ jsx6(ChatLine, { message, local, people }, message.id))
12510
12533
  ] }),
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(
12534
+ !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
12535
  "form",
12513
12536
  {
12514
12537
  className: "mx-meet__composer mx-meet__composer--chat",