Repository navigation
feat(sharing): list Google under Uses on a shared agent's invite - #49337
Merged
Merged
Conversation
…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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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_SERVICESnow includesgoogle(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 withbotGoogleConnectState, the same checkorca bot connectorsand the agent's Google page use. The hello's card then names Google for those agents. It mirrorsConnectorBotPurposesand is refreshed:onGoogleAccountWrittenin 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:
google) still read as before.google: it filters to the ids it knows.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)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:It fails without
googlein the list.