#[non_exhaustive]pub struct RuntimeWorktree {
pub worktree_root: String,
pub base_commit: String,
pub head_commit: String,
pub ownership: RuntimeWorktreeOwnership,
pub cleanup_policy: RuntimeWorktreeCleanupPolicy,
pub cleanup_state: RuntimeWorktreeCleanupState,
pub parent_dirty_excluded: bool,
pub cleanup_reason: Option<RuntimeWorktreeCleanupReason>,
pub cleanup_diagnostic: Option<String>,
}Expand description
The runtime-owned git worktree a child session runs in, mirrored from the
subagent.worktree.* records on its parent’s log. The four enums are open:
clients treat an unknown value as unknown.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.worktree_root: StringThe recorded worktree root, verbatim (recorded history; serving it never probes the path).
base_commit: StringThe commit the worktree was created from.
head_commit: StringThe head commit the active lease recorded.
ownership: RuntimeWorktreeOwnershipWho owns the worktree.
cleanup_policy: RuntimeWorktreeCleanupPolicyHow the worktree is cleaned up.
cleanup_state: RuntimeWorktreeCleanupStateWhere the worktree’s cleanup stands.
parent_dirty_excluded: boolTrue exactly when the parent’s uncommitted changes were recorded as excluded from the checkout.
cleanup_reason: Option<RuntimeWorktreeCleanupReason>Why cleanup kept the worktree or failed, as the cleanup outcome recorded it; absent when the outcome records no reason.
cleanup_diagnostic: Option<String>The cleanup outcome’s recorded diagnostic, verbatim; absent when the outcome records none.