Repository navigation
Description
This is on the org/main feature line (#2903), not in dev. The setting below is in draft PR #2927.
Today, a command a shared hosted chat wants to run, which needs approval under its owner's approval mode, waits for the owner, whatever role anyone else holds. A guest who tries to approve it reads "This chat is shared with you. Only its owner can do that." While testing this I found that one of the two doors an approval has was open: a guest who held answer (the edit role does) could answer the approval's question through the general answer door and the chat ran the command as its owner. #2927 closes that, so both doors now behave as the documentation always said.
It is open because it is a product call. The owner may be away and the chat stalls on a prompt; the guest who sent the message may be someone the owner trusts with edit. Or approval is the owner's judgement and should never move.
The setting: chats.approvals_by in the organization's policy, owner or answer. The default is owner, and an absent value means the same. The operator sets it with PUT /v1/org/policy (read the policy first, change chats, send it back with its rev):
"chats": {"approvals_by": "answer"}
With answer, a person who holds the answer permission can allow one tool call once, or refuse it. Allowing a tool for the rest of the chat, putting the approval away, and the chat's own settings stay with the owner. The setting reaches an open window within a heartbeat, and the asker on the spend row becomes the person who approved. Any other word is refused with a 422 that names the two. There is no screen for it in the desktop app yet.
Left for the team to decide: which default the organization runs, whether "allow for the rest of the chat" should ever be a guest's, and a related thing I noticed but did not change: through the same answer door a guest with answer can already answer the chat's other questions, from reading Agent.applyToLane in internal/session/question.go that includes starting a proposed task and accepting a finished one. Whether those should follow the same rule is the same kind of call.
Activity