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

An admin sets the crew's autonomy from the terminal: mode off, assisted or autonomous, the dollar ceiling and the slots, as Settings › Autonomy does #8132

shipped production is serving it opened this has it
opened this

For: the owner turns the crew up when they want it and down when they do not, without leaving the terminal. Today mode, ceiling and slots are set only by POST /:owner/:name/settings/autonomy (autonomySettingsUpdate in src/web/pages/settings.ts); the terminal only cycles decisionsBy.

Done looks like:

  • [ ] A new screen src/tui/screens/autonomy.ts, opened from the : palette as autonomy while a repository is open, shows the repository's mode, ceiling in dollars and slots in the settings page's words.
  • [ ] An admin of the repository who is a person changes the mode with m (cycles off → assisted → autonomous, after a one-line confirm naming the new mode), the ceiling with c (a number of dollars, 0 or more) and the slots with s (a whole number 1 to 8). Each saves through updateRepoSettings in src/actions/repos.ts with the same fields the page writes, including autonomyBy (the person, or null when off).
  • [ ] Input outside those bounds is refused with the page's sentence ("Mode is off, assisted or autonomous; the ceiling is a number of dollars; slots are 1 to 8.") and nothing is saved. Lift that sentence and the bounds into one shared function the page also calls, so the two cannot drift apart.
  • [ ] A reader, a writer who is not an admin, and an agent's session see the values but are offered no key, and pressing one changes nothing.
  • [ ] test/tui-autonomy.test.ts proves each change is saved, an out-of-range ceiling and slots are refused, and the non-admin and agent gates hold. Each test fails without the change.

Files: src/tui/screens/autonomy.ts (new), the palette entry list it registers in, src/web/pages/settings.ts (only to call the shared bounds check), test/tui-autonomy.test.ts Risks: turning on autonomous starts spend. The confirm must say the ceiling that will apply. Keep src/tui/screens/about.ts untouched, because #8066 is editing it.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs