Skip to content

feat: scrub captured calls on this machine before they are sent - #9

Merged
kbhatnagar1506 merged 2 commits into
mainfrom
feat/client-scrub
Oct 1, 2026
Merged

kbhatnagar1506 merged 2 commits into
mainfrom
feat/client-scrub

Conversation

@kbhatnagar1506

Copy link
Copy Markdown
Owner

What

With capture on, personal data in each captured call becomes keyed tokens (<email:3f9a1c2e>) on this machine, before anything is queued or sent:

  • covers emails, payment cards (Luhn), phone numbers, and values under card, phone or account keys;
  • tool arguments and results stored as JSON text are scrubbed field by field;
  • ids are left alone.

Same tokens as the server. The rules and token format are identical to AgentCompile's server and the other SDK, checked against shared vectors generated by the server's own scrubber (tests/data/scrub-vectors.json). The same value always gives the same token, so matching across a conversation still works.

The key stays on the machine: AGENTCOMPILE_SCRUB_KEY (share it across servers), else one created once in ~/.agentcompile/scrub.key, owner-only. Records are marked "scrubbed": true, and the server stores them without needing its own key.

Default: on with capture; turn it off with the scrub option. The README now has a Privacy section.

🤖 Generated with Claude Code

kbhatnagar1506 and others added 2 commits October 1, 2026 04:34
With capture on, emails, payment cards, phone numbers and account numbers in each call's
request and answer become keyed tokens (<email:3f9a1c2e>) before anything is queued or sent:
the same rules and token format as AgentCompile's server, checked against vectors generated by
the server's own scrubber, so the same value always gives the same token and matching still
works. Tool arguments and results stored as JSON text are scrubbed field by field; ids are
left alone. The key stays here: AGENTCOMPILE_SCRUB_KEY (share it across your servers), else
one created once in ~/.agentcompile/scrub.key (owner-only). On by default with capture;
wrap(..., scrub=False) sends calls as they are.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@kbhatnagar1506
kbhatnagar1506 merged commit 02b5678 into main Oct 1, 2026
5 checks passed
@kbhatnagar1506
kbhatnagar1506 deleted the feat/client-scrub branch October 1, 2026 08:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant