- response_format is omitted by default (Infomaniak rejects the legacy
json_object → HTTP 422); opt in via the new `responseFormat` option
({type:'json_object'} or a json_schema object). BREAKING for endpoints
that relied on the forced json_object.
- parse LLM JSON leniently (tolerate markdown fences / surrounding prose)
- fold strict-coherence rules into DEFAULT_SYSTEM_PROMPT (exact
placeholder<->mapping-key identity, values are originals, strict format,
mask value not adjacent label) → reliable output across models
Verified live against Gemma 4 (google/gemma-4-31B-it, Infomaniak v2): all
demo phrases anonymize with clean round-trips, no custom provider needed.
36 tests passing.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
73 lines
1.8 KiB
JSON
73 lines
1.8 KiB
JSON
{
|
|
"name": "@mobiletic/anonymizer",
|
|
"version": "0.3.0",
|
|
"description": "Framework-agnostic PII anonymization & pseudonymization: pluggable LLM detection for free-form PII (names, addresses) with a deterministic regex fallback, deterministic coreference, and streaming-safe de-anonymization.",
|
|
"license": "MIT",
|
|
"author": "Mobiletic",
|
|
"homepage": "https://git.mobiletic.net/mobiletic/anonymizer#readme",
|
|
"repository": {
|
|
"type": "git",
|
|
"url": "git+https://git.mobiletic.net/mobiletic/anonymizer.git"
|
|
},
|
|
"bugs": {
|
|
"url": "https://git.mobiletic.net/mobiletic/anonymizer/issues"
|
|
},
|
|
"keywords": [
|
|
"anonymization",
|
|
"pseudonymization",
|
|
"pii",
|
|
"redaction",
|
|
"privacy",
|
|
"gdpr",
|
|
"nlpd",
|
|
"llm",
|
|
"data-protection"
|
|
],
|
|
"type": "module",
|
|
"main": "./dist/index.cjs",
|
|
"module": "./dist/index.js",
|
|
"types": "./dist/index.d.ts",
|
|
"exports": {
|
|
".": {
|
|
"types": "./dist/index.d.ts",
|
|
"import": "./dist/index.js",
|
|
"require": "./dist/index.cjs"
|
|
}
|
|
},
|
|
"files": [
|
|
"dist",
|
|
"README.md",
|
|
"LICENSE"
|
|
],
|
|
"engines": {
|
|
"node": ">=18"
|
|
},
|
|
"scripts": {
|
|
"build": "tsup",
|
|
"test": "vitest run",
|
|
"test:watch": "vitest",
|
|
"test:coverage": "vitest run --coverage",
|
|
"typecheck": "tsc --noEmit",
|
|
"lint": "eslint .",
|
|
"format": "prettier --write .",
|
|
"format:check": "prettier --check .",
|
|
"prepublishOnly": "npm run build"
|
|
},
|
|
"devDependencies": {
|
|
"@eslint/js": "^9.0.0",
|
|
"@vitest/coverage-v8": "^1.6.0",
|
|
"eslint": "^9.0.0",
|
|
"eslint-config-prettier": "^9.1.0",
|
|
"prettier": "^3.2.0",
|
|
"tsup": "^8.0.0",
|
|
"typescript": "^5.4.0",
|
|
"typescript-eslint": "^8.0.0",
|
|
"vitest": "^1.6.0"
|
|
},
|
|
"publishConfig": {
|
|
"access": "public",
|
|
"provenance": true
|
|
},
|
|
"sideEffects": false
|
|
}
|