@startuml lagrange-internals !include _lagrange.iuml ' Inside the "Lagrange" box from lagrange-context.puml: containers on one Mac (C4 container level). !include HIDE_STEREOTYPE() LAYOUT_TOP_DOWN() UpdateElementStyle("external_system", $bgColor=LAGRANGE_BG_SOFT, $fontColor=LAGRANGE_MUTE, $borderColor=LAGRANGE_BORDER) UpdateElementStyle("container", $bgColor=LAGRANGE_TINT, $fontColor=LAGRANGE_TEXT, $borderColor=LAGRANGE_ACCENT) UpdateElementStyle("container_db", $bgColor=LAGRANGE_TINT, $fontColor=LAGRANGE_TEXT, $borderColor=LAGRANGE_ACCENT) UpdateElementStyle("system_boundary", $fontColor=LAGRANGE_MUTE, $borderColor=LAGRANGE_MUTE) UpdateRelStyle($textColor=LAGRANGE_MUTE, $lineColor=LAGRANGE_MUTE) System_Ext(anthropic, "Claude API") System_Boundary(mac, "macOS workstation") { Container(ghostty, "Ghostty + Claude Code", $descr="terminal, zsh -- sessions, statusline, pj") Container(hooks, "Hooks", $descr="bin/cc-* -- tab state, recall, secret guard, notify") Container(hs, "Hammerspoon", $descr="Lua + WebKit -- panel, Projects, History, voice, scheduler") Container(cchist, "cchist", $descr="python -- archive, search, recall, summaries") ContainerDb(archive, "archive.nosync", $descr="SQLite FTS5 -- sessions, local only") Container(mcp, "cowork-local MCP", $descr="python stdio -- history_*, local_* tools") Container(llm, "llama-server", $descr="local :8179/:8180 -- search vectors, triage, summaries") Container(stt, "whisper-server", $descr="local :8178 -- dictation, wake word") } Rel(ghostty, anthropic, "HTTPS") Rel(ghostty, hooks, "hook events") Rel(ghostty, mcp, "MCP stdio") Rel(hooks, cchist, "sync, recall") Rel(hooks, hs, "state files") Rel(hs, ghostty, "AppleScript") Rel(hs, cchist, "hs.task") Rel(hs, stt, "HTTP") Rel(cchist, archive, "read/write") Rel(cchist, llm, "HTTP") Rel(mcp, cchist, "imports") @enduml