{# SETTINGS · Cortex (R4c, INFORMATIONAL read-out). Mostly display: 1. Cortex connection — the base URL from the console settings store (defaulting to the schema default), with a pointer to the System tab to change it, plus the URL the live client actually uses + the default project key. 2. Live /health — status pill, surface_version, event_backend, rls_enforced. 3. The Cortex 6-LAYER architecture — L1 Verbatim … L6 Boot, names + KEEP/NEW/OPTIMIZE status. This is the Cortex API service for the current Kaidera OS deployment. Read-only — the connection is edited in System. Context: selected_key : current project key (kept on the System link) cortex_base_url : base URL from the settings store cortex_client_base_url: the URL the live CortexClient is actually using cortex_default_project: default project key from the store cortex_health : raw /health dict (status, surface_version, event_backend, rls_enforced, ...) cortex_layers : [{id,name,status,what}] L6→L1 #} {% set h = cortex_health or {} %} {% set status = (h.status or "unreachable") | lower %}
Cortex
The Cortex service this console reads. Connection + live health below, plus the 6-layer Cortex architecture. The connection URL is edited in the System tab; this tab is read-only.
{# ---------------- connection card ---------------- #}
Connection
Base URL {{ cortex_base_url or "—" }}
Active client URL {{ cortex_client_base_url or "—" }}
Default project {{ cortex_default_project or "—" }}
{% if cortex_base_url and cortex_client_base_url and cortex_base_url != cortex_client_base_url %}
The stored base URL differs from the URL the running client uses (set via the CORTEX_BASE_URL env var at launch). The stored value applies on next restart.
{% endif %}
{# ---------------- live health card ---------------- #}
Live health {{ h.status or "unreachable" }}
{% if status in ('unreachable',) and h.error %}
Couldn't reach Cortex: {{ h.error }}. Check the base URL in System and that the local Cortex stack is running.
{% endif %}
Surface version {{ h.surface_version or "—" }}
Event backend {{ h.event_backend or "—" }}
RLS enforced {% if h.rls_enforced is defined and h.rls_enforced is not none %} {{ 'yes' if h.rls_enforced else 'no' }} {% else %}{% endif %}
{% if managed_runtime %} {# ---------------- managed container runtime (commercial/dev) ---------------- #}
Container runtime {{ managed_runtime.engine_label }} {% if managed_runtime.stack_state == 'stopped' %}Cortex stopped{% else %}{{ managed_runtime.running_count }}/{{ managed_runtime.expected_count }} running{% endif %}
{% if managed_runtime.error %}
{{ managed_runtime.error }}
{% endif %}
    {% for container in managed_runtime.containers %}
  1. {{ container.service }} {{ container.state }} {% if 'start' in container.actions %} {% endif %} {% if 'restart' in container.actions %} {% endif %}
  2. {% endfor %}
{% if managed_runtime.recoverable %}
{% if managed_runtime.desired_state == 'running' and not managed_runtime.all_running %} {% endif %} {% if managed_runtime.desired_state == 'stopped' and managed_runtime.can_start %} {% endif %} {% if managed_runtime.can_stop %} {% endif %}
{% endif %}
{% endif %} {# ---------------- 6-layer architecture ---------------- #}
6-layer Cortex local-cortex memory architecture
    {% for L in cortex_layers %}
  1. {{ L.id }} {{ L.name }} {{ L.what }} {{ L.status }}
  2. {% endfor %}
KEEP retained as-is NEW added this design OPTIMIZE reworked

Full local-Cortex design lives at local-cortex/ARCHITECTURE.md. This read-out reflects the dev-team local Cortex; the commercial platform runs a separately deployed Cortex service.