types

package
v0.8.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 12, 2026 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Category

type Category string

Category classifies the type of debris.

const (
	CategoryWorktree    Category = "worktree"
	CategoryNodeModules Category = "node_modules"
	CategoryBuildCache  Category = "build-cache"
	CategoryOtherCache  Category = "other-cache"
	CategoryAILogs      Category = "ai-logs"
)

func (Category) IsRisky

func (c Category) IsRisky() bool

IsRisky reports whether this category requires explicit --risky opt-in. AI logs and unknown categories default to risky (safe-by-default).

type CategorySummary

type CategorySummary struct {
	Count int
	Size  int64
}

CategorySummary reports aggregate stats for a single category.

type CleanupKind added in v0.3.1

type CleanupKind string

CleanupKind describes how an item should be cleaned.

const (
	CleanupRemovePath CleanupKind = "remove-path"
	CleanupCommand    CleanupKind = "command"
)

type DebrisInfo added in v0.3.0

type DebrisInfo struct {
	Tool           Tool
	Category       Category
	ID             string
	Project        string
	Source         string
	Path           string
	Size           int64
	ModTime        time.Time
	Status         WorktreeStatus // empty for non-worktree debris
	CleanupKind    CleanupKind
	CleanupCommand []string
}

DebrisInfo describes a single debris item found during scanning.

type PruneOptions

type PruneOptions struct {
	Age                    time.Duration
	Categories             []Category
	Tools                  []Tool
	DryRun                 bool
	Interactive            bool
	Risky                  bool
	Force                  bool
	IncludeActiveWorktrees bool
}

PruneOptions configures the filtering and deletion behavior of a clean operation.

type ScanOptions added in v0.3.1

type ScanOptions struct {
	Roots      []string
	OnProgress func(ScanProgressEvent)
}

ScanOptions configures discovery scope for scan providers.

type ScanProgressEvent added in v0.3.1

type ScanProgressEvent struct {
	State ScanProgressState
	Tool  Tool
	Count int
	Size  int64
	Err   error
}

ScanProgressEvent reports provider-level scan activity.

type ScanProgressState added in v0.3.1

type ScanProgressState string

ScanProgressState describes the lifecycle point for a scan provider.

const (
	ScanProgressStart ScanProgressState = "start"
	ScanProgressDone  ScanProgressState = "done"
	ScanProgressError ScanProgressState = "error"
)

type ScanResult

type ScanResult struct {
	Worktrees  []DebrisInfo
	TotalCount int
	TotalSize  int64
	ByCategory map[Category]CategorySummary
	ByTool     map[Tool]ToolSummary
}

ScanResult aggregates all debris found by all adapters.

type Tool

type Tool string

Tool identifies the AI tool that created the debris.

const (
	ToolCodex       Tool = "codex"
	ToolClaude      Tool = "claude"
	ToolCursor      Tool = "cursor"
	ToolWindsurf    Tool = "windsurf"
	ToolNodeModules Tool = "node_modules"
	ToolUnknown     Tool = "unknown"
	ToolBuildCache  Tool = "build-cache"
	ToolPipCache    Tool = "pip-cache"
	ToolAILogs      Tool = "ai-logs"
)

type ToolSummary

type ToolSummary struct {
	Count int
	Size  int64
}

ToolSummary reports aggregate stats for a single tool.

type WorktreeStatus added in v0.3.0

type WorktreeStatus string

WorktreeStatus describes the health of a git worktree.

const (
	WorktreeOrphaned WorktreeStatus = "orphaned"  // .git file exists but parent repo is gone
	WorktreeActive   WorktreeStatus = "active"    // .git file exists and parent repo is alive
	WorktreePlain    WorktreeStatus = "plain-dir" // no .git file (plain directory)
)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL