Repository navigation
Releases: falkenslab/pseudonym
Releases · falkenslab/pseudonym
Release list
v0.3.0
New features
- Plain JSON storage, without a key (opt-in).
configure({ storage: "plain" })orPSEUDONYM_STORAGE=plainkeeps the directory as a readabledirectory.json, with random aliases and the identifiers in clear, protected only by the folder's permissions. It's meant for setups where the system already protects the folder (a dedicated user account, a container, an encrypted disk). Encrypted storage stays the default, and nothing changes for existing folders: same aliases, same files. storageMode()says which storage is in use.pseudonym migrate --to plain|encryptedconverts a folder's directory to the other mode with the same aliases, keeping the original as a.bak. It asks you to type the mode to confirm (--yesin a script). Going to plain, people known only by an email or an institutional id can't come along: they get a new alias if they're met again.- A folder never switches mode by itself: if it holds the other mode's directory, every call fails with a
PseudonymErrorthat says what to do.
Documentation
- The documentation site is now in Spanish too (https://falkenslab.github.io/pseudonym/es/), and keeps one version, the latest.
- A new guide, Storage modes, explains each mode with labeled step-by-step diagrams, the real files it writes, and when to choose each one.
v0.2.1
Fix
- Accented letters were lost when text that isn't UTF-8 reached the CLI:
echo "librería" | pseudonym redactin Windows' cmd printedlibrer�a, and "ANSI" files did the same. The CLI now reads its input as bytes: UTF-8 when valid, otherwise the console's code page for piped text on Windows (850, 437…) and Windows-1252 for files, saying on stderr which one it used. The output is always UTF-8. (#12)
Documentation
- The README's links and logo are absolute, so they work on the package's npm page too.
No API change: aliases and directories from 0.2.0 work as they are.
v0.2.0
New: redaction for more data and more countries (#8)
redact()now always replaces payment cards (issuer prefix, length and Luhn) →[CARD_n], and IBANs of any country (registry length and mod 97) →[IBAN_n].- A
countriesoption chooses whose national ids and phones to look for:redact(text, { service, countries: ["US", "CA"] }). Default["ES"]. Supported, each checked with its check digit or issued ranges: Spain (DNI, NIE, phones, and now the Seguridad Social number), United States (SSN, ITIN, phones), Canada (SIN, phones), Germany (Steuer-ID, Personalausweis, Rentenversicherungsnummer, Krankenversichertennummer), Mexico (CURP), Chile (RUT), Argentina (CUIL/CUIT), Brazil (CPF) and Portugal (NIF). Values without a check digit are left out on purpose. - New exports:
COUNTRIES,Country,RedactOptions.Redacted.replacedgainscards.
New: the CLI covers the library without code (#9, #10, #11)
pseudonym redact [--service] [--countries] [file]: a text safe to paste into a chat with a model.pseudonym reveal [--with-alias] [file]: a model's answer with the names back.pseudonym remember: one person's alias, or a whole CSV in one go (--only-aliasesdrops names and identifiers so the result can go to a model).pseudonym resolve <alias>: the service's id behind an alias.pseudonym services: the services in the directory.pseudonym forget --service <service>andforget --all: forget a closed course, or everyone, after a confirmation.- A default service for every command:
--service, elsePSEUDONYM_SERVICE, elsedefault.aliasesno longer requires--service.
Behavior change
- With the default countries,
redact()now also replaces payment cards and non-Spanish IBANs it used to leave as they were. Aliases and directories from 0.1.x work as they are.
Documentation
- New pages: Redacting and revealing text, Using the library without code, and the per-country tables in Redacting free text. The GDPR page now explains what the regulation is and links every article it cites.
v0.1.1
Fix
- Two programs using the library for the first time at the same moment could make one of them fail with a false "The key in … is missing, but one was used there before" error, although the key had just been created and nothing was lost. The library now re-reads the key before refusing. (#7)
Documentation
- A documentation site: https://falkenslab.github.io/pseudonym/ — guides, the CLI, security and privacy (including tested Claude Code deny rules and their limits), and the API reference. (#6)
- A complete example,
examples/classroom-mcp: an MCP server over a made-up course that talks about students by alias. (#5)
No API change: aliases and directories from 0.1.0 work as they are.
v0.1.0
First release. Stable aliases for people, for programs that send data about them to a language model.
Library
remember(person | people): a stable alias per person and service (A-+ 6 Crockford base32 characters), from an HMAC of their strongest identifier under a local key. Kept in an encrypted local directory, so a person keeps their first alias when an identifier changes; per-service by default, one alias across services withlink: true.resolve(alias, { service }): the service's user id back, for write tools.redact(text, { service }): the directory's people replaced by their aliases, and emails, Spanish phones, DNI, NIE and ES IBANs (with check digits) by placeholders. Addresses, birth dates and people outside the directory are not detected.keyFingerprint()andPseudonymError.
CLI, for the person in charge only: whois, alias, aliases, link, forget, prune, key fingerprint | export | import.
No runtime dependencies; Node.js 20 or later. It's pseudonymization, not anonymization: see the README for what it doesn't protect against and how to keep agents away from the key.