Public declaration syntax from harness-sdk/src/harness/component.rs Original source SHA-256: e929ff4916c68eb2cfd627b97be7045fccb2eedd4082f06c536940e8357345eb Function bodies and constant values are omitted. This is not the complete implementation. Source line 31 pub const HARNESS_COMPONENT_KINDS: &[HarnessComponentKind]; Source line 45 #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)] #[serde(rename_all = "snake_case")] pub enum HarnessComponentKind { /// `systemprompt.md` — base behavioral rules and prompt scaffold. SystemPrompt, /// `tool_descriptions/*.yaml` — declarations the model sees. ToolDescriptions, /// `tools/*` — the executable tool implementations. ToolImplementations, /// `middleware/*` — pre/post-processing hooks around tool calls. Middleware, /// `skills/{name}/` — reusable cross-task playbooks. Skills, /// `sub_agents/*.yaml` — optional sub-agent workflow configs. SubAgents, /// `LongTermMEMORY.md` — persistent cross-session knowledge. LongTermMemory, /// `ShortTermMEMORY.md` — runtime-only; **not** editable by the /// evolve agent. Listed for exhaustiveness only. ShortTermMemory, } Source line 68 #[must_use] pub fn as_key(self) -> &'static str; Source line 83 #[must_use] pub fn label(self) -> &'static str; Source line 100 #[must_use] pub fn is_editable(self) -> bool; Source line 107 #[must_use] pub fn is_single_file(self) -> bool; Source line 119 #[must_use] pub fn mount(self) -> &'static Path; Source line 135 #[must_use] pub fn from_key(key: &str) -> Option; Source line 152 #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct HarnessComponentEdit { /// Which component kind the edit targets. pub kind: HarnessComponentKind, /// File path relative to the workspace root. For single-file /// kinds this matches `kind.mount()`; for directory-backed kinds /// it's a path *under* the directory (e.g. `tools/grep.py`). pub path: PathBuf, /// What the edit does. pub op: HarnessComponentEditKind } Source line 166 #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] #[serde(tag = "op", rename_all = "snake_case")] pub enum HarnessComponentEditKind { /// Create a new file with the given UTF-8 contents. Create { /// Initial contents. contents: String, }, /// Replace the entire file with the given UTF-8 contents. Update { /// New contents. contents: String, }, /// Delete the file. Delete, /// Rename the file (path stays the same; the new name lives /// under the same component kind). Rename { /// New path relative to the workspace root. new_path: PathBuf, }, } Source line 190 #[must_use] pub fn create( kind: HarnessComponentKind, path: impl Into, contents: impl Into, ) -> Self; Source line 206 #[must_use] pub fn update( kind: HarnessComponentKind, path: impl Into, contents: impl Into, ) -> Self; Source line 222 #[must_use] pub fn delete(kind: HarnessComponentKind, path: impl Into) -> Self; Source line 232 #[must_use] pub fn rename( kind: HarnessComponentKind, path: impl Into, new_path: impl Into, ) -> Self;