Desktop App
OnboardingManager User profile, org onboarding data, memory files, and brand assets
packages/desktop/src/main/onboarding-manager.ts manages all local onboarding and memory data for the desktop app. It handles reads/writes and delegates cloud pushes to SyncManager.
userData/
└── cosmo-data/
├── users/
│ └── {userId}.json ← UserProfile
├── onboarding/
│ └── {orgId}.json ← OrgOnboarding
├── memory/
│ ├── user-{userId}.md ← Plain-text user memory
│ └── org-{orgId}.md ← Plain-text org memory
└── brand-assets/
└── {orgId}/
└── {fileName} ← Logo, icon, etc.
Field Type Description completedboolean Whether onboarding is complete completedAtstring | null ISO timestamp of completion userIdstring User ID preferredNamestring | null Preferred display name rolestring | null Job title or role painPointstring | null Primary pain point extracted from onboarding preferencesstring | null Free-text preferences
Field Type Description completedboolean Whether org onboarding is complete completedAtstring | null ISO timestamp of completion orgIdstring Org ID companyNamestring | null Company name industrystring | null Industry teamSizestring | null Team size bucket useCasestring | null Primary use case brandKit{ logos: StorageRef[], primaryColor, secondaryColor, accentColor } | nullBrand assets
Field Type Description provider'local' | 'r2'Storage backend bucketstring Storage bucket name keystring Object key/path in storage contentTypestring MIME type sizeBytesnumber File size in bytes
Method Description getUserProfile(userId)Read users/{userId}.json, return UserProfile | null saveUserProfile(userId, data)Write profile JSON, then push to cloud via SyncManager
Method Description getOrgOnboarding(orgId)Read onboarding/{orgId}.json, return OrgOnboarding | null saveOrgOnboarding(orgId, data)Write onboarding JSON, then push to cloud via SyncManager
Method Description getUserMemory(userId)Read memory/user-{userId}.md, return string or empty string saveUserMemory(userId, content)Write memory file, push to cloud getOrgMemory(orgId)Read memory/org-{orgId}.md saveOrgMemory(orgId, content)Write org memory, push to cloud
Memory files are plain Markdown — the AI reads and writes them directly during interactions.
Method Description saveAsset(orgId, fileName, buffer, contentType)Write binary file to brand-assets/{orgId}/{fileName} resolveAssetUrl(ref)Convert a StorageRef to a file:// URL the renderer can use
resetAll(orgId, userId) deletes all data for the given user+org combination: profile, onboarding, memory files, and brand assets. Called on onboarding:reset IPC.
Every save* method calls the corresponding SyncManager.push*() method in the background. Pushes are fire-and-forget — local writes succeed regardless of network state.