{% comment %} Shared Agents fleet content. Included by fleet.html, which extends the SDK adapter (scitex_sdk/app/app_shell.html) and fills scitex_app_content. `url_base` is the app's mount prefix ("" at root, "/apps/agent-container" when mounted) so the per-row links are correct at any mount. {% endcomment %} {% load static %}
{% include "scitex_agent_container/_app_header.html" %} {# Single action row (operator 2026-10-23): Launch/Create/A2A/Activity buttons + fleet stats share one row - no stacked bands. #}
{# Operator 2026-10-23: the pagehead h1 duplicated the SDK AppHeader row #} {# (data-stx-app-header above, "Agent Container" + version) - dropped. #}
{{ summary.total }}visible
{{ summary.alive }}alive
{{ summary.attention }}need attention
{% if summary.cross_host %}
{{ summary.cross_host }}cross-host
{% endif %}
{% comment %} P0: this banner used to print the raw listener URL, the env-var names and a bearer-token instruction into the BROWSER. A browser must never receive an internal endpoint, a config key name, or deployment prose - that is operator information, and on a shared host it is an information leak. The user-facing copy is now state + Retry only; the diagnostic detail stays server-side. {% endcomment %} {% if fleet_state == "loading" %}
Loading the agent fleet

Reading the fleet…

{% endif %} {% if fleet_state == "unavailable" %} {% endif %} {% if fleet_state == "cached" %}
Showing the last known inventory{% if observed_age is not None %} from {{ observed_age|floatformat:0 }}s ago{% endif %}. This may be out of date; it refreshes automatically.
{% endif %} {# Operator 2026-10-22: scope-note row (acting-as + scope pill) dropped - #} {# redundant with the workspace identity; action buttons moved up into #} {# the pagehead single action row. #} {% if agents %}
Ctrl+K
{# Operator 2026-10-23: three-column DM layout (Cards DM idiom, leaf-side). #} {# Left: agent + state LED (narrow). Center: DM chat with selected agent. #} {# Right: shared Details column. #}
{% for a in agents %} {# Operator 2026-10-26: LED leftmost, name second, status text lives #} {# in the tooltip only (Alive etc. as hover tip, not a label). #} {# Operator 2026-10-23: no Actions column — inspect/start/stop etc live in the right-click row menu. The gated forms below stay in the DOM (visually hidden) so the menu submits the same POSTs with the same gates. #} {% endfor %}
Agent
{{ a.name }} {% if a.cross_host %}remote{% endif %}
DM
Select an agent to open the DM thread.
{# Operator 2026-10-22: ALWAYS-VISIBLE fleet DM composer (same POST #} {# shape as the detail message-form: message + dispatch_id + emoji + #} {# send). Disabled with hint text until a row is selected; fleet-details.js #} {# retargets its action + textarea on selection (incl. auto-select). #}
{% if csrf_token %}{% endif %}

Select an agent to send a message.

Details
{% else %} {% if fleet_state == "empty" %}
No agents visible to {{ identity|default:"(unidentified)" }} in this scope.
{% endif %} {% endif %} {# B1: cold shell renders as `loading`. The warm poll lives in #} {# fleet-details.js `warmColdShell()` (no inline scripts in HTML). #} {% if fleet_state == "loading" %} {% endif %}