# anshupriyan/enheduanna-meta-submission architecture

> Architecture diagram of the GitHub repository anshupriyan/enheduanna-meta-submission, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-21). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/anshupriyan/enheduanna-meta-submission
- Repository: https://github.com/anshupriyan/enheduanna-meta-submission

## Overview

Enheduanna combines a local screen-memory service, a governed AI tool agent, and IGI’s screen-selection HUD. The principal workflow is: capture and index desktop activity; ask a question through the dashboard or IGI; retrieve relevant context and optionally invoke tools; stream the answer or request approval for restricted actions. The graph preserves these distinct product stages and documented privacy, visual-grounding, and timeline capabilities. Some subsystems are represented by their exact directories because their implementation files were not sampled; their internal links are omitted where evidence was unavailable.

Main entry points: [`memvison/src/memvision/engine.py`](https://github.com/anshupriyan/enheduanna-meta-submission/blob/main/memvison/src/memvision/engine.py) (Capture pipeline), [`app/core/src/agent/orchestrator.ts`](https://github.com/anshupriyan/enheduanna-meta-submission/blob/main/app/core/src/agent/orchestrator.ts) (Tool orchestrator), [`app/core/src/server.ts`](https://github.com/anshupriyan/enheduanna-meta-submission/blob/main/app/core/src/server.ts) (Core HTTP server), [`igi/hud/chat_window.py`](https://github.com/anshupriyan/enheduanna-meta-submission/blob/main/igi/hud/chat_window.py) (Companion HUD)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_core["Agent and dashboard"]
  node_dashboard["Web dashboard<br/>[app.js]"]
  node_core_server["Core HTTP server<br/>[server.ts]"]
  node_session[("Chat sessions<br/>[session.ts]")]
  node_agent["Tool orchestrator<br/>[orchestrator.ts]"]
  node_approval["Action approval<br/>[approval.ts]"]
  node_mcp["MCP tool manager<br/>[manager.ts]"]
  node_provider["Meta model provider<br/>[meta.ts]"]
  node_trace["Event trace bus<br/>[bus.ts]"]
  node_capture["Capture supervisor<br/>[supervisor.ts]"]
end

subgraph group_memory["Desktop memory"]
  node_memory_engine["Capture pipeline<br/>[engine.py]"]
  node_capture_source["Screen sampling<br/>[capture.py]"]
  node_change["Change detection<br/>[change_detector.py]"]
  node_context["Context extraction<br/>[context.py]"]
  node_ocr["Local OCR<br/>[ocr.py]"]
  node_privacy["Privacy filtering<br/>[privacy.py]"]
  node_storage[("Memory search store<br/>[storage.py]")]
  node_memory_mcp["Memory MCP tools<br/>[mcp_server.py]"]
  node_memory_ui["Timeline viewer"]
end

subgraph group_igi["IGI visual companion"]
  node_igi_main["IGI launcher<br/>[main.py]"]
  node_overlay["Selection overlay<br/>[canvas.py]"]
  node_grounding["Spatial grounding<br/>[router.py]"]
  node_hud["Companion HUD<br/>[chat_window.py]"]
  node_igi_client["Core client<br/>[core_client.py]"]
end

subgraph group_external["External systems"]
  node_meta_api{{"Meta Model API"}}
  node_cli_bridge{{"CLI Bridge tools"}}
end

node_user(("Desktop user"))

node_user -->|"asks through"| node_dashboard
node_dashboard -.->|"sends requests"| node_core_server
node_core_server -->|"loads sessions"| node_session
node_core_server -->|"starts turns"| node_agent
node_agent -->|"updates history"| node_session
node_agent -->|"requests completions"| node_provider
node_provider -->|"calls models"| node_meta_api
node_agent -->|"executes tools"| node_mcp
node_agent -->|"requests authorization"| node_approval
node_agent -->|"emits events"| node_trace
node_core_server -->|"controls capture"| node_capture
node_mcp -->|"connects to"| node_memory_mcp
node_mcp -->|"connects to"| node_cli_bridge
node_memory_engine -->|"samples screens"| node_capture_source
node_memory_engine -->|"checks changes"| node_change
node_memory_engine -->|"extracts context"| node_context
node_memory_engine -->|"runs OCR"| node_ocr
node_memory_engine -->|"redacts content"| node_privacy
node_memory_engine -->|"stores captures"| node_storage
node_memory_mcp -.->|"searches memory"| node_storage
node_user -->|"reviews timeline"| node_memory_ui
node_igi_main -->|"launches overlay"| node_overlay
node_igi_main -->|"launches HUD"| node_hud
node_igi_main -->|"initializes router"| node_grounding
node_overlay -->|"passes selection"| node_hud
node_hud -->|"grounds targets"| node_grounding
node_hud -->|"sends questions"| node_igi_client
node_igi_client -->|"streams requests"| node_core_server
node_user -->|"selects screen area"| node_overlay
node_user -->|"asks visually"| node_hud

click node_dashboard "https://github.com/anshupriyan/enheduanna-meta-submission/blob/main/app/dashboard/app.js"
click node_core_server "https://github.com/anshupriyan/enheduanna-meta-submission/blob/main/app/core/src/server.ts"
click node_session "https://github.com/anshupriyan/enheduanna-meta-submission/blob/main/app/core/src/agent/session.ts"
click node_agent "https://github.com/anshupriyan/enheduanna-meta-submission/blob/main/app/core/src/agent/orchestrator.ts"
click node_approval "https://github.com/anshupriyan/enheduanna-meta-submission/blob/main/app/core/src/agent/approval.ts"
click node_mcp "https://github.com/anshupriyan/enheduanna-meta-submission/blob/main/app/core/src/mcp/manager.ts"
click node_provider "https://github.com/anshupriyan/enheduanna-meta-submission/blob/main/app/core/src/providers/meta.ts"
click node_trace "https://github.com/anshupriyan/enheduanna-meta-submission/blob/main/app/core/src/trace/bus.ts"
click node_capture "https://github.com/anshupriyan/enheduanna-meta-submission/blob/main/app/core/src/capture/supervisor.ts"
click node_memory_engine "https://github.com/anshupriyan/enheduanna-meta-submission/blob/main/memvison/src/memvision/engine.py"
click node_capture_source "https://github.com/anshupriyan/enheduanna-meta-submission/blob/main/memvison/src/memvision/capture.py"
click node_change "https://github.com/anshupriyan/enheduanna-meta-submission/blob/main/memvison/src/memvision/change_detector.py"
click node_context "https://github.com/anshupriyan/enheduanna-meta-submission/blob/main/memvison/src/memvision/context.py"
click node_ocr "https://github.com/anshupriyan/enheduanna-meta-submission/blob/main/memvison/src/memvision/ocr.py"
click node_privacy "https://github.com/anshupriyan/enheduanna-meta-submission/blob/main/memvison/src/memvision/privacy.py"
click node_storage "https://github.com/anshupriyan/enheduanna-meta-submission/blob/main/memvison/src/memvision/storage.py"
click node_memory_mcp "https://github.com/anshupriyan/enheduanna-meta-submission/blob/main/memvison/src/memvision/mcp_server.py"
click node_memory_ui "https://github.com/anshupriyan/enheduanna-meta-submission/tree/main/memvison/src/memvision/web"
click node_igi_main "https://github.com/anshupriyan/enheduanna-meta-submission/blob/main/igi/main.py"
click node_overlay "https://github.com/anshupriyan/enheduanna-meta-submission/blob/main/igi/overlay/canvas.py"
click node_grounding "https://github.com/anshupriyan/enheduanna-meta-submission/blob/main/igi/sam/router.py"
click node_hud "https://github.com/anshupriyan/enheduanna-meta-submission/blob/main/igi/hud/chat_window.py"
click node_igi_client "https://github.com/anshupriyan/enheduanna-meta-submission/blob/main/igi/bridge/core_client.py"

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_dashboard,node_core_server,node_session,node_agent,node_approval,node_mcp,node_provider,node_trace,node_capture,node_user toneBlue
class node_memory_engine,node_capture_source,node_change,node_context,node_ocr,node_privacy,node_storage,node_memory_mcp,node_memory_ui toneAmber
class node_igi_main,node_overlay,node_grounding,node_hud,node_igi_client toneMint
class node_meta_api,node_cli_bridge toneRose
```

## Components

### Agent and dashboard

- [Web dashboard](https://github.com/anshupriyan/enheduanna-meta-submission/blob/main/app/dashboard/app.js): `app/dashboard/app.js`
- [Core HTTP server](https://github.com/anshupriyan/enheduanna-meta-submission/blob/main/app/core/src/server.ts): `app/core/src/server.ts`
- [Chat sessions](https://github.com/anshupriyan/enheduanna-meta-submission/blob/main/app/core/src/agent/session.ts): `app/core/src/agent/session.ts`
- [Tool orchestrator](https://github.com/anshupriyan/enheduanna-meta-submission/blob/main/app/core/src/agent/orchestrator.ts): `app/core/src/agent/orchestrator.ts`
- [Action approval](https://github.com/anshupriyan/enheduanna-meta-submission/blob/main/app/core/src/agent/approval.ts): `app/core/src/agent/approval.ts`
- [MCP tool manager](https://github.com/anshupriyan/enheduanna-meta-submission/blob/main/app/core/src/mcp/manager.ts): `app/core/src/mcp/manager.ts`
- [Meta model provider](https://github.com/anshupriyan/enheduanna-meta-submission/blob/main/app/core/src/providers/meta.ts): `app/core/src/providers/meta.ts`
- [Event trace bus](https://github.com/anshupriyan/enheduanna-meta-submission/blob/main/app/core/src/trace/bus.ts): `app/core/src/trace/bus.ts`
- [Capture supervisor](https://github.com/anshupriyan/enheduanna-meta-submission/blob/main/app/core/src/capture/supervisor.ts): `app/core/src/capture/supervisor.ts`

### Desktop memory

- [Capture pipeline](https://github.com/anshupriyan/enheduanna-meta-submission/blob/main/memvison/src/memvision/engine.py): `memvison/src/memvision/engine.py`
- [Screen sampling](https://github.com/anshupriyan/enheduanna-meta-submission/blob/main/memvison/src/memvision/capture.py): `memvison/src/memvision/capture.py`
- [Change detection](https://github.com/anshupriyan/enheduanna-meta-submission/blob/main/memvison/src/memvision/change_detector.py): `memvison/src/memvision/change_detector.py`
- [Context extraction](https://github.com/anshupriyan/enheduanna-meta-submission/blob/main/memvison/src/memvision/context.py): `memvison/src/memvision/context.py`
- [Local OCR](https://github.com/anshupriyan/enheduanna-meta-submission/blob/main/memvison/src/memvision/ocr.py): `memvison/src/memvision/ocr.py`
- [Privacy filtering](https://github.com/anshupriyan/enheduanna-meta-submission/blob/main/memvison/src/memvision/privacy.py): `memvison/src/memvision/privacy.py`
- [Memory search store](https://github.com/anshupriyan/enheduanna-meta-submission/blob/main/memvison/src/memvision/storage.py): `memvison/src/memvision/storage.py`
- [Memory MCP tools](https://github.com/anshupriyan/enheduanna-meta-submission/blob/main/memvison/src/memvision/mcp_server.py): `memvison/src/memvision/mcp_server.py`
- [Timeline viewer](https://github.com/anshupriyan/enheduanna-meta-submission/tree/main/memvison/src/memvision/web): `memvison/src/memvision/web`

### IGI visual companion

- [IGI launcher](https://github.com/anshupriyan/enheduanna-meta-submission/blob/main/igi/main.py): `igi/main.py`
- [Selection overlay](https://github.com/anshupriyan/enheduanna-meta-submission/blob/main/igi/overlay/canvas.py): `igi/overlay/canvas.py`
- [Spatial grounding](https://github.com/anshupriyan/enheduanna-meta-submission/blob/main/igi/sam/router.py): `igi/sam/router.py`
- [Companion HUD](https://github.com/anshupriyan/enheduanna-meta-submission/blob/main/igi/hud/chat_window.py): `igi/hud/chat_window.py`
- [Core client](https://github.com/anshupriyan/enheduanna-meta-submission/blob/main/igi/bridge/core_client.py): `igi/bridge/core_client.py`

### External systems

- **Meta Model API**
- **CLI Bridge tools**

### Other components

- **Desktop user**

## Connections

- Desktop user → Web dashboard: asks through
- Web dashboard → Core HTTP server: sends requests
- Core HTTP server → Chat sessions: loads sessions (evidence: `app/core/src/server.ts`)
- Core HTTP server → Tool orchestrator: starts turns (evidence: `app/core/src/server.ts`)
- Tool orchestrator → Chat sessions: updates history (evidence: `app/core/src/agent/orchestrator.ts`)
- Tool orchestrator → Meta model provider: requests completions (evidence: `app/core/src/agent/orchestrator.ts`)
- Meta model provider → Meta Model API: calls models
- Tool orchestrator → MCP tool manager: executes tools (evidence: `app/core/src/agent/orchestrator.ts`)
- Tool orchestrator → Action approval: requests authorization (evidence: `app/core/src/agent/orchestrator.ts`)
- Tool orchestrator → Event trace bus: emits events (evidence: `app/core/src/agent/orchestrator.ts`)
- Core HTTP server → Capture supervisor: controls capture (evidence: `app/core/src/server.ts`)
- MCP tool manager → Memory MCP tools: connects to (evidence: `app/core/src/mcp/manager.ts`)
- MCP tool manager → CLI Bridge tools: connects to
- Capture pipeline → Screen sampling: samples screens (evidence: `memvison/src/memvision/engine.py`)
- Capture pipeline → Change detection: checks changes (evidence: `memvison/src/memvision/engine.py`)
- Capture pipeline → Context extraction: extracts context (evidence: `memvison/src/memvision/engine.py`)
- Capture pipeline → Local OCR: runs OCR (evidence: `memvison/src/memvision/engine.py`)
- Capture pipeline → Privacy filtering: redacts content (evidence: `memvison/src/memvision/engine.py`)
- Capture pipeline → Memory search store: stores captures (evidence: `memvison/src/memvision/engine.py`)
- Memory MCP tools → Memory search store: searches memory
- Desktop user → Timeline viewer: reviews timeline
- IGI launcher → Selection overlay: launches overlay (evidence: `igi/main.py`)
- IGI launcher → Companion HUD: launches HUD (evidence: `igi/main.py`)
- IGI launcher → Spatial grounding: initializes router (evidence: `igi/main.py`)
- Selection overlay → Companion HUD: passes selection (evidence: `igi/main.py`)
- Companion HUD → Spatial grounding: grounds targets (evidence: `igi/hud/chat_window.py`)
- Companion HUD → Core client: sends questions (evidence: `igi/hud/chat_window.py`)
- Core client → Core HTTP server: streams requests (evidence: `igi/bridge/core_client.py`)
- Desktop user → Selection overlay: selects screen area
- Desktop user → Companion HUD: asks visually
