Skip to content

Commit e717d24

Browse files
authored
refactor(meetings): close manual action state (#114247)
1 parent af9d583 commit e717d24

42 files changed

Lines changed: 333 additions & 395 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎docs/plugins/google-meet.md‎

Lines changed: 24 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ openclaw googlemeet create --access-type OPEN --transport chrome-node --mode age
117117

118118
This only applies to API-created rooms, so OAuth must be configured. If you authenticated before this option existed, rerun `openclaw googlemeet auth login --json` after adding the `meetings.space.settings` scope to your OAuth consent screen.
119119

120-
If the browser fallback hits a Google login or Meet permission blocker, the tool returns `manualActionRequired: true` with `manualActionReason`, `manualActionMessage`, and the `browser.nodeId`/`browser.targetId`/`browserUrl`. Report that message and stop opening new Meet tabs until the operator finishes the browser step.
120+
If the browser fallback hits a Google login or Meet permission blocker, the tool returns `manualAction: { reason, message }` with the `browser.nodeId`/`browser.targetId`/`browserUrl`. Report that message and stop opening new Meet tabs until the operator finishes the browser step.
121121

122122
### Observe-only join
123123

@@ -147,7 +147,7 @@ It joins in transcribe mode, waits for fresh caption/transcript movement, and re
147147

148148
### Realtime session health
149149

150-
During talk-back sessions, `google_meet` status reports Chrome/audio bridge health: `inCall`, `manualActionRequired`, `providerConnected`, `realtimeReady`, `audioInputActive`, `audioOutputActive`, last input/output timestamps, byte counters, and bridge-closed state. Managed Chrome sessions only speak the intro/test phrase after health reports `inCall: true`; otherwise `speechReady: false` and the speech attempt is blocked rather than silently no-opping.
150+
During talk-back sessions, `google_meet` status reports Chrome/audio bridge health: `inCall`, `manualAction`, `providerConnected`, `realtimeReady`, `audioInputActive`, `audioOutputActive`, last input/output timestamps, byte counters, and bridge-closed state. Managed Chrome sessions only speak the intro/test phrase after health reports `inCall: true`; otherwise `speechReady: false` and the speech attempt is blocked rather than silently no-opping.
151151

152152
Local Chrome joins through the signed-in OpenClaw browser profile and needs `BlackHole 2ch` for the mic/speaker path. A single BlackHole device is enough for a first smoke test but can echo; use separate virtual devices or a Loopback-style graph for clean duplex audio.
153153

@@ -242,7 +242,7 @@ For a one-command smoke test that creates or reuses a session, speaks a known ph
242242
openclaw googlemeet test-speech https://meet.google.com/abc-defg-hij
243243
```
244244

245-
During realtime join, browser automation fills the guest name, clicks Join/Ask to join, and accepts Meet's first-run "Use microphone" prompt when it appears (or "Continue without microphone" during observe-only join and browser-only meeting creation). If the profile is signed out, Meet is waiting for host admission, Chrome needs mic/camera permission, or Meet is stuck on an unresolved prompt, the result reports `manualActionRequired: true` with `manualActionReason` and `manualActionMessage`. Stop retrying, report that message plus `browserUrl`/`browserTitle`, and retry only after the manual action completes.
245+
During realtime join, browser automation fills the guest name, clicks Join/Ask to join, and accepts Meet's first-run "Use microphone" prompt when it appears (or "Continue without microphone" during observe-only join and browser-only meeting creation). If the profile is signed out, Meet is waiting for host admission, Chrome needs mic/camera permission, or Meet is stuck on an unresolved prompt, the result includes `manualAction: { reason, message }`. Stop retrying, report that message plus `browserUrl`/`browserTitle`, and retry only after the manual action completes.
246246

247247
If `chromeNode.node` is omitted, OpenClaw auto-selects only when exactly one connected node advertises both `googlemeet.chrome` and browser control; pin `chromeNode.node` (node id, display name, or remote IP) when several capable nodes are connected.
248248

@@ -621,9 +621,10 @@ If the browser fallback hits Google login or a Meet permission blocker first, `g
621621
{
622622
"source": "browser",
623623
"error": "google-login-required: Sign in to Google in the OpenClaw browser profile, then retry meeting creation.",
624-
"manualActionRequired": true,
625-
"manualActionReason": "google-login-required",
626-
"manualActionMessage": "Sign in to Google in the OpenClaw browser profile, then retry meeting creation.",
624+
"manualAction": {
625+
"reason": "google-login-required",
626+
"message": "Sign in to Google in the OpenClaw browser profile, then retry meeting creation."
627+
},
627628
"browser": {
628629
"nodeId": "ba0f4e4bc...",
629630
"targetId": "tab-1",
@@ -654,7 +655,7 @@ API create JSON:
654655
}
655656
```
656657

657-
Creating joins by default, but Chrome/Chrome-node still needs a signed-in Google profile to join through the browser; if signed out, OpenClaw reports `manualActionRequired: true` or a browser fallback error and asks the operator to finish Google login before retrying.
658+
Creating joins by default, but Chrome/Chrome-node still needs a signed-in Google profile to join through the browser; if signed out, OpenClaw returns `manualAction` or a browser fallback error and asks the operator to finish Google login before retrying.
658659

659660
Set `preview.enrollmentAcknowledged: true` only after confirming your Cloud project, OAuth principal, and meeting participants are enrolled in the Google Workspace Developer Preview Program for Meet media APIs.
660661

@@ -908,20 +909,20 @@ Speaking on demand:
908909

909910
`status` includes Chrome health when available:
910911

911-
| Field | Meaning |
912-
| --------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- |
913-
| `inCall` | Chrome appears to be inside the Meet call |
914-
| `micMuted` | Best-effort Meet microphone state |
915-
| `manualActionRequired` / `manualActionReason` / `manualActionMessage` | Browser profile needs manual login, Meet host admission, permissions, or browser-control repair before speech can work |
916-
| `speechReady` / `speechBlockedReason` / `speechBlockedMessage` | Whether managed Chrome speech is allowed now; `speechReady: false` means OpenClaw did not send the intro/test phrase |
917-
| `providerConnected` / `realtimeReady` | Realtime voice bridge state |
918-
| `lastInputAt` / `lastOutputAt` | Last audio seen from/sent to the bridge |
919-
| `audioOutputRouted` / `audioOutputDeviceLabel` | Whether the Meet tab's media output was actively routed to the bridge's BlackHole device |
920-
| `lastOutputLoopbackAt` / `outputLoopbackSignalBytes` | Fresh output whose waveform fingerprint was correlated on the BlackHole microphone capture path |
921-
| `lastOutputLoopbackCorrelation` | Correlation score tying the captured signal to the current assistant-output generation |
922-
| `outputGeneration` / `verifiedOutputGeneration` | Monotonic ids; equality means the current output, rather than an older utterance, passed loopback proof |
923-
| `lastOutputLoopbackRms` / `lastOutputLoopbackPeak` | Audio-energy diagnostics for the latest verified loopback capture chunk |
924-
| `lastSuppressedInputAt` / `suppressedInputBytes` | Loopback input ignored while assistant playback is active |
912+
| Field | Meaning |
913+
| -------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- |
914+
| `inCall` | Chrome appears to be inside the Meet call |
915+
| `micMuted` | Best-effort Meet microphone state |
916+
| `manualAction.reason` / `manualAction.message` | Browser profile needs manual login, Meet host admission, permissions, or browser-control repair before speech can work |
917+
| `speechReady` / `speechBlockedReason` / `speechBlockedMessage` | Whether managed Chrome speech is allowed now; `speechReady: false` means OpenClaw did not send the intro/test phrase |
918+
| `providerConnected` / `realtimeReady` | Realtime voice bridge state |
919+
| `lastInputAt` / `lastOutputAt` | Last audio seen from/sent to the bridge |
920+
| `audioOutputRouted` / `audioOutputDeviceLabel` | Whether the Meet tab's media output was actively routed to the bridge's BlackHole device |
921+
| `lastOutputLoopbackAt` / `outputLoopbackSignalBytes` | Fresh output whose waveform fingerprint was correlated on the BlackHole microphone capture path |
922+
| `lastOutputLoopbackCorrelation` | Correlation score tying the captured signal to the current assistant-output generation |
923+
| `outputGeneration` / `verifiedOutputGeneration` | Monotonic ids; equality means the current output, rather than an older utterance, passed loopback proof |
924+
| `lastOutputLoopbackRms` / `lastOutputLoopbackPeak` | Audio-energy diagnostics for the latest verified loopback capture chunk |
925+
| `lastSuppressedInputAt` / `suppressedInputBytes` | Loopback input ignored while assistant playback is active |
925926

926927
## Agent and bidi modes
927928

@@ -1073,7 +1074,7 @@ openclaw nodes status --connected
10731074

10741075
### Browser opens but agent cannot join
10751076

1076-
Run `googlemeet test-listen` for observe-only joins or `googlemeet test-speech` for realtime joins, then inspect the returned Chrome health. If either reports `manualActionRequired: true`, show `manualActionMessage` to the operator and stop retrying until the browser action is complete.
1077+
Run `googlemeet test-listen` for observe-only joins or `googlemeet test-speech` for realtime joins, then inspect the returned Chrome health. If either includes `manualAction`, show `manualAction.message` to the operator and stop retrying until the browser action is complete.
10771078

10781079
Common manual actions: sign in to the Chrome profile; admit the guest from the Meet host account; grant Chrome microphone/camera permissions when the native prompt appears; close or repair a stuck Meet permission dialog.
10791080

@@ -1086,7 +1087,7 @@ Do not report "not signed in" just because Meet asks "Do you want people to hear
10861087
- **API creation**: `oauth.clientId` and `oauth.refreshToken` (or matching `OPENCLAW_GOOGLE_MEET_*` env vars) are present, and the refresh token was minted after create support was added; older tokens may lack `meetings.space.created`, so rerun `openclaw googlemeet auth login --json`.
10871088
- **Browser fallback**: `defaultTransport: "chrome-node"` and `chromeNode.node` point at a connected node with `browser.proxy` and `googlemeet.chrome`; the OpenClaw Chrome profile on that node is signed in and can open `https://meet.google.com/new`.
10881089
- **Browser fallback retries**: reuse an existing `.../new` or Google account prompt tab before opening a new one; retry the tool call rather than manually opening another tab.
1089-
- **Manual action**: if the tool returns `manualActionRequired: true`, use `browser.nodeId`, `browser.targetId`, `browserUrl`, and `manualActionMessage` to guide the operator; do not retry in a loop.
1090+
- **Manual action**: if the tool returns `manualAction`, use `browser.nodeId`, `browser.targetId`, `browserUrl`, and `manualAction.message` to guide the operator; do not retry in a loop.
10901091
- **Audio-choice interstitial**: if Meet shows "Do you want people to hear you in the meeting?", leave the tab open. OpenClaw should click **Use microphone** or (create-only) **Continue without microphone** and keep waiting for the generated URL; if it cannot, the error should mention `meet-audio-choice-required`, not `google-login-required`.
10911092

10921093
### Agent joins but does not talk

‎docs/plugins/meeting-plugins.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ Browser automation handles the normal guest-name, prejoin camera and microphone,
105105
- Microsoft Teams may require tenant sign-in, email verification, or organizer admission.
106106
- Zoom may require authentication, email verification, a passcode, CAPTCHA completion, or host admission; an account can also disable browser join.
107107

108-
When a join or status result reports `manualActionRequired`, complete the reported step in the same OpenClaw Chrome profile before retrying. Repeatedly opening new tabs does not resolve an account, tenant, lobby, or CAPTCHA gate.
108+
When a join or status result includes `manualAction`, complete its reported step in the same OpenClaw Chrome profile before retrying. Repeatedly opening new tabs does not resolve an account, tenant, lobby, or CAPTCHA gate.
109109

110110
Only join meetings where the operator is authorized to add an agent. Tell participants when local policy or consent rules require disclosure of automated participation, transcription, or synthesized speech.
111111

‎extensions/google-meet/index.create.test.ts‎

Lines changed: 25 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ async function runCreateMeetBrowserScript(params: { buttonText: string }) {
9696
vi.stubGlobal("location", location);
9797
type BrowserScriptResult = {
9898
meetingUri?: string;
99-
manualActionReason?: string;
99+
manualAction?: { reason: string; message: string };
100100
notes?: string[];
101101
retryAfterMs?: number;
102102
};
@@ -138,8 +138,10 @@ async function runCreateMeetBrowserScript(params: { buttonText: string }) {
138138
ok: true,
139139
targetId: "create-script-tab",
140140
result: {
141-
manualActionReason: "meet-permission-required",
142-
manualAction: "Stop after exercising the browser script.",
141+
manualAction: {
142+
reason: "meet-permission-required",
143+
message: "Stop after exercising the browser script.",
144+
},
143145
browserUrl: location.href,
144146
browserTitle: document.title,
145147
},
@@ -420,9 +422,11 @@ describe("google-meet create flow", () => {
420422
ok: true,
421423
targetId: "login-tab",
422424
result: {
423-
manualActionReason: "google-login-required",
424-
manualAction:
425-
"Sign in to Google in the OpenClaw browser profile, then retry meeting creation.",
425+
manualAction: {
426+
reason: "google-login-required",
427+
message:
428+
"Sign in to Google in the OpenClaw browser profile, then retry meeting creation.",
429+
},
426430
browserUrl: "https://accounts.google.com/signin",
427431
browserTitle: "Sign in - Google Accounts",
428432
notes: ["Sign-in page detected."],
@@ -450,11 +454,10 @@ describe("google-meet create flow", () => {
450454
expect(payload.error).toBe(
451455
"google-login-required: Sign in to Google in the OpenClaw browser profile, then retry meeting creation.",
452456
);
453-
expect(payload.manualActionRequired).toBe(true);
454-
expect(payload.manualActionReason).toBe("google-login-required");
455-
expect(payload.manualActionMessage).toBe(
456-
"Sign in to Google in the OpenClaw browser profile, then retry meeting creation.",
457-
);
457+
expect(payload.manualAction).toEqual({
458+
reason: "google-login-required",
459+
message: "Sign in to Google in the OpenClaw browser profile, then retry meeting creation.",
460+
});
458461
const browser = requireRecord(payload.browser, "browser payload");
459462
expect(browser.nodeId).toBe("node-1");
460463
expect(browser.targetId).toBe("login-tab");
@@ -594,9 +597,11 @@ describe("google-meet create flow", () => {
594597
ok: true,
595598
targetId: "permission-tab",
596599
result: {
597-
manualActionReason: "meet-permission-required",
598-
manualAction:
599-
"Allow microphone/camera permissions for Meet in the OpenClaw browser profile, then retry meeting creation.",
600+
manualAction: {
601+
reason: "meet-permission-required",
602+
message:
603+
"Allow microphone/camera permissions for Meet in the OpenClaw browser profile, then retry meeting creation.",
604+
},
600605
browserUrl: "https://meet.google.com/new",
601606
browserTitle: "Meet",
602607
},
@@ -615,11 +620,11 @@ describe("google-meet create flow", () => {
615620
const result = await tool.execute("id", { action: "create" });
616621

617622
expect(result.details.source).toBe("browser");
618-
expect(result.details.manualActionRequired).toBe(true);
619-
expect(result.details.manualActionReason).toBe("meet-permission-required");
620-
expect(result.details.manualActionMessage).toBe(
621-
"Allow microphone/camera permissions for Meet in the OpenClaw browser profile, then retry meeting creation.",
622-
);
623+
expect(result.details.manualAction).toEqual({
624+
reason: "meet-permission-required",
625+
message:
626+
"Allow microphone/camera permissions for Meet in the OpenClaw browser profile, then retry meeting creation.",
627+
});
623628
const browser = requireRecord(result.details.browser, "browser details");
624629
expect(browser.nodeId).toBe("node-1");
625630
expect(browser.targetId).toBe("permission-tab");
@@ -835,7 +840,7 @@ describe("google-meet create flow", () => {
835840
expect(result.notes).toEqual([note]);
836841
expect(button.click).toHaveBeenCalledTimes(1);
837842
expect(result.meetingUri).toBeUndefined();
838-
expect(result.manualActionReason).toBeUndefined();
843+
expect(result.manualAction).toBeUndefined();
839844
},
840845
);
841846
});

0 commit comments

Comments
 (0)