Interplane page as plain text, for reading tools and agents. English is the reference text: translate it with your own tool. Text in backticks and in ``` blocks (commands, fingerprints, file names) and link targets in <...> are exact: copy them, never translate them. Page: /drakestapleton/aien-protocols-mv/blob/main/crates/aien-action-protocol/src/lib.rs # aien-protocols-mv Canonical specifications, wire protocols, and schemas for the AIEN sovereign ecosystem Brought by drakestapleton Sign in to star 0 stars 0 watching About Files History Releases Proposed changes Issues For developers branch `main` Branches Tags History `aien-protocols-mv / crates / aien-action-protocol / src / lib.rs` 59 lines ยท 1679 bytes Raw Blame History 1 use aien_protocol_types::{ActionId, AgentId, Digest32, RunId, Timestamp}; 2 use serde::{Deserialize, Serialize}; 3 4 #[derive(Clone, Debug, Eq, PartialEq, Serialize, Deserialize)] 5 pub struct CapabilityGrant { 6 pub capability: String, 7 pub scope: String, 8 pub granted_at: Timestamp, 9 pub expires_at: Option, 10 } 11 12 #[derive(Clone, Debug, Eq, PartialEq, Serialize, Deserialize)] 13 pub struct ContainmentState { 14 pub isolated_network: bool, 15 pub read_only_fs: bool, 16 pub seccomp_profile: String, 17 pub allowed_subprocesses: Vec, 18 } 19 20 impl Default for ContainmentState { 21 fn default() -> Self { 22 Self { 23 isolated_network: true, 24 read_only_fs: true, 25 seccomp_profile: "strict".to_string(), 26 allowed_subprocesses: Vec::new(), 27 } 28 } 29 } 30 31 #[derive(Clone, Debug, Eq, PartialEq, Serialize, Deserialize)] 32 pub struct ActionRequest { 33 pub action_id: ActionId, 34 pub run_id: RunId, 35 pub agent_id: AgentId, 36 pub capability: String, 37 pub parameters: serde_json::Value, 38 pub timestamp: Timestamp, 39 } 40 41 #[derive(Clone, Debug, Eq, PartialEq, Serialize, Deserialize)] 42 pub struct ActionAuthorization { 43 pub authorization_id: uuid::Uuid, 44 pub action_id: ActionId, 45 pub approved_by: String, 46 pub granted_capabilities: Vec, 47 pub timestamp: Timestamp, 48 } 49 50 #[derive(Clone, Debug, Eq, PartialEq, Serialize, Deserialize)] 51 pub struct ActionReceipt { 52 pub receipt_id: uuid::Uuid, 53 pub action_id: ActionId, 54 pub success: bool, 55 pub output: serde_json::Value, 56 pub error: Option, 57 pub execution_digest: Digest32, 58 pub completed_at: Timestamp, 59 }