DAP Session Lifecycle Audit Events
## Proposal
Add 5 audit event types to track the complete lifecycle of a Duo session, enabling compliance teams to answer: Who triggered which flow, when, and what was the outcome?
Audit events:
<table>
<tr>
<th>Audit Event Name</th>
<th>Trigger</th>
<th>Author</th>
<th>Scope</th>
<th>Target</th>
<th>Target Type</th>
<th>Target Details</th>
<th>Message</th>
<th>IP Address</th>
<th>Created At</th>
</tr>
<tr>
<td>
**duo_session_created**
</td>
<td>User creates a new Duo session (chat or flow execution)</td>
<td>
`@current_user` (human user who created the session)
</td>
<td>
`@workflow.project || @workflow.namespace`
</td>
<td>
`@workflow` (the session object)
</td>
<td>
`Ai::DuoWorkflows::Workflow`
</td>
<td>
`"#{flow_name} session #{workflow.id}"`
</td>
<td>
`"Created Duo session"`
</td>
<td rowspan="5">Where the event is initiated.</td>
<td rowspan="5">Current timestamp.</td>
</tr>
<tr>
<td>
**duo_session_started**
</td>
<td>
Session transitions from `created` to `running` state (execution begins)
</td>
<td>
`@current_user` (human user who started the session)
</td>
<td>
`@workflow.project || @workflow.namespace`
</td>
<td>
`@workflow` (the session object)
</td>
<td>
`Ai::DuoWorkflows::Workflow`
</td>
<td>
`"#{flow_name} session #{workflow.id}"`
</td>
<td>
`"Started Duo session"`
</td>
</tr>
<tr>
<td>
**duo_session_finished**
</td>
<td>
Session transitions to `finished` state (successful completion)
</td>
<td>
`@current_user` (human user who owns the session)
</td>
<td>
`@workflow.project || @workflow.namespace`
</td>
<td>
`@workflow` (the session object)
</td>
<td>
`Ai::DuoWorkflows::Workflow`
</td>
<td>
`"#{flow_name} session #{workflow.id}"`
</td>
<td>
`"Completed Duo session"`
</td>
</tr>
<tr>
<td>
**duo_session_failed**
</td>
<td>
Session transitions to `failed` state (error/drop event)
</td>
<td>
`@current_user` (human user who owns the session)
</td>
<td>
`@workflow.project || @workflow.namespace`
</td>
<td>
`@workflow` (the session object)
</td>
<td>
`Ai::DuoWorkflows::Workflow`
</td>
<td>
`"#{flow_name} session #{workflow.id}"`
</td>
<td>
`"Duo session failed"`
</td>
</tr>
<tr>
<td>
**duo_session_stopped**
</td>
<td>Session is manually stopped/cancelled by user</td>
<td>
`@current_user` (human user who stopped the session)
</td>
<td>
`@workflow.project || @workflow.namespace`
</td>
<td>
`@workflow` (the session object)
</td>
<td>
`Ai::DuoWorkflows::Workflow`
</td>
<td>
`"#{flow_name} session #{workflow.id}"`
</td>
<td>
`"Duo session stopped"`
</td>
</tr>
</table>
---
epic