@agent-inspect/redact 3.5.0 → 3.5.2
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.
- package/README.md +65 -0
- package/package.json +3 -2
package/README.md
ADDED
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
# @agent-inspect/redact
|
|
2
|
+
|
|
3
|
+
Deterministic JSON/trace redaction with local, share, and strict profiles.
|
|
4
|
+
|
|
5
|
+
## When to use
|
|
6
|
+
|
|
7
|
+
- Before attaching traces to issues, Slack, or PRs
|
|
8
|
+
- Redacting arbitrary JSON payloads (not only traces)
|
|
9
|
+
|
|
10
|
+
## When not to use
|
|
11
|
+
|
|
12
|
+
- Compliance certification (this is a helper, not a compliance engine)
|
|
13
|
+
- Automatic upload sanitization pipelines you do not control
|
|
14
|
+
|
|
15
|
+
## Install
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
npm install @agent-inspect/redact
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
## Example
|
|
22
|
+
|
|
23
|
+
```ts
|
|
24
|
+
import { redact } from "@agent-inspect/redact";
|
|
25
|
+
|
|
26
|
+
const result = redact(
|
|
27
|
+
{ apiKey: "sk-secret", message: "hello" },
|
|
28
|
+
{ profile: "share" },
|
|
29
|
+
);
|
|
30
|
+
console.log(result.value, result.findings);
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
## Privacy
|
|
34
|
+
|
|
35
|
+
- Pure local transformation; no network
|
|
36
|
+
- Profiles: `local` · `share` · `strict`
|
|
37
|
+
|
|
38
|
+
## API
|
|
39
|
+
|
|
40
|
+
| Export | Purpose |
|
|
41
|
+
| ------ | ------- |
|
|
42
|
+
| `redact` | Redact arbitrary data |
|
|
43
|
+
| `createRedactor` | Reusable redactor |
|
|
44
|
+
| `RedactionProfile` | Profile type |
|
|
45
|
+
|
|
46
|
+
## CLI
|
|
47
|
+
|
|
48
|
+
`npx agent-inspect redact` · `scan` · `verify-safe`
|
|
49
|
+
|
|
50
|
+
## Docs
|
|
51
|
+
|
|
52
|
+
- [Safe trace sharing](https://github.com/rajudandigam/agent-inspect/blob/main/docs/SAFE-TRACE-SHARING.md)
|
|
53
|
+
|
|
54
|
+
## Troubleshooting
|
|
55
|
+
|
|
56
|
+
- **Still sensitive keys:** Use `strict` profile or custom detectors
|
|
57
|
+
- **Large files:** Redact copies; keep originals local
|
|
58
|
+
|
|
59
|
+
## Version
|
|
60
|
+
|
|
61
|
+
`3.5.x`
|
|
62
|
+
|
|
63
|
+
## License
|
|
64
|
+
|
|
65
|
+
MIT
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agent-inspect/redact",
|
|
3
|
-
"version": "3.5.
|
|
3
|
+
"version": "3.5.2",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"description": "Reusable deterministic redaction utilities for local AgentInspect workflows",
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
"bugs": {
|
|
13
13
|
"url": "https://github.com/rajudandigam/agent-inspect/issues"
|
|
14
14
|
},
|
|
15
|
-
"homepage": "https://github.com/rajudandigam/agent-inspect
|
|
15
|
+
"homepage": "https://github.com/rajudandigam/agent-inspect/tree/main/packages/redact",
|
|
16
16
|
"sideEffects": false,
|
|
17
17
|
"main": "./dist/index.cjs",
|
|
18
18
|
"module": "./dist/index.mjs",
|
|
@@ -30,6 +30,7 @@
|
|
|
30
30
|
}
|
|
31
31
|
},
|
|
32
32
|
"files": [
|
|
33
|
+
"README.md",
|
|
33
34
|
"dist"
|
|
34
35
|
],
|
|
35
36
|
"publishConfig": {
|