# Module: Nexus Remote Support

**Placering:** `source/nexus-remote-support/`  
**Fase:** 5  
**Type:** Cloud service + Agent tunnel

---

## Funktioner

- Session-baseret fjernsupport (admin → bruger)
- Skærmdeling (view-only og full control)
- Remote terminal (sandboxed PowerShell)
- Bruger-samtykke-flow
- Session recording og audit
- File transfer (policy-kontrolleret)
- WebRTC-baseret kommunikation

---

## Ansvar

| Ansvar | Ejer |
|--------|------|
| Session lifecycle | Remote Support |
| WebRTC signaling | Remote Support |
| Screen capture/streaming | Agent |
| Remote terminal execution | Agent (sandboxed) |
| Audit logging | Remote Support → Audit |

---

## Datamodel

```
SupportSession
├── id: UUID (PK)
├── admin_id: UUID (FK)
├── device_id: UUID (FK)
├── user_id: UUID (FK)
├── type: view|control|terminal
├── status: pending|active|ended|denied
├── started_at, ended_at: timestamp
├── recording_url: string (nullable)

SessionEvent
├── session_id: UUID (FK)
├── event_type: connect|disconnect|command|file_transfer
├── details: JSON
├── timestamp: timestamp

TerminalCommand
├── session_id: UUID (FK)
├── command: string
├── output: text
├── exit_code: integer
├── executed_at: timestamp
```

---

## Afhængigheder

| Afhænger af | Hvorfor |
|-------------|---------|
| Nexus Agent | Tunnel, screen capture, terminal |
| Identity | Admin auth, MFA step-up |
| Device Management | Enheds-info og status |
| Audit | Session logging |

---

*Se: [ui-ux/](../ui-ux/) · [security/AUDIT_LOGGING.md](../security/AUDIT_LOGGING.md)*
