feat: add Vault Backup — auto-push captures to vault server
...
- New vault/ package: VaultConfig, VaultAuthManager, VaultUploader, VaultSyncModule
- VaultAuthManager: mutex-protected token cache, reads real expiry from JWT exp claim,
auto-refresh via refresh token, falls back to full re-auth with client secret
- VaultUploader: SHA-256 checksum, 2MB chunked upload (init→chunk→finalize),
verifies file exists on server before marking local as deletable
- VaultSyncModule: periodic coroutine loop, independent WiFi check, scans both
externalMediaDirs and getExternalFilesDir cortex_sync paths, deletes local
files after confirmed remote upload
- MainActivity: independent Vault Backup card (own toggle, SA key file import,
manual credential fields, interval spinner, Sync Now button with live status)
- MonitoringModule: reduce visual capture interval 20min → 5min
- AgentService: wire VaultSyncModule lifecycle, expose getVaultSyncModule()
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
yangyang xie
committed
9 days ago