Skip to main content

ChildWorkspaceLifecycle

Trait ChildWorkspaceLifecycle 

Source
pub trait ChildWorkspaceLifecycle: Send + Sync {
    // Required methods
    fn finalize(&self, allow_cleanup: bool) -> ChildWorkspaceFinalization;
    fn metadata(&self) -> SubagentWorktreeView;
}
Expand description

Runtime-owned hook invoked when a child with an isolated workspace settles.

Implemented by higher composition layers (for example merry-coding’s Git worktree engine) so merry-runtime stays free of VCS and host-filesystem isolation details.

Required Methods§

Source

fn finalize(&self, allow_cleanup: bool) -> ChildWorkspaceFinalization

Collects net changes from the isolated workspace and applies the fail-toward-keep retention policy.

Called on a blocking thread pool during child teardown. Implementations must never delete a workspace unless confirmed to have zero net changes.

Source

fn metadata(&self) -> SubagentWorktreeView

Returns the current worktree metadata snapshot while the child is active.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§