CLI
Normalizes run flags, model, prompt, images, resume, verbose, thinking, and approval mode.
TUI
Owns rendering, input queueing, slash commands, model picker, approval UI, and live context estimates.
Session
The harness state machine. It is the shared loop for interactive and headless runs.
Model API
Receives api.ChatRequest with messages, tools, options, format, think, and keep-alive.
Store
Persists chat rows and compaction archives in the application SQLite database.