Skip to content

feat(sharing): list Google under Uses on a shared agent's invite - #49337

Merged
Jinwoo-H merged 3 commits into
pencilfish-576-uifrom
feat/invite-uses-google
Nov 25, 2026
Merged

Jinwoo-H merged 3 commits into
pencilfish-576-uifrom
feat/invite-uses-google

Conversation

@Jinwoo-H

@Jinwoo-H Jinwoo-H commented Nov 25, 2026 •

Copy link
Copy Markdown
Contributor

Problem

A teammate's invite for a shared agent lists Uses: GitHub, Slack and Linear, but never Google, even when the agent uses the owner's Google.

Change

  • AGENT_CARD_SERVICES now includes google (src/shared/bots/agent-card-contract.ts).

  • Owner side: new ConnectorBotGoogle (src/main/connector-cloud/connector-bot-google.ts) records which shared agents have a Google account that works. It reads each agent with botGoogleConnectState, the same check orca bot connectors and the agent's Google page use. The hello's card then names Google for those agents. It mirrors ConnectorBotPurposes and is refreshed:

    • before the first hello,
    • when an agent is written (Google turned on, accounts chosen, a share added),
    • when a Google account is saved or removed (new onGoogleAccountWritten in the credential store).

    The hello is re-sent only when the set of agents changes.

  • Teammate side: desktop and phone invites show a Google chip in the same style as GitHub and Slack, using Google's one-colour mark.

  • Compatibility:

    • Cards from older Orcas (no google) still read as before.
    • An older teammate Orca ignores google: it filters to the ids it knows.
    • Orca Cloud needs no change: orca-cloud#1289 stores the card as plain ids (strings of at most 32 characters, at most 8 entries) and passes them through.
  • Stacking: this branch carries fix(google): stop showing Setting up on an agent's Google page once Google works #49331's commit (cherry-picked from main) for botGoogleConnectState. It drops out when this branch next catches up with main.

Screenshot (fixture bots/sharing/SharedBotRequestRows:dialog)

invite with Google

Performance

A refresh decrypts this host's few Google account files once. It runs only when at least one shared agent has Google on, and only on the events above. Token refreshes also save accounts, so it can run after an agent's Google calls; it re-sends the hello only when the set of agents changes. The hello itself still reads nothing; an agent write's hello waits for that read (no read when no shared agent has Google on).

An agent write now sends one hello, after Google's read, so that hello already carries the change. When no shared agent has Google on, there is no read and no wait. The account listener is released with the host's other listeners on stop.

Tests

src/main/connector-cloud/connector-bot-google.test.ts:

  • An agent with a working account is listed.
  • An agent whose only chosen account is signed out, an agent with Google off, and an agent that isn't shared are not listed.
  • An old card still reads.

It fails without google in the list.

Files Added Deleted Net
Test 2 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​92 0 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​92
Prod 16 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​200 $\color{#cf222e}{\Huge{\mathbf{−}}}$​47 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​153

Jinwoo-H and others added 3 commits November 25, 2026 18:22
…oogle works (#49331)

The page said Setting up whenever a setup run was open, even one left open after
Google was signed in another way, while `orca bot connectors` said Signed in.
Both now read one agent-scoped state (botGoogleConnectState); Setting up shows
only while the agent can't use Google yet. Stop setup still closes an open run.
The invite card listed GitHub, Slack and Linear but never Google. The owner's
hello now names Google for a shared agent with a Google account that works, read
with botGoogleConnectState like `orca bot connectors`, kept fresh on agent
writes and Google sign-ins or sign-outs. Desktop and phone invites show it with
Google's mark; cards from older Orcas still read.
…per agent write

The host now owns the Google cache and puts its account-write subscription with
its other stops. An agent write waits for Google's read and then sends its one
hello, instead of one hello before the read and a second after it.
@Jinwoo-H
Jinwoo-H merged commit 89e5fea into pencilfish-576-ui Nov 25, 2026
59 of 60 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant