Files
Maximo Guk 659c244cc3 Let admins do limited non destructive/mutating actions in a workspace (#1075)
Lets a deployment admin do write actions in a workspace - limited to stopping an agent, restarting the workspace and sets up infra for more write actions once we have grants concept.

Note: Destructive and mutating write actions such as retryAgent, addCollaborator, revertChat, revertGadget, deleteGadget, deleteWorkspace, removeConnection, deleting a chat and rejecting a queue of pending actions will be added in the future and will be gated behind "grants", requiring another administrator's approval before performing. banWorkspace() will also be added in the future, but it will not require a grant, as it's not a permanently destructive action and can easily be reverted. Adding/removing grant requirements is trivial and we can adjust as needed for actions.

The ability for admins to perform writes is set to off unless ADMIN_WORKSPACE_WRITES is on. A write runs when an admin calls it (the CLI's and an agent's included): the workspace records it in the audit log before anything changes. That record is the write's only trace: nothing in the workspace says an admin acted, and a stopped turn reads as any stop.

One admin session can now stop an agent or restart a workspace with no second factor; the bounds are the switch and the record before the effect.

The Audit tab's writes: one record for each, the stopAgent one opened with its workspace, reason, arguments and how it came.
2026-11-20 15:10:31 -06:00
..
2026-10-07 11:22:14 -05:00
2026-10-01 14:49:13 -05:00