pub struct EffectRow {
pub reads: Vec<Resource>,
pub writes: Vec<Resource>,
pub invokes: Vec<Capability>,
pub spawns: bool,
pub destructive: bool,
pub sandbox: Sandbox,
pub cost: CostEstimate,
}Expand description
The effect row of a tool — what it does to the world.
Inspired by Koka’s effect row system, this is checked at compile time via Rust trait bounds and at runtime by the Dharma governance layer.
Fields§
§reads: Vec<Resource>Resources this tool reads from
writes: Vec<Resource>Resources this tool writes to
invokes: Vec<Capability>Capabilities this tool invokes
spawns: boolWhether this tool spawns external processes
destructive: boolWhether this tool is destructive (deletes/overwrites data).
Destructive tools require explicit confirmation via confirm: true in args.
sandbox: SandboxKernel-sandbox eligibility (Landlock A→B seam, declarative in v0).
cost: CostEstimateEstimated resource cost
Implementations§
Source§impl EffectRow
impl EffectRow
Sourcepub fn is_available_in(&self, brain_wave: BrainWave) -> bool
pub fn is_available_in(&self, brain_wave: BrainWave) -> bool
Check if this effect row is compatible with a brain-wave state.
In Alpha/Theta/Delta modes, expensive or write-heavy tools are filtered out to conserve resources.
Sourcepub fn conflicts_with(&self, other: &Self) -> bool
pub fn conflicts_with(&self, other: &Self) -> bool
Check if this effect row conflicts with another (for parallel execution)