Expand description
The Google connectors’ tools: Calendar, Drive and Gmail, each
listed only for an agent with a grant on its service
(docs/specs/SPEC_GOOGLE_CONNECTORS_GMAIL_CALENDAR_DRIVE_2026_10_14.md D3,
D4). srv makes the call with the account’s token; this only forwards the
arguments and marks what comes back as other people’s text (D6).
Constants§
- ACTIONS 🔒
- The actions, as the errors list them.
- MAX_
STATUS_ 🔒WAIT_ SECS - The most a
connect_statuscall waits for the sign-in to change (srv’s own cap). - SERVICES_
WAIT 🔒 - How long
tools/listwaits for srv to say which services are granted.
Statics§
- GRANTS_
CHANGED 🔒 - Woken when this agent changes a grant (
Google grant,ungrant), so the services it holds are read again at once and the client is told, not after the next minute’s look.
Functions§
- adopt_
granted 🔒 - Keeps
currentas srv last said (fetched;None, srv said nothing, changes nothing) and says whether the services differ now, which is when the client must be told. - call 🔒
- call_
listed_ 🔒elsewhere Google call: a service’s tool through this one, for a client that has not listed the tool it was just granted (it ignoresnotifications/tools/list_changed). The arguments are the tool’s own.- connect 🔒
Google connect: srv starts the same flow as the Accounts panel’s Connect, without opening the system browser, and answers the consent URL; this opens that page in a Browser pane the agent owns, on the person’s own profile (their sign-ins are there), and says what is next.- fetch_
granted 🔒 - The same, but
Nonewhen srv didn’t answer, so a refresh keeps what it had instead of taking the tools away for a failed look. - forward 🔒
- A service tool’s call, made to srv, which checks the grant. The tool being listed is not part of it.
- google_
call 🔒 Google: which Google accounts are connected and who holds what (status), turning a service of an account on or off for an agent (grant,ungrant), and ending a connection (disconnect). The person only signs in and consents; this is everything else (spec D7).- granted_
services 🔒 - The services this agent has a grant on, for
tools/list. None when srv can’t say (not reachable, an older srv): the agent then sees no Google tool. - on_
another_ 🔒machine status,grantandungrantwith ahost: the other machine’s srv runs them as operations (google.status,google.grant), where the Google accounts are. The agent to grant is named, as there is no “yourself” across machines.connectstays on the machine that holds the account: the sign-in is a person’s, there.- services_
of 🔒 - untrusted 🔒
- srv’s answer for the agent: who it is about, then the result as untrusted text.