# dark-vector-cognition/helm architecture

> Architecture diagram of the GitHub repository dark-vector-cognition/helm, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-18). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/dark-vector-cognition/helm
- Repository: https://github.com/dark-vector-cognition/helm

## Overview

HELM is an Electron operator shell for local AI systems. Operators navigate domain pages to inspect machine health, agents, repositories, network activity, and logs; they can then control processes, launch HIVE sessions, request optional AI briefings, search/push vault notes, and review registry history. Main-process monitoring and IPC provide live state to the renderer, with local SQLite persistence and separate radio streaming. The graph follows documented capabilities; some unsampled subsystem links are omitted where source evidence was unavailable.

Main entry points: [`src/main/monitors/index.ts`](https://github.com/dark-vector-cognition/helm/blob/main/src/main/monitors/index.ts) (State Monitor), [`src/renderer/src/panels/FMRadio.tsx`](https://github.com/dark-vector-cognition/helm/blob/main/src/renderer/src/panels/FMRadio.tsx) (Radio Player), [`src/renderer/src/App.tsx`](https://github.com/dark-vector-cognition/helm/blob/main/src/renderer/src/App.tsx) (Domain Pages), [`src/preload/index.ts`](https://github.com/dark-vector-cognition/helm/blob/main/src/preload/index.ts) (Desktop IPC)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_shell["Operator Shell"]
  node_app["Domain Pages<br/>[App.tsx]"]
  node_preload["Desktop IPC<br/>[index.ts]"]
  node_systemstore["Live State Store<br/>[system.ts]"]
end

subgraph group_ops["System Operations"]
  node_monitor["State Monitor<br/>[index.ts]"]
  node_host["Host Monitors"]
  node_git["Git Operations<br/>[git.ts]"]
  node_agents["Agent Tracking<br/>[agents.ts]"]
  node_hive["HIVE Sessions<br/>[index.ts]"]
  node_sentinel["Sentinel Alerts<br/>[index.ts]"]
end

subgraph group_intelligence["AI and Automation"]
  node_ai["AI Briefings<br/>[briefing.ts]"]
  node_model["Model Endpoint<br/>[lmstudio.ts]"]
  node_usage["Usage Tracking<br/>[ccusage.ts]"]
end

subgraph group_records["Persistence and Knowledge"]
  node_registry["Agent Registry<br/>[registry.ts]"]
  node_vault["Vault Client<br/>[vault-client.ts]"]
  node_db[("SQLite History<br/>[queries.ts]")]
end

subgraph group_media["Radio"]
  node_radio["Radio Player<br/>[FMRadio.tsx]"]
  node_audio["Audio Engine<br/>[audio-engine.ts]"]
  node_stations["Station Catalog<br/>[fm-stations.ts]"]
  node_relay["Stream Relay<br/>[radio-relay.ts]"]
end

node_operator(("Operator"))
node_externalmodel(("Compatible Model"))
node_vaultservice(("Vault RAG Service"))

node_operator -->|"navigates"| node_app
node_app -.->|"requests via"| node_preload
node_preload -.->|"bridges IPC"| node_monitor
node_monitor -->|"collects"| node_host
node_monitor -->|"scans repos"| node_git
node_monitor -->|"detects agents"| node_agents
node_monitor -->|"streams state"| node_systemstore
node_operator -.->|"controls sessions"| node_hive
node_operator -->|"receives alerts"| node_sentinel
node_monitor -->|"requests briefing"| node_ai
node_ai -->|"queries"| node_model
node_model -.->|"calls endpoint"| node_externalmodel
node_monitor -.->|"polls usage"| node_usage
node_operator -.->|"reviews history"| node_registry
node_operator -.->|"searches and pushes"| node_vault
node_vault -.->|"requests vault data"| node_vaultservice
node_monitor -->|"stores briefings"| node_db
node_operator -->|"tunes streams"| node_radio
node_radio -.->|"controls playback"| node_audio
node_radio -->|"uses presets"| node_stations
node_radio -->|"resolves source"| node_relay

click node_app "https://github.com/dark-vector-cognition/helm/blob/main/src/renderer/src/App.tsx"
click node_preload "https://github.com/dark-vector-cognition/helm/blob/main/src/preload/index.ts"
click node_monitor "https://github.com/dark-vector-cognition/helm/blob/main/src/main/monitors/index.ts"
click node_host "https://github.com/dark-vector-cognition/helm/tree/main/src/main/monitors"
click node_git "https://github.com/dark-vector-cognition/helm/blob/main/src/main/monitors/git.ts"
click node_agents "https://github.com/dark-vector-cognition/helm/blob/main/src/main/monitors/agents.ts"
click node_hive "https://github.com/dark-vector-cognition/helm/blob/main/src/main/hive/index.ts"
click node_sentinel "https://github.com/dark-vector-cognition/helm/blob/main/src/main/sentinel/index.ts"
click node_ai "https://github.com/dark-vector-cognition/helm/blob/main/src/main/intelligence/briefing.ts"
click node_model "https://github.com/dark-vector-cognition/helm/blob/main/src/main/intelligence/lmstudio.ts"
click node_usage "https://github.com/dark-vector-cognition/helm/blob/main/src/main/monitors/ccusage.ts"
click node_registry "https://github.com/dark-vector-cognition/helm/blob/main/src/main/registry.ts"
click node_vault "https://github.com/dark-vector-cognition/helm/blob/main/src/main/vault-client.ts"
click node_db "https://github.com/dark-vector-cognition/helm/blob/main/src/main/db/queries.ts"
click node_systemstore "https://github.com/dark-vector-cognition/helm/blob/main/src/renderer/src/stores/system.ts"
click node_radio "https://github.com/dark-vector-cognition/helm/blob/main/src/renderer/src/panels/FMRadio.tsx"
click node_audio "https://github.com/dark-vector-cognition/helm/blob/main/src/renderer/src/stores/audio-engine.ts"
click node_stations "https://github.com/dark-vector-cognition/helm/blob/main/src/renderer/src/panels/fm-stations.ts"
click node_relay "https://github.com/dark-vector-cognition/helm/blob/main/src/main/radio-relay.ts"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_app,node_preload,node_systemstore toneBlue
class node_monitor,node_host,node_git,node_agents,node_hive,node_sentinel toneAmber
class node_ai,node_model,node_usage toneMint
class node_registry,node_vault,node_db toneRose
class node_radio,node_audio,node_stations,node_relay,node_operator,node_externalmodel,node_vaultservice toneIndigo
```

## Components

### Operator Shell

- [Domain Pages](https://github.com/dark-vector-cognition/helm/blob/main/src/renderer/src/App.tsx): `src/renderer/src/App.tsx`
- [Desktop IPC](https://github.com/dark-vector-cognition/helm/blob/main/src/preload/index.ts): `src/preload/index.ts`
- [Live State Store](https://github.com/dark-vector-cognition/helm/blob/main/src/renderer/src/stores/system.ts): `src/renderer/src/stores/system.ts`

### System Operations

- [State Monitor](https://github.com/dark-vector-cognition/helm/blob/main/src/main/monitors/index.ts): `src/main/monitors/index.ts`
- [Host Monitors](https://github.com/dark-vector-cognition/helm/tree/main/src/main/monitors): `src/main/monitors`
- [Git Operations](https://github.com/dark-vector-cognition/helm/blob/main/src/main/monitors/git.ts): `src/main/monitors/git.ts`
- [Agent Tracking](https://github.com/dark-vector-cognition/helm/blob/main/src/main/monitors/agents.ts): `src/main/monitors/agents.ts`
- [HIVE Sessions](https://github.com/dark-vector-cognition/helm/blob/main/src/main/hive/index.ts): `src/main/hive/index.ts`
- [Sentinel Alerts](https://github.com/dark-vector-cognition/helm/blob/main/src/main/sentinel/index.ts): `src/main/sentinel/index.ts`

### AI and Automation

- [AI Briefings](https://github.com/dark-vector-cognition/helm/blob/main/src/main/intelligence/briefing.ts): `src/main/intelligence/briefing.ts`
- [Model Endpoint](https://github.com/dark-vector-cognition/helm/blob/main/src/main/intelligence/lmstudio.ts): `src/main/intelligence/lmstudio.ts`
- [Usage Tracking](https://github.com/dark-vector-cognition/helm/blob/main/src/main/monitors/ccusage.ts): `src/main/monitors/ccusage.ts`

### Persistence and Knowledge

- [Agent Registry](https://github.com/dark-vector-cognition/helm/blob/main/src/main/registry.ts): `src/main/registry.ts`
- [Vault Client](https://github.com/dark-vector-cognition/helm/blob/main/src/main/vault-client.ts): `src/main/vault-client.ts`
- [SQLite History](https://github.com/dark-vector-cognition/helm/blob/main/src/main/db/queries.ts): `src/main/db/queries.ts`

### Radio

- [Radio Player](https://github.com/dark-vector-cognition/helm/blob/main/src/renderer/src/panels/FMRadio.tsx): `src/renderer/src/panels/FMRadio.tsx`
- [Audio Engine](https://github.com/dark-vector-cognition/helm/blob/main/src/renderer/src/stores/audio-engine.ts): `src/renderer/src/stores/audio-engine.ts`
- [Station Catalog](https://github.com/dark-vector-cognition/helm/blob/main/src/renderer/src/panels/fm-stations.ts): `src/renderer/src/panels/fm-stations.ts`
- [Stream Relay](https://github.com/dark-vector-cognition/helm/blob/main/src/main/radio-relay.ts): `src/main/radio-relay.ts`

### Other components

- **Operator**
- **Compatible Model**
- **Vault RAG Service**

## Connections

- Operator → Domain Pages: navigates
- Domain Pages → Desktop IPC: requests via
- Desktop IPC → State Monitor: bridges IPC
- State Monitor → Host Monitors: collects (evidence: `src/main/monitors/index.ts`)
- State Monitor → Git Operations: scans repos (evidence: `src/main/monitors/index.ts`)
- State Monitor → Agent Tracking: detects agents (evidence: `src/main/monitors/index.ts`)
- State Monitor → Live State Store: streams state (evidence: `src/main/monitors/index.ts`)
- Operator → HIVE Sessions: controls sessions
- Operator → Sentinel Alerts: receives alerts (evidence: `src/main/sentinel/index.ts`)
- State Monitor → AI Briefings: requests briefing (evidence: `src/main/monitors/index.ts`)
- AI Briefings → Model Endpoint: queries (evidence: `src/main/intelligence/briefing.ts`)
- Model Endpoint → Compatible Model: calls endpoint
- State Monitor → Usage Tracking: polls usage (evidence: `src/main/monitors/index.ts`)
- Operator → Agent Registry: reviews history
- Operator → Vault Client: searches and pushes
- Vault Client → Vault RAG Service: requests vault data
- State Monitor → SQLite History: stores briefings (evidence: `src/main/monitors/index.ts`)
- Operator → Radio Player: tunes streams
- Radio Player → Audio Engine: controls playback (evidence: `src/renderer/src/panels/FMRadio.tsx`)
- Radio Player → Station Catalog: uses presets (evidence: `src/renderer/src/panels/FMRadio.tsx`)
- Radio Player → Stream Relay: resolves source (evidence: `src/renderer/src/panels/FMRadio.tsx`)
