{# what the agent's runtime finds for it, asked of its computer when shown: its skills by where they were found, and the MCP servers it sees; an agent running several kinds shows one kind at a time #} {% set inspection = inspected.inspection if inspected else none %} {% if kinds | length > 1 %} {% endif %}
{% if inspection is none or not inspection.available %}

{{ t.text("agents.tab.skills") }}

{% if not kinds %}{{ t.text("agents.skills.no_runtime") }}{% elif not row.online %}{{ t.text("agents.skills.away", {"computer": row.computer.name if row.computer else "—"}) }}{% elif inspection is none %}{{ t.text("agents.workspace.unanswered", {"computer": row.computer.name}) }}{% else %}{{ inspection.error or t.text("agents.runtime.unavailable") }}{% endif %}

{% else %} {% for source in ("workspace", "personal", "system") %} {% set found = inspection.skills | selectattr("source", "equalto", source) | list %}

{{ t.text("agents.skills." ~ source) }}

{{ t.text("agents.skills.count", {"n": found | length}) }} {% if loop.first %}{{ m.logo(kind) }}{% if inspection.version %}{{ inspection.version }} · {% endif %}{{ t.text("agents.skills.read", {"ago": inspected.at_ms | ago}) }}{% endif %}
{% if found %}
{% for skill in found %}
{{ skill.name }}{{ skill.description }}
{% endfor %}
{% else %}

{{ t.text("agents.skills.none") }}

{% endif %}
{% endfor %} {% endif %}

{{ t.text("agents.mcp.title") }}

{% if inspection and inspection.available %}{{ t.text("agents.skills.count", {"n": inspection.mcp_servers | length}) }}{% endif %}
{% if inspection and inspection.mcp_servers %}
{% for server in inspection.mcp_servers %}
{# one state a server, the gravest the runtime says: a sign-in missing, a failure and its reason, the connection, then the sign-in #} {% set link = server.connection %} {% set failed = link is not none and link is not string %} {% set tone, state = ("warn", "signed_out") if server.auth == "signed_out" else ("err", "failed") if failed else ("muted", link) if link in ("connecting", "disabled") else ("ok", link) if link == "connected" else ("ok", server.auth) if server.auth else (none, none) %}
{{ server.name }}{% if tone %}{{ t.text("agents.mcp.state." ~ state) }}{% endif %}
{% if failed %}

{{ link.reason }}

{% endif %} {% if server.tools %}
{% for tool in server.tools[:8] %}{{ tool.name }}{% endfor %}{% if server.tools | length > 8 %}{{ t.text("agents.mcp.more", {"n": server.tools | length - 8}) }}{% endif %}
{% endif %}
{% endfor %}
{% else %}

{{ t.text("agents.mcp.none") }}

{% endif %}