Skip to main content

Module wire

Module wire 

Source
Expand description

System One wire format: request validation and response construction.

This mirrors the contract implemented by fastjev’s compat/wire.py (https://github.com/chengyongru/fastjev, MIT). The adapter preserves the public wire shape; it does not claim Jev’s model behaviour, and the returned probabilities are conditional option scores, not calibrated decision confidence.

Structs§

FastjevMeta
The bridge’s own extension block, mirroring fastjev’s System One adapter.
OrderedMap
An ordered map that serialises as a JSON object.
Question
One question asked about a shared state.
QuestionSpec
What a validated question asks for, kept for building the response.
ReadoutStatus
What the deployment knows about this bridge’s readout channel.
RequestBatch
A validated System One request, reduced to what the scorer needs: the one state every question shares, and the questions themselves.
Row
One decision, in the shape the scorer and the --score fixture both use.
RowOption
One answer option handed to the scorer.
ScoredAnswer
A scorer result reduced to what the wire layer needs.
SystemOneResponse
The documented System One response shape.
Usage
Token accounting for one request.
WireError
A request that cannot be represented by the scoring backend.

Enums§

Answer
One answer in a System One response.
ConfidenceMethod
The certainty proxy that turns one distribution into one number.
Kind
The three question shapes the System One API defines.

Constants§

CONFIDENCE_METHOD
How the bridge derives its certainty proxy.
CONFIDENCE_METHOD_MAX_PROBABILITY
The method name for ConfidenceMethod::MaxProbability.
MAX_OPTIONS
The largest number of options a choice question may offer.
MAX_SCORE_LEVELS
The largest number of levels a score question may offer.
PROBABILITY_STATUS
The disclaimer attached to every returned probability.
UNVALIDATED_READOUT
The default ReadoutStatus::status: nothing was checked on this model.

Functions§

distribution_confidence
Documented fastjev certainty proxy, not TypeSafe’s private statistic.
max_probability_confidence
Linear top-probability certainty proxy: zero on a uniform distribution, one when a single candidate holds all the mass.
request_batch
Validate a System One request and convert it to one shared state plus the questions asked about it.
response_from_results
Convert scorer results to the documented System One response shape.
to_python_json
Serialize with Python’s json.dumps(..., ensure_ascii=False) layout.