llm-entropy-filter 1.1.0 → 1.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/package.json CHANGED
@@ -1,9 +1,13 @@
1
1
  {
2
2
  "name": "llm-entropy-filter",
3
- "version": "1.1.0",
4
- "description": "Deterministic entropy-based pre-gate for LLM pipelines. ALLOW / WARN / BLOCK high-entropy inputs before expensive model calls.",
3
+ "version": "1.1.1",
4
+ "description": "Fast entropy and intent gate for LLM inputs (ALLOW/WARN/BLOCK). Reduces hallucinations, cost and spam before calling an LLM.",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",
7
+ "sideEffects": false,
8
+ "engines": {
9
+ "node": ">=18"
10
+ },
7
11
  "main": "./dist/index.cjs",
8
12
  "module": "./dist/index.js",
9
13
  "types": "./dist/index.d.ts",
@@ -26,10 +30,20 @@
26
30
  "import": "./integrations/langchain.mjs"
27
31
  },
28
32
  "./rulesets/default": {
29
- "import": "./rulesets/default.js"
33
+ "import": "./rulesets/default.json",
34
+ "require": "./rulesets/default.json"
30
35
  },
31
36
  "./rulesets/strict": {
32
- "import": "./rulesets/strict.js"
37
+ "import": "./rulesets/strict.json",
38
+ "require": "./rulesets/strict.json"
39
+ },
40
+ "./rulesets/public-api": {
41
+ "import": "./rulesets/public-api.json",
42
+ "require": "./rulesets/public-api.json"
43
+ },
44
+ "./rulesets/support": {
45
+ "import": "./rulesets/support.json",
46
+ "require": "./rulesets/support.json"
33
47
  }
34
48
  },
35
49
  "files": [
@@ -40,20 +54,44 @@
40
54
  "README.md",
41
55
  "CHANGELOG.md"
42
56
  ],
43
- "sideEffects": false,
44
- "engines": {
45
- "node": ">=18"
46
- },
47
57
  "scripts": {
48
- "build": "tsup src/index.ts --format esm,cjs --dts",
49
58
  "clean": "rimraf dist",
50
- "prepublishOnly": "npm run clean && npm run build",
51
- "bench:sms": "node bench/sms_benchmark.js",
52
- "bench:report": "node bench/generate_report.js"
59
+ "clean:dist": "rimraf dist",
60
+ "build": "tsup src/index.ts --format esm,cjs --dts",
61
+ "demo": "npm run build && node demo/demo.mjs",
62
+ "bench": "npm run build && node bench/benchmark.mjs",
63
+ "serve": "npm run build && node demo/server.mjs",
64
+ "prepublishOnly": "npm run clean:dist && npm run build"
53
65
  },
66
+ "repository": {
67
+ "type": "git",
68
+ "url": "git+https://github.com/rosatisoft/llm-entropy-filter.git"
69
+ },
70
+ "bugs": {
71
+ "url": "https://github.com/rosatisoft/llm-entropy-filter/issues"
72
+ },
73
+ "homepage": "https://github.com/rosatisoft/llm-entropy-filter#readme",
74
+ "keywords": [
75
+ "llm",
76
+ "ai",
77
+ "prompt-filter",
78
+ "input-validation",
79
+ "entropy",
80
+ "spam-detection",
81
+ "content-moderation",
82
+ "heuristics",
83
+ "guardrails",
84
+ "openai"
85
+ ],
54
86
  "devDependencies": {
55
- "rimraf": "^5.0.10",
56
- "tsup": "^8.0.1",
57
- "typescript": "^5.4.0"
87
+ "@types/express": "^5.0.6",
88
+ "@types/node": "^25.0.10",
89
+ "autocannon": "^8.0.0",
90
+ "express": "^5.2.1",
91
+ "minimist": "^1.2.8",
92
+ "openai": "^6.16.0",
93
+ "rimraf": "^6.0.1",
94
+ "tsup": "^8.5.1",
95
+ "typescript": "^5.9.3"
58
96
  }
59
97
  }
@@ -0,0 +1,2 @@
1
+ import rules from "./default.json" assert { type: "json" };
2
+ export default rules;
@@ -0,0 +1,2 @@
1
+ import rules from "./public-api.json" assert { type: "json" };
2
+ export default rules;
@@ -0,0 +1,2 @@
1
+ import rules from "./strict.json" assert { type: "json" };
2
+ export default rules;
@@ -0,0 +1,2 @@
1
+ import rules from "./support.json" assert { type: "json" };
2
+ export default rules;