Tell an agent's owner to disconnect this connection, not rotate its secret
basecamp auth logout and auth revoke on an agent profile say "rotate the client secret in Basecamp" to end the agent's access. This changes both to "disconnect this connection in Basecamp".
Why this connection
Rotating is wrong today. My > Agent has no rotate control (basecamp/bc3#13597 removed it), and a rotation leaves outstanding self-tokens valid until they expire. Disconnecting revokes the secret and every token at once.
This PR first said "disconnect the agent". That stops being right once a personal agent can hold several connections, one per computer or profile, each with its own secret (plan; basecamp/bc3#13817, basecamp/bc3#13822, basecamp/bc3#13819). After bc3 step 6 turns that on:
- "Disconnect the agent" is My > Agent's Disconnect all, which ends every computer.
- Rotating the client secret rewrites only the first connection's secret. Someone on another connection who follows that advice keeps their access and cuts off the first computer instead.
So both messages now point at the one connection this profile holds.
True before and after step 6
I chose wording that is right in both worlds, rather than gating it on step 6 the way #900 is, so this can land now and fix today's wrong advice:
- Today an agent has one connection. Disconnecting it is "Disconnect this agent" on My > Agent, or Disconnect in Adminland for a shared agent.
- After step 2, My > Agent lists connections, each with Disconnect…, and Disconnect all sits below the list. Before step 6 there is one row, so both end this connection.
- After step 6, the row's Disconnect… ends this connection and leaves the others working.
The one-line messages say "in Basecamp" rather than "on My > Agent", and don't name Disconnect all. A shared agent is disconnected in Adminland, and the CLI can't tell a shared agent from a personal one. Disconnect all doesn't exist until step 2 ships. The README has room for both, and words the Disconnect all warning so it only applies once there are several connections.
Change
auth logout:Logged out (forgot the agent credential; disconnect this connection in Basecamp to end its access).profile deleteon an agent profile says the same. It says what to do rather than that the connection is still live, which is false when it was already disconnected or replaced.auth revokehint:Forget the credential locally instead (basecamp auth logout), and disconnect this connection in Basecamp to end its access.- README, Agents section: disconnect its connection in Basecamp, on My > Agent for your own agent or in Adminland for a shared one. Where My > Agent lists several connections, disconnect the one this profile used, because Disconnect all ends every one of them.
- The
RevokeSkippedAgentcomment says why neither rotating nor disconnecting the whole agent is the remedy. auth agent --helpno longer says every agent is "an identity your Basecamp administrator created". A personal agent is created by its owner when they connect it.
The JSON envelope is unchanged: reason: "agent", revoked: false.
Pairing with #900 and step 6
This lands before or with #900 (step 4, CLI copy) and joins bc3 step 6's pairing, so it is never later than step 6. It's copy only.
Trial merges (git merge-tree) on current main: this merges cleanly with #900 and with #901. It shares README.md and internal/commands/auth_agent.go with #900, in different hunks. It shares no files with #901.
Two lines are left to #900 on purpose. They're its lines, they stay true until step 6, and #900 already rewrites both:
- the "disconnecting the agent there kills the client secret this holds" paragraph in
auth agent connect --help; - the lost-handover hint, "Disconnect the agent in Basecamp and connect again".
Tests
TestAuthLogoutHumanCopy/agentpins the whole summary. It also checks that "rotate" doesn't appear, that no revocation is sent, and that the credential is forgotten.TestAgentRevokeIsRefusedAndKeepsTheCredentialpins the hint.- I put the production strings back to main's wording, and then to this PR's earlier "disconnect the agent" wording. Both tests fail each time.
TestAgentLogoutSaysRotatingTheSecretIsTheRemedyis renamedTestAgentLogoutForgetsWithoutRevoking. It never asserted the wording.- Locally on macOS: unit tests in the changed packages, lint on linux, e2e, skill drift, surface and the other
make checktargets pass. The only failures are tests that need a terminal, which fail the same way on main here, and a lint finding inproctime_darwin.gothat main already has.