flightopsDocumentation
AI assistance

Prioritize evidence with Jev

4 min readdocs/ai/jev.md (source repository)

Jev is an optional TypeSafe AI service that picks the most relevant attached Flightops receipt for a question. Codex or Claude still explains the evidence. Jev can choose incorrectly; its answer never changes a diagnostic verdict.

This first version is available through the terminal commands below. It keeps all attached receipts, including unknowns and incomplete observations, and puts Jev's selected receipt first in the assistant request. It does not automatically remove evidence or promise lower cost. The normal assistant does not call Jev.

Before you begin

Live Jev provider requests are not accepted for the beta; see known limits. Check flightops ai --help before continuing.

1. Save a TypeSafe key

Get an API key from your TypeSafe account, then run:

bash
flightops ai jev setup
flightops ai jev status

Setup asks for a masked key and saves it in your OS credential store. It makes no model request and does not change your selected Codex, OpenAI, or Anthropic connection. The integration uses the pinned jev-1.13.0 model.

If an OS credential store is unavailable, set a key in your shell without putting its value in shell history, then save the variable name:

bash
read -rsp 'TypeSafe API key: ' TYPESAFE_API_KEY; echo
export TYPESAFE_API_KEY
flightops ai jev setup --key-env TYPESAFE_API_KEY

Keep this terminal open for the following commands. Only the variable name is saved in Flightops configuration.

2. Select evidence for a question

Use existing JSON result objects or text logs. For example, substitute paths to your retained camera and navigation logs:

bash
flightops ai select-evidence 'Why did the camera image stop?' \
  --session-dir ./camera-investigation \
  --evidence /path/to/camera.log \
  --evidence /path/to/navigation.log

Review the displayed TypeSafe destination, question, and exact receipt packet. To approve once, type the displayed digest. Any other response denies it. An interactive terminal is required; redirected input cannot approve requests.

The result contains a selected receipt ID or insufficient_evidence, candidate hashes, probabilities, model version, usage, and elapsed time. Confidence measures how concentrated the choice distribution is; it does not prove the selected log explains the fault.

For a camera log reporting an access error, Jev may prioritize that receipt over a navigation delay. That supports inspecting camera access; it does not prove that the camera hardware failed. If no supplied record fits, the expected outcome is insufficient evidence.

3. Ask your assistant using that priority

First connect a conversational provider, then run:

bash
flightops ai ask 'Why did the camera image stop?' \
  --session-dir ./camera-investigation \
  --evidence /path/to/camera.log \
  --evidence /path/to/navigation.log \
  --jev

There are two separate disclosures to review: first the Jev selection request, then the assistant request with the advisory selection and every original receipt. The first approval never authorizes the second. This command runs a fresh selection; it does not reuse authority or judgments from a previous process.

Omit --jev to ask the assistant directly. If Jev is unavailable or its response is invalid, Flightops stops that attempt and retains the local evidence. You can explicitly retry or rerun without --jev. No provider fallback happens silently. Changed or missing original artifacts invalidate a selection.

Files, costs, and limits

Your source files stay on your computer. Flightops sends only the reviewed question and derived receipts; it does not upload the whole folder or give Jev filesystem access. Cloudflare Workers and storage are not required. TypeSafe and your conversational provider may charge for their respective requests.

Attach at most eight artifacts through these commands. Jev requests are bounded to 64 KiB and the configured context limit; narrow oversized evidence explicitly. Raw MCAP files, images, and video are not Jev inputs. Use Flightops diagnostics to produce text or JSON evidence first.

Selection audit records are saved under SESSION/ai/evidence-selection-*.json. The local operation journal retains the reviewed request. Treat these records as potentially sensitive when sharing them. Neither grants permission to run commands, edit files, or operate hardware.

Disconnect or compare

bash
flightops ai jev disconnect

This removes the Jev configuration and its managed key. An environment key remains under your shell's control; use unset TYPESAFE_API_KEY to remove it from that shell. Your conversational connection stays selected.

Use the offline comparison guide to compare Jev against a standard model on the same incidents before enabling any future automatic filtering. The implementation has offline tests; real Flightops selection quality and provider latency still require evaluation on your evidence.

Provider references: API, Choice, and known limitations.