{# AGENT-DETAIL center view. Rendered when an agent is clicked in column 2 — for EVERY agent (interactive lead or autonomous worker), not just the one you talk to. Shows THAT agent's actual work. Sections, top → bottom: 1. Header — back-to-dashboard, avatar, name · compound id · type, harness · model · reasoning sub, token-usage readout. 2. LIVE WORK TRANSCRIPT (the PROMINENT main content) — this agent's runs read from the durable RunState SSOT store (Milestone 1 T7/T12), filtered to this agent. The selected run's streamed OUTPUT (segment-typed: output / thinking / tool) renders in the SAME markup/CSS as the /crew transcript pane. When a run is live the pane is pushed by the T8 /runstate/stream SSE channel (no poll) so it fills in as the agent works. A compact run strip lists the agent's other recent runs (click to pin). Clean empty state when no runs. 3. ACTIVITY TIMELINE ("what it has done") — the agent's durable Cortex /history (decisions + tool-use), summarized server-side, newest at bottom. 4. Composer — LIVE chat input; SEND streams a claude-code reply (R2b). Context (all derived server-side in main._agent_detail_view): `selected` : project record (for the back-button label) `selected_key` : project key `agent` : flattened agent view (name, display_name, initials, role, model, harness, thinking, writer_scope, capabilities[], is_test, interactive) `agent_compound` : "name@project" `agent_reasoning` : reasoning label or "—" `agent_usage` : {total_h, input, output, cached} or None (→ usage · n/a) `agent_feed` : [{kind, label, detail, when}, ...] (oldest→newest) `agent_feed_count`: row count LIVE WORK TRANSCRIPT (from main._agent_runs_view_store): `agent_runs` : [{run_id, agent_display, handoff_short, status, status_label, started_ago, updated_ago, running, model, harness}, ...] newest-first (this agent's runs) `agent_run_count`, `agent_run_running`, `agent_run_no_orch` `agent_run_selected` : {run_id, agent_display, handoff_id, handoff_short, model, harness, status, status_label, error, started_ago, updated_ago, ended_ago, running, truncated, chars, segments:[{kind,text}], body} | None `agent_run_selected_id`, `agent_run_active` #} {% set is_cpo = agent.interactive %} {# ---------- 1 · HEADER ---------- #}
{# Back to the Dashboard center. Swaps #center-region back to the live dashboard for this project; the client clears the col-2 agent highlight on the data-selected-agent="" marker (see console.html syncAgent()). #}
{{ agent.initials }}
{{ agent.display_name }} {{ agent_compound }} {{ agent.role }} {% if agent.cpo_tag %}Lead{% endif %} {% if agent.is_test %}test?{% endif %}
{# INLINE-EDITABLE harness · model · reasoning (the CTO's original spec) — the three fields render as subtle inline
live · {{ agent.harness }} {{ agent_compound }}
{# inline error/status notice — shown on a harness/auth error #}
You talk to {{ agent.display_name }} here — messages run live through the {{ agent.harness }} subscription harness and stream back above.
{# INLINE HEADER CONFIG (harness · model · reasoning) — client-side dropdown repopulation. Same static harness→{models,reasoning}+catalog map the Configure card uses (app.harness.harness_js_map): when the header HARNESS 's own hx-post saves + swaps the sub-line back. Defined as window.* so the inline onchange resolves even after an HTMX swap re-runs this partial. #}