( messageText: string, )
| 665 | * Checks if a message text contains a sandbox permission response |
| 666 | */ |
| 667 | export function isSandboxPermissionResponse( |
| 668 | messageText: string, |
| 669 | ): SandboxPermissionResponseMessage | null { |
| 670 | try { |
| 671 | const parsed = jsonParse(messageText) |
| 672 | if (parsed && parsed.type === 'sandbox_permission_response') { |
| 673 | return parsed as SandboxPermissionResponseMessage |
| 674 | } |
| 675 | } catch { |
| 676 | // Not JSON or not a valid sandbox permission response |
| 677 | } |
| 678 | return null |
| 679 | } |
| 680 | |
| 681 | /** |
| 682 | * Message sent when a teammate requests plan approval from the team leader |
no test coverage detected