{% load static %}{% comment %}
Agents' leaf header — THE one app header, owned by the leaf, SHAPED by the
shared contract (Writer pattern): the row is `.stx-app-header`
(scitex_sdk/ui/css/app/app-header.css — linked below). Identity (page
title + the LEAF package version, never the host's) on the left, the
canonical project-selector slot, then the actions slot. This leaf renders
no second definition of that row: the leaf owns the VALUES, the SDK owns
the chrome, so the header cannot drift from sibling apps.
The page lede (subtitle + acting identity) is NOT header chrome: it
renders below as `.agents-lede`, where the fleet age ticker keeps its
`data-role="fleet-age"` hook for fleet.js.
Contract vars (all autoescaped; pass context values, not markup):
* header_icon — e.g. "fas fa-robot" (plain class string).
* header_title — page title, e.g. "Agents" or the agent name.
* header_back_href — optional back URL (renders the Fleet link).
* header_meta — optional plain lede text (e.g. the agent host).
* header_meta_role — optional data-role for the lede span (fleet age).
* header_identity — optional acting identity (rendered as "acting as X").
* app_version — set once in views._app_context (Writer pattern:
manifest pip_package -> installed version, "unknown"
when undistributable, never raises).
Project slot is EMPTY on purpose: this app is fleet-scoped. Project
scope (canonical picker) is a later slice, not a second header.
Set `app_header_rendered=True` in the template context when a host renders
its own header and includes this one: pages then skip it and keep exactly
one header.
{% endcomment %}
{% if header_meta %}{{ header_meta }}{% endif %}{% if header_meta and header_identity %} · {% endif %}{% if header_identity %}acting as {{ header_identity }}{% endif %}
{% endif %}