Split flat v0 credentials.json into version=1 schema with provider
sections (asr/llm), each keyed by providerId. Add automatic migration
on first load with safe backup of the original v0 file.
- New types: CredentialsSchemaV1, CredentialsProviderASRVolcengine,
CredentialsProviderLLMArk, CredentialsActiveSelection
- New CredentialsError enum: unparseable / futureVersion / ioError /
backupFailed / writeFailed
- Pure migration function (CredentialsMigration.parseAndMigrate) for
unit testability — no disk I/O
- Vault: atomic write via tmp + replaceItemAt, mode 0600 preserved
- Backup format: credentials.v0.bak.<timestamp>[-N].json
- Existing public API (get/set/remove/snapshot, CredentialAccount
constants) is unchanged so SettingsHubTab / Sidebar continue to work
- New OpenLessPersistenceTests target with 13 migration tests covering
fresh install, full v0, partial v0 (asr-only / llm-only), empty
ark.endpoint default, future-version safety, damaged-JSON safety,
backup-name conflict suffix, idempotent save, atomic write, and
0600 permissions