Skip to main content

Sim

Struct Sim 

Source
pub struct Sim;

Trait Implementations§

Source§

impl Harness for Sim

Source§

fn name(&self) -> &'static str

The CLI argument (borg hook <name>, borg install <name>), BORG_HARNESS and presence’s harness.
Source§

fn caps(&self) -> Caps

Source§

fn wiring(&self) -> Wiring

What borg install writes.
Source§

fn target(&self, home: &Path, _var: &dyn Fn(&str) -> Option<PathBuf>) -> PathBuf

The config file borg install writes, under home; var reads the harness’s own config-dir variables (--home gives none, so nothing outside home is reached).
Source§

fn probe(&self) -> Probe

What borg doctor asks of the harness’s CLI.
Source§

fn hidden(&self) -> bool

Left out of help, completions, all, status and doctor (the simulated harness).
Source§

fn normalise(&self, raw: Value) -> Value

The native hook payload as the canonical event. Default: it is one already.
Source§

fn checks(&self, _target: &Path) -> Vec<(Level, String)>

What borg doctor checks beyond the CLI’s version line (Probe), e.g. that the harness trusts borg’s hooks; target is the config borg install writes. Default: nothing more.
Source§

fn install_notes(&self) -> Vec<String>

What borg install tells the engineer to do in the harness itself (e.g. trust the new hooks).
Source§

fn sub_runs( &self, _home: &Path, _session: Option<&str>, _since: Option<i64>, ) -> Vec<Run>

The groups of sub-agents its sessions ran under home (review_fix.rs), oldest first: of session only (as its end hook names it), else of every session, from runs that started at or after since (epoch ms). Default: none.
Source§

fn session_log( &self, _home: &Path, _session: &str, _input: &Value, ) -> Option<PathBuf>

The file its own transcript of main session session is in, which the turn-end sweep reads (sweep.rs): under home ($HOME, its config-dir variable honoured), or as the hook’s input names it. Default: none (opencode keeps no file borg reads; its CLI exports a session at its end).
Source§

fn budgets(&self) -> Option<Budgets>

What its adapter waits for each answer (Budgets); None where the harness runs borg’s hooks itself, under the timeout borg installs or its own default (Claude Code, Codex). Default: None.

Auto Trait Implementations§

§

impl Freeze for Sim

§

impl RefUnwindSafe for Sim

§

impl Send for Sim

§

impl Sync for Sim

§

impl Unpin for Sim

§

impl UnsafeUnpin for Sim

§

impl UnwindSafe for Sim

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> 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> Same for T

Source§

type Output = T

Should always be Self
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.