@waswrongassembled/pii-shield 0.0.0-stage → 0.1.1
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/CHANGELOG.md +38 -0
- package/LICENSE +22 -0
- package/README.md +276 -2
- package/dist/ai-sdk/index.d.ts +19 -0
- package/dist/ai-sdk/index.js +30 -0
- package/dist/ai-sdk/middleware.d.ts +63 -0
- package/dist/ai-sdk/middleware.js +388 -0
- package/dist/bin.d.ts +2 -0
- package/dist/bin.js +9 -0
- package/dist/cli.d.ts +2 -0
- package/dist/cli.js +124 -0
- package/dist/detector.d.ts +28 -0
- package/dist/detector.js +3 -0
- package/dist/detectors/at-svnr.d.ts +14 -0
- package/dist/detectors/at-svnr.js +31 -0
- package/dist/detectors/authority-context.d.ts +22 -0
- package/dist/detectors/authority-context.js +278 -0
- package/dist/detectors/birth-date.d.ts +10 -0
- package/dist/detectors/birth-date.js +21 -0
- package/dist/detectors/email.d.ts +15 -0
- package/dist/detectors/email.js +29 -0
- package/dist/detectors/file-number.d.ts +16 -0
- package/dist/detectors/file-number.js +20 -0
- package/dist/detectors/iban.d.ts +10 -0
- package/dist/detectors/iban.js +41 -0
- package/dist/detectors/license-plate.d.ts +9 -0
- package/dist/detectors/license-plate.js +13 -0
- package/dist/detectors/phone.d.ts +13 -0
- package/dist/detectors/phone.js +38 -0
- package/dist/detectors/postal-address.d.ts +14 -0
- package/dist/detectors/postal-address.js +19 -0
- package/dist/detectors/salutation-person.d.ts +18 -0
- package/dist/detectors/salutation-person.js +37 -0
- package/dist/detectors/tax-number.d.ts +14 -0
- package/dist/detectors/tax-number.js +33 -0
- package/dist/entity-extractor.d.ts +47 -0
- package/dist/entity-extractor.js +245 -0
- package/dist/entity-type.d.ts +24 -0
- package/dist/entity-type.js +26 -0
- package/dist/entity.d.ts +28 -0
- package/dist/entity.js +11 -0
- package/dist/errors.d.ts +48 -0
- package/dist/errors.js +49 -0
- package/dist/index.d.ts +42 -0
- package/dist/index.js +40 -0
- package/dist/internal/pcre.d.ts +55 -0
- package/dist/internal/pcre.js +102 -0
- package/dist/internal/php-json.d.ts +15 -0
- package/dist/internal/php-json.js +48 -0
- package/dist/internal/placeholder-stream.d.ts +24 -0
- package/dist/internal/placeholder-stream.js +118 -0
- package/dist/internal/text-spans.d.ts +8 -0
- package/dist/internal/text-spans.js +15 -0
- package/dist/learning/char-set.d.ts +29 -0
- package/dist/learning/char-set.js +158 -0
- package/dist/learning/custom-entity-detector.d.ts +26 -0
- package/dist/learning/custom-entity-detector.js +70 -0
- package/dist/learning/custom-entity-type.d.ts +49 -0
- package/dist/learning/custom-entity-type.js +150 -0
- package/dist/learning/entity-learner.d.ts +50 -0
- package/dist/learning/entity-learner.js +87 -0
- package/dist/learning/json-file-store.d.ts +36 -0
- package/dist/learning/json-file-store.js +132 -0
- package/dist/learning/learned-pattern.d.ts +48 -0
- package/dist/learning/learned-pattern.js +640 -0
- package/dist/learning/pattern-grammar.d.ts +12 -0
- package/dist/learning/pattern-grammar.js +148 -0
- package/dist/learning/pattern-learner.d.ts +10 -0
- package/dist/learning/pattern-learner.js +116 -0
- package/dist/learning/store.d.ts +51 -0
- package/dist/learning/store.js +84 -0
- package/dist/masking/partial-mask.d.ts +23 -0
- package/dist/masking/partial-mask.js +43 -0
- package/dist/masking/strategy.d.ts +10 -0
- package/dist/masking/strategy.js +1 -0
- package/dist/masking/type-label-mask.d.ts +17 -0
- package/dist/masking/type-label-mask.js +28 -0
- package/dist/mcp/index.d.ts +33 -0
- package/dist/mcp/index.js +146 -0
- package/dist/mcp/tools.d.ts +63 -0
- package/dist/mcp/tools.js +183 -0
- package/dist/model/chunks.d.ts +13 -0
- package/dist/model/chunks.js +74 -0
- package/dist/model/model-detector.d.ts +110 -0
- package/dist/model/model-detector.js +420 -0
- package/dist/model/prompt.d.ts +16 -0
- package/dist/model/prompt.js +192 -0
- package/dist/pii-masker.d.ts +27 -0
- package/dist/pii-masker.js +56 -0
- package/dist/pii-shield.d.ts +40 -0
- package/dist/pii-shield.js +142 -0
- package/dist/placeholder.d.ts +48 -0
- package/dist/placeholder.js +138 -0
- package/dist/redaction.d.ts +76 -0
- package/dist/redaction.js +52 -0
- package/dist/server/config.d.ts +23 -0
- package/dist/server/config.js +187 -0
- package/dist/server/http-server.d.ts +63 -0
- package/dist/server/http-server.js +241 -0
- package/dist/server/index.d.ts +9 -0
- package/dist/server/index.js +9 -0
- package/dist/server/model-providers.d.ts +31 -0
- package/dist/server/model-providers.js +158 -0
- package/dist/service/json-body.d.ts +14 -0
- package/dist/service/json-body.js +35 -0
- package/dist/service/local-peer.d.ts +16 -0
- package/dist/service/local-peer.js +83 -0
- package/dist/service/service-api.d.ts +75 -0
- package/dist/service/service-api.js +305 -0
- package/dist/validators/at-svnr.d.ts +8 -0
- package/dist/validators/at-svnr.js +21 -0
- package/dist/validators/de-tax-id.d.ts +8 -0
- package/dist/validators/de-tax-id.js +35 -0
- package/dist/validators/iban.d.ts +5 -0
- package/dist/validators/iban.js +24 -0
- package/dist/vault/encrypted-vault.d.ts +37 -0
- package/dist/vault/encrypted-vault.js +152 -0
- package/dist/vault/in-memory-vault.d.ts +17 -0
- package/dist/vault/in-memory-vault.js +39 -0
- package/dist/vault/memory-vault-storage.d.ts +16 -0
- package/dist/vault/memory-vault-storage.js +37 -0
- package/dist/vault/vault.d.ts +38 -0
- package/dist/vault/vault.js +16 -0
- package/dist/vault-redis/index.d.ts +28 -0
- package/dist/vault-redis/index.js +33 -0
- package/docs/openapi.yaml +422 -0
- package/package.json +122 -4
package/package.json
CHANGED
|
@@ -1,6 +1,124 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@waswrongassembled/pii-shield",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
|
|
3
|
+
"version": "0.1.1",
|
|
4
|
+
"description": "Reversible PII redaction for LLM applications with DACH recognizers (AT SVNR, IBAN, tax numbers) and checksum validation. Wire-compatible port of clarifile/pii-shield.",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"author": {
|
|
7
|
+
"name": "waswrongassembled",
|
|
8
|
+
"url": "https://github.com/waswrongassembled"
|
|
9
|
+
},
|
|
10
|
+
"type": "module",
|
|
11
|
+
"keywords": [
|
|
12
|
+
"pii",
|
|
13
|
+
"gdpr",
|
|
14
|
+
"dsgvo",
|
|
15
|
+
"redaction",
|
|
16
|
+
"anonymization",
|
|
17
|
+
"pseudonymization",
|
|
18
|
+
"privacy",
|
|
19
|
+
"llm",
|
|
20
|
+
"ai-sdk",
|
|
21
|
+
"mcp",
|
|
22
|
+
"iban",
|
|
23
|
+
"dach"
|
|
24
|
+
],
|
|
25
|
+
"repository": {
|
|
26
|
+
"type": "git",
|
|
27
|
+
"url": "git+https://github.com/waswrongassembled/pii-shield-js.git"
|
|
28
|
+
},
|
|
29
|
+
"homepage": "https://github.com/waswrongassembled/pii-shield-js#readme",
|
|
30
|
+
"bugs": {
|
|
31
|
+
"url": "https://github.com/waswrongassembled/pii-shield-js/issues"
|
|
32
|
+
},
|
|
33
|
+
"engines": {
|
|
34
|
+
"node": ">=22.12"
|
|
35
|
+
},
|
|
36
|
+
"exports": {
|
|
37
|
+
".": {
|
|
38
|
+
"types": "./dist/index.d.ts",
|
|
39
|
+
"default": "./dist/index.js"
|
|
40
|
+
},
|
|
41
|
+
"./vault-redis": {
|
|
42
|
+
"types": "./dist/vault-redis/index.d.ts",
|
|
43
|
+
"default": "./dist/vault-redis/index.js"
|
|
44
|
+
},
|
|
45
|
+
"./ai-sdk": {
|
|
46
|
+
"types": "./dist/ai-sdk/index.d.ts",
|
|
47
|
+
"default": "./dist/ai-sdk/index.js"
|
|
48
|
+
},
|
|
49
|
+
"./server": {
|
|
50
|
+
"types": "./dist/server/index.d.ts",
|
|
51
|
+
"default": "./dist/server/index.js"
|
|
52
|
+
},
|
|
53
|
+
"./mcp": {
|
|
54
|
+
"types": "./dist/mcp/index.d.ts",
|
|
55
|
+
"default": "./dist/mcp/index.js"
|
|
56
|
+
},
|
|
57
|
+
"./package.json": "./package.json"
|
|
58
|
+
},
|
|
59
|
+
"bin": {
|
|
60
|
+
"pii-shield": "dist/bin.js"
|
|
61
|
+
},
|
|
62
|
+
"files": [
|
|
63
|
+
"dist",
|
|
64
|
+
"docs/openapi.yaml",
|
|
65
|
+
"CHANGELOG.md"
|
|
66
|
+
],
|
|
67
|
+
"sideEffects": false,
|
|
68
|
+
"publishConfig": {
|
|
69
|
+
"access": "public",
|
|
70
|
+
"provenance": true
|
|
71
|
+
},
|
|
72
|
+
"scripts": {
|
|
73
|
+
"build": "rm -rf dist && tsc -p tsconfig.build.json && node -e \"fs.chmodSync('dist/bin.js', 0o755)\"",
|
|
74
|
+
"typecheck": "tsc --noEmit",
|
|
75
|
+
"lint": "eslint . && prettier --check .",
|
|
76
|
+
"format": "prettier --write .",
|
|
77
|
+
"test": "vitest run",
|
|
78
|
+
"test:watch": "vitest",
|
|
79
|
+
"check:package": "npm run build && publint --strict && attw --pack . --profile esm-only",
|
|
80
|
+
"test:package": "npm run build && node scripts/test-package.js",
|
|
81
|
+
"fixtures": "php compat/export-fixtures.php",
|
|
82
|
+
"check": "npm run typecheck && npm run lint && npm run test && npm run build",
|
|
83
|
+
"compat:vault": "npm run build && node compat/export-node-payloads.js",
|
|
84
|
+
"prepublishOnly": "npm run build"
|
|
85
|
+
},
|
|
86
|
+
"devDependencies": {
|
|
87
|
+
"@arethetypeswrong/cli": "^0.18.5",
|
|
88
|
+
"@eslint/js": "^10.0.1",
|
|
89
|
+
"@modelcontextprotocol/sdk": "^1.32.2",
|
|
90
|
+
"@types/node": "^22.20.5",
|
|
91
|
+
"@vitest/coverage-v8": "^5.1.1",
|
|
92
|
+
"ai": "^7.0.177",
|
|
93
|
+
"ajv": "^8.20.0",
|
|
94
|
+
"eslint": "^10.15.0",
|
|
95
|
+
"eslint-config-prettier": "^10.1.8",
|
|
96
|
+
"globals": "^17.14.0",
|
|
97
|
+
"ioredis": "^6.0.0",
|
|
98
|
+
"prettier": "^3.10.1",
|
|
99
|
+
"publint": "^0.3.25",
|
|
100
|
+
"typescript": "~6.0.3",
|
|
101
|
+
"typescript-eslint": "^8.73.0",
|
|
102
|
+
"vitest": "^5.1.1",
|
|
103
|
+
"yaml": "^2.9.1"
|
|
104
|
+
},
|
|
105
|
+
"dependencies": {
|
|
106
|
+
"@noble/ciphers": "^2.4.0"
|
|
107
|
+
},
|
|
108
|
+
"peerDependencies": {
|
|
109
|
+
"@modelcontextprotocol/sdk": "^1.32.0",
|
|
110
|
+
"ai": "^7.0.0",
|
|
111
|
+
"ioredis": "^5.0.0 || ^6.0.0"
|
|
112
|
+
},
|
|
113
|
+
"peerDependenciesMeta": {
|
|
114
|
+
"@modelcontextprotocol/sdk": {
|
|
115
|
+
"optional": true
|
|
116
|
+
},
|
|
117
|
+
"ai": {
|
|
118
|
+
"optional": true
|
|
119
|
+
},
|
|
120
|
+
"ioredis": {
|
|
121
|
+
"optional": true
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
}
|