@obversa/engine-jev-api is an engine plugin that makes one Jev decision call
per attempt over the TypeSafe API. A Jev call reads structured state your
workflow already recorded and answers the questions you put to it; the adapter
returns those answers as the attempt’s structured result.
Requirements
- Node.js 22.12 or later
- A Jev endpoint and API key, supplied through adapter options
Install
Request shape
The prompt is a JSON document of the shape{state, questions}:
state is whatever your run recorded. Each entry in questions names a type —
noul, choice, or score — with instructions and criteria. choice
criteria map each option to its description; score criteria are the array of
labels the score indexes; noul criteria describe what true and false mean.
The adapter does not validate the answer objects; it returns them unchanged.
The shapes described here are what the provider has been observed to return,
not types the adapter checks: noul answers have been observed carrying a
probability with no separate confidence field, while choice and score
answers have been observed carrying a confidence (and may carry
probabilities).
The adapter validates the document shape — that it parses to an object, that
questions is a non-empty object, and that every question names one of the
three types — before any network call. A missing or null state is sent as
an empty object; questions is required. It does not inspect criteria;
criteria are forwarded to the provider unchanged. Malformed input fails as
invalid-config.
Usage
answers object, so a binding’s
parseResult reads part.value.send_back directly.
Unsupported requests
These request fields fail asinvalid-config before any network call:
systemorsystemMode— Jev requests carry no system promptenv— credentials come from adapter configuration, not the requestmaxTokens— Jev has no server-side token capworkspaceModeother thannone— Jev performs no filesystem access- a non-empty
toolslist — the adapter declares no tools
Limits
- One HTTP request per attempt. The adapter never retries on its own; retry safety belongs to the node binding.
- The bearer key comes from adapter configuration at construction; a
request.envfield is refused. Provider response data — including error bodies — is recorded in the result and in error details. timeoutMs, plustimeoutGraceMswhen set, bounds the whole call — connection and response body read. Exceeding the deadline fails astimeout; a caller abort fails asaborted.maxOutputBytes, when supplied on the request, caps the response body the adapter reads. It applies only when set and is not a general memory bound.- A low-confidence answer completes like any other result. Thresholds and routing are the caller’s policy, not the adapter’s.
- When the API does not echo a model — or echoes one that is not readable —
the recorded effective model and model family are both
null, and the answers are still returned.