| 112 | new Response( |
| 113 | error instanceof Error && 'code' in error && error.code === 'FORBIDDEN' |
| 114 | ? 'Session access denied' |
| 115 | : 'Session access is temporarily unavailable', |
| 116 | { |
| 117 | status: error instanceof Error && 'code' in error && error.code === 'FORBIDDEN' ? 403 : 503, |
| 118 | } |
| 119 | ), |
| 120 | })); |
| 121 | |
| 122 | vi.mock('./persistence/CloudAgentSession.js', () => ({ |
| 123 | CloudAgentSession: class CloudAgentSession {}, |
| 124 | })); |
| 125 | |
| 126 | vi.mock('./persistence/SandboxControl.js', () => ({ |
| 127 | SandboxControl: class SandboxControl {}, |
| 128 | })); |
| 129 | |
| 130 | vi.mock('./sandbox-session/SandboxSession.js', () => ({ |
| 131 | SandboxSession: class SandboxSession {}, |