Repository navigation
Setup's grant listings say each connection's kind - #106
Conversation
So Coach can offer a new taf the kind of connection the account already uses for a vendor: the vendor's own sign-in, a provider's app (with its entry and mode, as the grant's own view says them), a REST key (with its API's public facts, never the key) or a browser. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AwzHttNtz5jHCN5ufuPEt3
GET /v1/accounts/{tenant}/connections lists how the account's tafs reach
their vendors, for any of the account's keys or sessions, as its catalog
is: each live connection's agent, vendor, kind, what asks for the same
again and its mode. No grant id, approval, text, tool or key. Setup's
listings share the same view.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
gabosarmiento
left a comment
There was a problem hiding this comment.
Read at ef6520a. Setup's grant listings now say each connection's kind: vendor_sign_in with its server, provider with entry, mode and mode_words, or key with the API's URL, base and auth placement, never the key. The mode comes from the first permitted call's object (#105). A key grant carries no mode, and a provider's app no api; the tests pin each. Approved.
gabosarmiento
left a comment
There was a problem hiding this comment.
Re-read at a8ea074. GET …/connections is read-only metadata (agent, vendor, kind, server/entry/api, status, mode), for the account's keys or sessions as its catalog is, with no grant id, approval, tool text or key. tafs cloud filters it to the tafs the person may see before Coach reads it. The tests pin each kind's fields. Approved. On merge, I write the squash message without the session trailer.
agentgabo
left a comment
There was a problem hiding this comment.
agentgabo: changes requested at a8ea074, one point. I'm sorry this came late.
Blocking: GET …/connections lists grants that never connected.
accountConnectionskeeps every grant butfailedanddisconnected. That includespendingandapprovedrequests that never got a sign-in: a connection Setup asked for, not one the account has.- tafs cloud gives this list to Coach as "the account's existing connections", so Coach would offer it as "already connected". That's the owner's complaint from this afternoon ("why is the agent saying Stripe sign-in and AgentMail are already connected?"). The
statusfield is there, but the start block shouldn't rely on Coach reading it right. - Fix: keep only the grants that hold a sign-in:
connected,listed,needs_reconnect, andpendingwithsigned_in. That's the same set the apps call a taf's connections. Add a negative case toTestTheAccountsConnectionsSayEachKind: a pending grant with no sign-in is left out.
Not blocking:
- Who may read it:
agentKeylets any of the account's taf keys read every taf's connections: agents, vendors, API bases. tafs cloud filters by the tafs the person may see, but a taf's own key reading directly isn't filtered. That's fine for one owner. With shared tafs (groups, per-taf grants) it should narrow to the caller's own agent, or to sessions. Worth a line in the README now. setupGrantembedsconnection(whoseServerisomitempty) and declares its ownServerwith the same JSON name. The outer one wins, so the output is right. A comment saying the embedded one is shadowed on purpose would save the next reader the double take.
Fine as is: connectorMode is shared with the grant view, so the two can't disagree. The key is never in the listing (tested). A vendor's own sign-in gives no mode. 403 for another account and 401 with no key are both tested. go test -race is green in CI.
A grant asked for and never signed in to is Setup's request, not a connection the account has: listing it would let Coach offer it as already connected. The route now keeps connected, listed and needs_reconnect grants, and pending ones whose sign-in is held, the set the apps call a taf's connections. The README says who may read it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Thanks, all three points are taken in
Generated by Claude Code |
agentgabo
left a comment
There was a problem hiding this comment.
agentgabo: approving at 23823d8. My point is fixed. holdsSignIn keeps connected, listed, needs_reconnect and pending with a held sign-in, the same set the apps call a taf's connections. The new negative case covers both pending with no sign-in and approved-but-not-signed-in, and neither is listed. The README now states the shared-tafs caveat, and the shadowed Server has its comment. CI was still running when I approved; merge only on green.
gabosarmiento
left a comment
There was a problem hiding this comment.
Re-approved at 23823d8: only connections that hold a sign-in are listed, with the test for both pending and approved-but-not-signed-in. Good.
Change
Coach connected a vendor the account already uses through a different kind of connection: a provider's app, live only, where the account's other tafs use the vendor's own sign-in, in test. It couldn't tell: Setup's grant listings (
asked-grants,agents/{agent}/grants) gave each connection's server and status, not how it reaches its vendor.They now say it, read-only, from the grant:
kind:vendor_sign_in(the vendor's own MCP server),provider(a provider's app),key(a REST key) orbrowser.provider: itsentry, to ask for the same app again, andmodewithmode_words, the same as the grant's own view.key:apiwith the description's URL, base and where the key goes, to ask for the same again. Never the key.connectorModeis shared with the grant's view, so both say the same mode.GET /v1/accounts/{tenant}/connections(second commit): the same facts for any of the account's keys or sessions, as its catalog is, so tafs cloud can give them to Coach when a conversation starts (it reads them with the person's session and keeps the tafs that person may see). Each live connection'sagent,vendor,kind,server/entry/api,statusand a provider'smode/mode_words. No grant id, approval, text, tool or key. The catalog already tells the same callers which apps are connected, with their grant id; this adds the taf's agent and the kind. Read-only, no new credential, nothing written.Validation
TestSetupsListingSaysEachConnectionsKind: a vendor sign-in (kind, server, no entry, api or mode); a REST key (kind and api, and the listing never carries the key); a provider's app (kind, entry, unknown mode with its words, thentestafter a permitted call returned a test object).TestTheAccountsConnectionsSayEachKind: a person's session and a taf's key both read every live connection, whoever asked for it, each with its kind and what asks for the same again, never an id, text, approval, tool or the key; another account's key gets 403, no key 401; a disconnected connection is left out.gofmt -l .clean,go vet ./...,go vet -tags live ./live,go test -race ./...green.Compatibility and rollout
Additive fields on two read routes, and one new read route. Setup reads them once kiff/agents' planque tool and the next
connect-an-appversion say so; those go into the next Eval and Upgrade. Deploy this first.Generated by Claude Code