{# Host status. A read-only view of one `cymatix-status` observation of THIS machine: whether the coding host on it is wired to cymatix. The collector builds `state.host_status` as a typed allowlist (collector.project_host_status) behind a bounded single flight cache (status_cache.StatusCache), so nothing here is a raw report: no path, no URL, no native config value, no error text and no arbitrary guidance string can reach this template. Two rules shape the markup. 1. Every dimension renders on its own row, from its own vocabulary table. Reachable is not healthy, configured is not activated, installed is not enabled, and a registry record is not an authenticated connection. There is no roll-up badge, because one green light would claim exactly what this panel exists to keep apart. 2. Freshness is not readiness. The freshness line and the `data-freshness` attribute describe the observation; the rows describe what that observation found. A stale or expired card keeps its values and loses its emphasis (launcher.css); it never rewrites a true into a false. A null group or a null tristate renders Unknown, never false. Nothing is safe-marked: the environment autoescapes .html (`app.py:_get_templates`) and the approved strings pass through it unchanged. The panel offers no control, no link and no repair action. #} {% set hs = state.host_status %} {% set NO_OBS = ["unknown", "Unknown", "No observation has completed yet."] %} {% macro row(label, table, group, field) %} {% set value = group[field] if group is mapping else none %} {% set cell = table.get(value) or NO_OBS %}
{{ label }}
{{ cell[1] }}
{{ cell[2] }}
{% endmacro %} {% set HOST = { "ambiguous": ["attention", "Ambiguous", "More than one host config claims cymatix-context, so none is selected."], "unknown": ["unknown", "Unknown", "No host config on this machine claims cymatix-context."], } %} {% set TRANSPORT = { "reachable": ["ok", "Reachable", "Something answered. Reachable is not healthy."], "unreachable": ["attention", "Unreachable", "Nothing answered at the probed endpoint."], } %} {% set HEALTH = { "healthy": ["ok", "Healthy", "The endpoint reported healthy. HTTP health, not an authenticated MCP session."], "unhealthy": ["attention", "Unhealthy", "The endpoint answered and reported a problem."], "unknown": ["unknown", "Unknown", "No usable health answer. Unknown is not unhealthy."], } %} {% set SOURCE = { "configured": ["neutral", "Configured", "Taken from the selected host config."], "default": ["neutral", "Default", "The built in local endpoint. No config named one."], "explicit": ["neutral", "Explicit", "Passed in by hand. This panel offers no opt in."], } %} {% set MATCH = { true: ["ok", "Matches", "The probed endpoint is the one the host config names."], false: ["attention", "Differs", "Health at a different endpoint cannot prove this host is ready."], } %} {% set CHILD = { "running": ["ok", "Running", "Supervised child liveness, not host readiness."], "stopped": ["attention", "Stopped", "Supervised child liveness, not host readiness."], "not_configured": ["unknown", "Not configured", "No supervised child is configured."], "unreachable": ["unknown", "Unreachable", "The supervisor evidence was unusable. Unusable is not stopped."], } %} {% set MCP_ENTRY = { "canonical": ["ok", "Canonical", "Registry evidence: the expected cymatix-context entry is present."], "noncanonical": ["attention", "Noncanonical", "Registry evidence: an entry exists but is not the expected one."], "invalid": ["attention", "Invalid", "Registry evidence: the host config did not parse as a valid entry."], "missing": ["attention", "Missing", "Registry evidence: no cymatix-context entry."], } %} {% set MCP_ACTIVE = { "enabled": ["ok", "Enabled", "Registry evidence. Configured is not activated."], "disabled": ["attention", "Disabled", "Registry evidence. Configured is not activated."], "unknown": ["unknown", "Unknown", "Registry evidence does not record activation for this host."], } %} {% set MCP_LIVE = { "connected": ["ok", "Connected", "Registry evidence only: a session record, not a verified connection and not an identity."], "disconnected": ["attention", "Disconnected", "Registry evidence only: the session registry was readable and holds no active handle."], "unknown": ["unknown", "Unknown", "Registry evidence only: the session registry gave no readable answer."], } %} {% set SKILL_INSTALL = { "present": ["ok", "Present", "Installed. Present is not enabled."], "missing": ["attention", "Missing", "The shared cymatix-context skill was not found."], } %} {% set SKILL_ACTIVE = { "enabled": ["ok", "Enabled", "Enabled for this host."], "disabled": ["attention", "Disabled", "Installed but switched off for this host."], "unknown": ["unknown", "Unknown", "Activation is not recorded for this host."], } %} {% set CONFIGURED_READY = { true: ["ok", "Ready", "Configuration, MCP activation and endpoint qualified health agree."], false: ["attention", "Not ready", "Configuration, MCP activation or endpoint qualified health says no."], } %} {% set GUIDED_READY = { true: ["ok", "Ready", "Configured readiness plus an installed and enabled skill."], false: ["attention", "Not ready", "Configured readiness plus skill evidence does not add up to guided use."], } %} {% set UNKNOWN_READY = ["unknown", "Unknown", "Not enough evidence to answer. Unknown is never false."] %}

Host status {{ hs.observation_scope }}

{% if hs.freshness == "fresh" %} Fresh observation. {% elif hs.freshness == "stale" %} Stale observation. Shown from the last complete collection, not from now. {% else %} No observation available yet. The rows below are unknown, not false. {% endif %} Displayed observation has aged past its freshness lifetime.

Observed at
{{ hs.observed_at or "never" }}
Last complete observation
{{ hs.last_success_at or "never" }}
Last refresh attempt
{{ hs.last_attempt_at or "never" }}
Refresh
{{ hs.refresh_state }}
{% if hs.host is mapping and hs.host.selection not in HOST %}
Host
{{ hs.host.profile or hs.host.selection }}
Selected from the host registry.
{% else %} {{ row("Host", HOST, hs.host, "selection") }} {% endif %} {{ row("Server transport", TRANSPORT, hs.server, "transport") }} {{ row("Server health", HEALTH, hs.server, "health") }} {{ row("Server URL source", SOURCE, hs.server, "source") }} {{ row("Configured URL match", MATCH, hs.server, "configured_url_match") }} {{ row("Supervised child", CHILD, hs.launcher, "state") }} {% set child = hs.launcher if hs.launcher is mapping else {} %}
Child evidence from
{{ child.get("source") or "unknown" }}
Sampled {{ child.get("observed_at") or "never" }} on its own clock. It does not age with the host observation.
{{ row("MCP entry", MCP_ENTRY, hs.mcp, "configuration") }} {{ row("MCP activation", MCP_ACTIVE, hs.mcp, "activation") }} {{ row("MCP live session", MCP_LIVE, hs.mcp, "live") }} {{ row("Skill installation", SKILL_INSTALL, hs.skill, "installation") }} {{ row("Skill activation", SKILL_ACTIVE, hs.skill, "activation") }} {% set configured = CONFIGURED_READY.get(hs.configured_ready) or UNKNOWN_READY %}
Configured readiness
{{ configured[1] }}
{{ configured[2] }}
{% set guided = GUIDED_READY.get(hs.guided_ready) or UNKNOWN_READY %}
Guided readiness
{{ guided[1] }}
{{ guided[2] }}

Next step {{ hs.next_action | truncate(500, true, "", 0) }}

Read only. This panel installs nothing, enables nothing, repairs nothing and probes no remote address. It reports one local observation and its age.