Releases: Nano-Collective/prompt-scrubber
Releases · Nano-Collective/prompt-scrubber
Release list
v1.0.2
prompt-scrub v1.0.2
What's changed
Patch release — dev-dependency and CI maintenance only. No public-API or runtime changes.
@biomejs/biome—^2.5.1→^2.5.2(devDependency, via dependabot). Resolves the CLI/schema version warning at lint time (CLI2.5.3was reporting that the configured2.5.1schema was stale).ava—^5.3.1→^8.0.1(devDependency, via dependabot). Bumps the test-runner major; no test-suite changes were needed.knip—^6.23.0→^6.25.0(devDependency, via dependabot). No findings change.- GitHub Actions — bumps via dependabot:
actions/checkout4→7pnpm/action-setup4→6actions/setup-node4→6actions/github-script7→9
Installation
npm install -g @nanocollective/prompt-scrubCLI usage
# Inspect a prompt before sending (recommended first step)
echo "My email is alice@example.com" | prompt-scrub inspect
# Scrub a prompt
echo "My email is alice@example.com" | prompt-scrub scrub
# Rehydrate a response
echo "Contact Email_1 for details." | prompt-scrub rehydrate --session-id <id>Library usage
import { scrub, rehydrate } from "@nanocollective/prompt-scrub";
const { scrubbedContent, sessionId } = scrub({ content: prompt });
// send scrubbedContent to LLM...
const { content } = rehydrate({ content: response, sessionId });v1.0.1
prompt-scrub v1.0.1
What's changed
Refactor to a stateless API and hardening for TUI/agent consumers (e.g. nanocoder). Highlights:
- Stateless map-passing API —
scrub()andrehydrate()now accept an optionalsessionMap, andscrub()returns the placeholder→value map. Callers can drive the whole scrub/rehydrate lifecycle from an in-memory map with no hidden global disk state and no session-id lifecycle. The existing session-id/on-disk mode still works. The providedsessionMapis mutated in place (and returned asresult.sessionMap, the same reference), so callers may rely on either. - New placeholder format — placeholders are now delimited as
«Email_1»instead ofEmail_1, to avoid collisions with genuine code identifiers a model might emit and to survive model reproduction more reliably. Note: session maps written by 1.0.0 (bareEmail_1) will not rehydrate against 1.0.1-scrubbed content; callers using the stateless map API are unaffected. - No more library logging — removed all
console.warn/console.errorfrom session storage and rule-pack loading. A library writing to stdout/stderr corrupts Ink/TUI rendering in consumers; failures are now handled silently (best-effort) or surfaced via return values. - Removed
cwd-based config —loadConfig()no longer readsprocess.cwd()/package.jsonfor aprompt-scrubkey. Reading config from an arbitrary working directory was surprising and risky; global config (PROMPT_SCRUB_CONFIG_DIR) is unchanged. - Faster placeholder reuse — reverse (value→placeholder) lookup is now O(1) instead of a linear scan per finding.
- Packaging — added a
preparescript sofile:/git installs always build a freshdist(prevents consumers from linking a stale build). - Tests — session-storage tests are now hermetic on every platform (use
PROMPT_SCRUB_CONFIG_DIRrather thanXDG_CONFIG_HOME, which only isolates on Linux), so they no longer read or write the user's real config directory.
Installation
npm install -g @nanocollective/prompt-scrubCLI usage
# Inspect a prompt before sending (recommended first step)
echo "My email is alice@example.com" | prompt-scrub inspect
# Scrub a prompt
echo "My email is alice@example.com" | prompt-scrub scrub
# Rehydrate a response
echo "Contact Email_1 for details." | prompt-scrub rehydrate --session-id <id>Library usage
import { scrub, rehydrate } from "@nanocollective/prompt-scrub";
const { scrubbedContent, sessionId } = scrub({ content: prompt });
// send scrubbedContent to LLM...
const { content } = rehydrate({ content: response, sessionId });v1.0.0
prompt-scrub v1.0.0
What's changed
First public release of prompt-scrub — a local-first utility that strips identifying content out of prompts and messages before they reach a cloud LLM, and rehydrates the model's response back to the original values locally.
Installation
npm install -g @nanocollective/prompt-scrubCLI usage
# Inspect a prompt before sending (recommended first step)
echo "My email is alice@example.com" | prompt-scrub inspect
# Scrub a prompt
echo "My email is alice@example.com" | prompt-scrub scrub
# Rehydrate a response
echo "Contact Email_1 for details." | prompt-scrub rehydrate --session-id <id>Library usage
import { scrub, rehydrate } from "@nanocollective/prompt-scrub";
const { scrubbedContent, sessionId } = scrub({ content: prompt });
// send scrubbedContent to LLM...
const { content } = rehydrate({ content: response, sessionId });