{% comment %} Shared Agents detail content. Included by detail.html (standalone shell) and detail_hub.html (Hub global_base). `url_base` is the app mount prefix so the back link and the lifecycle form action are correct in both modes. {% endcomment %}
Only runner-published state is shown. Unknown means SAC has no authoritative signal; session logs are not guessed into activity.
Status: {{ agent.state_detail }}
{% endif %} {% if agent.detail_error %}Status endpoint unavailable: {{ agent.detail_error }}
{% endif %} {% if can_operate %}{% if cross_host %} Cross-host control — this action is recorded in the operator audit trail. {% else %} You are an authorized lifecycle operator for this node's agents. {% endif %}
{% comment %} Message / steer and the three SAC UI-control keys. Both POST to the agent's OWN bridge endpoint (its published turn_url) — the GUI never constructs a host/port and never drives tmux. Each submit carries a dispatch id so a double-click cannot inject the text twice. {% endcomment %}Positional input to the agent's live terminal — Enter submits, Escape dismisses, C-c interrupts. Nothing else is available.
{% else %}Read-only. Control requires an identity listed in the lifecycle-operator allowlist{% if cross_host %} — or, for cross-host agents, the cross-host operator allowlist{% endif %}.
{% endif %}PID {{ r.pid }} is reported by the listener but runs in a separate pid namespace (apptainer isolation) — live CPU/memory cannot be read from the web process, so no value is shown rather than a guessed one.
{% else %}No process to read (agent not started or stopped).
{% endif %} {% endwith %}Log unavailable: {{ agent.session_error }}
{% elif agent.session_lines %}Tail (last {{ agent.session_lines|length }} lines), secrets redacted.
{% else %}No session log recorded yet.
{% endif %}