{% from "_icons.html" import icon %} {% set failed = e.decision in ['deny', 'denied', 'locked', 'error', 'revoked', 'refused'] or (e.exit_code is not none and e.exit_code != 0) %} {% set passed = e.decision in ['allow', 'approved', 'ok'] and not failed %}
{{ icon('deny' if failed else 'check' if passed else 'activity') }} {{ e.patterns[0] if e.patterns else e.tool }}{{ e.agent_name or 'System' }} · {{ e.tool }}{% if e.patterns|length > 1 %} · +{{ e.patterns|length - 1 }} scopes{% endif %}{% if e.detail.hazards %}{{ icon('warning') }} {{ e.detail.hazards|length }} hazard{{ '' if e.detail.hazards|length == 1 else 's' }} flagged{% endif %} {{ e.decision }}{% if e.exit_code is not none and e.exit_code != 0 %}exit {{ e.exit_code }}{% endif %}
Event
#{{ e.id }}
Time
{{ e.ts.strftime('%Y-%m-%d %H:%M:%S UTC') }}
Agent
{{ e.agent_name or 'System' }}
Tool
{{ e.tool }}
{% if e.session_id %}
Session
{{ e.session_id }}
{% endif %}{% if e.exit_code is not none %}
Result
exit {{ e.exit_code }}{% if e.duration_ms is not none %} · {{ e.duration_ms }} ms{% endif %}
{% endif %}
{% for p in e.patterns %}
{{ p }}
{% endfor %} {% if e.detail.command %}
$ {{ e.detail.command }}
{% endif %} {% if e.detail.hazards %}
{% for h in e.detail.hazards %}
{{ h.severity }} {{ h.reason }}
{% endfor %}
{% endif %} {% if e.detail.reason %}

{{ e.detail.reason }}

{% endif %} {% if e.detail.error %}

{{ e.detail.error }}

{% endif %} {% set delivery = e.detail.get('result_delivery') %} {% if delivery and delivery.mode != 'off' %}

MCP result: upstream {{ 'reported an error' if delivery.upstream_is_error else 'completed without a tool error' }} · delivery {{ delivery.delivery }} · inspection {{ delivery.mode }} · coverage {{ delivery.coverage }}.

{% if delivery.delivery == 'withheld' %}

The tool already ran. Withholding its result does not undo its effects; do not automatically retry.

{% endif %} {% if delivery.findings %}

Findings: {{ delivery.findings | join(', ') }}. {{ delivery.matches }} credential matches. Instruction findings are advisory.

{% endif %} {% if delivery.gaps %}

Coverage gaps: {{ delivery.gaps | join(', ') }}.

{% endif %} {% endif %}