Repository navigation
feat(storage-plugin): add react-native-keychain adapter - #563
Merged
V3RON merged 4 commits intoOct 20, 2026
Merged
Conversation
alexprigi
marked this pull request as ready for review
October 16, 2026 11:58
…orages - Skip unreadable entries instead of failing the whole listing. - List services with skipUIAuth (default true) so the panel does not trigger authentication prompts on iOS. - Keep the Android storage type when editing, and accept setOptions as a per-service function. - Clear only services not hidden by the blacklist, and report the ones that failed instead of stopping partway. - Add capabilities.readOnly: the panel disables mutations and the storage view rejects them; agents see it in list-storages. - Declare react-native-keychain as an optional peer like the other storage libraries, share the no-op adapter factory, and install the storage libraries as regular dependencies in the docs.
… agent tools - Warn when a Keychain entry cannot be read instead of skipping it silently. - Overwrite unreadable entries with the defaults instead of failing set(). - Let setOptions.storage take precedence over the existing storage type. - List each service once; iOS repeats services with several accounts. - Agent create, edit and remove tools fall back to the key list, so listed entries that cannot be read still count as existing.
Adapters such as Expo SecureStore and react-native-keychain can remove some entries before clear() rejects. The purge handler only sent the invalidation on success, so the panel kept showing removed entries.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Adds
createKeychainStorageAdapterto@rozenite/storage-plugin, so the Storage panel can inspect and edit entries stored withreact-native-keychain(iOS Keychain and Android Keystore).getAllGenericPasswordServicesby default, so no key list is needed. Aservicesoption (list or async function) limits what is shown.defaultUsername(defaultuser).setOptions(for exampleaccessible) is passed tosetGenericPassword.readOnlymakes the panel read-only.Related Issue
Closes #562
Context
Written in the same style as the Expo SecureStore adapter: the module is passed in (
keychain: Keychain) and the plugin never importsreact-native-keychain. That keeps it out of the dependencies and peers, so loading the plugin cannot fail when the library is missing, as discussed in the issue. Ifkeychainisundefined, the adapter exposes no storages instead of throwing. The production and web builds return a no-op adapter like the other adapters.The default storage name is a fixed
Keychain / Keystorerather than aPlatform.select, because nothing in the plugin source importsreact-nativeand Lynx has no such package.storageNamecan still be overridden.Testing
Automated:
pnpm checks:affected— passed.pnpm test:affected— passed (209 tests in@rozenite/storage-plugin, including the package-contents and release-bundle tests).readOnly.Manual, in the playground (new Keychain tab,
react-native-keychain10):