Nware Cortex kit components + compositions for the Nware Cortex console

Nware Cortex's trust primitives (ApprovalCard, CostMeter, KillSwitch, PlanDiff…) are compositions of the Soma parts below: the domain semantics live in the consumer, the look and behaviour live here. Engines stay out of core: graph canvas, chart engines, and datagrid virtualisation are adapter/app-level, same boundary as @nware/soma-charts.

Persistent affordances cost meter (soma-meter-inline) · kill switch · approvals badge

$42.10/d $2,450 of $3,000

Switches & chips

Toolbar

Applications

Banners

Scan failed — the 02:00 scheduled scan of prod-web did not complete.
Kill switch engaged — all agent actions are paused at project scope.

Toasts

Loading skeleton · spinner · meter states

Approval card composition: widget + badges + soma-diff + actions

Scale api-backend from 3 to 6 replicas — requested by devops-agent session s-4821, estimated +$118/mo.

effect: scale confidence: 0.94 calibrated env: production Audit entry
@@ service "api-backend" @@
11 cpu = 256
12 memory = 512
13- replicas = 3
13+ replicas = 6

Event log

10:32:15INFODeployment completed successfully (v2.3.1)
10:32:10INFOHealth check passed
10:31:45INFOContainer started
10:15:00WARNCPU usage alert triggered
09:58:41ERRORImage pull failed: registry timeout (retrying)
09:58:12INFODeployment started by user@example.com

Timeline post-mortem reconstruction

  1. Deploy started 09:58

    api-backend v2.3.1 by user@example.com.

  2. Image pull failed 09:58

    Registry timeout; automatic retry scheduled.

  3. CPU alert 10:15

    Above 80% for 5 minutes during rollout.

  4. Deploy completed 10:32

    Health checks green; alert auto-resolved.

Tree project resources; toggles collapse

  • prod-web
    • services
    • postgres-db

Click api-backend to open the node drawer →

Empty state

No findings yet

Run your first scan to populate this view — results land here with priority ranking.

Agent run patterns

Agent consoles have converged on a small shared vocabulary: a runs table, a streaming session log, collapsible step traces, plan diffs, and a human approval gate (the furniture of GitHub's Agent HQ "mission control" and of LangSmith-style trace views alike). Soma ships every substrate; the three compositions below are the recurring assemblies, built purely from parts documented elsewhere on this site. As with the trust primitives above, the domain semantics stay in the consumer.

Inline tool-call indicator composition: soma-log line + spinner → check swap

A tool call is one log line with two states: while running, a small spinner sits in the level slot and the text is muted ("Searching…"); on completion the spinner swaps for a check tinted with the success token and the text firms up to the result. The muted-while-pending tint uses --soma-color-text-muted (informational, AA) — never -subtle:

14:02:11 Searched the web for "CVE-2026-1337 fix" · 12 results
14:02:14 Reading services/api-backend/deploy.yaml…

Appends a running line, completes it after a moment. role="log" makes appended lines announce themselves.

<!-- done: check in the level slot, normal text -->
<div class="soma-log-line">
  <span class="soma-log-time">14:02:11</span>
  <span class="soma-log-level"><span class="soma-icon soma-icon-check"
      style="color: var(--soma-color-success)"></span></span>
  <span class="soma-log-text">Searched the web for "CVE-2026-1337 fix" · 12 results</span>
</div>
<!-- running: spinner in the level slot, muted text -->
<div class="soma-log-line">
  <span class="soma-log-time">14:02:14</span>
  <span class="soma-log-level"><span class="soma-spinner soma-spinner-small"
      role="status" aria-label="Tool call running"></span></span>
  <span class="soma-log-text" style="color: var(--soma-color-text-muted)">Reading services/api-backend/deploy.yaml…</span>
</div>

Your streaming code performs the swap: replace the spinner span with the check icon and drop the muted tint — two DOM writes per completed call.

Collapsible step block composition: soma-expander + log / diff excerpts

The intermediate-reasoning pattern: each agent step is an expander, closed by default so the run reads as a summary and opened where the operator wants the full trace. The trigger line carries the step verdict (a badge); the content carries the evidence, a log or diff excerpt. Auto-init: no wiring.

@@ service "api-backend" @@
13- replicas = 3
13+ replicas = 6
<div class="soma-accordion">
  <button class="soma-expander-trigger" aria-controls="step-plan" aria-expanded="false">
    Step 2 — Plan the change
    <span class="soma-badge">3 tool calls</span>
  </button>
  <div id="step-plan" class="soma-expander-content" aria-hidden="true">
    <div class="soma-log" role="log" tabindex="0" aria-label="Step 2 tool calls">…</div>
  </div>
  <!-- …one trigger + content pair per step; a diff excerpt works the same way -->
</div>

Approval gate flow composition: ApprovalCard + Soma.confirm() + kill-switch banner

The ApprovalCard above carries the evidence; the gate adds the decision mechanics. Effectful decisions get a second confirmation via Soma.confirm() (a promise: Esc/backdrop resolve false, so "no decision" can never read as approval), and the kill switch escalates out-of-band to a page-level soma-banner-critical via Soma.banner() (the same affordance as the navbar Stop button, announced as an alert):

Scale api-backend from 3 to 6 replicas — requested by devops-agent session s-4821, estimated +$118/mo.

effect: scale env: production

Gate state: pending

// The live gate above, exactly as this page wires it:
const gateOut = document.getElementById('gate-out');

document.getElementById('gate-approve').addEventListener('click', async () => {
  const ok = await Soma.confirm({
    title: 'Apply this plan?',
    body: 'Scales api-backend to 6 replicas in production (+$118/mo).',
    confirmLabel: 'Approve and run',
  });
  gateOut.textContent = ok ? 'approved — executing' : 'pending';
  if (ok) Soma.toast({ title: 'Plan approved',
    body: 'devops-agent is executing (step 4 of 6)', appearance: 'success' });
});

document.getElementById('gate-reject').addEventListener('click', async () => {
  if (await Soma.confirm({
    title: 'Reject this plan?',
    body: 'devops-agent keeps the session open and re-plans.',
    appearance: 'danger',
    confirmLabel: 'Reject',
  })) gateOut.textContent = 'rejected — agent re-planning';
});

// Kill switch: out-of-band escalation, not part of the approve/reject pair.
const stopBtn = document.getElementById('gate-stop');
stopBtn.addEventListener('click', () => {
  stopBtn.disabled = true;
  gateOut.textContent = 'stopped — kill switch engaged';
  Soma.banner({
    appearance: 'critical',
    body: 'Kill switch engaged — all agent actions are paused at project scope.',
    close: 'manual',
  }).on('close', () => { stopBtn.disabled = false; });
});