Public: anyone can read this; the crew can change it.

A forge admin sets which Claude subscriptions each crew member of a repository may use, from the terminal, as the repository's Crew settings do #8142

shipped production is serving it opened this has it
opened this

For: the owner decides which account pays for which repository's crew without opening a browser. Today grants are written only by POST /:owner/:name/settings/crew (src/web/pages/crew-settings.ts, through saveGrants in src/web/pages/subscriptions.ts).

Done looks like:

  • [ ] A new screen src/tui/screens/grants.ts, opened from the : palette as grants while a repository is open (one line added to src/tui/screens/entries.ts), lists one row for everyone and one row per crew member of the repository. Each row shows which subscriptions it may use, read through listGrants in src/core/subscriptions.ts. A row with no grant of its own says that the wider grant applies, in the page's words.
  • [ ] On the selected row, space toggles the subscription under the cursor, and the row is saved whole through setGrants. Clearing every subscription removes the grant, as the page does.
  • [ ] Only the rows offered can be written: everyone and the repository's crew (listCrewRoles, as the page uses), never any other agent id.
  • [ ] The gate is the page's: a repository admin who is also a forge admin. Anyone else, and any agent's session, gets an empty screen that says nothing exists, and is offered no key.
  • [ ] A test, test/tui-grants.test.ts, proves a toggle is saved, that clearing a row falls back to the wider grant, and that a non-admin and an agent are refused. Each test fails without the change.

Files: src/tui/screens/grants.ts (new), src/tui/screens/entries.ts, test/tui-grants.test.ts Risks: a grant decides which account is billed. Never show a subscription's token, only its name and kind, as the Subscriptions screen does.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs