Enable intentionally#
The server adapter and React component default to disabled. Enable them for local development. Keep API keys on the server. A disabled adapter returns an ordinary SDK client; it does not disable your application's inference calls.
Choose what leaves the server#
const inspector = createJevDevtools({
enabled: process.env.NODE_ENV === "development",
origin: "http://localhost:3000",
limit: 50,
redact: (path, value) => (path.at(-1) === "email" ? "[redacted]" : value),
});Create an independent Node server adapter. Share it between your HTTP endpoints and instrumented clients.
createJevDevtools(options)- enabled
- Opt into server capture and inspector endpoints. Defaults to false; disabling capture does not stop inference.
- origin
- The exact browser origin, including scheme, hostname, and port.
- endpoint
- The inspector URL path. Defaults to /api/jev-devtools; must match the browser component.
- limit
- Maximum retained request traces across sessions. Defaults to 50; clamped to 1–200.
- redact
- Transform the captured copy before storage or streaming. Does not change SDK inputs or application values.
- authorize
- Your application access check. Required for an enabled non-loopback origin.
- getSession
- Derive a trusted recording scope from the request. Defaults to the shared local scope.
Opt into server capture and inspector endpoints. Defaults to false; disabling capture does not stop inference.
enabledThe exact browser origin, including scheme, hostname, and port.
originMaximum retained request traces across sessions. Defaults to 50; clamped to 1–200.
limitTransform the captured copy before storage or streaming. Does not change SDK inputs or application values.
redactAPI reference: createJevDevtools()
Import createJevDevtools from jev-devtools/server. The callback changes the captured copy, not SDK inputs or application values. Known credential fields are always redacted; extend the policy for your own sensitive data. Field-name redaction does not detect every secret in prose, URLs, images, or unusual field names.
Unreleased: expanded credential aliases and the default-on
redactAdditionalSensitiveDataprop are present in the working tree. Display masking leaves values in server capture memory, the event stream, and browser memory. Use server-side redaction when data must never reach the browser.
Control who can inspect#
Same-origin checks protect browser access. Other HTTP clients can set Host and Origin headers. Node middleware therefore also requires a loopback socket when authorize is absent. Web Request handlers do not have socket information: bind the server to 127.0.0.1 or supply authorization.
An enabled non-loopback origin requires authorize(request). Use your existing application authentication. A network-reachable proxy or tunnel also needs authorization, even if it connects to the adapter over loopback.
Separate session history#
getSession(request) derives a trusted scope from server-authenticated identity. Wrap the inference handler with inspector.run(request, callback) so capture uses that same scope. run chooses the recording scope; it is not an authentication check.
Without a custom scope, authorized clients share the local history. Do not use an untrusted query parameter as a session identity. See the integration guide for the full access and redaction contract.
Understand retention#
Request history defaults to 50 entries, bounded globally by the recorder's limit (clamped to 1–200). Data is in memory and disappears on process restart. The drawer's Clear action clears the current scope. Capture size, depth, text, collection, and image budgets can truncate inspection data; they do not alter application results.