| 281 | } |
| 282 | |
| 283 | export function toAppApprovalRequest(wire: WireApprovalRequest): AppApprovalRequest { |
| 284 | return { |
| 285 | approvalId: wire.approval_id, |
| 286 | sessionId: wire.session_id, |
| 287 | turnId: wire.turn_id, |
| 288 | toolCallId: wire.tool_call_id, |
| 289 | toolName: wire.tool_name, |
| 290 | action: wire.action, |
| 291 | // The real daemon sends `tool_input_display`; the stub sends `display`. |
| 292 | display: wire.tool_input_display ?? wire.display, |
| 293 | expiresAt: wire.expires_at, |
| 294 | createdAt: wire.created_at, |
| 295 | }; |
| 296 | } |
| 297 | |
| 298 | // --------------------------------------------------------------------------- |
| 299 | // Question mappers |