( code: string, message: string, details?: Record<string, unknown>, )
| 7 | export const NO_ACTIVE_SESSION_MESSAGE = 'No active session. Run open first.'; |
| 8 | |
| 9 | export function errorResponse( |
| 10 | code: string, |
| 11 | message: string, |
| 12 | details?: Record<string, unknown>, |
| 13 | ): DaemonFailureResponse { |
| 14 | return { |
| 15 | ok: false, |
| 16 | error: { code, message, ...(details ? { details } : {}) }, |
| 17 | }; |
| 18 | } |
| 19 | |
| 20 | /** |
| 21 | * Shared "No active session. Run open first." failure used by handlers that require |
no outgoing calls
no test coverage detected