llm-output-guard 1.11.1 → 1.11.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 +3 -1
- package/package.json +22 -2
package/README.md
CHANGED
|
@@ -32,7 +32,7 @@ Your retry layer watches for `429`, `5xx` and timeouts. It cannot see a model th
|
|
|
32
32
|
looped until `max_tokens`, returned `{}`, stopped mid-sentence, or answered in the
|
|
33
33
|
wrong language — because all of those arrive as a **successful request**.
|
|
34
34
|
|
|
35
|
-
This produces the signal that layer is missing. Zero dependencies, ~
|
|
35
|
+
This produces the signal that layer is missing. Zero dependencies, ~6 KB min+gzip,
|
|
36
36
|
synchronous, no network.
|
|
37
37
|
|
|
38
38
|
```bash
|
|
@@ -267,6 +267,8 @@ because only one of those is evidence.
|
|
|
267
267
|
## Design notes
|
|
268
268
|
|
|
269
269
|
- **Zero runtime dependencies**, enforced in CI. Node ≥ 18; works on edge, browser, Deno, Bun.
|
|
270
|
+
- **The size claim is a budget, not a memory.** `npm run size` bundles each entry, minifies and gzips it, and fails over budget — enforced in CI beside the zero-dependency check, because a number in prose is the cheapest thing in a repo to go stale.
|
|
271
|
+
- **Types resolve on old and new TypeScript alike.** Every subpath is listed in `typesVersions` as well as `exports`, so `moduleResolution: "node"` — still the default under `module: commonjs` — sees the adapters instead of only the root.
|
|
270
272
|
- **Pure and synchronous.** No network, no clock, no randomness — safe on a hot path, trivial to test.
|
|
271
273
|
- **Scores, not booleans.** Detectors report 0–1 and leave the threshold decision to you.
|
|
272
274
|
- **Abstains rather than guesses.** Samples too short to judge score 0.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "llm-output-guard",
|
|
3
|
-
"version": "1.11.
|
|
3
|
+
"version": "1.11.2",
|
|
4
4
|
"funding": {
|
|
5
5
|
"type": "github",
|
|
6
6
|
"url": "https://github.com/sponsors/edwinsatya"
|
|
@@ -23,6 +23,25 @@
|
|
|
23
23
|
"main": "./dist/index.cjs",
|
|
24
24
|
"module": "./dist/index.js",
|
|
25
25
|
"types": "./dist/index.d.ts",
|
|
26
|
+
"typesVersions": {
|
|
27
|
+
"*": {
|
|
28
|
+
"ai-sdk": [
|
|
29
|
+
"./dist/ai-sdk.d.ts"
|
|
30
|
+
],
|
|
31
|
+
"openai": [
|
|
32
|
+
"./dist/openai.d.ts"
|
|
33
|
+
],
|
|
34
|
+
"anthropic": [
|
|
35
|
+
"./dist/anthropic.d.ts"
|
|
36
|
+
],
|
|
37
|
+
"google": [
|
|
38
|
+
"./dist/google.d.ts"
|
|
39
|
+
],
|
|
40
|
+
"agent": [
|
|
41
|
+
"./dist/agent.d.ts"
|
|
42
|
+
]
|
|
43
|
+
}
|
|
44
|
+
},
|
|
26
45
|
"exports": {
|
|
27
46
|
".": {
|
|
28
47
|
"import": {
|
|
@@ -108,7 +127,8 @@
|
|
|
108
127
|
"provoke": "npm run build --silent && node scripts/generate-fixtures.mjs",
|
|
109
128
|
"playground": "npm run build --silent && node scripts/build-playground.mjs",
|
|
110
129
|
"prepublishOnly": "npm run typecheck && npm run test && npm run build && npm run playground",
|
|
111
|
-
"bench": "npm run build --silent && node scripts/bench.mjs"
|
|
130
|
+
"bench": "npm run build --silent && node scripts/bench.mjs",
|
|
131
|
+
"size": "npm run build --silent && node scripts/size.mjs"
|
|
112
132
|
},
|
|
113
133
|
"peerDependencies": {
|
|
114
134
|
"@anthropic-ai/sdk": ">=0.60.0 <1.0.0",
|