{% extends "base.html" %} {% block title %}Dashboard{% endblock %} {% block head_extra %} {# Determine governance state for meta theme-color #} {% set governable_count = tools|selectattr('governable')|list|length %} {% set total_tools = tools|length %} {% if total_tools == 0 %} {% set gov_state = 'none' %} {% elif governable_count == total_tools and config %} {% set gov_state = 'governed' %} {% elif governable_count > 0 %} {% set gov_state = 'partial' %} {% else %} {% set gov_state = 'ungoverned' %} {% endif %} {% endblock %} {% block content %} {# Recalculate governance state in content block #} {% set governable_count = tools|selectattr('governable')|list|length %} {% set total_tools = tools|length %} {% if total_tools == 0 %} {% set gov_state = 'none' %} {% elif governable_count == total_tools and config %} {% set gov_state = 'governed' %} {% elif governable_count > 0 %} {% set gov_state = 'partial' %} {% else %} {% set gov_state = 'ungoverned' %} {% endif %} {# ===== GOVERNANCE BANNER — The padlock ===== #}
{% if gov_state == 'governed' %} {% elif gov_state == 'partial' %} {% elif gov_state == 'ungoverned' %} {% else %} {% endif %}
{% if gov_state == 'governed' %}GOVERNED{% endif %} {% if gov_state == 'partial' %}PARTIALLY GOVERNED{% endif %} {% if gov_state == 'ungoverned' %}UNGOVERNED{% endif %} {% if gov_state == 'none' %}NO AI DETECTED{% endif %}
{% if gov_state == 'governed' %} All {{ total_tools }} detected AI tool{{ 's' if total_tools != 1 }} operating under charter governance. {% elif gov_state == 'partial' %} {{ governable_count }} of {{ total_tools }} AI tool{{ 's' if total_tools != 1 }} governed. {{ total_tools - governable_count }} running without charter. {% elif gov_state == 'ungoverned' %} {{ total_tools }} AI tool{{ 's' if total_tools != 1 }} detected with no charter governance. {% else %} No AI tools currently running on this machine. Daemon is scanning. {% endif %}
{# ===== CHARTER IDENTITY BAR ===== #}
Charter {% if config %} {{ config.get('domain', 'general') | upper }} domain {% else %} Not configured {% endif %}
Identity {% if identity %} {{ identity.alias }} {% if identity.real_identity %} Verified {% else %} Pseudonymous {% endif %} {% else %} Run 'charter init' {% endif %}
Hash Chain {{ chain_length }} entries {% if chain_intact %} Intact {% else %} Broken {% endif %}
Tools {{ total_tools }} detected
{# ===== TOOL DETECTION LIST ===== #} {% if tools %}
Detected AI Tools {{ total_tools }}
{% for tool in tools %}
{{ tool.name }} {{ tool.vendor }}
{% if tool.governable %} Governed {% else %} Ungoverned {% endif %}
{% endfor %}
{% else %}
Detected AI Tools 0

No AI tools currently detected.

The daemon scans for Claude Code, ChatGPT, VS Code, Cursor, and Windsurf.

{% endif %} {# ===== RECENT EVENTS ===== #} {% if recent_events %}
Recent Events {{ recent_events|length }}
{% for entry in recent_events %} {% endfor %}
Index Timestamp Event Signer
{{ entry.index }} {{ entry.timestamp }} {% if 'identity' in entry.event %} {{ entry.event }} {% elif 'governance' in entry.event or 'audit' in entry.event %} {{ entry.event }} {% elif 'detected' in entry.event or 'daemon' in entry.event %} {{ entry.event }} {% elif 'node' in entry.event or 'connection' in entry.event or 'formation' in entry.event %} {{ entry.event }} {% else %} {{ entry.event }} {% endif %} {{ entry.get('signer', '')[:16] }}...
{% endif %} {% endblock %}