@evalguard/langchain 1.0.2 → 1.0.3
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 +51 -0
- package/README.md +96 -9
- package/dist/index.d.ts +85 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +252 -55
- package/dist/index.js.map +1 -1
- package/package.json +3 -2
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
# @evalguard/langchain
|
|
2
|
+
|
|
3
|
+
This package wraps LangChain and routes every `checkInput` / `scoreOutput`
|
|
4
|
+
call through one shared transport, `@evalguard/wrapper-core`'s
|
|
5
|
+
`fetchWithTimeout`. A defect in that transport is a defect here.
|
|
6
|
+
|
|
7
|
+
## 1.0.3 — unreleased
|
|
8
|
+
|
|
9
|
+
### Security — a redirect defeated the guardrail verdict
|
|
10
|
+
|
|
11
|
+
**Affects every published version up to and including `1.0.2`.**
|
|
12
|
+
|
|
13
|
+
`fetchWithTimeout` called `fetch` with no redirect posture, and WHATWG/undici
|
|
14
|
+
default to `redirect: "follow"` — so an omitted option is not neutral, it is
|
|
15
|
+
the vulnerable setting.
|
|
16
|
+
|
|
17
|
+
A `3xx` served on the API path rewrote the request to a bodyless `GET`
|
|
18
|
+
(`301`/`302`/`303`), which means the prompt or completion you asked EvalGuard
|
|
19
|
+
to screen **was never transmitted**. The redirect target's
|
|
20
|
+
`{"blocked": false}` came back as an authoritative clean verdict on text it had
|
|
21
|
+
never seen, and the wrapper — sitting on the hot path of your request handler —
|
|
22
|
+
allowed it through. On `307`/`308` the body survives instead, so the text under
|
|
23
|
+
inspection is re-POSTed verbatim to whatever host the redirect names.
|
|
24
|
+
|
|
25
|
+
The existing reply validation could not catch it. It checks the *shape* of a
|
|
26
|
+
verdict, and a redirected reply is perfectly well shaped: a well-formed verdict
|
|
27
|
+
about nothing. `assertSecureBaseUrl` validates hop 0 only.
|
|
28
|
+
|
|
29
|
+
**This needs no attacker.** An ordinary infrastructure redirect on the API path
|
|
30
|
+
— an nginx trailing-slash rule, a load balancer, a corporate proxy, a proxy in
|
|
31
|
+
front of a self-hosted deployment — silently converts every guardrail check
|
|
32
|
+
behind it into an ALLOW.
|
|
33
|
+
|
|
34
|
+
Fixed in `@evalguard/wrapper-core@1.3.0`, which sets `redirect: "error"` on
|
|
35
|
+
that transport so the call fails **closed**.
|
|
36
|
+
|
|
37
|
+
### How the fix reaches you
|
|
38
|
+
|
|
39
|
+
The published `@evalguard/langchain@1.0.2` declares
|
|
40
|
+
`"@evalguard/wrapper-core": "^1.2.0"`, so a **fresh** resolve would pick up
|
|
41
|
+
`wrapper-core@1.3.0` on its own. A lockfile will not: it holds you on
|
|
42
|
+
`1.2.0`, which is what most installs are actually running. Upgrading this
|
|
43
|
+
package to `1.0.3` is the reliable fix.
|
|
44
|
+
|
|
45
|
+
Full advisory, including the other thirteen affected artifacts:
|
|
46
|
+
`docs/security/advisory-2026-08-10-verdict-redirect-bypass.md` (SEC-051).
|
|
47
|
+
|
|
48
|
+
### Earlier releases
|
|
49
|
+
|
|
50
|
+
Recorded in the monorepo git history and in
|
|
51
|
+
`packages/NPM_PUBLISH_CHECKLIST.md`; this file starts here.
|
package/README.md
CHANGED
|
@@ -11,7 +11,8 @@ Adds **real-time firewall (2.57ms p95), 200+ eval scorers, 300+ attack plugins,
|
|
|
11
11
|
## Why this exists
|
|
12
12
|
|
|
13
13
|
LangChain users already have observability via LangSmith. This package adds the surface LangSmith doesn't ship:
|
|
14
|
-
- Real-time input
|
|
14
|
+
- Real-time **input** guardrail enforcement (block prompt injection, jailbreaks, and secret-bearing prompts in the hot path, before the model call)
|
|
15
|
+
- An **opt-in output rail** (`evalOnResponse`) that scores the model's completion and blocks it — see [Output rail](#output-rail-evalonresponse) for exactly what "blocks" means on `invoke` versus `stream`
|
|
15
16
|
- 300+ plugin adaptive red teaming (run on demand from the dashboard against your chain)
|
|
16
17
|
- 50 compliance frameworks (EU AI Act Annex IV, ISO 42001 SoA, SOC 2 evidence collector)
|
|
17
18
|
- Vendor-neutral routing across [90+ first-party LLM providers](https://evalguard.ai/docs/providers) + 800+ via aggregators (OpenRouter / LiteLLM / CometAPI)
|
|
@@ -187,9 +188,11 @@ the same `handler` covers its LLM span too.</sub>
|
|
|
187
188
|
| `apiKey` | required | Your EvalGuard API key. |
|
|
188
189
|
| `projectId` | none | Tags every trace with a project. Visible in the dashboard. |
|
|
189
190
|
| `baseUrl` | `https://evalguard.ai/api/v1` | Override for self-hosted deployments. |
|
|
190
|
-
| `blockOnViolation` | `true` | When `true`, guardrail violations throw `EvalguardBlockedError` and abort the LangChain run. When `false`, violations are logged but the call proceeds. |
|
|
191
|
-
| `disableLogging` | `false` | Skip trace logging entirely (
|
|
192
|
-
| `disableGuardrails` | `false` | Skip pre-call firewall
|
|
191
|
+
| `blockOnViolation` | `true` | When `true`, guardrail violations throw `EvalguardBlockedError` and abort the LangChain run. When `false`, violations are logged but the call proceeds. Governs **both** rails. |
|
|
192
|
+
| `disableLogging` | `false` | Skip trace logging entirely (both rails still run). |
|
|
193
|
+
| `disableGuardrails` | `false` | Skip the **pre-call** firewall — the input rail only; tracing and `evalOnResponse` are unaffected. Setting this **and** `blockOnViolation: true` **and no** `evalOnResponse` throws `EvalguardConfigError` at construction: with every rail off there is nothing to block on, and silently accepting the pair would leave you believing you are protected. `disableGuardrails` + `evalOnResponse` is a valid output-rail-only setup. |
|
|
194
|
+
| `evalOnResponse` | `undefined` (off) | Opt-in [output rail](#output-rail-evalonresponse). `true` uses the default scorers (`toxicity`, `pii_leak`); the object form takes `scorers`, `failOnScore`, `fireAndForget`. |
|
|
195
|
+
| `onOutputViolation` | none | Called with the `OutputScoreResult` when the output rail fails a completion. |
|
|
193
196
|
| `metadata` | `{}` | Free-form fields attached to every trace. |
|
|
194
197
|
|
|
195
198
|
### How blocking is actually enforced
|
|
@@ -215,10 +218,72 @@ Two consequences worth knowing:
|
|
|
215
218
|
degrades to `"unknown"`, and every trace-logging hook is contained, so a
|
|
216
219
|
logging failure never bubbles into your chain.
|
|
217
220
|
|
|
221
|
+
## Output rail (`evalOnResponse`)
|
|
222
|
+
|
|
223
|
+
The input rail cannot stop the *model* from emitting a secret or a customer's
|
|
224
|
+
PII. `evalOnResponse` scans the completion after the call, through the same
|
|
225
|
+
wrapper-core primitive (`POST /firewall/check` with `mode: "output"`) as
|
|
226
|
+
`@evalguard/openai`, `@evalguard/anthropic` and `@evalguard/gemini`.
|
|
227
|
+
|
|
228
|
+
It is **opt-in**. Left unset, no output scan happens and the handler behaves
|
|
229
|
+
exactly as it did in 1.0.2.
|
|
230
|
+
|
|
231
|
+
```ts
|
|
232
|
+
const handler = new EvalGuardCallbackHandler({
|
|
233
|
+
apiKey: process.env.EVALGUARD_API_KEY!,
|
|
234
|
+
evalOnResponse: true, // scorers: toxicity + pii_leak
|
|
235
|
+
// or: { scorers: ["pii_leak"], failOnScore: 0.9, fireAndForget: false }
|
|
236
|
+
onOutputViolation: (score) => log.warn(score),
|
|
237
|
+
});
|
|
238
|
+
```
|
|
239
|
+
|
|
240
|
+
**What "blocks" means depends on how you consume the completion — this
|
|
241
|
+
distinction is not cosmetic:**
|
|
242
|
+
|
|
243
|
+
| Call shape | Behaviour when the rail fails a completion |
|
|
244
|
+
|---|---|
|
|
245
|
+
| `invoke()`, `RunnableSequence`, LangGraph node | LangChain awaits `handleLLMEnd` before resolving, so `EvalguardBlockedError` is thrown and **the caller receives nothing**. A real block. |
|
|
246
|
+
| `stream()` | Tokens are handed to your loop as they arrive; `handleLLMEnd` runs after the last one. The rail scans and throws — terminating the iteration — but **the bytes already reached your code**. Detect-and-abort, not withholding. |
|
|
247
|
+
|
|
248
|
+
Measured on 2026-08-07 against a 127.0.0.1 stub firewall answering
|
|
249
|
+
`{ blocked: true }` on the output scan, with a fake model replying
|
|
250
|
+
`"sure: sk-proj-… and SSN 123-45-6789"`: `invoke` delivered nothing and raised
|
|
251
|
+
`EvalguardBlockedError`; `stream` delivered the full reply to the consuming
|
|
252
|
+
loop and *then* raised. If you stream to an end user, buffer the completion and
|
|
253
|
+
scan before you display it.
|
|
254
|
+
|
|
255
|
+
Three more properties worth knowing:
|
|
256
|
+
|
|
257
|
+
- **Every generation is scanned**, not just `generations[0][0]`. With `n > 1`
|
|
258
|
+
the extra candidates go back to the caller too, and a rail that reads only
|
|
259
|
+
the first hands the rest through unscanned.
|
|
260
|
+
- **No verdict is not a pass.** An outage, a 401, or a 200 whose body is not a
|
|
261
|
+
firewall verdict all yield "not scored" — with `blockOnViolation: true` (the
|
|
262
|
+
default) that fails **closed** with an `output_scan_unavailable` violation,
|
|
263
|
+
exactly like `guardrail_unavailable` on the input rail. A completion whose
|
|
264
|
+
bytes could not be read at all fails closed as `output_unreadable`.
|
|
265
|
+
- **`fireAndForget: true` never blocks.** The score is attached to the trace
|
|
266
|
+
and the response is not gated — that is the whole point of the mode. Don't
|
|
267
|
+
set it if you need enforcement.
|
|
268
|
+
|
|
269
|
+
With `blockOnViolation: false` the rail is monitor-only for output too: the
|
|
270
|
+
completion is delivered and the verdict is recorded on the trace
|
|
271
|
+
(`metadata.outputRail`).
|
|
272
|
+
|
|
273
|
+
<sub>History: through **1.0.2** this package had no output rail at all, while
|
|
274
|
+
the "Why this exists" bullet claimed "Real-time input + **output** guardrail
|
|
275
|
+
enforcement … (block … PII exfiltration …)". Measured against the published
|
|
276
|
+
1.0.2 bytes on 2026-08-06, a completion carrying an OpenAI key and an SSN was
|
|
277
|
+
delivered verbatim through both `model.invoke` and `model.stream` with exactly
|
|
278
|
+
one `/firewall/check` request (the input scan) and zero output scans. The claim
|
|
279
|
+
was retracted on 2026-08-06 and the rail implemented on 2026-08-07;
|
|
280
|
+
`src/__tests__/output-rail.test.ts` drives it end-to-end so the capability
|
|
281
|
+
cannot silently regress into a claim again.</sub>
|
|
282
|
+
|
|
218
283
|
## What's traced
|
|
219
284
|
|
|
220
285
|
Every LangChain run emits to EvalGuard with:
|
|
221
|
-
- **LLM spans** — input, output, model, latency, token usage, cost (priced via the same table as openai-wrapper / anthropic-wrapper)
|
|
286
|
+
- **LLM spans** — input, output, model, latency, token usage, cost (priced via the same table as openai-wrapper / anthropic-wrapper), plus `metadata.outputRail` (`disabled` / `passed` / `blocked` / `unavailable` / `unreadable` / `fire-and-forget`) and the `outputScore` when the rail produced one
|
|
222
287
|
- **Chain spans** — Runnable + LangGraph node entry/exit
|
|
223
288
|
- **Tool spans** — every `Tool.invoke` or LangGraph tool node
|
|
224
289
|
- **Agent actions** — chosen tool + input for each agent step
|
|
@@ -238,16 +303,38 @@ wrapper's behaviour depends on `blockOnViolation`:
|
|
|
238
303
|
|
|
239
304
|
| `blockOnViolation` | Guardrail unreachable | Real violation detected |
|
|
240
305
|
|---|---|---|
|
|
241
|
-
| `true` (**default**) | **Blocks** — throws `EvalguardBlockedError` with a `guardrail_unavailable` violation | Blocks — throws `EvalguardBlockedError` |
|
|
306
|
+
| `true` (**default**) | **Blocks** — throws `EvalguardBlockedError` with a `guardrail_unavailable` violation (input rail) or `output_scan_unavailable` (output rail) | Blocks — throws `EvalguardBlockedError` |
|
|
242
307
|
| `false` | Call proceeds, violation recorded on the trace | Call proceeds, violation recorded on the trace |
|
|
243
308
|
|
|
244
309
|
Trace logging always fails silently either way — a trace-log failure never
|
|
245
310
|
bubbles into your chain.
|
|
246
311
|
|
|
247
312
|
If you need availability-first behaviour, set `blockOnViolation: false`.
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
313
|
+
|
|
314
|
+
> Corrected 2026-08-07. This paragraph previously read: "The legacy global
|
|
315
|
+
> escape hatch `EVALGUARD_GUARDRAIL_FAIL_OPEN_LEGACY=1` restores
|
|
316
|
+
> pre-2026-05-28 fail-open for every wrapper in the process". **`=1` has not
|
|
317
|
+
> opened that hatch since 2026-08-03.** Verified by running the shipped
|
|
318
|
+
> handler with `EVALGUARD_GUARDRAIL_FAIL_OPEN_LEGACY=1` against a 500-ing stub
|
|
319
|
+
> firewall: the call still threw `EvalguardBlockedError`, and wrapper-core
|
|
320
|
+
> printed `"…its value does NOT open the legacy fail-open hatch, so guardrail
|
|
321
|
+
> outages FAIL CLOSED (the safe default)"` on stderr. A README that documents
|
|
322
|
+
> a bypass which no longer works is dangerous in both directions — an operator
|
|
323
|
+
> who set `=1` believes the guardrail is off when it is on, and one who wants
|
|
324
|
+
> the hatch cannot find the real switch.
|
|
325
|
+
|
|
326
|
+
The legacy process-wide escape hatch still exists, but it now requires the
|
|
327
|
+
explicit acknowledgement string:
|
|
328
|
+
|
|
329
|
+
```bash
|
|
330
|
+
EVALGUARD_GUARDRAIL_FAIL_OPEN_LEGACY=i-accept-unchecked-prompts-reaching-the-model
|
|
331
|
+
```
|
|
332
|
+
|
|
333
|
+
Any other value (including `1` and `true`) **fails closed** and prints a
|
|
334
|
+
one-time rejection notice on stderr. When the hatch is genuinely open, every
|
|
335
|
+
pass-through is logged. It restores pre-2026-05-28 fail-open for every EvalGuard
|
|
336
|
+
wrapper in the process and is not recommended — prefer per-integration
|
|
337
|
+
`blockOnViolation: false`.
|
|
251
338
|
|
|
252
339
|
Same contract as our `openai-wrapper`, `anthropic-wrapper`,
|
|
253
340
|
`gemini-wrapper`, `vercel-ai-wrapper`, and `llamaindex-wrapper`.
|
package/dist/index.d.ts
CHANGED
|
@@ -59,6 +59,7 @@
|
|
|
59
59
|
* LangSmith's per-node evaluator surface.
|
|
60
60
|
*/
|
|
61
61
|
import { type GuardrailCheckResult } from "./guardrail-client.js";
|
|
62
|
+
import { type EvalOnResponseConfig, type OutputScoreResult } from "@evalguard/wrapper-core";
|
|
62
63
|
/** Minimal LangChain message shape used in chat-model handler args. */
|
|
63
64
|
interface LangChainMessage {
|
|
64
65
|
content: string | unknown;
|
|
@@ -96,8 +97,45 @@ export interface EvalGuardHandlerConfig {
|
|
|
96
97
|
baseUrl?: string;
|
|
97
98
|
blockOnViolation?: boolean;
|
|
98
99
|
disableLogging?: boolean;
|
|
100
|
+
/**
|
|
101
|
+
* Skip the PRE-CALL firewall (the input rail). Tracing still runs.
|
|
102
|
+
*
|
|
103
|
+
* Scope is deliberately narrow: it does NOT turn off `evalOnResponse`. The
|
|
104
|
+
* two rails scan different bytes at different times and are enabled
|
|
105
|
+
* independently.
|
|
106
|
+
*/
|
|
99
107
|
disableGuardrails?: boolean;
|
|
100
108
|
metadata?: Record<string, unknown>;
|
|
109
|
+
/**
|
|
110
|
+
* OUTPUT rail — scan the model's completion after the call, before the
|
|
111
|
+
* caller sees it. Opt-in; `undefined`/`false` means no output scan happens
|
|
112
|
+
* (this handler shipped with no output rail at all through 1.0.2).
|
|
113
|
+
*
|
|
114
|
+
* `true` → default scorers (`toxicity`, `pii_leak`), block on a
|
|
115
|
+
* server `action:"block"`.
|
|
116
|
+
* `{ … }` → `scorers`, `failOnScore` (block when the composite score
|
|
117
|
+
* falls BELOW it), `fireAndForget` (score in the background,
|
|
118
|
+
* never gate the response).
|
|
119
|
+
*
|
|
120
|
+
* Enforcement depends on how LangChain delivers the completion, and the
|
|
121
|
+
* difference is not cosmetic:
|
|
122
|
+
*
|
|
123
|
+
* - `invoke()` / `RunnableSequence` — LangChain awaits `handleLLMEnd`
|
|
124
|
+
* before resolving, so a violation throws `EvalguardBlockedError` and the
|
|
125
|
+
* caller receives NOTHING. This is a real block.
|
|
126
|
+
* - `stream()` — tokens are handed to your loop as they arrive and
|
|
127
|
+
* `handleLLMEnd` only runs after the last one. The rail still scans and
|
|
128
|
+
* still throws (terminating the iteration), but the bytes already
|
|
129
|
+
* reached your code. Treat streaming as detect-and-abort, not as
|
|
130
|
+
* withholding.
|
|
131
|
+
*
|
|
132
|
+
* Same wrapper-core primitive (`evaluateOutput` → `POST /firewall/check`
|
|
133
|
+
* with `mode: "output"`) as `@evalguard/openai` / `@evalguard/anthropic` /
|
|
134
|
+
* `@evalguard/gemini`.
|
|
135
|
+
*/
|
|
136
|
+
evalOnResponse?: boolean | EvalOnResponseConfig;
|
|
137
|
+
/** Fired when the output rail fails a completion. */
|
|
138
|
+
onOutputViolation?: (score: OutputScoreResult) => void;
|
|
101
139
|
}
|
|
102
140
|
export declare class EvalguardBlockedError extends Error {
|
|
103
141
|
readonly violations: GuardrailCheckResult["violations"];
|
|
@@ -127,6 +165,10 @@ export declare class EvalGuardCallbackHandler {
|
|
|
127
165
|
private readonly blockOnViolation;
|
|
128
166
|
private readonly enableLogging;
|
|
129
167
|
private readonly enableGuardrails;
|
|
168
|
+
/** Config object handed to wrapper-core's shared eval-on-response helper. */
|
|
169
|
+
private readonly railConfig;
|
|
170
|
+
/** True when the OUTPUT rail is switched on (`evalOnResponse`). */
|
|
171
|
+
private readonly enableOutputRail;
|
|
130
172
|
constructor(config: EvalGuardHandlerConfig);
|
|
131
173
|
/**
|
|
132
174
|
* Called when an LLM (completion-style) starts. LangChain emits both
|
|
@@ -143,10 +185,51 @@ export declare class EvalGuardCallbackHandler {
|
|
|
143
185
|
*/
|
|
144
186
|
handleChatModelStart(llm: LangChainSerialized, messages: LangChainMessage[][], runId: string, _parentRunId?: string, extraParams?: Record<string, unknown>): Promise<void>;
|
|
145
187
|
/**
|
|
146
|
-
* Called when the LLM finishes (success).
|
|
147
|
-
* token usage, cost, and
|
|
188
|
+
* Called when the LLM finishes (success). Runs the OUTPUT rail (opt-in, see
|
|
189
|
+
* `evalOnResponse`) and emits a trace with latency, token usage, cost, and
|
|
190
|
+
* OpenInference-compliant span attributes.
|
|
191
|
+
*
|
|
192
|
+
* Ordering is load-bearing:
|
|
193
|
+
* 1. scan the completion (awaited — LangChain awaits this hook because
|
|
194
|
+
* `awaitHandlers = true`, which is what lets a block withhold the
|
|
195
|
+
* response from `invoke()`);
|
|
196
|
+
* 2. emit the trace, INCLUDING for a blocked completion — a blocked output
|
|
197
|
+
* is exactly the row an operator needs to see;
|
|
198
|
+
* 3. only then throw.
|
|
199
|
+
*
|
|
200
|
+
* The trace is fire-and-forget (`safeLog`), so step 2 adds no latency and
|
|
201
|
+
* cannot itself abort the run.
|
|
148
202
|
*/
|
|
149
203
|
handleLLMEnd(output: LangChainLLMResult, runId: string): Promise<void>;
|
|
204
|
+
/**
|
|
205
|
+
* Scan the model's completion. No-op unless `evalOnResponse` is configured.
|
|
206
|
+
*
|
|
207
|
+
* Total by construction: it never throws, it RETURNS the block so the caller
|
|
208
|
+
* can log the trace first. Three outcomes that must stay distinct (the same
|
|
209
|
+
* three the input rail learned the hard way — see firewall-response.ts):
|
|
210
|
+
*
|
|
211
|
+
* - a verdict that passes → `status: "passed"`
|
|
212
|
+
* - a verdict that fails (server block,
|
|
213
|
+
* or score below `failOnScore`) → `status: "blocked"`
|
|
214
|
+
* - NO verdict obtainable (outage, 401,
|
|
215
|
+
* a 200 whose body is not a verdict —
|
|
216
|
+
* `scoreOutput` returns null for all
|
|
217
|
+
* of these) → `status: "unavailable"`
|
|
218
|
+
*
|
|
219
|
+
* "Unavailable" is NOT "clean". With `blockOnViolation: true` (the default)
|
|
220
|
+
* it fails CLOSED, exactly like `guardrail_unavailable` on the input rail;
|
|
221
|
+
* with `blockOnViolation: false` the completion is delivered and the trace
|
|
222
|
+
* records that it was never scanned. `fireAndForget` never blocks — that is
|
|
223
|
+
* the whole point of the mode — and says so on the trace.
|
|
224
|
+
*/
|
|
225
|
+
private runOutputRail;
|
|
226
|
+
/**
|
|
227
|
+
* Shared "no usable verdict" branch of the output rail. The violation is
|
|
228
|
+
* returned either way: when `blockOnViolation` is false the completion is
|
|
229
|
+
* delivered, and the trace is then the ONLY place an operator can learn that
|
|
230
|
+
* the output went out unscanned — so it has to say so.
|
|
231
|
+
*/
|
|
232
|
+
private outputRailFailure;
|
|
150
233
|
/**
|
|
151
234
|
* Called when the LLM call errors. We still emit a trace so customers
|
|
152
235
|
* can see failed calls in the dashboard (latency + error type + model).
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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EACb,KAAK,EAAE,MAAM,GACZ,OAAO,CAAC,IAAI,CAAC;IAyBhB;;;;OAIG;IACG,iBAAiB,CACrB,MAAM,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,SAAS,EAAE,OAAO,CAAC;QAAC,GAAG,CAAC,EAAE,MAAM,CAAA;KAAE,EAC1D,KAAK,EAAE,MAAM,GACZ,OAAO,CAAC,IAAI,CAAC;IA0BhB,gFAAgF;YAClE,QAAQ;IAyDtB;;;;OAIG;IACH,OAAO,CAAC,gBAAgB;IAWxB;;;;;;;;;;OAUG;YACW,kBAAkB;IA6BhC;;;;;;;;;;;;OAYG;IACH,OAAO,CAAC,OAAO;IAUf,OAAO,CAAC,YAAY;CAoBrB;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,WAAW,IAAI,wBAAwB,GAAG,IAAI,CAQ7D;AA2GD,YAAY,EAAE,oBAAoB,EAAE,kBAAkB,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AASpG,OAAO,EAAE,YAAY,EAAE,oBAAoB,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAC9E,YAAY,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -59,7 +59,7 @@
|
|
|
59
59
|
* LangSmith's per-node evaluator surface.
|
|
60
60
|
*/
|
|
61
61
|
import { GuardrailClient } from "./guardrail-client.js";
|
|
62
|
-
import { collapseMessageText } from "@evalguard/wrapper-core";
|
|
62
|
+
import { collapseMessageText, evaluateOutput, isEvalOnResponseEnabled, } from "@evalguard/wrapper-core";
|
|
63
63
|
import { estimateCostDetailed } from "./cost.js";
|
|
64
64
|
export class EvalguardBlockedError extends Error {
|
|
65
65
|
violations;
|
|
@@ -81,6 +81,16 @@ export class EvalguardConfigError extends Error {
|
|
|
81
81
|
this.name = "EvalguardConfigError";
|
|
82
82
|
}
|
|
83
83
|
}
|
|
84
|
+
const EMPTY_RAIL = (status) => ({
|
|
85
|
+
status,
|
|
86
|
+
score: null,
|
|
87
|
+
violations: [],
|
|
88
|
+
block: null,
|
|
89
|
+
});
|
|
90
|
+
/** Normalise `evalOnResponse` to its object form. */
|
|
91
|
+
function outputRailCfg(v) {
|
|
92
|
+
return typeof v === "object" && v !== null ? v : {};
|
|
93
|
+
}
|
|
84
94
|
/**
|
|
85
95
|
* The handler keeps state per runId so async overlapping calls are tracked
|
|
86
96
|
* correctly. LangChain assigns each LLM/chain/tool invocation a unique runId
|
|
@@ -122,17 +132,36 @@ export class EvalGuardCallbackHandler {
|
|
|
122
132
|
blockOnViolation;
|
|
123
133
|
enableLogging;
|
|
124
134
|
enableGuardrails;
|
|
135
|
+
/** Config object handed to wrapper-core's shared eval-on-response helper. */
|
|
136
|
+
railConfig;
|
|
137
|
+
/** True when the OUTPUT rail is switched on (`evalOnResponse`). */
|
|
138
|
+
enableOutputRail;
|
|
125
139
|
constructor(config) {
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
140
|
+
this.railConfig = {
|
|
141
|
+
apiKey: config.apiKey,
|
|
142
|
+
baseUrl: config.baseUrl,
|
|
143
|
+
projectId: config.projectId,
|
|
144
|
+
metadata: config.metadata,
|
|
145
|
+
evalOnResponse: config.evalOnResponse,
|
|
146
|
+
onOutputViolation: config.onOutputViolation,
|
|
147
|
+
};
|
|
148
|
+
this.enableOutputRail = isEvalOnResponseEnabled(this.railConfig);
|
|
149
|
+
// `disableGuardrails` removes the pre-call firewall — the only code path
|
|
150
|
+
// that could produce a block until the output rail landed — so an EXPLICIT
|
|
151
|
+
// `blockOnViolation: true` alongside it can never be honoured. Accepting
|
|
152
|
+
// the pair silently is the same failure mode as the callback no-op this
|
|
153
|
+
// class was fixed for: the customer configures enforcement and gets none.
|
|
154
|
+
// Only the explicit combination is rejected — `disableGuardrails: true` on
|
|
155
|
+
// its own is a valid tracing-only setup, and `disableGuardrails` PLUS
|
|
156
|
+
// `evalOnResponse` is a valid output-rail-only setup (there IS something
|
|
157
|
+
// left to block on, so the pair is honourable and must not be refused).
|
|
158
|
+
if (config.disableGuardrails === true &&
|
|
159
|
+
config.blockOnViolation === true &&
|
|
160
|
+
!this.enableOutputRail) {
|
|
133
161
|
throw new EvalguardConfigError("EvalGuard: `blockOnViolation: true` cannot be honoured together with " +
|
|
134
162
|
"`disableGuardrails: true` — with the firewall disabled there is nothing " +
|
|
135
|
-
"to block on. Drop one of the two options
|
|
163
|
+
"to block on. Drop one of the two options, or enable the output rail " +
|
|
164
|
+
"with `evalOnResponse`.");
|
|
136
165
|
}
|
|
137
166
|
this.config = config;
|
|
138
167
|
// wrapper-core's GuardrailClient takes a config object (not positional
|
|
@@ -177,50 +206,184 @@ export class EvalGuardCallbackHandler {
|
|
|
177
206
|
await this.startRun(runId, prompt, model);
|
|
178
207
|
}
|
|
179
208
|
/**
|
|
180
|
-
* Called when the LLM finishes (success).
|
|
181
|
-
* token usage, cost, and
|
|
209
|
+
* Called when the LLM finishes (success). Runs the OUTPUT rail (opt-in, see
|
|
210
|
+
* `evalOnResponse`) and emits a trace with latency, token usage, cost, and
|
|
211
|
+
* OpenInference-compliant span attributes.
|
|
212
|
+
*
|
|
213
|
+
* Ordering is load-bearing:
|
|
214
|
+
* 1. scan the completion (awaited — LangChain awaits this hook because
|
|
215
|
+
* `awaitHandlers = true`, which is what lets a block withhold the
|
|
216
|
+
* response from `invoke()`);
|
|
217
|
+
* 2. emit the trace, INCLUDING for a blocked completion — a blocked output
|
|
218
|
+
* is exactly the row an operator needs to see;
|
|
219
|
+
* 3. only then throw.
|
|
220
|
+
*
|
|
221
|
+
* The trace is fire-and-forget (`safeLog`), so step 2 adds no latency and
|
|
222
|
+
* cannot itself abort the run.
|
|
182
223
|
*/
|
|
183
224
|
async handleLLMEnd(output, runId) {
|
|
184
225
|
const run = this.inflight.get(runId);
|
|
185
226
|
if (!run)
|
|
186
227
|
return;
|
|
187
228
|
this.inflight.delete(runId);
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
model,
|
|
203
|
-
|
|
204
|
-
input: run.prompt,
|
|
205
|
-
output: completion,
|
|
206
|
-
latencyMs,
|
|
207
|
-
tokenUsage: { input: inputTokens, output: outputTokens },
|
|
208
|
-
cost,
|
|
209
|
-
costPricingSource,
|
|
210
|
-
projectId: this.config.projectId,
|
|
211
|
-
metadata: this.config.metadata,
|
|
212
|
-
guardrailResult: run.guardrailResult,
|
|
213
|
-
openinference: buildOpenInferenceAttrs({
|
|
214
|
-
kind: "llm",
|
|
229
|
+
const latencyMs = Math.round(performance.now() - run.startedAt);
|
|
230
|
+
const usage = output.llmOutput?.tokenUsage ?? {};
|
|
231
|
+
const inputTokens = usage.promptTokens ?? 0;
|
|
232
|
+
const outputTokens = usage.completionTokens ?? 0;
|
|
233
|
+
const completions = extractCompletions(output);
|
|
234
|
+
const completion = completions === null ? "" : (completions[0] ?? "");
|
|
235
|
+
const model = output.llmOutput?.modelName ??
|
|
236
|
+
output.llmOutput?.model_name ??
|
|
237
|
+
output.llmOutput?.model ??
|
|
238
|
+
run.model;
|
|
239
|
+
// ── OUTPUT rail ────────────────────────────────────────────────────────
|
|
240
|
+
const rail = await this.runOutputRail(completions, model);
|
|
241
|
+
if (this.enableLogging) {
|
|
242
|
+
this.safeLog(() => {
|
|
243
|
+
const { costUsd: cost, pricingSource: costPricingSource } = estimateCostDetailed(model, inputTokens, outputTokens);
|
|
244
|
+
return {
|
|
215
245
|
model,
|
|
246
|
+
provider: "langchain",
|
|
216
247
|
input: run.prompt,
|
|
217
248
|
output: completion,
|
|
218
|
-
promptTokens: inputTokens,
|
|
219
|
-
completionTokens: outputTokens,
|
|
220
249
|
latencyMs,
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
250
|
+
tokenUsage: { input: inputTokens, output: outputTokens },
|
|
251
|
+
cost,
|
|
252
|
+
costPricingSource,
|
|
253
|
+
projectId: this.config.projectId,
|
|
254
|
+
metadata: {
|
|
255
|
+
...this.config.metadata,
|
|
256
|
+
outputRail: {
|
|
257
|
+
status: rail.status,
|
|
258
|
+
...(rail.violations.length > 0 ? { violations: rail.violations } : {}),
|
|
259
|
+
},
|
|
260
|
+
},
|
|
261
|
+
guardrailResult: run.guardrailResult,
|
|
262
|
+
...(rail.score ? { outputScore: rail.score } : {}),
|
|
263
|
+
openinference: buildOpenInferenceAttrs({
|
|
264
|
+
kind: "llm",
|
|
265
|
+
model,
|
|
266
|
+
input: run.prompt,
|
|
267
|
+
output: completion,
|
|
268
|
+
promptTokens: inputTokens,
|
|
269
|
+
completionTokens: outputTokens,
|
|
270
|
+
latencyMs,
|
|
271
|
+
...(rail.block
|
|
272
|
+
? { statusCode: "ERROR", statusMessage: rail.block.message }
|
|
273
|
+
: {}),
|
|
274
|
+
}),
|
|
275
|
+
};
|
|
276
|
+
});
|
|
277
|
+
}
|
|
278
|
+
if (rail.block)
|
|
279
|
+
throw rail.block;
|
|
280
|
+
}
|
|
281
|
+
/**
|
|
282
|
+
* Scan the model's completion. No-op unless `evalOnResponse` is configured.
|
|
283
|
+
*
|
|
284
|
+
* Total by construction: it never throws, it RETURNS the block so the caller
|
|
285
|
+
* can log the trace first. Three outcomes that must stay distinct (the same
|
|
286
|
+
* three the input rail learned the hard way — see firewall-response.ts):
|
|
287
|
+
*
|
|
288
|
+
* - a verdict that passes → `status: "passed"`
|
|
289
|
+
* - a verdict that fails (server block,
|
|
290
|
+
* or score below `failOnScore`) → `status: "blocked"`
|
|
291
|
+
* - NO verdict obtainable (outage, 401,
|
|
292
|
+
* a 200 whose body is not a verdict —
|
|
293
|
+
* `scoreOutput` returns null for all
|
|
294
|
+
* of these) → `status: "unavailable"`
|
|
295
|
+
*
|
|
296
|
+
* "Unavailable" is NOT "clean". With `blockOnViolation: true` (the default)
|
|
297
|
+
* it fails CLOSED, exactly like `guardrail_unavailable` on the input rail;
|
|
298
|
+
* with `blockOnViolation: false` the completion is delivered and the trace
|
|
299
|
+
* records that it was never scanned. `fireAndForget` never blocks — that is
|
|
300
|
+
* the whole point of the mode — and says so on the trace.
|
|
301
|
+
*/
|
|
302
|
+
async runOutputRail(completions, model) {
|
|
303
|
+
if (!this.enableOutputRail)
|
|
304
|
+
return EMPTY_RAIL("disabled");
|
|
305
|
+
// The completion could not be read, so the scanner cannot see the bytes
|
|
306
|
+
// that are about to reach the caller. Mirror `onUnreadablePrompt`: reject,
|
|
307
|
+
// never wave through, and never scan a partial.
|
|
308
|
+
if (completions === null) {
|
|
309
|
+
return this.outputRailFailure("unreadable", "output_unreadable", "EvalGuard could not extract the model's completion for scanning");
|
|
310
|
+
}
|
|
311
|
+
// Every generation, not just `generations[0][0]`: with `n > 1` the extra
|
|
312
|
+
// candidates are returned to the caller too, and a rail that reads only
|
|
313
|
+
// the first hands the others through unscanned.
|
|
314
|
+
const text = completions.join("\n").trim();
|
|
315
|
+
if (!text)
|
|
316
|
+
return EMPTY_RAIL("empty");
|
|
317
|
+
const railMeta = {
|
|
318
|
+
provider: "langchain",
|
|
319
|
+
model,
|
|
320
|
+
...(this.config.projectId ? { projectId: this.config.projectId } : {}),
|
|
321
|
+
...this.config.metadata,
|
|
322
|
+
};
|
|
323
|
+
if (outputRailCfg(this.config.evalOnResponse).fireAndForget) {
|
|
324
|
+
// Scored in the background; the response is never gated on it.
|
|
325
|
+
void evaluateOutput(this.client, this.railConfig, text, railMeta).catch(() => {
|
|
326
|
+
/* fire-and-forget by contract */
|
|
327
|
+
});
|
|
328
|
+
return EMPTY_RAIL("fire-and-forget");
|
|
329
|
+
}
|
|
330
|
+
let score = null;
|
|
331
|
+
try {
|
|
332
|
+
score = await evaluateOutput(this.client, this.railConfig, text, railMeta);
|
|
333
|
+
}
|
|
334
|
+
catch (err) {
|
|
335
|
+
// `scoreOutput` swallows transport failures itself (returns null), so
|
|
336
|
+
// this is a defensive catch — a throwing `onOutputViolation` callback,
|
|
337
|
+
// or any future rejection path. Either way: no verdict was obtained.
|
|
338
|
+
return this.outputRailFailure("unavailable", "output_scan_unavailable", `EvalGuard could not score the model output (${err instanceof Error ? err.message : "unknown error"})`);
|
|
339
|
+
}
|
|
340
|
+
if (score === null) {
|
|
341
|
+
return this.outputRailFailure("unavailable", "output_scan_unavailable", "EvalGuard could not score the model output (no verdict obtained from /firewall/check)");
|
|
342
|
+
}
|
|
343
|
+
if (!score.failed)
|
|
344
|
+
return { status: "passed", score, violations: [], block: null };
|
|
345
|
+
// Deliberately describes the verdict, never the completion: this message
|
|
346
|
+
// lands in customer logs and the offending output is the thing we just
|
|
347
|
+
// decided is unsafe to hand on.
|
|
348
|
+
const detail = score.blocked
|
|
349
|
+
? "the output firewall returned action:block"
|
|
350
|
+
: `composite score ${score.score} is below the configured failOnScore threshold`;
|
|
351
|
+
const violations = [
|
|
352
|
+
{
|
|
353
|
+
type: "output_violation",
|
|
354
|
+
severity: "high",
|
|
355
|
+
message: `Model output failed the EvalGuard output rail (${detail}).`,
|
|
356
|
+
},
|
|
357
|
+
];
|
|
358
|
+
return {
|
|
359
|
+
status: "blocked",
|
|
360
|
+
score,
|
|
361
|
+
violations,
|
|
362
|
+
// `blockOnViolation: false` is monitor-only for BOTH rails: the
|
|
363
|
+
// completion is delivered and the verdict is recorded on the trace.
|
|
364
|
+
block: this.blockOnViolation
|
|
365
|
+
? new EvalguardBlockedError(`Model output blocked by EvalGuard output rail: ${detail}`, violations)
|
|
366
|
+
: null,
|
|
367
|
+
};
|
|
368
|
+
}
|
|
369
|
+
/**
|
|
370
|
+
* Shared "no usable verdict" branch of the output rail. The violation is
|
|
371
|
+
* returned either way: when `blockOnViolation` is false the completion is
|
|
372
|
+
* delivered, and the trace is then the ONLY place an operator can learn that
|
|
373
|
+
* the output went out unscanned — so it has to say so.
|
|
374
|
+
*/
|
|
375
|
+
outputRailFailure(status, type, message) {
|
|
376
|
+
const violations = [
|
|
377
|
+
{ type, severity: "high", message },
|
|
378
|
+
];
|
|
379
|
+
return {
|
|
380
|
+
status,
|
|
381
|
+
score: null,
|
|
382
|
+
violations,
|
|
383
|
+
block: this.blockOnViolation
|
|
384
|
+
? new EvalguardBlockedError(`Response blocked: ${message}`, violations)
|
|
385
|
+
: null,
|
|
386
|
+
};
|
|
224
387
|
}
|
|
225
388
|
/**
|
|
226
389
|
* Called when the LLM call errors. We still emit a trace so customers
|
|
@@ -383,13 +546,25 @@ export class EvalGuardCallbackHandler {
|
|
|
383
546
|
// who expect fail-CLOSED. Per check.txt audit P1 fix, an
|
|
384
547
|
// unreachable guardrail now blocks the run when blockOnViolation
|
|
385
548
|
// is on; otherwise fall through to keep availability.
|
|
549
|
+
const violations = [
|
|
550
|
+
{
|
|
551
|
+
type: "guardrail_unavailable",
|
|
552
|
+
severity: "high",
|
|
553
|
+
message: err instanceof Error ? err.message : "guardrail check failed",
|
|
554
|
+
},
|
|
555
|
+
];
|
|
386
556
|
if (this.blockOnViolation) {
|
|
387
|
-
throw new EvalguardBlockedError(`Request blocked: guardrail unavailable (${err instanceof Error ? err.message : "unknown"})`,
|
|
388
|
-
type: "guardrail_unavailable",
|
|
389
|
-
severity: "high",
|
|
390
|
-
message: err instanceof Error ? err.message : "guardrail check failed",
|
|
391
|
-
}]);
|
|
557
|
+
throw new EvalguardBlockedError(`Request blocked: guardrail unavailable (${err instanceof Error ? err.message : "unknown"})`, violations);
|
|
392
558
|
}
|
|
559
|
+
// Monitor-only. The call proceeds — but until 2026-08-07 the outage
|
|
560
|
+
// left `guardrailResult` UNSET, so the trace was indistinguishable
|
|
561
|
+
// from a prompt that had been scanned and cleared. The README's
|
|
562
|
+
// outage table already promised "violation recorded on the trace";
|
|
563
|
+
// this is what makes that true. Same shape as the monitor-only branch
|
|
564
|
+
// of `onUnreadablePrompt`: `allowed` describes what happened to the
|
|
565
|
+
// request (it proceeded), the violation records that nothing was
|
|
566
|
+
// scanned.
|
|
567
|
+
run.guardrailResult = { allowed: true, violations };
|
|
393
568
|
}
|
|
394
569
|
}
|
|
395
570
|
this.inflight.set(runId, run);
|
|
@@ -528,13 +703,35 @@ function collapseMessages(messages) {
|
|
|
528
703
|
}));
|
|
529
704
|
return collapseMessageText(normalized);
|
|
530
705
|
}
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
706
|
+
/**
|
|
707
|
+
* Every generation's text, in order — `generations` is `Generation[][]` (one
|
|
708
|
+
* inner array per prompt, one entry per `n`).
|
|
709
|
+
*
|
|
710
|
+
* Returns `null` when the result cannot be read at all (a hostile/foreign
|
|
711
|
+
* Generation shape whose accessor throws). `null` means UNREADABLE, which the
|
|
712
|
+
* output rail must treat as "not scanned" and fail closed on — the same
|
|
713
|
+
* distinction the input side draws with `prompt_unreadable`. An empty array is
|
|
714
|
+
* a genuinely empty completion, which is a different thing and is fine.
|
|
715
|
+
*/
|
|
716
|
+
function extractCompletions(output) {
|
|
717
|
+
try {
|
|
718
|
+
const out = [];
|
|
719
|
+
for (const perPrompt of output.generations ?? []) {
|
|
720
|
+
for (const gen of perPrompt ?? []) {
|
|
721
|
+
const fromMessage = gen?.message?.content;
|
|
722
|
+
if (typeof fromMessage === "string" && fromMessage) {
|
|
723
|
+
out.push(fromMessage);
|
|
724
|
+
continue;
|
|
725
|
+
}
|
|
726
|
+
const text = gen?.text;
|
|
727
|
+
out.push(typeof text === "string" ? text : "");
|
|
728
|
+
}
|
|
729
|
+
}
|
|
730
|
+
return out;
|
|
731
|
+
}
|
|
732
|
+
catch {
|
|
733
|
+
return null;
|
|
734
|
+
}
|
|
538
735
|
}
|
|
539
736
|
/**
|
|
540
737
|
* Build OpenInference-compliant span attributes. OpenInference is the
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources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8D;AAC9D,gFAAgF;AAChF,8EAA8E;AAC9E,4EAA4E;AAC5E,+EAA+E;AAC/E,6DAA6D;AAC7D,OAAO,EAAE,YAAY,EAAE,oBAAoB,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@evalguard/langchain",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.3",
|
|
4
4
|
"description": "Drop-in LangChain + LangGraph instrumentation with EvalGuard guardrails, trace logging & cost tracking",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"exports": {
|
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
"files": [
|
|
14
14
|
"dist",
|
|
15
15
|
"README.md",
|
|
16
|
+
"CHANGELOG.md",
|
|
16
17
|
"LICENSE"
|
|
17
18
|
],
|
|
18
19
|
"keywords": [
|
|
@@ -44,7 +45,7 @@
|
|
|
44
45
|
}
|
|
45
46
|
},
|
|
46
47
|
"dependencies": {
|
|
47
|
-
"@evalguard/wrapper-core": "^1.
|
|
48
|
+
"@evalguard/wrapper-core": "^1.3.0"
|
|
48
49
|
},
|
|
49
50
|
"devDependencies": {
|
|
50
51
|
"@langchain/core": ">=0.3.80",
|