@openclaw/google-meet 2026.7.2-beta.3 → 2026.7.2-beta.5

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.
@@ -49,7 +49,7 @@ async function exportGoogleDriveDocumentText(params) {
49
49
  }
50
50
  }
51
51
  //#endregion
52
- //#region extensions/google-meet/src/meet.ts
52
+ //#region extensions/google-meet/src/meet-api.ts
53
53
  const GOOGLE_MEET_API_BASE_URL = `https://meet.googleapis.com/v2`;
54
54
  const GOOGLE_MEET_URL_HOST = "meet.google.com";
55
55
  const GOOGLE_MEET_API_HOST = "meet.googleapis.com";
@@ -341,6 +341,36 @@ async function listGoogleMeetSmartNotes(params) {
341
341
  errorPrefix: "Google Meet conferenceRecords.smartNotes.list"
342
342
  });
343
343
  }
344
+ async function resolveConferenceRecordQuery(params) {
345
+ if (params.conferenceRecord?.trim()) {
346
+ const conferenceRecord = await fetchGoogleMeetConferenceRecord({
347
+ accessToken: params.accessToken,
348
+ conferenceRecord: params.conferenceRecord
349
+ });
350
+ return {
351
+ input: params.conferenceRecord.trim(),
352
+ conferenceRecords: [conferenceRecord]
353
+ };
354
+ }
355
+ if (!params.meeting?.trim()) throw new Error("Meeting input or conference record is required");
356
+ const space = await fetchGoogleMeetSpace({
357
+ accessToken: params.accessToken,
358
+ meeting: params.meeting
359
+ });
360
+ const conferenceRecords = await listGoogleMeetConferenceRecords({
361
+ accessToken: params.accessToken,
362
+ meeting: space.name,
363
+ pageSize: params.allConferenceRecords ? params.pageSize : 1,
364
+ maxItems: params.allConferenceRecords ? void 0 : 1
365
+ });
366
+ return {
367
+ input: params.meeting,
368
+ space,
369
+ conferenceRecords
370
+ };
371
+ }
372
+ //#endregion
373
+ //#region extensions/google-meet/src/meet.ts
344
374
  function getParticipantDisplayName(participant) {
345
375
  return participant.signedinUser?.displayName ?? participant.anonymousUser?.displayName ?? participant.phoneUser?.displayName;
346
376
  }
@@ -456,34 +486,6 @@ function mergeAttendanceRows(rows, conferenceRecord, params) {
456
486
  }
457
487
  return [...grouped.values()].map((row) => decorateAttendanceRow(row, conferenceRecord, params));
458
488
  }
459
- async function resolveConferenceRecordQuery(params) {
460
- if (params.conferenceRecord?.trim()) {
461
- const conferenceRecord = await fetchGoogleMeetConferenceRecord({
462
- accessToken: params.accessToken,
463
- conferenceRecord: params.conferenceRecord
464
- });
465
- return {
466
- input: params.conferenceRecord.trim(),
467
- conferenceRecords: [conferenceRecord]
468
- };
469
- }
470
- if (!params.meeting?.trim()) throw new Error("Meeting input or conference record is required");
471
- const space = await fetchGoogleMeetSpace({
472
- accessToken: params.accessToken,
473
- meeting: params.meeting
474
- });
475
- const conferenceRecords = await listGoogleMeetConferenceRecords({
476
- accessToken: params.accessToken,
477
- meeting: space.name,
478
- pageSize: params.allConferenceRecords ? params.pageSize : 1,
479
- maxItems: params.allConferenceRecords ? void 0 : 1
480
- });
481
- return {
482
- input: params.meeting,
483
- space,
484
- conferenceRecords
485
- };
486
- }
487
489
  async function fetchGoogleMeetArtifacts(params) {
488
490
  const resolved = await resolveConferenceRecordQuery(params);
489
491
  const artifacts = await Promise.all(resolved.conferenceRecords.map(async (conferenceRecord) => {
@@ -685,8 +687,7 @@ const GOOGLE_MEET_BROWSER_NAVIGATION_RETRY_MS = 1e3;
685
687
  const GOOGLE_MEET_BROWSER_POLL_MS = 500;
686
688
  var GoogleMeetBrowserManualActionError = class extends Error {
687
689
  constructor(payload) {
688
- const prefix = payload.manualActionReason ? `${payload.manualActionReason}: ` : "";
689
- super(`${prefix}${payload.manualActionMessage}`);
690
+ super(`${payload.manualAction.reason}: ${payload.manualAction.message}`);
690
691
  this.name = "GoogleMeetBrowserManualActionError";
691
692
  this.payload = {
692
693
  source: "browser",
@@ -736,6 +737,14 @@ async function focusBrowserTab(params) {
736
737
  function readStringArray(value) {
737
738
  return Array.isArray(value) ? value.filter((entry) => typeof entry === "string") : void 0;
738
739
  }
740
+ function readBrowserManualAction(value) {
741
+ if (!value || typeof value !== "object") return;
742
+ const action = value;
743
+ return typeof action.reason === "string" && typeof action.message === "string" ? {
744
+ reason: action.reason,
745
+ message: action.message
746
+ } : void 0;
747
+ }
739
748
  function readBrowserCreateResult(result) {
740
749
  const record = result && typeof result === "object" ? result : {};
741
750
  const nested = record.result && typeof record.result === "object" ? record.result : record;
@@ -743,8 +752,7 @@ function readBrowserCreateResult(result) {
743
752
  meetingUri: typeof nested.meetingUri === "string" ? nested.meetingUri : void 0,
744
753
  browserUrl: typeof nested.browserUrl === "string" ? nested.browserUrl : void 0,
745
754
  browserTitle: typeof nested.browserTitle === "string" ? nested.browserTitle : void 0,
746
- manualAction: typeof nested.manualAction === "string" ? nested.manualAction : void 0,
747
- manualActionReason: typeof nested.manualActionReason === "string" ? nested.manualActionReason : void 0,
755
+ manualAction: readBrowserManualAction(nested.manualAction),
748
756
  notes: readStringArray(nested.notes),
749
757
  retryAfterMs: typeof nested.retryAfterMs === "number" && Number.isFinite(nested.retryAfterMs) ? nested.retryAfterMs : void 0
750
758
  };
@@ -753,6 +761,7 @@ const CREATE_MEET_FROM_BROWSER_SCRIPT = `async () => {
753
761
  const meetUrlPattern = /^https:\\/\\/meet\\.google\\.com\\/[a-z]{3}-[a-z]{4}-[a-z]{3}(?:$|[/?#])/i;
754
762
  const text = (node) => (node?.innerText || node?.textContent || "").trim();
755
763
  const current = () => location.href;
764
+ const manualActionFor = (reason, message) => ({ reason, message });
756
765
  const notes = [];
757
766
  const findButton = (pattern) =>
758
767
  [...document.querySelectorAll("button")].find((button) => {
@@ -776,8 +785,7 @@ const CREATE_MEET_FROM_BROWSER_SCRIPT = `async () => {
776
785
  };
777
786
  if (!current().startsWith("https://meet.google.com/")) {
778
787
  return {
779
- manualActionReason: "google-login-required",
780
- manualAction: "Sign in to Google in the OpenClaw browser profile, then retry meeting creation.",
788
+ manualAction: manualActionFor("google-login-required", "Sign in to Google in the OpenClaw browser profile, then retry meeting creation."),
781
789
  browserUrl: current(),
782
790
  browserTitle: document.title,
783
791
  notes,
@@ -803,8 +811,7 @@ const CREATE_MEET_FROM_BROWSER_SCRIPT = `async () => {
803
811
  }
804
812
  if (/do you want people to hear you in the meeting/i.test(pageText)) {
805
813
  return {
806
- manualActionReason: "meet-audio-choice-required",
807
- manualAction: "Meet is showing the microphone choice. Click Use microphone in the OpenClaw browser profile, then retry meeting creation.",
814
+ manualAction: manualActionFor("meet-audio-choice-required", "Meet is showing the microphone choice. Click Use microphone in the OpenClaw browser profile, then retry meeting creation."),
808
815
  browserUrl: href,
809
816
  browserTitle: document.title,
810
817
  notes,
@@ -812,8 +819,7 @@ const CREATE_MEET_FROM_BROWSER_SCRIPT = `async () => {
812
819
  }
813
820
  if (/allow.*(microphone|camera)|blocked.*(microphone|camera)|permission.*(microphone|camera)/i.test(pageText)) {
814
821
  return {
815
- manualActionReason: "meet-permission-required",
816
- manualAction: "Allow microphone/camera permissions for Meet in the OpenClaw browser profile, then retry meeting creation.",
822
+ manualAction: manualActionFor("meet-permission-required", "Allow microphone/camera permissions for Meet in the OpenClaw browser profile, then retry meeting creation."),
817
823
  browserUrl: href,
818
824
  browserTitle: document.title,
819
825
  notes,
@@ -821,7 +827,7 @@ const CREATE_MEET_FROM_BROWSER_SCRIPT = `async () => {
821
827
  }
822
828
  if (/couldn't create|unable to create/i.test(pageText)) {
823
829
  return {
824
- manualAction: "Resolve the Google Meet page prompt in the OpenClaw browser profile, then retry meeting creation.",
830
+ manualAction: manualActionFor("browser-control-unavailable", "Resolve the Google Meet page prompt in the OpenClaw browser profile, then retry meeting creation."),
825
831
  browserUrl: href,
826
832
  browserTitle: document.title,
827
833
  notes,
@@ -829,8 +835,7 @@ const CREATE_MEET_FROM_BROWSER_SCRIPT = `async () => {
829
835
  }
830
836
  if (location.hostname.toLowerCase() === "accounts.google.com" || /use your google account|to continue to google meet|choose an account|sign in to (join|continue)/i.test(pageText)) {
831
837
  return {
832
- manualActionReason: "google-login-required",
833
- manualAction: "Sign in to Google in the OpenClaw browser profile, then retry meeting creation.",
838
+ manualAction: manualActionFor("google-login-required", "Sign in to Google in the OpenClaw browser profile, then retry meeting creation."),
834
839
  browserUrl: href,
835
840
  browserTitle: document.title,
836
841
  notes,
@@ -919,9 +924,7 @@ async function createMeetWithBrowserProxyOnNode(params) {
919
924
  notes: [...notes]
920
925
  };
921
926
  if (result.manualAction) throw new GoogleMeetBrowserManualActionError({
922
- manualActionRequired: true,
923
- manualActionReason: result.manualActionReason,
924
- manualActionMessage: result.manualAction,
927
+ manualAction: result.manualAction,
925
928
  browser: {
926
929
  nodeId,
927
930
  targetId,
@@ -936,7 +939,7 @@ async function createMeetWithBrowserProxyOnNode(params) {
936
939
  if (!isBrowserNavigationInterruption(error)) throw error;
937
940
  await sleep(GOOGLE_MEET_BROWSER_NAVIGATION_RETRY_MS);
938
941
  }
939
- throw new Error(lastResult?.manualAction ?? `Google Meet did not return a meeting URL from the browser create flow before timeout.${lastError ? ` Last browser automation error: ${formatBrowserAutomationError(lastError)}` : ""}`);
942
+ throw new Error(lastResult?.manualAction?.message ?? `Google Meet did not return a meeting URL from the browser create flow before timeout.${lastError ? ` Last browser automation error: ${formatBrowserAutomationError(lastError)}` : ""}`);
940
943
  }
941
944
  //#endregion
942
- export { fetchGoogleMeetAttendance as _, isRecoverableMeetTab as a, readMeetAuthUser as c, resolveChromeNodeInfo as d, GOOGLE_MEET_NODE_COMMAND as f, fetchGoogleMeetArtifacts as g, endGoogleMeetActiveConference as h, isEnglishMeetTab as i, callBrowserProxyOnNode as l, createGoogleMeetSpace as m, isGoogleMeetBrowserManualActionError as n, isSameMeetUrlForReuse as o, buildGoogleMeetPreflightReport as p, forceMeetEnglishUi as r, normalizeMeetUrlForReuse as s, createMeetWithBrowserProxyOnNode as t, resolveChromeNode as u, fetchGoogleMeetSpace as v, fetchLatestGoogleMeetConferenceRecord as y };
945
+ export { endGoogleMeetActiveConference as _, isRecoverableMeetTab as a, readMeetAuthUser as c, resolveChromeNodeInfo as d, GOOGLE_MEET_NODE_COMMAND as f, createGoogleMeetSpace as g, fetchGoogleMeetAttendance as h, isEnglishMeetTab as i, callBrowserProxyOnNode as l, fetchGoogleMeetArtifacts as m, isGoogleMeetBrowserManualActionError as n, isSameMeetUrlForReuse as o, buildGoogleMeetPreflightReport as p, forceMeetEnglishUi as r, normalizeMeetUrlForReuse as s, createMeetWithBrowserProxyOnNode as t, resolveChromeNode as u, fetchGoogleMeetSpace as v, fetchLatestGoogleMeetConferenceRecord as y };