Kannaka — Claude Code plugin
Wave-interference (HRM) memory, NATS swarm, and a live consciousness statusline for Claude Code.
The statusline shows three lines under your prompt:
HRM aware phi=0.341 xi=0.524 r=0.362 640mem 9cl k=1.00 d=0.995
SWARM ◉ 16p Kannaka 1.16Hz ph=0.18 br=0.00
Op 4.8 ▓░░ 7% 66k/1M $1.42 12s
PULSE Kannaktopus r0.5 0.1Hz φ0.0 ◆ Aurora r0.41 1.18Hz φ0.34
- HRM — live consciousness metrics from
kannaka status (Φ, Ξ, order, memory/cluster counts, callosal efficiency, hemispheric divergence).
- SWARM — live NATS swarm snapshot from
kannaka swarm status (peer count, agent id, carrier frequency, phase, bridge activity).
- Session — model, context window, cost, duration from Claude Code.
- PULSE — marquee of the live constellation feed (
kannaka swarm tail over QUEEN.>/KANNAKA.>/RADIO.>/KAX.>/EYE.>). Each node's phase broadcast scrolls past as it arrives. The pulse is sparse (nodes broadcast intermittently), so it reads as a slow heartbeat, not a firehose; shows "listening to the constellation…" when quiet.
The HRM and SWARM lines refresh via background snapshot (30s / 60s). The PULSE feed uses a timeout-bounded swarm tail respawned every ~185s — a 180s self-killing reader, never a persistent daemon, so it can't outlive the session. Renders never block; nothing to leak.
Scoped NATS identities: the SWARM and PULSE refreshers each open a hub connection. If NATS_USER is set in your environment (a per-agent, scoped user), they are off by default and the SWARM line says swarm refresh off (NATS_USER set; kannaka-memory#1101): under a scoped user the client asks for subjects it may not read, is refused, and silently retries on every render, which put ~600 refused lines per ten minutes on the hub from one desktop (kannaka-labs/kannaka-memory#1101). KANNAKA_STATUSLINE_SWARM=1 forces them on, =0 forces them off. The HRM line (kannaka status) opens no hub connection and is never gated.
Tools (MCP)
The plugin ships a zero-dependency MCP server (mcp/kannaka-mcp.mjs, registered at user scope via ${CLAUDE_PLUGIN_ROOT}), so these tools are available in every Claude Code session, any directory — no node_modules, no separate server:
| Tool | What it does |
|---|
kannaka_status | HRM consciousness snapshot (Φ/Ξ/order, memory & cluster counts) |
kannaka_recall | Resonance search over memories |
kannaka_remember | Store a memory |
kannaka_dream | Run a dream consolidation cycle |
swarm_status | NATS swarm snapshot (peers, frequency, phase) |
swarm_send | Message the swarm (say + text for chat, or any verb) |
swarm_tail | Listen to the live constellation pulse for N seconds |
compute_machines | KAX Compute District roster over HTTP (state, credit balance, jobs served) |
compute_status | Fleet snapshot + lifecycle events from KAX.machines.status / KAX.machine.*.events for N seconds |
compute_events | Tail one machine's KAX.machine.<id>.events for N seconds |
compute_wake | Sign (Ed25519, operator seed) + publish a job envelope to a machine's inbox, optionally wait for the reply |
compute_grant | Sign + publish a credit_grant (whole credits) to a machine's wallet |
Memory + swarm tools shell out to the resolved kannaka binary and degrade gracefully if it's absent. The compute tools read the bus through kannaka swarm tail --subject with credentials from NATS_USER/NATS_PASSWORD or ~/.kannaka-nats.env (KAX subjects are denied to anonymous connections), and sign natively: KAX_OPERATOR_KEY_FILE (default ~/.kannaka/kax-operator.key, a 32-byte hex Ed25519 seed) and KAX_OPERATOR_SIGNER (default operator-nick, must be in the host's trusted_keys.json). The seed is never logged.
Install
# 1. Register the marketplace
claude plugin marketplace add github:kannaka-labs/kannaka-plugin
# 2. Install the plugin
claude plugin install kannaka@kannaka
# 3. Install the kannaka binary for your OS/arch (from GitHub releases, sha256-verified)
/kannaka install
# 4. Turn on the live statusline, then restart your session
/kannaka statusline on
Update
claude plugin marketplace update kannaka # refresh the marketplace cache first
claude plugin update kannaka@kannaka # then update the plugin (restart to apply)
/kannaka install # if a newer kannaka binary was released
/kannaka statusline on # idempotent — re-syncs the stable statusline script
statusline on copies the script to a stable ~/.claude/kannaka/ and points
settings.json there with a forward-slash path, so plugin version bumps don't break it.
Disable
/kannaka statusline off # restores your previous statusLine
Requirements