agent-sanitizer 2.14.1 → 2.14.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +16 -5
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -7,10 +7,23 @@ HTML, confusable glyphs, exfil-shaped URLs—that let an attacker smuggle a
7
7
  payload the operator can't see but the model still reads. Every layer is a
8
8
  deterministic transform you can unit-test with equality assertions.
9
9
 
10
+ **As a library:**
11
+
10
12
  ```sh
11
13
  npm install agent-sanitizer
12
14
  ```
13
15
 
16
+ **As a Claude Code plugin** — four hooks that put Layers 1–4 on the tool stream,
17
+ no `node_modules` and no build step:
18
+
19
+ ```
20
+ /plugin marketplace add AlexanderMattTurner/agent-sanitizer
21
+ /plugin install agent-sanitizer@agent-sanitizer
22
+ ```
23
+
24
+ See [Using it with Claude Code](#using-it-with-claude-code) for what each hook
25
+ covers and how to wire the hooks by hand instead.
26
+
14
27
  ## Quick start
15
28
 
16
29
  ```js
@@ -82,17 +95,15 @@ owns each message, and any value outside the enum makes `sanitizeText` **throw**
82
95
 
83
96
  ## Using it with Claude Code
84
97
 
85
- Four hooks put Layers 1–4 on the tool stream: tool input, tool output, user
86
- prompts, and a session-start scan of the instruction files.
98
+ The plugin installed above puts four hooks on the tool stream: tool input, tool
99
+ output, user prompts, and a session-start scan of the instruction files. It
100
+ needs only `python3` on PATH, for Layer 4.
87
101
 
88
102
  ```
89
103
  /plugin marketplace add AlexanderMattTurner/agent-sanitizer
90
104
  /plugin install agent-sanitizer@agent-sanitizer
91
105
  ```
92
106
 
93
- The plugin needs no `node_modules` and no build step — just `python3` on PATH
94
- for Layer 4.
95
-
96
107
  To wire them yourself instead, one entry dispatches all four modes on `--hook=`:
97
108
 
98
109
  ```jsonc
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agent-sanitizer",
3
- "version": "2.14.1",
3
+ "version": "2.14.3",
4
4
  "description": "Defend an agent against hidden-content injection: strip payload-capable invisible Unicode and ANSI, splice out human-invisible HTML, and flag data-exfil URLs in untrusted text before any model sees it.",
5
5
  "type": "module",
6
6
  "repository": {