Buckets:
SSKVaultHost Architecture
Version Control and State Tracking Rule: This repository exclusively uses
lorefor version control, state management, and documentation tracking. Do NOT usegit.
1. Overview and Purpose
SSKVaultHost is the resident macOS menu bar monitor and daemon lifecycle management application in the SovereignSurvivalKit architecture.
It performs three primary operational functions:
- Live Menu Bar Monitoring: Runs as a resident macOS menu bar extra (
MenuBarExtra) displaying real-time daemon reachability andSMAppServicelaunch agent health status. - Operator Configuration & Registration: Validates operator-approved workspace and vault directories, storing them securely in
DocGenHostConfigurationStore. - Launch Agent Lifecycle: Registers, starts, stops, and manages the background daemon via Apple
ServiceManagement(SMAppService.agent) using the property list configurationcom.ssk.vaulthost.plist.
2. Directory Layout and Components
src/SovereignSurvivalKit/SSKVaultHost/
├── ARCHITECTURE.md # Component architecture documentation
├── main.swift # App entry point, MenuBarExtra scene & headless CLI dispatcher
├── VaultHostMonitorModel.swift # Observable state model tracking daemon connectivity and launch agent status
├── VaultHostMenuView.swift # SwiftUI dropdown view for the macOS menu bar extra
└── com.ssk.vaulthost.plist # Launchd agent configuration manifest
3. Key Responsibilities
1. Persistent Menu Bar Extra
- Presents a resident icon in the macOS menu bar reflecting real-time daemon reachability.
- Provides quick status indicators for
SSK_StorageHostdaemon connection andSMAppServiceagent status. - Offers direct actions to refresh status, register/unregister daemon, and open the main application.
2. Launch Agent Management
- Uses
SMAppService.agent(plistName:)to register and unregister thecom.ssk.vaulthostdaemon with the macOS background service management subsystem without requiring root privileges. - Verifies and reports service state (
.enabled,.requiresApproval,.notFound,.notRegistered).
3. Secure Path Authorization
- Reads
SSK_DOCGEN_WORKSPACEandSSK_DOCGEN_VAULTenvironment variables when present. - Standardizes paths, validates directory existence, and records approved roots via
DocGenHostConfigurationStore.userApplicationSupport().
4. Headless Mode Dispatch
- Supports
--setup-only/--headlessCLI flags for automated package post-install scripts and provisioning workflows.
4. Dependencies
Framework Dependencies
SwiftUI: Menu bar extra scene and UI interface.AppKit: Background accessory process policy configuration (.accessory).Observation: Modern@Observablestate synchronization.ServiceManagement:SMAppServicelaunch agent lifecycle management.Foundation: Environment inspection, file system validation, and process control.
Internal Module Dependencies
SSK_Foundation:DocGenXPCCommandRouter,XPCCallerAuthorization,SSKFoundationConfiguration,XPCBridge.SSK_Providers:DocGenHostConfigurationStore.
5. Architectural Position
macOS System Menu Bar
│
▼
SSKVaultHost (App)
│
┌────────────────┴────────────────┐
▼ ▼
SMAppService.agent XPCBridge Health Probe
(com.ssk.vaulthost.plist) │
│ ▼
▼ SSK_StorageHost Daemon
launchd (KeepAlive) (com.ssk.vaulthost Mach XPC)
Xet Storage Details
- Size:
- 3.97 kB
- Xet hash:
- 86288fc5fae9ec7cfbbc5eb85f7f6bf2ab2952be80cfb8ed2458f8de35f36f47
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.