diff --git a/docs/channels/googlechat.md b/docs/channels/googlechat.md index 41618a521..c6419bef8 100644 --- a/docs/channels/googlechat.md +++ b/docs/channels/googlechat.md @@ -57,6 +57,7 @@ If you already use `gog` for Google Workspace, you can reuse its OAuth client + ```bash gog auth credentials /path/to/client_secret.json gog auth add you@example.com --services gmail,calendar,drive,contacts,docs,sheets + gog auth list ``` 2) Configure Google Chat to reuse `gog`: ```json5 @@ -74,6 +75,11 @@ If you already use `gog` for Google Workspace, you can reuse its OAuth client + 3) Ensure `gog` can access its keyring on the gateway host. - `gog` stores refresh tokens in the system keychain by default. citeturn6view0 - For headless systems, switch to file keyring + password (see `gog` docs). citeturn6view0 +4) Verify `gog` is visible to the gateway user: + ```bash + gog auth tokens --json + ``` + If this fails, install `gog` on the gateway host and ensure the keyring is accessible. Clawdbot reads `gog` OAuth client files from: - `~/.config/gogcli/credentials.json` diff --git a/extensions/googlechat/src/channel.ts b/extensions/googlechat/src/channel.ts index 436960620..3a45b6901 100644 --- a/extensions/googlechat/src/channel.ts +++ b/extensions/googlechat/src/channel.ts @@ -167,6 +167,12 @@ export const googlechatPlugin: ChannelPlugin = { ], }), isConfigured: (account) => account.credentialSource !== "none", + unconfiguredReason: (account) => { + if (account.config.oauthFromGog) { + return "Google Chat OAuth from gog is enabled but no gog credentials were found. Ensure gog is installed, the gateway can access its keyring, or set oauthRefreshToken/oauthClientFile."; + } + return "Google Chat credentials are missing. Configure a service account or user OAuth."; + }, describeAccount: (account) => ({ accountId: account.accountId, name: account.name, diff --git a/extensions/googlechat/src/monitor.ts b/extensions/googlechat/src/monitor.ts index 29c30c660..7e738b928 100644 --- a/extensions/googlechat/src/monitor.ts +++ b/extensions/googlechat/src/monitor.ts @@ -648,7 +648,7 @@ async function processMessageWithPipeline(params: { let typingIndicator = account.config.typingIndicator ?? "message"; if (typingIndicator === "reaction" && account.userCredentialSource === "none") { runtime.error?.( - `[${account.accountId}] typingIndicator="reaction" requires user OAuth (not supported with service account). Falling back to "message" mode.`, + `[${account.accountId}] typingIndicator="reaction" requires user OAuth. Configure OAuth (or oauthFromGog) to enable reactions; falling back to "message" mode.`, ); typingIndicator = "message"; }