pub struct Config {Show 19 fields
pub enabled: bool,
pub backend: Backend,
pub command: Option<Vec<String>>,
pub key_env: Option<String>,
pub judges: BTreeMap<String, Judge>,
pub route: BTreeMap<String, Vec<String>>,
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: boolOff unless set: the call sends the prompt and claims off the machine.
backend: BackendWhich 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.
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.
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: StringThe model: jev-1.13.0 on TypeSafe’s API, typesafe/jev-1.13 on
OpenRouter’s.
budget_ms: u64How long the hook waits for the answer.
endpoint: StringTypeSafe’s endpoint, or https://openrouter.ai/api/alpha/decisions.
monthly_usd: f64The month’s spend, in US dollars, past which the hook stops asking.
min_words: usizeA prompt with fewer words is an acknowledgement (“yes”, “keep going”), with too little in it for a judgment to add anything.
min_candidates: usizeFewer candidates than this is nothing to choose between; the local filters answer.
usd_per_mtok_in: f64US dollars per million input tokens, for an API whose answer does not carry its cost. Output is not charged.
bears_at: f64The probability at which a candidate counts as bearing on the prompt; higher lets fewer off-topic claims through.
cue_at: f64The probability at which the prompt counts as a correction or a choice.
escalate_below: f64A persona ballot whose confidence is under this goes to a subagent instead of being cast.
cache_days: u64Days 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§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Config
impl<'de> Deserialize<'de> for Config
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl StructuralPartialEq for Config
Auto Trait Implementations§
impl Freeze for Config
impl RefUnwindSafe for Config
impl Send for Config
impl Sync for Config
impl Unpin for Config
impl UnsafeUnpin for Config
impl UnwindSafe for Config
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
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