feat: add id command to read personal identity items#407
Open
zmainen wants to merge 1 commit into
Open
Conversation
Adds a read-only `dcli id` command that retrieves structured personal identity items already synced into the local vault but previously undisplayable: passports, ID cards, identities, driver's licenses, social security IDs, and tax numbers (fiscal statements). The decryption path is unchanged — decryptTransactions is generic — so the handler mirrors the secure-note handler and exposes every KWDataItem field dynamically, keeping it type-agnostic across all personal-info item types. Supports text and json output and the standard filter syntax. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.
What
Adds a read-only
dcli idcommand that retrieves structured personal identity items from the local vault: passports, ID cards, identities, driver's licenses, social security IDs, and tax numbers (fiscal statements).Why
These item types are already synced into the local vault by
dcli syncand decrypt with the existing crypto path — but there was no command to display them. Todaypassword,note, andsecretare the only personal-data readers, so passports/IDs/tax-numbers are invisible from the CLI even though the data is present locally. This closes that gap.How
The handler (
command-handlers/personalInfo.ts) mirrorssecureNotes.ts:transactionsof typesIDENTITY, PASSPORT, IDCARD, DRIVERLICENSE, SOCIALSECURITYID, FISCALSTATEMENTwithaction = 'BACKUP_EDIT'decryptTransactions(no crypto changes)KWDataItemfield dynamically — the item's root element name varies by type (KWPassport,KWIDCard,KWIdentity, …), so it's read generically rather than hard-coding fields. This keeps it robust across all personal-info types and any fields they carry.type(primary filter key) andkwTypeSupports
textandjsonoutput and the standard<param>=<value>filter syntax, consistent with the other read commands.Notes
types.ts(PersonalInfoTransactionContent,VaultId) following the existingSecureNote/Secretpattern.documentation/pages/personal/vault.mdx.yarn lintclean;yarn buildsucceeds; verified end-to-end against a real vault (passport / ID card / identity / fiscal-statement items returned and decrypted correctly in both output modes).