feat(people): add people clients add/remove/invite/enable/disable
What
Surfaces the client-admission API basecamp/bc3#13098 added — the client-side
counterpart of people add/people remove — as a people clients group:
basecamp people clients enable --in <project>
basecamp people clients list --in <project>
basecamp people clients add <id|email|name>... --in <project>
basecamp people clients invite <invitee>... --in <project> [--company NAME] [--title TITLE]
basecamp people clients invite - --in <project> # one invitee per line on stdin
basecamp people clients remove <id|email|name>... --in <project>
basecamp people clients disable --in <project>
add/removegrant and revoke existing client users through
PUT /projects/:id/people/client_users.json, resolving ids, emails, or names
the waypeople adddoes. The endpoint silently drops an ineligible id (a
team member's, or someone already on the project), so the ids it did not
echo back ingranted/revokedare reported as a diagnostic notice rather
than lost.invitecreates new clients by email through the same endpoint's
createlist. An invitee is a bare address or"Name <email>"(RFC 5322
mailbox form vianet/mail, so a quoted display name works);-alone reads
one invitee per line from stdin.--companyapplies to every invitee;
--titlenames one person's role and so takes exactly one invitee.enable/disabledrivePOST/DELETE /projects/:id/client_enablement.json.listis the project roster narrowed toclient: true;people list
now also carries each person'sclientflag.
A separate group rather than a --client flag on people add: bc3 keeps the
two kinds of access apart on the wire (the team endpoint drops a client's id,
the client endpoint rejects a team member's — neither cross-grades), and the
CLI mirrors that split instead of hiding it behind a mode flag. The verbs
honor the configured default project (.basecamp/config.json) as SKILL.md
promises; people add/remove still read only the flag, unchanged here.
Error mapping
The endpoint's refusals become verdicts, structured in --json/--agent
output:
| Server | CLI |
|---|---|
| 403 (clients off, or no permission — same empty body) | forbidden (4). The project is read back once: with clients_enabled: false the message says so and the hint is basecamp people clients enable --in <project>; otherwise it is a permission message. |
422 {errors:[{email_address, messages}]} | validation (9), each rejected row named in the hint (the SDK branch folds the row-keyed body into FieldErrors by address); nobody was invited. |
| 429 (new addresses exceed the account's user limit) | limit_exceeded (10), retryable: false. This 429 carries no Retry-After and waiting cannot change it, so it is not reported as throttling; a 429 that does name a Retry-After still converts as a rate limit. The SDK branch declares the operation retry_on: [503], so it surfaces on the first attempt. |
403 on disable while clients remain | forbidden, with the roster read back so the hint is the exact remove command. |
Dependency — pinned to the SDK release
Depends on basecamp/basecamp-sdk#847, which shipped in
basecamp-sdk v0.17.0.
go.mod pins github.com/basecamp/basecamp-sdk/go v0.17.0 (tag go/v0.17.0,
6e73a06f4262) via make bump-sdk REF=v0.17.0, the mechanism #677 used; the
vendored MCP model is re-synced from that tag (scripts/sync-mcp-model.sh,
PROVENANCE.json ref go/v0.17.0) and the Nix vendorHash recomputed and
build-verified (make update-nix-hash). No replace directive.
The branch is rebased onto main (#681, #688, #686). The only conflicts were
the pin-generated files — go.mod, go.sum, PROVENANCE.json,
sdk-provenance.json, nix/package.nix — resolved by taking main's side and
re-running the flip; .surface regenerated to main + the people clients
additions (no removals against main).
Tests
people_clients_test.go: request shapes for grant/revoke/invite (resolved
ids, thecreaterows,--company/--titleplacement, name omitted when
blank), stdin invitees, the unaffected-id notice, and each error mapping
(403 both ways, per-row 422, bare 429 vsRetry-After429,disablewhile
clients remain).e2e/people.bats: offline usage errors (missing project, non-address
invitee,-with an empty pipe,-mixed with other invitees,--title
with several invitees).- Catalog,
.surface, SKILL.md, API-COVERAGE, and the smoke-coverage entries
updated. Everybin/citarget run locally: fmt, vet, lint, lint-actions,
e2e (458 bats), naming, surface, skill drift, bare groups, lint lockstep,
smoke coverage, SDK provenance, and go mod tidy green; the MCP catalog
(provenance, snapshot, served count 256 → 259) and the Nix flake
(vendorHashrecomputed and build-verified) too. The Go unit run is green
exceptTestBareBasecampNeverReportsASetupError,
TestExplicitSetupStillRefuses,
TestDeleteConfirmableFollowsTheAudienceNotTheDeviceand the
TestIsInteractive*cases inappctx/cli, which fail identically on
pristinemainin this non-TTY shell (as #677 noted).
I'm babysitting the review loop on this PR through to convergence.
Release note: Features (enhancement).