Skip to main content

Config

Struct Config 

Source
pub struct Config {
Show 23 fields pub enabled: bool, pub backend: Backend, pub command: Option<Vec<String>>, pub command_mode: CommandMode, pub surface: Surface, pub key_env: Option<String>, pub judges: BTreeMap<String, Judge>, pub route: BTreeMap<String, Vec<String>>, pub escalate: BTreeMap<String, Vec<String>>, pub escalate_band: [f64; 2], pub key_file: Option<String>, pub key_cmd: Option<Vec<String>>, pub model: String, pub budget_ms: u64, pub endpoint: String, pub monthly_usd: f64, pub min_words: usize, pub min_candidates: usize, pub usd_per_mtok_in: f64, pub bears_at: f64, pub cue_at: f64, pub escalate_below: f64, pub cache_days: u64,
}
Expand description

~/.config/ljos/jev.toml.

Fields§

§enabled: bool

Off unless set: the call sends the prompt and claims off the machine.

§backend: Backend

Which judge answers: jev (the default), chat or command.

§command: Option<Vec<String>>

The argv of the command backend. It reads the request JSON on stdin and prints {"answers": ...} on stdout inside budget_ms.

§command_mode: CommandMode

How the command backend is spoken to: request or prompt.

§surface: Surface

Where the default judge runs in prompt mode.

§key_env: Option<String>

An environment variable holding the key.

§judges: BTreeMap<String, Judge>

Further judges by name, beside the top-level default.

§route: BTreeMap<String, Vec<String>>

Which judges answer a decision: prompt, ballot, audit or review to a list of judge names. A decision no route names goes to default.

§escalate: BTreeMap<String, Vec<String>>

The thinkers a decision goes on to when the route’s pool is unsure.

§escalate_band: [f64; 2]

The probabilities a pool is unsure inside, ends included.

§key_file: Option<String>

A file holding the key, one line, mode 0600.

§key_cmd: Option<Vec<String>>

A command that prints the key on its first line, such as ["pass", "show", "api/typesafe/jev"]; asked once per login and held in the runtime directory, mode 0600.

§model: String

The model: jev-1.13.0 on TypeSafe’s API, typesafe/jev-1.13 on OpenRouter’s.

§budget_ms: u64

How long the hook waits for the answer.

§endpoint: String

TypeSafe’s endpoint, or https://openrouter.ai/api/alpha/decisions.

§monthly_usd: f64

The month’s spend, in US dollars, past which the hook stops asking.

§min_words: usize

A prompt with fewer words is an acknowledgement (“yes”, “keep going”), with too little in it for a judgment to add anything.

§min_candidates: usize

Fewer candidates than this is nothing to choose between; the local filters answer.

§usd_per_mtok_in: f64

US dollars per million input tokens, for an API whose answer does not carry its cost. Output is not charged.

§bears_at: f64

The probability at which a candidate counts as bearing on the prompt; higher lets fewer off-topic claims through.

§cue_at: f64

The probability at which the prompt counts as a correction or a choice.

§escalate_below: f64

A persona ballot whose confidence is under this goes to a subagent instead of being cast.

§cache_days: u64

Days an answer is kept and given again for an identical request, at no cost; 0 turns the cache off. Jev keeps no cache of its own.

Implementations§

Source§

impl Config

Source

pub fn default_judge(&self) -> Judge

The judge the top-level keys describe.

Source

pub fn judge(&self, name: &str) -> Option<Judge>

The judge called name; default is the top-level one.

Source

pub fn route_of(&self, decision: &str) -> Vec<String>

The names that answer decision, as the route gives them.

Trait Implementations§

Source§

impl Clone for Config

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Config

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for Config

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl PartialEq for Config

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for Config

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.