Skip to content

Releases: falkenslab/pseudonym

v0.3.0

Choose a tag to compare

@fvarrui fvarrui released this 27 Oct 21:00

New features

  • Plain JSON storage, without a key (opt-in). configure({ storage: "plain" }) or PSEUDONYM_STORAGE=plain keeps the directory as a readable directory.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|encrypted converts 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 (--yes in 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 PseudonymError that says what to do.

Documentation

v0.2.1

Choose a tag to compare

@fvarrui fvarrui released this 10 Oct 00:49

Fix

  • Accented letters were lost when text that isn't UTF-8 reached the CLI: echo "librería" | pseudonym redact in Windows' cmd printed librer�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

Choose a tag to compare

@fvarrui fvarrui released this 10 Oct 00:08

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 countries option 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.replaced gains cards.

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-aliases drops 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> and forget --all: forget a closed course, or everyone, after a confirmation.
  • A default service for every command: --service, else PSEUDONYM_SERVICE, else default. aliases no 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

v0.1.1

Choose a tag to compare

@fvarrui fvarrui released this 09 Oct 22:25

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

No API change: aliases and directories from 0.1.0 work as they are.

v0.1.0

Choose a tag to compare

@fvarrui fvarrui released this 09 Oct 20:24

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 with link: 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() and PseudonymError.

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.