Skip to content
Cisco AI Defense logo
CiscoAI Security

Panels — DefenseClaw

Overview

Each panel is an independent Bubbletea model composed by internal/tui/app.go. Panels never mutate state directly — they delegate to the CommandExecutor subprocess bridge, which invokes the same CLI verbs documented in the CLI reference. This page maps each panel to its source file, its data source, and its panel-local keys.

Overview (1)

Source: internal/tui/overview.go, internal/tui/health.go, internal/tui/doctor_cache.go

TileData
Sidecar healthGET http://127.0.0.1:18970/health (poll 5s)
Mode + guardrailconfig.yaml + health guardrail.state
Missing keysCached doctor results from defenseclaw doctor --json-output
Recent verdictsAlert count from audit.Store.GetCounts()
Audit statsBlock/allow/scan counts from the audit store

No panel-local keybindings — navigation only.

Alerts (2)

Source: internal/tui/alerts.go, internal/tui/alerts_gateway.go

Alert rows are loaded from the local audit store with ListAlerts(500) and merged with scan-finding rows parsed from gateway.jsonl. HTTP consumers use the sidecar's GET /alerts route; the TUI panel itself reads the store directly.

KeyAction
/ Move row selection
enterOpen detail panel
/Start filter (free-text over alert message and tag fields)
15Quick severity filter (panel owns 15; does not switch panels)
fCycle action filter (allow, warn, block)
escClose detail / clear filter

The filter bar supports compound queries: action=block type=guardrail severity>=high. Filter telemetry is captured via filter_telemetry_test.go so analytics teams can see which filters operators lean on.

Skills (3)

Source: internal/tui/skills.go, internal/tui/actionmenu.go

Lists every skill in ~/.claw/skills/ with trust status, last scan verdict, and quarantine state.

KeyAction
enterOpen detail + scan summary
aOpen action menu (scan / block / allow / unblock / disable / enable / quarantine / restore)
sScan now (subprocess: defenseclaw skill scan <name>)
qQuarantine selected skill (local-only — does not quit TUI)
/Filter by name, trust, verdict

Action menu items are wired to palette entries so they fire the exact same CLI verbs — parity is enforced in cli_parity_test.go.

MCPs (4)

Source: internal/tui/mcps.go, internal/tui/mcp_set_form.go

Registered MCP servers with transport, allow/block state, and last scan. The "set" form is a guided scan + set flow that appends the server to OpenClaw's config after a successful scan.

KeyAction
enterOpen detail panel
aAction menu (scan / block / allow / unblock / set / unset)
sScan
b / uBlock / unblock
xCancel form

Plugins (5)

Source: internal/tui/plugins.go, internal/tui/actionmenu.go

Lists DefenseClaw extensions (guardrail, CodeGuard, custom scanners). Install-state and version come from ~/.defenseclaw/extensions/.

KeyAction
aAction menu
iInstall / refresh
dDisable
eEnable

Inventory (6)

Source: internal/tui/inventory.go

Cross-cutting asset index. Useful when you want to see every asset of a given risk level without tab-hopping. Panel owns 14 for quick scope filters: 1=skills, 2=mcps, 3=plugins, 4=tools.

Policy (7)

Source: internal/tui/policy.go, internal/tui/policy_create_form.go

Lists policy artifacts under ~/.defenseclaw/policy/: Rego bundles, guardrail rule packs, data.json, sensitive-tools list.

KeyAction
enterOpen YAML / Rego viewer overlay
eEdit in $EDITOR (subprocess defenseclaw policy edit …)
nNew policy (form)
rReload policies (defenseclaw-gateway policy reload)
tRun defenseclaw policy test
escClose overlay

Opening the viewer pushes the panel into "exclusive" mode — global keys q, 19 are swallowed so you can type any character inside YAML.

Logs (8)

Source: internal/tui/logs.go

Tails ~/.defenseclaw/gateway.log. Supports / filter and follow-mode toggle.

KeyAction
g / GTop / bottom
fToggle follow
/Filter
cClear filter

Audit (9)

Source: internal/tui/audit.go

Queryable audit store (~/.defenseclaw/audit.db). The panel filters rows in-process and can export the filtered subset without relying on a Python audit query command.

KeyAction
enterOpen row detail (full JSON)
/Compound filter (event_type=verdict severity>=high)
eExport filtered subset

Activity

Source: internal/tui/activity.go

Watcher activity stream: quarantines, admission decisions, snapshot diffs, periodic rescans. Panel owns 1 and 2 for "recent" / "all-time".

Tools (T)

Source: internal/tui/tools.go

Tools declared by MCP servers. Reached via T (uppercase, mnemonic) or the palette. There is no numeric shortcut — the numeric slot is reserved so the existing 1–9 bindings remain stable across releases.

Setup (0)

Source: internal/tui/setup.go, internal/tui/setup_sinks.go, internal/tui/setup_webhooks.go

Wizard panel that runs defenseclaw setup ... flows inside the TUI. Forms capture input, validate locally, then shell to the CLI with the right flags.

Related