Public declaration syntax from harness-sdk/src/plugins/capability.rs Original source SHA-256: 7ae6157a995095b2f862ecded2195e6330f4ae6aa947bea91b18ca1823c61656 Function bodies and constant values are omitted. This is not the complete implementation. Source line 19 #[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)] pub struct Capability { /// The kind of capability. pub kind: CapabilityKind, /// The specific resource (URL, path, command). pub resource: String } Source line 29 #[must_use] pub fn new(kind: CapabilityKind, resource: impl Into) -> Self; Source line 48 #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)] #[serde(rename_all = "snake_case")] pub enum CapabilityKind { /// Network access (HTTP, DNS, WebSocket). Network, /// Filesystem read access. FileRead, /// Filesystem write access. FileWrite, /// Shell command execution. Shell, /// Plugin state storage (scoped to the plugin). Storage, } Source line 64 #[must_use] pub const fn label(&self) -> &'static str; Source line 76 #[must_use] pub const fn risk_level(&self) -> u8; Source line 105 #[derive(Debug, Clone, Default, Serialize, Deserialize)] pub struct CapabilityGrants { } Source line 113 #[must_use] pub fn new() -> Self; Source line 118 pub fn add(&mut self, kind: CapabilityKind, mode: ApprovalMode); Source line 124 #[must_use] pub fn has(&self, kind: CapabilityKind) -> bool; Source line 130 #[must_use] pub fn mode(&self, kind: CapabilityKind) -> Option<&ApprovalMode>; Source line 147 #[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)] #[serde(rename_all = "snake_case")] pub enum ApprovalMode { /// Always allow without asking. Allow, /// Always deny without asking. Deny, /// Ask the user each time. Prompt, /// Allow if the resource matches a pattern. AllowPattern(String), } Source line 161 #[must_use] pub fn requires_user_input(&self) -> bool;