Skip to main content

Caps

Struct Caps 

Source
pub struct Caps {
    pub prompt_context: bool,
    pub tool_context: bool,
    pub early_delivery: bool,
    pub question_dialog: bool,
    pub transcript: Transcript,
    pub deny_capture: bool,
    pub sends_pid: bool,
    pub stop_budget: Option<Duration>,
    pub context_chars: usize,
    pub session_env: Option<&'static str>,
    pub pid_env: Option<&'static str>,
    pub drone_wake: DroneWake,
}
Expand description

What a harness can do with borg’s answers, and what it sends. Each flag gates one behaviour of the core; a flag changes only with an evaluation behind it (docs/harnesses.md).

Fields§

§prompt_context: bool

Context returned at a prompt reaches the model.

§tool_context: bool

Context returned after a tool call reaches the model before its next step (live mode’s asks).

§early_delivery: bool

Early delivery: a prompt or touch naming a lesson’s scope gets that scope’s lessons at once (hook.rs early).

§question_dialog: bool

A queen question is asked with a dialog (AskUserQuestion), else inline (queen.rs render_delivery).

§transcript: Transcript§deny_capture: bool

post_tool_failure carries the engineer’s denials, which become episodes (hook.rs capture_rejection); without it the event is ignored.

§sends_pid: bool

Events carry the harness’s pid, so a gone process reads as ended (presence.rs state); without it an event’s pid is dropped (hook.rs main).

§stop_budget: Option<Duration>

The stop’s budget when the event names none (BORG_STOP_BUDGET_MS, which an adapter sets to its Budgets::stop): the live wait, the stop’s model call and the expert drone keep inside it (expert_route.rs stop_budget). None: the expert drone keeps inside DEFAULT_STOP_BUDGET, the model call inside the model’s own limit.

§context_chars: usize

The characters of context one hook answer may inject into the harness’s model and have it arrive whole, shared by everything delivered in that event (messages, lessons). Derived: the harness’s own limit where it has one (cited in its module), else CONTEXT_GUARD.

§session_env: Option<&'static str>

The variable the harness sets to its session’s id in every command its model runs; None: the harness gives its shell no id (opencode).

§pid_env: Option<&'static str>

The variable the harness sets to its own pid in every command its model runs, for a harness whose shell has no session id: its events carry that pid (sends_pid), so presence names the session (opencode’s OPENCODE_PID, set by its CLI).

§drone_wake: DroneWake

How an idle session of the harness can be woken with a message.

Implementations§

Source§

impl Caps

Source

pub const fn context_chars(self) -> usize

Caps::context_chars, for callers that read it as a method.

Trait Implementations§

Source§

impl Clone for Caps

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 Copy for Caps

Source§

impl Debug for Caps

Source§

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

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

impl Eq for Caps

Source§

impl PartialEq for Caps

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 Caps

Auto Trait Implementations§

§

impl Freeze for Caps

§

impl RefUnwindSafe for Caps

§

impl Send for Caps

§

impl Sync for Caps

§

impl Unpin for Caps

§

impl UnsafeUnpin for Caps

§

impl UnwindSafe for Caps

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<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
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> 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.