bctx_conductor/policy/
mod.rs1pub mod audit;
2pub mod capability;
3pub mod guard;
4
5#[derive(Debug, Clone, PartialEq, Eq)]
6pub enum ShellStance {
7 Allow,
8 Track,
9 Sandbox,
10 Deny,
11}
12
13#[derive(Debug, Clone)]
14pub struct AgentPolicy {
15 pub shell_stance: ShellStance,
16 pub token_ceiling: u64,
17 pub cost_ceiling_usd: f64,
18 pub allowed_skills: Vec<String>,
19}
20
21impl AgentPolicy {
22 pub fn permissive() -> Self {
23 Self {
24 shell_stance: ShellStance::Allow,
25 token_ceiling: 1_000_000,
26 cost_ceiling_usd: 100.0,
27 allowed_skills: Vec::new(),
28 }
29 }
30
31 pub fn restrictive() -> Self {
32 Self {
33 shell_stance: ShellStance::Sandbox,
34 token_ceiling: 10_000,
35 cost_ceiling_usd: 1.0,
36 allowed_skills: vec!["sieve".into(), "compass".into()],
37 }
38 }
39}