pub fn over_ceiling(
definition: &AgentDefinition,
ceiling: &AgentCeiling,
) -> Vec<String>Expand description
Why a suggested definition exceeds its suggester (spec 3.3 S-I12): what is over the
suggester’s ceiling — its mode, uses and daily spending limit — and what a suggestion
never carries — a shell on this computer, payments or computer use. Empty when it fits.
§Example
use adk_kernel::agents::{AgentCeiling, AgentDefinition, AgentUses, ShellAccess, over_ceiling};
use adk_kernel::PartitionMode;
let ceiling = AgentCeiling::new(PartitionMode::Auto, AgentUses::default().with_shell(ShellAccess::Host));
let host = AgentDefinition::new("Ops", "default").with_uses(AgentUses::default().with_shell(ShellAccess::Host));
assert_eq!(over_ceiling(&host, &ceiling), ["a shell on this computer"]);
let capped = AgentCeiling::new(PartitionMode::Auto, AgentUses::default()).with_daily_limit(2_000_000);
let unlimited = AgentDefinition::new("Ops", "default");
assert_eq!(over_ceiling(&unlimited, &capped), ["spending with no daily limit, where it may spend $2.00"]);