save method
Writes value through to the store and updates the snapshot. Returns
false when the store is unavailable OR the write fails (locked or
MDM-managed keychain, missing Secret Service provider) — a failing
backend must degrade to session-only, never crash the CLI.
Implementation
Future<bool> save(String name, String value) async {
if (!available) return false;
try {
await _store!.write(name, value);
} on Object {
return false;
}
_snapshot[name] = value;
return true;
}