pub struct WorkspaceContext {
pub root: PathBuf,
pub project_type: String,
pub project_name: String,
pub structure: Vec<String>,
pub is_git_repo: bool,
pub build_command: String,
pub test_command: String,
pub project_md: Option<(String, String)>,
pub additional_project_mds: Vec<(String, String)>,
}Expand description
Collected metadata about the workspace/repository the agent is operating in.
Fields§
§root: PathBufAbsolute path to the workspace root (current working directory).
project_type: StringDetected project type (e.g. “Rust”, “Node.js”, “Python”, “Unknown”).
project_name: StringProject name extracted from Cargo.toml / package.json / setup.py etc.
structure: Vec<String>Top-level directory listing (files and dirs, one level deep).
is_git_repo: boolWhether a .git directory exists.
build_command: StringDetected build command (e.g. “cargo build”, “npm run build”).
test_command: StringDetected test command.
project_md: Option<(String, String)>Contents of the discovered project instruction file (TINYHARNESS.md, AGENTS.md, etc.).
None if no file was found.
additional_project_mds: Vec<(String, String)>Additional project MD files loaded from .tinyharness/config.json’s
project_md_files field (e.g. RULES.md, .cursorrules).
Each entry is (filename, content). Empty if none configured.
Implementations§
Trait Implementations§
Source§impl Clone for WorkspaceContext
impl Clone for WorkspaceContext
Source§fn clone(&self) -> WorkspaceContext
fn clone(&self) -> WorkspaceContext
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for WorkspaceContext
impl RefUnwindSafe for WorkspaceContext
impl Send for WorkspaceContext
impl Sync for WorkspaceContext
impl Unpin for WorkspaceContext
impl UnsafeUnpin for WorkspaceContext
impl UnwindSafe for WorkspaceContext
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more