How sentient-os-labs/sentient-os works
Purpose and entry points
Sentient OS is a native macOS 15+/Apple Silicon personal-intelligence app. It ingests local personal data nightly, filters/summarizes it on-device, builds a local Markdown knowledge vault through the user’s Codex/OpenAI subscription, and presents proactive work plus an interactive “Sidekick” computer-use interface. App startup and shared UI state originate in:
• Sentient OS macOS/App/main.swift
• Sentient OS macOS/App/Sentient_OS_macOSApp.swift
• Sentient OS macOS/App/AppState.swift
Application shell and user surfaces
The SwiftUI application is organized around a root/home experience, menu-bar presence, onboarding, settings, and a Knowledge viewer. AppState is the central coordination boundary for UI-visible lifecycle and feature state; views should not directly own pipeline infrastructure.
• Sentient OS macOS/Views/RootView.swift
• Sentient OS macOS/Views/HomeView.swift
• Sentient OS macOS/Views/MenuBarView.swift
• Sentient OS macOS/Views/Onboarding/OnboardingView.swift
• Sentient OS macOS/Views/Knowledge/KnowledgeView.swift
Local ingestion and incremental processing
Sources abstract local and connected data; ingestion connectors convert source records into pipeline items, while cycle/run stores support incremental, resumable processing and lifetime activity tracking. Local sources include files, Notes, iMessage, WhatsApp, plus Gmail/Calendar through Codex/OpenAI connectors. Full Disk Access and source permissions form a hard OS boundary.
• Sentient OS macOS/Sources/DataSource.swift
• Sentient OS macOS/Sources/iMessageSource.swift
• Sentient OS macOS/Sources/WhatsAppSource.swift
• Sentient OS macOS/Ingestion/Connector.swift
• Sentient OS macOS/Ingestion/IterativeRun.swift
• Sentient OS macOS/Ingestion/CycleStore.swift
Primary flow: selected sources → connectors/items → iterative run/cycle persistence → local model triage → retained summaries for vault generation. Factory reset is explicitly part of the ingestion-domain lifecycle.
Privacy-preserving inference pipeline
The local Engine is the privacy gate and compute spine. A downloadable/located on-device model performs triage; sensitive or junk content is dropped, and retained material receives PII screening before it can reach cloud-backed Codex processing. This is the primary raw-data boundary: raw source content stays local, while only approved, PII-stripped summaries are eligible for frontier processing.
• Sentient OS macOS/Engine/Engine.swift
• Sentient OS macOS/Engine/Triage.swift
• Sentient OS macOS/Engine/PIIScan.swift
• Sentient OS macOS/Engine/ModelDownload.swift
• Sentient OS macOS/Engine/ModelLocator.swift
Runtime is native Swift/macOS with LiteRT-LM/Gemma local inference, optimized for constrained Apple Silicon machines.
Vault generation and knowledge presentation
Approved summaries are distilled into an editable, local Obsidian-style Markdown corpus. Vault generation, slicing, activity, and cloud-sharing concerns are separated from ingestion and UI. The Knowledge UI renders Markdown/tree structure and a graph/constellation visualization.
• Sentient OS macOS/Vault/VaultGenerator.swift
• Sentient OS macOS/Vault/CorpusSlicer.swift
• Sentient OS macOS/Vault/VaultCloud.swift
• Sentient OS macOS/Views/Knowledge/VaultTree.swift
• Sentient OS macOS/Views/Knowledge/Graph/SkyGraph.swift
Codex/OpenAI and optional encrypted mirror
Codex CLI is the external frontier-compute and computer-use integration, authenticated using the user’s ChatGPT account; Sentient does not proxy this workload through its own API. Optional MCP mirror sharing is isolated behind MirrorClient/vault cloud functionality and is off by default; the README specifies AES-256-GCM ciphertext-only relay storage.
• Sentient OS macOS/Cloud/CodexCLI.swift
• Sentient OS macOS/Cloud/CodexAuth.swift
• Sentient OS macOS/Cloud/ComputerUseSetup.swift
• Sentient OS macOS/Cloud/MirrorClient.swift
• Sentient OS macOS/Vault/VaultCloud.swift
Proactive and Sidekick execution
Proactive processing turns vault context into morning cards/research and requires an explicit user action to execute. Sidekick is a separate interactive path: notch window/hotkey → voice or typed command → Codex-backed computer use, optionally enhanced by Screen Recording. UI capture and action execution are therefore permission-gated boundaries.
• Sentient OS macOS/Proactive/ProactiveCycle.swift
• Sentient OS macOS/Proactive/ProactiveExecutor.swift
• Sentient OS macOS/Notch Magic/CommandCoordinator.swift
• Sentient OS macOS/Notch Magic/VoiceCapture.swift
• Sentient OS macOS/Notch Magic/ScreenCapture.swift
Scheduled operation, system integration, and observability
The overnight scheduler targets the 3 AM processing cycle, with power/thermal caution and a wake-helper client/protocol for sleeping or lid-closed Macs. System permission management, notifications, and app-support storage sit at the macOS boundary. Diagnostics use optional Sentry crash reporting and TelemetryDeck-style analytics, designed to avoid content telemetry. Sparkle-based update control is another app lifecycle boundary.
• Sentient OS macOS/Scheduling/OvernightScheduler.swift
• Sentient OS macOS/Scheduling/WakeHelperClient.swift
• Sentient OS macOS/System/Permissions.swift
• Sentient OS macOS/Diagnostics/CrashReporting.swift
• Sentient OS macOS/Updates/UpdateController.swift
Main entry points: CorpusSlicer.swift Local knowledge vault · CodexCLI.swift Codex CLI · AppState.swift App state · Connector.swift Ingestion connectors
Components 20
macOS App
- App startup
Sentient OS macOS/App/main.swift - App state · Owns UI-visible lifecycle and feature state.
Sentient OS macOS/App/AppState.swift - App surfaces · Home, menu bar, onboarding, settings, and knowledge entry points.
Sentient OS macOS/Views/RootView.swift - Knowledge viewer
Sentient OS macOS/Views/Knowledge/KnowledgeView.swift
Local Processing
- Personal data sources · Files, Notes, messages, and connected Gmail/Calendar.
Sentient OS macOS/Sources/DataSource.swift - Ingestion connectors
Sentient OS macOS/Ingestion/Connector.swift - Incremental runs · Supports resumable processing, activity tracking, and reset lifecycle.
Sentient OS macOS/Ingestion/IterativeRun.swift - Local inference engine · On-device privacy gate on Apple Silicon.
Sentient OS macOS/Engine/Engine.swift - Content triage · Drops sensitive or junk source content locally.
Sentient OS macOS/Engine/Triage.swift - PII screening · Only PII-stripped summaries may leave the device.
Sentient OS macOS/Engine/PIIScan.swift - Local model setup · Locates or downloads the on-device model.
Sentient OS macOS/Engine/ModelDownload.swift
Knowledge & Cloud
- Vault generator · Distills approved summaries into an editable local vault.
Sentient OS macOS/Vault/VaultGenerator.swift - Local knowledge vault · Obsidian-style local knowledge base.
Sentient OS macOS/Vault/CorpusSlicer.swift - Codex CLI · Uses the user's ChatGPT account; no Sentient proxy API.
Sentient OS macOS/Cloud/CodexCLI.swift - Optional encrypted mirror · Off by default; relay stores ciphertext only.
Sentient OS macOS/Cloud/MirrorClient.swift
Proactive & Sidekick
- Proactive cycle · Produces cards and research from vault context.
Sentient OS macOS/Proactive/ProactiveCycle.swift - Sidekick commands · Hotkey/notch commands route voice or typed requests to computer use.
Sentient OS macOS/Notch Magic/CommandCoordinator.swift
System Boundaries
- Overnight scheduler · Uses wake support with power and thermal caution.
Sentient OS macOS/Scheduling/OvernightScheduler.swift - macOS permissions · Gates Full Disk Access, source access, screen recording, and capture.
Sentient OS macOS/System/Permissions.swift - App operations · Content-avoiding telemetry, crash reporting, and Sparkle updates.
Sentient OS macOS/Diagnostics/CrashReporting.swift
Connections 21
- App startup → App state: initializes
- App state → App surfaces: coordinates
- App surfaces → Knowledge viewer: opens
- Overnight scheduler → Ingestion connectors: starts nightly cycle
- macOS permissions → Personal data sources: authorizes access
- Personal data sources → Ingestion connectors: records
- Ingestion connectors → Incremental runs: persists items and progress
- Incremental runs → Local inference engine: supplies pending items
- Local model setup → Local inference engine: provides model
- Local inference engine → Content triage: runs local inference
- Content triage → PII screening: retained summaries
- PII screening → Vault generator: approved summaries only
- Vault generator → Codex CLI: requests distillation
- Codex CLI → Local knowledge vault: generates Markdown
- Local knowledge vault → Knowledge viewer: renders tree and graph
- Local knowledge vault → Optional encrypted mirror: optional encrypted sharing
- Local knowledge vault → Proactive cycle: provides context
- Proactive cycle → Codex CLI: executes after user action
- macOS permissions → Sidekick commands: gates screen and voice capture
- Sidekick commands → Codex CLI: computer-use requests
- App state → App operations: lifecycle control