agent-sanitizer 2.14.2 → 2.14.4

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 +15 -5
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -7,10 +7,22 @@ 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:**
17
+
18
+ ```
19
+ /plugin marketplace add AlexanderMattTurner/agent-sanitizer
20
+ /plugin install agent-sanitizer@agent-sanitizer
21
+ ```
22
+
23
+ See [Using it with Claude Code](#using-it-with-claude-code) for what each hook
24
+ covers and how to wire the hooks by hand instead.
25
+
14
26
  ## Quick start
15
27
 
16
28
  ```js
@@ -82,17 +94,15 @@ owns each message, and any value outside the enum makes `sanitizeText` **throw**
82
94
 
83
95
  ## Using it with Claude Code
84
96
 
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.
97
+ The plugin installed above puts four hooks on the tool stream: tool input, tool
98
+ output, user prompts, and a session-start scan of the instruction files. It
99
+ needs only `python3` on PATH, for Layer 4.
87
100
 
88
101
  ```
89
102
  /plugin marketplace add AlexanderMattTurner/agent-sanitizer
90
103
  /plugin install agent-sanitizer@agent-sanitizer
91
104
  ```
92
105
 
93
- The plugin needs no `node_modules` and no build step — just `python3` on PATH
94
- for Layer 4.
95
-
96
106
  To wire them yourself instead, one entry dispatches all four modes on `--hook=`:
97
107
 
98
108
  ```jsonc
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agent-sanitizer",
3
- "version": "2.14.2",
3
+ "version": "2.14.4",
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": {