Skip to content

Releases: Nano-Collective/prompt-scrubber

v1.0.2

Choose a tag to compare

@github-actions github-actions released this 09 Jul 22:11

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 (CLI 2.5.3 was reporting that the configured 2.5.1 schema 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/checkout 47
    • pnpm/action-setup 46
    • actions/setup-node 46
    • actions/github-script 79

Installation

npm install -g @nanocollective/prompt-scrub

CLI 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 });

Full changelog

v1.0.1

Choose a tag to compare

@github-actions github-actions released this 08 Jul 14:02

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 APIscrub() and rehydrate() now accept an optional sessionMap, and scrub() 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 provided sessionMap is mutated in place (and returned as result.sessionMap, the same reference), so callers may rely on either.
  • New placeholder format — placeholders are now delimited as «Email_1» instead of Email_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 (bare Email_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.error from 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 configloadConfig() no longer reads process.cwd()/package.json for a prompt-scrub key. 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 prepare script so file:/git installs always build a fresh dist (prevents consumers from linking a stale build).
  • Tests — session-storage tests are now hermetic on every platform (use PROMPT_SCRUB_CONFIG_DIR rather than XDG_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-scrub

CLI 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 });

Full changelog

v1.0.0

Choose a tag to compare

@github-actions github-actions released this 05 Jul 20:01

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-scrub

CLI 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 });

Full changelog