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: boolContext returned at a prompt reaches the model.
tool_context: boolContext returned after a tool call reaches the model before its next step (live mode’s asks).
early_delivery: boolEarly delivery: a prompt or touch naming a lesson’s scope gets that scope’s lessons at once (hook.rs early).
question_dialog: boolA queen question is asked with a dialog (AskUserQuestion), else inline (queen.rs render_delivery).
transcript: Transcript§deny_capture: boolpost_tool_failure carries the engineer’s denials, which become episodes (hook.rs
capture_rejection); without it the event is ignored.
sends_pid: boolEvents 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: usizeThe 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: DroneWakeHow an idle session of the harness can be woken with a message.
Implementations§
Source§impl Caps
impl Caps
Sourcepub const fn context_chars(self) -> usize
pub const fn context_chars(self) -> usize
Caps::context_chars, for callers that read it as a method.
Trait Implementations§
impl Copy for Caps
impl Eq for Caps
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> 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,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.