//! The four tools' arguments, decoded from the model's JSON then re-serialised. Shared by //! `brokerd` (which validates them) and `toolkit` (inside the container, which runs them), so the //! two must agree on one definition. use serde::{Deserialize, Serialize}; /// The arguments for `read_file`. #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] #[serde(deny_unknown_fields)] pub struct ReadFileArgs { pub path: String, } /// The arguments for `write_file`. #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] #[serde(deny_unknown_fields)] pub struct WriteFileArgs { pub path: String, pub content: String, } /// The arguments for `shell`. #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] #[serde(deny_unknown_fields)] pub struct ShellArgs { pub command: String, #[serde(default, skip_serializing_if = "Option::is_none")] pub cwd: Option, } /// The arguments for `http_fetch`. #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] #[serde(deny_unknown_fields)] pub struct HttpFetchArgs { pub url: String, }