(input, context)
| 219 | return { result: true } |
| 220 | }, |
| 221 | async checkPermissions(input, context) { |
| 222 | // For ALL teammates, bypass the permission UI to avoid sending permission_request |
| 223 | // The call() method handles the appropriate behavior: |
| 224 | // - If isPlanModeRequired(): sends plan_approval_request to leader |
| 225 | // - Otherwise: exits plan mode locally (voluntary plan mode) |
| 226 | if (isTeammate()) { |
| 227 | return { |
| 228 | behavior: 'allow' as const, |
| 229 | updatedInput: input, |
| 230 | } |
| 231 | } |
| 232 | |
| 233 | // For non-teammates, require user confirmation to exit plan mode |
| 234 | return { |
| 235 | behavior: 'ask' as const, |
| 236 | message: 'Exit plan mode?', |
| 237 | updatedInput: input, |
| 238 | } |
| 239 | }, |
| 240 | renderToolUseMessage, |
| 241 | renderToolResultMessage, |
| 242 | renderToolUseRejectedMessage, |
nothing calls this directly
no test coverage detected