fix: clarify gog-based google chat setup

This commit is contained in:
iHildy 2026-01-26 17:53:13 -06:00
parent e4591ca120
commit abe242a3bb
3 changed files with 13 additions and 1 deletions

View File

@ -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`

View File

@ -167,6 +167,12 @@ export const googlechatPlugin: ChannelPlugin<ResolvedGoogleChatAccount> = {
],
}),
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,

View File

@ -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";
}